Changeset 1860
- Timestamp:
- 2001-01-26T07:26:45+13:00 (23 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 18 added
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/Makefile.in
r1714 r1860 57 57 58 58 install: 59 59 60 for idir in $(INSTALLDIRS); do \ 60 61 echo installing $$idir; \ … … 77 78 done 78 79 79 80 80 # For an explanation of the following Makefile rules, see node 81 81 # `Automatic Remaking' in GNU Autoconf documentation. -
trunk/gsdl/acconfig.h
r697 r1860 38 38 #undef USE_FASTCGI 39 39 40 /* Define USE_CORBA if needsbe */ 41 #undef USE_CORBA 42 43 /* Define MICO_DIR if needsbe */ 44 #undef MICO_DIR 40 45 41 46 42 47 43 48 49 -
trunk/gsdl/config.h.in
r998 r1860 99 99 #undef USE_FASTCGI 100 100 101 /* Define USE_CORBA if needsbe */ 102 #undef USE_CORBA 103 104 /* Define MICO_DIR if needsbe */ 105 #undef MICO_DIR 106 101 107 /* Define if you have the ftime function. */ 102 108 #undef HAVE_FTIME -
trunk/gsdl/configure
r1722 r1860 12 12 ac_default_prefix=/usr/local 13 13 # Any additions from configure.in: 14 ac_help="$ac_help 15 --enable-corba Enable CORBA support" 16 ac_help="$ac_help 17 --with-micodir Use installed MICO directory" 14 18 ac_help="$ac_help 15 19 --with-dmalloc use dmalloc, as in … … 575 579 fi 576 580 581 582 # Check whether --enable-corba or --disable-corba was given. 583 if test "${enable_corba+set}" = set; then 584 enableval="$enable_corba" 585 USE_CORBA=1 586 else 587 USE_CORBA=0 588 fi 589 590 cat >> confdefs.h <<\EOF 591 #define USE_CORBA 1 592 EOF 593 594 595 596 # Check whether --with-micodir or --without-micodir was given. 597 if test "${with_micodir+set}" = set; then 598 withval="$with_micodir" 599 MICO_DIR=$enableval 600 else 601 MICO_DIR="default" 602 fi 603 604 cat >> confdefs.h <<\EOF 605 #define MICO_DIR 1 606 EOF 607 608 609 577 610 LDFLAGS= 578 611 if test -z "$CFLAGS"; then … … 584 617 set dummy gcc; ac_word=$2 585 618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 586 echo "configure: 587: checking for $ac_word" >&5619 echo "configure:620: checking for $ac_word" >&5 587 620 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 588 621 echo $ac_n "(cached) $ac_c" 1>&6 … … 614 647 set dummy cc; ac_word=$2 615 648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 616 echo "configure:6 17: checking for $ac_word" >&5649 echo "configure:650: checking for $ac_word" >&5 617 650 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 618 651 echo $ac_n "(cached) $ac_c" 1>&6 … … 665 698 set dummy cl; ac_word=$2 666 699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 667 echo "configure: 668: checking for $ac_word" >&5700 echo "configure:701: checking for $ac_word" >&5 668 701 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 669 702 echo $ac_n "(cached) $ac_c" 1>&6 … … 697 730 698 731 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 699 echo "configure:7 00: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5732 echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 700 733 701 734 ac_ext=c … … 708 741 cat > conftest.$ac_ext << EOF 709 742 710 #line 7 11"configure"743 #line 744 "configure" 711 744 #include "confdefs.h" 712 745 713 746 main(){return(0);} 714 747 EOF 715 if { (eval echo configure:7 16: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then748 if { (eval echo configure:749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 716 749 ac_cv_prog_cc_works=yes 717 750 # If we can't run a trivial program, we are probably using a cross compiler. … … 739 772 fi 740 773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 741 echo "configure:7 42: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5774 echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 742 775 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 743 776 cross_compiling=$ac_cv_prog_cc_cross 744 777 745 778 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 746 echo "configure:7 47: checking whether we are using GNU C" >&5779 echo "configure:780: checking whether we are using GNU C" >&5 747 780 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 748 781 echo $ac_n "(cached) $ac_c" 1>&6 … … 753 786 #endif 754 787 EOF 755 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:7 56: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then788 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 756 789 ac_cv_prog_gcc=yes 757 790 else … … 772 805 CFLAGS= 773 806 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 774 echo "configure: 775: checking whether ${CC-cc} accepts -g" >&5807 echo "configure:808: checking whether ${CC-cc} accepts -g" >&5 775 808 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 776 809 echo $ac_n "(cached) $ac_c" 1>&6 … … 808 841 set dummy $ac_prog; ac_word=$2 809 842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 810 echo "configure:8 11: checking for $ac_word" >&5843 echo "configure:844: checking for $ac_word" >&5 811 844 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then 812 845 echo $ac_n "(cached) $ac_c" 1>&6 … … 840 873 841 874 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 842 echo "configure:8 43: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5875 echo "configure:876: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 843 876 844 877 ac_ext=C … … 851 884 cat > conftest.$ac_ext << EOF 852 885 853 #line 8 54"configure"886 #line 887 "configure" 854 887 #include "confdefs.h" 855 888 856 889 int main(){return(0);} 857 890 EOF 858 if { (eval echo configure:8 59: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then891 if { (eval echo configure:892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 859 892 ac_cv_prog_cxx_works=yes 860 893 # If we can't run a trivial program, we are probably using a cross compiler. … … 882 915 fi 883 916 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 884 echo "configure: 885: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5917 echo "configure:918: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 885 918 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 886 919 cross_compiling=$ac_cv_prog_cxx_cross 887 920 888 921 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 889 echo "configure: 890: checking whether we are using GNU C++" >&5922 echo "configure:923: checking whether we are using GNU C++" >&5 890 923 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then 891 924 echo $ac_n "(cached) $ac_c" 1>&6 … … 896 929 #endif 897 930 EOF 898 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure: 899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then931 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 899 932 ac_cv_prog_gxx=yes 900 933 else … … 915 948 CXXFLAGS= 916 949 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 917 echo "configure:9 18: checking whether ${CXX-g++} accepts -g" >&5950 echo "configure:951: checking whether ${CXX-g++} accepts -g" >&5 918 951 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then 919 952 echo $ac_n "(cached) $ac_c" 1>&6 … … 946 979 fi 947 980 948 for ac_prog in mawk gawk nawk awk981 for ac_prog in gawk mawk nawk awk 949 982 do 950 983 # Extract the first word of "$ac_prog", so it can be a program name with args. 951 984 set dummy $ac_prog; ac_word=$2 952 985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 953 echo "configure:9 54: checking for $ac_word" >&5986 echo "configure:987: checking for $ac_word" >&5 954 987 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then 955 988 echo $ac_n "(cached) $ac_c" 1>&6 … … 985 1018 set dummy $ac_prog; ac_word=$2 986 1019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 987 echo "configure: 988: checking for $ac_word" >&51020 echo "configure:1021: checking for $ac_word" >&5 988 1021 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then 989 1022 echo $ac_n "(cached) $ac_c" 1>&6 … … 1046 1079 # ./install, which can be erroneously created by make from ./install.sh. 1047 1080 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1048 echo "configure:10 49: checking for a BSD compatible install" >&51081 echo "configure:1082: checking for a BSD compatible install" >&5 1049 1082 if test -z "$INSTALL"; then 1050 1083 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then … … 1099 1132 1100 1133 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 1101 echo "configure:11 02: checking whether ln -s works" >&51134 echo "configure:1135: checking whether ln -s works" >&5 1102 1135 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then 1103 1136 echo $ac_n "(cached) $ac_c" 1>&6 … … 1120 1153 1121 1154 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 1122 echo "configure:11 23: checking whether ${MAKE-make} sets \${MAKE}" >&51155 echo "configure:1156: checking whether ${MAKE-make} sets \${MAKE}" >&5 1123 1156 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 1124 1157 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then … … 1149 1182 set dummy ranlib; ac_word=$2 1150 1183 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1151 echo "configure:11 52: checking for $ac_word" >&51184 echo "configure:1185: checking for $ac_word" >&5 1152 1185 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 1153 1186 echo $ac_n "(cached) $ac_c" 1>&6 … … 1179 1212 1180 1213 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1181 echo "configure:1 182: checking how to run the C preprocessor" >&51214 echo "configure:1215: checking how to run the C preprocessor" >&5 1182 1215 # On Suns, sometimes $CPP names a directory. 1183 1216 if test -n "$CPP" && test -d "$CPP"; then … … 1194 1227 # not just through cpp. 1195 1228 cat > conftest.$ac_ext <<EOF 1196 #line 1 197"configure"1229 #line 1230 "configure" 1197 1230 #include "confdefs.h" 1198 1231 #include <assert.h> … … 1200 1233 EOF 1201 1234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1202 { (eval echo configure:12 03: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1235 { (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1203 1236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1204 1237 if test -z "$ac_err"; then … … 1211 1244 CPP="${CC-cc} -E -traditional-cpp" 1212 1245 cat > conftest.$ac_ext <<EOF 1213 #line 12 14"configure"1246 #line 1247 "configure" 1214 1247 #include "confdefs.h" 1215 1248 #include <assert.h> … … 1217 1250 EOF 1218 1251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1219 { (eval echo configure:12 20: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1252 { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1220 1253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1221 1254 if test -z "$ac_err"; then … … 1228 1261 CPP="${CC-cc} -nologo -E" 1229 1262 cat > conftest.$ac_ext <<EOF 1230 #line 12 31"configure"1263 #line 1264 "configure" 1231 1264 #include "confdefs.h" 1232 1265 #include <assert.h> … … 1234 1267 EOF 1235 1268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1236 { (eval echo configure:12 37: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1269 { (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1237 1270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1238 1271 if test -z "$ac_err"; then … … 1259 1292 1260 1293 echo $ac_n "checking for AIX""... $ac_c" 1>&6 1261 echo "configure:12 62: checking for AIX" >&51294 echo "configure:1295: checking for AIX" >&5 1262 1295 cat > conftest.$ac_ext <<EOF 1263 #line 12 64"configure"1296 #line 1297 "configure" 1264 1297 #include "confdefs.h" 1265 1298 #ifdef _AIX … … 1283 1316 1284 1317 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 1285 echo "configure:1 286: checking for POSIXized ISC" >&51318 echo "configure:1319: checking for POSIXized ISC" >&5 1286 1319 if test -d /etc/conf/kconfig.d && 1287 1320 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 … … 1305 1338 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` 1306 1339 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 1307 echo "configure:13 08: checking for minix/config.h" >&51340 echo "configure:1341: checking for minix/config.h" >&5 1308 1341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1309 1342 echo $ac_n "(cached) $ac_c" 1>&6 1310 1343 else 1311 1344 cat > conftest.$ac_ext <<EOF 1312 #line 13 13"configure"1345 #line 1346 "configure" 1313 1346 #include "confdefs.h" 1314 1347 #include <minix/config.h> 1315 1348 EOF 1316 1349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1317 { (eval echo configure:13 18: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1350 { (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1318 1351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1319 1352 if test -z "$ac_err"; then … … 1353 1386 1354 1387 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 1355 echo "configure:13 56: checking for ${CC-cc} option to accept ANSI C" >&51388 echo "configure:1389: checking for ${CC-cc} option to accept ANSI C" >&5 1356 1389 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then 1357 1390 echo $ac_n "(cached) $ac_c" 1>&6 … … 1369 1402 CFLAGS="$ac_save_CFLAGS $ac_arg" 1370 1403 cat > conftest.$ac_ext <<EOF 1371 #line 1 372"configure"1404 #line 1405 "configure" 1372 1405 #include "confdefs.h" 1373 1406 #if !defined(__STDC__) || __STDC__ != 1 … … 1381 1414 ; return 0; } 1382 1415 EOF 1383 if { (eval echo configure:1 384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1416 if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1384 1417 rm -rf conftest* 1385 1418 ac_cv_prog_cc_stdc="$ac_arg"; break … … 1402 1435 1403 1436 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6 1404 echo "configure:14 05: checking for function prototypes" >&51437 echo "configure:1438: checking for function prototypes" >&5 1405 1438 if test "$ac_cv_prog_cc_stdc" != no; then 1406 1439 echo "$ac_t""yes" 1>&6 … … 1416 1449 1417 1450 echo $ac_n "checking for working const""... $ac_c" 1>&6 1418 echo "configure:14 19: checking for working const" >&51451 echo "configure:1452: checking for working const" >&5 1419 1452 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then 1420 1453 echo $ac_n "(cached) $ac_c" 1>&6 1421 1454 else 1422 1455 cat > conftest.$ac_ext <<EOF 1423 #line 14 24"configure"1456 #line 1457 "configure" 1424 1457 #include "confdefs.h" 1425 1458 … … 1470 1503 ; return 0; } 1471 1504 EOF 1472 if { (eval echo configure:1 473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1505 if { (eval echo configure:1506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1473 1506 rm -rf conftest* 1474 1507 ac_cv_c_const=yes … … 1491 1524 1492 1525 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 1493 echo "configure:1 494: checking for ANSI C header files" >&51526 echo "configure:1527: checking for ANSI C header files" >&5 1494 1527 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 1495 1528 echo $ac_n "(cached) $ac_c" 1>&6 1496 1529 else 1497 1530 cat > conftest.$ac_ext <<EOF 1498 #line 1 499"configure"1531 #line 1532 "configure" 1499 1532 #include "confdefs.h" 1500 1533 #include <stdlib.h> … … 1504 1537 EOF 1505 1538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1506 { (eval echo configure:15 07: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1539 { (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1507 1540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1508 1541 if test -z "$ac_err"; then … … 1521 1554 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 1522 1555 cat > conftest.$ac_ext <<EOF 1523 #line 15 24"configure"1556 #line 1557 "configure" 1524 1557 #include "confdefs.h" 1525 1558 #include <string.h> … … 1539 1572 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 1540 1573 cat > conftest.$ac_ext <<EOF 1541 #line 15 42"configure"1574 #line 1575 "configure" 1542 1575 #include "confdefs.h" 1543 1576 #include <stdlib.h> … … 1560 1593 else 1561 1594 cat > conftest.$ac_ext <<EOF 1562 #line 15 63"configure"1595 #line 1596 "configure" 1563 1596 #include "confdefs.h" 1564 1597 #include <ctype.h> … … 1571 1604 1572 1605 EOF 1573 if { (eval echo configure:1 574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1606 if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1574 1607 then 1575 1608 : … … 1595 1628 1596 1629 echo $ac_n "checking for off_t""... $ac_c" 1>&6 1597 echo "configure:1 598: checking for off_t" >&51630 echo "configure:1631: checking for off_t" >&5 1598 1631 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then 1599 1632 echo $ac_n "(cached) $ac_c" 1>&6 1600 1633 else 1601 1634 cat > conftest.$ac_ext <<EOF 1602 #line 16 03"configure"1635 #line 1636 "configure" 1603 1636 #include "confdefs.h" 1604 1637 #include <sys/types.h> … … 1628 1661 1629 1662 echo $ac_n "checking for size_t""... $ac_c" 1>&6 1630 echo "configure:16 31: checking for size_t" >&51663 echo "configure:1664: checking for size_t" >&5 1631 1664 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then 1632 1665 echo $ac_n "(cached) $ac_c" 1>&6 1633 1666 else 1634 1667 cat > conftest.$ac_ext <<EOF 1635 #line 16 36"configure"1668 #line 1669 "configure" 1636 1669 #include "confdefs.h" 1637 1670 #include <sys/types.h> … … 1661 1694 1662 1695 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 1663 echo "configure:16 64: checking whether time.h and sys/time.h may both be included" >&51696 echo "configure:1697: checking whether time.h and sys/time.h may both be included" >&5 1664 1697 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 1665 1698 echo $ac_n "(cached) $ac_c" 1>&6 1666 1699 else 1667 1700 cat > conftest.$ac_ext <<EOF 1668 #line 1 669"configure"1701 #line 1702 "configure" 1669 1702 #include "confdefs.h" 1670 1703 #include <sys/types.h> … … 1675 1708 ; return 0; } 1676 1709 EOF 1677 if { (eval echo configure:1 678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1710 if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1678 1711 rm -rf conftest* 1679 1712 ac_cv_header_time=yes … … 1696 1729 1697 1730 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 1698 echo "configure:1 699: checking whether struct tm is in sys/time.h or time.h" >&51731 echo "configure:1732: checking whether struct tm is in sys/time.h or time.h" >&5 1699 1732 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then 1700 1733 echo $ac_n "(cached) $ac_c" 1>&6 1701 1734 else 1702 1735 cat > conftest.$ac_ext <<EOF 1703 #line 17 04"configure"1736 #line 1737 "configure" 1704 1737 #include "confdefs.h" 1705 1738 #include <sys/types.h> … … 1709 1742 ; return 0; } 1710 1743 EOF 1711 if { (eval echo configure:17 12: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1744 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1712 1745 rm -rf conftest* 1713 1746 ac_cv_struct_tm=time.h … … 1732 1765 if test "$ac_cv_prog_cc_stdc" = '-Xc'; then 1733 1766 cat > conftest.$ac_ext <<EOF 1734 #line 17 35"configure"1767 #line 1768 "configure" 1735 1768 #include "confdefs.h" 1736 1769 #include <stdio.h> … … 1740 1773 ; return 0; } 1741 1774 EOF 1742 if { (eval echo configure:17 43: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1775 if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1743 1776 : 1744 1777 else … … 1753 1786 1754 1787 echo $ac_n "checking for main in -lg""... $ac_c" 1>&6 1755 echo "configure:17 56: checking for main in -lg" >&51788 echo "configure:1789: checking for main in -lg" >&5 1756 1789 ac_lib_var=`echo g'_'main | sed 'y%./+-%__p_%'` 1757 1790 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1761 1794 LIBS="-lg $LIBS" 1762 1795 cat > conftest.$ac_ext <<EOF 1763 #line 17 64"configure"1796 #line 1797 "configure" 1764 1797 #include "confdefs.h" 1765 1798 … … 1768 1801 ; return 0; } 1769 1802 EOF 1770 if { (eval echo configure:1 771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1803 if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1771 1804 rm -rf conftest* 1772 1805 eval "ac_cv_lib_$ac_lib_var=yes" … … 1796 1829 1797 1830 echo $ac_n "checking for main in -lgdbm""... $ac_c" 1>&6 1798 echo "configure:1 799: checking for main in -lgdbm" >&51831 echo "configure:1832: checking for main in -lgdbm" >&5 1799 1832 ac_lib_var=`echo gdbm'_'main | sed 'y%./+-%__p_%'` 1800 1833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1804 1837 LIBS="-lgdbm $LIBS" 1805 1838 cat > conftest.$ac_ext <<EOF 1806 #line 18 07"configure"1839 #line 1840 "configure" 1807 1840 #include "confdefs.h" 1808 1841 … … 1811 1844 ; return 0; } 1812 1845 EOF 1813 if { (eval echo configure:18 14: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1846 if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1814 1847 rm -rf conftest* 1815 1848 eval "ac_cv_lib_$ac_lib_var=yes" … … 1839 1872 1840 1873 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 1841 echo "configure:18 42: checking for main in -lm" >&51874 echo "configure:1875: checking for main in -lm" >&5 1842 1875 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` 1843 1876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1847 1880 LIBS="-lm $LIBS" 1848 1881 cat > conftest.$ac_ext <<EOF 1849 #line 18 50"configure"1882 #line 1883 "configure" 1850 1883 #include "confdefs.h" 1851 1884 … … 1854 1887 ; return 0; } 1855 1888 EOF 1856 if { (eval echo configure:18 57: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1889 if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1857 1890 rm -rf conftest* 1858 1891 eval "ac_cv_lib_$ac_lib_var=yes" … … 1882 1915 1883 1916 echo $ac_n "checking for main in -lstdc++""... $ac_c" 1>&6 1884 echo "configure:1 885: checking for main in -lstdc++" >&51917 echo "configure:1918: checking for main in -lstdc++" >&5 1885 1918 ac_lib_var=`echo stdc++'_'main | sed 'y%./+-%__p_%'` 1886 1919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1890 1923 LIBS="-lstdc++ $LIBS" 1891 1924 cat > conftest.$ac_ext <<EOF 1892 #line 1 893"configure"1925 #line 1926 "configure" 1893 1926 #include "confdefs.h" 1894 1927 … … 1897 1930 ; return 0; } 1898 1931 EOF 1899 if { (eval echo configure:19 00: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1932 if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1900 1933 rm -rf conftest* 1901 1934 eval "ac_cv_lib_$ac_lib_var=yes" … … 1925 1958 1926 1959 echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6 1927 echo "configure:19 28: checking for main in -lcrypt" >&51960 echo "configure:1961: checking for main in -lcrypt" >&5 1928 1961 ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'` 1929 1962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1933 1966 LIBS="-lcrypt $LIBS" 1934 1967 cat > conftest.$ac_ext <<EOF 1935 #line 19 36"configure"1968 #line 1969 "configure" 1936 1969 #include "confdefs.h" 1937 1970 … … 1940 1973 ; return 0; } 1941 1974 EOF 1942 if { (eval echo configure:19 43: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1975 if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1943 1976 rm -rf conftest* 1944 1977 eval "ac_cv_lib_$ac_lib_var=yes" … … 1974 2007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1975 2008 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 1976 echo "configure: 1977: checking for $ac_hdr that defines DIR" >&52009 echo "configure:2010: checking for $ac_hdr that defines DIR" >&5 1977 2010 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then 1978 2011 echo $ac_n "(cached) $ac_c" 1>&6 1979 2012 else 1980 2013 cat > conftest.$ac_ext <<EOF 1981 #line 1982"configure"2014 #line 2015 "configure" 1982 2015 #include "confdefs.h" 1983 2016 #include <sys/types.h> … … 1987 2020 ; return 0; } 1988 2021 EOF 1989 if { (eval echo configure: 1990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then2022 if { (eval echo configure:2023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1990 2023 rm -rf conftest* 1991 2024 eval "ac_cv_header_dirent_$ac_safe=yes" … … 2012 2045 if test $ac_header_dirent = dirent.h; then 2013 2046 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 2014 echo "configure:20 15: checking for opendir in -ldir" >&52047 echo "configure:2048: checking for opendir in -ldir" >&5 2015 2048 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` 2016 2049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 2020 2053 LIBS="-ldir $LIBS" 2021 2054 cat > conftest.$ac_ext <<EOF 2022 #line 20 23"configure"2055 #line 2056 "configure" 2023 2056 #include "confdefs.h" 2024 2057 /* Override any gcc2 internal prototype to avoid an error. */ … … 2031 2064 ; return 0; } 2032 2065 EOF 2033 if { (eval echo configure:20 34: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2066 if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2034 2067 rm -rf conftest* 2035 2068 eval "ac_cv_lib_$ac_lib_var=yes" … … 2053 2086 else 2054 2087 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 2055 echo "configure:20 56: checking for opendir in -lx" >&52088 echo "configure:2089: checking for opendir in -lx" >&5 2056 2089 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` 2057 2090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 2061 2094 LIBS="-lx $LIBS" 2062 2095 cat > conftest.$ac_ext <<EOF 2063 #line 20 64"configure"2096 #line 2097 "configure" 2064 2097 #include "confdefs.h" 2065 2098 /* Override any gcc2 internal prototype to avoid an error. */ … … 2072 2105 ; return 0; } 2073 2106 EOF 2074 if { (eval echo configure:2 075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2107 if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2075 2108 rm -rf conftest* 2076 2109 eval "ac_cv_lib_$ac_lib_var=yes" … … 2095 2128 2096 2129 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 2097 echo "configure:2 098: checking for ANSI C header files" >&52130 echo "configure:2131: checking for ANSI C header files" >&5 2098 2131 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 2099 2132 echo $ac_n "(cached) $ac_c" 1>&6 2100 2133 else 2101 2134 cat > conftest.$ac_ext <<EOF 2102 #line 21 03"configure"2135 #line 2136 "configure" 2103 2136 #include "confdefs.h" 2104 2137 #include <stdlib.h> … … 2108 2141 EOF 2109 2142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2110 { (eval echo configure:21 11: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2143 { (eval echo configure:2144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2111 2144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2112 2145 if test -z "$ac_err"; then … … 2125 2158 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 2126 2159 cat > conftest.$ac_ext <<EOF 2127 #line 21 28"configure"2160 #line 2161 "configure" 2128 2161 #include "confdefs.h" 2129 2162 #include <string.h> … … 2143 2176 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 2144 2177 cat > conftest.$ac_ext <<EOF 2145 #line 21 46"configure"2178 #line 2179 "configure" 2146 2179 #include "confdefs.h" 2147 2180 #include <stdlib.h> … … 2164 2197 else 2165 2198 cat > conftest.$ac_ext <<EOF 2166 #line 2 167"configure"2199 #line 2200 "configure" 2167 2200 #include "confdefs.h" 2168 2201 #include <ctype.h> … … 2175 2208 2176 2209 EOF 2177 if { (eval echo configure:2 178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2210 if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2178 2211 then 2179 2212 : … … 2202 2235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 2203 2236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 2204 echo "configure:22 05: checking for $ac_hdr" >&52237 echo "configure:2238: checking for $ac_hdr" >&5 2205 2238 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 2206 2239 echo $ac_n "(cached) $ac_c" 1>&6 2207 2240 else 2208 2241 cat > conftest.$ac_ext <<EOF 2209 #line 22 10"configure"2242 #line 2243 "configure" 2210 2243 #include "confdefs.h" 2211 2244 #include <$ac_hdr> 2212 2245 EOF 2213 2246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2214 { (eval echo configure:22 15: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2247 { (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2215 2248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2216 2249 if test -z "$ac_err"; then … … 2239 2272 2240 2273 cat > conftest.$ac_ext <<EOF 2241 #line 22 42"configure"2274 #line 2275 "configure" 2242 2275 #include "confdefs.h" 2243 2276 #include <stdio.h> … … 2254 2287 2255 2288 cat > conftest.$ac_ext <<EOF 2256 #line 22 57"configure"2289 #line 2290 "configure" 2257 2290 #include "confdefs.h" 2258 2291 #include <stdio.h> … … 2269 2302 2270 2303 cat > conftest.$ac_ext <<EOF 2271 #line 2 272"configure"2304 #line 2305 "configure" 2272 2305 #include "confdefs.h" 2273 2306 #include <sys/procfs.h> … … 2287 2320 # for constant arguments. Useless! 2288 2321 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 2289 echo "configure:2 290: checking for working alloca.h" >&52322 echo "configure:2323: checking for working alloca.h" >&5 2290 2323 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then 2291 2324 echo $ac_n "(cached) $ac_c" 1>&6 2292 2325 else 2293 2326 cat > conftest.$ac_ext <<EOF 2294 #line 2 295"configure"2327 #line 2328 "configure" 2295 2328 #include "confdefs.h" 2296 2329 #include <alloca.h> … … 2299 2332 ; return 0; } 2300 2333 EOF 2301 if { (eval echo configure:23 02: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2334 if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2302 2335 rm -rf conftest* 2303 2336 ac_cv_header_alloca_h=yes … … 2320 2353 2321 2354 echo $ac_n "checking for alloca""... $ac_c" 1>&6 2322 echo "configure:23 23: checking for alloca" >&52355 echo "configure:2356: checking for alloca" >&5 2323 2356 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then 2324 2357 echo $ac_n "(cached) $ac_c" 1>&6 2325 2358 else 2326 2359 cat > conftest.$ac_ext <<EOF 2327 #line 23 28"configure"2360 #line 2361 "configure" 2328 2361 #include "confdefs.h" 2329 2362 … … 2353 2386 ; return 0; } 2354 2387 EOF 2355 if { (eval echo configure:23 56: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2388 if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2356 2389 rm -rf conftest* 2357 2390 ac_cv_func_alloca_works=yes … … 2385 2418 2386 2419 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 2387 echo "configure:2 388: checking whether alloca needs Cray hooks" >&52420 echo "configure:2421: checking whether alloca needs Cray hooks" >&5 2388 2421 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then 2389 2422 echo $ac_n "(cached) $ac_c" 1>&6 2390 2423 else 2391 2424 cat > conftest.$ac_ext <<EOF 2392 #line 2 393"configure"2425 #line 2426 "configure" 2393 2426 #include "confdefs.h" 2394 2427 #if defined(CRAY) && ! defined(CRAY2) … … 2415 2448 for ac_func in _getb67 GETB67 getb67; do 2416 2449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2417 echo "configure:24 18: checking for $ac_func" >&52450 echo "configure:2451: checking for $ac_func" >&5 2418 2451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2419 2452 echo $ac_n "(cached) $ac_c" 1>&6 2420 2453 else 2421 2454 cat > conftest.$ac_ext <<EOF 2422 #line 24 23"configure"2455 #line 2456 "configure" 2423 2456 #include "confdefs.h" 2424 2457 /* System header to define __stub macros and hopefully few prototypes, … … 2443 2476 ; return 0; } 2444 2477 EOF 2445 if { (eval echo configure:24 46: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2478 if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2446 2479 rm -rf conftest* 2447 2480 eval "ac_cv_func_$ac_func=yes" … … 2470 2503 2471 2504 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 2472 echo "configure:2 473: checking stack direction for C alloca" >&52505 echo "configure:2506: checking stack direction for C alloca" >&5 2473 2506 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then 2474 2507 echo $ac_n "(cached) $ac_c" 1>&6 … … 2478 2511 else 2479 2512 cat > conftest.$ac_ext <<EOF 2480 #line 2 481"configure"2513 #line 2514 "configure" 2481 2514 #include "confdefs.h" 2482 2515 find_stack_direction () … … 2497 2530 } 2498 2531 EOF 2499 if { (eval echo configure:25 00: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2532 if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2500 2533 then 2501 2534 ac_cv_c_stack_direction=1 … … 2520 2553 if test $ac_cv_prog_gcc = yes; then 2521 2554 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 2522 echo "configure:25 23: checking whether ${CC-cc} needs -traditional" >&52555 echo "configure:2556: checking whether ${CC-cc} needs -traditional" >&5 2523 2556 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then 2524 2557 echo $ac_n "(cached) $ac_c" 1>&6 … … 2526 2559 ac_pattern="Autoconf.*'x'" 2527 2560 cat > conftest.$ac_ext <<EOF 2528 #line 25 29"configure"2561 #line 2562 "configure" 2529 2562 #include "confdefs.h" 2530 2563 #include <sgtty.h> … … 2544 2577 if test $ac_cv_prog_gcc_traditional = no; then 2545 2578 cat > conftest.$ac_ext <<EOF 2546 #line 25 47"configure"2579 #line 2580 "configure" 2547 2580 #include "confdefs.h" 2548 2581 #include <termio.h> … … 2566 2599 2567 2600 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 2568 echo "configure:2 569: checking return type of signal handlers" >&52601 echo "configure:2602: checking return type of signal handlers" >&5 2569 2602 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then 2570 2603 echo $ac_n "(cached) $ac_c" 1>&6 2571 2604 else 2572 2605 cat > conftest.$ac_ext <<EOF 2573 #line 2 574"configure"2606 #line 2607 "configure" 2574 2607 #include "confdefs.h" 2575 2608 #include <sys/types.h> … … 2588 2621 ; return 0; } 2589 2622 EOF 2590 if { (eval echo configure:2 591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then2623 if { (eval echo configure:2624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2591 2624 rm -rf conftest* 2592 2625 ac_cv_type_signal=void … … 2607 2640 2608 2641 echo $ac_n "checking for vprintf""... $ac_c" 1>&6 2609 echo "configure:26 10: checking for vprintf" >&52642 echo "configure:2643: checking for vprintf" >&5 2610 2643 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then 2611 2644 echo $ac_n "(cached) $ac_c" 1>&6 2612 2645 else 2613 2646 cat > conftest.$ac_ext <<EOF 2614 #line 26 15"configure"2647 #line 2648 "configure" 2615 2648 #include "confdefs.h" 2616 2649 /* System header to define __stub macros and hopefully few prototypes, … … 2635 2668 ; return 0; } 2636 2669 EOF 2637 if { (eval echo configure:26 38: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2670 if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2638 2671 rm -rf conftest* 2639 2672 eval "ac_cv_func_vprintf=yes" … … 2659 2692 if test "$ac_cv_func_vprintf" != yes; then 2660 2693 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 2661 echo "configure:26 62: checking for _doprnt" >&52694 echo "configure:2695: checking for _doprnt" >&5 2662 2695 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then 2663 2696 echo $ac_n "(cached) $ac_c" 1>&6 2664 2697 else 2665 2698 cat > conftest.$ac_ext <<EOF 2666 #line 2 667"configure"2699 #line 2700 "configure" 2667 2700 #include "confdefs.h" 2668 2701 /* System header to define __stub macros and hopefully few prototypes, … … 2687 2720 ; return 0; } 2688 2721 EOF 2689 if { (eval echo configure:2 690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2722 if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2690 2723 rm -rf conftest* 2691 2724 eval "ac_cv_func__doprnt=yes" … … 2714 2747 do 2715 2748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2716 echo "configure:27 17: checking for $ac_func" >&52749 echo "configure:2750: checking for $ac_func" >&5 2717 2750 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2718 2751 echo $ac_n "(cached) $ac_c" 1>&6 2719 2752 else 2720 2753 cat > conftest.$ac_ext <<EOF 2721 #line 27 22"configure"2754 #line 2755 "configure" 2722 2755 #include "confdefs.h" 2723 2756 /* System header to define __stub macros and hopefully few prototypes, … … 2742 2775 ; return 0; } 2743 2776 EOF 2744 if { (eval echo configure:27 45: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2777 if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2745 2778 rm -rf conftest* 2746 2779 eval "ac_cv_func_$ac_func=yes" … … 2769 2802 do 2770 2803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2771 echo "configure:2 772: checking for $ac_func" >&52804 echo "configure:2805: checking for $ac_func" >&5 2772 2805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2773 2806 echo $ac_n "(cached) $ac_c" 1>&6 2774 2807 else 2775 2808 cat > conftest.$ac_ext <<EOF 2776 #line 2 777"configure"2809 #line 2810 "configure" 2777 2810 #include "confdefs.h" 2778 2811 /* System header to define __stub macros and hopefully few prototypes, … … 2797 2830 ; return 0; } 2798 2831 EOF 2799 if { (eval echo configure:28 00: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2832 if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2800 2833 rm -rf conftest* 2801 2834 eval "ac_cv_func_$ac_func=yes" … … 2828 2861 # --------------------------------------------------------------------------- 2829 2862 echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6 2830 echo "configure:28 31: checking for HP-UX needing gmalloc" >&52863 echo "configure:2864: checking for HP-UX needing gmalloc" >&5 2831 2864 if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then 2832 2865 echo "$ac_t""yes" 1>&6 … … 2841 2874 do 2842 2875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2843 echo "configure:28 44: checking for $ac_func" >&52876 echo "configure:2877: checking for $ac_func" >&5 2844 2877 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2845 2878 echo $ac_n "(cached) $ac_c" 1>&6 2846 2879 else 2847 2880 cat > conftest.$ac_ext <<EOF 2848 #line 28 49"configure"2881 #line 2882 "configure" 2849 2882 #include "confdefs.h" 2850 2883 /* System header to define __stub macros and hopefully few prototypes, … … 2869 2902 ; return 0; } 2870 2903 EOF 2871 if { (eval echo configure:2 872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2904 if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2872 2905 rm -rf conftest* 2873 2906 eval "ac_cv_func_$ac_func=yes" … … 2896 2929 2897 2930 echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6 2898 echo "configure:2 899: checking if malloc debugging is wanted" >&52931 echo "configure:2932: checking if malloc debugging is wanted" >&5 2899 2932 # Check whether --with-dmalloc or --without-dmalloc was given. 2900 2933 if test "${with_dmalloc+set}" = set; then … … 2917 2950 2918 2951 echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6 2919 echo "configure:29 20: checking which of rx or regex is wanted" >&52952 echo "configure:2953: checking which of rx or regex is wanted" >&5 2920 2953 # Check whether --with-regex or --without-regex was given. 2921 2954 if test "${with_regex+set}" = set; then … … 2935 2968 echo "$ac_t""rx" 1>&6 2936 2969 echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6 2937 echo "configure:29 38: checking for re_rx_search" >&52970 echo "configure:2971: checking for re_rx_search" >&5 2938 2971 if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then 2939 2972 echo $ac_n "(cached) $ac_c" 1>&6 2940 2973 else 2941 2974 cat > conftest.$ac_ext <<EOF 2942 #line 29 43"configure"2975 #line 2976 "configure" 2943 2976 #include "confdefs.h" 2944 2977 /* System header to define __stub macros and hopefully few prototypes, … … 2963 2996 ; return 0; } 2964 2997 EOF 2965 if { (eval echo configure:29 66: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2998 if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2966 2999 rm -rf conftest* 2967 3000 eval "ac_cv_func_re_rx_search=yes" … … 3003 3036 3004 3037 echo $ac_n "checking "that the GDBM library is available"""... $ac_c" 1>&6 3005 echo "configure:30 06: checking "that the GDBM library is available"" >&53038 echo "configure:3039: checking "that the GDBM library is available"" >&5 3006 3039 cat > conftest.$ac_ext <<EOF 3007 #line 30 08"configure"3040 #line 3041 "configure" 3008 3041 #include "confdefs.h" 3009 3042 #include <gdbm.h> … … 3013 3046 ; return 0; } 3014 3047 EOF 3015 if { (eval echo configure:30 16: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3048 if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3016 3049 rm -rf conftest* 3017 3050 success=yes … … 3030 3063 3031 3064 echo $ac_n "checking "that Perl 5 is available"""... $ac_c" 1>&6 3032 echo "configure:30 33: checking "that Perl 5 is available"" >&53065 echo "configure:3066: checking "that Perl 5 is available"" >&5 3033 3066 success="no" 3034 3067 pl_path="$PATH" … … 3060 3093 success=no 3061 3094 echo $ac_n "checking "whether STL library has known faults"""... $ac_c" 1>&6 3062 echo "configure:30 63: checking "whether STL library has known faults"" >&53095 echo "configure:3096: checking "whether STL library has known faults"" >&5 3063 3096 3064 3097 cat > conftest.$ac_ext <<EOF 3065 #line 30 66"configure"3098 #line 3099 "configure" 3066 3099 #include "confdefs.h" 3067 3100 #include <vector> … … 3071 3104 ; return 0; } 3072 3105 EOF 3073 if { (eval echo configure:3 074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3106 if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3074 3107 rm -rf conftest* 3075 3108 success=yes … … 3082 3115 if test $success = "no"; then 3083 3116 cat > conftest.$ac_ext <<EOF 3084 #line 3 085"configure"3117 #line 3118 "configure" 3085 3118 #include "confdefs.h" 3086 3119 #include <vector.h> … … 3090 3123 ; return 0; } 3091 3124 EOF 3092 if { (eval echo configure:3 093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3125 if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3093 3126 rm -rf conftest* 3094 3127 success="yes" … … 3102 3135 if test $success = "no"; then 3103 3136 cat > conftest.$ac_ext <<EOF 3104 #line 31 05"configure"3137 #line 3138 "configure" 3105 3138 #include "confdefs.h" 3106 3139 #include <ospace\\std\\vector> … … 3110 3143 ; return 0; } 3111 3144 EOF 3112 if { (eval echo configure:31 13: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3145 if { (eval echo configure:3146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3113 3146 rm -rf conftest* 3114 3147 success="yes" … … 3131 3164 3132 3165 echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6 3133 echo "configure:31 34: checking for HP-UX needing gmalloc" >&53166 echo "configure:3167: checking for HP-UX needing gmalloc" >&5 3134 3167 if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then 3135 3168 echo "$ac_t""yes" 1>&6 … … 3144 3177 do 3145 3178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 3146 echo "configure:31 47: checking for $ac_func" >&53179 echo "configure:3180: checking for $ac_func" >&5 3147 3180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 3148 3181 echo $ac_n "(cached) $ac_c" 1>&6 3149 3182 else 3150 3183 cat > conftest.$ac_ext <<EOF 3151 #line 31 52"configure"3184 #line 3185 "configure" 3152 3185 #include "confdefs.h" 3153 3186 /* System header to define __stub macros and hopefully few prototypes, … … 3175 3208 ; return 0; } 3176 3209 EOF 3177 if { (eval echo configure:3 178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then3210 if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3178 3211 rm -rf conftest* 3179 3212 eval "ac_cv_func_$ac_func=yes" … … 3202 3235 3203 3236 echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6 3204 echo "configure:32 05: checking if malloc debugging is wanted" >&53237 echo "configure:3238: checking if malloc debugging is wanted" >&5 3205 3238 # Check whether --with-dmalloc or --without-dmalloc was given. 3206 3239 if test "${with_dmalloc+set}" = set; then … … 3223 3256 3224 3257 echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6 3225 echo "configure:32 26: checking which of rx or regex is wanted" >&53258 echo "configure:3259: checking which of rx or regex is wanted" >&5 3226 3259 # Check whether --with-regex or --without-regex was given. 3227 3260 if test "${with_regex+set}" = set; then … … 3241 3274 echo "$ac_t""rx" 1>&6 3242 3275 echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6 3243 echo "configure:32 44: checking for re_rx_search" >&53276 echo "configure:3277: checking for re_rx_search" >&5 3244 3277 if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then 3245 3278 echo $ac_n "(cached) $ac_c" 1>&6 3246 3279 else 3247 3280 cat > conftest.$ac_ext <<EOF 3248 #line 32 49"configure"3281 #line 3282 "configure" 3249 3282 #include "confdefs.h" 3250 3283 /* System header to define __stub macros and hopefully few prototypes, … … 3272 3305 ; return 0; } 3273 3306 EOF 3274 if { (eval echo configure:3 275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then3307 if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3275 3308 rm -rf conftest* 3276 3309 eval "ac_cv_func_re_rx_search=yes" … … 3447 3480 s%@VERSION@%$VERSION%g 3448 3481 s%@USE_FASTCGI@%$USE_FASTCGI%g 3482 s%@USE_CORBA@%$USE_CORBA%g 3483 s%@MICO_DIR@%$MICO_DIR%g 3449 3484 s%@CC@%$CC%g 3450 3485 s%@CXX@%$CXX%g -
trunk/gsdl/configure.in
r1722 r1860 11 11 AC_SUBST(VERSION) 12 12 13 dnl 14 dnl Set use of fast cgi 15 dnl 13 16 USE_FASTCGI=0 14 17 if test USE_FASTCGI = 1; then … … 16 19 AC_SUBST(USE_FASTCGI) 17 20 fi 21 22 23 dnl 24 dnl Set use of corba 25 dnl 26 AC_ARG_ENABLE(corba, [ --enable-corba Enable CORBA support], USE_CORBA=1, USE_CORBA=0) 27 AC_DEFINE(USE_CORBA) 28 AC_SUBST(USE_CORBA, $(USE_CORBA)) 29 30 AC_ARG_WITH(micodir, [ --with-micodir Use installed MICO directory], MICO_DIR=$enableval, MICO_DIR="default") 31 AC_DEFINE(MICO_DIR) 32 AC_SUBST(MICO_DIR, $(MICO_DIR)) 18 33 19 34 dnl Checks for programs. -
trunk/gsdl/lib/Makefile.in
r1283 r1860 28 28 AR = ar 29 29 CC = @CC@ 30 CPP = @CXX@ 30 31 #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual 31 32 CCFLAGS = @CFLAGS@ 33 MCFLAGS = @CFLAGS@ -Wall -Wunused 32 34 DEFS = @DEFS@ 33 INCLUDES = -I../packages/mg/lib 35 INCLUDES = -I../packages/mg/lib -I.. 36 MICO_DIR = @MICO_DIR@ 37 ifeq ($(MICO_DIR), default) 38 MICO_INC = -I../packages/mico/include 39 else 40 ifeq ($(MICO_DIR), yes) 41 MICO_INC = 42 else 43 MICO_INC = -I$(MICO_DIR) 44 endif 45 endif 46 MINCLUDES = -I. -I../packages/mg/lib $(MICO_INC) -I.. 34 47 RANLIB = @RANLIB@ 48 USE_CORBA = @USE_CORBA@ 35 49 36 50 COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 51 CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 52 53 ifneq ($(USE_CORBA), 0) 54 MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 55 else 56 MCOMPILE = $(COMPILE) 57 endif 37 58 38 59 .SUFFIXES: … … 43 64 .SUFFIXES: .cpp .o 44 65 .cpp.o: 45 $(COMPILE) $< 66 $(CPPCOMPILE) $< 67 68 .SUFFIXES: .mpp .o 69 .mpp.o: 70 $(MCOMPILE) $< 46 71 47 72 73 ifneq ($(USE_CORBA), 0) 74 CORBAHEADERS = \ 75 corbaconv_text_t.h corbatext_t.h 76 CORBASOURCES = \ 77 corbaiface.mpp corbatext_t.mpp corbaconv_text_t.mpp 78 CORBAOBJECTS = \ 79 corbaiface.o corbatext_t.o corbaconv_text_t.o 80 else 81 CORBAHEADERS = 82 CORBASOURCE = 83 CORBAOBJECTS = 84 endif 85 48 86 HEADERS = \ 49 cfgread.h fileutil.h gsdlunicode.h text_t.h \ 50 display.h gsdlconf.h gsdltimes.h gsdltools.h 87 cfgread.h fileutil.h gsdlunicode.h gsdltools.h text_t.h \ 88 display.h gsdlconf.h gsdltimes.h cnfgable.h cnfgator.h \ 89 $(CORBAHEADERS) 90 51 91 52 92 SOURCES = \ 53 cfgread.cpp fileutil.cpp text_t.cpp \ 54 display.cpp gsdlunicode.cpp gsdltimes.cpp gsdltools.cpp 93 cfgread.cpp fileutil.cpp text_t.cpp cnfgable.cpp \ 94 display.cpp gsdlunicode.cpp gsdltimes.cpp gsdltools.cpp \ 95 cnfgator.cpp $(CORBASOURCES) 55 96 56 97 OBJECTS = \ 57 cfgread.o fileutil.o text_t.o \ 58 display.o gsdlunicode.o gsdltimes.o gsdltools.o 98 cfgread.o fileutil.o text_t.o cnfgable.o \ 99 display.o gsdlunicode.o gsdltimes.o gsdltools.o \ 100 cnfgator.o $(CORBAOBJECTS) 59 101 60 102 61 103 all: gsdllib.a 62 104 105 corbaiface.mpp: corbaiface.idl 106 idl --c++-suffix=mpp $? 63 107 64 108 GSDLLIBOBJECTS = $(OBJECTS) … … 69 113 $(RANLIB) gsdllib.a 70 114 71 distclean:72 rm -f $(OBJECTS) gsdllib.a Makefile73 74 115 clean: 75 116 rm -f $(OBJECTS) gsdllib.a … … 79 120 depend: 80 121 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES) 122 123 124 125 -
trunk/gsdl/lib/display.cpp
r1495 r1860 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$ 25 * 24 26 *********************************************************************/ 25 27 28 /* 29 $Log$ 30 Revision 1.24 2001/01/25 18:26:44 cs025 31 Included CORBA branch for first time 32 33 Revision 1.17.2.1 2000/04/04 15:02:28 cs025 34 Corba first commit 35 36 Revision 1.17 2000/02/29 21:00:38 sjboddie 37 fixed some compiler warnings 38 39 Revision 1.16 1999/11/25 21:53:08 sjboddie 40 fixed bug in logout 41 42 Revision 1.15 1999/09/24 02:25:35 rjmcnab 43 removed limitation on the number of arguments that a macro can have 44 45 Revision 1.14 1999/09/07 04:57:41 sjboddie 46 added gpl notice 47 48 Revision 1.13 1999/08/31 07:59:11 rjmcnab 49 Generalised spaces to unicode spaces, added ability to automatically detect 50 whether the input file is Unicode or UTF-8 and read the file in the 51 appropriate way, and improved the error messages slightly. 52 53 Revision 1.12 1999/07/21 20:46:12 rjmcnab 54 fixed small bug 55 56 Revision 1.11 1999/07/21 07:26:30 rjmcnab 57 Added more operators to _If_, changed quoting of parameters so that 58 ' can be used to quote but it is removed, and made slight optimisation 59 so that macros that don't contain other macros aren't expanded. 60 61 Revision 1.10 1999/03/01 20:39:54 sjboddie 62 63 Added eq and ne functionality to _If_ 64 65 Revision 1.9 1999/03/01 01:18:09 sjboddie 66 67 Fixed bug in _If_ when value being tested was only one character 68 long (e.g. "0" or "1") 69 70 Revision 1.8 1999/02/28 23:15:29 rjmcnab 71 72 Made _If_ recognise 'false' and '0' as being false. 73 74 Revision 1.7 1999/02/08 01:26:11 rjmcnab 75 76 Improved the error reporting. 77 78 Revision 1.6 1999/01/19 08:30:23 rjmcnab 79 80 Added a method to determine whether a macro has been defined. 81 82 Revision 1.5 1999/01/19 01:38:12 rjmcnab 83 84 Made the source more portable. 85 86 Revision 1.4 1999/01/12 01:50:57 rjmcnab 87 88 Standard header. 89 90 Revision 1.3 1999/01/08 02:33:13 rjmcnab 91 92 Added standard header to source files. 93 94 */ 26 95 #include "display.h" 27 96 #include "gsdlunicode.h" … … 1565 1634 } 1566 1635 1636 // GRB: deal with remaining code properly as it faults 1637 return false; 1638 1567 1639 if (logout != NULL) { 1568 1640 (*logout) << text_t2ascii << "Warning: _" << -
trunk/gsdl/lib/text_t.cpp
r1310 r1860 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$ 25 * 24 26 *********************************************************************/ 27 28 /* 29 $Log$ 30 Revision 1.20 2001/01/25 18:26:44 cs025 31 Included CORBA branch for first time 32 33 Revision 1.15.2.2 2000/04/05 10:19:38 syeates 34 added automatic conversion to allow text_t's to be <<'ed to ostreams 35 36 Revision 1.15.2.1 2000/04/04 15:02:29 cs025 37 Corba first commit 38 39 Revision 1.15 1999/10/14 22:52:39 sjboddie 40 joinchar can join using text_t string now too 41 42 Revision 1.14 1999/09/24 02:30:03 rjmcnab 43 added function has_unicode_letdig 44 45 Revision 1.13 1999/09/07 04:57:43 sjboddie 46 added gpl notice 47 48 Revision 1.12 1999/08/31 08:04:41 rjmcnab 49 Fixed a small but hard to find bug in getcarr 50 51 Revision 1.11 1999/07/01 04:05:09 rjmcnab 52 Optimised append functions slightly and added a reserve function. 53 54 Revision 1.10 1999/04/26 03:58:03 sjboddie 55 added is_number function 56 57 Revision 1.9 1999/04/06 22:17:24 rjmcnab 58 Added splits and joins using text_tset. 59 60 Revision 1.8 1999/02/28 23:14:41 rjmcnab 61 62 Added uc and lc to convert to uppercase and lowercase. 63 64 Revision 1.7 1999/02/21 22:26:39 rjmcnab 65 66 Made getint() a constant function. 67 68 Revision 1.6 1999/02/03 01:13:26 sjboddie 69 70 Got interface to handle subcollections and language subcollections - 71 committed changes made to some of the collections 72 73 Revision 1.5 1999/01/19 01:38:14 rjmcnab 74 75 Made the source more portable. 76 77 Revision 1.4 1999/01/12 01:51:00 rjmcnab 78 79 Standard header. 80 81 Revision 1.3 1999/01/08 02:33:16 rjmcnab 82 83 Added standard header to source files. 84 85 */ 25 86 26 87 #include "text_t.h" … … 38 99 #endif 39 100 101 #ifdef HAVE_CONFIG_H 102 # ifdef __WIN32__ 103 # include "WIN32cfg.h" 104 # else 105 # include "config.h" 106 # endif 107 #endif 108 40 109 41 110 #include "unitool.h" … … 44 113 // text_t methods 45 114 //////////////////////////////////// 115 116 // new stream converter ... 117 ostream& operator<< (ostream &o, const text_t text) 118 { 119 text_t::const_iterator ithere = text.begin(); 120 text_t::const_iterator itend = text.end(); 121 122 while (ithere != itend) 123 { 124 if (*ithere < 256) 125 { 126 o << (unsigned char)(*ithere); 127 } 128 else 129 { 130 // put a space or a question mark depending on what 131 // the character is. Question marks tell the user that 132 // they are missing some information. 133 if (is_unicode_space (*ithere)) 134 o << ' '; 135 else 136 o << '?'; 137 } 138 ithere++; 139 } 140 141 return o; 142 } 46 143 47 144 text_t::text_t () … … 64 161 appendcstr (s); 65 162 } 163 66 164 67 165 void text_t::append (const text_t &t) … … 265 363 } 266 364 return first; 365 } 366 367 text_t::iterator findword (text_t::iterator first, text_t::iterator last, 368 const text_t& word) 369 { 370 text_t::const_iterator word_begin = word.begin(); 371 text_t::const_iterator word_end = word.end(); 372 373 while (first != last) 374 { 375 text_t::iterator char_match = first; 376 text_t::const_iterator word_here = word_begin; 377 while (word_here!=word_end) 378 { 379 if (*char_match != *word_here) 380 { 381 break; 382 } 383 char_match++; 384 word_here++; 385 } 386 if (word_here==word_end) 387 { 388 return first; 389 } 390 first++; 391 } 392 return last; // get to here only if there is no match 267 393 } 268 394 -
trunk/gsdl/lib/text_t.h
r1596 r1860 21 21 * along with this program; if not, write to the Free Software 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 * $Id$ 23 25 * 24 26 *********************************************************************/ … … 97 99 unsigned short getencoding () {return encoding;}; 98 100 101 usvector& text_as_usvector() { return text ; }; 102 const usvector& text_as_usvector() const { return text ; }; 103 99 104 // basic container support 100 105 iterator begin () {return text.begin();} … … 162 167 char *getcarr(size_type &len) const; 163 168 char *getcstr() const; 164 }; 165 169 170 }; 171 172 // new stream converter ... 173 ostream& operator<< (ostream &o, const text_t text); 166 174 167 175 inline text_t operator+(const text_t &t1, const text_t &t2) … … 216 224 text_t::iterator findchar (text_t::iterator first, text_t::iterator last, 217 225 unsigned short c); 226 227 text_t::iterator findword (text_t::iterator first, text_t::iterator last, 228 const text_t &word); 218 229 219 230 // get a string up to the next delimiter (which is skipped) -
trunk/gsdl/packages/Makefile
r1715 r1860 30 30 # clean, and distclean. 31 31 32 PACKAGEDIRS = unix/wv/wv-0.6.0-gs wget/wget-1.5.3yaz32 PACKAGEDIRS = wv #wget yaz 33 33 34 34 all: -
trunk/gsdl/packages/mg/src/text/bool_parser.c
r531 r1860 1 #ifndef lint 2 static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; 3 #endif 4 #define YYBYACC 1 5 #define YYMAJOR 1 6 #define YY MINOR 97 #define yyclearin (yychar=(-1)) 8 #define yyerrok (yyerrflag=0)9 #define YYRECOVERING (yyerrflag!=0) 10 # define YYPREFIX "yy"11 #line 25 "bool_parser.y" 1 2 /* A Bison parser, made from bool_parser.y 3 by GNU Bison version 1.27 4 */ 5 6 #define YYBISON 1 /* Identify Bison output. */ 7 8 #define TERM 257 9 10 #line 24 "bool_parser.y" 11 12 12 13 13 #include "sysfuncs.h" … … 48 48 static u_long invf_ptr; 49 49 static u_long invf_len; 50 #line 65 "bool_parser.y" 50 51 #line 66 "bool_parser.y" 51 52 typedef union { 52 53 char *text; 53 54 bool_tree_node *node; 54 55 } YYSTYPE; 55 #line 55 "y.tab.c" 56 #define TERM 257 57 #define YYERRCODE 256 58 short yylhs[] = { -1, 59 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 60 4, 4, 61 }; 62 short yylen[] = { 2, 63 1, 1, 3, 1, 1, 1, 2, 3, 2, 1, 64 3, 1, 65 }; 66 short yydefred[] = { 0, 67 2, 0, 4, 5, 0, 0, 6, 10, 0, 0, 68 0, 7, 0, 9, 0, 3, 8, 0, 69 }; 70 short yydgoto[] = { 6, 71 7, 8, 9, 10, 72 }; 73 short yysindex[] = { -32, 74 0, -32, 0, 0, -32, 0, 0, 0, -33, -118, 75 -37, 0, -32, 0, -32, 0, 0, -33, 76 }; 77 short yyrindex[] = { 0, 78 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 79 0, 0, 0, 0, 0, 0, 0, 3, 80 }; 81 short yygindex[] = { 0, 82 0, 6, -2, 14, 83 }; 84 #define YYTABLESIZE 225 85 short yytable[] = { 5, 86 5, 12, 11, 16, 13, 15, 2, 2, 3, 3, 87 12, 1, 18, 0, 14, 11, 0, 0, 17, 0, 88 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90 0, 0, 12, 11, 0, 0, 0, 0, 0, 0, 91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 95 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98 0, 0, 0, 0, 0, 12, 11, 0, 0, 0, 99 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108 0, 0, 0, 1, 1, 109 }; 110 short yycheck[] = { 33, 111 33, 0, 0, 41, 38, 124, 40, 40, 42, 42, 112 5, 0, 15, -1, 9, 2, -1, -1, 13, -1, 113 -1, -1, -1, 18, -1, -1, -1, -1, -1, -1, 114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 115 -1, -1, 41, 41, -1, -1, -1, -1, -1, -1, 116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117 -1, 95, 95, -1, -1, -1, -1, -1, -1, -1, 118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 119 -1, -1, -1, -1, -1, -1, 124, -1, -1, -1, 120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123 -1, -1, -1, -1, -1, 124, 124, -1, -1, -1, 124 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 126 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 127 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 128 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 132 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 133 -1, -1, -1, 257, 257, 134 }; 135 #define YYFINAL 6 136 #ifndef YYDEBUG 137 #define YYDEBUG 0 138 #endif 139 #define YYMAXTOKEN 257 140 #if YYDEBUG 141 char *yyname[] = { 142 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 143 "'!'",0,0,0,0,"'&'",0,"'('","')'","'*'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 144 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'_'",0,0,0,0,0, 145 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'|'",0,0,0,0,0,0,0,0,0,0,0,0,0,0, 146 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 147 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 148 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 149 "TERM", 150 }; 151 char *yyrule[] = { 152 "$accept : query", 153 "query : or", 154 "term : TERM", 155 "term : '(' or ')'", 156 "term : '*'", 157 "term : '_'", 158 "not : term", 159 "not : '!' not", 160 "and : and '&' not", 161 "and : and not", 162 "and : not", 163 "or : or '|' and", 164 "or : and", 165 }; 166 #endif 167 #ifdef YYSTACKSIZE 56 #include <stdio.h> 57 58 #ifndef __cplusplus 59 #ifndef __STDC__ 60 #define const 61 #endif 62 #endif 63 64 65 66 #define YYFINAL 20 67 #define YYFLAG -32768 68 #define YYNTBASE 11 69 70 #define YYTRANSLATE(x) ((unsigned)(x) <= 257 ? yytranslate[x] : 16) 71 72 static const char yytranslate[] = { 0, 73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 75 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 76 2, 2, 8, 2, 2, 2, 2, 9, 2, 4, 77 5, 6, 2, 2, 2, 2, 2, 2, 2, 2, 78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 79 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 80 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 81 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 82 2, 2, 2, 2, 7, 2, 2, 2, 2, 2, 83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 84 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85 2, 2, 2, 10, 2, 2, 2, 2, 2, 2, 86 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 87 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 88 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 90 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 91 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 94 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 95 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 97 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 98 2, 2, 2, 2, 2, 1, 3 99 }; 100 101 #if YYDEBUG != 0 102 static const short yyprhs[] = { 0, 103 0, 2, 4, 8, 10, 12, 14, 17, 21, 24, 104 26, 30 105 }; 106 107 static const short yyrhs[] = { 15, 108 0, 3, 0, 4, 15, 5, 0, 6, 0, 7, 109 0, 12, 0, 8, 13, 0, 14, 9, 13, 0, 110 14, 13, 0, 13, 0, 15, 10, 14, 0, 14, 111 0 112 }; 113 114 #endif 115 116 #if YYDEBUG != 0 117 static const short yyrline[] = { 0, 118 76, 80, 81, 82, 83, 86, 87, 90, 91, 92, 119 95, 96 120 }; 121 #endif 122 123 124 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) 125 126 static const char * const yytname[] = { "$","error","$undefined.","TERM","'('", 127 "')'","'*'","'_'","'!'","'&'","'|'","query","term","not","and","or", NULL 128 }; 129 #endif 130 131 static const short yyr1[] = { 0, 132 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 133 15, 15 134 }; 135 136 static const short yyr2[] = { 0, 137 1, 1, 3, 1, 1, 1, 2, 3, 2, 1, 138 3, 1 139 }; 140 141 static const short yydefact[] = { 0, 142 2, 0, 4, 5, 0, 6, 10, 12, 1, 0, 143 7, 0, 9, 0, 3, 8, 11, 0, 0, 0 144 }; 145 146 static const short yydefgoto[] = { 18, 147 6, 7, 8, 9 148 }; 149 150 static const short yypact[] = { 10, 151 -32768, 10,-32768,-32768, 10,-32768,-32768, 2, -9, 14, 152 -32768, 10,-32768, 10,-32768,-32768, 2, 4, 15,-32768 153 }; 154 155 static const short yypgoto[] = {-32768, 156 -32768, -5, -12, 18 157 }; 158 159 160 #define YYLAST 24 161 162 163 static const short yytable[] = { 11, 164 14, 17, 13, 19, 1, 2, 16, 3, 4, 5, 165 12, 13, 1, 2, 20, 3, 4, 5, 15, 10, 166 0, 0, 0, 14 167 }; 168 169 static const short yycheck[] = { 5, 170 10, 14, 8, 0, 3, 4, 12, 6, 7, 8, 171 9, 17, 3, 4, 0, 6, 7, 8, 5, 2, 172 -1, -1, -1, 10 173 }; 174 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 175 #line 3 "/usr/lib/bison.simple" 176 /* This file comes from bison-1.27. */ 177 178 /* Skeleton output parser for bison, 179 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. 180 181 This program is free software; you can redistribute it and/or modify 182 it under the terms of the GNU General Public License as published by 183 the Free Software Foundation; either version 2, or (at your option) 184 any later version. 185 186 This program is distributed in the hope that it will be useful, 187 but WITHOUT ANY WARRANTY; without even the implied warranty of 188 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 189 GNU General Public License for more details. 190 191 You should have received a copy of the GNU General Public License 192 along with this program; if not, write to the Free Software 193 Foundation, Inc., 59 Temple Place - Suite 330, 194 Boston, MA 02111-1307, USA. */ 195 196 /* As a special exception, when this file is copied by Bison into a 197 Bison output file, you may use that output file without restriction. 198 This special exception was added by the Free Software Foundation 199 in version 1.24 of Bison. */ 200 201 /* This is the parser code that is written into each bison parser 202 when the %semantic_parser declaration is not specified in the grammar. 203 It was written by Richard Stallman by simplifying the hairy parser 204 used when %semantic_parser is specified. */ 205 206 #ifndef YYSTACK_USE_ALLOCA 207 #ifdef alloca 208 #define YYSTACK_USE_ALLOCA 209 #else /* alloca not defined */ 210 #ifdef __GNUC__ 211 #define YYSTACK_USE_ALLOCA 212 #define alloca __builtin_alloca 213 #else /* not GNU C. */ 214 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) 215 #define YYSTACK_USE_ALLOCA 216 #include <alloca.h> 217 #else /* not sparc */ 218 /* We think this test detects Watcom and Microsoft C. */ 219 /* This used to test MSDOS, but that is a bad idea 220 since that symbol is in the user namespace. */ 221 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) 222 #if 0 /* No need for malloc.h, which pollutes the namespace; 223 instead, just don't use alloca. */ 224 #include <malloc.h> 225 #endif 226 #else /* not MSDOS, or __TURBOC__ */ 227 #if defined(_AIX) 228 /* I don't know what this was needed for, but it pollutes the namespace. 229 So I turned it off. rms, 2 May 1997. */ 230 /* #include <malloc.h> */ 231 #pragma alloca 232 #define YYSTACK_USE_ALLOCA 233 #else /* not MSDOS, or __TURBOC__, or _AIX */ 234 #if 0 235 #ifdef __hpux /* [email protected] says this works for HPUX 9.05 and up, 236 and on HPUX 10. Eventually we can turn this on. */ 237 #define YYSTACK_USE_ALLOCA 238 #define alloca __builtin_alloca 239 #endif /* __hpux */ 240 #endif 241 #endif /* not _AIX */ 242 #endif /* not MSDOS, or __TURBOC__ */ 243 #endif /* not sparc */ 244 #endif /* not GNU C */ 245 #endif /* alloca not defined */ 246 #endif /* YYSTACK_USE_ALLOCA not defined */ 247 248 #ifdef YYSTACK_USE_ALLOCA 249 #define YYSTACK_ALLOC alloca 250 #else 251 #define YYSTACK_ALLOC malloc 252 #endif 253 254 /* Note: there must be only one dollar sign in this file. 255 It is replaced by the list of actions, each action 256 as one case of the switch. */ 257 258 #define yyerrok (yyerrstatus = 0) 259 #define yyclearin (yychar = YYEMPTY) 260 #define YYEMPTY -2 261 #define YYEOF 0 262 #define YYACCEPT goto yyacceptlab 263 #define YYABORT goto yyabortlab 264 #define YYERROR goto yyerrlab1 265 /* Like YYERROR except do call yyerror. 266 This remains here temporarily to ease the 267 transition to the new meaning of YYERROR, for GCC. 268 Once GCC version 2 has supplanted version 1, this can go. */ 269 #define YYFAIL goto yyerrlab 270 #define YYRECOVERING() (!!yyerrstatus) 271 #define YYBACKUP(token, value) \ 272 do \ 273 if (yychar == YYEMPTY && yylen == 1) \ 274 { yychar = (token), yylval = (value); \ 275 yychar1 = YYTRANSLATE (yychar); \ 276 YYPOPSTACK; \ 277 goto yybackup; \ 278 } \ 279 else \ 280 { yyerror ("syntax error: cannot back up"); YYERROR; } \ 281 while (0) 282 283 #define YYTERROR 1 284 #define YYERRCODE 256 285 286 #ifndef YYPURE 287 #define YYLEX yylex() 288 #endif 289 290 #ifdef YYPURE 291 #ifdef YYLSP_NEEDED 292 #ifdef YYLEX_PARAM 293 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) 294 #else 295 #define YYLEX yylex(&yylval, &yylloc) 296 #endif 297 #else /* not YYLSP_NEEDED */ 298 #ifdef YYLEX_PARAM 299 #define YYLEX yylex(&yylval, YYLEX_PARAM) 300 #else 301 #define YYLEX yylex(&yylval) 302 #endif 303 #endif /* not YYLSP_NEEDED */ 304 #endif 305 306 /* If nonreentrant, generate the variables here */ 307 308 #ifndef YYPURE 309 310 int yychar; /* the lookahead symbol */ 311 YYSTYPE yylval; /* the semantic value of the */ 312 /* lookahead symbol */ 313 314 #ifdef YYLSP_NEEDED 315 YYLTYPE yylloc; /* location data for the lookahead */ 316 /* symbol */ 317 #endif 318 319 int yynerrs; /* number of parse errors so far */ 320 #endif /* not YYPURE */ 321 322 #if YYDEBUG != 0 323 int yydebug; /* nonzero means print parse trace */ 324 /* Since this is uninitialized, it does not stop multiple parsers 325 from coexisting. */ 326 #endif 327 328 /* YYINITDEPTH indicates the initial size of the parser's stacks */ 329 330 #ifndef YYINITDEPTH 331 #define YYINITDEPTH 200 332 #endif 333 334 /* YYMAXDEPTH is the maximum size the stacks can grow to 335 (effective only if the built-in stack extension method is used). */ 336 337 #if YYMAXDEPTH == 0 168 338 #undef YYMAXDEPTH 169 #define YYMAXDEPTH YYSTACKSIZE 339 #endif 340 341 #ifndef YYMAXDEPTH 342 #define YYMAXDEPTH 10000 343 #endif 344 345 346 /* Define __yy_memcpy. Note that the size argument 347 should be passed with type unsigned int, because that is what the non-GCC 348 definitions require. With GCC, __builtin_memcpy takes an arg 349 of type size_t, but it can handle unsigned int. */ 350 351 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ 352 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) 353 #else /* not GNU C or C++ */ 354 #ifndef __cplusplus 355 356 /* This is the most reliable way to avoid incompatibilities 357 in available built-in functions on various systems. */ 358 static void 359 __yy_memcpy (to, from, count) 360 char *to; 361 char *from; 362 unsigned int count; 363 { 364 register char *f = from; 365 register char *t = to; 366 register int i = count; 367 368 while (i-- > 0) 369 *t++ = *f++; 370 } 371 372 #else /* __cplusplus */ 373 374 /* This is the most reliable way to avoid incompatibilities 375 in available built-in functions on various systems. */ 376 static void 377 __yy_memcpy (char *to, char *from, unsigned int count) 378 { 379 register char *t = to; 380 register char *f = from; 381 register int i = count; 382 383 while (i-- > 0) 384 *t++ = *f++; 385 } 386 387 #endif 388 #endif 389 390 391 #line 216 "/usr/lib/bison.simple" 392 393 /* The user can define YYPARSE_PARAM as the name of an argument to be passed 394 into yyparse. The argument should have type void *. 395 It should actually point to an object. 396 Grammar actions can access the variable by casting it 397 to the proper pointer type. */ 398 399 #ifdef YYPARSE_PARAM 400 #ifdef __cplusplus 401 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 402 #define YYPARSE_PARAM_DECL 403 #else /* not __cplusplus */ 404 #define YYPARSE_PARAM_ARG YYPARSE_PARAM 405 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 406 #endif /* not __cplusplus */ 407 #else /* not YYPARSE_PARAM */ 408 #define YYPARSE_PARAM_ARG 409 #define YYPARSE_PARAM_DECL 410 #endif /* not YYPARSE_PARAM */ 411 412 /* Prevent warning if -Wstrict-prototypes. */ 413 #ifdef __GNUC__ 414 #ifdef YYPARSE_PARAM 415 int yyparse (void *); 170 416 #else 171 #ifdef YYMAXDEPTH 172 #define YYSTACKSIZE YYMAXDEPTH 417 int yyparse (void); 418 #endif 419 #endif 420 421 int 422 yyparse(YYPARSE_PARAM_ARG) 423 YYPARSE_PARAM_DECL 424 { 425 register int yystate; 426 register int yyn; 427 register short *yyssp; 428 register YYSTYPE *yyvsp; 429 int yyerrstatus; /* number of tokens to shift before error messages enabled */ 430 int yychar1 = 0; /* lookahead token as an internal (translated) token number */ 431 432 short yyssa[YYINITDEPTH]; /* the state stack */ 433 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ 434 435 short *yyss = yyssa; /* refer to the stacks thru separate pointers */ 436 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ 437 438 #ifdef YYLSP_NEEDED 439 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ 440 YYLTYPE *yyls = yylsa; 441 YYLTYPE *yylsp; 442 443 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 173 444 #else 174 #define YYSTACKSIZE 500 175 #define YYMAXDEPTH 500 176 #endif 177 #endif 178 int yydebug; 179 int yynerrs; 180 int yyerrflag; 181 int yychar; 182 short *yyssp; 183 YYSTYPE *yyvsp; 184 YYSTYPE yyval; 185 YYSTYPE yylval; 186 short yyss[YYSTACKSIZE]; 187 YYSTYPE yyvs[YYSTACKSIZE]; 188 #define yystacksize YYSTACKSIZE 445 #define YYPOPSTACK (yyvsp--, yyssp--) 446 #endif 447 448 int yystacksize = YYINITDEPTH; 449 int yyfree_stacks = 0; 450 451 #ifdef YYPURE 452 int yychar; 453 YYSTYPE yylval; 454 int yynerrs; 455 #ifdef YYLSP_NEEDED 456 YYLTYPE yylloc; 457 #endif 458 #endif 459 460 YYSTYPE yyval; /* the variable used to return */ 461 /* semantic values from the action */ 462 /* routines */ 463 464 int yylen; 465 466 #if YYDEBUG != 0 467 if (yydebug) 468 fprintf(stderr, "Starting parse\n"); 469 #endif 470 471 yystate = 0; 472 yyerrstatus = 0; 473 yynerrs = 0; 474 yychar = YYEMPTY; /* Cause a token to be read. */ 475 476 /* Initialize stack pointers. 477 Waste one element of value and location stack 478 so that they stay on the same level as the state stack. 479 The wasted elements are never initialized. */ 480 481 yyssp = yyss - 1; 482 yyvsp = yyvs; 483 #ifdef YYLSP_NEEDED 484 yylsp = yyls; 485 #endif 486 487 /* Push a new state, which is found in yystate . */ 488 /* In all cases, when you get here, the value and location stacks 489 have just been pushed. so pushing a state here evens the stacks. */ 490 yynewstate: 491 492 *++yyssp = yystate; 493 494 if (yyssp >= yyss + yystacksize - 1) 495 { 496 /* Give user a chance to reallocate the stack */ 497 /* Use copies of these so that the &'s don't force the real ones into memory. */ 498 YYSTYPE *yyvs1 = yyvs; 499 short *yyss1 = yyss; 500 #ifdef YYLSP_NEEDED 501 YYLTYPE *yyls1 = yyls; 502 #endif 503 504 /* Get the current used size of the three stacks, in elements. */ 505 int size = yyssp - yyss + 1; 506 507 #ifdef yyoverflow 508 /* Each stack pointer address is followed by the size of 509 the data in use in that stack, in bytes. */ 510 #ifdef YYLSP_NEEDED 511 /* This used to be a conditional around just the two extra args, 512 but that might be undefined if yyoverflow is a macro. */ 513 yyoverflow("parser stack overflow", 514 &yyss1, size * sizeof (*yyssp), 515 &yyvs1, size * sizeof (*yyvsp), 516 &yyls1, size * sizeof (*yylsp), 517 &yystacksize); 518 #else 519 yyoverflow("parser stack overflow", 520 &yyss1, size * sizeof (*yyssp), 521 &yyvs1, size * sizeof (*yyvsp), 522 &yystacksize); 523 #endif 524 525 yyss = yyss1; yyvs = yyvs1; 526 #ifdef YYLSP_NEEDED 527 yyls = yyls1; 528 #endif 529 #else /* no yyoverflow */ 530 /* Extend the stack our own way. */ 531 if (yystacksize >= YYMAXDEPTH) 532 { 533 yyerror("parser stack overflow"); 534 if (yyfree_stacks) 535 { 536 free (yyss); 537 free (yyvs); 538 #ifdef YYLSP_NEEDED 539 free (yyls); 540 #endif 541 } 542 return 2; 543 } 544 yystacksize *= 2; 545 if (yystacksize > YYMAXDEPTH) 546 yystacksize = YYMAXDEPTH; 547 #ifndef YYSTACK_USE_ALLOCA 548 yyfree_stacks = 1; 549 #endif 550 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); 551 __yy_memcpy ((char *)yyss, (char *)yyss1, 552 size * (unsigned int) sizeof (*yyssp)); 553 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); 554 __yy_memcpy ((char *)yyvs, (char *)yyvs1, 555 size * (unsigned int) sizeof (*yyvsp)); 556 #ifdef YYLSP_NEEDED 557 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); 558 __yy_memcpy ((char *)yyls, (char *)yyls1, 559 size * (unsigned int) sizeof (*yylsp)); 560 #endif 561 #endif /* no yyoverflow */ 562 563 yyssp = yyss + size - 1; 564 yyvsp = yyvs + size - 1; 565 #ifdef YYLSP_NEEDED 566 yylsp = yyls + size - 1; 567 #endif 568 569 #if YYDEBUG != 0 570 if (yydebug) 571 fprintf(stderr, "Stack size increased to %d\n", yystacksize); 572 #endif 573 574 if (yyssp >= yyss + yystacksize - 1) 575 YYABORT; 576 } 577 578 #if YYDEBUG != 0 579 if (yydebug) 580 fprintf(stderr, "Entering state %d\n", yystate); 581 #endif 582 583 goto yybackup; 584 yybackup: 585 586 /* Do appropriate processing given the current state. */ 587 /* Read a lookahead token if we need one and don't already have one. */ 588 /* yyresume: */ 589 590 /* First try to decide what to do without reference to lookahead token. */ 591 592 yyn = yypact[yystate]; 593 if (yyn == YYFLAG) 594 goto yydefault; 595 596 /* Not known => get a lookahead token if don't already have one. */ 597 598 /* yychar is either YYEMPTY or YYEOF 599 or a valid token in external form. */ 600 601 if (yychar == YYEMPTY) 602 { 603 #if YYDEBUG != 0 604 if (yydebug) 605 fprintf(stderr, "Reading a token: "); 606 #endif 607 yychar = YYLEX; 608 } 609 610 /* Convert token to internal form (in yychar1) for indexing tables with */ 611 612 if (yychar <= 0) /* This means end of input. */ 613 { 614 yychar1 = 0; 615 yychar = YYEOF; /* Don't call YYLEX any more */ 616 617 #if YYDEBUG != 0 618 if (yydebug) 619 fprintf(stderr, "Now at end of input.\n"); 620 #endif 621 } 622 else 623 { 624 yychar1 = YYTRANSLATE(yychar); 625 626 #if YYDEBUG != 0 627 if (yydebug) 628 { 629 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); 630 /* Give the individual parser a way to print the precise meaning 631 of a token, for further debugging info. */ 632 #ifdef YYPRINT 633 YYPRINT (stderr, yychar, yylval); 634 #endif 635 fprintf (stderr, ")\n"); 636 } 637 #endif 638 } 639 640 yyn += yychar1; 641 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) 642 goto yydefault; 643 644 yyn = yytable[yyn]; 645 646 /* yyn is what to do for this token type in this state. 647 Negative => reduce, -yyn is rule number. 648 Positive => shift, yyn is new state. 649 New state is final state => don't bother to shift, 650 just return success. 651 0, or most negative number => error. */ 652 653 if (yyn < 0) 654 { 655 if (yyn == YYFLAG) 656 goto yyerrlab; 657 yyn = -yyn; 658 goto yyreduce; 659 } 660 else if (yyn == 0) 661 goto yyerrlab; 662 663 if (yyn == YYFINAL) 664 YYACCEPT; 665 666 /* Shift the lookahead token. */ 667 668 #if YYDEBUG != 0 669 if (yydebug) 670 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); 671 #endif 672 673 /* Discard the token being shifted unless it is eof. */ 674 if (yychar != YYEOF) 675 yychar = YYEMPTY; 676 677 *++yyvsp = yylval; 678 #ifdef YYLSP_NEEDED 679 *++yylsp = yylloc; 680 #endif 681 682 /* count tokens shifted since error; after three, turn off error status. */ 683 if (yyerrstatus) yyerrstatus--; 684 685 yystate = yyn; 686 goto yynewstate; 687 688 /* Do the default action for the current state. */ 689 yydefault: 690 691 yyn = yydefact[yystate]; 692 if (yyn == 0) 693 goto yyerrlab; 694 695 /* Do a reduction. yyn is the number of a rule to reduce with. */ 696 yyreduce: 697 yylen = yyr2[yyn]; 698 if (yylen > 0) 699 yyval = yyvsp[1-yylen]; /* implement default value of the action */ 700 701 #if YYDEBUG != 0 702 if (yydebug) 703 { 704 int i; 705 706 fprintf (stderr, "Reducing via rule %d (line %d), ", 707 yyn, yyrline[yyn]); 708 709 /* Print the symbols being reduced, and their result. */ 710 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) 711 fprintf (stderr, "%s ", yytname[yyrhs[i]]); 712 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); 713 } 714 #endif 715 716 717 switch (yyn) { 718 719 case 1: 720 #line 76 "bool_parser.y" 721 { tree_base = yyvsp[0].node;; 722 break;} 723 case 2: 724 #line 80 "bool_parser.y" 725 { yyval.node = CreateBoolTermNode(term_list, yyvsp[0].text, 1, word_num, count, doc_count, invf_ptr, invf_len, stemmer_num); ; 726 break;} 727 case 3: 728 #line 81 "bool_parser.y" 729 { yyval.node = yyvsp[-1].node; ; 730 break;} 731 case 4: 732 #line 82 "bool_parser.y" 733 { yyval.node = CreateBoolTreeNode(N_all, NULL, NULL); ; 734 break;} 735 case 5: 736 #line 83 "bool_parser.y" 737 { yyval.node = CreateBoolTreeNode(N_none, NULL, NULL); ; 738 break;} 739 case 7: 740 #line 87 "bool_parser.y" 741 { yyval.node = CreateBoolTreeNode(N_not, yyvsp[0].node, NULL); ; 742 break;} 743 case 8: 744 #line 90 "bool_parser.y" 745 { yyval.node = CreateBoolTreeNode(N_and, yyvsp[-2].node, yyvsp[0].node); ; 746 break;} 747 case 9: 748 #line 91 "bool_parser.y" 749 { yyval.node = CreateBoolTreeNode(N_and, yyvsp[-1].node, yyvsp[0].node); ; 750 break;} 751 case 11: 752 #line 95 "bool_parser.y" 753 { yyval.node = CreateBoolTreeNode(N_or, yyvsp[-2].node, yyvsp[0].node); ; 754 break;} 755 } 756 /* the action file gets copied in in place of this dollarsign */ 757 #line 542 "/usr/lib/bison.simple" 758 759 760 yyvsp -= yylen; 761 yyssp -= yylen; 762 #ifdef YYLSP_NEEDED 763 yylsp -= yylen; 764 #endif 765 766 #if YYDEBUG != 0 767 if (yydebug) 768 { 769 short *ssp1 = yyss - 1; 770 fprintf (stderr, "state stack now"); 771 while (ssp1 != yyssp) 772 fprintf (stderr, " %d", *++ssp1); 773 fprintf (stderr, "\n"); 774 } 775 #endif 776 777 *++yyvsp = yyval; 778 779 #ifdef YYLSP_NEEDED 780 yylsp++; 781 if (yylen == 0) 782 { 783 yylsp->first_line = yylloc.first_line; 784 yylsp->first_column = yylloc.first_column; 785 yylsp->last_line = (yylsp-1)->last_line; 786 yylsp->last_column = (yylsp-1)->last_column; 787 yylsp->text = 0; 788 } 789 else 790 { 791 yylsp->last_line = (yylsp+yylen-1)->last_line; 792 yylsp->last_column = (yylsp+yylen-1)->last_column; 793 } 794 #endif 795 796 /* Now "shift" the result of the reduction. 797 Determine what state that goes to, 798 based on the state we popped back to 799 and the rule number reduced by. */ 800 801 yyn = yyr1[yyn]; 802 803 yystate = yypgoto[yyn - YYNTBASE] + *yyssp; 804 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) 805 yystate = yytable[yystate]; 806 else 807 yystate = yydefgoto[yyn - YYNTBASE]; 808 809 goto yynewstate; 810 811 yyerrlab: /* here on detecting error */ 812 813 if (! yyerrstatus) 814 /* If not already recovering from an error, report this error. */ 815 { 816 ++yynerrs; 817 818 #ifdef YYERROR_VERBOSE 819 yyn = yypact[yystate]; 820 821 if (yyn > YYFLAG && yyn < YYLAST) 822 { 823 int size = 0; 824 char *msg; 825 int x, count; 826 827 count = 0; 828 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ 829 for (x = (yyn < 0 ? -yyn : 0); 830 x < (sizeof(yytname) / sizeof(char *)); x++) 831 if (yycheck[x + yyn] == x) 832 size += strlen(yytname[x]) + 15, count++; 833 msg = (char *) malloc(size + 15); 834 if (msg != 0) 835 { 836 strcpy(msg, "parse error"); 837 838 if (count < 5) 839 { 840 count = 0; 841 for (x = (yyn < 0 ? -yyn : 0); 842 x < (sizeof(yytname) / sizeof(char *)); x++) 843 if (yycheck[x + yyn] == x) 844 { 845 strcat(msg, count == 0 ? ", expecting `" : " or `"); 846 strcat(msg, yytname[x]); 847 strcat(msg, "'"); 848 count++; 849 } 850 } 851 yyerror(msg); 852 free(msg); 853 } 854 else 855 yyerror ("parse error; also virtual memory exceeded"); 856 } 857 else 858 #endif /* YYERROR_VERBOSE */ 859 yyerror("parse error"); 860 } 861 862 goto yyerrlab1; 863 yyerrlab1: /* here on error raised explicitly by an action */ 864 865 if (yyerrstatus == 3) 866 { 867 /* if just tried and failed to reuse lookahead token after an error, discard it. */ 868 869 /* return failure if at end of input */ 870 if (yychar == YYEOF) 871 YYABORT; 872 873 #if YYDEBUG != 0 874 if (yydebug) 875 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); 876 #endif 877 878 yychar = YYEMPTY; 879 } 880 881 /* Else will try to reuse lookahead token 882 after shifting the error token. */ 883 884 yyerrstatus = 3; /* Each real token shifted decrements this */ 885 886 goto yyerrhandle; 887 888 yyerrdefault: /* current state does not do anything special for the error token. */ 889 890 #if 0 891 /* This is wrong; only states that explicitly want error tokens 892 should shift them. */ 893 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ 894 if (yyn) goto yydefault; 895 #endif 896 897 yyerrpop: /* pop the current state because it cannot handle the error token */ 898 899 if (yyssp == yyss) YYABORT; 900 yyvsp--; 901 yystate = *--yyssp; 902 #ifdef YYLSP_NEEDED 903 yylsp--; 904 #endif 905 906 #if YYDEBUG != 0 907 if (yydebug) 908 { 909 short *ssp1 = yyss - 1; 910 fprintf (stderr, "Error: state stack now"); 911 while (ssp1 != yyssp) 912 fprintf (stderr, " %d", *++ssp1); 913 fprintf (stderr, "\n"); 914 } 915 #endif 916 917 yyerrhandle: 918 919 yyn = yypact[yystate]; 920 if (yyn == YYFLAG) 921 goto yyerrdefault; 922 923 yyn += YYTERROR; 924 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) 925 goto yyerrdefault; 926 927 yyn = yytable[yyn]; 928 if (yyn < 0) 929 { 930 if (yyn == YYFLAG) 931 goto yyerrpop; 932 yyn = -yyn; 933 goto yyreduce; 934 } 935 else if (yyn == 0) 936 goto yyerrpop; 937 938 if (yyn == YYFINAL) 939 YYACCEPT; 940 941 #if YYDEBUG != 0 942 if (yydebug) 943 fprintf(stderr, "Shifting error token, "); 944 #endif 945 946 *++yyvsp = yylval; 947 #ifdef YYLSP_NEEDED 948 *++yylsp = yylloc; 949 #endif 950 951 yystate = yyn; 952 goto yynewstate; 953 954 yyacceptlab: 955 /* YYACCEPT comes here. */ 956 if (yyfree_stacks) 957 { 958 free (yyss); 959 free (yyvs); 960 #ifdef YYLSP_NEEDED 961 free (yyls); 962 #endif 963 } 964 return 0; 965 966 yyabortlab: 967 /* YYABORT comes here. */ 968 if (yyfree_stacks) 969 { 970 free (yyss); 971 free (yyvs); 972 #ifdef YYLSP_NEEDED 973 free (yyls); 974 #endif 975 } 976 return 1; 977 } 189 978 #line 99 "bool_parser.y" 979 190 980 191 981 /* Bison on one mips machine defined "const" to be nothing but … … 381 1171 bool_tree_node * 382 1172 ParseBool(char *query_line, int query_len, 383 TermList **the_term_list, int the_stemmer_num, int the_stem_method, 384 int *res, 1173 TermList **the_term_list, int the_stemmer_num, int the_stem_method, int *res, 385 1174 stemmed_dict * the_sd, int is_indexed, /* [RPAP - Jan 97: Stem Index Change] */ 386 1175 QueryTermList **the_query_term_list) /* [RPAP - Feb 97: Term Frequency] */ … … 407 1196 408 1197 409 #line 407 "y.tab.c"410 #define YYABORT goto yyabort411 #define YYREJECT goto yyabort412 #define YYACCEPT goto yyaccept413 #define YYERROR goto yyerrlab414 int415 yyparse()416 {417 register int yym, yyn, yystate;418 #if YYDEBUG419 register char *yys;420 extern char *getenv();421 422 if (yys = getenv("YYDEBUG"))423 {424 yyn = *yys;425 if (yyn >= '0' && yyn <= '9')426 yydebug = yyn - '0';427 }428 #endif429 430 yynerrs = 0;431 yyerrflag = 0;432 yychar = (-1);433 434 yyssp = yyss;435 yyvsp = yyvs;436 *yyssp = yystate = 0;437 438 yyloop:439 if (yyn = yydefred[yystate]) goto yyreduce;440 if (yychar < 0)441 {442 if ((yychar = yylex()) < 0) yychar = 0;443 #if YYDEBUG444 if (yydebug)445 {446 yys = 0;447 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];448 if (!yys) yys = "illegal-symbol";449 printf("%sdebug: state %d, reading %d (%s)\n",450 YYPREFIX, yystate, yychar, yys);451 }452 #endif453 }454 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&455 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)456 {457 #if YYDEBUG458 if (yydebug)459 printf("%sdebug: state %d, shifting to state %d\n",460 YYPREFIX, yystate, yytable[yyn]);461 #endif462 if (yyssp >= yyss + yystacksize - 1)463 {464 goto yyoverflow;465 }466 *++yyssp = yystate = yytable[yyn];467 *++yyvsp = yylval;468 yychar = (-1);469 if (yyerrflag > 0) --yyerrflag;470 goto yyloop;471 }472 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&473 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)474 {475 yyn = yytable[yyn];476 goto yyreduce;477 }478 if (yyerrflag) goto yyinrecovery;479 #ifdef lint480 goto yynewerror;481 #endif482 yynewerror:483 yyerror("syntax error");484 #ifdef lint485 goto yyerrlab;486 #endif487 yyerrlab:488 ++yynerrs;489 yyinrecovery:490 if (yyerrflag < 3)491 {492 yyerrflag = 3;493 for (;;)494 {495 if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&496 yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)497 {498 #if YYDEBUG499 if (yydebug)500 printf("%sdebug: state %d, error recovery shifting\501 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);502 #endif503 if (yyssp >= yyss + yystacksize - 1)504 {505 goto yyoverflow;506 }507 *++yyssp = yystate = yytable[yyn];508 *++yyvsp = yylval;509 goto yyloop;510 }511 else512 {513 #if YYDEBUG514 if (yydebug)515 printf("%sdebug: error recovery discarding state %d\n",516 YYPREFIX, *yyssp);517 #endif518 if (yyssp <= yyss) goto yyabort;519 --yyssp;520 --yyvsp;521 }522 }523 }524 else525 {526 if (yychar == 0) goto yyabort;527 #if YYDEBUG528 if (yydebug)529 {530 yys = 0;531 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];532 if (!yys) yys = "illegal-symbol";533 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",534 YYPREFIX, yystate, yychar, yys);535 }536 #endif537 yychar = (-1);538 goto yyloop;539 }540 yyreduce:541 #if YYDEBUG542 if (yydebug)543 printf("%sdebug: state %d, reducing by rule %d (%s)\n",544 YYPREFIX, yystate, yyn, yyrule[yyn]);545 #endif546 yym = yylen[yyn];547 yyval = yyvsp[1-yym];548 switch (yyn)549 {550 case 1:551 #line 75 "bool_parser.y"552 { tree_base = yyvsp[0].node;}553 break;554 case 2:555 #line 79 "bool_parser.y"556 { yyval.node = CreateBoolTermNode(term_list, yyvsp[0].text, 1, word_num, count, doc_count, invf_ptr, invf_len, stemmer_num); }557 break;558 case 3:559 #line 80 "bool_parser.y"560 { yyval.node = yyvsp[-1].node; }561 break;562 case 4:563 #line 81 "bool_parser.y"564 { yyval.node = CreateBoolTreeNode(N_all, NULL, NULL); }565 break;566 case 5:567 #line 82 "bool_parser.y"568 { yyval.node = CreateBoolTreeNode(N_none, NULL, NULL); }569 break;570 case 7:571 #line 86 "bool_parser.y"572 { yyval.node = CreateBoolTreeNode(N_not, yyvsp[0].node, NULL); }573 break;574 case 8:575 #line 89 "bool_parser.y"576 { yyval.node = CreateBoolTreeNode(N_and, yyvsp[-2].node, yyvsp[0].node); }577 break;578 case 9:579 #line 90 "bool_parser.y"580 { yyval.node = CreateBoolTreeNode(N_and, yyvsp[-1].node, yyvsp[0].node); }581 break;582 case 11:583 #line 94 "bool_parser.y"584 { yyval.node = CreateBoolTreeNode(N_or, yyvsp[-2].node, yyvsp[0].node); }585 break;586 #line 584 "y.tab.c"587 }588 yyssp -= yym;589 yystate = *yyssp;590 yyvsp -= yym;591 yym = yylhs[yyn];592 if (yystate == 0 && yym == 0)593 {594 #if YYDEBUG595 if (yydebug)596 printf("%sdebug: after reduction, shifting from state 0 to\597 state %d\n", YYPREFIX, YYFINAL);598 #endif599 yystate = YYFINAL;600 *++yyssp = YYFINAL;601 *++yyvsp = yyval;602 if (yychar < 0)603 {604 if ((yychar = yylex()) < 0) yychar = 0;605 #if YYDEBUG606 if (yydebug)607 {608 yys = 0;609 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];610 if (!yys) yys = "illegal-symbol";611 printf("%sdebug: state %d, reading %d (%s)\n",612 YYPREFIX, YYFINAL, yychar, yys);613 }614 #endif615 }616 if (yychar == 0) goto yyaccept;617 goto yyloop;618 }619 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&620 yyn <= YYTABLESIZE && yycheck[yyn] == yystate)621 yystate = yytable[yyn];622 else623 yystate = yydgoto[yym];624 #if YYDEBUG625 if (yydebug)626 printf("%sdebug: after reduction, shifting from state %d \627 to state %d\n", YYPREFIX, *yyssp, yystate);628 #endif629 if (yyssp >= yyss + yystacksize - 1)630 {631 goto yyoverflow;632 }633 *++yyssp = yystate;634 *++yyvsp = yyval;635 goto yyloop;636 yyoverflow:637 yyerror("yacc stack overflow");638 yyabort:639 return (1);640 yyaccept:641 return (0);642 }643 -
trunk/gsdl/packages/yaz/Makefile.in
r1713 r1860 11 11 # PARTICULAR PURPOSE. 12 12 13 #######14 # Modified for the NZDL Greenstone project. The original is still in15 # Makefile.am, for processing with automake.16 #######17 13 18 14 SHELL = @SHELL@ … … 45 41 top_builddir = . 46 42 43 ACLOCAL = @ACLOCAL@ 44 AUTOCONF = @AUTOCONF@ 45 AUTOMAKE = @AUTOMAKE@ 46 AUTOHEADER = @AUTOHEADER@ 47 48 INSTALL = @INSTALL@ 49 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) 50 INSTALL_DATA = @INSTALL_DATA@ 51 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 52 transform = @program_transform_name@ 53 54 NORMAL_INSTALL = : 55 PRE_INSTALL = : 56 POST_INSTALL = : 57 NORMAL_UNINSTALL = : 58 PRE_UNINSTALL = : 59 POST_UNINSTALL = : 47 60 ASNMODULE = @ASNMODULE@ 48 61 CC = @CC@ … … 59 72 have_sgml2txt = @have_sgml2txt@ 60 73 74 AUTOMAKE_OPTIONS = foreign 75 61 76 DIST_SUBDIRS = util odr z39.50 asn ill zutil comstack ccl tab retrieval server lib include client ztest doc 62 77 63 78 SUBDIRS = @SUBDIRS_VAR@ 64 79 80 noinst_SCRIPTS = yaz-config 65 81 SPEC_FILE = $(PACKAGE).spec 66 82 EXTRA_DIST = $(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt 67 83 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 68 84 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 69 CONFIG_CLEAN_FILES = config.status config.cache config.log 85 CONFIG_CLEAN_FILES = 86 SCRIPTS = $(noinst_SCRIPTS) 70 87 71 88 DIST_COMMON = Makefile.am Makefile.in TODO aclocal.m4 configure \ … … 75 92 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) 76 93 77 78 79 all: all-recursive 80 # make install should not do anything for greenstone (I hope...) 81 install: 82 clean: clean-recursive 83 distclean: distclean-recursive 84 -rm -f Makefile $(CONFIG_CLEAN_FILES) 85 86 87 # Don't want Makefile.in automatically re-generated from Makefile.am... 88 # 89 # .SUFFIXES: 90 # $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 91 # cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile 92 # 93 # Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 94 # cd $(top_builddir) \ 95 # && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 96 # 97 # $(ACLOCAL_M4): configure.in 98 # cd $(srcdir) && $(ACLOCAL) 99 # 100 # config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 101 # $(SHELL) ./config.status --recheck 102 # $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) 103 # cd $(srcdir) && $(AUTOCONF) 94 TAR = gtar 95 GZIP_ENV = --best 96 all: all-redirect 97 .SUFFIXES: 98 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 99 cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile 100 101 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 102 cd $(top_builddir) \ 103 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 104 105 $(ACLOCAL_M4): configure.in 106 cd $(srcdir) && $(ACLOCAL) 107 108 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 109 $(SHELL) ./config.status --recheck 110 $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) 111 cd $(srcdir) && $(AUTOCONF) 104 112 105 113 # This directory's subdirectories are mostly independent; you can cd … … 110 118 # (2) otherwise, pass the desired values on the `make' command line. 111 119 112 # @SET_MAKE@ 113 114 clean-recursive all-recursive: 115 set fnord $(MAKEFLAGS); amf=$$2; \ 120 @SET_MAKE@ 121 122 all-recursive install-data-recursive install-exec-recursive \ 123 installdirs-recursive install-recursive uninstall-recursive \ 124 check-recursive installcheck-recursive info-recursive dvi-recursive: 125 @set fnord $(MAKEFLAGS); amf=$$2; \ 126 dot_seen=no; \ 116 127 target=`echo $@ | sed s/-recursive//`; \ 117 128 list='$(SUBDIRS)'; for subdir in $$list; do \ 118 (cd $$subdir && $(MAKE) $$target) \ 129 echo "Making $$target in $$subdir"; \ 130 if test "$$subdir" = "."; then \ 131 dot_seen=yes; \ 132 local_target="$$target-am"; \ 133 else \ 134 local_target="$$target"; \ 135 fi; \ 136 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 119 137 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 120 done; 121 # echo "Making $$target in $$subdir"; 122 123 distclean-recursive: 124 for subdir in $(SUBDIRS); do \ 125 (cd $$subdir && test -e Makefile && $(MAKE) distclean); done 138 done; \ 139 if test "$$dot_seen" = "no"; then \ 140 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 141 fi; test -z "$$fail" 142 143 mostlyclean-recursive clean-recursive distclean-recursive \ 144 maintainer-clean-recursive: 145 @set fnord $(MAKEFLAGS); amf=$$2; \ 146 dot_seen=no; \ 147 rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ 148 rev="$$subdir $$rev"; \ 149 test "$$subdir" = "." && dot_seen=yes; \ 150 done; \ 151 test "$$dot_seen" = "no" && rev=". $$rev"; \ 152 target=`echo $@ | sed s/-recursive//`; \ 153 for subdir in $$rev; do \ 154 echo "Making $$target in $$subdir"; \ 155 if test "$$subdir" = "."; then \ 156 local_target="$$target-am"; \ 157 else \ 158 local_target="$$target"; \ 159 fi; \ 160 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 161 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 162 done && test -z "$$fail" 163 tags-recursive: 164 list='$(SUBDIRS)'; for subdir in $$list; do \ 165 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ 166 done 167 168 tags: TAGS 169 170 ID: $(HEADERS) $(SOURCES) $(LISP) 171 list='$(SOURCES) $(HEADERS)'; \ 172 unique=`for i in $$list; do echo $$i; done | \ 173 awk ' { files[$$0] = 1; } \ 174 END { for (i in files) print i; }'`; \ 175 here=`pwd` && cd $(srcdir) \ 176 && mkid -f$$here/ID $$unique $(LISP) 177 178 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) 179 tags=; \ 180 here=`pwd`; \ 181 list='$(SUBDIRS)'; for subdir in $$list; do \ 182 if test "$$subdir" = .; then :; else \ 183 test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ 184 fi; \ 185 done; \ 186 list='$(SOURCES) $(HEADERS)'; \ 187 unique=`for i in $$list; do echo $$i; done | \ 188 awk ' { files[$$0] = 1; } \ 189 END { for (i in files) print i; }'`; \ 190 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 191 || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) 192 193 mostlyclean-tags: 194 195 clean-tags: 196 197 distclean-tags: 198 -rm -f TAGS ID 199 200 maintainer-clean-tags: 126 201 127 202 distdir = $(PACKAGE)-$(VERSION) 128 203 top_distdir = $(distdir) 129 204 130 131 .PHONY: all install clean distclean \ 132 all-recursive distclean-recursive clean-recursive \ 133 distdir top_distdir yaz-config dist-hook rpm 205 # This target untars the dist file and tries a VPATH configuration. Then 206 # it guarantees that the distribution is self-contained by making another 207 # tarfile. 208 distcheck: dist 209 -rm -rf $(distdir) 210 GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz 211 mkdir $(distdir)/=build 212 mkdir $(distdir)/=inst 213 dc_install_base=`cd $(distdir)/=inst && pwd`; \ 214 cd $(distdir)/=build \ 215 && ../configure --srcdir=.. --prefix=$$dc_install_base \ 216 && $(MAKE) $(AM_MAKEFLAGS) \ 217 && $(MAKE) $(AM_MAKEFLAGS) dvi \ 218 && $(MAKE) $(AM_MAKEFLAGS) check \ 219 && $(MAKE) $(AM_MAKEFLAGS) install \ 220 && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 221 && $(MAKE) $(AM_MAKEFLAGS) dist 222 -rm -rf $(distdir) 223 @banner="$(distdir).tar.gz is ready for distribution"; \ 224 dashes=`echo "$$banner" | sed s/./=/g`; \ 225 echo "$$dashes"; \ 226 echo "$$banner"; \ 227 echo "$$dashes" 228 dist: distdir 229 -chmod -R a+r $(distdir) 230 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) 231 -rm -rf $(distdir) 232 dist-all: distdir 233 -chmod -R a+r $(distdir) 234 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) 235 -rm -rf $(distdir) 236 distdir: $(DISTFILES) 237 -rm -rf $(distdir) 238 mkdir $(distdir) 239 -chmod 777 $(distdir) 240 @for file in $(DISTFILES); do \ 241 d=$(srcdir); \ 242 if test -d $$d/$$file; then \ 243 cp -pr $$d/$$file $(distdir)/$$file; \ 244 else \ 245 test -f $(distdir)/$$file \ 246 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ 247 || cp -p $$d/$$file $(distdir)/$$file || :; \ 248 fi; \ 249 done 250 for subdir in $(DIST_SUBDIRS); do \ 251 if test "$$subdir" = .; then :; else \ 252 test -d $(distdir)/$$subdir \ 253 || mkdir $(distdir)/$$subdir \ 254 || exit 1; \ 255 chmod 777 $(distdir)/$$subdir; \ 256 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ 257 || exit 1; \ 258 fi; \ 259 done 260 $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook 261 info-am: 262 info: info-recursive 263 dvi-am: 264 dvi: dvi-recursive 265 check-am: all-am 266 check: check-recursive 267 installcheck-am: 268 installcheck: installcheck-recursive 269 install-exec-am: 270 install-exec: install-exec-recursive 271 272 install-data-am: 273 install-data: install-data-recursive 274 275 install-am: all-am 276 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 277 install: install-recursive 278 uninstall-am: 279 uninstall: uninstall-recursive 280 all-am: Makefile $(SCRIPTS) 281 all-redirect: all-recursive 282 install-strip: 283 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install 284 installdirs: installdirs-recursive 285 installdirs-am: 286 287 288 mostlyclean-generic: 289 290 clean-generic: 291 292 distclean-generic: 293 -rm -f Makefile $(CONFIG_CLEAN_FILES) 294 -rm -f config.cache config.log stamp-h stamp-h[0-9]* 295 296 maintainer-clean-generic: 297 mostlyclean-am: mostlyclean-tags mostlyclean-generic 298 299 mostlyclean: mostlyclean-recursive 300 301 clean-am: clean-tags clean-generic mostlyclean-am 302 303 clean: clean-recursive 304 305 distclean-am: distclean-tags distclean-generic clean-am 306 307 distclean: distclean-recursive 308 -rm -f config.status 309 310 maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ 311 distclean-am 312 @echo "This command is intended for maintainers to use;" 313 @echo "it deletes files that may require special tools to rebuild." 314 315 maintainer-clean: maintainer-clean-recursive 316 -rm -f config.status 317 318 .PHONY: install-data-recursive uninstall-data-recursive \ 319 install-exec-recursive uninstall-exec-recursive installdirs-recursive \ 320 uninstalldirs-recursive all-recursive check-recursive \ 321 installcheck-recursive info-recursive dvi-recursive \ 322 mostlyclean-recursive distclean-recursive clean-recursive \ 323 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ 324 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ 325 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ 326 install-exec install-data-am install-data install-am install \ 327 uninstall-am uninstall all-redirect all-am all installdirs-am \ 328 installdirs mostlyclean-generic distclean-generic clean-generic \ 329 maintainer-clean-generic clean mostlyclean distclean maintainer-clean 330 134 331 135 332 yaz-config: -
trunk/gsdl/packages/yaz/include/yaz/proto.h
r1713 r1860 5 5 * 6 6 * $Log$ 7 * Revision 1. 3 2000/11/28 22:30:14 jrm218 * Tidied up YAZ Makefiles and Makefiles.ins7 * Revision 1.4 2001/01/25 18:26:44 cs025 8 * Included CORBA branch for first time 9 9 * 10 10 * Revision 1.1 2000/08/03 03:11:01 johnmcp -
trunk/gsdl/src/colservr/Makefile.in
r1776 r1860 28 28 AR = ar 29 29 CC = @CC@ 30 CPP = @CXX@ 30 31 #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual 31 32 CCFLAGS = @CFLAGS@ 33 MCFLAGS = @CFLAGS@ -Wall -Wunused 34 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@ 32 35 33 36 USE_FASTCGI = @USE_FASTCGI@ … … 37 40 38 41 CGI_INCLUDES = 39 40 42 else 41 43 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@ … … 65 67 endif 66 68 67 INCLUDES = -I. ./.. -I../../lib -I../recpt \69 INCLUDES = -I. -I../.. -I../../lib -I../recpt \ 68 70 $(CGI_INCLUDES) $(MG_INCLUDES) 71 MICO_DIR = @MICO_DIR@ 72 ifeq ($(MICO_DIR), default) 73 MICO_INC = -I../../packages/mico/include 74 else 75 ifeq ($(MICO_DIR), yes) 76 MICO_INC = 77 else 78 MICO_INC = -I$(MICO_DIR) 79 endif 80 endif 81 MINCLUDES = -I. -I../../lib -I../recpt $(MICO_INC) 82 83 USE_CORBA = @USE_CORBA@ 69 84 70 85 RANLIB = @RANLIB@ … … 76 91 77 92 COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 78 LINK = $(CC) $(LDFLAGS) -o $@ 93 LINK = $(CPP) $(LDFLAGS) -o $@ 94 95 CPPCOMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 96 CPPLINK = $(CPP) $(LDFLAGS) -o $@ 97 98 MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 99 MLINK = mico-ld $(LDFLAGS) -lmico2.2.7 -o $@ 79 100 80 101 .SUFFIXES: … … 85 106 .SUFFIXES: .cpp .o 86 107 .cpp.o: 87 $(C OMPILE) $<108 $(CPPCOMPILE) $< 88 109 89 HEADERS = search.h querycache.h queryinfo.h collectserver.h \ 110 .SUFFIXES: .mpp .o 111 .mpp.o: 112 $(MCOMPILE) $< 113 114 ifneq ($(USE_CORBA), 0) 115 CORBAHEADERS = \ 116 corbaServer.h 117 CORBASOURCES = \ 118 corbaServer.mpp 119 CORBAOBJECTS = \ 120 corbaServer.o 121 else 122 CORBAHEADERS = 123 CORBASOURCES = 124 CORBAOBJECTS = 125 endif 126 127 HEADERS = search.h querycache.h queryinfo.h collectserver.h collectset.h \ 90 128 colservrconfig.h maptools.h filter.h source.h browsefilter.h \ 91 129 queryfilter.h mggdbmsource.h phrasesearch.h phrasequeryfilter.h \ 92 $(MG_HEADERS) 130 $(MG_HEADERS) $(CORBAHEADERS) 93 131 94 132 SOURCES = search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \ 95 133 colservrconfig.cpp maptools.cpp filter.cpp source.cpp \ 96 134 browsefilter.cpp queryfilter.cpp mggdbmsource.cpp phrasesearch.cpp \ 97 phrasequeryfilter.cpp \98 $(MG_SOURCES) 135 phrasequeryfilter.cpp collectset.cpp \ 136 $(MG_SOURCES) $(CORBASOURCES) 99 137 100 138 OBJECTS = search.o querycache.o queryinfo.o collectserver.o \ 101 139 colservrconfig.o maptools.o filter.o source.o browsefilter.o \ 102 140 queryfilter.o mggdbmsource.o phrasesearch.o phrasequeryfilter.o \ 103 $(MG_OBJECTS)141 collectset.o $(MG_OBJECTS) $(CORBAOBJECTS) 104 142 105 143 all : $(OBJECTS) … … 108 146 distclean: 109 147 rm -f $(OBJECTS) Makefile mgppsearch.o mgppqueryfilter.o 110 111 148 clean: 112 149 rm -f $(OBJECTS) mgppsearch.o mgppqueryfilter.o … … 116 153 depend: 117 154 makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES) 118 119 120 121 -
trunk/gsdl/src/colservr/collectserver.cpp
r1459 r1860 91 91 else if (key == "building" && cfgline.size() == 2) 92 92 collectinfo.building[cfgline[0]] = cfgline[1]; 93 else if (key == "httpdomain") collectinfo.httpdomain = value; 94 else if (key == "httpprefix") collectinfo.httpprefix = value; 93 95 else if (key == "receptionist") collectinfo.receptionist = value; 94 96 else if (key == "buildtype") collectinfo.buildType = value; -
trunk/gsdl/src/colservr/collectserver.h
r1285 r1860 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$ 25 * 24 26 *********************************************************************/ 25 27 … … 28 30 #define COLLECTSERVER_H 29 31 32 // Library header files 30 33 #include "gsdlconf.h" 31 34 #include "text_t.h" … … 34 37 #include "source.h" 35 38 #include "cfgread.h" 39 #include "cnfgable.h" 36 40 37 41 #if defined(GSDL_USE_OBJECTSPACE) … … 60 64 61 65 62 class collectserver {66 class collectserver : public configurable { 63 67 protected: 64 68 colservrconf configinfo; -
trunk/gsdl/src/colservr/colservrconfig.cpp
r1285 r1860 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$ 25 * 24 26 *********************************************************************/ 27 28 /* 29 $Log$ 30 Revision 1.4 2001/01/25 18:26:44 cs025 31 Included CORBA branch for first time 32 33 Revision 1.2.2.1 2000/04/04 15:02:31 cs025 34 Corba first commit 35 36 Revision 1.2 1999/09/07 04:57:20 sjboddie 37 added gpl notice 38 39 Revision 1.1 1999/02/21 22:32:55 rjmcnab 40 41 Initial revision. 42 43 */ 44 25 45 26 46 #include "colservrconfig.h" … … 53 73 } 54 74 75 return cserver.read_configfile(filename); 76 /* 55 77 // read in the collection configuration file 56 78 text_t key; … … 74 96 } 75 97 return false; 98 */ 76 99 } 77 100 … … 91 114 } 92 115 116 return cserver.read_configfile(filename); 117 118 /* 93 119 // read in the build configuration file 94 120 text_t key; … … 112 138 } 113 139 return false; 140 */ 114 141 } -
trunk/gsdl/src/colservr/mgsearch.cpp
r1497 r1860 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$ 25 * 24 26 *********************************************************************/ 27 28 /* 29 $Log$ 30 Revision 1.28 2001/01/25 18:26:44 cs025 31 Included CORBA branch for first time 32 33 Revision 1.22.2.1 2000/04/04 15:02:32 cs025 34 Corba first commit 35 36 Revision 1.22 1999/09/24 02:41:21 rjmcnab 37 change to use has_unicode_letdig in text_t 38 39 Revision 1.21 1999/09/21 21:41:41 sjboddie 40 fixed an error in what I committed last 41 42 Revision 1.20 1999/09/21 11:59:26 sjboddie 43 added Maxdocs queryfilter option (which may be -1 for 'all) 44 45 Revision 1.19 1999/09/07 22:52:52 rjmcnab 46 Seems to be an error in mg for retrieving documents using a paragraph 47 based index for some cases. Just added a work around (loads the default 48 index every time). 49 50 Revision 1.18 1999/09/07 04:57:22 sjboddie 51 added gpl notice 52 53 Revision 1.17 1999/08/31 22:42:41 rjmcnab 54 A couple of minor things. 55 56 Revision 1.16 1999/08/25 04:51:06 sjboddie 57 small change to allow for searching using boolean operators 58 59 Revision 1.15 1999/07/16 08:35:03 rjmcnab 60 Fixed a weird bug to do with a faulty case statement. 61 62 Revision 1.14 1999/07/16 03:42:22 sjboddie 63 changed isApprox 64 65 Revision 1.13 1999/07/16 00:12:46 sjboddie 66 removed all the old post-processing stuff 67 68 Revision 1.12 1999/07/07 06:17:47 rjmcnab 69 broke search_index into index+subcollection+language 70 within mgsearch 71 72 Revision 1.11 1999/07/05 21:06:43 rjmcnab 73 Disabled quoted strings. 74 75 Revision 1.10 1999/07/01 09:29:19 rjmcnab 76 Changes for better reporting of number documents which match a query. Changes 77 should still work as before with older versions of mg. 78 79 Revision 1.9 1999/07/01 03:54:48 rjmcnab 80 Added code to plug in the equivalent terms of each of the query terms. 81 Also added a function to get a raw utf8 encoded mg document (for speeding 82 up a phrase matching function) 83 84 Revision 1.8 1999/06/30 04:04:12 rjmcnab 85 made stemming functions available from mgsearch and made the stems 86 for the query terms available in queryinfo 87 88 Revision 1.7 1999/06/27 22:07:27 sjboddie 89 got rid of all the old functions for dealing with dir indexes 90 91 Revision 1.6 1999/06/09 00:41:32 sjboddie 92 phrase searching now uses case-folding if it's turned on 93 94 Revision 1.5 1999/02/21 22:31:35 rjmcnab 95 96 Removed locateinfo. 97 98 Revision 1.4 1999/02/03 01:13:27 sjboddie 99 100 Got interface to handle subcollections and language subcollections - 101 committed changes made to some of the collections 102 103 Revision 1.3 1999/01/19 01:38:17 rjmcnab 104 105 Made the source more portable. 106 107 Revision 1.2 1999/01/12 01:51:02 rjmcnab 108 109 Standard header. 110 111 Revision 1.1 1999/01/08 09:02:16 rjmcnab 112 113 Moved from src/library. 114 115 */ 25 116 26 117 #include "gsdlconf.h" … … 299 390 } 300 391 301 392 /** 393 * search directs the whole execution of the search; a number of other 394 * functions in this class are called as a result, and precondition 395 * checks are also made 396 */ 302 397 bool mgsearchclass::search(const queryparamclass &queryparams, 303 398 queryresultsclass &queryresults) { 304 399 // assert (cache != NULL); 305 400 401 // clear any previous results 306 402 queryresults.clear(); 307 403 // first check the cache … … 314 410 if (makeindexcurrent (queryparams.index, queryparams.subcollection, 315 411 queryparams.language, queryparams.collection)) { 412 // initialise the form of results 316 413 setsearchmode (queryparams); 414 415 // execute the query 317 416 submitquery (queryparams); 417 418 // retrieve the results 318 419 getresults (queryparams, queryresults); 420 319 421 return true; 320 422 } … … 361 463 } 362 464 363 465 /** 466 * submitquery constructs the query string (into UTF8 encoding) 467 * and submits it using mgq_ask to the mg search engine. Most 468 * of the processing will be done inside Greenstone 469 */ 364 470 void mgsearchclass::submitquery (const queryparamclass &queryparams) 365 471 { 366 // sort out the query string 472 // sort out the query string; copy it, remove all special characters 473 // and then convert it to a string in UTF8 format 367 474 text_t ttquerystring = queryparams.querystring; 368 475 filterquery (ttquerystring); … … 372 479 mgq_ask(querystring); 373 480 481 // destroy the temporary character array 374 482 delete querystring; 375 483 } 376 484 377 485 /** 486 * getrults is called to retrieve the required data on the docs 487 * which responded to the query submitted in submitquery above. 488 * 489 * It calls the local mgquery (mgq) interface to MG several times, 490 * to obtain the document numbers, term frequencies, term variants 491 * etc. All processing of the query will be done by Greenstone 492 * thereafter 493 */ 378 494 void mgsearchclass::getresults (const queryparamclass &queryparams, 379 495 queryresultsclass &queryresults) { 380 496 // get the configuration for the maximum number of documents to 497 // retrieve 381 498 int howmany = queryparams.maxdocs; 382 499 if (howmany == -1) howmany = MAXNUMDOCS; … … 412 529 } 413 530 531 /** 532 * Tidies the given querystring, removing special characters 533 */ 414 534 void mgsearchclass::filterquery (text_t &ttquerystring) { 415 535 text_t::iterator ithere = ttquerystring.begin (); -
trunk/gsdl/src/colservr/queryfilter.cpp
r1459 r1860 354 354 } 355 355 356 357 358 -
trunk/gsdl/src/db2txt/Makefile.in
r1802 r1860 30 30 AR = ar 31 31 CC = @CC@ 32 CPP = @CXX@ 32 33 CCFLAGS = -Wall @CFLAGS@ 33 34 DEFS = @DEFS@ … … 42 43 43 44 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS) 45 CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS) 44 46 LINK = $(CC) $(LDFLAGS) -o $@ 47 CPPLINK = $(CPP) $(LDFLAGS) -o $@ 45 48 46 49 .SUFFIXES: … … 51 54 .SUFFIXES: .cpp .o 52 55 .cpp.o: 53 $(C OMPILE) $<56 $(CPPCOMPILE) $< 54 57 55 58 -
trunk/gsdl/src/recpt/Makefile.in
r1776 r1860 27 27 AR = ar 28 28 CC = @CC@ 29 CPP = @CXX@ 29 30 #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual 30 31 CCFLAGS = @CFLAGS@ … … 36 37 ifneq ($(USE_FASTCGI), 1) 37 38 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@ 38 39 39 INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \ 40 40 -I../../packages/mg/lib -I../../packages/mg/src/text \ … … 48 48 -I../mgpp/text 49 49 endif 50 MICO_DIR = @MICO_DIR@ 51 ifeq ($(MICO_DIR), yes) 52 MICO_INC = 53 MICO_LIB = 54 else 55 ifeq ($(MICO_DIR), default) 56 MICO_DIR = ../../packages/mico/include 57 endif 58 MICO_INC = -I$(MICO_DIR) 59 MICO_LIB = -L$(MICO_DIR) 60 endif 61 MINCLUDES = -I. -I../../lib -I../colservr $(MICO_INC) 62 63 USE_CORBA = @USE_CORBA@ 50 64 51 65 RANLIB = @RANLIB@ … … 58 72 COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 59 73 LINK = $(CC) $(LDFLAGS) -o $@ 74 75 CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES) 76 CPPLINK = $(CPP) $(LDFLAGS) -o $@ 77 78 MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 79 MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@ 80 MLIBS = $(LIBS) -lmico2.2.7 60 81 61 82 .SUFFIXES: … … 66 87 .SUFFIXES: .cpp .o 67 88 .cpp.o: 68 $(COMPILE) $< 89 $(CPPCOMPILE) $< 90 91 .SUFFIXES: .mpp .o 92 .mpp.o: 93 $(MCOMPILE) $< 69 94 70 95 COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \ … … 81 106 RECEPTHEADERS = 82 107 108 ifeq ($(USE_CORBA), 1) 109 LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h 110 else 83 111 LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h 112 endif 84 113 85 114 HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS) … … 141 170 ../colservr/mgqueryfilter.o \ 142 171 ../colservr/mgppsearch.o \ 143 ../colservr/mgppqueryfilter.o 144 172 ../colservr/mgppqueryfilter.o \ 173 ../colservr/collectset.o 174 175 ifeq ($(USE_CORBA), 1) 176 #EXEC = recpt library corbaserver corbarecptldd 177 EXEC = library corbaserver corbarecptldd 178 else 145 179 #EXEC = recpt library 146 180 EXEC = library 181 endif 147 182 148 183 all: $(EXEC) … … 186 221 187 222 install: 188 install -m 755 -s library ../../cgi-bin/library 223 cp recpt /home/nzdl/nzdl-1.2/cgi-bin/recpt; \ 224 cp library /home/nzdl/nzdl-1.2/cgi-bin/library 225 # cp $(EXEC) /home/nzdl/nzdl-1.2/cgi-bin 189 226 190 227 depend: … … 211 248 212 249 recpt: $(RECPT_OBJS) 213 $( LINK) $(RECPT_OBJS) $(LIBS)250 $(CPPLINK) $(RECPT_OBJS) $(LIBS) 214 251 215 252 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # … … 235 272 236 273 library: $(LIBRARY_OBJS) 237 $(LINK) $(LIBRARY_OBJS) $(LIBS) 238 239 240 241 242 274 $(CPPLINK) $(LIBRARY_OBJS) $(LIBS) 275 276 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 277 278 RECPTLIB_OBJECTS = nullproto.o corbaproto.o \ 279 ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \ 280 ../../lib/corbaiface.o 281 ifneq ($(USE_FASTCGI), 1) 282 RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \ 283 ../../lib/gsdllib.a \ 284 ../../packages/mg/src/text/libtextin.a \ 285 ../../packages/mg/lib/libmg.a \ 286 ../mgpp/text/libtextin.a \ 287 ../mgpp/lib/libmg.a 288 else 289 RLIBRARY_OBJS = $(COMMONOBJECTS) $(RECPTLIB_OBJECTS) $(COLSERVROBJECTS) \ 290 ../../lib/gsdllib.a \ 291 ../../packages/mg/src/text/libtextin.a \ 292 ../../packages/mg/lib/libmg.a \ 293 ../../packages/fcgi/libfcgi/libfcgi.a \ 294 ../mgpp/text/libtextin.a \ 295 ../mgpp/lib/libmg.a 296 endif 297 RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o 298 299 corbaserver: $(RECPTLIB_OBJS) 300 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS) 301 302 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 303 304 CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o 305 ifneq ($(USE_FASTCGI), 1) 306 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 307 ../../lib/gsdllib.a \ 308 ../../packages/mg/src/text/libtextin.a \ 309 ../../packages/mg/lib/libmg.a \ 310 ../mgpp/text/libtextin.a \ 311 ../mgpp/lib/libmg.a 312 else 313 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 314 ../../lib/gsdllib.a \ 315 ../../packages/mg/src/text/libtextin.a \ 316 ../../packages/mg/lib/libmg.a \ 317 ../../packages/fcgi/libfcgi/libfcgi.a \ 318 ../mgpp/text/libtextin.a \ 319 ../mgpp/lib/libmg.a 320 endif 321 322 corbarecptldd: $(CORBARECPT_OBJS) 323 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) 324 325 test: -
trunk/gsdl/src/recpt/OIDtools.cpp
r1695 r1860 91 91 request.fields = metadata; 92 92 request.docSet.push_back (OID); 93 94 93 assert (collectproto != NULL); 94 95 95 collectproto->filter (collection, request, response, err, logout); 96 96 if (err != noError) { -
trunk/gsdl/src/recpt/browserclass.h
r1285 r1860 21 21 * along with this program; if not, write to the Free Software 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 * $Id$ 23 25 * 24 26 *********************************************************************/ … … 74 76 void set_filter_options (FilterRequest_t &request, cgiargsclass &args); 75 77 76 // returns the number of tabs to add before displaying the78 // output_section_group returns the number of tabs to add before displaying the 77 79 // next section group 80 // The first version takes one result of a search/query action, the 81 // second takes all the results; ResultDocInfo_t is actually a child struct 82 // of FilterResponse_t items. The second version tends to output parts of an 83 // abstract structure (e.g. for a table of contents/classifier list, the first 84 // for an individual document 78 85 virtual int output_section_group (ResultDocInfo_t §ion, cgiargsclass &args, 79 86 const text_t &collection, int colnumber, -
trunk/gsdl/src/recpt/browsetools.cpp
r1610 r1860 23 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 24 * 25 * $Id$ 26 * 25 27 *********************************************************************/ 26 28 27 29 #include "browsetools.h" 28 30 #include "OIDtools.h" 29 30 31 31 32 // output_controls displays the detach, expand/contract contents, … … 411 412 text_t OID = args["d"]; 412 413 text_t classification = "Document"; 414 415 // if we're not outputting the TOC for a valid OID, then we should be giving 416 // the TOC of a classification 413 417 if (OID.empty()) { 414 418 OID = args["cl"]; 415 419 get_top (OID, classification); 416 } else if (fulltoc) 420 } 421 // if we're to give the full TOC of a document, get the parent for the whole 422 // document now 423 else if (fulltoc) 417 424 get_top (args["cl"], classification); 418 425 … … 500 507 } 501 508 509 /** 510 * This function outputs the contents of a classifier list to the reader - 511 * the document will in fact be empty, so this does the "real" output 512 */ 502 513 void output_toc (cgiargsclass &args, browsermapclass *browsermap, 503 514 formatinfo_t &formatinfo, recptproto *collectproto, -
trunk/gsdl/src/recpt/cgiwrapper.cpp
r1354 r1860 30 30 #include <stdlib.h> 31 31 #include <assert.h> 32 #include <iostream.h> 32 33 33 34 #if defined(GSDL_USE_OBJECTSPACE) … … 281 282 282 283 outconvertclass text_t2ascii; 283 recptconf configinfo = recpt.get_configinfo ();284 recptconf &configinfo = recpt.get_configinfo (); 284 285 text_t etc_dir = filename_cat (configinfo.gsdlhome, "etc"); 285 286 … … 525 526 // couldn't find the main configuration file 526 527 page_errormaincfg (gsdlhome, collection, debug, errorpage); 527 } else if (configinfo.collectinfo.empty() ) {528 } else if (configinfo.collectinfo.empty() && false) { // GRB: TODO: *** THIS WAS COMMENTED OUT TO MAKE CORBA WORK 7/9/2000 **** 528 529 // don't have any collections 529 530 page_errorcollect (gsdlhome, errorpage, debug); … … 641 642 642 643 644 // if there has been no error so far, perform the production of the 645 // output page 643 646 if (errorpage.empty()) { 644 647 text_t error_file = filename_cat (gsdlhome, "etc", "errout.txt"); … … 656 659 page_errorparseargs(gsdlhome, debug, errorpage); 657 660 } else { 661 // produce the output page 662 658 663 if (!recpt.produce_cgi_page (args, pageout, errout, fastcgienv)) { 659 664 errout.close (); -
trunk/gsdl/src/recpt/cgiwrapper.h
r1285 r1860 30 30 31 31 #include "receptionist.h" 32 #include "collectset.h" 32 33 33 34 // cgiwrapper does everything necessary to output a page … … 35 36 // collection then "collection" should be set, otherwise it 36 37 // should equal "". 38 // 39 // NB: the collectset MAY NOT exist for remote protocols (e.g. 40 // the corba protocol; as references must point to a non- 41 // null instance, we must therefore use a pointer - sorry! 37 42 void cgiwrapper (receptionist &recpt, text_t collection); 38 43 -
trunk/gsdl/src/recpt/comtypes.cpp
r1330 r1860 58 58 format.erase(format.begin(), format.end()); 59 59 building.erase(format.begin(), format.end()); 60 httpdomain.clear(); 61 httpprefix.clear(); 60 62 receptionist.clear(); 61 63 } -
trunk/gsdl/src/recpt/comtypes.h
r1773 r1860 99 99 text_tmap format; 100 100 text_tmap building; 101 text_t receptionist; 102 text_t buildType; // 'mg' or 'mgpp' 101 text_t httpdomain; // GRB: could these two http items need removing 102 text_t httpprefix; 103 text_t receptionist; 104 text_t buildType; // 'mg' or 'mgpp' 103 105 }; 104 106 -
trunk/gsdl/src/recpt/documentaction.cpp
r1804 r1860 667 667 << "<html><head></head>\n" 668 668 << "<frameset rows=\"68,*\" noresize border=0>\n" 669 << "<frame scrolling=no frameborder=0 src=\"_gwcgi_? e=_compressedoptions_&a=p&p=nav\">\n"670 << "<frame name=\"documenttop\" frameborder=0 src=\"_gwcgi_? e=_compressedoptions_&a=d&d="669 << "<frame scrolling=no frameborder=0 src=\"_gwcgi_?_optsite_e=_compressedoptions_&a=p&p=nav\">\n" 670 << "<frame name=\"documenttop\" frameborder=0 src=\"_gwcgi_?optsite_e=_compressedoptions_&a=d&d=" 671 671 << args["d"] << "\">" 672 672 << "<noframes>\n" … … 819 819 ResultDocInfo_tarray::iterator sechere = inforesponse.docInfo.begin(); 820 820 ResultDocInfo_tarray::iterator secend = inforesponse.docInfo.end(); 821 821 822 822 if (arg_gt == 1) { 823 823 // check if there are more than 10 sections containing text to be expanded - -
trunk/gsdl/src/recpt/librarymain.cpp
r1856 r1860 30 30 // z39.50 stuff - johnmcp 31 31 #include "z3950proto.h" 32 #include "collectserver.h" 33 #include "filter.h" 34 #include "browsefilter.h" 35 #include "mgqueryfilter.h" 36 #include "mgppqueryfilter.h" 37 #include "infodbclass.h" 38 #include "mggdbmsource.h" 39 #include "mgsearch.h" 40 #include "mgppsearch.h" 41 #include "fileutil.h" 42 #include "collectset.h" 43 #include <assert.h> 32 44 33 45 #include "action.h" … … 57 69 int main () { 58 70 receptionist recpt; 59 nullproto nproto; 71 nullproto nproto; 72 collectset *cservers; 60 73 #ifndef __WIN32__ 61 z3950proto zproto;74 z3950proto zproto; 62 75 #endif 63 76 text_t gsdlhome; 77 78 cservers = new collectset(gsdlhome); 79 80 // GRB: removed 7/9/2000; perhaps needs to be here!site_cfg_read (gsdlhome); 81 82 // set up the null protocol 83 nproto.set_collectset(cservers); 84 85 // configure the receptionist server list 86 cservers->setReceptionistServers(recpt, gsdlhome); 87 88 89 /* 90 text_t collectdir = filename_cat (gsdlhome, "collect"); 64 91 text_tarray collections; 65 66 // get gsdlhome67 text_t gsdlhome;68 site_cfg_read (gsdlhome);69 text_t collectdir = filename_cat (gsdlhome, "collect");70 92 read_dir (collectdir, collections); 71 93 72 94 text_tarray::const_iterator thiscol = collections.begin(); 73 95 text_tarray::const_iterator endcol = collections.end(); 74 96 75 97 while (thiscol != endcol) { 76 98 77 99 // ignore the modelcol 78 100 if (*thiscol == "modelcol") { … … 84 106 nproto.add_collection (*thiscol, &recpt, gsdlhome, gsdlhome); 85 107 108 confin.close(); 109 // #endif ? does this tie in with a WIN32 ifdef? 110 111 collectserver *cserver = new collectserver(); 112 gdbmclass *gdbmhandler = new gdbmclass(); 113 114 // add a null filter 115 filterclass *filter = new filterclass (); 116 cserver->add_filter (filter); 117 118 // add a browse filter 119 browsefilterclass *browsefilter = new browsefilterclass(); 120 browsefilter->set_gdbmptr (gdbmhandler); 121 122 cserver->add_filter (browsefilter); 123 124 if (buildtype == "mg") { 125 mgsearchclass *mgsearch = new mgsearchclass(); 126 127 // add a query filter 128 mgqueryfilterclass *queryfilter = new mgqueryfilterclass(); 129 queryfilter->set_gdbmptr (gdbmhandler); 130 queryfilter->set_mgsearchptr (mgsearch); 131 cserver->add_filter (queryfilter); 132 133 // add a mg and gdbm source 134 mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass (); 135 mggdbmsource->set_gdbmptr (gdbmhandler); 136 mggdbmsource->set_mgsearchptr (mgsearch); 137 cserver->add_source (mggdbmsource); 138 } 139 #ifndef __WIN32__ 140 141 else if (buildtype == "mgpp") { 142 143 mgppsearchclass *mgsearch = new mgppsearchclass(); 144 145 // add a query filter 146 mgppqueryfilterclass *queryfilter = new mgppqueryfilterclass(); 147 queryfilter->set_gdbmptr (gdbmhandler); 148 queryfilter->set_mgsearchptr (mgsearch); 149 cserver->add_filter (queryfilter); 150 151 // add a mg and gdbm source 152 mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass (); 153 mggdbmsource->set_gdbmptr (gdbmhandler); 154 mggdbmsource->set_mgsearchptr (mgsearch); 155 cserver->add_source (mggdbmsource); 156 157 } 158 #endif 159 160 // inform collection server and everything it contains about its 161 // collection name 162 cserver->configure ("collection", *thiscol); 163 164 // configure receptionist's collectinfo structure 165 text_tarray colinfo; 166 colinfo.push_back (*thiscol); 167 colinfo.push_back (gsdlhome); 168 colinfo.push_back (gsdlhome); 169 recpt.configure ("collectinfo", colinfo); 170 171 nproto.add_collectserver (cserver); 86 172 thiscol ++; 87 173 } 174 */ 88 175 89 176 // add the protocol to the receptionist 90 177 recpt.add_protocol (&nproto); 178 179 // z39.50 stuff - johnmcp 91 180 92 181 // z39.50 stuff - johnmcp … … 300 389 301 390 cgiwrapper (recpt, ""); 391 delete cservers; 302 392 return 0; 303 393 } -
trunk/gsdl/src/recpt/nullproto.cpp
r1679 r1860 25 25 26 26 #include "nullproto.h" 27 #include "colservrconfig.h"28 27 #include <assert.h> 29 28 … … 40 39 41 40 nullproto::~nullproto() { 42 collectservermapclass::iterator here = cservers.begin();43 collectservermapclass::iterator end = cservers.end();44 45 while (here != end) {46 if ((*here).second.c != NULL) {47 delete (*here).second.c;48 }49 here ++;50 }51 cservers.clear();52 41 } 53 42 54 43 // add_collection sets up the collectionserver and calls 55 44 // add_collectserver 45 /* 56 46 void nullproto::add_collection (const text_t &collection, void *recpt, 57 const text_t &gsdlhome, const text_t &gdbmhome) { 58 59 // read config file to see if built with mg or mgpp 60 // -- we can rely on the collection (and therefore the build.cfg) 61 // being here since this is the null protocol - a nicer way to 62 // do this would be preferable though - Stefan. 63 text_t buildtype = "mg"; // mg is default 64 // (for now we'll just ignore mgpp if on windows) 65 #ifndef __WIN32__ 66 text_tarray cfgline; 67 text_t key; 68 text_t build_cfg = filename_cat(gsdlhome, "collect", collection, "index", "build.cfg"); 69 char *build_cfgc = build_cfg.getcstr(); 70 ifstream confin(build_cfgc); 71 72 if (confin) { 73 while (read_cfg_line(confin, cfgline) >= 0) { 74 if (cfgline.size() == 2) { 75 key = cfgline[0]; 76 cfgline.erase(cfgline.begin()); 77 if (key == "buildtype") { 78 buildtype = cfgline[0]; 79 break; 80 } 81 } 82 } 83 confin.close(); 84 } 85 delete build_cfgc; 86 #endif 87 88 collectserver *cserver = new collectserver(); 89 gdbmclass *gdbmhandler = new gdbmclass(); 90 91 // add a null filter 92 filterclass *filter = new filterclass (); 93 cserver->add_filter (filter); 94 95 // add a browse filter 96 browsefilterclass *browsefilter = new browsefilterclass(); 97 browsefilter->set_gdbmptr (gdbmhandler); 98 99 cserver->add_filter (browsefilter); 100 101 if (buildtype == "mg") { 102 mgsearchclass *mgsearch = new mgsearchclass(); 103 104 // add a query filter 105 mgqueryfilterclass *queryfilter = new mgqueryfilterclass(); 106 queryfilter->set_gdbmptr (gdbmhandler); 107 queryfilter->set_mgsearchptr (mgsearch); 108 cserver->add_filter (queryfilter); 109 110 // add a mg and gdbm source 111 mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass (); 112 mggdbmsource->set_gdbmptr (gdbmhandler); 113 mggdbmsource->set_mgsearchptr (mgsearch); 114 cserver->add_source (mggdbmsource); 115 } 116 117 #ifndef __WIN32__ 118 119 else if (buildtype == "mgpp") { 120 121 mgppsearchclass *mgsearch = new mgppsearchclass(); 122 123 // add a query filter 124 mgppqueryfilterclass *queryfilter = new mgppqueryfilterclass(); 125 queryfilter->set_gdbmptr (gdbmhandler); 126 queryfilter->set_mgsearchptr (mgsearch); 127 cserver->add_filter (queryfilter); 128 129 // add a mg and gdbm source 130 mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass (); 131 mggdbmsource->set_gdbmptr (gdbmhandler); 132 mggdbmsource->set_mgsearchptr (mgsearch); 133 cserver->add_source (mggdbmsource); 134 135 } 136 #endif 137 138 // inform collection server and everything it contains about its 139 // collection name 140 cserver->configure ("collection", collection); 141 142 // configure receptionist's collectinfo structure 143 text_tarray colinfo; 144 colinfo.push_back (collection); 145 colinfo.push_back (gsdlhome); 146 colinfo.push_back (gdbmhome); 147 receptionist *rcp = (receptionist *)recpt; 148 rcp->configure ("collectinfo", colinfo); 149 150 add_collectserver (cserver); 151 } 47 const text_t &gsdlhome, const text_t &gdbmhome) { 48 } 49 */ 152 50 153 51 // remove_collection deletes the collection server of collection. … … 156 54 // cleans up all collectservers when the program exits. 157 55 void nullproto::remove_collection (const text_t &collection, ostream &logout) { 158 collectservermapclass::iterator here = cservers.begin(); 159 collectservermapclass::iterator end = cservers.end(); 160 161 while (here != end) { 162 if ((*here).second.c != NULL && (*here).first == collection) { 163 delete (*here).second.c; 164 cservers.erase (here); 165 return; 166 } 167 here ++; 168 } 169 outconvertclass text_t2ascii; 170 logout << text_t2ascii << "nullproto::remove_collection: failed to remove collectserver for " 171 << collection << "\n"; 56 cset->remove_collection(collection, logout); 172 57 } 173 58 … … 177 62 // it should be done just after the collection server has been 178 63 // created 179 if (key == "collection" || key == "collectdir") return;180 64 181 collectservermapclass::iterator here = cservers.begin(); 182 collectservermapclass::iterator end = cservers.end(); 183 184 while (here != end) { 185 assert ((*here).second.c != NULL); 186 if ((*here).second.c != NULL) { 187 if (key == "collectinfo") { 188 if ((*here).first == cfgline[0]) { 189 (*here).second.c->configure ("gsdlhome", cfgline[1]); 190 (*here).second.c->configure ("gdbmhome", cfgline[2]); 191 } 192 } else { 193 (*here).second.c->configure (key, cfgline); 194 } 195 } 196 197 here++; 65 // the protocol should not configure the collection set; it should be 66 // done direct to the collection server set 67 if (key == "gsdlhome") { 68 cset->configure(key, cfgline); 198 69 } 199 70 } … … 201 72 // this init will configure and init each of the collection servers 202 73 bool nullproto::init (ostream &logout) { 203 collectservermapclass::iterator here = cservers.begin();204 collectservermapclass::iterator end = cservers.end(); 74 return cset->init(logout); 75 } 205 76 206 while (here != end) { 207 assert ((*here).second.c != NULL); 208 if ((*here).second.c != NULL) { 209 const colservrconf &configinfo = (*here).second.c->get_configinfo (); 210 bool failed = false; 211 212 // configure this collection server 213 214 // note that we read build.cfg before collect.cfg so that the indexmaps 215 // are available to decode defaultindex, defaultsubcollection, and 216 // defaultlanguage 217 if (!build_cfg_read (*((*here).second.c), configinfo.gsdlhome, 218 configinfo.collection)) { 219 outconvertclass text_t2ascii; 220 logout << text_t2ascii 221 << "Warning: couldn't read build.cfg file for collection \"" //**** 222 << configinfo.collection << "\", gsdlhome=\"" 223 << configinfo.gsdlhome << "\"\n"; 224 failed = true; 225 } 226 227 if (!collect_cfg_read (*((*here).second.c), configinfo.gsdlhome, 228 configinfo.collection)) { 229 outconvertclass text_t2ascii; 230 logout << text_t2ascii 231 << "Warning: couldn't read collect.cfg file for collection \"" 232 << configinfo.collection << "\", gsdlhome=\"" 233 << configinfo.gsdlhome << "\"\n"; 234 failed = true; 235 } 236 237 // don't bother initializing if one of the config files 238 // wasn't read correctly 239 if (!failed) { 240 if (!(*here).second.c->init (logout)) return false; 241 } 242 } 243 here++; 244 } 245 246 return true; 77 text_t nullproto::get_site_name () { 78 return ""; 247 79 } 248 80 … … 254 86 void nullproto::get_collection_list (text_tarray &collist, comerror_t &err, 255 87 ostream &/*logout*/) { 256 collist.erase(collist.begin(),collist.end()); 257 err = noError; 258 259 collectservermapclass::iterator here = cservers.begin(); 260 collectservermapclass::iterator end = cservers.end(); 261 while (here != end) { 262 assert ((*here).second.c != NULL); 263 if ((*here).second.c != NULL) { 264 collist.push_back ((*here).second.c->get_collection_name()); 265 } 266 here++; 267 } 88 cset->getCollectionList(collist); 89 err = noError; // no error is guaranteed - collection server shouldn't 90 // about receptionist error states, logout is irrelevant 268 91 } 269 92 270 93 void nullproto::has_collection (const text_t &collection, bool &hascollection, 271 94 comerror_t &err, ostream &/*logout*/) { 272 hascollection = (cse rvers.getcollectserver(collection) != NULL);95 hascollection = (cset->getCollectServer(collection) != NULL); 273 96 err = noError; 274 97 } … … 276 99 void nullproto::ping (const text_t &collection, bool &wassuccess, 277 100 comerror_t &err, ostream &/*logout*/) { 278 wassuccess = (cse rvers.getcollectserver(collection) != NULL);101 wassuccess = (cset->getCollectServer(collection) != NULL); 279 102 err = noError; 280 103 } … … 283 106 ColInfoResponse_t &collectinfo, 284 107 comerror_t &err, ostream &logout) { 285 collectserver *cserver = cse rvers.getcollectserver (collection);108 collectserver *cserver = cset->getCollectServer (collection); 286 109 if (cserver != NULL) cserver->get_collectinfo (collectinfo, err, logout); 287 110 else err = protocolError; … … 292 115 InfoFiltersResponse_t &response, 293 116 comerror_t &err, ostream &logout) { 294 collectserver *cserver = cse rvers.getcollectserver (collection);117 collectserver *cserver = cset->getCollectServer (collection); 295 118 if (cserver != NULL) cserver->get_filterinfo (response, err, logout); 296 119 else err = protocolError; … … 301 124 InfoFilterOptionsResponse_t &response, 302 125 comerror_t &err, ostream &logout) { 303 collectserver *cserver = cse rvers.getcollectserver (collection);126 collectserver *cserver = cset->getCollectServer (collection); 304 127 if (cserver != NULL) cserver->get_filteroptions (request, response, err, logout); 305 128 else err = protocolError; … … 310 133 FilterResponse_t &response, 311 134 comerror_t &err, ostream &logout) { 312 collectserver *cserver = cse rvers.getcollectserver (collection);135 collectserver *cserver = cset->getCollectServer (collection); 313 136 if (cserver != NULL) cserver->filter (request, response, err, logout); 314 137 else err = protocolError; … … 319 142 DocumentResponse_t &response, 320 143 comerror_t &err, ostream &logout) { 321 collectserver *cserver = cse rvers.getcollectserver (collection);144 collectserver *cserver = cset->getCollectServer (collection); 322 145 if (cserver != NULL) cserver->get_document (request, response, err, logout); 323 146 else err = protocolError; -
trunk/gsdl/src/recpt/nullproto.h
r1739 r1860 30 30 #include "gsdlconf.h" 31 31 #include "collectserver.h" 32 #include "collectset.h" 32 33 #include "recptproto.h" 33 34 #include "receptionist.h" … … 35 36 class nullproto : public recptproto { 36 37 protected: 37 collectse rvermapclass cservers;38 collectset *cset; 38 39 public: 39 40 virtual ~nullproto(); … … 41 42 // add_collection sets up the collectionserver and calls 42 43 // add_collectserver 43 virtual void add_collection (const text_t &collection, void *recpt,44 44 // virtual void add_collection (const text_t &collection, void *recpt, 45 // const text_t &gsdlhome, const text_t &gdbmhome); 45 46 46 47 // add_collectserver should be called for each collection server 47 48 // before any configuration is done 48 void add_collectserver (collectserver *thecserver) 49 {cservers.addcollectserver(thecserver);} 49 void set_collectset(collectset *set) { this->cset = set; } 50 50 51 51 // remove_collection deletes the collection server of collection. … … 62 62 63 63 text_t get_protocol_name (); 64 text_t get_site_name (); 65 64 66 void get_collection_list (text_tarray &collist, comerror_t &err, 65 67 ostream &logout); -
trunk/gsdl/src/recpt/pageaction.cpp
r1856 r1860 80 80 void pageaction::set_homeextra_macro (displayclass &disp, recptprotolistclass *protos, 81 81 ostream &logout) { 82 cout << "Setting homepage " << endl; 82 83 83 84 text_t homeextra = "<center><table width=_pagewidth_><tr valign=top>\n"; … … 105 106 106 107 found_valid_col = true; 107 FilterResponse_t response;108 FilterResponse_t response; 108 109 text_tset metadata; 109 110 metadata.insert ("collectionname"); … … 112 113 text_t collectionname = *collist_here; 113 114 text_t alt = collectionname; 115 114 116 if (get_info ("collection", *collist_here, metadata, false, 115 117 (*rprotolist_here).p, response, logout)) { … … 117 119 alt = response.docInfo[0].metadata["collectionname"].values[0]; 118 120 121 text_t iconurl; 122 iconurl.clear(); 123 119 124 if (!response.docInfo[0].metadata["iconcollectionsmall"].values[0].empty()) 120 125 collectionname = "<img width=150 border=1 src=\"" … … 122 127 + "\" alt=\"" + alt + "\">"; 123 128 else if (!response.docInfo[0].metadata["iconcollection"].values[0].empty()) 124 collectionname = "<img width=150 border=1 src=\"" 125 + response.docInfo[0].metadata["iconcollection"].values[0] 126 + "\" alt=\"" + alt + "\">"; 127 else collectionname = alt; 129 { 130 iconurl = response.docInfo[0].metadata["iconcollection"].values[0]; 131 } 132 133 if (!iconurl.empty()) 134 { 135 // check to see URL is local to colserver 136 text_t::iterator iconurl_head = iconurl.begin(); 137 text_t iconhead = substr(iconurl_head,iconurl_head+16); 138 if (iconhead=="_httpcollection_") 139 { 140 // local and using _httpcollection_ 141 text_t icontail = substr(iconurl_head+16,iconurl.end()); 142 iconurl = "http://" + cinfo->httpdomain 143 + cinfo->httpprefix + "/collect/" 144 + *collist_here + "/" + icontail; 145 } 146 else if (iconurl[0]=='/') 147 { 148 // local but with full path 149 iconurl = "http://" + cinfo->httpdomain + iconurl; 150 } 151 152 collectionname 153 = "<img width=150 border=1 src=\"" + iconurl + "\" alt=\"" + alt + "\">"; 154 } 155 else 156 { 157 collectionname = alt; 158 } 159 128 160 } 129 161 if ((count%3 == 0) && (!first)) 130 162 homeextra += "</tr><tr valign=top>\n"; 131 163 132 text_t link = "<a href=\"_gwcgi_?a=p&p=about&c=" + *collist_here + "\">"; 164 text_t optsite = ""; 165 text_t site_name = (*rprotolist_here).p->get_site_name (); 166 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 167 168 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + "\">"; 133 169 if (*collist_here == "chinese") 134 link = "<a href=\"_gwcgi_? a=p&p=about&l=zh&nw=u&c=" + *collist_here + "\">";170 link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&l=zh&nw=u&c=" + *collist_here + "\">"; 135 171 if (*collist_here == "arabic") 136 link = "<a href=\"_gwcgi_? a=p&p=about&l=ar&nw=u&c=" + *collist_here + "\">";172 link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&w=a&c=" + *collist_here + "\">"; 137 173 138 174 if (!cinfo->receptionist.empty()) … … 166 202 recptprotolistclass *protos, ostream &logout) { 167 203 204 cout << "Defining internal macros" << endl; 205 168 206 // define_internal_macros sets the following macros: 169 207 … … 211 249 212 250 251 cout << "Defining internal macros" << endl; 252 213 253 if (recpt == NULL) { 214 254 logout << "ERROR (pageaction::define_internal_macros): This action does not contain\n" … … 218 258 } 219 259 260 cout << "Defining internal macros" << endl; 261 220 262 text_t &arg_p = args["p"]; 221 263 text_t &arg_c = args["c"]; 222 264 ColInfoResponse_t *cinfo = NULL; 265 266 cout << "Subaction is " << arg_p << endl; 223 267 224 268 recptproto* collectproto = protos->getrecptproto (arg_c, logout); … … 231 275 disp.setmacro ("builddate", "Global", builddate); 232 276 } 277 278 cout << "Subaction is " << arg_p << endl; 233 279 234 280 if (arg_p == "home") { … … 318 364 } 319 365 } 366 367 if (pref_langs.find("zh") == pref_langs.end()) 368 disp.setmacro ("encodingoption", "preferences", ""); 320 369 321 370 } else { -
trunk/gsdl/src/recpt/queryaction.cpp
r1717 r1860 566 566 if (size>5&&args["hcl"]==1) { //compress the list, show the expand button 567 567 568 historylist += "<td><a href=\"_gwcgi_? e=_compressedoptions_&a=q&hcl=0\">_textexpand_</a></td>\n";568 historylist += "<td><a href=\"_gwcgi_?_optsite_e=_compressedoptions_&a=q&hcl=0\">_textexpand_</a></td>\n"; 569 569 } 570 570 else if (size >5 && args["hcl"]==0) { // expand the list, show contract button 571 historylist += "<td><a href=\"_gwcgi_? e=_compressedoptions_&a=q&hcl=1\">_textcontract_</a></td>\n";571 historylist += "<td><a href=\"_gwcgi_?_optsite_e=_compressedoptions_&a=q&hcl=1\">_textcontract_</a></td>\n"; 572 572 } 573 573 historylist += "</table>\n"; … … 591 591 historylist += "<tr> <td width=40 align=center>"+c+"</td>\n"; 592 592 historylist += "<td width=340 align=left>"+query+"</td><td width=60 align=center>"+numdocs+"</td>\n"; 593 historylist += "<td width=60 align=center><a href=\"_gwcgi_? e=_compressedoptions_&";593 historylist += "<td width=60 align=center><a href=\"_gwcgi_?_optsite_e=_compressedoptions_&"; 594 594 historylist += *here+"\"><img name=\"display\" src=\"_httpicondisplay_\" width=_widthdisplay_ "; 595 595 historylist += "height=_heightdisplay_ border=\"0\" alt=\"" + userinfo +"\"></a></td></tr>\n"; … … 632 632 << "<form name=QueryForm method=get action=\"_gwcgi_\">\n" 633 633 << "<input type=hidden name=a value=\"q\">\n" 634 << "<input type=hidden name=site value=\"_cgiargsite_\"\n" 634 635 << "<input type=hidden name=e value=\"_compressedoptions_\">\n" 635 636 << "<input type=hidden name=ccp value=\"1\">\n" -
trunk/gsdl/src/recpt/receptionist.cpp
r1856 r1860 890 890 if (!a->do_action (args, &protocols, &browsers, disp, (*outconverter), contentout, logout)) 891 891 return false; 892 893 892 } else { 894 893 // the action was not found!! … … 1138 1137 bool first = true; 1139 1138 1139 cout << "Action is " << a->get_action_name() << endl; 1140 1140 1141 text_tmap::iterator params_here = configinfo.pageparams.begin(); 1141 1142 text_tmap::iterator params_end = configinfo.pageparams.end(); … … 1156 1157 disp.openpage(pageparams, configinfo.macroprecedence); 1157 1158 1158 1159 1159 // define external macros for each action 1160 1160 actionptrmap::iterator actionhere = actions.begin (); … … 1163 1163 while (actionhere != actionend) { 1164 1164 assert ((*actionhere).second.a != NULL); 1165 if ((*actionhere).second.a != NULL) 1165 if ((*actionhere).second.a != NULL) { 1166 1166 (*actionhere).second.a->define_external_macros (disp, args, &protocols, logout); 1167 } 1167 1168 actionhere++; 1168 1169 } … … 1185 1186 disp.setmacro ("httpimg", "Global", configinfo.httpimg); 1186 1187 disp.setmacro ("httpprefix", "Global", configinfo.httpprefix); 1188 1189 if (!collection.empty()) { 1190 // DB // **** 1191 ColInfoResponse_t cinfo; 1192 comerror_t err; 1193 recptproto *collectproto = protocols.getrecptproto (collection, logout); 1194 if (collectproto != NULL) { 1195 collectproto->get_collectinfo (collection, cinfo, err, logout); 1196 text_t httpcollection 1197 = "http://" + cinfo.httpdomain + cinfo.httpprefix 1198 +"/collect/" + collection; 1199 1200 disp.setmacro ("httpcollection", "Global", httpcollection); 1201 } 1202 } 1203 1187 1204 text_t compressedoptions = get_compressed_arg(args, logout); 1188 1205 disp.setmacro ("compressedoptions", "Global", dm_safe(compressedoptions)); … … 1255 1272 } 1256 1273 } 1274 1275 text_t iconcollection; 1276 disp.expandstring ("Global", "_iconcollection_", iconcollection); 1277 if (!iconcollection.empty()) 1278 { 1279 if (iconcollection[0]=='/') 1280 { 1281 // local but with full path 1282 ColInfoResponse_t cinfo; 1283 comerror_t err; 1284 collectproto->get_collectinfo (collection, cinfo, err, logout); 1285 iconcollection = "http://" + cinfo.httpdomain + iconcollection; 1286 disp.setmacro("iconcollection","Global",iconcollection); 1287 } 1288 } 1257 1289 } 1258 1290 } … … 1304 1336 } 1305 1337 } 1338 1339 -
trunk/gsdl/src/recpt/receptionist.h
r1856 r1860 37 37 #include "cfgread.h" 38 38 #include "action.h" 39 #include "cnfgable.h" 39 40 40 41 // the MACROPRECEDENCE macro is used as a default. override … … 116 117 }; 117 118 118 class receptionist {119 class receptionist : public configurable { 119 120 protected: 120 121 recptconf configinfo; … … 188 189 // it contains. The configuration should take place after everything 189 190 // has been added but before the initialisation. 190 v irtual void configure (const text_t &key, const text_tarray &cfgline);191 void configure (const text_t &key, const text_tarray &cfgline); 191 192 virtual void configure (const text_t &key, const text_t &value); 192 193 const recptconf &get_configinfo () {return configinfo;} -
trunk/gsdl/src/recpt/recptconfig.cpp
r1285 r1860 27 27 #include "fileutil.h" 28 28 #include "cfgread.h" 29 #include "cnfgator.h" 29 30 30 31 … … 40 41 #endif 41 42 43 class __site_configuration : public configurable { 44 private: 45 text_t *gsdlhome; 46 text_t *httpdomain; 47 text_t *httpprefix; 48 int *maxrequests; 49 public: 50 __site_configuration (text_t *_gsdlhome, int *_maxrequests) { 51 gsdlhome = _gsdlhome; 52 httpdomain = NULL; 53 httpprefix = NULL; 54 maxrequests = _maxrequests; 55 } 56 57 __site_configuration (text_t *_gsdlhome, text_t *_httpdomain, 58 text_t *_httpprefix) { 59 gsdlhome = _gsdlhome; 60 httpdomain = _httpdomain; 61 httpprefix = _httpprefix; 62 maxrequests = NULL; 63 } 64 65 inline void configure (const text_t &key, const text_tarray &cfgline) { 66 if (key == "gsdlhome") { 67 *gsdlhome = cfgline[0]; 68 } 69 70 if (key == "httpprefix" && 71 httpprefix != NULL) { 72 *httpprefix = cfgline[0]; 73 } 74 75 if (key == "httpdomain" && 76 httpdomain != NULL) { 77 *httpdomain = cfgline[0]; 78 } 79 80 if (key == "maxrequests" && 81 maxrequests != NULL) { 82 *maxrequests = cfgline[0].getint(); 83 if ((*maxrequests) < 1) { 84 *maxrequests = 1; 85 } 86 } 87 } 88 }; 89 42 90 43 91 // reads site configuration file returning true on success … … 45 93 // gsdlsite.cfg should be in same directory as library executable 46 94 bool site_cfg_read (receptionist &recpt, text_t &gsdlhome, int &maxrequests) { 95 // initialise configurator, etc. 96 __site_configuration sitecfg (&gsdlhome, &maxrequests); 97 configurator gsdlconfigurator(&recpt); 47 98 99 gsdlconfigurator.add_configurable(&sitecfg); 100 101 // blank the gsdl home text 48 102 gsdlhome.clear(); 49 103 50 // Look for gsdlsite.cfg in same directory that executable is in. 51 text_tarray cfgline; 52 text_t key; 53 54 #ifdef GSDL_USE_IOS_H 55 ifstream confin ("gsdlsite.cfg", ios::in | ios::nocreate); 56 #else 57 ifstream confin ("gsdlsite.cfg", ios::in); 58 #endif 59 60 if (confin) { 61 while (read_cfg_line(confin, cfgline) >= 0) { 62 if (cfgline.size () >= 2) { 63 key = cfgline[0]; 64 cfgline.erase(cfgline.begin()); 65 66 if (key == "maxrequests") { 67 maxrequests = cfgline[0].getint(); 68 if (maxrequests < 1) maxrequests = 1; 69 } 70 71 if (key == "gsdlhome") 72 gsdlhome = cfgline[0]; 73 74 // configure the receptionist 75 recpt.configure (key, cfgline); 76 } 77 } 78 confin.close (); 104 if (gsdlconfigurator.configure("gsdlsite.cfg")) { 79 105 return true; 80 106 } … … 82 108 } 83 109 84 // this version just grabs gsdlhome, returning true 85 // unless unable to read gsdlsite.cfg 86 bool site_cfg_read (text_t &gsdlhome) { 110 // this version grabs gsdlhome, httpdomain and httpprefix, 111 // returns false if it can't find all of them 112 bool site_cfg_read (text_t &gsdlhome, text_t &httpdomain, 113 text_t &httpprefix) { 114 // get gsdlhome etc 115 __site_configuration sitecfg(&gsdlhome, &httpdomain, &httpprefix); 116 configurator gsdlconfigurator(&sitecfg); 87 117 88 118 gsdlhome.clear(); 119 httpdomain.clear(); 120 httpprefix.clear(); 89 121 90 // Look for gsdlsite.cfg in same directory that executable is in. 91 text_tarray cfgline; 92 text_t key; 122 if (gsdlconfigurator.configure("gsdlsite.cfg") && 123 !gsdlhome.empty() && !httpdomain.empty() && !httpprefix.empty()) { 124 return true; 125 } 93 126 94 #ifdef GSDL_USE_IOS_H 95 ifstream confin ("gsdlsite.cfg", ios::in | ios::nocreate); 96 #else 97 ifstream confin ("gsdlsite.cfg", ios::in); 98 #endif 127 return true; 99 128 100 if (confin) {101 while (read_cfg_line(confin, cfgline) >= 0) {102 if (cfgline.size () >= 2) {103 if (cfgline[0] == "gsdlhome") {104 gsdlhome = cfgline[1];105 break;106 }107 }108 }109 return true;110 confin.close ();111 }112 129 return false; 113 130 } … … 121 138 // read in the main configuration file 122 139 bool rv = false; 140 123 141 text_t key, filename; 124 142 text_tarray cfgline; … … 126 144 filename = filename_cat (filename, "main.cfg"); 127 145 if (file_exists (filename)) { 128 char *cstr = filename.getcstr(); 129 130 #ifdef GSDL_USE_IOS_H 131 ifstream confin (cstr, ios::in | ios::nocreate); 132 #else 133 ifstream confin (cstr, ios::in); 134 #endif 135 136 delete cstr; 137 138 if (confin) { 139 while (read_cfg_line(confin, cfgline) >= 0) { 140 if (cfgline.size () >= 2) { 141 key = cfgline[0]; 142 cfgline.erase(cfgline.begin()); 143 144 // configure the receptionist 145 recpt.configure (key, cfgline); 146 } 147 } 148 confin.close (); 149 rv = true; 150 } 146 rv = recpt.read_configfile(filename); 151 147 } 152 148 … … 165 161 166 162 if (!filename.empty()) { 167 char *cstr = filename.getcstr(); 168 169 #ifdef GSDL_USE_IOS_H 170 ifstream confin (cstr, ios::in | ios::nocreate); 171 #else 172 ifstream confin (cstr, ios::in); 173 #endif 174 175 delete cstr; 176 177 if (confin) { 178 while (read_cfg_line(confin, cfgline) >= 0) { 179 if (cfgline.size () >= 2) { 180 key = cfgline[0]; 181 cfgline.erase(cfgline.begin()); 182 183 // configure the receptionist 184 recpt.configure (key, cfgline); 185 } 186 } 187 confin.close (); 188 rv = true; 189 } 163 rv |= recpt.read_configfile(filename); 190 164 } 191 165 } -
trunk/gsdl/src/recpt/recptconfig.h
r1285 r1860 32 32 #include "text_t.h" 33 33 #include "receptionist.h" 34 #include "collectset.h" 34 35 35 36 36 37 // reads site configuration file returning true on success 37 38 bool site_cfg_read (receptionist &recpt, text_t &gsdlhome, int &maxrequests); 38 bool site_cfg_read (text_t &gsdlhome );39 bool site_cfg_read (text_t &gsdlhome, text_t &httpdomain, text_t &httpprefix); 39 40 40 41 // main_cfg_read reads either collect.cfg or main.cfg and returning -
trunk/gsdl/src/recpt/recptmain.cpp
r1285 r1860 33 33 return 0; 34 34 } 35 -
trunk/gsdl/src/recpt/recptproto.cpp
r1679 r1860 45 45 bool recptproto::init (ostream &/*logout*/) { 46 46 return true; 47 } 48 49 // get site name should return the name of the site used. 50 // This is trivially empty in the case of a null protocol. If a remote 51 // connection to a site is being used then this should return the name 52 // used to label a site 53 text_t recptproto::get_site_name() { 54 return ""; 47 55 } 48 56 -
trunk/gsdl/src/recpt/recptproto.h
r1679 r1860 67 67 // out to the log file and no other output should be produced. 68 68 virtual bool init (ostream &logout); 69 70 // get_site_name should return the name of the site used. 71 // This is trivially empty in the case of a null protocol. If a remote 72 // connection to a site is being used then this should return the name 73 // used to label a site 74 virtual text_t get_site_name(); 69 75 70 76 // get_protocol_name should return the name of this protocol (e.g. recptproto) -
trunk/gsdl/src/recpt/statusaction.cpp
r1837 r1860 73 73 74 74 textout << outconvert << disp 75 << "<tr><td><a href=\"_gwcgi_? e=_compressedoptions_&a=status&p=collectioninfo&pr="75 << "<tr><td><a href=\"_gwcgi_?_optsite_e=_compressedoptions_&a=status&p=collectioninfo&pr=" 76 76 << protoname 77 77 << "&c=" -
trunk/gsdl/src/txt2db/Makefile.in
r1004 r1860 29 29 AR = ar 30 30 CC = @CC@ 31 CPP = @CXX@ 31 32 CCFLAGS = -Wall @CFLAGS@ 32 33 DEFS = @DEFS@ … … 35 36 LDFLAGS = @LDFLAGS@ 36 37 DPLIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o 37 #LIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o -lstdc++ -lgdbm38 38 LIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o @LIBS@ 39 39 GSDLOS = @gsdlos@ … … 41 41 42 42 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS) 43 CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS) 44 MCOMPILE = mico-c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 43 45 LINK = $(CC) $(LDFLAGS) -o $@ 46 MLINK = mico-ld $(LDFLAGS) -lmico2.2.7 -o $@ 47 CPPLINK = $(CPP) $(LDFLAGS) -o $@ 44 48 45 49 .SUFFIXES: … … 50 54 .SUFFIXES: .cpp .o 51 55 .cpp.o: 52 $(C OMPILE) $<56 $(CPPCOMPILE) $< 53 57 58 .SUFFIXES: .mpp .o 59 .mpp.o: 60 $(MCOMPILE) $< 54 61 55 62 HEADERS = … … 82 89 83 90 txt2db: $(TXT2DB_OBJS) $(DPLIBS) 84 $( LINK) $(TXT2DB_OBJS) $(LIBS)91 $(MLINK) $(TXT2DB_OBJS) $(LIBS) 85 92 86 93
Note:
See TracChangeset
for help on using the changeset viewer.