Changeset 25147
- Timestamp:
- 28.02.2012 13:59:00 (8 years ago)
- Location:
- main/trunk/greenstone2/common-src/indexers
- Files:
-
- 201 modified
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mg/Makefile.in
r22058 r25147 28 28 29 29 CC = @CC@ 30 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-fpic30 CFLAGS = @CFLAGS@ -fpic 31 31 INSTALL = @INSTALL@ 32 32 INSTALL_DATA = @INSTALL_DATA@ 33 33 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 34 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@34 LDFLAGS = @LDFLAGS@ 35 35 LIBS = @LIBS@ 36 36 TOUCH = echo timestamp > -
main/trunk/greenstone2/common-src/indexers/mg/configure
r23356 r25147 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.6 7.3 # Generated by GNU Autoconf 2.65. 4 4 # 5 5 # 6 6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 , 2010 Free Software8 # Foundation,Inc.7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, 8 # Inc. 9 9 # 10 10 # … … 317 317 done 318 318 test -z "$as_dirs" || eval "mkdir $as_dirs" 319 } || test -d "$as_dir" || as_fn_error $?"cannot create directory $as_dir"319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" 320 320 321 321 … … 357 357 358 358 359 # as_fn_error STATUSERROR [LINENO LOG_FD]360 # --------------------------------- -------359 # as_fn_error ERROR [LINENO LOG_FD] 360 # --------------------------------- 361 361 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 362 362 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 363 # script with STATUS, using 1 if that was 0.363 # script with status $?, using 1 if that was 0. 364 364 as_fn_error () 365 365 { 366 as_status=$ 1; test $as_status -eq 0 && as_status=1367 if test "$ 4"; then368 as_lineno=${as_lineno-"$ 3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $ 2" >&$4366 as_status=$?; test $as_status -eq 0 && as_status=1 367 if test "$3"; then 368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 370 370 fi 371 $as_echo "$as_me: error: $ 2" >&2371 $as_echo "$as_me: error: $1" >&2 372 372 as_fn_exit $as_status 373 373 } # as_fn_error … … 531 531 532 532 # Name of the host. 533 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,533 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, 534 534 # so uname gets run too. 535 535 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` … … 626 626 CXXFLAGS 627 627 CXX 628 COMPAT32BITFLAGS629 628 ENABLE_JAVA 630 629 VERSION … … 763 762 764 763 case $ac_option in 765 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 766 *=) ac_optarg= ;; 767 *) ac_optarg=yes ;; 764 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 765 *) ac_optarg=yes ;; 768 766 esac 769 767 … … 810 808 # Reject names that are not valid shell variable names. 811 809 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 812 as_fn_error $?"invalid feature name: $ac_useropt"810 as_fn_error "invalid feature name: $ac_useropt" 813 811 ac_useropt_orig=$ac_useropt 814 812 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` … … 836 834 # Reject names that are not valid shell variable names. 837 835 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 838 as_fn_error $?"invalid feature name: $ac_useropt"836 as_fn_error "invalid feature name: $ac_useropt" 839 837 ac_useropt_orig=$ac_useropt 840 838 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` … … 1040 1038 # Reject names that are not valid shell variable names. 1041 1039 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1042 as_fn_error $?"invalid package name: $ac_useropt"1040 as_fn_error "invalid package name: $ac_useropt" 1043 1041 ac_useropt_orig=$ac_useropt 1044 1042 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` … … 1056 1054 # Reject names that are not valid shell variable names. 1057 1055 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1058 as_fn_error $?"invalid package name: $ac_useropt"1056 as_fn_error "invalid package name: $ac_useropt" 1059 1057 ac_useropt_orig=$ac_useropt 1060 1058 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` … … 1086 1084 x_libraries=$ac_optarg ;; 1087 1085 1088 -*) as_fn_error $?"unrecognized option: \`$ac_option'1089 Try \`$0 --help' for more information "1086 -*) as_fn_error "unrecognized option: \`$ac_option' 1087 Try \`$0 --help' for more information." 1090 1088 ;; 1091 1089 … … 1095 1093 case $ac_envvar in #( 1096 1094 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1097 as_fn_error $?"invalid variable name: \`$ac_envvar'" ;;1095 as_fn_error "invalid variable name: \`$ac_envvar'" ;; 1098 1096 esac 1099 1097 eval $ac_envvar=\$ac_optarg … … 1113 1111 if test -n "$ac_prev"; then 1114 1112 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1115 as_fn_error $?"missing argument to $ac_option"1113 as_fn_error "missing argument to $ac_option" 1116 1114 fi 1117 1115 … … 1119 1117 case $enable_option_checking in 1120 1118 no) ;; 1121 fatal) as_fn_error $?"unrecognized options: $ac_unrecognized_opts" ;;1119 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; 1122 1120 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1123 1121 esac … … 1142 1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1143 1141 esac 1144 as_fn_error $?"expected an absolute directory name for --$ac_var: $ac_val"1142 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" 1145 1143 done 1146 1144 … … 1156 1154 if test "x$build_alias" = x; then 1157 1155 cross_compiling=maybe 1158 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.1159 If a cross compiler is detected then cross compile mode will be used " >&21156 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. 1157 If a cross compiler is detected then cross compile mode will be used." >&2 1160 1158 elif test "x$build_alias" != "x$host_alias"; then 1161 1159 cross_compiling=yes … … 1172 1170 ac_ls_di=`ls -di .` && 1173 1171 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1174 as_fn_error $?"working directory cannot be determined"1172 as_fn_error "working directory cannot be determined" 1175 1173 test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1176 as_fn_error $?"pwd does not report name of working directory"1174 as_fn_error "pwd does not report name of working directory" 1177 1175 1178 1176 … … 1213 1211 if test ! -r "$srcdir/$ac_unique_file"; then 1214 1212 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1215 as_fn_error $?"cannot find sources ($ac_unique_file) in $srcdir"1213 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" 1216 1214 fi 1217 1215 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1218 1216 ac_abs_confdir=`( 1219 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $?"$ac_msg"1217 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" 1220 1218 pwd)` 1221 1219 # When building in place, set srcdir=. … … 1257 1255 --help=recursive display the short help of all the included packages 1258 1256 -V, --version display version information and exit 1259 -q, --quiet, --silent do not print \`checking 1257 -q, --quiet, --silent do not print \`checking...' messages 1260 1258 --cache-file=FILE cache test results in FILE [disabled] 1261 1259 -C, --config-cache alias for \`--cache-file=config.cache' … … 1413 1411 cat <<\_ACEOF 1414 1412 configure 1415 generated by GNU Autoconf 2.6 71416 1417 Copyright (C) 20 10Free Software Foundation, Inc.1413 generated by GNU Autoconf 2.65 1414 1415 Copyright (C) 2009 Free Software Foundation, Inc. 1418 1416 This configure script is free software; the Free Software Foundation 1419 1417 gives unlimited permission to copy, distribute and modify it. … … 1523 1521 fi 1524 1522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1525 test $ac_status = 0; } > conftest.i&& {1523 test $ac_status = 0; } >/dev/null && { 1526 1524 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 1527 1525 test ! -s conftest.err … … 1547 1545 { 1548 1546 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1549 if eval "test \"\${$3+set}\"" = set; then :1547 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1550 1548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1551 1549 $as_echo_n "checking for $2... " >&6; } 1552 if eval "test \"\${$3+set}\"" = set; then :1550 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1553 1551 $as_echo_n "(cached) " >&6 1554 1552 fi … … 1586 1584 ac_header_preproc=no 1587 1585 fi 1588 rm -f conftest.err conftest. i conftest.$ac_ext1586 rm -f conftest.err conftest.$ac_ext 1589 1587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 1590 1588 $as_echo "$ac_header_preproc" >&6; } … … 1613 1611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1614 1612 $as_echo_n "checking for $2... " >&6; } 1615 if eval "test \"\${$3+set}\"" = set; then :1613 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1616 1614 $as_echo_n "(cached) " >&6 1617 1615 else … … 1677 1675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1678 1676 $as_echo_n "checking for $2... " >&6; } 1679 if eval "test \"\${$3+set}\"" = set; then :1677 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1680 1678 $as_echo_n "(cached) " >&6 1681 1679 else … … 1754 1752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1755 1753 $as_echo_n "checking for $2... " >&6; } 1756 if eval "test \"\${$3+set}\"" = set; then :1754 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1757 1755 $as_echo_n "(cached) " >&6 1758 1756 else … … 1807 1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1808 1806 $as_echo_n "checking for $2... " >&6; } 1809 if eval "test \"\${$3+set}\"" = set; then :1807 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : 1810 1808 $as_echo_n "(cached) " >&6 1811 1809 else … … 1870 1868 1871 1869 It was created by $as_me, which was 1872 generated by GNU Autoconf 2.6 7. Invocation command line was1870 generated by GNU Autoconf 2.65. Invocation command line was 1873 1871 1874 1872 $ $0 $@ … … 1980 1978 echo 1981 1979 1982 $as_echo "## ---------------- ## 1980 cat <<\_ASBOX 1981 ## ---------------- ## 1983 1982 ## Cache variables. ## 1984 ## ---------------- ##" 1983 ## ---------------- ## 1984 _ASBOX 1985 1985 echo 1986 1986 # The following way of writing the cache mishandles newlines in values, … … 2016 2016 echo 2017 2017 2018 $as_echo "## ----------------- ## 2018 cat <<\_ASBOX 2019 ## ----------------- ## 2019 2020 ## Output variables. ## 2020 ## ----------------- ##" 2021 ## ----------------- ## 2022 _ASBOX 2021 2023 echo 2022 2024 for ac_var in $ac_subst_vars … … 2031 2033 2032 2034 if test -n "$ac_subst_files"; then 2033 $as_echo "## ------------------- ## 2035 cat <<\_ASBOX 2036 ## ------------------- ## 2034 2037 ## File substitutions. ## 2035 ## ------------------- ##" 2038 ## ------------------- ## 2039 _ASBOX 2036 2040 echo 2037 2041 for ac_var in $ac_subst_files … … 2047 2051 2048 2052 if test -s confdefs.h; then 2049 $as_echo "## ----------- ## 2053 cat <<\_ASBOX 2054 ## ----------- ## 2050 2055 ## confdefs.h. ## 2051 ## ----------- ##" 2056 ## ----------- ## 2057 _ASBOX 2052 2058 echo 2053 2059 cat confdefs.h … … 2104 2110 ac_site_file2=NONE 2105 2111 if test -n "$CONFIG_SITE"; then 2106 # We do not want a PATH search for config.site. 2107 case $CONFIG_SITE in #(( 2108 -*) ac_site_file1=./$CONFIG_SITE;; 2109 */*) ac_site_file1=$CONFIG_SITE;; 2110 *) ac_site_file1=./$CONFIG_SITE;; 2111 esac 2112 ac_site_file1=$CONFIG_SITE 2112 2113 elif test "x$prefix" != xNONE; then 2113 2114 ac_site_file1=$prefix/share/config.site … … 2124 2125 $as_echo "$as_me: loading site script $ac_site_file" >&6;} 2125 2126 sed 's/^/| /' "$ac_site_file" >&5 2126 . "$ac_site_file" \ 2127 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2128 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2129 as_fn_error $? "failed to load site script $ac_site_file 2130 See \`config.log' for more details" "$LINENO" 5 ; } 2127 . "$ac_site_file" 2131 2128 fi 2132 2129 done … … 2204 2201 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2205 2202 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2206 as_fn_error $?"run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 52203 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2207 2204 fi 2208 2205 ## -------------------- ## … … 2222 2219 ac_aux_dir= 2223 2220 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 2224 if test -f "$ac_dir/install-sh"; then 2225 ac_aux_dir=$ac_dir 2226 ac_install_sh="$ac_aux_dir/install-sh -c" 2227 break 2228 elif test -f "$ac_dir/install.sh"; then 2229 ac_aux_dir=$ac_dir 2230 ac_install_sh="$ac_aux_dir/install.sh -c" 2231 break 2232 elif test -f "$ac_dir/shtool"; then 2233 ac_aux_dir=$ac_dir 2234 ac_install_sh="$ac_aux_dir/shtool install -c" 2235 break 2236 fi 2221 for ac_t in install-sh install.sh shtool; do 2222 if test -f "$ac_dir/$ac_t"; then 2223 ac_aux_dir=$ac_dir 2224 ac_install_sh="$ac_aux_dir/$ac_t -c" 2225 break 2 2226 fi 2227 done 2237 2228 done 2238 2229 if test -z "$ac_aux_dir"; then 2239 as_fn_error $?"cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 52230 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 2240 2231 fi 2241 2232 … … 2251 2242 # Make sure we can run config.sub. 2252 2243 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 2253 as_fn_error $?"cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 52244 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 2254 2245 2255 2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 … … 2262 2253 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 2263 2254 test "x$ac_build_alias" = x && 2264 as_fn_error $?"cannot guess build type; you must specify one" "$LINENO" 52255 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 2265 2256 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 2266 as_fn_error $?"$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 52257 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 2267 2258 2268 2259 fi … … 2271 2262 case $ac_cv_build in 2272 2263 *-*-*) ;; 2273 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;2264 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; 2274 2265 esac 2275 2266 build=$ac_cv_build … … 2296 2287 else 2297 2288 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 2298 as_fn_error $?"$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 52289 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 2299 2290 fi 2300 2291 … … 2304 2295 case $ac_cv_host in 2305 2296 *-*-*) ;; 2306 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;2297 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; 2307 2298 esac 2308 2299 host=$ac_cv_host … … 2329 2320 else 2330 2321 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 2331 as_fn_error $?"$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 52322 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 2332 2323 fi 2333 2324 … … 2337 2328 case $ac_cv_target in 2338 2329 *-*-*) ;; 2339 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;2330 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; 2340 2331 esac 2341 2332 target=$ac_cv_target … … 2402 2393 else 2403 2394 ENABLE_JAVA=0 2404 fi2405 2406 2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if architecture is 64-bit" >&52408 $as_echo_n "checking to see if architecture is 64-bit... " >&6; }2409 arch_64bit=no2410 case "$host_cpu" in2411 x86_64) arch_64bit=yes ;;2412 esac2413 2414 if test "$arch_64bit" = yes; then2415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&52416 $as_echo "yes" >&6; }2417 if test -z "$COMPAT32BITFLAGS" ; then2418 COMPAT32BITFLAGS="-m32"2419 fi2420 else2421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&52422 $as_echo "no" >&6; }2423 if test -z "$COMPAT32BITFLAGS" ; then2424 COMPAT32BITFLAGS=2425 fi2426 2395 fi 2427 2396 … … 2651 2620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2652 2621 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2653 as_fn_error 77 "C++ compiler cannot create executables 2654 See \`config.log' for more details" "$LINENO" 5 ; } 2622 { as_fn_set_status 77 2623 as_fn_error "C++ compiler cannot create executables 2624 See \`config.log' for more details." "$LINENO" 5; }; } 2655 2625 else 2656 2626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 … … 2694 2664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2695 2665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2696 as_fn_error $?"cannot compute suffix of executables: cannot compile and link2697 See \`config.log' for more details " "$LINENO" 5; }2666 as_fn_error "cannot compute suffix of executables: cannot compile and link 2667 See \`config.log' for more details." "$LINENO" 5; } 2698 2668 fi 2699 2669 rm -f conftest conftest$ac_cv_exeext … … 2752 2722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2753 2723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2754 as_fn_error $?"cannot run C++ compiled programs.2724 as_fn_error "cannot run C++ compiled programs. 2755 2725 If you meant to cross compile, use \`--host'. 2756 See \`config.log' for more details " "$LINENO" 5; }2726 See \`config.log' for more details." "$LINENO" 5; } 2757 2727 fi 2758 2728 fi … … 2805 2775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2806 2776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2807 as_fn_error $?"cannot compute suffix of object files: cannot compile2808 See \`config.log' for more details " "$LINENO" 5; }2777 as_fn_error "cannot compute suffix of object files: cannot compile 2778 See \`config.log' for more details." "$LINENO" 5; } 2809 2779 fi 2810 2780 rm -f conftest.$ac_cv_objext conftest.$ac_ext … … 3320 3290 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3321 3291 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3322 as_fn_error $?"no acceptable C compiler found in \$PATH3323 See \`config.log' for more details " "$LINENO" 5; }3292 as_fn_error "no acceptable C compiler found in \$PATH 3293 See \`config.log' for more details." "$LINENO" 5; } 3324 3294 3325 3295 # Provide some information about the compiler. … … 3668 3638 set x ${MAKE-make} 3669 3639 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 3670 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :3640 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : 3671 3641 $as_echo_n "(cached) " >&6 3672 3642 else … … 3676 3646 @echo '@@@%%%=$(MAKE)=@@@%%%' 3677 3647 _ACEOF 3678 # GNU make sometimes prints "make[1]: Entering 3648 # GNU make sometimes prints "make[1]: Entering...", which would confuse us. 3679 3649 case `${MAKE-make} -f conftest.make 2>/dev/null` in 3680 3650 *@@@%%%=?*=@@@%%%*) … … 3879 3849 3880 3850 fi 3881 test x$JAVA = x && as_fn_error $?"no acceptable Java virtual machine found in \$PATH" "$LINENO" 53851 test x$JAVA = x && as_fn_error "no acceptable Java virtual machine found in \$PATH" "$LINENO" 5 3882 3852 fi 3883 3853 … … 3941 3911 ac_cv_prog_uudecode_base64=yes 3942 3912 else 3943 echo "configure: 39 43: uudecode had trouble decoding base 64 file 'Test.uue'" >&53913 echo "configure: 3913: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 3944 3914 echo "configure: failed file was:" >&5 3945 3915 cat Test.uue >&5 … … 3956 3926 $as_echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} 3957 3927 if test x$ac_cv_prog_javac_works = xno; then 3958 as_fn_error $?"Cannot compile java source. $JAVAC does not work properly" "$LINENO" 53928 as_fn_error "Cannot compile java source. $JAVAC does not work properly" "$LINENO" 5 3959 3929 fi 3960 3930 if test x$ac_cv_prog_javac_works = x; then … … 4049 4019 4050 4020 fi 4051 test "x$JAVAC" = x && as_fn_error $?"no acceptable Java compiler found in \$PATH" "$LINENO" 54021 test "x$JAVAC" = x && as_fn_error "no acceptable Java compiler found in \$PATH" "$LINENO" 5 4052 4022 else 4053 4023 echo "Checking for javac... $JAVAC" … … 4064 4034 CLASS_TEST=Test.class 4065 4035 cat << \EOF > $JAVA_TEST 4066 /* #line 40 66 "configure" */4036 /* #line 4036 "configure" */ 4067 4037 public class Test { 4068 4038 } … … 4076 4046 ac_cv_prog_javac_works=yes 4077 4047 else 4078 as_fn_error $?"The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 54048 as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 4079 4049 echo "configure: failed program was:" >&5 4080 4050 cat $JAVA_TEST >&5 … … 4103 4073 TEST=Test 4104 4074 cat << \EOF > $JAVA_TEST 4105 /* [#]line 4 105 "configure" */4075 /* [#]line 4075 "configure" */ 4106 4076 public class Test { 4107 4077 public static void main (String args[]) { … … 4120 4090 echo "configure: failed program was:" >&5 4121 4091 cat $JAVA_TEST >&5 4122 as_fn_error $?"The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 54092 as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 4123 4093 fi 4124 4094 fi … … 4133 4103 echo "configure: failed program was:" >&5 4134 4104 cat $JAVA_TEST >&5 4135 as_fn_error $?"The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 54105 as_fn_error "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 4136 4106 fi 4137 4107 rm -fr $JAVA_TEST $CLASS_TEST Test.uue … … 4233 4203 4234 4204 fi 4235 test "x$JAVAC" = x && as_fn_error $?"no acceptable Java compiler found in \$PATH" "$LINENO" 54205 test "x$JAVAC" = x && as_fn_error "no acceptable Java compiler found in \$PATH" "$LINENO" 5 4236 4206 else 4237 4207 echo "Checking for javac... $JAVAC" … … 4248 4218 CLASS_TEST=Test.class 4249 4219 cat << \EOF > $JAVA_TEST 4250 /* #line 42 50 "configure" */4220 /* #line 4220 "configure" */ 4251 4221 public class Test { 4252 4222 } … … 4260 4230 ac_cv_prog_javac_works=yes 4261 4231 else 4262 as_fn_error $?"The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 54232 as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 4263 4233 echo "configure: failed program was:" >&5 4264 4234 cat $JAVA_TEST >&5 … … 4320 4290 continue 4321 4291 fi 4322 rm -f conftest.err conftest. i conftest.$ac_ext4292 rm -f conftest.err conftest.$ac_ext 4323 4293 4324 4294 # OK, works on sane cases. Now check whether nonexistent headers … … 4336 4306 break 4337 4307 fi 4338 rm -f conftest.err conftest. i conftest.$ac_ext4308 rm -f conftest.err conftest.$ac_ext 4339 4309 4340 4310 done 4341 4311 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4342 rm -f conftest. i conftest.err conftest.$ac_ext4312 rm -f conftest.err conftest.$ac_ext 4343 4313 if $ac_preproc_ok; then : 4344 4314 break … … 4379 4349 continue 4380 4350 fi 4381 rm -f conftest.err conftest. i conftest.$ac_ext4351 rm -f conftest.err conftest.$ac_ext 4382 4352 4383 4353 # OK, works on sane cases. Now check whether nonexistent headers … … 4395 4365 break 4396 4366 fi 4397 rm -f conftest.err conftest. i conftest.$ac_ext4367 rm -f conftest.err conftest.$ac_ext 4398 4368 4399 4369 done 4400 4370 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4401 rm -f conftest. i conftest.err conftest.$ac_ext4371 rm -f conftest.err conftest.$ac_ext 4402 4372 if $ac_preproc_ok; then : 4403 4373 … … 4405 4375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4406 4376 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4407 as_fn_error $?"C preprocessor \"$CPP\" fails sanity check4408 See \`config.log' for more details " "$LINENO" 5; }4377 as_fn_error "C preprocessor \"$CPP\" fails sanity check 4378 See \`config.log' for more details." "$LINENO" 5; } 4409 4379 fi 4410 4380 … … 4467 4437 IFS=$as_save_IFS 4468 4438 if test -z "$ac_cv_path_GREP"; then 4469 as_fn_error $?"no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 54439 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 4470 4440 fi 4471 4441 else … … 4533 4503 IFS=$as_save_IFS 4534 4504 if test -z "$ac_cv_path_EGREP"; then 4535 as_fn_error $?"no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 54505 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 4536 4506 fi 4537 4507 else … … 4665 4635 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 4666 4636 " 4667 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 4637 eval as_val=\$$as_ac_Header 4638 if test "x$as_val" = x""yes; then : 4668 4639 cat >>confdefs.h <<_ACEOF 4669 4640 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 … … 5097 5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 5098 5069 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } 5099 if eval "test \"\${$as_ac_Header+set}\"" = set; then :5070 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : 5100 5071 $as_echo_n "(cached) " >&6 5101 5072 else … … 5124 5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 5125 5096 $as_echo "$ac_res" >&6; } 5126 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 5097 eval as_val=\$$as_ac_Header 5098 if test "x$as_val" = x""yes; then : 5127 5099 cat >>confdefs.h <<_ACEOF 5128 5100 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 … … 5366 5338 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 5367 5339 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 5368 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 5340 eval as_val=\$$as_ac_Header 5341 if test "x$as_val" = x""yes; then : 5369 5342 cat >>confdefs.h <<_ACEOF 5370 5343 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 … … 5539 5512 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 5540 5513 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 5541 if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 5514 eval as_val=\$$as_ac_var 5515 if test "x$as_val" = x""yes; then : 5542 5516 5543 5517 cat >>confdefs.h <<_ACEOF … … 5699 5673 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 5700 5674 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 5701 if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 5675 eval as_val=\$$as_ac_var 5676 if test "x$as_val" = x""yes; then : 5702 5677 cat >>confdefs.h <<_ACEOF 5703 5678 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 … … 5707 5682 done 5708 5683 5709 ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" 5710 if test "x$ac_cv_func_ftruncate" = x""yes; then : 5711 $as_echo "#define HAVE_FTRUNCATE 1" >>confdefs.h 5684 for ac_func in ftruncate strstr strcasecmp 5685 do : 5686 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 5687 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 5688 eval as_val=\$$as_ac_var 5689 if test "x$as_val" = x""yes; then : 5690 cat >>confdefs.h <<_ACEOF 5691 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 5692 _ACEOF 5712 5693 5713 5694 else 5714 5695 case " $LIBOBJS " in 5715 *" ftruncate.$ac_objext "* ) ;;5716 *) LIBOBJS="$LIBOBJS ftruncate.$ac_objext"5696 *" $ac_func.$ac_objext "* ) ;; 5697 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" 5717 5698 ;; 5718 5699 esac 5719 5700 5720 5701 fi 5721 5722 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" 5723 if test "x$ac_cv_func_strstr" = x""yes; then : 5724 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h 5725 5726 else 5727 case " $LIBOBJS " in 5728 *" strstr.$ac_objext "* ) ;; 5729 *) LIBOBJS="$LIBOBJS strstr.$ac_objext" 5730 ;; 5731 esac 5732 5733 fi 5734 5735 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" 5736 if test "x$ac_cv_func_strcasecmp" = x""yes; then : 5737 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h 5738 5739 else 5740 case " $LIBOBJS " in 5741 *" strcasecmp.$ac_objext "* ) ;; 5742 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" 5743 ;; 5744 esac 5745 5746 fi 5702 done 5747 5703 5748 5704 … … 6093 6049 ;; #( 6094 6050 *) 6095 as_fn_error $?"unknown endianness6096 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 6051 as_fn_error "unknown endianness 6052 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 6097 6053 esac 6098 6054 … … 6204 6160 ac_libobjs= 6205 6161 ac_ltlibobjs= 6206 U=6207 6162 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 6208 6163 # 1. Remove the extension, and $U if already installed. … … 6367 6322 6368 6323 6369 # as_fn_error STATUSERROR [LINENO LOG_FD]6370 # --------------------------------- -------6324 # as_fn_error ERROR [LINENO LOG_FD] 6325 # --------------------------------- 6371 6326 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 6372 6327 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 6373 # script with STATUS, using 1 if that was 0.6328 # script with status $?, using 1 if that was 0. 6374 6329 as_fn_error () 6375 6330 { 6376 as_status=$ 1; test $as_status -eq 0 && as_status=16377 if test "$ 4"; then6378 as_lineno=${as_lineno-"$ 3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack6379 $as_echo "$as_me:${as_lineno-$LINENO}: error: $ 2" >&$46331 as_status=$?; test $as_status -eq 0 && as_status=1 6332 if test "$3"; then 6333 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 6334 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 6380 6335 fi 6381 $as_echo "$as_me: error: $ 2" >&26336 $as_echo "$as_me: error: $1" >&2 6382 6337 as_fn_exit $as_status 6383 6338 } # as_fn_error … … 6575 6530 done 6576 6531 test -z "$as_dirs" || eval "mkdir $as_dirs" 6577 } || test -d "$as_dir" || as_fn_error $?"cannot create directory $as_dir"6532 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" 6578 6533 6579 6534 … … 6629 6584 ac_log=" 6630 6585 This file was extended by $as_me, which was 6631 generated by GNU Autoconf 2.6 7. Invocation command line was6586 generated by GNU Autoconf 2.65. Invocation command line was 6632 6587 6633 6588 CONFIG_FILES = $CONFIG_FILES … … 6695 6650 ac_cs_version="\\ 6696 6651 config.status 6697 configured by $0, generated by GNU Autoconf 2.6 7,6652 configured by $0, generated by GNU Autoconf 2.65, 6698 6653 with options \\"\$ac_cs_config\\" 6699 6654 6700 Copyright (C) 20 10Free Software Foundation, Inc.6655 Copyright (C) 2009 Free Software Foundation, Inc. 6701 6656 This config.status script is free software; the Free Software Foundation 6702 6657 gives unlimited permission to copy, distribute and modify it." … … 6715 6670 do 6716 6671 case $1 in 6717 --*= ?*)6672 --*=*) 6718 6673 ac_option=`expr "X$1" : 'X\([^=]*\)='` 6719 6674 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 6720 ac_shift=:6721 ;;6722 --*=)6723 ac_option=`expr "X$1" : 'X\([^=]*\)='`6724 ac_optarg=6725 6675 ac_shift=: 6726 6676 ;; … … 6746 6696 case $ac_optarg in 6747 6697 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 6748 '') as_fn_error $? "missing file argument" ;;6749 6698 esac 6750 6699 as_fn_append CONFIG_FILES " '$ac_optarg'" … … 6759 6708 --he | --h) 6760 6709 # Conflict between --help and --header 6761 as_fn_error $?"ambiguous option: \`$1'6710 as_fn_error "ambiguous option: \`$1' 6762 6711 Try \`$0 --help' for more information.";; 6763 6712 --help | --hel | -h ) … … 6768 6717 6769 6718 # This is an error. 6770 -*) as_fn_error $?"unrecognized option: \`$1'6719 -*) as_fn_error "unrecognized option: \`$1' 6771 6720 Try \`$0 --help' for more information." ;; 6772 6721 … … 6825 6774 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; 6826 6775 6827 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;6776 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 6828 6777 esac 6829 6778 done … … 6863 6812 tmp=./conf$$-$RANDOM 6864 6813 (umask 077 && mkdir "$tmp") 6865 } || as_fn_error $?"cannot create a temporary directory in ." "$LINENO" 56814 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 6866 6815 6867 6816 # Set up the scripts for CONFIG_FILES section. … … 6880 6829 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 6881 6830 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 6882 ac_cs_awk_cr='\ \r'6831 ac_cs_awk_cr='\r' 6883 6832 else 6884 6833 ac_cs_awk_cr=$ac_cr … … 6894 6843 echo "_ACEOF" 6895 6844 } >conf$$subs.sh || 6896 as_fn_error $?"could not make $CONFIG_STATUS" "$LINENO" 56897 ac_delim_num=`echo "$ac_subst_vars" | grep -c ' ^'`6845 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 6846 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` 6898 6847 ac_delim='%!_!# ' 6899 6848 for ac_last_try in false false false false false :; do 6900 6849 . ./conf$$subs.sh || 6901 as_fn_error $?"could not make $CONFIG_STATUS" "$LINENO" 56850 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 6902 6851 6903 6852 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` … … 6905 6854 break 6906 6855 elif $ac_last_try; then 6907 as_fn_error $?"could not make $CONFIG_STATUS" "$LINENO" 56856 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 6908 6857 else 6909 6858 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " … … 6994 6943 cat 6995 6944 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ 6996 || as_fn_error $?"could not setup config files machinery" "$LINENO" 56997 _ACEOF 6998 6999 # VPATH may cause trouble with some makes, so we remove sole$(srcdir),7000 # ${srcdir} and @srcdir@ entriesfrom VPATH if srcdir is ".", strip leading and6945 || as_fn_error "could not setup config files machinery" "$LINENO" 5 6946 _ACEOF 6947 6948 # VPATH may cause trouble with some makes, so we remove $(srcdir), 6949 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and 7001 6950 # trailing colons and then remove the whole line if VPATH becomes empty 7002 6951 # (actually we leave an empty line to preserve line numbers). 7003 6952 if test "x$srcdir" = x.; then 7004 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 7005 h 7006 s/// 7007 s/^/:/ 7008 s/[ ]*$/:/ 7009 s/:\$(srcdir):/:/g 7010 s/:\${srcdir}:/:/g 7011 s/:@srcdir@:/:/g 7012 s/^:*// 6953 ac_vpsub='/^[ ]*VPATH[ ]*=/{ 6954 s/:*\$(srcdir):*/:/ 6955 s/:*\${srcdir}:*/:/ 6956 s/:*@srcdir@:*/:/ 6957 s/^\([^=]*=[ ]*\):*/\1/ 7013 6958 s/:*$// 7014 x7015 s/\(=[ ]*\).*/\1/7016 G7017 s/\n//7018 6959 s/^[^=]*=[ ]*$// 7019 6960 }' … … 7043 6984 break 7044 6985 elif $ac_last_try; then 7045 as_fn_error $?"could not make $CONFIG_HEADERS" "$LINENO" 56986 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 7046 6987 else 7047 6988 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " … … 7128 7069 _ACEOF 7129 7070 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 7130 as_fn_error $?"could not setup config headers machinery" "$LINENO" 57071 as_fn_error "could not setup config headers machinery" "$LINENO" 5 7131 7072 fi # test -n "$CONFIG_HEADERS" 7132 7073 … … 7141 7082 case $ac_mode$ac_tag in 7142 7083 :[FHL]*:*);; 7143 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;7084 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; 7144 7085 :[FH]-) ac_tag=-:-;; 7145 7086 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; … … 7169 7110 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 7170 7111 esac || 7171 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;7112 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; 7172 7113 esac 7173 7114 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac … … 7196 7137 case $ac_tag in 7197 7138 *:-:* | *:-) cat >"$tmp/stdin" \ 7198 || as_fn_error $? "could not create $ac_file" "$LINENO" 5;;7139 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; 7199 7140 esac 7200 7141 ;; … … 7327 7268 " 7328 7269 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ 7329 || as_fn_error $?"could not create $ac_file" "$LINENO" 57270 || as_fn_error "could not create $ac_file" "$LINENO" 5 7330 7271 7331 7272 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && … … 7333 7274 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 7334 7275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 7335 which seems to be undefined. Please make sure it is defined " >&57276 which seems to be undefined. Please make sure it is defined." >&5 7336 7277 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 7337 which seems to be undefined. Please make sure it is defined " >&2;}7278 which seems to be undefined. Please make sure it is defined." >&2;} 7338 7279 7339 7280 rm -f "$tmp/stdin" … … 7342 7283 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 7343 7284 esac \ 7344 || as_fn_error $?"could not create $ac_file" "$LINENO" 57285 || as_fn_error "could not create $ac_file" "$LINENO" 5 7345 7286 ;; 7346 7287 :H) … … 7353 7294 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 7354 7295 } >"$tmp/config.h" \ 7355 || as_fn_error $?"could not create $ac_file" "$LINENO" 57296 || as_fn_error "could not create $ac_file" "$LINENO" 5 7356 7297 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then 7357 7298 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 … … 7360 7301 rm -f "$ac_file" 7361 7302 mv "$tmp/config.h" "$ac_file" \ 7362 || as_fn_error $?"could not create $ac_file" "$LINENO" 57303 || as_fn_error "could not create $ac_file" "$LINENO" 5 7363 7304 fi 7364 7305 else 7365 7306 $as_echo "/* $configure_input */" \ 7366 7307 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 7367 || as_fn_error $?"could not create -" "$LINENO" 57308 || as_fn_error "could not create -" "$LINENO" 5 7368 7309 fi 7369 7310 ;; … … 7387 7328 7388 7329 test $ac_write_fail = 0 || 7389 as_fn_error $?"write failure creating $CONFIG_STATUS" "$LINENO" 57330 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 7390 7331 7391 7332 … … 7408 7349 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 7409 7350 # would make configure fail if this is the last instruction. 7410 $ac_cs_success || as_fn_exit 17351 $ac_cs_success || as_fn_exit $? 7411 7352 fi 7412 7353 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then -
main/trunk/greenstone2/common-src/indexers/mg/configure.in
r23356 r25147 34 34 AC_SUBST(ENABLE_JAVA) 35 35 36 AC_MSG_CHECKING(to see if architecture is 64-bit) 37 arch_64bit=no 38 case "$host_cpu" in 39 x86_64) arch_64bit=yes ;; 40 esac 41 42 if test "$arch_64bit" = yes; then 43 AC_MSG_RESULT(yes) 44 if test -z "$COMPAT32BITFLAGS" ; then 45 COMPAT32BITFLAGS="-m32" 46 fi 47 else 48 AC_MSG_RESULT(no) 49 if test -z "$COMPAT32BITFLAGS" ; then 50 COMPAT32BITFLAGS= 51 fi 52 fi 53 AC_SUBST(COMPAT32BITFLAGS) 54 36 dnl AC_MSG_CHECKING(to see if architecture is 64-bit) 37 dnl arch_64bit=no 38 dnl case "$host_cpu" in 39 dnl x86_64) arch_64bit=yes ;; 40 dnl esac 55 41 56 42 dnl Checks for programs. -
main/trunk/greenstone2/common-src/indexers/mg/java/org/greenstone/mg/Makefile.in
r23356 r25147 17 17 JAVAH = javah 18 18 JAR = jar 19 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-ansi -DSILENT -DSHORT_SUFFIX20 CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@-DSILENT -DSHORT_SUFFIX19 CFLAGS = @CFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX 20 CXXFLAGS = @CXXFLAGS@ -DSILENT -DSHORT_SUFFIX 21 21 JAVACFLAGS = @JAVACFLAGS@ 22 22 DEFS = @DEFS@ … … 25 25 INSTALL_DATA = @INSTALL_DATA@ 26 26 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 27 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@27 LDFLAGS = @LDFLAGS@ 28 28 LIBS = -lstdc++ @LIBS@ 29 29 TOUCH = echo timestamp > -
main/trunk/greenstone2/common-src/indexers/mg/jni/MGRetrieveWrapperImpl.c
r16583 r25147 180 180 181 181 /* Save the object on the Java side */ 182 (*j_env)->SetIntField(j_env, j_obj, FID_mg_data, ( long) data);182 (*j_env)->SetIntField(j_env, j_obj, FID_mg_data, (mg_s_long) data); 183 183 184 184 /* Initialise MG environment variables */ … … 250 250 query_data* qd; 251 251 252 u_long pos, len;252 mg_u_long pos, len; 253 253 u_char* c_buffer = NULL; 254 254 u_char* uc_buffer = NULL; … … 287 287 288 288 /* Get the document position and length in the text file */ 289 printf("Fetching document number % ld...\n", (unsignedlong) j_docnum);290 FetchDocStart(qd, ( unsignedlong) j_docnum, &pos, &len);291 printf("Fetched document start. Pos: % ld, Len: %ld\n", pos, len);289 printf("Fetching document number %d...\n", (mg_u_long) j_docnum); 290 FetchDocStart(qd, (mg_u_long) j_docnum, &pos, &len); 291 printf("Fetched document start. Pos: %d, Len: %d\n", pos, len); 292 292 293 293 /* Allocate memory for the document text (from mg/src/text/mgquery.c:RawDocOutput()) */ -
main/trunk/greenstone2/common-src/indexers/mg/jni/MGSearchWrapperImpl.c
r16583 r25147 619 619 620 620 /* Print the data to a character array */ 621 sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t% ld\n",621 sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t%d\n", 622 622 (data->queryInfo->index == NULL ? "<none loaded>" : data->queryInfo->index), 623 623 (data->defaultStemMethod & 1), -
main/trunk/greenstone2/common-src/indexers/mg/jni/MGWrapperImpl.c
r16583 r25147 168 168 169 169 /* Save the object on the Java side */ 170 (*j_env)->SetIntField(j_env, j_obj, FID_mg_data, ( long) data);170 (*j_env)->SetIntField(j_env, j_obj, FID_mg_data, (mg_s_long) data); 171 171 172 172 /* Initialise MG environment variables */ … … 285 285 query_data* qd; 286 286 287 u_long pos, len;287 mg_u_long pos, len; 288 288 u_char* c_buffer = NULL; 289 289 u_char* uc_buffer = NULL; … … 322 322 323 323 /* Get the document position and length in the text file */ 324 printf("Fetching document number % ld...\n", (unsignedlong) j_docnum);325 FetchDocStart(qd, ( unsignedlong) j_docnum, &pos, &len);326 printf("Fetched document start. Pos: % ld, Len: %ld\n", pos, len);324 printf("Fetching document number %d...\n", (mg_u_long) j_docnum); 325 FetchDocStart(qd, (mg_u_long) j_docnum, &pos, &len); 326 printf("Fetched document start. Pos: %d, Len: %d\n", pos, len); 327 327 328 328 /* Allocate memory for the document text (from mg/src/text/mgquery.c:RawDocOutput()) */ … … 730 730 731 731 /* Print the data to a character array */ 732 sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t% ld\n",732 sprintf(result, "Query params:\nindex\t\t%s\ncasefold\t%d\nstem\t\t%d\nquery type\t%s\nmax docs\t%d\n", 733 733 (data->queryInfo->index == NULL ? "<none loaded>" : data->queryInfo->index), 734 734 (data->defaultStemMethod & 1), -
main/trunk/greenstone2/common-src/indexers/mg/jni/MGWrapperImpl.h
r16583 r25147 36 36 char* index; 37 37 /* Maximum number of documents to retrieve */ 38 unsignedlong maxDocs;38 mg_u_long maxDocs; 39 39 /* Whether term frequency information is desired (boolean value) */ 40 40 int needTermFreqs; -
main/trunk/greenstone2/common-src/indexers/mg/jni/Makefile.in
r22070 r25147 14 14 AR = ar 15 15 CC = @CC@ 16 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-ansi -fpic -DSILENT -DSHORT_SUFFIX -DNZDL -DQUIET -DPARADOCNUM16 CFLAGS = @CFLAGS@ -ansi -fpic -DSILENT -DSHORT_SUFFIX -DNZDL -DQUIET -DPARADOCNUM 17 17 DEFS = @DEFS@ 18 18 RANLIB = @RANLIB@ … … 20 20 INSTALL_DATA = @INSTALL_DATA@ 21 21 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 22 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@22 LDFLAGS = @LDFLAGS@ 23 23 #NOTE: libmgtext.a needs to come before libmglib.a !!! 24 24 QUERY_LIBS = ../src/text/libmgtext.a ../lib/libmglib.a @LIBS@ -
main/trunk/greenstone2/common-src/indexers/mg/lib/Makefile.in
r22070 r25147 34 34 AR = ar 35 35 CC = @CC@ 36 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-fpic36 CFLAGS = @CFLAGS@ -fpic 37 37 DEFS = @DEFS@ 38 38 RANLIB = @RANLIB@ … … 41 41 # Uncomment for compiling for the nzdl project 42 42 # 43 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-DQUIET -fpic43 CFLAGS = @CFLAGS@ -DQUIET -fpic 44 44 ########################################## 45 45 -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_gen.c
r16583 r25147 28 28 int fprintf (FILE *, const char *,...); 29 29 30 unsignedlong31 BIO_Unary_Length ( unsignedlong val)30 mg_u_long 31 BIO_Unary_Length (mg_u_long val) 32 32 { 33 register unsignedlong num;33 register mg_u_long num; 34 34 UNARY_LENGTH (val, num); 35 35 return (num); … … 37 37 38 38 39 unsignedlong40 BIO_Binary_Length ( unsigned long val, unsignedlong b)39 mg_u_long 40 BIO_Binary_Length (mg_u_long val, mg_u_long b) 41 41 { 42 register unsignedlong num;42 register mg_u_long num; 43 43 BINARY_LENGTH (val, b, num); 44 44 return (num); … … 46 46 47 47 48 unsignedlong49 BIO_Gamma_Length ( unsignedlong val)48 mg_u_long 49 BIO_Gamma_Length (mg_u_long val) 50 50 { 51 register unsignedlong num;51 register mg_u_long num; 52 52 GAMMA_LENGTH (val, num); 53 53 return (num); … … 55 55 56 56 57 unsignedlong58 BIO_Delta_Length ( unsignedlong val)57 mg_u_long 58 BIO_Delta_Length (mg_u_long val) 59 59 { 60 register unsignedlong num;60 register mg_u_long num; 61 61 DELTA_LENGTH (val, num); 62 62 return (num); … … 64 64 65 65 66 unsignedlong67 BIO_Elias_Length ( unsigned long val, unsignedlong b, double s)66 mg_u_long 67 BIO_Elias_Length (mg_u_long val, mg_u_long b, double s) 68 68 { 69 register unsignedlong num;69 register mg_u_long num; 70 70 ELIAS_LENGTH (val, b, s, num); 71 71 return (num); 72 72 } 73 73 74 unsignedlong75 BIO_Bblock_Length ( unsigned long val, unsignedlong b)74 mg_u_long 75 BIO_Bblock_Length (mg_u_long val, mg_u_long b) 76 76 { 77 register unsignedlong num;77 register mg_u_long num; 78 78 BBLOCK_LENGTH (val, b, num); 79 79 return (num); -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_gen.h
r16583 r25147 33 33 #define H_BITIO_GEN 34 34 35 unsigned long BIO_Unary_Length (unsignedlong val);35 mg_u_long BIO_Unary_Length (mg_u_long val); 36 36 37 unsigned long BIO_Binary_Length (unsigned long val, unsignedlong b);37 mg_u_long BIO_Binary_Length (mg_u_long val, mg_u_long b); 38 38 39 unsigned long BIO_Gamma_Length (unsignedlong val);39 mg_u_long BIO_Gamma_Length (mg_u_long val); 40 40 41 unsigned long BIO_Delta_Length (unsignedlong val);41 mg_u_long BIO_Delta_Length (mg_u_long val); 42 42 43 unsigned long BIO_Elias_Length (unsigned long val, unsignedlong b, double s);43 mg_u_long BIO_Elias_Length (mg_u_long val, mg_u_long b, double s); 44 44 45 unsigned long BIO_Bblock_Length (unsigned long val, unsignedlong b);45 mg_u_long BIO_Bblock_Length (mg_u_long val, mg_u_long b); 46 46 47 47 int BIO_Bblock_Init (int N, int p); -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_m.h
r16583 r25147 50 50 #define POSITIVE(f, x) \ 51 51 if ((x)<=0) \ 52 fprintf(stderr,"Error: Cannot "#f" encode % lu\n",(unsignedlong)x),exit(1);52 fprintf(stderr,"Error: Cannot "#f" encode %d\n",(mg_u_long)x),exit(1); 53 53 54 54 … … 75 75 #define UNARY_ENCODE(x) \ 76 76 do { \ 77 register unsignedlong _B_x = (x); \77 register mg_u_long _B_x = (x); \ 78 78 BIO_ENCODE_PROLOGUE; \ 79 79 POSITIVE(unary, _B_x); \ … … 85 85 #define UNARY_ENCODE_L(x, count) \ 86 86 do { \ 87 register unsignedlong _B_x = (x); \87 register mg_u_long _B_x = (x); \ 88 88 BIO_ENCODE_PROLOGUE; \ 89 89 POSITIVE(unary, _B_x); \ … … 124 124 #define BINARY_ENCODE(x, b) \ 125 125 do { \ 126 register unsignedlong _B_x = (x); \127 register unsignedlong _B_b = (b); \126 register mg_u_long _B_x = (x); \ 127 register mg_u_long _B_b = (b); \ 128 128 register int _B_nbits, _B_logofb, _B_thresh; \ 129 129 BIO_ENCODE_PROLOGUE; \ … … 145 145 #define BINARY_ENCODE_L(x, b, count) \ 146 146 do { \ 147 register unsignedlong _B_x = (x); \148 register unsignedlong _B_b = (b); \147 register mg_u_long _B_x = (x); \ 148 register mg_u_long _B_b = (b); \ 149 149 register int _B_nbits, _B_logofb, _B_thresh; \ 150 150 BIO_ENCODE_PROLOGUE; \ … … 168 168 #define BINARY_DECODE(x, b) \ 169 169 do { \ 170 register unsignedlong _B_x = 0; \171 register unsignedlong _B_b = (b); \170 register mg_u_long _B_x = 0; \ 171 register mg_u_long _B_b = (b); \ 172 172 register int _B_i, _B_logofb, _B_thresh; \ 173 173 BIO_DECODE_PROLOGUE; \ … … 193 193 #define BINARY_DECODE_L(x, b, count) \ 194 194 do { \ 195 register unsignedlong _B_x = 0; \196 register unsignedlong _B_b = (b); \195 register mg_u_long _B_x = 0; \ 196 register mg_u_long _B_b = (b); \ 197 197 register int _B_i, _B_logofb, _B_thresh; \ 198 198 BIO_DECODE_PROLOGUE; \ … … 220 220 #define BINARY_LENGTH(x, b, count) \ 221 221 do { \ 222 register unsignedlong _B_x = (x); \223 register unsignedlong _B_b = (b); \222 register mg_u_long _B_x = (x); \ 223 register mg_u_long _B_b = (b); \ 224 224 register int _B_nbits, _B_logofb, _B_thresh; \ 225 225 POSITIVE(binary, _B_x); \ … … 240 240 #define GAMMA_ENCODE(x) \ 241 241 do { \ 242 register unsignedlong _B_xx = (x); \242 register mg_u_long _B_xx = (x); \ 243 243 register int _B_logofb; \ 244 244 register int _B_nbits; \ … … 255 255 #define GAMMA_ENCODE_L(x, count) \ 256 256 do { \ 257 register unsignedlong _B_xx = (x); \257 register mg_u_long _B_xx = (x); \ 258 258 register int _B_logofb; \ 259 259 register int _B_nbits; \ … … 271 271 #define GAMMA_DECODE(x) \ 272 272 do { \ 273 register unsignedlong _B_xx = 1; \273 register mg_u_long _B_xx = 1; \ 274 274 register int _B_nbits = 0; \ 275 275 BIO_DECODE_PROLOGUE; \ … … 283 283 #define GAMMA_DECODE_L(x, count) \ 284 284 do { \ 285 register unsignedlong _B_xx = 1; \285 register mg_u_long _B_xx = 1; \ 286 286 register int _B_nbits = 0; \ 287 287 BIO_DECODE_PROLOGUE; \ … … 296 296 #define GAMMA_LENGTH(x, count) \ 297 297 do { \ 298 register unsignedlong _B_xx = (x); \298 register mg_u_long _B_xx = (x); \ 299 299 register int _B_logofb; \ 300 300 POSITIVE(gamma, _B_xx); \ … … 310 310 #define DELTA_ENCODE(x) \ 311 311 do { \ 312 register unsignedlong _B_xxx = (x); \312 register mg_u_long _B_xxx = (x); \ 313 313 register int _B_logx; \ 314 314 FLOORLOG_2(_B_xxx, _B_logx); \ … … 319 319 #define DELTA_ENCODE_L(x, count) \ 320 320 do { \ 321 register unsignedlong _B_xxx = (x); \321 register mg_u_long _B_xxx = (x); \ 322 322 register int _B_logx; \ 323 323 FLOORLOG_2(_B_xxx, _B_logx); \ … … 329 329 #define DELTA_DECODE(x) \ 330 330 do { \ 331 register unsignedlong _B_xxx; \331 register mg_u_long _B_xxx; \ 332 332 register int _B_logx; \ 333 333 GAMMA_DECODE(_B_logx); --_B_logx; \ … … 338 338 #define DELTA_DECODE_L(x, count) \ 339 339 do { \ 340 register unsignedlong _B_xxx; \340 register mg_u_long _B_xxx; \ 341 341 register int _B_logx; \ 342 342 GAMMA_DECODE_L(_B_logx, count); --_B_logx; \ … … 347 347 #define DELTA_LENGTH(x, count) \ 348 348 do { \ 349 register unsignedlong _B_xxx = (x); \349 register mg_u_long _B_xxx = (x); \ 350 350 register int _B_logx, _B_dcount; \ 351 351 FLOORLOG_2(_B_xxx, _B_logx); \ … … 363 363 #define ELIAS_ENCODE(x, b, s) \ 364 364 do { \ 365 register unsignedlong _B_xx = (x); \366 register unsignedlong _B_b = (b); \365 register mg_u_long _B_xx = (x); \ 366 register mg_u_long _B_b = (b); \ 367 367 register double _B_s = (s); \ 368 368 register int _B_lower=1, _B_upper=1; \ … … 383 383 #define ELIAS_ENCODE_L(x, b, s, count) \ 384 384 do { \ 385 register unsignedlong _B_xx = (x); \386 register unsignedlong _B_b = (b); \385 register mg_u_long _B_xx = (x); \ 386 register mg_u_long _B_b = (b); \ 387 387 register double _B_s = (s); \ 388 388 register int _B_lower=1, _B_upper=1; \ … … 403 403 #define ELIAS_DECODE(x, b, s) \ 404 404 do { \ 405 register unsignedlong _B_xx; \406 register unsignedlong _B_b = (b); \405 register mg_u_long _B_xx; \ 406 register mg_u_long _B_b = (b); \ 407 407 register double _B_s = (s); \ 408 408 register int _B_lower=1, _B_upper=1; \ … … 423 423 #define ELIAS_DECODE_L(x, b, s, count) \ 424 424 do { \ 425 register unsignedlong _B_xx; \426 register unsignedlong _B_b = (b); \425 register mg_u_long _B_xx; \ 426 register mg_u_long _B_b = (b); \ 427 427 register double _B_s = (s); \ 428 428 register int _B_lower=1, _B_upper=1; \ … … 443 443 #define ELIAS_LENGTH(x, b, s, count) \ 444 444 do { \ 445 register unsignedlong _B_xx = (x); \446 register unsignedlong _B_b = (b); \445 register mg_u_long _B_xx = (x); \ 446 register mg_u_long _B_b = (b); \ 447 447 register double _B_s = (s); \ 448 448 register int _B_lower=1, _B_upper=1; \ … … 468 468 #define BBLOCK_ENCODE(x, b) \ 469 469 do { \ 470 register unsignedlong _B_xx = (x); \471 register unsignedlong _B_bb = (b); \470 register mg_u_long _B_xx = (x); \ 471 register mg_u_long _B_bb = (b); \ 472 472 register int _B_xdivb = 0; \ 473 473 POSITIVE(bblock, _B_xx); \ … … 484 484 #define BBLOCK_ENCODE_L(x, b, count) \ 485 485 do { \ 486 register unsignedlong _B_xx = (x); \487 register unsignedlong _B_bb = (b); \486 register mg_u_long _B_xx = (x); \ 487 register mg_u_long _B_bb = (b); \ 488 488 register int _B_xdivb = 0; \ 489 489 POSITIVE(bblock, _B_xx); \ … … 500 500 #define BBLOCK_DECODE(x, b) \ 501 501 do { \ 502 register unsignedlong _B_x1, _B_xx = 0; \503 register unsignedlong _B_bb = (b); \502 register mg_u_long _B_x1, _B_xx = 0; \ 503 register mg_u_long _B_bb = (b); \ 504 504 register int _B_xdivb; \ 505 505 UNARY_DECODE(_B_xdivb); --_B_xdivb; \ … … 512 512 #define BBLOCK_DECODE_L(x, b, count) \ 513 513 do { \ 514 register unsignedlong _B_x1, _B_xx = 0; \515 register unsignedlong _B_bb = (b); \514 register mg_u_long _B_x1, _B_xx = 0; \ 515 register mg_u_long _B_bb = (b); \ 516 516 register int _B_xdivb; \ 517 517 UNARY_DECODE_L(_B_xdivb, count); --_B_xdivb; \ … … 524 524 #define BBLOCK_LENGTH(x, b, count) \ 525 525 do { \ 526 register unsignedlong _B_bcount, _B_xx = (x); \527 register unsignedlong _B_bb = (b); \526 register mg_u_long _B_bcount, _B_xx = (x); \ 527 register mg_u_long _B_bb = (b); \ 528 528 register int _B_xdivb = 0; \ 529 529 POSITIVE(bblock, _B_xx); \ -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_m_mems.h
r16583 r25147 36 36 { 37 37 unsigned char *Base; 38 unsignedlong pos;38 mg_u_long pos; 39 39 } 40 40 mems_bitio_state; … … 44 44 { \ 45 45 register unsigned char *__base = b; \ 46 register unsignedlong __pos = p;46 register mg_u_long __pos = p; 47 47 48 48 #define ENCODE_CONTINUE(b) \ 49 49 { \ 50 50 register unsigned char *__base = (b).Base; \ 51 register unsignedlong __pos = (b).pos;51 register mg_u_long __pos = (b).pos; 52 52 53 53 #define ENCODE_BIT(b) \ … … 76 76 { \ 77 77 register unsigned char *__base = b; \ 78 register unsignedlong __pos = p;78 register mg_u_long __pos = p; 79 79 80 80 #define DECODE_CONTINUE(b) \ 81 81 { \ 82 82 register unsigned char *__base = (b).Base; \ 83 register unsignedlong __pos = (b).pos;83 register mg_u_long __pos = (b).pos; 84 84 85 85 #define DECODE_ADD_FF(b) \ -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_m_random.h
r16583 r25147 38 38 FILE *File; 39 39 unsigned char *Buf; 40 unsignedlong Base;41 unsignedlong Used;42 unsignedlong pos;43 unsignedlong len;44 unsignedlong sft;40 mg_u_long Base; 41 mg_u_long Used; 42 mg_u_long pos; 43 mg_u_long len; 44 mg_u_long sft; 45 45 } 46 46 random_bitio_state; … … 51 51 register FILE *__file = f; \ 52 52 register unsigned char *__buf; \ 53 register unsignedlong __pos = 0; \54 register unsignedlong __base = 0; \55 register unsignedlong __is_used = 0; \56 register unsignedlong __len = (l)-1; \57 register unsignedlong __sft = 0; \53 register mg_u_long __pos = 0; \ 54 register mg_u_long __base = 0; \ 55 register mg_u_long __is_used = 0; \ 56 register mg_u_long __len = (l)-1; \ 57 register mg_u_long __sft = 0; \ 58 58 while (__len) { ++__sft; __len >>=1; } \ 59 59 __len = 1<<__sft; \ … … 66 66 register FILE *__file = (b).File; \ 67 67 register unsigned char *__buf = (b).Buf; \ 68 register unsignedlong __pos = (b).pos; \69 register unsignedlong __base = (b).Base; \70 register unsignedlong __is_used = (b).Used; \71 register unsignedlong __len = (b).len; \72 register unsignedlong __sft = (b).sft;68 register mg_u_long __pos = (b).pos; \ 69 register mg_u_long __base = (b).Base; \ 70 register mg_u_long __is_used = (b).Used; \ 71 register mg_u_long __len = (b).len; \ 72 register mg_u_long __sft = (b).sft; 73 73 74 74 #define SEEK fprintf(stderr, "Seek to %d\n",__base) -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_mem.c
r16583 r25147 55 55 56 56 void 57 BIO_Mem_Unary_Encode ( unsignedlong val, mem_bitio_state * bs,58 unsignedlong *bits)57 BIO_Mem_Unary_Encode (mg_u_long val, mem_bitio_state * bs, 58 mg_u_long *bits) 59 59 { 60 60 ENCODE_CONTINUE (*bs) … … 67 67 68 68 69 unsignedlong69 mg_u_long 70 70 BIO_Mem_Unary_Decode (mem_bitio_state * bs, 71 unsignedlong *bits)72 { 73 register unsignedlong val;71 mg_u_long *bits) 72 { 73 register mg_u_long val; 74 74 DECODE_CONTINUE (*bs) 75 75 if (bits) … … 88 88 89 89 void 90 BIO_Mem_Binary_Encode ( unsigned long val, unsignedlong b,91 mem_bitio_state * bs, unsignedlong *bits)90 BIO_Mem_Binary_Encode (mg_u_long val, mg_u_long b, 91 mem_bitio_state * bs, mg_u_long *bits) 92 92 { 93 93 ENCODE_CONTINUE (*bs) … … 100 100 101 101 102 unsignedlong103 BIO_Mem_Binary_Decode ( unsignedlong b, mem_bitio_state * bs,104 unsignedlong *bits)105 { 106 register unsignedlong val;102 mg_u_long 103 BIO_Mem_Binary_Decode (mg_u_long b, mem_bitio_state * bs, 104 mg_u_long *bits) 105 { 106 register mg_u_long val; 107 107 DECODE_CONTINUE (*bs) 108 108 if (bits) … … 121 121 122 122 void 123 BIO_Mem_Gamma_Encode ( unsignedlong val, mem_bitio_state * bs,124 unsignedlong *bits)123 BIO_Mem_Gamma_Encode (mg_u_long val, mem_bitio_state * bs, 124 mg_u_long *bits) 125 125 { 126 126 ENCODE_CONTINUE (*bs) … … 133 133 134 134 135 unsignedlong136 BIO_Mem_Gamma_Decode (mem_bitio_state * bs, unsignedlong *bits)137 { 138 register unsignedlong val;135 mg_u_long 136 BIO_Mem_Gamma_Decode (mem_bitio_state * bs, mg_u_long *bits) 137 { 138 register mg_u_long val; 139 139 DECODE_CONTINUE (*bs) 140 140 if (bits) … … 150 150 151 151 void 152 BIO_Mem_Delta_Encode ( unsignedlong val, mem_bitio_state * bs,153 unsignedlong *bits)152 BIO_Mem_Delta_Encode (mg_u_long val, mem_bitio_state * bs, 153 mg_u_long *bits) 154 154 { 155 155 ENCODE_CONTINUE (*bs) … … 162 162 163 163 164 unsignedlong165 BIO_Mem_Delta_Decode (mem_bitio_state * bs, unsignedlong *bits)166 { 167 register unsignedlong val;164 mg_u_long 165 BIO_Mem_Delta_Decode (mem_bitio_state * bs, mg_u_long *bits) 166 { 167 register mg_u_long val; 168 168 DECODE_CONTINUE (*bs) 169 169 if (bits) … … 176 176 177 177 void 178 BIO_Mem_Elias_Encode ( unsigned long val, unsignedlong b, double s,179 mem_bitio_state * bs, unsignedlong *bits)178 BIO_Mem_Elias_Encode (mg_u_long val, mg_u_long b, double s, 179 mem_bitio_state * bs, mg_u_long *bits) 180 180 { 181 181 ENCODE_CONTINUE (*bs) … … 188 188 189 189 190 unsignedlong191 BIO_Mem_Elias_Decode ( unsignedlong b, double s,192 mem_bitio_state * bs, unsignedlong *bits)193 { 194 register unsignedlong val;190 mg_u_long 191 BIO_Mem_Elias_Decode (mg_u_long b, double s, 192 mem_bitio_state * bs, mg_u_long *bits) 193 { 194 register mg_u_long val; 195 195 DECODE_CONTINUE (*bs) 196 196 if (bits) … … 203 203 204 204 void 205 BIO_Mem_Bblock_Encode ( unsigned long val, unsignedlong b,206 mem_bitio_state * bs, unsignedlong *bits)205 BIO_Mem_Bblock_Encode (mg_u_long val, mg_u_long b, 206 mem_bitio_state * bs, mg_u_long *bits) 207 207 { 208 208 ENCODE_CONTINUE (*bs) … … 215 215 216 216 217 unsignedlong218 BIO_Mem_Bblock_Decode ( unsignedlong b, mem_bitio_state * bs,219 unsignedlong *bits)220 { 221 register unsignedlong val;217 mg_u_long 218 BIO_Mem_Bblock_Decode (mg_u_long b, mem_bitio_state * bs, 219 mg_u_long *bits) 220 { 221 register mg_u_long val; 222 222 DECODE_CONTINUE (*bs) 223 223 if (bits) … … 230 230 231 231 void 232 BIO_Mem_Decode_Seek ( unsignedlong pos, mem_bitio_state * bs)232 BIO_Mem_Decode_Seek (mg_u_long pos, mem_bitio_state * bs) 233 233 { 234 234 DECODE_CONTINUE (*bs) -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_mem.h
r16583 r25147 61 61 62 62 63 void BIO_Mem_Unary_Encode ( unsignedlong val, mem_bitio_state * bs,64 unsignedlong *bits);65 unsignedlong BIO_Mem_Unary_Decode (mem_bitio_state * bs,66 unsignedlong *bits);63 void BIO_Mem_Unary_Encode (mg_u_long val, mem_bitio_state * bs, 64 mg_u_long *bits); 65 mg_u_long BIO_Mem_Unary_Decode (mem_bitio_state * bs, 66 mg_u_long *bits); 67 67 68 68 69 69 70 void BIO_Mem_Binary_Encode ( unsigned long val, unsignedlong b,71 mem_bitio_state * bs, unsignedlong *bits);72 unsigned long BIO_Mem_Binary_Decode (unsignedlong b, mem_bitio_state * bs,73 unsignedlong *bits);70 void BIO_Mem_Binary_Encode (mg_u_long val, mg_u_long b, 71 mem_bitio_state * bs, mg_u_long *bits); 72 mg_u_long BIO_Mem_Binary_Decode (mg_u_long b, mem_bitio_state * bs, 73 mg_u_long *bits); 74 74 75 75 76 76 77 void BIO_Mem_Gamma_Encode ( unsignedlong val, mem_bitio_state * bs,78 unsignedlong *bits);79 unsigned long BIO_Mem_Gamma_Decode (mem_bitio_state * bs, unsignedlong *bits);77 void BIO_Mem_Gamma_Encode (mg_u_long val, mem_bitio_state * bs, 78 mg_u_long *bits); 79 mg_u_long BIO_Mem_Gamma_Decode (mem_bitio_state * bs, mg_u_long *bits); 80 80 81 81 82 82 83 void BIO_Mem_Delta_Encode ( unsignedlong val, mem_bitio_state * bs,84 unsignedlong *bits);85 unsigned long BIO_Mem_Delta_Decode (mem_bitio_state * bs, unsignedlong *bits);83 void BIO_Mem_Delta_Encode (mg_u_long val, mem_bitio_state * bs, 84 mg_u_long *bits); 85 mg_u_long BIO_Mem_Delta_Decode (mem_bitio_state * bs, mg_u_long *bits); 86 86 87 87 88 void BIO_Mem_Elias_Encode ( unsigned long val, unsignedlong b, double s,89 mem_bitio_state * bs, unsignedlong *bits);90 unsigned long BIO_Mem_Elias_Decode (unsignedlong b, double s,91 mem_bitio_state * bs, unsignedlong *bits);88 void BIO_Mem_Elias_Encode (mg_u_long val, mg_u_long b, double s, 89 mem_bitio_state * bs, mg_u_long *bits); 90 mg_u_long BIO_Mem_Elias_Decode (mg_u_long b, double s, 91 mem_bitio_state * bs, mg_u_long *bits); 92 92 93 93 94 void BIO_Mem_Bblock_Encode ( unsigned long val, unsignedlong b,95 mem_bitio_state * bs, unsignedlong *bits);96 unsigned long BIO_Mem_Bblock_Decode (unsignedlong b, mem_bitio_state * bs,97 unsignedlong *bits);94 void BIO_Mem_Bblock_Encode (mg_u_long val, mg_u_long b, 95 mem_bitio_state * bs, mg_u_long *bits); 96 mg_u_long BIO_Mem_Bblock_Decode (mg_u_long b, mem_bitio_state * bs, 97 mg_u_long *bits); 98 98 99 99 100 void BIO_Mem_Decode_Seek ( unsignedlong pos, mem_bitio_state * bs);100 void BIO_Mem_Decode_Seek (mg_u_long pos, mem_bitio_state * bs); 101 101 102 102 -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_mems.c
r16583 r25147 30 30 31 31 void 32 BIO_Mems_Encode_Start (unsigned char *buf, unsignedlong pos,32 BIO_Mems_Encode_Start (unsigned char *buf, mg_u_long pos, 33 33 mems_bitio_state * bs) 34 34 { … … 46 46 47 47 void 48 BIO_Mems_Decode_Start (unsigned char *buf, unsignedlong pos,48 BIO_Mems_Decode_Start (unsigned char *buf, mg_u_long pos, 49 49 mems_bitio_state * bs) 50 50 { … … 57 57 58 58 void 59 BIO_Mems_Unary_Encode ( unsignedlong val, mems_bitio_state * bs,60 unsignedlong *bits)59 BIO_Mems_Unary_Encode (mg_u_long val, mems_bitio_state * bs, 60 mg_u_long *bits) 61 61 { 62 62 ENCODE_CONTINUE (*bs) … … 69 69 70 70 71 unsignedlong71 mg_u_long 72 72 BIO_Mems_Unary_Decode (mems_bitio_state * bs, 73 unsignedlong *bits)74 { 75 register unsignedlong val;73 mg_u_long *bits) 74 { 75 register mg_u_long val; 76 76 DECODE_CONTINUE (*bs) 77 77 if (bits) … … 90 90 91 91 void 92 BIO_Mems_Binary_Encode ( unsigned long val, unsignedlong b,93 mems_bitio_state * bs, unsignedlong *bits)92 BIO_Mems_Binary_Encode (mg_u_long val, mg_u_long b, 93 mems_bitio_state * bs, mg_u_long *bits) 94 94 { 95 95 ENCODE_CONTINUE (*bs) … … 102 102 103 103 104 unsignedlong105 BIO_Mems_Binary_Decode ( unsignedlong b, mems_bitio_state * bs,106 unsignedlong *bits)107 { 108 register unsignedlong val;104 mg_u_long 105 BIO_Mems_Binary_Decode (mg_u_long b, mems_bitio_state * bs, 106 mg_u_long *bits) 107 { 108 register mg_u_long val; 109 109 DECODE_CONTINUE (*bs) 110 110 if (bits) … … 123 123 124 124 void 125 BIO_Mems_Gamma_Encode ( unsignedlong val, mems_bitio_state * bs,126 unsignedlong *bits)125 BIO_Mems_Gamma_Encode (mg_u_long val, mems_bitio_state * bs, 126 mg_u_long *bits) 127 127 { 128 128 ENCODE_CONTINUE (*bs) … … 135 135 136 136 137 unsignedlong138 BIO_Mems_Gamma_Decode (mems_bitio_state * bs, unsignedlong *bits)139 { 140 register unsignedlong val;137 mg_u_long 138 BIO_Mems_Gamma_Decode (mems_bitio_state * bs, mg_u_long *bits) 139 { 140 register mg_u_long val; 141 141 DECODE_CONTINUE (*bs) 142 142 if (bits) … … 152 152 153 153 void 154 BIO_Mems_Delta_Encode ( unsignedlong val, mems_bitio_state * bs,155 unsignedlong *bits)154 BIO_Mems_Delta_Encode (mg_u_long val, mems_bitio_state * bs, 155 mg_u_long *bits) 156 156 { 157 157 ENCODE_CONTINUE (*bs) … … 164 164 165 165 166 unsignedlong167 BIO_Mems_Delta_Decode (mems_bitio_state * bs, unsignedlong *bits)168 { 169 register unsignedlong val;166 mg_u_long 167 BIO_Mems_Delta_Decode (mems_bitio_state * bs, mg_u_long *bits) 168 { 169 register mg_u_long val; 170 170 DECODE_CONTINUE (*bs) 171 171 if (bits) … … 178 178 179 179 void 180 BIO_Mems_Elias_Encode ( unsigned long val, unsignedlong b, double s,181 mems_bitio_state * bs, unsignedlong *bits)180 BIO_Mems_Elias_Encode (mg_u_long val, mg_u_long b, double s, 181 mems_bitio_state * bs, mg_u_long *bits) 182 182 { 183 183 ENCODE_CONTINUE (*bs) … … 190 190 191 191 192 unsignedlong193 BIO_Mems_Elias_Decode ( unsignedlong b, double s,194 mems_bitio_state * bs, unsignedlong *bits)195 { 196 register unsignedlong val;192 mg_u_long 193 BIO_Mems_Elias_Decode (mg_u_long b, double s, 194 mems_bitio_state * bs, mg_u_long *bits) 195 { 196 register mg_u_long val; 197 197 DECODE_CONTINUE (*bs) 198 198 if (bits) … … 205 205 206 206 void 207 BIO_Mems_Bblock_Encode ( unsigned long val, unsignedlong b,208 mems_bitio_state * bs, unsignedlong *bits)207 BIO_Mems_Bblock_Encode (mg_u_long val, mg_u_long b, 208 mems_bitio_state * bs, mg_u_long *bits) 209 209 { 210 210 ENCODE_CONTINUE (*bs) … … 217 217 218 218 219 unsignedlong220 BIO_Mems_Bblock_Decode ( unsignedlong b, mems_bitio_state * bs,221 unsignedlong *bits)222 { 223 register unsignedlong val;219 mg_u_long 220 BIO_Mems_Bblock_Decode (mg_u_long b, mems_bitio_state * bs, 221 mg_u_long *bits) 222 { 223 register mg_u_long val; 224 224 DECODE_CONTINUE (*bs) 225 225 if (bits) … … 232 232 233 233 void 234 BIO_Mems_Decode_Seek ( unsignedlong pos, mems_bitio_state * bs)234 BIO_Mems_Decode_Seek (mg_u_long pos, mems_bitio_state * bs) 235 235 { 236 236 DECODE_CONTINUE (*bs) … … 240 240 241 241 void 242 BIO_Mems_Encode_Seek ( unsignedlong pos, mems_bitio_state * bs)242 BIO_Mems_Encode_Seek (mg_u_long pos, mems_bitio_state * bs) 243 243 { 244 244 ENCODE_CONTINUE (*bs) -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_mems.h
r16583 r25147 38 38 { 39 39 unsigned char *Base; 40 unsignedlong pos;40 mg_u_long pos; 41 41 } 42 42 mems_bitio_state; … … 46 46 47 47 48 void BIO_Mems_Encode_Start (char *buf, unsignedlong pos, mems_bitio_state * bs);48 void BIO_Mems_Encode_Start (char *buf, mg_u_long pos, mems_bitio_state * bs); 49 49 void BIO_Mems_Encode_Done (mems_bitio_state * bs); 50 50 51 51 52 52 53 void BIO_Mems_Decode_Start (void *buf, unsignedlong pos, mems_bitio_state * bs);53 void BIO_Mems_Decode_Start (void *buf, mg_u_long pos, mems_bitio_state * bs); 54 54 55 55 56 56 57 void BIO_Mems_Unary_Encode ( unsignedlong val, mems_bitio_state * bs,58 unsignedlong *bits);59 unsignedlong BIO_Mems_Unary_Decode (mems_bitio_state * bs,60 unsignedlong *bits);57 void BIO_Mems_Unary_Encode (mg_u_long val, mems_bitio_state * bs, 58 mg_u_long *bits); 59 mg_u_long BIO_Mems_Unary_Decode (mems_bitio_state * bs, 60 mg_u_long *bits); 61 61 62 62 63 63 64 void BIO_Mems_Binary_Encode ( unsigned long val, unsignedlong b,65 mems_bitio_state * bs, unsignedlong *bits);66 unsigned long BIO_Mems_Binary_Decode (unsignedlong b, mems_bitio_state * bs,67 unsignedlong *bits);64 void BIO_Mems_Binary_Encode (mg_u_long val, mg_u_long b, 65 mems_bitio_state * bs, mg_u_long *bits); 66 mg_u_long BIO_Mems_Binary_Decode (mg_u_long b, mems_bitio_state * bs, 67 mg_u_long *bits); 68 68 69 69 70 70 71 void BIO_Mems_Gamma_Encode ( unsignedlong val, mems_bitio_state * bs,72 unsignedlong *bits);73 unsigned long BIO_Mems_Gamma_Decode (mems_bitio_state * bs, unsignedlong *bits);71 void BIO_Mems_Gamma_Encode (mg_u_long val, mems_bitio_state * bs, 72 mg_u_long *bits); 73 mg_u_long BIO_Mems_Gamma_Decode (mems_bitio_state * bs, mg_u_long *bits); 74 74 75 75 76 76 77 void BIO_Mems_Delta_Encode ( unsignedlong val, mems_bitio_state * bs,78 unsignedlong *bits);79 unsigned long BIO_Mems_Delta_Decode (mems_bitio_state * bs, unsignedlong *bits);77 void BIO_Mems_Delta_Encode (mg_u_long val, mems_bitio_state * bs, 78 mg_u_long *bits); 79 mg_u_long BIO_Mems_Delta_Decode (mems_bitio_state * bs, mg_u_long *bits); 80 80 81 81 82 void BIO_Mems_Elias_Encode ( unsigned long val, unsignedlong b, double s,83 mems_bitio_state * bs, unsignedlong *bits);84 unsigned long BIO_Mems_Elias_Decode (unsignedlong b, double s,85 mems_bitio_state * bs, unsignedlong *bits);82 void BIO_Mems_Elias_Encode (mg_u_long val, mg_u_long b, double s, 83 mems_bitio_state * bs, mg_u_long *bits); 84 mg_u_long BIO_Mems_Elias_Decode (mg_u_long b, double s, 85 mems_bitio_state * bs, mg_u_long *bits); 86 86 87 87 88 void BIO_Mems_Bblock_Encode ( unsigned long val, unsignedlong b,89 mems_bitio_state * bs, unsignedlong *bits);90 unsigned long BIO_Mems_Bblock_Decode (unsignedlong b, mems_bitio_state * bs,91 unsignedlong *bits);88 void BIO_Mems_Bblock_Encode (mg_u_long val, mg_u_long b, 89 mems_bitio_state * bs, mg_u_long *bits); 90 mg_u_long BIO_Mems_Bblock_Decode (mg_u_long b, mems_bitio_state * bs, 91 mg_u_long *bits); 92 92 93 93 94 void BIO_Mems_Decode_Seek ( unsignedlong pos, mems_bitio_state * bs);94 void BIO_Mems_Decode_Seek (mg_u_long pos, mems_bitio_state * bs); 95 95 96 96 -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_random.c
r16583 r25147 30 30 31 31 void 32 BIO_Random_Start (FILE * f, unsignedlong len,32 BIO_Random_Start (FILE * f, mg_u_long len, 33 33 random_bitio_state * bs) 34 34 { … … 64 64 65 65 void 66 BIO_Random_Unary_Encode ( unsignedlong val, random_bitio_state * bs,67 unsignedlong *bits)66 BIO_Random_Unary_Encode (mg_u_long val, random_bitio_state * bs, 67 mg_u_long *bits) 68 68 { 69 69 ENCODE_CONTINUE (*bs) … … 76 76 77 77 78 unsignedlong78 mg_u_long 79 79 BIO_Random_Unary_Decode (random_bitio_state * bs, 80 unsignedlong *bits)81 { 82 register unsignedlong val;80 mg_u_long *bits) 81 { 82 register mg_u_long val; 83 83 DECODE_CONTINUE (*bs) 84 84 if (bits) … … 97 97 98 98 void 99 BIO_Random_Binary_Encode ( unsigned long val, unsignedlong b,100 random_bitio_state * bs, unsignedlong *bits)99 BIO_Random_Binary_Encode (mg_u_long val, mg_u_long b, 100 random_bitio_state * bs, mg_u_long *bits) 101 101 { 102 102 ENCODE_CONTINUE (*bs) … … 109 109 110 110 111 unsignedlong112 BIO_Random_Binary_Decode ( unsignedlong b,111 mg_u_long 112 BIO_Random_Binary_Decode (mg_u_long b, 113 113 random_bitio_state * bs, 114 unsignedlong *bits)115 { 116 register unsignedlong val;114 mg_u_long *bits) 115 { 116 register mg_u_long val; 117 117 DECODE_CONTINUE (*bs) 118 118 if (bits) … … 131 131 132 132 void 133 BIO_Random_Gamma_Encode ( unsignedlong val, random_bitio_state * bs,134 unsignedlong *bits)133 BIO_Random_Gamma_Encode (mg_u_long val, random_bitio_state * bs, 134 mg_u_long *bits) 135 135 { 136 136 ENCODE_CONTINUE (*bs) … … 143 143 144 144 145 unsignedlong145 mg_u_long 146 146 BIO_Random_Gamma_Decode (random_bitio_state * bs, 147 unsignedlong *bits)148 { 149 register unsignedlong val;147 mg_u_long *bits) 148 { 149 register mg_u_long val; 150 150 DECODE_CONTINUE (*bs) 151 151 if (bits) … … 161 161 162 162 void 163 BIO_Random_Delta_Encode ( unsignedlong val, random_bitio_state * bs,164 unsignedlong *bits)163 BIO_Random_Delta_Encode (mg_u_long val, random_bitio_state * bs, 164 mg_u_long *bits) 165 165 { 166 166 ENCODE_CONTINUE (*bs) … … 173 173 174 174 175 unsignedlong175 mg_u_long 176 176 BIO_Random_Delta_Decode (random_bitio_state * bs, 177 unsignedlong *bits)178 { 179 register unsignedlong val;177 mg_u_long *bits) 178 { 179 register mg_u_long val; 180 180 DECODE_CONTINUE (*bs) 181 181 if (bits) … … 188 188 189 189 void 190 BIO_Random_Elias_Encode ( unsigned long val, unsignedlong b, double s,191 random_bitio_state * bs, unsignedlong *bits)190 BIO_Random_Elias_Encode (mg_u_long val, mg_u_long b, double s, 191 random_bitio_state * bs, mg_u_long *bits) 192 192 { 193 193 ENCODE_CONTINUE (*bs) … … 200 200 201 201 202 unsignedlong203 BIO_Random_Elias_Decode ( unsignedlong b, double s,202 mg_u_long 203 BIO_Random_Elias_Decode (mg_u_long b, double s, 204 204 random_bitio_state * bs, 205 unsignedlong *bits)206 { 207 register unsignedlong val;205 mg_u_long *bits) 206 { 207 register mg_u_long val; 208 208 DECODE_CONTINUE (*bs) 209 209 if (bits) … … 216 216 217 217 void 218 BIO_Random_Bblock_Encode ( unsigned long val, unsignedlong b,219 random_bitio_state * bs, unsignedlong *bits)218 BIO_Random_Bblock_Encode (mg_u_long val, mg_u_long b, 219 random_bitio_state * bs, mg_u_long *bits) 220 220 { 221 221 ENCODE_CONTINUE (*bs) … … 228 228 229 229 230 unsignedlong231 BIO_Random_Bblock_Decode ( unsignedlong b,230 mg_u_long 231 BIO_Random_Bblock_Decode (mg_u_long b, 232 232 random_bitio_state * bs, 233 unsignedlong *bits)234 { 235 register unsignedlong val;233 mg_u_long *bits) 234 { 235 register mg_u_long val; 236 236 DECODE_CONTINUE (*bs) 237 237 if (bits) … … 244 244 245 245 void 246 BIO_Random_Seek ( unsignedlong pos, random_bitio_state * bs)246 BIO_Random_Seek (mg_u_long pos, random_bitio_state * bs) 247 247 { 248 248 ENCODE_CONTINUE (*bs) … … 258 258 } 259 259 260 unsignedlong260 mg_u_long 261 261 BIO_Random_Tell (random_bitio_state * bs) 262 262 { 263 register unsignedlong t;263 register mg_u_long t; 264 264 ENCODE_CONTINUE (*bs) 265 265 t = ENCODE_TELL; … … 278 278 ((((pos)+7) >> 3) < (mg_ullong)(__base + __len))) 279 279 { 280 __pos = ( long)((pos) - (mg_ullong)(__base << 3));280 __pos = (mg_s_long)((pos) - (mg_ullong)(__base << 3)); 281 281 } 282 282 else 283 283 { 284 284 ENCODE_FLUSH; 285 __base = ( long)(((pos) >> (__sft+3)) << __sft);285 __base = (mg_s_long)(((pos) >> (__sft+3)) << __sft); 286 286 287 287 fseek(__file,__base,0); 288 288 fread(__buf,1,__len,__file); 289 __pos = ( long)((pos) & ((8 << __sft)-1));289 __pos = (mg_s_long)((pos) & ((8 << __sft)-1)); 290 290 } 291 291 -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_random.h
r16583 r25147 43 43 FILE *File; 44 44 unsigned char *Buf; 45 unsignedlong Base;46 unsignedlong Used;47 unsignedlong pos;48 unsignedlong len;49 unsignedlong sft;45 mg_u_long Base; 46 mg_u_long Used; 47 mg_u_long pos; 48 mg_u_long len; 49 mg_u_long sft; 50 50 } 51 51 random_bitio_state; … … 55 55 56 56 57 void BIO_Random_Start (FILE * f, unsignedlong len,57 void BIO_Random_Start (FILE * f, mg_u_long len, 58 58 random_bitio_state * bs); 59 59 void BIO_Random_Done (random_bitio_state * bs); … … 61 61 62 62 63 void BIO_Random_Decode_Start (void *buf, unsignedlong pos,63 void BIO_Random_Decode_Start (void *buf, mg_u_long pos, 64 64 random_bitio_state * bs); 65 65 … … 69 69 70 70 71 void BIO_Random_Unary_Encode ( unsignedlong val, random_bitio_state * bs,72 unsignedlong *bits);73 unsignedlong BIO_Random_Unary_Decode (random_bitio_state * bs,74 unsignedlong *bits);71 void BIO_Random_Unary_Encode (mg_u_long val, random_bitio_state * bs, 72 mg_u_long *bits); 73 mg_u_long BIO_Random_Unary_Decode (random_bitio_state * bs, 74 mg_u_long *bits); 75 75 76 76 77 77 78 void BIO_Random_Binary_Encode ( unsigned long val, unsignedlong b,79 random_bitio_state * bs, unsignedlong *bits);80 unsigned long BIO_Random_Binary_Decode (unsignedlong b, random_bitio_state * bs,81 unsignedlong *bits);78 void BIO_Random_Binary_Encode (mg_u_long val, mg_u_long b, 79 random_bitio_state * bs, mg_u_long *bits); 80 mg_u_long BIO_Random_Binary_Decode (mg_u_long b, random_bitio_state * bs, 81 mg_u_long *bits); 82 82 83 83 84 84 85 void BIO_Random_Gamma_Encode ( unsignedlong val, random_bitio_state * bs,86 unsignedlong *bits);87 unsignedlong BIO_Random_Gamma_Decode (random_bitio_state * bs,88 unsignedlong *bits);85 void BIO_Random_Gamma_Encode (mg_u_long val, random_bitio_state * bs, 86 mg_u_long *bits); 87 mg_u_long BIO_Random_Gamma_Decode (random_bitio_state * bs, 88 mg_u_long *bits); 89 89 90 90 91 91 92 void BIO_Random_Delta_Encode ( unsignedlong val, random_bitio_state * bs,93 unsignedlong *bits);94 unsignedlong BIO_Random_Delta_Decode (random_bitio_state * bs,95 unsignedlong *bits);92 void BIO_Random_Delta_Encode (mg_u_long val, random_bitio_state * bs, 93 mg_u_long *bits); 94 mg_u_long BIO_Random_Delta_Decode (random_bitio_state * bs, 95 mg_u_long *bits); 96 96 97 97 98 void BIO_Random_Elias_Encode ( unsigned long val, unsignedlong b, double s,99 random_bitio_state * bs, unsignedlong *bits);100 unsigned long BIO_Random_Elias_Decode (unsignedlong b, double s,98 void BIO_Random_Elias_Encode (mg_u_long val, mg_u_long b, double s, 99 random_bitio_state * bs, mg_u_long *bits); 100 mg_u_long BIO_Random_Elias_Decode (mg_u_long b, double s, 101 101 random_bitio_state * bs, 102 unsignedlong *bits);102 mg_u_long *bits); 103 103 104 104 105 void BIO_Random_Bblock_Encode ( unsigned long val, unsignedlong b,106 random_bitio_state * bs, unsignedlong *bits);107 unsigned long BIO_Random_Bblock_Decode (unsignedlong b,105 void BIO_Random_Bblock_Encode (mg_u_long val, mg_u_long b, 106 random_bitio_state * bs, mg_u_long *bits); 107 mg_u_long BIO_Random_Bblock_Decode (mg_u_long b, 108 108 random_bitio_state * bs, 109 unsignedlong *bits);109 mg_u_long *bits); 110 110 111 111 112 void BIO_Random_Seek ( unsignedlong pos, random_bitio_state * bs);112 void BIO_Random_Seek (mg_u_long pos, random_bitio_state * bs); 113 113 114 114 void BIO_Random_Flush (random_bitio_state * bs); 115 115 116 unsignedlong BIO_Random_Tell (random_bitio_state * bs);116 mg_u_long BIO_Random_Tell (random_bitio_state * bs); 117 117 118 118 #ifdef USE_LONG_LONG -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_stdio.c
r16583 r25147 72 72 73 73 void 74 BIO_Stdio_Unary_Encode ( unsignedlong val, stdio_bitio_state * bs,75 unsignedlong *bits)74 BIO_Stdio_Unary_Encode (mg_u_long val, stdio_bitio_state * bs, 75 mg_u_long *bits) 76 76 { 77 77 ENCODE_CONTINUE (*bs) … … 84 84 85 85 86 unsignedlong86 mg_u_long 87 87 BIO_Stdio_Unary_Decode (stdio_bitio_state * bs, 88 unsignedlong *bits)89 { 90 register unsignedlong val;88 mg_u_long *bits) 89 { 90 register mg_u_long val; 91 91 DECODE_CONTINUE (*bs) 92 92 if (bits) … … 105 105 106 106 void 107 BIO_Stdio_Binary_Encode ( unsigned long val, unsignedlong b,108 stdio_bitio_state * bs, unsignedlong *bits)107 BIO_Stdio_Binary_Encode (mg_u_long val, mg_u_long b, 108 stdio_bitio_state * bs, mg_u_long *bits) 109 109 { 110 110 ENCODE_CONTINUE (*bs) … … 117 117 118 118 119 unsignedlong120 BIO_Stdio_Binary_Decode ( unsignedlong b, stdio_bitio_state * bs,121 unsignedlong *bits)122 { 123 register unsignedlong val;119 mg_u_long 120 BIO_Stdio_Binary_Decode (mg_u_long b, stdio_bitio_state * bs, 121 mg_u_long *bits) 122 { 123 register mg_u_long val; 124 124 DECODE_CONTINUE (*bs) 125 125 if (bits) … … 138 138 139 139 void 140 BIO_Stdio_Gamma_Encode ( unsignedlong val, stdio_bitio_state * bs,141 unsignedlong *bits)140 BIO_Stdio_Gamma_Encode (mg_u_long val, stdio_bitio_state * bs, 141 mg_u_long *bits) 142 142 { 143 143 ENCODE_CONTINUE (*bs) … … 150 150 151 151 152 unsignedlong152 mg_u_long 153 153 BIO_Stdio_Gamma_Decode (stdio_bitio_state * bs, 154 unsignedlong *bits)155 { 156 register unsignedlong val;154 mg_u_long *bits) 155 { 156 register mg_u_long val; 157 157 DECODE_CONTINUE (*bs) 158 158 if (bits) … … 168 168 169 169 void 170 BIO_Stdio_Delta_Encode ( unsignedlong val, stdio_bitio_state * bs,171 unsignedlong *bits)170 BIO_Stdio_Delta_Encode (mg_u_long val, stdio_bitio_state * bs, 171 mg_u_long *bits) 172 172 { 173 173 ENCODE_CONTINUE (*bs) … … 180 180 181 181 182 unsignedlong182 mg_u_long 183 183 BIO_Stdio_Delta_Decode (stdio_bitio_state * bs, 184 unsignedlong *bits)185 { 186 register unsignedlong val;184 mg_u_long *bits) 185 { 186 register mg_u_long val; 187 187 DECODE_CONTINUE (*bs) 188 188 if (bits) … … 198 198 199 199 void 200 BIO_Stdio_Elias_Encode ( unsigned long val, unsignedlong b, double s,201 stdio_bitio_state * bs, unsignedlong *bits)200 BIO_Stdio_Elias_Encode (mg_u_long val, mg_u_long b, double s, 201 stdio_bitio_state * bs, mg_u_long *bits) 202 202 { 203 203 ENCODE_CONTINUE (*bs) … … 210 210 211 211 212 unsignedlong213 BIO_Stdio_Elias_Decode ( unsignedlong b, double s,212 mg_u_long 213 BIO_Stdio_Elias_Decode (mg_u_long b, double s, 214 214 stdio_bitio_state * bs, 215 unsignedlong *bits)216 { 217 register unsignedlong val;215 mg_u_long *bits) 216 { 217 register mg_u_long val; 218 218 DECODE_CONTINUE (*bs) 219 219 if (bits) … … 228 228 229 229 void 230 BIO_Stdio_Bblock_Encode ( unsigned long val, unsignedlong b,231 stdio_bitio_state * bs, unsignedlong *bits)230 BIO_Stdio_Bblock_Encode (mg_u_long val, mg_u_long b, 231 stdio_bitio_state * bs, mg_u_long *bits) 232 232 { 233 233 ENCODE_CONTINUE (*bs) … … 240 240 241 241 242 unsignedlong243 BIO_Stdio_Bblock_Decode ( unsignedlong b, stdio_bitio_state * bs,244 unsignedlong *bits)245 { 246 register unsignedlong val;242 mg_u_long 243 BIO_Stdio_Bblock_Decode (mg_u_long b, stdio_bitio_state * bs, 244 mg_u_long *bits) 245 { 246 register mg_u_long val; 247 247 DECODE_CONTINUE (*bs) 248 248 if (bits) … … 255 255 256 256 void 257 BIO_Stdio_Decode_Seek ( unsignedlong pos, stdio_bitio_state * bs)257 BIO_Stdio_Decode_Seek (mg_u_long pos, stdio_bitio_state * bs) 258 258 { 259 259 DECODE_CONTINUE (*bs) -
main/trunk/greenstone2/common-src/indexers/mg/lib/bitio_stdio.h
r16583 r25147 59 59 60 60 61 void BIO_Stdio_Unary_Encode ( unsignedlong val, stdio_bitio_state * bs,62 unsignedlong *bits);63 unsignedlong BIO_Stdio_Unary_Decode (stdio_bitio_state * bs,64 unsignedlong *bits);61 void BIO_Stdio_Unary_Encode (mg_u_long val, stdio_bitio_state * bs, 62 mg_u_long *bits); 63 mg_u_long BIO_Stdio_Unary_Decode (stdio_bitio_state * bs, 64 mg_u_long *bits); 65 65 66 66 67 67 68 void BIO_Stdio_Binary_Encode ( unsigned long val, unsignedlong b,69 stdio_bitio_state * bs, unsignedlong *bits);70 unsigned long BIO_Stdio_Binary_Decode (unsignedlong b, stdio_bitio_state * bs,71 unsignedlong *bits);68 void BIO_Stdio_Binary_Encode (mg_u_long val, mg_u_long b, 69 stdio_bitio_state * bs, mg_u_long *bits); 70 mg_u_long BIO_Stdio_Binary_Decode (mg_u_long b, stdio_bitio_state * bs, 71 mg_u_long *bits); 72 72 73 73 74 74 75 void BIO_Stdio_Gamma_Encode ( unsignedlong val, stdio_bitio_state * bs,76 unsignedlong *bits);77 unsignedlong BIO_Stdio_Gamma_Decode (stdio_bitio_state * bs,78 unsignedlong *bits);75 void BIO_Stdio_Gamma_Encode (mg_u_long val, stdio_bitio_state * bs, 76 mg_u_long *bits); 77 mg_u_long BIO_Stdio_Gamma_Decode (stdio_bitio_state * bs, 78 mg_u_long *bits); 79 79 80 80 81 81 82 void BIO_Stdio_Delta_Encode ( unsignedlong val, stdio_bitio_state * bs,83 unsignedlong *bits);84 unsignedlong BIO_Stdio_Delta_Decode (stdio_bitio_state * bs,85 unsignedlong *bits);82 void BIO_Stdio_Delta_Encode (mg_u_long val, stdio_bitio_state * bs, 83 mg_u_long *bits); 84 mg_u_long BIO_Stdio_Delta_Decode (stdio_bitio_state * bs, 85 mg_u_long *bits); 86 86 87 87 88 88 89 void BIO_Stdio_Elias_Encode ( unsigned long val, unsignedlong b, double s,90 stdio_bitio_state * bs, unsignedlong *bits);91 unsigned long BIO_Stdio_Elias_Decode (unsignedlong b, double s,89 void BIO_Stdio_Elias_Encode (mg_u_long val, mg_u_long b, double s, 90 stdio_bitio_state * bs, mg_u_long *bits); 91 mg_u_long BIO_Stdio_Elias_Decode (mg_u_long b, double s, 92 92 stdio_bitio_state * bs, 93 unsignedlong *bits);93 mg_u_long *bits); 94 94 95 95 96 void BIO_Stdio_Bblock_Encode ( unsigned long val, unsignedlong b,97 stdio_bitio_state * bs, unsignedlong *bits);98 unsigned long BIO_Stdio_Bblock_Decode (unsignedlong b, stdio_bitio_state * bs,99 unsignedlong *bits);96 void BIO_Stdio_Bblock_Encode (mg_u_long val, mg_u_long b, 97 stdio_bitio_state * bs, mg_u_long *bits); 98 mg_u_long BIO_Stdio_Bblock_Decode (mg_u_long b, stdio_bitio_state * bs, 99 mg_u_long *bits); 100 100 101 101 102 void BIO_Stdio_Decode_Seek ( unsignedlong pos, stdio_bitio_state * bs);102 void BIO_Stdio_Decode_Seek (mg_u_long pos, stdio_bitio_state * bs); 103 103 104 104 #endif -
main/trunk/greenstone2/common-src/indexers/mg/lib/filestats.c
r16583 r25147 28 28 29 29 File * 30 Fopen (char *name, char *mode, unsignedlong magic)30 Fopen (char *name, char *mode, mg_u_long magic) 31 31 { 32 32 FILE *f; 33 33 File *F; 34 unsignedlong m;34 mg_u_long m; 35 35 if (!(f = fopen (name, mode))) 36 36 return (NULL); … … 90 90 91 91 int 92 Fseek (File * F, long offset, int ptrname)92 Fseek (File * F, mg_s_long offset, int ptrname) 93 93 { 94 94 int num; -
main/trunk/greenstone2/common-src/indexers/mg/lib/filestats.h
r16583 r25147 23 23 #define H_FILESTATS 24 24 25 #include "mglong.h" 25 26 26 27 typedef struct FileStats 27 28 { 28 unsignedlong NumSeeks;29 unsignedlong NumReads;30 unsignedlong NumBytes;29 mg_u_long NumSeeks; 30 mg_u_long NumReads; 31 mg_u_long NumBytes; 31 32 } 32 33 FileStats; … … 45 46 46 47 /* if magic is 0 no magic number is read or written */ 47 File *Fopen (char *name, char *mode, unsignedlong magic);48 File *Fopen (char *name, char *mode, mg_u_long magic); 48 49 49 50 size_t Fread (void *ptr, size_t size, size_t nitems, File * F); 50 51 51 int Fseek (File * F, long offset, int ptrname);52 int Fseek (File * F, mg_s_long offset, int ptrname); 52 53 53 54 void Rewind (File * F); -
main/trunk/greenstone2/common-src/indexers/mg/lib/gmalloc.c
r16583 r25147 401 401 { 402 402 __ptr_t result; 403 unsigned long intadj;403 mg_u_long adj; 404 404 405 405 result = (*__morecore) (size); 406 adj = ( unsigned long int) ((unsigned long int) ((char *) result -406 adj = (mg_u_long) ((mg_u_long) ((char *) result - 407 407 (char *) NULL)) % BLOCKSIZE; 408 408 if (adj != 0) … … 549 549 block = BLOCK (result); 550 550 if (--_heapinfo[block].busy.info.frag.nfree != 0) 551 _heapinfo[block].busy.info.frag.first = ( unsigned long int)552 (( unsigned long int) ((char *) next->next - (char *) NULL)551 _heapinfo[block].busy.info.frag.first = (mg_u_long) 552 ((mg_u_long) ((char *) next->next - (char *) NULL) 553 553 % BLOCKSIZE) >> log; 554 554 … … 871 871 prev = (struct list *) ptr; 872 872 _heapinfo[block].busy.info.frag.nfree = 1; 873 _heapinfo[block].busy.info.frag.first = ( unsigned long int)874 (( unsigned long int) ((char *) ptr - (char *) NULL)873 _heapinfo[block].busy.info.frag.first = (mg_u_long) 874 ((mg_u_long) ((char *) ptr - (char *) NULL) 875 875 % BLOCKSIZE >> type); 876 876 prev->next = _fraghead[type].next; … … 1283 1283 { 1284 1284 __ptr_t result; 1285 unsignedlong int adj;1285 mg_u_long int adj; 1286 1286 1287 1287 size = ((size + alignment - 1) / alignment) * alignment; … … 1290 1290 if (result == NULL) 1291 1291 return NULL; 1292 adj = ( unsigned long int) ((unsigned long int) ((char *) result -1292 adj = (mg_u_long) ((mg_u_long) ((char *) result - 1293 1293 (char *) NULL)) % alignment; 1294 1294 if (adj != 0) -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman.c
r16583 r25147 30 30 */ 31 31 huff_data * 32 Generate_Huffman_Data (int num, long *freqs, huff_data * data,33 u_long * mem)32 Generate_Huffman_Data (int num, mg_s_long *freqs, huff_data * data, 33 mg_u_long * mem) 34 34 { 35 35 int HNum, i, count; 36 unsignedlong *heap;36 mg_u_long *heap; 37 37 huff_data *hd = data; 38 38 if (!hd) … … 73 73 if (heap[heap[curr - 1]] > heap[heap[child - 1]]) 74 74 { 75 register u_long temp;75 register mg_u_long temp; 76 76 temp = heap[child - 1]; 77 77 heap[child - 1] = heap[curr - 1]; … … 141 141 142 142 /* Calculate the code lens */ 143 heap[0] = -1 UL;143 heap[0] = -1; 144 144 heap[1] = 0; 145 145 for (i = 2; i < num * 2; i++) … … 154 154 for (i = 0; i < num; i++) 155 155 { 156 register u_long codelen = heap[i + num];156 register mg_u_long codelen = heap[i + num]; 157 157 hd->clens[i] = (char) codelen; 158 158 if (!codelen) … … 190 190 } 191 191 192 unsignedlong *193 Generate_Huffman_Codes (huff_data * data, u_long * mem)192 mg_u_long * 193 Generate_Huffman_Codes (huff_data * data, mg_u_long * mem) 194 194 { 195 195 int i; 196 unsignedlong *codes;197 unsignedlong mc[MAX_HUFFCODE_LEN + 1];196 mg_u_long *codes; 197 mg_u_long mc[MAX_HUFFCODE_LEN + 1]; 198 198 199 199 if (!data) … … 212 212 213 213 214 unsignedlong **215 Generate_Huffman_Vals (huff_data * data, u_long * mem)214 mg_u_long ** 215 Generate_Huffman_Vals (huff_data * data, mg_u_long * mem) 216 216 { 217 217 int i; 218 unsignedlong *fcode[MAX_HUFFCODE_LEN + 1];219 unsignedlong **values;220 unsignedlong *vals;218 mg_u_long *fcode[MAX_HUFFCODE_LEN + 1]; 219 mg_u_long **values; 220 mg_u_long *vals; 221 221 222 222 if (!data) … … 224 224 if (!(vals = Xmalloc (data->num_codes * sizeof (*vals)))) 225 225 return (NULL); 226 if (!(values = Xmalloc ((MAX_HUFFCODE_LEN + 1) * sizeof ( unsignedlong *))))226 if (!(values = Xmalloc ((MAX_HUFFCODE_LEN + 1) * sizeof (mg_u_long *)))) 227 227 { 228 228 free (vals); … … 230 230 } 231 231 232 bzero ((char *) values, (MAX_HUFFCODE_LEN + 1) * sizeof ( unsignedlong *));232 bzero ((char *) values, (MAX_HUFFCODE_LEN + 1) * sizeof (mg_u_long *)); 233 233 234 234 if (mem) 235 235 *mem += data->num_codes * sizeof (*vals) + 236 (MAX_HUFFCODE_LEN + 1) * sizeof ( unsignedlong *);236 (MAX_HUFFCODE_LEN + 1) * sizeof (mg_u_long *); 237 237 238 238 fcode[0] = values[0] = &vals[0]; … … 249 249 250 250 double 251 Calculate_Huffman_Size (int num, long *freqs,long *counts)251 Calculate_Huffman_Size (int num, mg_s_long *freqs, mg_s_long *counts) 252 252 { 253 253 double size = 0; … … 321 321 static int 322 322 General_Read_Huffman_Data (size_t (*rd) (), void *f, 323 huff_data * hd, u_long * mem,u_long * disk)323 huff_data * hd, mg_u_long * mem, mg_u_long * disk) 324 324 { 325 325 if (rd (&hd->num_codes, sizeof (hd->num_codes), 1, f) != 1) … … 392 392 393 393 int 394 Read_Huffman_Data (FILE * f, huff_data * hd, u_long * mem,u_long * disk)394 Read_Huffman_Data (FILE * f, huff_data * hd, mg_u_long * mem, mg_u_long * disk) 395 395 { 396 396 return General_Read_Huffman_Data (fread, f, hd, mem, disk); … … 401 401 402 402 int 403 F_Read_Huffman_Data (File * f, huff_data * hd, u_long * mem,u_long * disk)403 F_Read_Huffman_Data (File * f, huff_data * hd, mg_u_long * mem, mg_u_long * disk) 404 404 { 405 405 return General_Read_Huffman_Data (Fread, f, hd, mem, disk); -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman.h
r16583 r25147 37 37 int maxcodelen; 38 38 int lencount[MAX_HUFFCODE_LEN + 1]; 39 unsignedlong min_code[MAX_HUFFCODE_LEN + 1];39 mg_u_long min_code[MAX_HUFFCODE_LEN + 1]; 40 40 char *clens; 41 41 } … … 43 43 44 44 45 huff_data *Generate_Huffman_Data (int num, long *freqs, huff_data * data,46 u_long * mem);45 huff_data *Generate_Huffman_Data (int num, mg_s_long *freqs, huff_data * data, 46 mg_u_long * mem); 47 47 48 unsigned long *Generate_Huffman_Codes (huff_data * data,u_long * mem);48 mg_u_long *Generate_Huffman_Codes (huff_data * data, mg_u_long * mem); 49 49 50 unsigned long **Generate_Huffman_Vals (huff_data * data,u_long * mem);50 mg_u_long **Generate_Huffman_Vals (huff_data * data, mg_u_long * mem); 51 51 52 52 int Write_Huffman_Data (FILE * f, huff_data * hd); 53 53 54 int Read_Huffman_Data (FILE * f, huff_data * hd, u_long * mem,u_long * disk);54 int Read_Huffman_Data (FILE * f, huff_data * hd, mg_u_long * mem, mg_u_long * disk); 55 55 56 int F_Read_Huffman_Data (File * f, huff_data * hd, u_long * mem,u_long * disk);56 int F_Read_Huffman_Data (File * f, huff_data * hd, mg_u_long * mem, mg_u_long * disk); 57 57 58 58 /* Calculate the number of bits required to code the data with the 59 59 specified frequencies. Normally freqs and counts should point to 60 60 the same array. */ 61 double Calculate_Huffman_Size (int num, long *freqs,long *counts);61 double Calculate_Huffman_Size (int num, mg_s_long *freqs, mg_s_long *counts); 62 62 63 63 … … 67 67 register int __i; \ 68 68 register int __clen = (lens)[x]; \ 69 register unsignedlong __code = (codes)[x]; \69 register mg_u_long __code = (codes)[x]; \ 70 70 for (__i=__clen-1; __i>=0; --__i) \ 71 71 ENCODE_BIT((__code >> __i) & 1); \ … … 81 81 #define HUFF_DECODE(x, mcodes, values) \ 82 82 do { \ 83 register unsignedlong *__min_code = (mcodes); \84 register unsignedlong *__mclen = __min_code; \85 register unsignedlong **__values = (values); \86 register unsignedlong __code = 0; \83 register mg_u_long *__min_code = (mcodes); \ 84 register mg_u_long *__mclen = __min_code; \ 85 register mg_u_long **__values = (values); \ 86 register mg_u_long __code = 0; \ 87 87 do \ 88 88 { \ … … 96 96 #define HUFF_DECODE_L(x, mcodes, values, count) \ 97 97 do { \ 98 register unsignedlong *__min_code = (mcodes); \99 register unsignedlong *__mclen = __min_code; \100 register unsignedlong **__values = (values); \101 register unsignedlong __code = 0; \98 register mg_u_long *__min_code = (mcodes); \ 99 register mg_u_long *__mclen = __min_code; \ 100 register mg_u_long **__values = (values); \ 101 register mg_u_long __code = 0; \ 102 102 do \ 103 103 { \ -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman_mem.c
r16583 r25147 30 30 31 31 void 32 BIO_Mem_Huff_Encode ( unsigned long val, unsignedlong *codes,32 BIO_Mem_Huff_Encode (mg_u_long val, mg_u_long *codes, 33 33 char *clens, mem_bitio_state * bs) 34 34 { … … 38 38 } 39 39 40 unsignedlong41 BIO_Mem_Huff_Decode ( unsignedlong *mincodes,42 unsignedlong **values, mem_bitio_state * bs)40 mg_u_long 41 BIO_Mem_Huff_Decode (mg_u_long *mincodes, 42 mg_u_long **values, mem_bitio_state * bs) 43 43 { 44 unsignedlong val;44 mg_u_long val; 45 45 DECODE_CONTINUE (*bs) 46 46 HUFF_DECODE (val, mincodes, values); -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman_mem.h
r16583 r25147 25 25 26 26 27 void BIO_Mem_Huff_Encode ( unsigned long val, unsignedlong *codes,27 void BIO_Mem_Huff_Encode (mg_u_long val, mg_u_long *codes, 28 28 char *clens, mem_bitio_state * bs); 29 29 30 unsigned long BIO_Mem_Huff_Decode (unsignedlong *mincodes,31 unsignedlong **values, mem_bitio_state * bs);30 mg_u_long BIO_Mem_Huff_Decode (mg_u_long *mincodes, 31 mg_u_long **values, mem_bitio_state * bs); 32 32 33 33 -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman_stdio.c
r16583 r25147 33 33 34 34 void 35 BIO_Stdio_Huff_Encode ( unsigned long val, unsignedlong *codes,35 BIO_Stdio_Huff_Encode (mg_u_long val, mg_u_long *codes, 36 36 char *clens, stdio_bitio_state * bs) 37 37 { … … 41 41 } 42 42 43 unsignedlong44 BIO_Stdio_Huff_Decode ( unsignedlong *mincodes,45 unsignedlong **values,43 mg_u_long 44 BIO_Stdio_Huff_Decode (mg_u_long *mincodes, 45 mg_u_long **values, 46 46 stdio_bitio_state * bs) 47 47 { 48 unsignedlong val;48 mg_u_long val; 49 49 DECODE_CONTINUE (*bs) 50 50 HUFF_DECODE (val, mincodes, values); -
main/trunk/greenstone2/common-src/indexers/mg/lib/huffman_stdio.h
r16583 r25147 25 25 26 26 27 void BIO_Stdio_Huff_Encode ( unsigned long val, unsignedlong *codes,27 void BIO_Stdio_Huff_Encode (mg_u_long val, mg_u_long *codes, 28 28 char *clens, stdio_bitio_state * bs); 29 29 30 30 31 unsigned long BIO_Stdio_Huff_Decode (unsignedlong *mincodes,32 unsignedlong **values,31 mg_u_long BIO_Stdio_Huff_Decode (mg_u_long *mincodes, 32 mg_u_long **values, 33 33 stdio_bitio_state * bs); 34 34 -
main/trunk/greenstone2/common-src/indexers/mg/lib/longlong.h
r16583 r25147 22 22 #ifndef H_LONGLONG 23 23 #define H_LONGLONG 24 25 #include "mglong.h" 24 26 25 27 #ifndef __WIN32__ … … 71 73 72 74 /* Not using GCC, so fall back on plain "long" (32-bit) types */ 73 typedef u nsigned long int mg_ullong;74 typedef long int mg_llong;75 typedef uint32_t mg_ullong; 76 typedef int32_t mg_llong; 75 77 76 #define ULL_FS " lu"77 #define LL_FS " ld"78 #define ULL_FS "u" 79 #define LL_FS "d" 78 80 79 81 #endif /* __GNUC__ */ -
main/trunk/greenstone2/common-src/indexers/mg/lib/messages.c
r16583 r25147 28 28 29 29 30 void VOLATILE30 void 31 31 FatalError (int ExitCode, const char *fmt,...) 32 32 { -
main/trunk/greenstone2/common-src/indexers/mg/lib/messages.h
r16583 r25147 31 31 extern char *msg_prefix; 32 32 33 void VOLATILEFatalError (int ExitCode, const char *fmt,...);33 void FatalError (int ExitCode, const char *fmt,...); 34 34 35 35 void Message (const char *fmt,...); -
main/trunk/greenstone2/common-src/indexers/mg/lib/netorder.h
r22257 r25147 17 17 #define HTOND(d) \ 18 18 do { \ 19 unsignedlong tmph, tmpl; \19 mg_u_long tmph, tmpl; \ 20 20 bcopy ((char *) &d, (char *) &tmph, sizeof(double) >> 1); \ 21 21 bcopy ((char *) &d + (sizeof(double) >> 1), (char *) &tmpl, sizeof (double) >> 1); \ … … 27 27 #define NTOHD(d) \ 28 28 do { \ 29 unsignedlong tmph, tmpl; \29 mg_u_long tmph, tmpl; \ 30 30 bcopy ((char *) &d, (char *) &tmph, sizeof(double) >> 1); \ 31 31 bcopy ((char *) &d + (sizeof(double) >> 1), (char *) &tmpl, sizeof (double) >> 1); \ … … 37 37 #define HTOND2(hd, nd) \ 38 38 do { \ 39 unsignedlong tmph, tmpl; \39 mg_u_long tmph, tmpl; \ 40 40 bcopy ((char *) &hd, (char *) &tmph, sizeof(double) >> 1); \ 41 41 bcopy ((char *) &hd + (sizeof(double) >> 1), (char *) &tmpl, sizeof (double) >> 1); \ … … 47 47 #define NTOHD2(nd, hd) \ 48 48 do { \ 49 unsignedlong tmph, tmpl; \49 mg_u_long tmph, tmpl; \ 50 50 bcopy ((char *) &nd, (char *) &tmph, sizeof(double) >> 1); \ 51 51 bcopy ((char *) &nd + (sizeof(double) >> 1), (char *) &tmpl, sizeof (double) >> 1); \ … … 59 59 #define HTONF(f) \ 60 60 do { \ 61 unsignedlong tmp; \61 mg_u_long tmp; \ 62 62 bcopy ((char *) &(f), (char *) &tmp, sizeof (float)); \ 63 63 HTONUL (tmp); \ … … 66 66 #define NTOHF(f) \ 67 67 do { \ 68 unsignedlong tmp; \68 mg_u_long tmp; \ 69 69 bcopy ((char *) &(f), (char *) &tmp, sizeof (float)); \ 70 70 NTOHUL (tmp); \ … … 73 73 #define HTONF2(hf, nf) \ 74 74 do { \ 75 unsignedlong tmp; \75 mg_u_long tmp; \ 76 76 bcopy ((char *) &(hf), (char *) &tmp, sizeof (float)); \ 77 77 HTONUL (tmp); \ … … 80 80 #define NTOHF2(nf, hf) \ 81 81 do { \ 82 unsignedlong tmp; \82 mg_u_long tmp; \ 83 83 bcopy ((char *) &(nf), (char *) &tmp, sizeof (float)); \ 84 84 NTOHUL (tmp); \ … … 115 115 116 116 /* pointers */ 117 #define HTONP(p) ((p) = (void *) htonl (( unsignedlong) p))118 #define NTOHP(p) ((p) = (void *) ntohl (( unsignedlong) p))119 #define HTONP2(hp, np) ((np) = (void *) htonl (( unsignedlong) hp))120 #define NTOHP2(np, hp) ((hp) = (void *) ntohl (( unsignedlong) np))117 #define HTONP(p) ((p) = (void *) htonl ((mg_u_long) p)) 118 #define NTOHP(p) ((p) = (void *) ntohl ((mg_u_long) p)) 119 #define HTONP2(hp, np) ((np) = (void *) htonl ((mg_u_long) hp)) 120 #define NTOHP2(np, hp) ((hp) = (void *) ntohl ((mg_u_long) np)) 121 121 122 122 /* unsigned long */ … … 127 127 128 128 /* signed long */ 129 #define HTONSL(l) ((l) = ( long) htonl ((unsignedlong) (l)))130 #define NTOHSL(l) ((l) = ( long) ntohl ((unsignedlong) (l)))131 #define HTONSL2(hl, nl) ((nl) = ( long) htonl ((unsignedlong) (hl)))132 #define NTOHSL2(nl, hl) ((hl) = ( long) ntohl ((unsignedlong) (nl)))129 #define HTONSL(l) ((l) = (mg_s_long) htonl ((mg_u_long) (l))) 130 #define NTOHSL(l) ((l) = (mg_s_long) ntohl ((mg_u_long) (l))) 131 #define HTONSL2(hl, nl) ((nl) = (mg_s_long) htonl ((mg_u_long) (hl))) 132 #define NTOHSL2(nl, hl) ((hl) = (mg_s_long) ntohl ((mg_u_long) (nl))) 133 133 134 134 /* unsigned int */ 135 #define HTONUI(i) ((i) = (unsigned int) htonl (( unsignedlong) (i)))136 #define NTOHUI(i) ((i) = (unsigned int) ntohl (( unsignedlong) (i)))137 #define HTONUI2(hi, ni) ((ni) = (unsigned int) htonl (( unsignedlong) (hi)))138 #define NTOHUI2(ni, hi) ((hi) = (unsigned int) ntohl (( unsignedlong) (ni)))135 #define HTONUI(i) ((i) = (unsigned int) htonl ((mg_u_long) (i))) 136 #define NTOHUI(i) ((i) = (unsigned int) ntohl ((mg_u_long) (i))) 137 #define HTONUI2(hi, ni) ((ni) = (unsigned int) htonl ((mg_u_long) (hi))) 138 #define NTOHUI2(ni, hi) ((hi) = (unsigned int) ntohl ((mg_u_long) (ni))) 139 139 140 140 /* signed int */ 141 #define HTONSI(i) ((i) = (int) htonl (( unsignedlong) (i)))142 #define NTOHSI(i) ((i) = (int) ntohl (( unsignedlong) (i)))143 #define HTONSI2(hi, ni) ((ni) = (int) htonl (( unsignedlong) (hi)))144 #define NTOHSI2(ni, hi) ((hi) = (int) ntohl (( unsignedlong) (ni)))141 #define HTONSI(i) ((i) = (int) htonl ((mg_u_long) (i))) 142 #define NTOHSI(i) ((i) = (int) ntohl ((mg_u_long) (i))) 143 #define HTONSI2(hi, ni) ((ni) = (int) htonl ((mg_u_long) (hi))) 144 #define NTOHSI2(ni, hi) ((hi) = (int) ntohl ((mg_u_long) (ni))) 145 145 146 146 /* unsigned short */ -
main/trunk/greenstone2/common-src/indexers/mg/lib/perf_hash.c
r16583 r25147 42 42 43 43 /* Random Number stuff */ 44 static long seed[] = {0, 0};44 static mg_s_long seed[] = {0, 0}; 45 45 #define RANDOM() irandm(seed) 46 46 #define SEED_RANDOM(the_seed) do{ seed[0] = the_seed; }while(0) … … 105 105 106 106 #ifndef STRUCT 107 static long **tb0, **tb1, **tb2;107 static mg_s_long **tb0, **tb1, **tb2; 108 108 #else 109 109 struct tb_entry **tb; … … 128 128 { /* deletes edge e from list of v */ 129 129 130 int b; 131 130 int b, norm_b; 132 131 b = FIRST[v]; 133 132 assert (norm (b) != 0); … … 700 699 { 701 700 if (tb0) 702 if (!(tb0[i] = Xmalloc (sizeof ( long) * MAX_L)))701 if (!(tb0[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 703 702 ok = 0; 704 703 if (tb1) 705 if (!(tb1[i] = Xmalloc (sizeof ( long) * MAX_L)))704 if (!(tb1[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 706 705 ok = 0; 707 706 if (tb2) 708 if (!(tb2[i] = Xmalloc (sizeof ( long) * MAX_L)))707 if (!(tb2[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 709 708 ok = 0; 710 709 } … … 744 743 745 744 if (r <= 0) 746 SEED_RANDOM (( long) time ((time_t *) NULL));745 SEED_RANDOM ((mg_s_long) time ((time_t *) NULL)); 747 746 else 748 747 SEED_RANDOM (r); … … 907 906 { 908 907 if (phd->tb0) 909 if (!(phd->tb0[i] = Xmalloc (sizeof ( long) * phd->MAX_L)))908 if (!(phd->tb0[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L))) 910 909 ok = 0; 911 910 if (phd->tb1) 912 if (!(phd->tb1[i] = Xmalloc (sizeof ( long) * phd->MAX_L)))911 if (!(phd->tb1[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L))) 913 912 ok = 0; 914 913 if (phd->tb2) 915 if (!(phd->tb2[i] = Xmalloc (sizeof ( long) * phd->MAX_L)))914 if (!(phd->tb2[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L))) 916 915 ok = 0; 917 916 } … … 951 950 int j; 952 951 953 tot += fread ((char *) phd->tb0[i], sizeof ( long), phd->MAX_L, f) *952 tot += fread ((char *) phd->tb0[i], sizeof (mg_s_long), phd->MAX_L, f) * 954 953 sizeof (int); 955 tot += fread ((char *) phd->tb1[i], sizeof ( long), phd->MAX_L, f) *954 tot += fread ((char *) phd->tb1[i], sizeof (mg_s_long), phd->MAX_L, f) * 956 955 sizeof (int); 957 tot += fread ((char *) phd->tb2[i], sizeof ( long), phd->MAX_L, f) *956 tot += fread ((char *) phd->tb2[i], sizeof (mg_s_long), phd->MAX_L, f) * 958 957 sizeof (int); 959 958 -
main/trunk/greenstone2/common-src/indexers/mg/lib/perf_hash.h
r16583 r25147 23 23 #define H_PERF_HASH 24 24 25 26 25 #include "mglong.h" 27 26 28 27 struct tb_entry 29 28 { 30 long tb0, tb1, tb2;29 mg_s_long tb0, tb1, tb2; 31 30 }; 32 31 -
main/trunk/greenstone2/common-src/indexers/mg/lib/random.c
r16583 r25147 33 33 * The table mt[0:127] is defined by mt[i] = 69069 ** (128-i) 34 34 */ 35 36 #define MASK ((long) 593970775) 35 #include "random.h" 36 37 #define MASK ((mg_s_long) 593970775) 37 38 /* or in hex, 23674657 */ 38 39 … … 40 41 /* i.e. 2 to power -31 */ 41 42 42 static long mt [128] = {43 static mg_s_long mt [128] = { 43 44 902906369, 44 45 2030498053, … … 172 173 173 174 double 174 random ( long is [2])175 random (mg_s_long is [2]) 175 176 { 176 long it, leh, nit;177 mg_s_long it, leh, nit; 177 178 178 179 it = is [0]; … … 187 188 is [0] = it; is [1] = leh; 188 189 if (leh < 0) leh = ~leh; 189 return (SCALE * (( long) (leh | 1)));190 return (SCALE * ((mg_s_long) (leh | 1))); 190 191 } 191 192 192 193 193 194 194 long195 irandm ( long is [2])195 mg_s_long 196 irandm (mg_s_long is [2]) 196 197 { 197 long it, leh, nit;198 mg_s_long it, leh, nit; 198 199 199 200 it = is [0]; -
main/trunk/greenstone2/common-src/indexers/mg/lib/random.h
r16583 r25147 36 36 * The table mt[0:127] is defined by mt[i] = 69069 ** (128-i) 37 37 */ 38 #include "mglong.h" 38 39 39 double random ( long is [2]);40 long irandm (long is [2]);40 double random (mg_s_long is [2]); 41 mg_s_long irandm (mg_s_long is [2]); 41 42 42 43 #endif -
main/trunk/greenstone2/common-src/indexers/mg/lib/regex.c
r16583 r25147 2881 2881 register char *fastmap = bufp->fastmap; 2882 2882 unsigned char *pattern = bufp->buffer; 2883 unsignedlong size = bufp->used;2883 mg_u_long size = bufp->used; 2884 2884 unsigned char *p = pattern; 2885 2885 register unsigned char *pend = pattern + size; -
main/trunk/greenstone2/common-src/indexers/mg/lib/regex.h
r16583 r25147 289 289 290 290 /* Number of bytes to which `buffer' points. */ 291 unsignedlong allocated;291 mg_u_long allocated; 292 292 293 293 /* Number of bytes actually used in `buffer'. */ 294 unsignedlong used;294 mg_u_long used; 295 295 296 296 /* Syntax setting with which the pattern was compiled. */ -
main/trunk/greenstone2/common-src/indexers/mg/lib/rx.c
r16583 r25147 611 611 612 612 #ifdef __STDC__ 613 RX_DECL unsignedlong613 RX_DECL mg_u_long 614 614 rx_bitset_hash (int size, rx_Bitset b) 615 615 #else 616 RX_DECL unsignedlong616 RX_DECL mg_u_long 617 617 rx_bitset_hash (size, b) 618 618 int size; … … 621 621 { 622 622 int x; 623 u nsigned long hash = (unsigned long)rx_bitset_hash;623 uintptr_t hash = (uintptr_t)rx_bitset_hash; 624 624 625 625 for (x = rx_bitset_numb_subsets(size) - 1; x >= 0; --x) … … 696 696 697 697 698 static unsignedlong rx_hash_masks[4] =698 static mg_u_long rx_hash_masks[4] = 699 699 { 700 700 0x12488421, … … 709 709 RX_DECL struct rx_hash_item * 710 710 rx_hash_find (struct rx_hash * table, 711 unsignedlong hash,711 mg_u_long hash, 712 712 void * value, 713 713 struct rx_hash_rules * rules) … … 716 716 rx_hash_find (table, hash, value, rules) 717 717 struct rx_hash * table; 718 unsignedlong hash;718 mg_u_long hash; 719 719 void * value; 720 720 struct rx_hash_rules * rules; … … 723 723 rx_hash_eq eq = rules->eq; 724 724 int maskc = 0; 725 long mask = rx_hash_masks [0];725 mg_s_long mask = rx_hash_masks [0]; 726 726 int bucket = (hash & mask) % 13; 727 727 … … 750 750 RX_DECL struct rx_hash_item * 751 751 rx_hash_store (struct rx_hash * table, 752 unsignedlong hash,752 mg_u_long hash, 753 753 void * value, 754 754 struct rx_hash_rules * rules) … … 757 757 rx_hash_store (table, hash, value, rules) 758 758 struct rx_hash * table; 759 unsignedlong hash;759 mg_u_long hash; 760 760 void * value; 761 761 struct rx_hash_rules * rules; … … 764 764 rx_hash_eq eq = rules->eq; 765 765 int maskc = 0; 766 long mask = rx_hash_masks[0];766 mg_s_long mask = rx_hash_masks[0]; 767 767 int bucket = (hash & mask) % 13; 768 768 int depth = 0; … … 798 798 { 799 799 struct rx_hash_item * them = table->buckets[bucket]; 800 unsignedlong newmask = rx_hash_masks[maskc + 1];800 mg_u_long newmask = rx_hash_masks[maskc + 1]; 801 801 while (them) 802 802 { … … 850 850 { 851 851 struct rx_hash * table = it->table; 852 unsignedlong hash = it->hash;852 mg_u_long hash = it->hash; 853 853 int depth = (table->parent 854 854 ? (table->parent->parent … … 1764 1764 : (!vb 1765 1765 ? 1 1766 : (( long)a->car < (long)b->car1766 : ((intptr_t)a->car < (intptr_t)b->car 1767 1767 ? 1 1768 : (( long)a->car > (long)b->car1768 : ((intptr_t)a->car > (intptr_t)b->car 1769 1769 ? -1 1770 1770 : se_list_cmp ((void *)a->cdr, (void *)b->cdr)))))); … … 1831 1831 #endif 1832 1832 { 1833 long hash = (long)car ^ (long)cdr;1833 intptr_t hash = (intptr_t)car ^ (intptr_t)cdr; 1834 1834 struct rx_se_list template; 1835 1835 … … 1944 1944 template.cdr = set; 1945 1945 node = rx_hash_store (memo, 1946 ((( long)state) >> 8) ^ (long)set,1946 (((intptr_t)state) >> 8) ^ (intptr_t)set, 1947 1947 &template, &nfa_set_hash_rules); 1948 1948 if (!node) … … 2251 2251 RX_DECL int 2252 2252 rx_compactify_nfa (struct rx *rx, 2253 void **mem, unsignedlong *size)2253 void **mem, mg_u_long *size) 2254 2254 #else 2255 2255 RX_DECL int … … 2257 2257 struct rx *rx; 2258 2258 void **mem; 2259 unsignedlong *size;2259 mg_u_long *size; 2260 2260 #endif 2261 2261 { … … 2266 2266 int se_list_consc = count_hash_nodes (&rx->se_list_memo); 2267 2267 int nfa_setc = count_hash_nodes (&rx->set_list_memo); 2268 unsignedlong total_size;2268 mg_u_long total_size; 2269 2269 2270 2270 /* This takes place in two stages. First, the total size of the … … 2394 2394 { 2395 2395 sp = rx_hash_find (&rx->se_list_memo, 2396 ( long)sesrc->car ^ (long)sesrc->cdr,2396 (intptr_t)sesrc->car ^ (intptr_t)sesrc->cdr, 2397 2397 sesrc, &se_list_hash_rules); 2398 2398 if (sp->binding) … … 2412 2412 { 2413 2413 sp = rx_hash_find (&rx->set_list_memo, 2414 (((( long)destlst->car) >> 8)2415 ^ ( long)destlst->cdr),2414 ((((intptr_t)destlst->car) >> 8) 2415 ^ (intptr_t)destlst->cdr), 2416 2416 destlst, &nfa_set_hash_rules); 2417 2417 if (sp->binding) … … 2783 2783 (rx_hash_find 2784 2784 (&cache->superset_table, 2785 ( unsigned long)set->car ^ set->id ^ (unsigned long)set->cdr,2785 (intptr_t)set->car ^ set->id ^ (intptr_t)set->cdr, 2786 2786 (void *)set, 2787 2787 &cache->superset_hash_rules), … … 3040 3040 = ((struct rx_cache *) 3041 3041 ((char *)rules 3042 - ( unsigned long)(&((struct rx_cache *)0)->superset_hash_rules)));3042 - (intptr_t)(&((struct rx_cache *)0)->superset_hash_rules))); 3043 3043 struct rx_superset * template = (struct rx_superset *)val; 3044 3044 struct rx_superset * newset … … 3072 3072 = ((struct rx_cache *) 3073 3073 ((char *)rules 3074 - ( unsigned long)(&((struct rx_cache *)0)->superset_hash_rules)));3074 - (intptr_t)(&((struct rx_cache *)0)->superset_hash_rules))); 3075 3075 return ((struct rx_hash *) 3076 3076 rx_cache_malloc_or_get (cache, … … 3091 3091 struct rx_cache * cache 3092 3092 = ((struct rx_cache *) 3093 (char *)rules - ( long)(&((struct rx_cache *)0)->superset_hash_rules));3093 (char *)rules - (intptr_t)(&((struct rx_cache *)0)->superset_hash_rules)); 3094 3094 rx_cache_free (cache, &cache->free_hash, (char *)hash); 3095 3095 } … … 3248 3248 template.id = car->id; 3249 3249 hit = rx_hash_store (&cache->superset_table, 3250 ( unsigned long)car ^ car->id ^ (unsigned long)cdr,3250 (intptr_t)car ^ car->id ^ (intptr_t)cdr, 3251 3251 (void *)&template, 3252 3252 &cache->superset_hash_rules); … … 4306 4306 return; 4307 4307 case r_side_effect: 4308 if ( (( long)rexp->params.side_effect >= 0)4309 && (params [( long)rexp->params.side_effect].se == re_se_backref))4310 out[ params [( long)rexp->params.side_effect].op1] = 1;4308 if ( ((intptr_t)rexp->params.side_effect >= 0) 4309 && (params [(intptr_t)rexp->params.side_effect].se == re_se_backref)) 4310 out[ params [(intptr_t)rexp->params.side_effect].op1] = 1; 4311 4311 return; 4312 4312 } … … 4487 4487 case r_side_effect: 4488 4488 { 4489 int se = ( long)rexp->params.side_effect;4489 int se = (intptr_t)rexp->params.side_effect; 4490 4490 if ( (se >= 0) 4491 4491 && ( ((enum re_side_effects)params[se].se == re_se_lparen) … … 4533 4533 return pointless_if_repeated (node->params.pair.left, params); 4534 4534 case r_side_effect: 4535 switch ((enum re_side_effects) ((( long)node->params.side_effect < 0)4536 ? (enum re_side_effects) ( long) node->params.side_effect4537 : (enum re_side_effects)params[( long)node->params.side_effect].se))4535 switch ((enum re_side_effects) (((intptr_t)node->params.side_effect < 0) 4536 ? (enum re_side_effects) (intptr_t) node->params.side_effect 4537 : (enum re_side_effects)params[(intptr_t)node->params.side_effect].se)) 4538 4538 { 4539 4539 case re_se_try: … … 4558 4558 case re_se_backref: 4559 4559 return 0; 4560 case re_se_pushback: 4561 case re_se_push0: 4562 case re_se_pushpos: 4563 case re_se_chkpos: 4564 case re_se_poppos: 4565 case re_se_tv: 4566 case re_floogle_flap: 4567 return -1; 4560 4568 } 4561 4569 case r_data: … … 4606 4614 case r_side_effect: 4607 4615 { 4608 int se = ( long)rexp->params.side_effect;4616 int se = (intptr_t)rexp->params.side_effect; 4609 4617 if ( in_danger 4610 4618 && (se >= 0) … … 4723 4731 case r_side_effect: 4724 4732 return 4725 !(( long)rexp->params.side_effect > 04726 ? idempotent_complex_se [ params [( long)rexp->params.side_effect].se ]4727 : idempotent_se [-( long)rexp->params.side_effect]);4733 !((intptr_t)rexp->params.side_effect > 0 4734 ? idempotent_complex_se [ params [(intptr_t)rexp->params.side_effect].se ] 4735 : idempotent_se [-(intptr_t)rexp->params.side_effect]); 4728 4736 4729 4737 case r_alternate: … … 4776 4784 4777 4785 case r_side_effect: 4778 return (( long)rexp->params.side_effect >= 0);4786 return ((intptr_t)rexp->params.side_effect >= 0); 4779 4787 4780 4788 case r_alternate: … … 5167 5175 if (need_sync) 5168 5176 { 5169 int sync_se = paramc;5177 intptr_t sync_se = paramc; 5170 5178 params = (params 5171 5179 ? ((struct re_se_params *) … … 5515 5523 handle_close: 5516 5524 /* See similar code for backslashed left paren above. */ 5517 if (COMPILE_STACK_EMPTY) 5518 if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) 5525 if (COMPILE_STACK_EMPTY){ 5526 if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD){ 5519 5527 goto normal_char; 5520 else 5528 } 5529 else{ 5521 5530 return REG_ERPAREN; 5531 } 5532 } 5522 5533 5523 5534 /* Since we just checked for an empty stack above, this … … 5536 5547 this_group_regnum = COMPILE_STACK_TOP.regnum; 5537 5548 { 5538 int left_se = paramc;5539 int right_se = paramc + 1;5549 intptr_t left_se = paramc; 5550 intptr_t right_se = paramc + 1; 5540 5551 5541 5552 params = (params … … 5588 5599 last_expression = &alt->params.pair.right; 5589 5600 { 5590 int sync_se = paramc;5601 intptr_t sync_se = paramc; 5591 5602 5592 5603 params = (params … … 5705 5716 /* Otherwise, we have a nontrivial interval. */ 5706 5717 { 5707 int iter_se = paramc;5708 int end_se = paramc + 1;5718 intptr_t iter_se = paramc; 5719 intptr_t end_se = paramc + 1; 5709 5720 params = (params 5710 5721 ? ((struct re_se_params *) … … 5902 5913 5903 5914 { 5904 int backref_se = paramc;5915 intptr_t backref_se = paramc; 5905 5916 params = (params 5906 5917 ? ((struct re_se_params *) … … 5972 5983 5973 5984 { 5974 int win_se = paramc;5985 intptr_t win_se = paramc; 5975 5986 params = (params 5976 5987 ? ((struct re_se_params *) … … 6112 6123 { 6113 6124 void * mem = (void *)rxb->buffer; 6114 unsignedlong size = rxb->allocated;6125 mg_u_long size = rxb->allocated; 6115 6126 int start_id; 6116 6127 char * perm_mem; … … 6714 6725 while (list) 6715 6726 { 6716 if (( long)list->car >= 0)6727 if ((intptr_t)list->car >= 0) 6717 6728 ++x; 6718 6729 list = list->cdr; … … 6769 6780 for (ai = al - 1; ai >= 0; --ai) 6770 6781 { 6771 while (( long)ap->car < 0)6782 while ((intptr_t)ap->car < 0) 6772 6783 ap = ap->cdr; 6773 6784 av[ai] = ap->car; … … 6777 6788 for (bi = bl - 1; bi >= 0; --bi) 6778 6789 { 6779 while (( long)bp->car < 0)6790 while ((intptr_t)bp->car < 0) 6780 6791 bp = bp->cdr; 6781 6792 bv[bi] = bp->car; -
main/trunk/greenstone2/common-src/indexers/mg/lib/rx.h
r16583 r25147 22 22 /* t. lord Wed Sep 23 18:20:57 1992 */ 23 23 24 25 26 27 28 29 24 #include "mglong.h" 30 25 31 26 #ifndef RX_WANT_SE_DEFS … … 88 83 struct rx_hash_item * next_same_hash; 89 84 struct rx_hash * table; 90 unsignedlong hash;85 mg_u_long hash; 91 86 void * data; 92 87 void * binding; … … 267 262 */ 268 263 void * buffer; 269 unsignedlong allocated;264 mg_u_long allocated; 270 265 271 266 /* Clients of RX can ask for some extra storage in the space pointed … … 274 269 * at (buffer + allocated - reserved) 275 270 */ 276 unsignedlong reserved;271 mg_u_long reserved; 277 272 278 273 /* --------- The remaining fields are for internal use only. --------- */ … … 1262 1257 1263 1258 void * buffer; /* Malloced memory for the nfa. */ 1264 unsignedlong allocated; /* Size of that memory. */1259 mg_u_long allocated; /* Size of that memory. */ 1265 1260 1266 1261 /* Pointer to a fastmap, if any, otherwise zero. re_search uses … … 1564 1559 rx_Bitset a, rx_Bitset b); 1565 1560 RX_DECL void rx_bitset_xor (int size, rx_Bitset a, rx_Bitset b); 1566 RX_DECL unsignedlong rx_bitset_hash (int size, rx_Bitset b);1561 RX_DECL mg_u_long rx_bitset_hash (int size, rx_Bitset b); 1567 1562 RX_DECL struct rx_hash_item * rx_hash_find (struct rx_hash * table, 1568 unsignedlong hash,1563 mg_u_long hash, 1569 1564 void * value, 1570 1565 struct rx_hash_rules * rules); 1571 1566 RX_DECL struct rx_hash_item * rx_hash_store (struct rx_hash * table, 1572 unsignedlong hash,1567 mg_u_long hash, 1573 1568 void * value, 1574 1569 struct rx_hash_rules * rules); … … 1621 1616 RX_DECL void rx_delete_epsilon_transitions (struct rx *rx); 1622 1617 RX_DECL int rx_compactify_nfa (struct rx *rx, 1623 void **mem, unsignedlong *size);1618 void **mem, mg_u_long *size); 1624 1619 RX_DECL void rx_release_superset (struct rx *rx, 1625 1620 struct rx_superset *set); … … 1649 1644 RX_DECL void rx_bitset_revdifference (); 1650 1645 RX_DECL void rx_bitset_xor (); 1651 RX_DECL unsignedlong rx_bitset_hash ();1646 RX_DECL mg_u_long rx_bitset_hash (); 1652 1647 RX_DECL struct rx_hash_item * rx_hash_find (); 1653 1648 RX_DECL struct rx_hash_item * rx_hash_store (); … … 2207 2202 #endif /* not STDC_HEADERS */ 2208 2203 2209 2210 2204 2211 2205 … … 2322 2316 RX_DECL __inline__ int 2323 2317 rx_search (struct re_pattern_buffer * rxb, 2324 int startpos,2318 intptr_t startpos, 2325 2319 int range, 2326 2320 int stop, … … 2339 2333 app_closure, regs, resume_state, save_state) 2340 2334 struct re_pattern_buffer * rxb; 2341 int startpos;2335 intptr_t startpos; 2342 2336 int range; 2343 2337 int stop; … … 2717 2711 { 2718 2712 enum rx_test_match_entry test_pc; 2719 int inx;2713 intptr_t inx; 2720 2714 test_pc = search_state.test_match_resume_pt; 2721 2715 if (test_pc == rx_test_start) … … 2817 2811 ((struct rx_superstate *) 2818 2812 ((char *)this_tr_table 2819 - (( unsignedlong)2813 - ((mg_u_long) 2820 2814 ((struct rx_superstate *)0)->transitions))); 2821 2815 … … 2882 2876 ((struct rx_superstate *) 2883 2877 ((char *)this_tr_table 2884 - ((u nsigned long)2878 - ((uintptr_t) 2885 2879 ((struct rx_superstate *)0)->transitions))); 2886 2880 } … … 2889 2883 * Dispatch that instruction: 2890 2884 */ 2891 inx = (int )search_state.ifr->inx;2885 inx = (intptr_t)search_state.ifr->inx; 2892 2886 #ifdef RX_DEBUG_0 2893 2887 if (rx_debug_trace) … … 2927 2921 while (el) 2928 2922 { 2929 longeffect;2930 effect = ( long)el->car;2923 intptr_t effect; 2924 effect = (intptr_t)el->car; 2931 2925 if (effect < 0) 2932 2926 { … … 2968 2962 = ((struct rx_superstate *) 2969 2963 ((char *)search_state.ifr->data 2970 - ( long)(((struct rx_superstate *)0)2964 - (intptr_t)(((struct rx_superstate *)0) 2971 2965 ->transitions))); 2972 2966 goto top_of_cycle; -
main/trunk/greenstone2/common-src/indexers/mg/lib/sptree.c
r16583 r25147 293 293 q->par = p; \ 294 294 q->rght = p->left; \ 295 if(q->rght) \ 296 q->rght->par = q; \ 295 if(q->rght){ \ 296 q->rght->par = q; \ 297 } \ 297 298 p->left = q; \ 298 if(p->par) \ 299 if(q == p->par->left) \ 300 p->par->left = p; \ 301 else \ 302 p->par->rght = p; \ 299 if(p->par){ \ 300 if(q == p->par->left){ \ 301 p->par->left = p; \ 302 } \ 303 else{ \ 304 p->par->rght = p; \ 305 } \ 306 } \ 303 307 }while(0) 304 308 … … 308 312 q->par = p; \ 309 313 q->left = p->rght; \ 310 if(q->left) \ 311 q->left->par = q; \ 314 if(q->left){ \ 315 q->left->par = q; \ 316 } \ 312 317 p->rght = q; \ 313 if(p->par) \ 314 if(q == p->par->left) \ 315 p->par->left = p; \ 316 else \ 317 p->par->rght = p; \ 318 if(p->par){ \ 319 if(q == p->par->left){ \ 320 p->par->left = p; \ 321 } \ 322 else{ \ 323 p->par->rght = p; \ 324 } \ 325 } \ 318 326 }while(0) 319 327 … … 341 349 if (p == q->left) 342 350 { 343 if (g == NNULL) 351 if (g == NNULL){ 344 352 ROTATER (p, q); 353 } 345 354 else if (q == g->left) 346 355 { … … 356 365 else 357 366 { 358 if (g == NNULL) 367 if (g == NNULL){ 359 368 ROTATEL (p, q); 369 } 360 370 else if (q == g->rght) 361 371 { -
main/trunk/greenstone2/common-src/indexers/mg/lib/sptree.h
r16583 r25147 29 29 { 30 30 int no_of_items; 31 unsignedlong mem_in_use;31 mg_u_long mem_in_use; 32 32 int (*cmp) (void *, void *); 33 33 void *root; -
main/trunk/greenstone2/common-src/indexers/mg/lib/unitool.c
r23431 r25147 15 15 * column 16 16 */ 17 unsignedlong *unicode_cat_data=NULL;17 mg_u_long *unicode_cat_data=NULL; 18 18 19 19 … … 1464 1464 * column 1465 1465 */ 1466 unsignedlong *unicode_cat_data;1466 mg_u_long *unicode_cat_data; 1467 1467 1468 1468 void create_unicat_data () { … … 1470 1470 int min_start=0; 1471 1471 int min_end=0; 1472 register unsignedlong min_value=0; /* filling the whole byte */1472 register mg_u_long min_value=0; /* filling the whole byte */ 1473 1473 1474 1474 const unirange *letter_here = letter_info; … … 1529 1529 1530 1530 } else { 1531 register unsignedlong mask = 3 << ((i % 16) * 2);1531 register mg_u_long mask = 3 << ((i % 16) * 2); 1532 1532 unicode_cat_data[i/16] = (unicode_cat_data[i/16] & (~mask)) | 1533 1533 (min_value & mask); -
main/trunk/greenstone2/common-src/indexers/mg/lib/win32in.c
r16583 r25147 4 4 /* unix systems. */ 5 5 6 unsigned long htonl(unsignedlong x) {6 mg_u_long htonl(mg_u_long x) { 7 7 #if defined (LITTLE_ENDIAN) || defined (_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN) 8 8 x = ((x >> 24) & 0x000000FF) | ((x >> 8) & 0x0000FF00) | … … 25 25 } 26 26 27 unsigned long ntohl(unsignedlong x) {27 mg_u_long ntohl(mg_u_long x) { 28 28 #if defined (LITTLE_ENDIAN) || defined (_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN) 29 29 x = ((x >> 24) & 0x000000FF) | ((x >> 8) & 0x0000FF00) | … … 51 51 52 52 main () { 53 long x;53 mg_s_long x; 54 54 short sx; 55 55 -
main/trunk/greenstone2/common-src/indexers/mg/lib/win32in.h
r16583 r25147 4 4 #include "longlong.h" 5 5 6 unsigned long htonl(unsignedlong x);7 unsigned long ntohl(unsignedlong x);6 mg_u_long htonl(mg_u_long x); 7 mg_u_long ntohl(mg_u_long x); 8 8 mg_ullong ntohll(mg_ullong x); 9 9 unsigned short htons(unsigned short x); -
main/trunk/greenstone2/common-src/indexers/mg/src/images/Makefile.in
r16583 r25147 36 36 37 37 CC = @CC@ 38 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@38 CFLAGS = @CFLAGS@ 39 39 CPPFLAGS = @CPPFLAGS@ 40 40 DEFS = @DEFS@ … … 42 42 INSTALL_DATA = @INSTALL_DATA@ 43 43 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 44 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@44 LDFLAGS = @LDFLAGS@ 45 45 LIBS = ../../lib/libmglib.a @LIBS@ 46 46 TOUCH = echo timestamp > -
main/trunk/greenstone2/common-src/indexers/mg/src/images/mgfelics.c
r16583 r25147 55 55 FILE *fp_in = (stdin), *fp_out = (stdout); 56 56 int width, height, maxval; 57 u_long magic;57 mg_u_long magic; 58 58 char *filename = NULL; 59 59 unsigned int *line; -
main/trunk/greenstone2/common-src/indexers/mg/src/images/pbmtools.c
r16583 r25147 64 64 pbm_isapbmfile (FILE * fp) 65 65 { 66 u_long magic;66 mg_u_long magic; 67 67 68 68 magic = getmagicno_short (fp); -
main/trunk/greenstone2/common-src/indexers/mg/src/images/utils.c
r16583 r25147 230 230 231 231 void 232 magic_write (FILE * fp, u_long magic_num)232 magic_write (FILE * fp, mg_u_long magic_num) 233 233 { 234 234 HTONUL(magic_num); /* [RPAP - Jan 97: Endian Ordering] */ … … 239 239 240 240 void 241 magic_check (FILE * fp, u_long magic_num)242 { 243 u_long magic;241 magic_check (FILE * fp, mg_u_long magic_num) 242 { 243 mg_u_long magic; 244 244 if (fread (&magic, sizeof (magic), 1, fp) != 1 || NTOHUL(magic) != magic_num) /* [RPAP - Jan 97: Endian Ordering] */ 245 245 error_msg ("magic num", "Incorrect magic number.", ""); … … 247 247 248 248 249 u_long249 mg_u_long 250 250 magic_read (FILE * fp) 251 251 { 252 u_long magic;252 mg_u_long magic; 253 253 if (fread (&magic, sizeof (magic), 1, fp) != 1) 254 254 error_msg ("magic num", "Couldn't read magic number.", ""); -
main/trunk/greenstone2/common-src/indexers/mg/src/images/utils.h
r16583 r25147 45 45 #define MAGIC_BILEVEL GEN_MAGIC('M','G','B','I') 46 46 #define MAGIC_TIC GEN_MAGIC('M','G','T','C') 47 #define IS_MAGIC(a) (((( u_long)(a)) & 0xffff0000) == MAGIC_XXXX)47 #define IS_MAGIC(a) ((((mg_u_long)(a)) & 0xffff0000) == MAGIC_XXXX) 48 48 /* --------------------------------------- */ 49 49 … … 68 68 void readline (char str[], FILE * fp); 69 69 70 void magic_write (FILE * fp, u_long magic_num);71 void magic_check (FILE * fp, u_long magic_num);72 u_long magic_read (FILE * fp);70 void magic_write (FILE * fp, mg_u_long magic_num); 71 void magic_check (FILE * fp, mg_u_long magic_num); 72 mg_u_long magic_read (FILE * fp); 73 73 /* kerry's code */ 74 74 -
main/trunk/greenstone2/common-src/indexers/mg/src/text/Makefile.in
r22070 r25147 38 38 AR = ar 39 39 CC = @CC@ 40 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-fpic40 CFLAGS = @CFLAGS@ -fpic 41 41 DEFS = @DEFS@ 42 42 RANLIB = @RANLIB@ … … 44 44 INSTALL_DATA = @INSTALL_DATA@ 45 45 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 46 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@46 LDFLAGS = @LDFLAGS@ 47 47 LIBS = ../../lib/libmglib.a @LIBS@ 48 48 TOUCH = echo timestamp > … … 53 53 # Uncomment for compiling for the nzdl project 54 54 # 55 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@-fpic -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM55 CFLAGS = @CFLAGS@ -fpic -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM 56 56 ########################################## 57 57 -
main/trunk/greenstone2/common-src/indexers/mg/src/text/backend.c
r16583 r25147 47 47 48 48 static File * 49 OpenFile (char *base, char *suffix, unsignedlong magic, int *ok)49 OpenFile (char *base, char *suffix, mg_u_long magic, int *ok) 50 50 { 51 51 char FileName[512]; … … 62 62 if (magic) 63 63 { 64 unsignedlong m;64 mg_u_long m; 65 65 if (fread ((char *) &m, sizeof (m), 1, F->f) == 0) 66 66 { … … 475 475 if (qd->id->ifh.InvfLevel == 3) 476 476 { 477 unsignedlong magic;477 mg_u_long magic; 478 478 FILE *paragraph; 479 479 int i; … … 507 507 { 508 508 extern char *trec_ids; 509 extern long *trec_paras;509 extern mg_s_long *trec_paras; 510 510 int size; 511 511 char FileName[512]; … … 533 533 { 534 534 int i, d; 535 unsignedlong magic;536 trec_paras = Xmalloc (qd->sd->sdh.num_of_docs * sizeof ( long));535 mg_u_long magic; 536 trec_paras = Xmalloc (qd->sd->sdh.num_of_docs * sizeof (mg_s_long)); 537 537 if (!trec_paras) 538 538 { … … 598 598 */ 599 599 void 600 ChangeMemInUse (query_data * qd, long delta)600 ChangeMemInUse (query_data * qd, mg_s_long delta) 601 601 { 602 602 qd->mem_in_use += delta; … … 775 775 } 776 776 777 long777 mg_s_long 778 778 GetDocCompLength (query_data * qd) 779 779 { … … 785 785 786 786 u_char * 787 GetDocText (query_data * qd, unsignedlong *len)787 GetDocText (query_data * qd, mg_u_long *len) 788 788 { 789 789 DocEntry *DE; -
main/trunk/greenstone2/common-src/indexers/mg/src/text/backend.h
r16583 r25147 40 40 { 41 41 File *InvfFile; 42 unsignedlong N;43 unsignedlong Nstatic; /* N parameter for decoding inverted file entries */42 mg_u_long N; 43 mg_u_long Nstatic; /* N parameter for decoding inverted file entries */ 44 44 struct invf_file_header ifh; 45 45 } … … 51 51 File *TextIdxFile; 52 52 File *TextIdxWgtFile; 53 long current_pos;53 mg_s_long current_pos; 54 54 struct 55 55 { 56 unsignedlong Start;56 mg_u_long Start; 57 57 float Weight; 58 58 } … … 78 78 compression_dict_header cdh; 79 79 comp_frags_header *cfh[2]; 80 unsignedlong MemForCompDict;80 mg_u_long MemForCompDict; 81 81 u_char ***values[2]; 82 82 u_char *escape[2]; 83 83 huff_data *chars_huff[2]; 84 u_long **chars_vals[2];84 mg_u_long **chars_vals[2]; 85 85 huff_data *lens_huff[2]; 86 u_long **lens_vals[2];86 mg_u_long **lens_vals[2]; 87 87 auxiliary_dict *ad; 88 88 int fast_loaded; … … 96 96 struct stem_idx_header sih; 97 97 u_char **index; 98 unsignedlong *pos;98 mg_u_long *pos; 99 99 int active; 100 100 u_char *buffer; 101 unsignedlong MemForStemIdx;101 mg_u_long MemForStemIdx; 102 102 } 103 103 stemmed_idx; … … 109 109 struct stem_dict_header sdh; 110 110 u_char **index; 111 unsignedlong *pos;111 mg_u_long *pos; 112 112 int active; 113 113 u_char *buffer; 114 unsignedlong MemForStemDict;114 mg_u_long MemForStemDict; 115 115 116 116 /* [RPAP - Jan 97: Stem Index Change] */ … … 126 126 double L; 127 127 double B; 128 unsignedlong *DocWeights;128 mg_u_long *DocWeights; 129 129 char bits; 130 130 float *table; 131 unsignedlong mask;132 unsignedlong MemForWeights;133 unsignedlong num_of_docs;131 mg_u_long mask; 132 mg_u_long MemForWeights; 133 mg_u_long num_of_docs; 134 134 } 135 135 approx_weights_data; … … 140 140 int QueryFreqs; 141 141 int Exact; /* use exact weights for ranking or not */ 142 long MaxDocsToRetrieve; /* may be -1 for all */143 long MaxParasToRetrieve;142 mg_s_long MaxDocsToRetrieve; /* may be -1 for all */ 143 mg_s_long MaxParasToRetrieve; 144 144 int Sort; 145 145 char AccumMethod; /* 'A' = array, 'S' = splay tree, 'H' = hash_table */ 146 long MaxAccums; /* may be -1 for all */147 long MaxTerms; /* may be -1 for all */146 mg_s_long MaxAccums; /* may be -1 for all */ 147 mg_s_long MaxTerms; /* may be -1 for all */ 148 148 int StopAtMaxAccum; /* Stop at maximum accumulator or not */ 149 long HashTblSize;149 mg_s_long HashTblSize; 150 150 char *skip_dump; 151 151 } … … 156 156 typedef struct BooleanQueryInfo 157 157 { 158 long MaxDocsToRetrieve;158 mg_s_long MaxDocsToRetrieve; 159 159 } 160 160 BooleanQueryInfo; … … 191 191 File *File_invf; 192 192 File *File_weight_approx; 193 unsignedlong mem_in_use, max_mem_in_use;194 unsignedlong num_of_ptrs, tot_num_of_ptrs;195 unsignedlong num_of_terms, tot_num_of_terms;196 unsignedlong num_of_accum, tot_num_of_accum;197 unsignedlong num_of_ans, tot_num_of_ans;198 unsignedlong hops_taken, tot_hops_taken;199 unsignedlong text_idx_lookups, tot_text_idx_lookups;200 unsignedlong max_buffers;193 mg_u_long mem_in_use, max_mem_in_use; 194 mg_u_long num_of_ptrs, tot_num_of_ptrs; 195 mg_u_long num_of_terms, tot_num_of_terms; 196 mg_u_long num_of_accum, tot_num_of_accum; 197 mg_u_long num_of_ans, tot_num_of_ans; 198 mg_u_long hops_taken, tot_hops_taken; 199 mg_u_long text_idx_lookups, tot_text_idx_lookups; 200 mg_u_long max_buffers; 201 201 unsigned doc_pos; 202 202 unsigned buf_in_use; … … 226 226 query_data *InitQuerySystem (char *dir, char *name, char *textname, InitQueryTimes * iqt); 227 227 228 void ChangeMemInUse (query_data * qd, long delta);228 void ChangeMemInUse (query_data * qd, mg_s_long delta); 229 229 230 230 void FinishQuerySystem (query_data * qd); … … 251 251 float GetDocWeight (query_data * qd); 252 252 253 long GetDocCompLength (query_data * qd);254 255 u_char *GetDocText (query_data * qd, unsignedlong *len);253 mg_s_long GetDocCompLength (query_data * qd); 254 255 u_char *GetDocText (query_data * qd, mg_u_long *len); 256 256 257 257 DocEntry *GetDocChain (query_data * qd); -
main/trunk/greenstone2/common-src/indexers/mg/src/text/bool_parser.c
r16583 r25147 44 44 static QueryTermList **query_term_list; 45 45 static int word_num; 46 static u_long count;47 static u_long doc_count;48 static u_long invf_ptr;49 static u_long invf_len;46 static mg_u_long count; 47 static mg_u_long doc_count; 48 static mg_u_long invf_ptr; 49 static mg_u_long invf_len; 50 50 51 51 #line 66 "bool_parser.y" -
main/trunk/greenstone2/common-src/indexers/mg/src/text/bool_parser.y
r16583 r25147 57 57 static QueryTermList **query_term_list; 58 58 static int word_num; 59 static u_long count;60 static u_long doc_count;61 static u_long invf_ptr;62 static u_long invf_len;59 static mg_u_long count; 60 static mg_u_long doc_count; 61 static mg_u_long invf_ptr; 62 static mg_u_long invf_len; 63 63 %} 64 64 -
main/trunk/greenstone2/common-src/indexers/mg/src/text/bool_tester.c
r16583 r25147 151 151 prompt (str); 152 152 te->WE.doc_count = atoi (line); 153 printf ("doc_count = % ld\n", te->WE.doc_count);153 printf ("doc_count = %d\n", te->WE.doc_count); 154 154 } /*for */ 155 155 } /*if */ -
main/trunk/greenstone2/common-src/indexers/mg/src/text/bool_tree.c
r16583 r25147 56 56 bool_tree_node * 57 57 CreateBoolTermNode (TermList ** tl, char *text, int Count, int word_num, 58 u_long count, u_long doc_count, u_long invf_ptr,u_long invf_len, /* [RPAP - Feb 97: Term Frequency] */58 mg_u_long count, mg_u_long doc_count, mg_u_long invf_ptr, mg_u_long invf_len, /* [RPAP - Feb 97: Term Frequency] */ 59 59 int stemmer_num) 60 60 { -
main/trunk/greenstone2/common-src/indexers/mg/src/text/bool_tree.h
r16583 r25147 102 102 bool_tree_node *CopyBoolTree (bool_tree_node * tree); 103 103 bool_tree_node *CreateBoolTermNode (TermList ** tl, char *text, int Count, int word_num, 104 u_long count, u_long doc_count,u_long invf_ptr,105 u_long invf_len, int stemmer_num);104 mg_u_long count, mg_u_long doc_count, mg_u_long invf_ptr, 105 mg_u_long invf_len, int stemmer_num); 106 106 bool_tree_node *CreateBoolTreeNode (N_Tag tag, 107 107 bool_tree_node * left, bool_tree_node * right); -
main/trunk/greenstone2/common-src/indexers/mg/src/text/build.h
r16583 r25147 111 111 112 112 113 extern unsignedlong buf_size;113 extern mg_u_long buf_size; 114 114 /* 115 115 * The size of the document input buffer. 116 116 */ 117 117 118 extern unsignedlong ChunkLimit;118 extern mg_u_long ChunkLimit; 119 119 /* 120 120 * The maximum number of chunks that can be written to disk. 121 121 */ 122 122 123 extern unsignedlong invf_buffer_size;123 extern mg_u_long invf_buffer_size; 124 124 /* 125 125 * The amount of memory to allocate to the invertion buffer. -
main/trunk/greenstone2/common-src/indexers/mg/src/text/comp_dict.c
r16583 r25147 66 66 huff_data char_huff[2]; 67 67 huff_data lens_huff[2]; 68 u_long *char_codes[2], *lens_codes[2];69 u_long Words_disk = 0;70 u_long Chars_disk = 0;68 mg_u_long *char_codes[2], *lens_codes[2]; 69 mg_u_long Words_disk = 0; 70 mg_u_long Chars_disk = 0; 71 71 72 72 … … 79 79 dict_hash_table *ht; 80 80 u_char **words; 81 u_long ht_size;81 mg_u_long ht_size; 82 82 83 83 ht_size = prime (cfh->hd.num_codes * HASH_RATIO); … … 133 133 register u_char **wptr; 134 134 register int tsize = ht->size; 135 register unsignedlong hashval, step;135 register mg_u_long hashval, step; 136 136 137 137 HASH (hashval, step, allwords, tsize); … … 163 163 return COMPERROR; 164 164 165 Words_disk = sizeof ( u_long);165 Words_disk = sizeof (mg_u_long); 166 166 167 167 if (Read_cdh (dict, &cdh, NULL, &Words_disk) == -1) -
main/trunk/greenstone2/common-src/indexers/mg/src/text/comp_dict.h
r16583 r25147 32 32 typedef struct dict_hash_table 33 33 { 34 u_long size;34 mg_u_long size; 35 35 huff_data *hd; 36 u_long *codes;36 mg_u_long *codes; 37 37 u_char **words; 38 38 u_char **table[1]; … … 51 51 extern huff_data char_huff[2]; 52 52 extern huff_data lens_huff[2]; 53 extern u_long *char_codes[2], *lens_codes[2];54 extern u_long Words_disk;55 extern u_long Chars_disk;53 extern mg_u_long *char_codes[2], *lens_codes[2]; 54 extern mg_u_long Words_disk; 55 extern mg_u_long Chars_disk; 56 56 57 57 -
main/trunk/greenstone2/common-src/indexers/mg/src/text/environment.c
r16583 r25147 347 347 * or default on a error 348 348 */ 349 long350 IntEnv (char *data, long def)351 { 352 long val;349 mg_s_long 350 IntEnv (char *data, mg_s_long def) 351 { 352 mg_s_long val; 353 353 char *ptr; 354 354 if (!data) -
main/trunk/greenstone2/common-src/indexers/mg/src/text/environment.h
r16583 r25147 54 54 char *GetEnvName (int i); 55 55 int BooleanEnv (char *data, int def); 56 long IntEnv (char *data,long def);56 mg_s_long IntEnv (char *data, mg_s_long def); 57 57 58 58 void InitEnv (void); -
main/trunk/greenstone2/common-src/indexers/mg/src/text/hash.h
r16583 r25147 31 31 do { \ 32 32 register u_char *p=wd; \ 33 register long len = *p++; \34 register unsignedlong hval; \33 register mg_s_long len = *p++; \ 34 register mg_u_long hval; \ 35 35 if (len>25) len = 25; \ 36 36 for (hval=0; len; --len) \ -
main/trunk/greenstone2/common-src/indexers/mg/src/text/invf.h
r16583 r25147 30 30 struct invf_dict_header 31 31 { 32 unsignedlong lookback;33 unsignedlong dict_size;34 unsignedlong total_bytes;35 unsignedlong index_string_bytes;32 mg_u_long lookback; 33 mg_u_long dict_size; 34 mg_u_long total_bytes;