diff options
Diffstat (limited to 'src')
33 files changed, 92 insertions, 1245 deletions
diff --git a/src/3rdparty/libmng/aclocal.m4 b/src/3rdparty/libmng/aclocal.m4 index e94a29abf..4283bf097 100644 --- a/src/3rdparty/libmng/aclocal.m4 +++ b/src/3rdparty/libmng/aclocal.m4 @@ -259,7 +259,6 @@ ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 # HP-UX -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" @@ -390,21 +389,6 @@ case $host in 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_SAVE - AC_LANG_C - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_RESTORE]) - 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 - ;; - ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) @@ -1151,7 +1135,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic, # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) @@ -1211,18 +1195,6 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic, lt_cv_prog_cc_static='-Bstatic' ;; - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static='-non_shared' - ;; - - sco3.2v5*) - lt_cv_prog_cc_pic='-Kpic' - lt_cv_prog_cc_static='-dn' - lt_cv_prog_cc_shlib='-belf' - ;; - solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' @@ -1957,43 +1929,6 @@ else 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 "-exported_symbol " >> $lib.exp; echo "\$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 ${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=: - ;; - - sco3.2v5*) - 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 - export_dynamic_flag_spec='${wl}-Bexport' - ;; - solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of @@ -2477,23 +2412,6 @@ os2*) shlibpath_var=LIBPATH ;; -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - 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" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -3637,17 +3555,6 @@ openbsd*) fi ;; -osf3* | osf4* | osf5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' - lt_cv_file_magic_test_file=/shlib/libc.so - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so diff --git a/src/3rdparty/libmng/config.guess b/src/3rdparty/libmng/config.guess index bbb3a8dde..f75adf068 100755 --- a/src/3rdparty/libmng/config.guess +++ b/src/3rdparty/libmng/config.guess @@ -172,75 +172,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <<EOF >$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; @@ -648,19 +579,6 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; @@ -932,9 +850,6 @@ EOF Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 diff --git a/src/3rdparty/libmng/config.sub b/src/3rdparty/libmng/config.sub index 07355291b..4d87ba463 100755 --- a/src/3rdparty/libmng/config.sub +++ b/src/3rdparty/libmng/config.sub @@ -168,26 +168,6 @@ case $os in -hiux*) os=-hiuxwe2 ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; @@ -526,10 +506,6 @@ case $basic_machine in hppa-next) os=-nextstep3 ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; hppro) basic_machine=hppa1.1-hp os=-proelf @@ -711,10 +687,6 @@ case $basic_machine in basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; pbd) basic_machine=sparc-tti ;; @@ -1052,8 +1024,8 @@ case $os in # 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* \ + | -*vms* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1105,12 +1077,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; diff --git a/src/3rdparty/libmng/configure b/src/3rdparty/libmng/configure index b204ca02e..8bd536d25 100755 --- a/src/3rdparty/libmng/configure +++ b/src/3rdparty/libmng/configure @@ -627,7 +627,7 @@ done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). +# because not all systems understand e.g. LANG=C. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi @@ -1247,7 +1247,7 @@ ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 +# Ultrix -std1 # HP-UX -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" @@ -2047,17 +2047,6 @@ openbsd*) fi ;; -osf3* | osf4* | osf5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' - lt_cv_file_magic_test_file=/shlib/libc.so - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so @@ -2688,59 +2677,6 @@ case $host in fi rm -rf conftest* ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2698: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - - cat > conftest.$ac_ext <<EOF -#line 2711 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - lt_cv_cc_needs_belf=no -fi -rm -f conftest* - ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -fi - -echo "$ac_t""$lt_cv_cc_needs_belf" 1>&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 - ;; - - esac # Sed substitution that helps us do robust quoting. It backslashifies @@ -2892,7 +2828,7 @@ else # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) @@ -2952,18 +2888,6 @@ else lt_cv_prog_cc_static='-Bstatic' ;; - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static='-non_shared' - ;; - - sco3.2v5*) - lt_cv_prog_cc_pic='-Kpic' - lt_cv_prog_cc_static='-dn' - lt_cv_prog_cc_shlib='-belf' - ;; - solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' @@ -3783,43 +3707,6 @@ else 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 "-exported_symbol " >> $lib.exp; echo "\$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 ${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=: - ;; - - sco3.2v5*) - 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 - export_dynamic_flag_spec='${wl}-Bexport' - ;; - solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of @@ -4306,23 +4193,6 @@ os2*) shlibpath_var=LIBPATH ;; -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - 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" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -6053,7 +5923,7 @@ ccp = &g + (g ? g-g : 0); ++ccp; p = (char**) ccp; ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ +{ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; @@ -6794,7 +6664,7 @@ EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. +# small command number limits, like on HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. diff --git a/src/3rdparty/libmng/ltmain.sh b/src/3rdparty/libmng/ltmain.sh index 0ba6bdfe7..3b0d7b2bf 100644 --- a/src/3rdparty/libmng/ltmain.sh +++ b/src/3rdparty/libmng/ltmain.sh @@ -75,7 +75,7 @@ NL2SP='tr \015\012 \040\040' # NLS nuisances. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). +# e.g. LANG=C. # We save the old values to restore during execute mode. if test "${LC_ALL+set}" = set; then save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL @@ -2295,23 +2295,6 @@ compiler." 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" @@ -2471,9 +2454,7 @@ compiler." 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 behaviour. + # whether the library exists or not. newdeplibs=$deplibs ;; test_compile) diff --git a/src/3rdparty/libpng/README b/src/3rdparty/libpng/README index a939432ae..f1589fa77 100644 --- a/src/3rdparty/libpng/README +++ b/src/3rdparty/libpng/README @@ -216,7 +216,7 @@ Files in this distribution: (gcc, creates libpng12.so.0.1.2.5) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile - makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc + makefile.sco => For Unixware 7 with Native cc makefile.mips => MIPS makefile makefile.acorn => Acorn makefile makefile.amiga => Amiga makefile diff --git a/src/3rdparty/libpng/scripts/makefile.sco b/src/3rdparty/libpng/scripts/makefile.sco index 74068a2cc..2f3b47938 100644 --- a/src/3rdparty/libpng/scripts/makefile.sco +++ b/src/3rdparty/libpng/scripts/makefile.sco @@ -1,4 +1,4 @@ -# makefile for SCO OSr5 ELF and Unixware 7 with Native cc +# makefile for Unixware 7 with Native cc # Contributed by Mike Hopkirk ([email protected]) modified from Makefile.lnx # force ELF build dynamic linking, SONAME setting in lib and RPATH in app # Copyright (C) 2002 Glenn Randers-Pehrson diff --git a/src/3rdparty/zlib/configure b/src/3rdparty/zlib/configure index 6e138594e..0b35bcb71 100755 --- a/src/3rdparty/zlib/configure +++ b/src/3rdparty/zlib/configure @@ -105,20 +105,11 @@ else IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} CFLAGS=${CFLAGS-"-ansi -O2"} LDSHARED=${LDSHARED-"cc -shared"};; - OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; - OSF1*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared"};; QNX*) SFLAGS=${CFLAGS-"-4 -O"} CFLAGS=${CFLAGS-"-4 -O"} LDSHARED=${LDSHARED-"cc"} RANLIB=${RANLIB-"true"} AR="cc -A";; - SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} - CFLAGS=${CFLAGS-"-O3"} - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} CFLAGS=${CFLAGS-"-fast -xcg89"} LDSHARED=${LDSHARED-"cc -G"};; diff --git a/src/codecs/tqtextcodec.cpp b/src/codecs/tqtextcodec.cpp index 6c495df8f..7082c43b0 100644 --- a/src/codecs/tqtextcodec.cpp +++ b/src/codecs/tqtextcodec.cpp @@ -2745,7 +2745,7 @@ static void setupLocaleMapper() localeMapper = TQTextCodec::codecForName( "System" ); #else -#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) && !defined(Q_OS_MAC) +#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_MAC) char *charset = nl_langinfo (CODESET); if ( charset ) localeMapper = TQTextCodec::codecForName( charset ); diff --git a/src/kernel/qtaddons_x11.cpp b/src/kernel/qtaddons_x11.cpp deleted file mode 100644 index c1d83e805..000000000 --- a/src/kernel/qtaddons_x11.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * $XFree86: xc/lib/Xft/xftname.c,v 1.10 2001/03/30 18:50:18 keithp Exp $ - * - * Copyright � 2000 Keith Packard, member of The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include "tqt_x11_p.h" - -#if !defined(TQT_NO_XFTFREETYPE) && !defined(QT_XFT2) - -#include <X11/Xft/Xft.h> - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -extern bool tqt_use_xrender; // defined in tqapplication_x11.cpp - -extern "C" { - -#define XFT_DRAW_N_SRC 2 - -struct _XftDraw { - Display *dpy; - Drawable drawable; - Visual *visual; - Colormap colormap; - Region clip; - Bool core_set; - Bool render_set; - Bool render_able; - struct { - Picture pict; - struct { - Picture pict; - XRenderColor color; - } src[XFT_DRAW_N_SRC]; - } render; - struct { - GC draw_gc; - unsigned long fg; - Font font; - } core; -}; - -Picture XftDrawPicture( XftDraw *draw ) -{ - if ( ! draw ) return 0; - if ( ! draw->render_set ) { - // force the RENDER Picture to be created... - XftColor color; - color.color.red = color.color.green = color.color.blue = color.color.alpha = - color.pixel = 0; - XftDrawRect( draw, &color, -100, -100, 1, 1 ); - } - return draw->render.pict; -} - -XftDraw *XftDrawCreateAlpha( Display *display, - Pixmap pixmap, - int depth ) -{ - // taken from Xft 1 sources, see copyright above - XftDraw *draw; - - draw = (XftDraw *) malloc (sizeof (XftDraw)); - if (!draw) - return 0; - draw->dpy = display; - draw->drawable = pixmap; - draw->visual = 0; - draw->colormap = 0; - draw->core_set = False; - draw->clip = 0; - - // TQt addition - go ahead and create the render picture now - draw->render_set = True; - draw->render_able = False; - - if ( tqt_use_xrender ) { - draw->render_able = True; - - XRenderPictFormat *format = 0; - XRenderPictFormat req; - unsigned long mask = PictFormatType | PictFormatDepth | PictFormatAlphaMask; - req.type = PictTypeDirect; - req.depth = depth; - req.direct.alphaMask = 0xff; - format = XRenderFindFormat(draw->dpy, mask, &req, 0); - if (format) { - draw->render.pict = - XRenderCreatePicture(draw->dpy, draw->drawable, format, 0, 0); - } - - // to keep Xft from trying to free zero pixmaps/pictures, we need to create - // 2 more pictures (that are identical to draw->render.pict) :/ - draw->render.src[0].pict = - XRenderCreatePicture( draw->dpy, draw->drawable, format, 0, 0 ); - draw->render.src[1].pict = - XRenderCreatePicture( draw->dpy, draw->drawable, format, 0, 0 ); - } - - return draw; -} - -void XftDrawSetClipRectangles(XftDraw *draw, int xoff, int yoff, XRectangle *rects, int count) -{ - if (!draw) return; - - Picture pict = XftDrawPicture(draw); - XRenderSetPictureClipRectangles(draw->dpy, pict, xoff, yoff, rects, count); -} - -void XftDrawSetSubwindowMode(XftDraw *draw, int mode) -{ - if (!draw) return; - - Picture pict = XftDrawPicture(draw); - XRenderPictureAttributes pattr; - pattr.subwindow_mode = mode; - XRenderChangePicture(draw->dpy, pict, CPSubwindowMode, &pattr); -} - -} // extern "C" - -#endif // !TQT_NO_XFTFREETYPE && !QT_XFT2 diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp index f180f8b9a..fedeed789 100644 --- a/src/kernel/tqapplication_x11.cpp +++ b/src/kernel/tqapplication_x11.cpp @@ -2156,12 +2156,7 @@ void tqt_init_internal( int *argcptr, char **argv, #if !defined(TQT_NO_XFTFREETYPE) // defined in tqfont_x11.cpp extern bool tqt_has_xft; -#ifndef QT_XFT2 - if (!tqt_use_xrender) - tqt_has_xft = FALSE; - else -#endif - tqt_has_xft = XftInit(0) && XftInitFtLibrary(); + tqt_has_xft = XftInit(0) && XftInitFtLibrary(); if (tqt_has_xft) { char *dpi_str = XGetDefault(appDpy, "Xft", "dpi"); diff --git a/src/kernel/tqeventloop_glib_p.h b/src/kernel/tqeventloop_glib_p.h index 45c6a1bfc..9fb8ab507 100644 --- a/src/kernel/tqeventloop_glib_p.h +++ b/src/kernel/tqeventloop_glib_p.h @@ -49,11 +49,6 @@ #include "qplatformdefs.h" #endif // QT_H -// SCO OpenServer redefines raise -> kill -#if defined(raise) -# undef raise -#endif - #include "tqeventloop.h" #include "tqwindowdefs.h" diff --git a/src/kernel/tqeventloop_p.h b/src/kernel/tqeventloop_p.h index 46e5fae9e..395d90a85 100644 --- a/src/kernel/tqeventloop_p.h +++ b/src/kernel/tqeventloop_p.h @@ -57,11 +57,6 @@ #include "qplatformdefs.h" #endif // QT_H -// SCO OpenServer redefines raise -> kill -#if defined(raise) -# undef raise -#endif - #include "tqwindowdefs.h" class TQSocketNotifier; diff --git a/src/kernel/tqfont_x11.cpp b/src/kernel/tqfont_x11.cpp index 77742a5f0..6f4097029 100644 --- a/src/kernel/tqfont_x11.cpp +++ b/src/kernel/tqfont_x11.cpp @@ -393,25 +393,6 @@ void TQFontPrivate::load( TQFont::Script script ) for ( ; it != end; ++it ) subs_list += TQFont::substitutes( *it ); family_list += subs_list; - -#ifndef QT_XFT2 - // with Xft2, we want to use fontconfig to determine better fallbacks, - // otherwise we might run into trouble with default fonts as "serif" - - // append the default fallback font for the specified script - TQString fallback = qt_fallback_font_family( script ); - if ( ! fallback.isEmpty() && ! family_list.contains( fallback ) ) - family_list << fallback; - - // add the default family - TQString defaultFamily = TQApplication::font().family(); - if ( ! family_list.contains( defaultFamily ) ) - family_list << defaultFamily; - - // add TQFont::defaultFamily() to the list, for compatibility with - // previous versions - family_list << TQApplication::font().defaultFamily(); -#endif // QT_XFT2 } // null family means find the first font matching the specified script diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp index 5413f2db4..bda119a03 100644 --- a/src/kernel/tqfontdatabase.cpp +++ b/src/kernel/tqfontdatabase.cpp @@ -996,7 +996,6 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, request.weight, request.italic, request.stretch, request.pixelSize, pitch ); bool usesFontConfig = FALSE; -#ifdef QT_XFT2 if (family_name.isEmpty() || family_name == "Sans Serif" || family_name == "Serif" @@ -1005,7 +1004,6 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, usesFontConfig = (fe != 0); } if (!fe) -#endif { TQtFontFamily *best_family = 0; TQtFontFoundry *best_foundry = 0; @@ -1065,11 +1063,9 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, } else if (try_family->scripts[TQFont::UnknownScript] & TQtFontFamily::Supported) { // try with the unknown script (for a symbol font) override_script = TQFont::UnknownScript; -#ifndef QT_XFT2 } else if (try_family->scripts[TQFont::Unicode] & TQtFontFamily::Supported) { // try with the unicode script instead override_script = TQFont::Unicode; -#endif } else { // family not supported by unicode/unknown scripts continue; diff --git a/src/kernel/tqfontdatabase_x11.cpp b/src/kernel/tqfontdatabase_x11.cpp index 23f1f541c..ee7387387 100644 --- a/src/kernel/tqfontdatabase_x11.cpp +++ b/src/kernel/tqfontdatabase_x11.cpp @@ -58,12 +58,6 @@ #include FT_FREETYPE_H #endif -#ifndef QT_XFT2 -#define FcBool Bool -#define FcTrue True -#define FcFalse False -#endif - #ifdef TQFONTDATABASE_DEBUG # define FD_DEBUG tqDebug #else @@ -721,9 +715,7 @@ static void loadXlfds( const char *reqFamily, int encoding_id ) if ( fontFamily && fontFamily->xlfdLoaded ) return; -#ifdef QT_XFT2 if ( !tqt_has_xft ) { -#endif // QT_XFT2 int fontCount; // force the X server to give us XLFDs TQCString xlfd_pattern = "-*-"; @@ -825,10 +817,7 @@ static void loadXlfds( const char *reqFamily, int encoding_id ) } XFreeFontNames( fontList ); - -#ifdef QT_XFT2 } -#endif // QT_XFT2 } #ifndef TQT_NO_XFTFREETYPE @@ -852,7 +841,6 @@ static void loadXft() if (!tqt_has_xft) return; -#ifdef QT_XFT2 struct XftDefaultFont { const char *qtname; const char *rawname; @@ -893,7 +881,6 @@ static void loadXft() } ++f; } -#endif } #ifdef XFT_MATRIX @@ -968,16 +955,13 @@ static bool loadXftFont( FcPattern* font ) XftPatternGetInteger (font, XFT_SPACING, 0, &spacing_value); XftPatternGetString (font, XFT_FILE, 0, &file_value); XftPatternGetInteger (font, XFT_INDEX, 0, &index_value); -#ifdef QT_XFT2 FcPatternGetBool(font, FC_SCALABLE, 0, &scalable); foundry_value = 0; XftPatternGetString(font, FC_FOUNDRY, 0, &foundry_value); -#endif TQtFontFamily *family = db->family( familyName, TRUE ); family->rawName = rawName; family->hasXft = TRUE; -#ifdef QT_XFT2 FcCharSet *charset = 0; FcResult res = FcPatternGetCharSet(font, FC_CHARSET, 0, &charset); if (res == FcResultMatch && FcCharSetCount(charset) > 1) { @@ -1003,7 +987,6 @@ static bool loadXftFont( FcPattern* font ) family->scripts[i] |= TQtFontFamily::UnSupported_Xft; family->scripts[TQFont::UnknownScript] = TQtFontFamily::Supported; } -#endif // QT_XFT2 TQCString file = (file_value ? file_value : ""); family->fontFilename = file; @@ -1013,7 +996,6 @@ static bool loadXftFont( FcPattern* font ) styleKey.italic = (slant_value == XFT_SLANT_ITALIC); styleKey.oblique = (slant_value == XFT_SLANT_OBLIQUE); styleKey.weight = getXftWeight( weight_value ); -#ifdef QT_XFT2 if (!scalable) { int width = 100; #if FC_VERSION >= 20193 @@ -1021,7 +1003,6 @@ static bool loadXftFont( FcPattern* font ) #endif styleKey.stretch = width; } -#endif TQtFontFoundry *foundry = family->foundry( foundry_value ? TQString::fromUtf8(foundry_value) : TQString::null, TRUE ); @@ -1035,13 +1016,11 @@ static bool loadXftFont( FcPattern* font ) style->smoothScalable = TRUE; size = style->pixelSize( SMOOTH_SCALABLE, TRUE ); } -#ifdef QT_XFT2 else { double pixel_size = 0; XftPatternGetDouble (font, FC_PIXEL_SIZE, 0, &pixel_size); size = style->pixelSize( (int)pixel_size, TRUE ); } -#endif TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE ); enc->pitch = ( spacing_value >= XFT_CHARCELL ? 'c' : ( spacing_value >= XFT_MONO ? 'm' : 'p' ) ); @@ -1051,236 +1030,6 @@ static bool loadXftFont( FcPattern* font ) return true; } -#ifndef QT_XFT2 - -#define MAKE_TAG( _x1, _x2, _x3, _x4 ) \ - ( ( (TQ_UINT32)_x1 << 24 ) | \ - ( (TQ_UINT32)_x2 << 16 ) | \ - ( (TQ_UINT32)_x3 << 8 ) | \ - (TQ_UINT32)_x4 ) - -#ifdef _POSIX_MAPPED_FILES -static inline TQ_UINT32 getUInt(unsigned char *p) -{ - TQ_UINT32 val; - val = *p++ << 24; - val |= *p++ << 16; - val |= *p++ << 8; - val |= *p; - - return val; -} - -static inline TQ_UINT16 getUShort(unsigned char *p) -{ - TQ_UINT16 val; - val = *p++ << 8; - val |= *p; - - return val; -} - -static inline void tag_to_string( char *string, TQ_UINT32 tag ) -{ - string[0] = (tag >> 24)&0xff; - string[1] = (tag >> 16)&0xff; - string[2] = (tag >> 8)&0xff; - string[3] = tag&0xff; - string[4] = 0; -} - -static TQ_UINT16 getGlyphIndex( unsigned char *table, TQ_UINT16 format, unsigned short unicode ) -{ - if ( format == 0 ) { - if ( unicode < 256 ) - return (int) *(table+6+unicode); - } else if ( format == 2 ) { - tqWarning("format 2 encoding table for Unicode, not implemented!"); - } else if ( format == 4 ) { - TQ_UINT16 segCountX2 = getUShort( table + 6 ); - unsigned char *ends = table + 14; - TQ_UINT16 endIndex = 0; - int i = 0; - for ( ; i < segCountX2/2 && (endIndex = getUShort( ends + 2*i )) < unicode; i++ ); - - unsigned char *idx = ends + segCountX2 + 2 + 2*i; - TQ_UINT16 startIndex = getUShort( idx ); - - if ( startIndex > unicode ) - return 0; - - idx += segCountX2; - TQ_INT16 idDelta = (TQ_INT16)getUShort( idx ); - idx += segCountX2; - TQ_UINT16 idRangeoffset_t = (TQ_UINT16)getUShort( idx ); - - TQ_UINT16 glyphIndex; - if ( idRangeoffset_t ) { - TQ_UINT16 id = getUShort( idRangeoffset_t + 2*(unicode - startIndex) + idx); - if ( id ) - glyphIndex = ( idDelta + id ) % 0x10000; - else - glyphIndex = 0; - } else { - glyphIndex = (idDelta + unicode) % 0x10000; - } - return glyphIndex; - } - - return 0; -} -#endif // _POSIX_MAPPED_FILES - -static inline void checkXftCoverage( TQtFontFamily *family ) -{ -#ifdef _POSIX_MAPPED_FILES - TQCString ext = family->fontFilename.mid( family->fontFilename.findRev( '.' ) ).lower(); - if ( family->fontFileIndex == 0 && ( ext == ".ttf" || ext == ".otf" ) ) { - void *map; - // tqDebug("using own ttf code coverage checking of '%s'!", family->name.latin1() ); - int fd = open( family->fontFilename.data(), O_RDONLY ); - size_t pagesize = getpagesize(); - off_t offset = 0; - size_t length = (8192 / pagesize + 1) * pagesize; - - if ( fd == -1 ) - goto xftCheck; - { - if ( (map = mmap( 0, length, PROT_READ, MAP_SHARED, fd, offset ) ) == MAP_FAILED ) - goto error; - - unsigned char *ttf = (unsigned char *)map; - TQ_UINT32 version = getUInt( ttf ); - if ( version != 0x00010000 ) { - // tqDebug("file has wrong version %x", version ); - goto error1; - } - TQ_UINT16 numTables = getUShort( ttf+4 ); - - unsigned char *table_dir = ttf + 12; - TQ_UINT32 cmap_offset = 0; - TQ_UINT32 cmap_length = 0; - for ( int n = 0; n < numTables; n++ ) { - TQ_UINT32 tag = getUInt( table_dir + 16*n ); - if ( tag == MAKE_TAG( 'c', 'm', 'a', 'p' ) ) { - cmap_offset = getUInt( table_dir + 16*n + 8 ); - cmap_length = getUInt( table_dir + 16*n + 12 ); - break; - } - } - if ( !cmap_offset ) { - // tqDebug("no cmap found" ); - goto error1; - } - - if ( cmap_offset + cmap_length > length ) { - munmap( map, length ); - offset = cmap_offset / pagesize * pagesize; - cmap_offset -= offset; - length = (cmap_offset + cmap_length); - if ( (map = mmap( 0, length, PROT_READ, MAP_SHARED, fd, offset ) ) == MAP_FAILED ) - goto error; - } - - unsigned char *cmap = ((unsigned char *)map) + cmap_offset; - - version = getUShort( cmap ); - if ( version != 0 ) { - // tqDebug("wrong cmap version" ); - goto error1; - } - numTables = getUShort( cmap + 2 ); - unsigned char *unicode_table = 0; - bool symbol_table = TRUE; - for ( int n = 0; n < numTables; n++ ) { - TQ_UINT32 version = getUInt( cmap + 4 + 8*n ); - // accept both symbol and Unicode encodings. prefer unicode. - if ( version == 0x00030001 || version == 0x00030000 ) { - unicode_table = cmap + getUInt( cmap + 4 + 8*n + 4 ); - if ( version == 0x00030001 ) { - symbol_table = FALSE; - break; - } - } - } - - if ( !unicode_table ) { - // tqDebug("no unicode table found" ); - goto error1; - } - - TQ_UINT16 format = getUShort( unicode_table ); - if ( format != 4 ) - goto error1; - - if (symbol_table) { - // we set UnknownScript to supported for symbol fonts. It makes no sense to merge these - // with other ones, as they are special in a way. - for ( int i = 0; i < TQFont::LastPrivateScript; ++i ) - family->scripts[i] |= TQtFontFamily::UnSupported_Xft; - family->scripts[TQFont::UnknownScript] = TQtFontFamily::Supported; - } else { - for ( int i = 0; i < TQFont::LastPrivateScript; ++i ) { - - bool supported = sample_chars[i][0]; - for (int j = 0; sample_chars[i][j]; ++j) { - if (!getGlyphIndex(unicode_table, format, sample_chars[i][j])) { - supported=false; - break; - } - } - if ( supported ){ - // tqDebug("font can render script %d", i ); - family->scripts[i] = TQtFontFamily::Supported; - } else { - family->scripts[i] |= TQtFontFamily::UnSupported_Xft; - } - } - } - family->xftScriptCheck = TRUE; - } - error1: - munmap( map, length ); - error: - close( fd ); - if ( family->xftScriptCheck ) - return; - } - xftCheck: -#endif // _POSIX_MAPPED_FILES - - FD_DEBUG("using Freetype for checking of '%s'", family->name.latin1() ); - - FT_Library ft_lib; - FT_Error error = FT_Init_FreeType( &ft_lib ); - if ( error ) return; - FT_Face face; - error = FT_New_Face( ft_lib, family->fontFilename, family->fontFileIndex, &face ); - if ( error ) return; - - for ( int i = 0; i < TQFont::LastPrivateScript; ++i ) { - bool supported = sample_chars[i][j]; - for (int j = 0; sample_chars[i][j]; ++j){ - if (!FT_Get_Char_Index(face, sample_chars[i][j])) { - supported=false; - break; - } - } - if ( supported ){ - FD_DEBUG("font can render char %04x, %04x script %d '%s'", - ch.unicode(), FT_Get_Char_Index ( face, ch.unicode() ), - i, TQFontDatabase::scriptName( (TQFont::Script)i ).latin1() ); - - family->scripts[i] = TQtFontFamily::Supported; - } else { - family->scripts[i] |= TQtFontFamily::UnSupported_Xft; - } - } - FT_Done_Face( face ); - FT_Done_FreeType( ft_lib ); - family->xftScriptCheck = TRUE; -} -#endif // QT_XFT2 #endif // TQT_NO_XFTFREETYPE static void load( const TQString &family = TQString::null, int script = -1 ) @@ -1301,21 +1050,17 @@ static void load( const TQString &family = TQString::null, int script = -1 ) (const char *)0, XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_SPACING, XFT_FILE, XFT_INDEX, -#ifdef QT_XFT2 FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, #if FC_VERSION >= 20193 FC_WIDTH, #endif -#endif // QT_XFT2 (const char *)0); for (int i = 0; i < fonts->nfont; i++) loadXftFont( fonts->fonts[i] ); XftFontSetDestroy (fonts); } -#ifdef QT_XFT2 if (tqt_has_xft) return; -#endif #endif // TQT_NO_XFTFREETYPE if ( script == -1 ) loadXlfds( 0, -1 ); @@ -1340,12 +1085,10 @@ static void load( const TQString &family = TQString::null, int script = -1 ) (const char *)0, XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_SPACING, XFT_FILE, XFT_INDEX, -#ifdef QT_XFT2 FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, #if FC_VERSION >= 20193 FC_WIDTH, #endif -#endif // QT_XFT2 (const char *)0); for (int i = 0; i < fonts->nfont; i++) loadXftFont( fonts->fonts[i] ); @@ -1355,16 +1098,8 @@ static void load( const TQString &family = TQString::null, int script = -1 ) goto redo; } f->fullyLoaded = TRUE; -#ifdef QT_XFT2 return; -#endif } -#ifndef QT_XFT2 - // need to check Xft coverage - if ( f->hasXft && !f->xftScriptCheck ) { - checkXftCoverage( f ); - } -#endif #endif // TQT_NO_XFTFREETYPE // could reduce this further with some more magic: // would need to remember the encodings loaded for the family. @@ -1389,10 +1124,6 @@ static void initializeDb() db = new TQFontDatabasePrivate; tqfontdatabase_cleanup.set(&db); -#ifndef QT_XFT2 - memset( encodingLoaded, FALSE, sizeof( encodingLoaded ) ); -#endif - TQTime t; t.start(); @@ -1405,11 +1136,6 @@ static void initializeDb() #ifndef TQT_NO_XFTFREETYPE for ( int i = 0; i < db->count; i++ ) { -#ifndef QT_XFT2 - checkXftCoverage( db->families[i] ); - FD_DEBUG("TQFontDatabase: xft coverage check: %d ms", t.elapsed() ); -#endif // QT_XFT2 - #ifdef XFT_MATRIX checkXftMatrix( db->families[i] ); #endif // XFT_MATRIX @@ -1418,9 +1144,7 @@ static void initializeDb() #ifdef TQFONTDATABASE_DEBUG -#ifdef QT_XFT2 if (!tqt_has_xft) -#endif // load everything at startup in debug mode. loadXlfds( 0, -1 ); @@ -1520,7 +1244,6 @@ static double addPatternProps(XftPattern *pattern, const TQtFontStyle::Key &key, size_value = MAXFONTSIZE_XFT; } -#ifdef QT_XFT2 /* 2006-12-28 If QT is not compiled against xft1, there is no need for the workaround above (confirmed). Thus, in addition, add @@ -1530,12 +1253,10 @@ static double addPatternProps(XftPattern *pattern, const TQtFontStyle::Key &key, */ XftPatternAddDouble(pattern, XFT_PIXEL_SIZE, size_value); XftPatternAddDouble(pattern, XFT_DPI, dpi); -#endif size_value = size_value*72./dpi; XftPatternAddDouble( pattern, XFT_SIZE, size_value ); #ifdef XFT_MATRIX -# ifdef QT_XFT2 if (!smoothScalable) { # if FC_VERSION >= 20193 int stretch = request.stretch; @@ -1544,7 +1265,6 @@ static double addPatternProps(XftPattern *pattern, const TQtFontStyle::Key &key, XftPatternAddInteger(pattern, FC_WIDTH, stretch); # endif } else -# endif if ( ( request.stretch > 0 && request.stretch != 100 ) || ( key.oblique && fakeOblique ) ) { XftMatrix matrix; @@ -1602,7 +1322,6 @@ TQFontEngine *loadEngine( TQFont::Script script, if ( !pattern ) return 0; bool symbol = (family->scripts[TQFont::UnknownScript] == TQtFontFamily::Supported); -# ifdef QT_XFT2 if (!symbol && script != TQFont::Unicode) { FcCharSet *cs = FcCharSetCreate(); for ( int j=0; sample_chars[script][j]; j++ ) @@ -1613,9 +1332,6 @@ TQFontEngine *loadEngine( TQFont::Script script, FcPatternAddCharSet(pattern, FC_CHARSET, cs); FcCharSetDestroy(cs); } -# else - XftPatternAddString( pattern, XFT_ENCODING, symbol ? "adobe-fontspecific" : "iso10646-1"); -# endif // QT_XFT2 if ( !foundry->name.isEmpty() ) XftPatternAddString( pattern, XFT_FOUNDRY, @@ -1636,7 +1352,6 @@ TQFontEngine *loadEngine( TQFont::Script script, XftResult res; XftPattern *result = XftFontMatch( TQPaintDevice::x11AppDisplay(), fp->screen, pattern, &res ); -#ifdef QT_XFT2 if (result && script == TQFont::Latin) { // since we added the Euro char on top, check we actually got the family // we requested. If we didn't get it correctly, remove the Euro from the pattern @@ -1653,7 +1368,6 @@ TQFontEngine *loadEngine( TQFont::Script script, result = XftFontMatch( TQPaintDevice::x11AppDisplay(), fp->screen, pattern, &res ); } } -#endif XftPatternDestroy(pattern); if (!result) return 0; @@ -1752,8 +1466,6 @@ TQFontEngine *loadEngine( TQFont::Script script, } -#ifdef QT_XFT2 - static void parseFontName(const TQString &name, TQString &foundry, TQString &family) { if ( name.contains('[') && name.contains(']')) { @@ -2027,5 +1739,3 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef return fe; } - -#endif diff --git a/src/kernel/tqfontengine_p.h b/src/kernel/tqfontengine_p.h index dcd306fc0..fe8714ef3 100644 --- a/src/kernel/tqfontengine_p.h +++ b/src/kernel/tqfontengine_p.h @@ -48,16 +48,18 @@ #include "tqtextengine_p.h" -class TQPaintDevice; +typedef unsigned int glyph_t; +typedef int advance_t; struct glyph_metrics_t; -class TQChar; -typedef unsigned short glyph_t; struct qoffset_t; -typedef int advance_t; -class TQOpenType; struct TransformedFont; +class TQChar; +class TQOpenType; +class TQPaintDevice; + + #if defined( TQ_WS_X11 ) || defined( TQ_WS_WIN) || defined( TQ_WS_MAC ) class TQFontEngine : public TQShared { diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp index 1157bbb57..b3461a6ff 100644 --- a/src/kernel/tqfontengine_x11.cpp +++ b/src/kernel/tqfontengine_x11.cpp @@ -488,7 +488,15 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len, chars[i] = (str[i].unicode() == 0xa0 ? 0x20 : (mirrored ? ::mirroredChar(str[i]).unicode() : str[i].unicode())); } - _codec->fromUnicodeInternal( chars, glyphs, len ); + // XLFD does not support unicode characters above 0xFFFF, so casting to ushort + // does not cause real loss + ushort *us_glyphs = new ushort[len]; + _codec->fromUnicodeInternal( chars, us_glyphs, len ); + for ( int i = 0; i < len; ++i ) { + glyphs[i] = us_glyphs[i]; + } + delete[] us_glyphs; + if (chars != str) free( chars ); } else { @@ -1444,63 +1452,27 @@ public: }; -#ifdef QT_XFT2 static inline void getGlyphInfo( XGlyphInfo *xgi, XftFont *font, int glyph ) { FT_UInt x = glyph; XftGlyphExtents( TQPaintDevice::x11AppDisplay(), font, &x, 1, xgi ); } -#else -static inline XftFontStruct *getFontStruct( XftFont *font ) -{ - if (font->core) - return 0; - return font->u.ft.font; -} - -static inline void getGlyphInfo(XGlyphInfo *xgi, XftFont *font, int glyph) -{ - - XftTextExtents32(TQPaintDevice::x11AppDisplay(), font, (XftChar32 *) &glyph, 1, xgi); -} -#endif // QT_XFT2 static inline FT_Face lockFTFace( XftFont *font ) { -#ifdef QT_XFT2 return XftLockFace( font ); -#else - if (font->core) return 0; - return font->u.ft.font->face; -#endif // QT_XFT2 } static inline void unlockFTFace( XftFont *font ) { -#ifdef QT_XFT2 XftUnlockFace( font ); -#else - Q_UNUSED( font ); -#endif // QT_XFT2 } - - TQFontEngineXft::TQFontEngineXft( XftFont *font, XftPattern *pattern, int cmap ) : _font( font ), _pattern( pattern ), _openType( 0 ), _cmap( cmap ) { _face = lockFTFace( _font ); -#ifndef QT_XFT2 - XftFontStruct *xftfs = getFontStruct( _font ); - if ( xftfs ) { - // dirty hack: we set the charmap in the Xftfreetype to -1, so - // XftFreetype assumes no encoding and really draws glyph - // indices. The FT_Face still has the Unicode encoding to we - // can convert from Unicode to glyph index - xftfs->charmap = -1; - } -#else _cmap = -1; // Xft maps Unicode and adobe roman for us. for (int i = 0; i < _face->num_charmaps; ++i) { @@ -1513,8 +1485,6 @@ TQFontEngineXft::TQFontEngineXft( XftFont *font, XftPattern *pattern, int cmap ) break; } } -#endif // QT_XFT2 - cache_cost = _font->height * _font->max_advance_width * ( _face ? _face->num_glyphs : 1024 ); @@ -1552,7 +1522,6 @@ TQFontEngineXft::~TQFontEngineXft() } } -#ifdef QT_XFT2 static glyph_t getAdobeCharIndex(XftFont *font, int cmap, uint ucs4) { FT_Face _face = XftLockFace( font ); @@ -1561,7 +1530,18 @@ static glyph_t getAdobeCharIndex(XftFont *font, int cmap, uint ucs4) XftUnlockFace(font); return g; } -#endif + +static uint getChar(const TQChar *str, int &i, const int len) +{ + uint uc = str[i].unicode(); + if (uc >= 0xd800 && uc < 0xdc00 && i < len-1) { + uint low = str[++i].unicode(); + if (low >= 0xdc00 && low < 0xe000) { + uc = (uc - 0xd800)*0x400 + (low - 0xdc00) + 0x10000; + } + } + return uc; +} TQFontEngine::Error TQFontEngineXft::stringToCMap( const TQChar *str, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool mirrored ) const { @@ -1570,123 +1550,39 @@ TQFontEngine::Error TQFontEngineXft::stringToCMap( const TQChar *str, int len, g return OutOfMemory; } -#ifdef QT_XFT2 - if (_cmap != -1) { - for ( int i = 0; i < len; ++i ) { - unsigned short uc = str[i].unicode(); - if (mirrored) - uc = ::mirroredChar(str[i]).unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - glyph_t glyph = XftCharIndex(0, _font, uc); - if (!glyph) - glyph = getAdobeCharIndex(_font, _cmap, uc); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) - ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; + int glyph_pos = 0; + for ( int i = 0; i < len; ++i ) { + uint uc = getChar(str, i, len); + if ( uc == 0xa0 ) + uc = 0x20; + if ( mirrored ) + uc = ::mirroredChar(uc).unicode(); + glyphs[glyph_pos] = uc < cmapCacheSize ? cmapCache[uc] : 0; + if ( !glyphs[glyph_pos] ) { + glyph_t glyph = 0; + if (XftCharExists(0, _font, uc)) { + glyph = XftCharIndex(0, _font, uc); } - } - } else if ( mirrored ) { - for ( int i = 0; i < len; ++i ) { - unsigned short uc = ::mirroredChar(str[i]).unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - if (uc == 0xa0) - uc = 0x20; - glyph_t glyph = XftCharIndex(0, _font, uc); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) - ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; + if ( !glyph && _cmap != -1 ) { + glyph = getAdobeCharIndex(_font, _cmap, uc); } - } - } else { - for ( int i = 0; i < len; ++i ) { - unsigned short uc = str[i].unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - if (uc == 0xa0) - uc = 0x20; - glyph_t glyph = XftCharIndex(0, _font, uc); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) + if ( glyph ) { + glyphs[glyph_pos] = glyph; + if ( uc < cmapCacheSize ) { ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; - } - } - } - - if ( advances ) { - for ( int i = 0; i < len; i++ ) { - FT_UInt glyph = *(glyphs + i); - advances[i] = (glyph < widthCacheSize) ? widthCache[glyph] : 0; - if ( !advances[i] ) { - XGlyphInfo gi; - XftGlyphExtents( TQPaintDevice::x11AppDisplay(), _font, &glyph, 1, &gi ); - advances[i] = gi.xOff; - if ( glyph < widthCacheSize && gi.xOff > 0 && gi.xOff < 0x100 ) - ((TQFontEngineXft *)this)->widthCache[glyph] = gi.xOff; - } - } - if ( _scale != 1. ) { - for ( int i = 0; i < len; i++ ) - advances[i] = tqRound(advances[i]*_scale); - } - } -#else - if ( !_face ) { - if ( mirrored ) { - for ( int i = 0; i < len; i++ ) - glyphs[i] = ::mirroredChar(str[i]).unicode(); - } else { - for ( int i = 0; i < len; i++ ) - glyphs[i] = str[i].unicode(); - } - } else { - if ( _cmap == 1 ) { - // symbol font - for ( int i = 0; i < len; i++ ) { - unsigned short uc = str[i].unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - glyph_t glyph = FT_Get_Char_Index( _face, uc ); - if(!glyph && uc < 0x100) - glyph = FT_Get_Char_Index( _face, uc+0xf000 ); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) - ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; - } - } - } else if ( mirrored ) { - for ( int i = 0; i < len; i++ ) { - unsigned short uc = ::mirroredChar(str[i]).unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - glyph_t glyph = FT_Get_Char_Index( _face, uc ); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) - ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; - } - } - } else { - for ( int i = 0; i < len; i++ ) { - unsigned short uc = str[i].unicode(); - glyphs[i] = uc < cmapCacheSize ? cmapCache[uc] : 0; - if ( !glyphs[i] ) { - glyph_t glyph = FT_Get_Char_Index( _face, uc ); - glyphs[i] = glyph; - if ( uc < cmapCacheSize ) - ((TQFontEngineXft *)this)->cmapCache[uc] = glyph; } } } + ++glyph_pos; } if ( advances ) { - for ( int i = 0; i < len; i++ ) { - XftChar16 glyph = *(glyphs + i); + for ( int i = 0; i < glyph_pos; i++ ) { + glyph_t glyph = *(glyphs + i); advances[i] = (glyph < widthCacheSize) ? widthCache[glyph] : 0; if ( !advances[i] ) { XGlyphInfo gi; - XftTextExtents16(TQPaintDevice::x11AppDisplay(), _font, &glyph, 1, &gi); + XftGlyphExtents( TQPaintDevice::x11AppDisplay(), _font, &glyph, 1, &gi ); advances[i] = gi.xOff; if ( glyph < widthCacheSize && gi.xOff > 0 && gi.xOff < 0x100 ) ((TQFontEngineXft *)this)->widthCache[glyph] = gi.xOff; @@ -1697,9 +1593,8 @@ TQFontEngine::Error TQFontEngineXft::stringToCMap( const TQChar *str, int len, g advances[i] = tqRound(advances[i]*_scale); } } -#endif // QT_XFT2 - *nglyphs = len; + *nglyphs = glyph_pos; return NoError; } @@ -1707,7 +1602,6 @@ TQFontEngine::Error TQFontEngineXft::stringToCMap( const TQChar *str, int len, g void TQFontEngineXft::recalcAdvances( int len, glyph_t *glyphs, advance_t *advances ) { -#ifdef QT_XFT2 for ( int i = 0; i < len; i++ ) { FT_UInt glyph = *(glyphs + i); advances[i] = (glyph < widthCacheSize) ? widthCache[glyph] : 0; @@ -1723,23 +1617,6 @@ void TQFontEngineXft::recalcAdvances( int len, glyph_t *glyphs, advance_t *advan advances[i] = tqRound(advances[i]*_scale); } } -#else - for ( int i = 0; i < len; i++ ) { - XftChar16 glyph = *(glyphs + i); - advances[i] = (glyph < widthCacheSize) ? widthCache[glyph] : 0; - if ( !advances[i] ) { - XGlyphInfo gi; - XftTextExtents16(TQPaintDevice::x11AppDisplay(), _font, &glyph, 1, &gi); - advances[i] = gi.xOff; - if ( glyph < widthCacheSize && gi.xOff > 0 && gi.xOff < 0x100 ) - ((TQFontEngineXft *)this)->widthCache[glyph] = gi.xOff; - } - } - if ( _scale != 1. ) { - for ( int i = 0; i < len; i++ ) - advances[i] = tqRound(advances[i]*_scale); - } -#endif // QT_XFT2 } //#define FONTENGINE_DEBUG @@ -1817,16 +1694,6 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi XftPatternAddMatrix( pattern, XFT_MATRIX, &m2 ); fnt = XftFontOpenPattern( dpy, pattern ); -#ifndef QT_XFT2 - XftFontStruct *xftfs = getFontStruct( fnt ); - if ( xftfs ) { - // dirty hack: we set the charmap in the Xftfreetype to -1, so - // XftFreetype assumes no encoding and really draws glyph - // indices. The FT_Face still has the Unicode encoding to we - // can convert from Unicode to glyph index - xftfs->charmap = -1; - } -#endif // QT_XFT2 TransformedFont *trf = new TransformedFont; trf->xx = (float)m2.xx; trf->xy = (float)m2.xy; @@ -1882,14 +1749,9 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi int yp = y + offsets[i].y; if ( transform ) p->map( xp, yp, &xp, &yp ); -#ifdef QT_XFT2 FT_UInt glyph = *(glyphs + i); if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) XftDrawGlyphs( draw, &col, fnt, xp, yp, &glyph, 1 ); -#else - if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) - XftDrawString16( draw, &col, fnt, xp, yp, (XftChar16 *) (glyphs+i), 1); -#endif // QT_XFT2 #ifdef FONTENGINE_DEBUG glyph_metrics_t gi = boundingBox( glyphs[i] ); p->drawRect( x+offsets[i].x+gi.x, y+offsets[i].y+100+gi.y, gi.width, gi.height ); @@ -1907,14 +1769,9 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi int yp = y + offsets[i].y; if ( transform ) p->map( xp, yp, &xp, &yp ); -#ifdef QT_XFT2 FT_UInt glyph = *(glyphs + i); if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) XftDrawGlyphs( draw, &col, fnt, xp, yp, &glyph, 1 ); -#else - if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) - XftDrawString16( draw, &col, fnt, xp, yp, (XftChar16 *) (glyphs+i), 1 ); -#endif // QT_XFT2 // tqDebug("advance = %d/%d", adv.x, adv.y ); x += advances[i]; i++; @@ -1923,7 +1780,6 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi } else { // Xft has real trouble drawing the glyphs on their own. // Drawing them as one string increases performance significantly. -#ifdef QT_XFT2 // #### we should use a different method anyways on Xft2 FT_UInt g[64]; int gl = 0; @@ -1946,29 +1802,6 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi gl += toDraw; x += adv; } -#else - XftChar16 g[64]; - int gl = 0; - while (gl < si->num_glyphs) { - int toDraw = TQMIN(64, si->num_glyphs-gl); - int adv = 0; - if ( si->analysis.bidiLevel % 2 ) { - for ( int i = 0; i < toDraw; i++ ) { - g[i] = glyphs[si->num_glyphs-1-(gl+i)]; - adv += advances[si->num_glyphs-1-(gl+i)]; - } - } else { - for ( int i = 0; i < toDraw; i++ ) { - g[i] = glyphs[gl+i]; - adv += advances[gl+i]; - } - } - if (x + adv < SHRT_MAX && x > SHRT_MIN) - XftDrawString16( draw, &col, fnt, x, y, g, toDraw ); - gl += toDraw; - x += adv; - } -#endif // QT_XFT2 } #ifdef FONTENGINE_DEBUG @@ -2166,7 +1999,6 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len ) { bool allExist = TRUE; -#ifdef QT_XFT2 if (_cmap != -1) { for ( int i = 0; i < len; i++ ) { if (!XftCharExists(0, _font, string[i].unicode()) @@ -2183,25 +2015,6 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len ) } } } -#else - glyph_t glyphs[256]; - int nglyphs = 255; - glyph_t *g = glyphs; - if ( stringToCMap( string, len, g, 0, &nglyphs, FALSE ) == OutOfMemory ) { - g = (glyph_t *)malloc( nglyphs*sizeof(glyph_t) ); - stringToCMap( string, len, g, 0, &nglyphs, FALSE ); - } - - for ( int i = 0; i < nglyphs; i++ ) { - if ( !XftGlyphExists(TQPaintDevice::x11AppDisplay(), _font, g[i]) ) { - allExist = FALSE; - break; - } - } - - if ( g != glyphs ) - free( g ); -#endif // QT_XFT2 return allExist; } diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp index 452af0a57..7b30e0af6 100644 --- a/src/kernel/tqpainter.cpp +++ b/src/kernel/tqpainter.cpp @@ -2883,12 +2883,12 @@ void qt_format_text( const TQFont& font, const TQRect &_r, int desc = fm.descent(); height = -leading; - //tqDebug("\n\nbeginLayout: lw = %d, rectwidth=%d", lineWidth , r.width()); + //tqDebug("beginLayout: lw = %d, rectwidth=%d", lineWidth , r.width()); while ( !textLayout.atEnd() ) { height += leading; - textLayout.beginLine( lineWidth == INT_MAX ? lineWidth : lineWidth ); + textLayout.beginLine( lineWidth ); //tqDebug("-----beginLine( %d )-----", lineWidth ); - bool linesep = FALSE; + bool linesep = false; while ( 1 ) { TQTextItem ti = textLayout.currentItem(); //tqDebug("item: from=%d, ch=%x", ti.from(), text.unicode()[ti.from()].unicode() ); @@ -2913,7 +2913,7 @@ void qt_format_text( const TQFont& font, const TQRect &_r, ti.setWidth( tw ); } if ( ti.isObject() && text.unicode()[ti.from()] == TQChar_linesep ) - linesep = TRUE; + linesep = true; if ( linesep || textLayout.addCurrentItem() != TQTextLayout::Ok || textLayout.atEnd() ) break; diff --git a/src/kernel/tqpainter_x11.cpp b/src/kernel/tqpainter_x11.cpp index d419b3411..e477f2aaa 100644 --- a/src/kernel/tqpainter_x11.cpp +++ b/src/kernel/tqpainter_x11.cpp @@ -170,15 +170,7 @@ static inline void x11ClearClipRegion(Display *dpy, GC gc, GC gc2, TQt::HANDLE d #ifndef TQT_NO_XFTFREETYPE if (draw) { -# ifdef QT_XFT2 XftDrawSetClip((XftDraw *) draw, None); -# else - // stupid Xft1 - Picture pict = XftDrawPicture((XftDraw *) draw); - XRenderPictureAttributes pattr; - pattr.clip_mask = None; - XRenderChangePicture(dpy, pict, CPClipMask, &pattr); -# endif // QT_XFT2 } #else Q_UNUSED(draw); diff --git a/src/kernel/tqpixmap_x11.cpp b/src/kernel/tqpixmap_x11.cpp index 36c050005..f2e4b0ca2 100644 --- a/src/kernel/tqpixmap_x11.cpp +++ b/src/kernel/tqpixmap_x11.cpp @@ -374,13 +374,6 @@ static int defaultScreen = -1; extern bool tqt_use_xrender; // defined in tqapplication_x11.cpp extern bool tqt_has_xft; // defined in tqfont_x11.cpp -#ifndef TQT_NO_XFTFREETYPE -#ifndef QT_XFT2 -// Xft1 doesn't have XftDrawCreateAlpha, so we fake it in qtaddons_x11.cpp -extern "C" XftDraw *XftDrawCreateAlpha( Display *, TQt::HANDLE, int ); -#endif // QT_XFT2 -#endif // TQT_NO_XFTFREETYPE - /***************************************************************************** TQPixmap member functions *****************************************************************************/ diff --git a/src/kernel/tqprinter_unix.cpp b/src/kernel/tqprinter_unix.cpp index e53dc5ff6..e5bacff9c 100644 --- a/src/kernel/tqprinter_unix.cpp +++ b/src/kernel/tqprinter_unix.cpp @@ -412,7 +412,6 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p ) uint i; for (i = 0; i < lphack.size(); ++i) lpargs[i+1] = (char *)lphack[i].ascii(); -#ifndef Q_OS_OSF if (psToStr[page_size]) { lpargs[++i] = (char *)"-o"; lpargs[++i] = (char *)psToStr[page_size]; @@ -421,7 +420,6 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p ) media += psToStr[page_size]; lpargs[++i] = (char *)media.ascii(); } -#endif lpargs[++i] = 0; char **lprargs = new char *[lprhack.size()+1]; lprargs[0] = (char *)"lpr"; diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp index 2d97c84d5..588596716 100644 --- a/src/kernel/tqscriptengine.cpp +++ b/src/kernel/tqscriptengine.cpp @@ -279,15 +279,13 @@ void qt_heuristicPosition(TQShaperItem *item) -// set the glyph attributes heuristically. Assumes a 1 to 1 relationship between chars and glyphs -// and no reordering. -// also computes logClusters heuristically +// Set the glyph attributes heuristically. Assumes no reordering. +// Also computes logClusters heuristically static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, int length) { // justification is missing here!!!!! - if ( item->num_glyphs != length ) - tqWarning("TQScriptEngine::heuristicSetGlyphAttributes: char length and num glyphs disagree" ); + Q_ASSERT(item->num_glyphs <= length); unsigned short *logClusters = item->log_clusters; diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp index 27a4ce33c..7b21783b0 100644 --- a/src/kernel/tqstyle.cpp +++ b/src/kernel/tqstyle.cpp @@ -1033,7 +1033,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, \value PE_ScrollBarAddLine scrollbar line increase indicator (i.e. scroll down); see also TQScrollBar. \value PE_ScrollBarSubLine scrollbar line decrease indicator (i.e. scroll up). - \value PE_ScrollBarAddPage scolllbar page increase indicator (i.e. page down). + \value PE_ScrollBarAddPage scrollbar page increase indicator (i.e. page down). \value PE_ScrollBarSubPage scrollbar page decrease indicator (i.e. page up). \value PE_ScrollBarSlider scrollbar slider \value PE_ScrollBarFirst scrollbar first line indicator (i.e. home). @@ -1986,7 +1986,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, value. If TRUE, when clicking a scrollbar SubControl, holding the mouse button down and moving the pointer outside the SubControl, the scrollbar continues to scroll. If FALSE, the - scollbar stops scrolling when the pointer leaves the + scrollbar stops scrolling when the pointer leaves the SubControl. \value SH_TabBar_Alignment the alignment for tabs in a @@ -2063,7 +2063,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, cause a listview expansion to be selected. \value SH_TabBar_PreferNoArrows whether a tabbar should suggest a size - to prevent scoll arrows. + to prevent scroll arrows. \value SH_ComboBox_Popup allows popups as a combobox dropdown menu. diff --git a/src/kernel/tqt_x11.pri b/src/kernel/tqt_x11.pri index c81055eb3..cd8d856a5 100644 --- a/src/kernel/tqt_x11.pri +++ b/src/kernel/tqt_x11.pri @@ -8,7 +8,6 @@ unix { !xkb:DEFINES += TQT_NO_XKB xft2header:DEFINES+=QT_USE_XFT2_HEADER - SOURCES += $$KERNEL_CPP/qtaddons_x11.cpp PRECOMPILED_HEADER = kernel/qt_pch.h SOURCES += $$KERNEL_CPP/tqttdeintegration_x11.cpp diff --git a/src/kernel/tqt_x11_p.h b/src/kernel/tqt_x11_p.h index 5d807238a..b21fe3732 100644 --- a/src/kernel/tqt_x11_p.h +++ b/src/kernel/tqt_x11_p.h @@ -157,17 +157,6 @@ extern "C" { # else # include <X11/Xft/Xft.h> # endif // QT_USE_XFT2_HEADER -# if defined(XFT_VERSION) && XFT_VERSION >= 20000 -# define QT_XFT2 -# else -# include <X11/Xft/XftFreetype.h> -// Xft1 doesn't have these functions, so we implement them in qtaddons_x11.cpp -extern "C" { - TQt::HANDLE XftDrawPicture( XftDraw * ); - void XftDrawSetClipRectangles(XftDraw *, int, int, XRectangle *, int); - void XftDrawSetSubwindowMode(XftDraw *, int); -} -# endif // XFT_VERSION # endif // TQT_NO_XFTFREETYPE #else // make sure TQT_NO_XFTFREETYPE is defined if TQT_NO_XRENDER is defined @@ -198,9 +187,6 @@ typedef char *XPointer; #if defined(X11R4) // X11R4 does not have XIM #define TQT_NO_XIM -#elif defined(Q_OS_OSF) && (XlibSpecificationRelease < 6) -// broken in Xlib up to OSF/1 3.2 -#define TQT_NO_XIM #elif defined(Q_OS_AIX) // broken in Xlib up to what version of AIX? #define TQT_NO_XIM @@ -211,9 +197,6 @@ typedef char *XPointer; #elif defined(Q_OS_HPUX) && defined(__LP64__) // XCreateIC broken when compiling 64-bit ELF on HP-UX 11.0 #define TQT_NO_XIM -#elif defined(Q_OS_SCO) -// ### suggested by user... -// ### #define TQT_NO_XIM #endif // TQT_NO_XIM diff --git a/src/kernel/tqtextengine.cpp b/src/kernel/tqtextengine.cpp index 6c046a5b8..f50d849cc 100644 --- a/src/kernel/tqtextengine.cpp +++ b/src/kernel/tqtextengine.cpp @@ -150,7 +150,7 @@ static TQChar::Direction basicDirection( const TQString &str ) } -static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) +static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) { TQScriptItemArray &items = engine->items; const TQChar *text = engine->string.unicode(); @@ -243,9 +243,6 @@ static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiContr start = stop; } -typedef void (* fAppendItems)(TQTextEngine *, int &start, int &stop, BidiControl &control, TQChar::Direction dir); -static fAppendItems appendItems = tqAppendItems; - // creates the next TQScript items. static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) { @@ -666,8 +663,6 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) if ( sor <= eor ) appendItems(engine, sor, eor, control, dir); - - } void TQTextEngine::bidiReorder( int numItems, const TQ_UINT8 *levels, int *visualOrder ) diff --git a/src/kernel/tqtextengine_p.h b/src/kernel/tqtextengine_p.h index d092a3e7d..d3e8ea3ee 100644 --- a/src/kernel/tqtextengine_p.h +++ b/src/kernel/tqtextengine_p.h @@ -86,57 +86,28 @@ struct glyph_metrics_t int yoff; }; -#if defined( TQ_WS_X11 ) -typedef unsigned short glyph_t; - -struct qoffset_t { - short x; - short y; -}; - +typedef unsigned int glyph_t; typedef int advance_t; -struct TQScriptAnalysis -{ - unsigned short script : 7; - unsigned short bidiLevel : 6; // Unicode Bidi algorithm embedding level (0-61) - unsigned short override : 1; // Set when in LRO/RLO embedding - unsigned short reserved : 2; - bool operator == ( const TQScriptAnalysis &other ) { - return - script == other.script && - bidiLevel == other.bidiLevel; - // ### -// && override == other.override; - } +#if defined( TQ_WS_X11 ) || defined( TQ_WS_MAC ) -}; - -#elif defined( TQ_WS_MAC ) - -typedef unsigned short glyph_t; - -struct qoffset_t { +struct qoffset_t +{ short x; short y; }; -typedef int advance_t; - struct TQScriptAnalysis { unsigned short script : 7; unsigned short bidiLevel : 6; // Unicode Bidi algorithm embedding level (0-61) unsigned short override : 1; // Set when in LRO/RLO embedding unsigned short reserved : 2; - bool operator == ( const TQScriptAnalysis &other ) { - return - script == other.script && - bidiLevel == other.bidiLevel; - // ### -// && override == other.override; - } + bool operator== ( const TQScriptAnalysis &other ) + { + return script == other.script && bidiLevel == other.bidiLevel; + } }; #elif defined( TQ_WS_WIN ) @@ -144,15 +115,12 @@ struct TQScriptAnalysis // do not change the definitions below unless you know what you are doing! // it is designed to be compatible with the types found in uniscribe. -typedef unsigned short glyph_t; - -struct qoffset_t { +struct qoffset_t +{ int x; int y; }; -typedef int advance_t; - struct TQScriptAnalysis { unsigned short script :10; unsigned short rtl :1; @@ -174,13 +142,9 @@ struct TQScriptAnalysis { unsigned short engineReserved :2; }; -inline bool operator == ( const TQScriptAnalysis &sa1, const TQScriptAnalysis &sa2 ) +inline bool operator== ( const TQScriptAnalysis &sa1, const TQScriptAnalysis &sa2 ) { - return - sa1.script == sa2.script && - sa1.bidiLevel == sa2.bidiLevel; - // ### -// && override == other.override; + return sa1.script == sa2.script && sa1.bidiLevel == sa2.bidiLevel; } #endif diff --git a/src/kernel/tqtextengine_unix.cpp b/src/kernel/tqtextengine_unix.cpp index 0d5e3b920..0de67f04a 100644 --- a/src/kernel/tqtextengine_unix.cpp +++ b/src/kernel/tqtextengine_unix.cpp @@ -80,8 +80,8 @@ void TQTextEngine::shape( int item ) const si.fontEngine = fnt->engineForScript( script ); si.fontEngine->ref(); - si.ascent = si.fontEngine->ascent(); - si.descent = si.fontEngine->descent(); + si.ascent = si.fontEngine->ascent(); + si.descent = si.fontEngine->descent(); si.num_glyphs = 0; if ( si.fontEngine && si.fontEngine != (TQFontEngine*)-1 ) { @@ -96,7 +96,6 @@ void TQTextEngine::shape( int item ) const shaper_item.has_positioning = FALSE; while (1) { -// tqDebug(" . num_glyphs=%d, used=%d, item.num_glyphs=%d", num_glyphs, used, shaper_item.num_glyphs); ensureSpace(shaper_item.num_glyphs); shaper_item.num_glyphs = num_glyphs - used; // tqDebug(" .. num_glyphs=%d, used=%d, item.num_glyphs=%d", num_glyphs, used, shaper_item.num_glyphs); diff --git a/src/opengl/tqgl_x11.cpp b/src/opengl/tqgl_x11.cpp index 72870e83d..95a92e566 100644 --- a/src/opengl/tqgl_x11.cpp +++ b/src/opengl/tqgl_x11.cpp @@ -867,11 +867,7 @@ void qgl_use_font(TQFontEngineXft *engine, int first, int count, int listBase) #if 0 // disable antialias support for now XftPatternGetBool(engine->pattern(), XFT_ANTIALIAS, 0, &antialiased); #endif -#ifdef QT_XFT2 FT_Face face = XftLockFace(engine->font()); -#else - FT_Face face = engine->face(); -#endif // start generating font glyphs for (int i = first; i < count; ++i) { int list = listBase + i; @@ -934,9 +930,7 @@ void qgl_use_font(TQFontEngineXft *engine, int first, int count, int listBase) antialiased ? delete[] aa_glyph : delete[] ua_glyph; } -#ifdef QT_XFT2 XftUnlockFace(engine->font()); -#endif // restore pixel unpack settings glPixelStorei(GL_UNPACK_SWAP_BYTES, gl_swapbytes); diff --git a/src/tools/tqdatastream.cpp b/src/tools/tqdatastream.cpp index f2980a4e1..dd4114bcb 100644 --- a/src/tools/tqdatastream.cpp +++ b/src/tools/tqdatastream.cpp @@ -503,7 +503,7 @@ static TQ_INT64 read_int_ascii( TQDataStream *s ) } buf[n] = '\0'; -#if defined(__LP64__) || defined(Q_OS_OSF) +#if defined(__LP64__) // sizeof(long) == 8 return strtol(buf, (char **)0, 10); #else diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h index f80109911..b49fdc242 100644 --- a/src/tools/tqglobal.h +++ b/src/tools/tqglobal.h @@ -67,8 +67,6 @@ OPENBSD - OpenBSD BSDI - BSD/OS IRIX - SGI Irix - OSF - HP Tru64 UNIX - SCO - SCO OpenServer 5 UNIXWARE - UnixWare 7, Open UNIX 8 AIX - AIX HURD - GNU Hurd @@ -128,8 +126,6 @@ # define Q_OS_BSD4 #elif defined(__sgi) # define Q_OS_IRIX -#elif defined(__osf__) -# define Q_OS_OSF #elif defined(_AIX) # define Q_OS_AIX #elif defined(__Lynx__) @@ -142,9 +138,7 @@ # define Q_OS_QNX #elif defined(_SEQUENT_) # define Q_OS_DYNIX -#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ -# define Q_OS_SCO -#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ +#elif defined(__USLC__) /* all UDK or OUDK */ # define Q_OS_UNIXWARE # define Q_OS_UNIXWARE7 #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ @@ -203,7 +197,7 @@ DEC - DEC C++ HP - HPUX C++ HPACC - HPUX ANSI C++ - USLC - SCO OUDK, UDK, and UnixWare 2.X C++ + USLC - UDK, and UnixWare 2.X C++ KAI - KAI C++ INTEL - Intel C++ for Linux, Intel C++ for Windows HIGHC - MetaWare High C/C++ @@ -339,36 +333,6 @@ # define Q_CANNOT_DELETE_CONSTANT # endif -/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed - on DEC C++ V5.5-004. New versions do define __EDG__ - observed on - Compaq C++ V6.3-002. - This compiler is different enough from other EDG compilers to handle - it separately anyway. */ -#elif defined(__DECCXX) || defined(__DECC) -# define Q_CC_DEC -/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older - DEC C++ V5 compilers. */ -# if defined(__EDG__) -# define Q_CC_EDG -# endif -/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead - - observed on Compaq C++ V6.3-002. - In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ -# if !defined(_BOOL_EXISTS) -# define Q_NO_BOOL_TYPE -# endif -/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ -# define Q_NO_USING_KEYWORD -/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on - DEC C++ V5.5-004. */ -# if __DECCXX_VER < 60060000 -# define TQ_TYPENAME -# define Q_BROKEN_TEMPLATE_SPECIALIZATION -# define Q_CANNOT_DELETE_CONSTANT -# endif -/* avoid undefined symbol problems with out-of-line template members */ -# define TQ_INLINE_TEMPLATES inline - /* Compilers with EDG front end are similar. To detect them we test: __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp index 60cfc1bb0..a53d34571 100644 --- a/src/tools/tqlocale.cpp +++ b/src/tools/tqlocale.cpp @@ -70,11 +70,6 @@ # include <ieeefp.h> #endif -#if defined (Q_OS_OSF) && (defined(__DECC) || defined(__DECCXX)) -# define INFINITY DBL_INFINITY -# define NAN DBL_QNAN -#endif - #if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE) # define NEEDS_VOLATILE volatile #else |