Changeset 1860


Ignore:
Timestamp:
2001-01-26T07:26:45+13:00 (23 years ago)
Author:
cs025
Message:

Included CORBA branch for first time

Location:
trunk/gsdl
Files:
18 added
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/Makefile.in

    r1714 r1860  
    5757
    5858install:
     59
    5960    for idir in $(INSTALLDIRS); do \
    6061      echo installing $$idir; \
     
    7778    done
    7879
    79 
    8080# For an explanation of the following Makefile rules, see node
    8181# `Automatic Remaking' in GNU Autoconf documentation.
  • trunk/gsdl/acconfig.h

    r697 r1860  
    3838#undef USE_FASTCGI
    3939
     40/* Define USE_CORBA if needsbe */
     41#undef USE_CORBA
     42
     43/* Define MICO_DIR if needsbe */
     44#undef MICO_DIR
    4045
    4146
    4247
    4348
     49
  • trunk/gsdl/config.h.in

    r998 r1860  
    9999#undef USE_FASTCGI
    100100
     101/* Define USE_CORBA if needsbe */
     102#undef USE_CORBA
     103
     104/* Define MICO_DIR if needsbe */
     105#undef MICO_DIR
     106
    101107/* Define if you have the ftime function.  */
    102108#undef HAVE_FTIME
  • trunk/gsdl/configure

    r1722 r1860  
    1212ac_default_prefix=/usr/local
    1313# Any additions from configure.in:
     14ac_help="$ac_help
     15 --enable-corba     Enable CORBA support"
     16ac_help="$ac_help
     17  --with-micodir    Use installed MICO directory"
    1418ac_help="$ac_help
    1519  --with-dmalloc          use dmalloc, as in
     
    575579fi
    576580
     581
     582# Check whether --enable-corba or --disable-corba was given.
     583if test "${enable_corba+set}" = set; then
     584  enableval="$enable_corba"
     585  USE_CORBA=1
     586else
     587  USE_CORBA=0
     588fi
     589
     590cat >> confdefs.h <<\EOF
     591#define USE_CORBA 1
     592EOF
     593
     594
     595
     596# Check whether --with-micodir or --without-micodir was given.
     597if test "${with_micodir+set}" = set; then
     598  withval="$with_micodir"
     599  MICO_DIR=$enableval
     600else
     601  MICO_DIR="default"
     602fi
     603
     604cat >> confdefs.h <<\EOF
     605#define MICO_DIR 1
     606EOF
     607
     608
     609
    577610LDFLAGS=
    578611if test -z "$CFLAGS"; then
     
    584617set dummy gcc; ac_word=$2
    585618echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    586 echo "configure:587: checking for $ac_word" >&5
     619echo "configure:620: checking for $ac_word" >&5
    587620if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    588621  echo $ac_n "(cached) $ac_c" 1>&6
     
    614647set dummy cc; ac_word=$2
    615648echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    616 echo "configure:617: checking for $ac_word" >&5
     649echo "configure:650: checking for $ac_word" >&5
    617650if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    618651  echo $ac_n "(cached) $ac_c" 1>&6
     
    665698set dummy cl; ac_word=$2
    666699echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    667 echo "configure:668: checking for $ac_word" >&5
     700echo "configure:701: checking for $ac_word" >&5
    668701if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    669702  echo $ac_n "(cached) $ac_c" 1>&6
     
    697730
    698731echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    699 echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     732echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    700733
    701734ac_ext=c
     
    708741cat > conftest.$ac_ext << EOF
    709742
    710 #line 711 "configure"
     743#line 744 "configure"
    711744#include "confdefs.h"
    712745
    713746main(){return(0);}
    714747EOF
    715 if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     748if { (eval echo configure:749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    716749  ac_cv_prog_cc_works=yes
    717750  # If we can't run a trivial program, we are probably using a cross compiler.
     
    739772fi
    740773echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    741 echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     774echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    742775echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    743776cross_compiling=$ac_cv_prog_cc_cross
    744777
    745778echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    746 echo "configure:747: checking whether we are using GNU C" >&5
     779echo "configure:780: checking whether we are using GNU C" >&5
    747780if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    748781  echo $ac_n "(cached) $ac_c" 1>&6
     
    753786#endif
    754787EOF
    755 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     788if { 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
    756789  ac_cv_prog_gcc=yes
    757790else
     
    772805CFLAGS=
    773806echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    774 echo "configure:775: checking whether ${CC-cc} accepts -g" >&5
     807echo "configure:808: checking whether ${CC-cc} accepts -g" >&5
    775808if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    776809  echo $ac_n "(cached) $ac_c" 1>&6
     
    808841set dummy $ac_prog; ac_word=$2
    809842echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    810 echo "configure:811: checking for $ac_word" >&5
     843echo "configure:844: checking for $ac_word" >&5
    811844if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    812845  echo $ac_n "(cached) $ac_c" 1>&6
     
    840873
    841874echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    842 echo "configure:843: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
     875echo "configure:876: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
    843876
    844877ac_ext=C
     
    851884cat > conftest.$ac_ext << EOF
    852885
    853 #line 854 "configure"
     886#line 887 "configure"
    854887#include "confdefs.h"
    855888
    856889int main(){return(0);}
    857890EOF
    858 if { (eval echo configure:859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     891if { (eval echo configure:892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    859892  ac_cv_prog_cxx_works=yes
    860893  # If we can't run a trivial program, we are probably using a cross compiler.
     
    882915fi
    883916echo $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" >&5
     917echo "configure:918: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
    885918echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
    886919cross_compiling=$ac_cv_prog_cxx_cross
    887920
    888921echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
    889 echo "configure:890: checking whether we are using GNU C++" >&5
     922echo "configure:923: checking whether we are using GNU C++" >&5
    890923if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    891924  echo $ac_n "(cached) $ac_c" 1>&6
     
    896929#endif
    897930EOF
    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; then
     931if { 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
    899932  ac_cv_prog_gxx=yes
    900933else
     
    915948CXXFLAGS=
    916949echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
    917 echo "configure:918: checking whether ${CXX-g++} accepts -g" >&5
     950echo "configure:951: checking whether ${CXX-g++} accepts -g" >&5
    918951if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    919952  echo $ac_n "(cached) $ac_c" 1>&6
     
    946979fi
    947980
    948 for ac_prog in mawk gawk nawk awk
     981for ac_prog in gawk mawk nawk awk
    949982do
    950983# Extract the first word of "$ac_prog", so it can be a program name with args.
    951984set dummy $ac_prog; ac_word=$2
    952985echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    953 echo "configure:954: checking for $ac_word" >&5
     986echo "configure:987: checking for $ac_word" >&5
    954987if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
    955988  echo $ac_n "(cached) $ac_c" 1>&6
     
    9851018set dummy $ac_prog; ac_word=$2
    9861019echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    987 echo "configure:988: checking for $ac_word" >&5
     1020echo "configure:1021: checking for $ac_word" >&5
    9881021if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    9891022  echo $ac_n "(cached) $ac_c" 1>&6
     
    10461079# ./install, which can be erroneously created by make from ./install.sh.
    10471080echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    1048 echo "configure:1049: checking for a BSD compatible install" >&5
     1081echo "configure:1082: checking for a BSD compatible install" >&5
    10491082if test -z "$INSTALL"; then
    10501083if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    10991132
    11001133echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
    1101 echo "configure:1102: checking whether ln -s works" >&5
     1134echo "configure:1135: checking whether ln -s works" >&5
    11021135if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    11031136  echo $ac_n "(cached) $ac_c" 1>&6
     
    11201153
    11211154echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    1122 echo "configure:1123: checking whether ${MAKE-make} sets \${MAKE}" >&5
     1155echo "configure:1156: checking whether ${MAKE-make} sets \${MAKE}" >&5
    11231156set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    11241157if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    11491182set dummy ranlib; ac_word=$2
    11501183echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1151 echo "configure:1152: checking for $ac_word" >&5
     1184echo "configure:1185: checking for $ac_word" >&5
    11521185if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    11531186  echo $ac_n "(cached) $ac_c" 1>&6
     
    11791212
    11801213echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    1181 echo "configure:1182: checking how to run the C preprocessor" >&5
     1214echo "configure:1215: checking how to run the C preprocessor" >&5
    11821215# On Suns, sometimes $CPP names a directory.
    11831216if test -n "$CPP" && test -d "$CPP"; then
     
    11941227  # not just through cpp.
    11951228  cat > conftest.$ac_ext <<EOF
    1196 #line 1197 "configure"
     1229#line 1230 "configure"
    11971230#include "confdefs.h"
    11981231#include <assert.h>
     
    12001233EOF
    12011234ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1202 { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1235{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    12031236ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    12041237if test -z "$ac_err"; then
     
    12111244  CPP="${CC-cc} -E -traditional-cpp"
    12121245  cat > conftest.$ac_ext <<EOF
    1213 #line 1214 "configure"
     1246#line 1247 "configure"
    12141247#include "confdefs.h"
    12151248#include <assert.h>
     
    12171250EOF
    12181251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1219 { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    12201253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    12211254if test -z "$ac_err"; then
     
    12281261  CPP="${CC-cc} -nologo -E"
    12291262  cat > conftest.$ac_ext <<EOF
    1230 #line 1231 "configure"
     1263#line 1264 "configure"
    12311264#include "confdefs.h"
    12321265#include <assert.h>
     
    12341267EOF
    12351268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1236 { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1269{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    12371270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    12381271if test -z "$ac_err"; then
     
    12591292
    12601293echo $ac_n "checking for AIX""... $ac_c" 1>&6
    1261 echo "configure:1262: checking for AIX" >&5
     1294echo "configure:1295: checking for AIX" >&5
    12621295cat > conftest.$ac_ext <<EOF
    1263 #line 1264 "configure"
     1296#line 1297 "configure"
    12641297#include "confdefs.h"
    12651298#ifdef _AIX
     
    12831316
    12841317echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
    1285 echo "configure:1286: checking for POSIXized ISC" >&5
     1318echo "configure:1319: checking for POSIXized ISC" >&5
    12861319if test -d /etc/conf/kconfig.d &&
    12871320  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
     
    13051338ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
    13061339echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
    1307 echo "configure:1308: checking for minix/config.h" >&5
     1340echo "configure:1341: checking for minix/config.h" >&5
    13081341if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    13091342  echo $ac_n "(cached) $ac_c" 1>&6
    13101343else
    13111344  cat > conftest.$ac_ext <<EOF
    1312 #line 1313 "configure"
     1345#line 1346 "configure"
    13131346#include "confdefs.h"
    13141347#include <minix/config.h>
    13151348EOF
    13161349ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1317 { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1350{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    13181351ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    13191352if test -z "$ac_err"; then
     
    13531386
    13541387echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
    1355 echo "configure:1356: checking for ${CC-cc} option to accept ANSI C" >&5
     1388echo "configure:1389: checking for ${CC-cc} option to accept ANSI C" >&5
    13561389if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
    13571390  echo $ac_n "(cached) $ac_c" 1>&6
     
    13691402  CFLAGS="$ac_save_CFLAGS $ac_arg"
    13701403  cat > conftest.$ac_ext <<EOF
    1371 #line 1372 "configure"
     1404#line 1405 "configure"
    13721405#include "confdefs.h"
    13731406#if !defined(__STDC__) || __STDC__ != 1
     
    13811414; return 0; }
    13821415EOF
    1383 if { (eval echo configure:1384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1416if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13841417  rm -rf conftest*
    13851418  ac_cv_prog_cc_stdc="$ac_arg"; break
     
    14021435
    14031436echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
    1404 echo "configure:1405: checking for function prototypes" >&5
     1437echo "configure:1438: checking for function prototypes" >&5
    14051438if test "$ac_cv_prog_cc_stdc" != no; then
    14061439  echo "$ac_t""yes" 1>&6
     
    14161449
    14171450echo $ac_n "checking for working const""... $ac_c" 1>&6
    1418 echo "configure:1419: checking for working const" >&5
     1451echo "configure:1452: checking for working const" >&5
    14191452if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    14201453  echo $ac_n "(cached) $ac_c" 1>&6
    14211454else
    14221455  cat > conftest.$ac_ext <<EOF
    1423 #line 1424 "configure"
     1456#line 1457 "configure"
    14241457#include "confdefs.h"
    14251458
     
    14701503; return 0; }
    14711504EOF
    1472 if { (eval echo configure:1473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1505if { (eval echo configure:1506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    14731506  rm -rf conftest*
    14741507  ac_cv_c_const=yes
     
    14911524
    14921525echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    1493 echo "configure:1494: checking for ANSI C header files" >&5
     1526echo "configure:1527: checking for ANSI C header files" >&5
    14941527if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    14951528  echo $ac_n "(cached) $ac_c" 1>&6
    14961529else
    14971530  cat > conftest.$ac_ext <<EOF
    1498 #line 1499 "configure"
     1531#line 1532 "configure"
    14991532#include "confdefs.h"
    15001533#include <stdlib.h>
     
    15041537EOF
    15051538ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1506 { (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1539{ (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    15071540ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    15081541if test -z "$ac_err"; then
     
    15211554  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    15221555cat > conftest.$ac_ext <<EOF
    1523 #line 1524 "configure"
     1556#line 1557 "configure"
    15241557#include "confdefs.h"
    15251558#include <string.h>
     
    15391572  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    15401573cat > conftest.$ac_ext <<EOF
    1541 #line 1542 "configure"
     1574#line 1575 "configure"
    15421575#include "confdefs.h"
    15431576#include <stdlib.h>
     
    15601593else
    15611594  cat > conftest.$ac_ext <<EOF
    1562 #line 1563 "configure"
     1595#line 1596 "configure"
    15631596#include "confdefs.h"
    15641597#include <ctype.h>
     
    15711604
    15721605EOF
    1573 if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1606if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    15741607then
    15751608  :
     
    15951628
    15961629echo $ac_n "checking for off_t""... $ac_c" 1>&6
    1597 echo "configure:1598: checking for off_t" >&5
     1630echo "configure:1631: checking for off_t" >&5
    15981631if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    15991632  echo $ac_n "(cached) $ac_c" 1>&6
    16001633else
    16011634  cat > conftest.$ac_ext <<EOF
    1602 #line 1603 "configure"
     1635#line 1636 "configure"
    16031636#include "confdefs.h"
    16041637#include <sys/types.h>
     
    16281661
    16291662echo $ac_n "checking for size_t""... $ac_c" 1>&6
    1630 echo "configure:1631: checking for size_t" >&5
     1663echo "configure:1664: checking for size_t" >&5
    16311664if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    16321665  echo $ac_n "(cached) $ac_c" 1>&6
    16331666else
    16341667  cat > conftest.$ac_ext <<EOF
    1635 #line 1636 "configure"
     1668#line 1669 "configure"
    16361669#include "confdefs.h"
    16371670#include <sys/types.h>
     
    16611694
    16621695echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    1663 echo "configure:1664: checking whether time.h and sys/time.h may both be included" >&5
     1696echo "configure:1697: checking whether time.h and sys/time.h may both be included" >&5
    16641697if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    16651698  echo $ac_n "(cached) $ac_c" 1>&6
    16661699else
    16671700  cat > conftest.$ac_ext <<EOF
    1668 #line 1669 "configure"
     1701#line 1702 "configure"
    16691702#include "confdefs.h"
    16701703#include <sys/types.h>
     
    16751708; return 0; }
    16761709EOF
    1677 if { (eval echo configure:1678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1710if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    16781711  rm -rf conftest*
    16791712  ac_cv_header_time=yes
     
    16961729
    16971730echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
    1698 echo "configure:1699: checking whether struct tm is in sys/time.h or time.h" >&5
     1731echo "configure:1732: checking whether struct tm is in sys/time.h or time.h" >&5
    16991732if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    17001733  echo $ac_n "(cached) $ac_c" 1>&6
    17011734else
    17021735  cat > conftest.$ac_ext <<EOF
    1703 #line 1704 "configure"
     1736#line 1737 "configure"
    17041737#include "confdefs.h"
    17051738#include <sys/types.h>
     
    17091742; return 0; }
    17101743EOF
    1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1744if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    17121745  rm -rf conftest*
    17131746  ac_cv_struct_tm=time.h
     
    17321765if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
    17331766cat > conftest.$ac_ext <<EOF
    1734 #line 1735 "configure"
     1767#line 1768 "configure"
    17351768#include "confdefs.h"
    17361769#include <stdio.h>
     
    17401773; return 0; }
    17411774EOF
    1742 if { (eval echo configure:1743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1775if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    17431776  :
    17441777else
     
    17531786
    17541787echo $ac_n "checking for main in -lg""... $ac_c" 1>&6
    1755 echo "configure:1756: checking for main in -lg" >&5
     1788echo "configure:1789: checking for main in -lg" >&5
    17561789ac_lib_var=`echo g'_'main | sed 'y%./+-%__p_%'`
    17571790if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    17611794LIBS="-lg  $LIBS"
    17621795cat > conftest.$ac_ext <<EOF
    1763 #line 1764 "configure"
     1796#line 1797 "configure"
    17641797#include "confdefs.h"
    17651798
     
    17681801; return 0; }
    17691802EOF
    1770 if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1803if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17711804  rm -rf conftest*
    17721805  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17961829
    17971830echo $ac_n "checking for main in -lgdbm""... $ac_c" 1>&6
    1798 echo "configure:1799: checking for main in -lgdbm" >&5
     1831echo "configure:1832: checking for main in -lgdbm" >&5
    17991832ac_lib_var=`echo gdbm'_'main | sed 'y%./+-%__p_%'`
    18001833if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    18041837LIBS="-lgdbm  $LIBS"
    18051838cat > conftest.$ac_ext <<EOF
    1806 #line 1807 "configure"
     1839#line 1840 "configure"
    18071840#include "confdefs.h"
    18081841
     
    18111844; return 0; }
    18121845EOF
    1813 if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1846if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    18141847  rm -rf conftest*
    18151848  eval "ac_cv_lib_$ac_lib_var=yes"
     
    18391872
    18401873echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
    1841 echo "configure:1842: checking for main in -lm" >&5
     1874echo "configure:1875: checking for main in -lm" >&5
    18421875ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
    18431876if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    18471880LIBS="-lm  $LIBS"
    18481881cat > conftest.$ac_ext <<EOF
    1849 #line 1850 "configure"
     1882#line 1883 "configure"
    18501883#include "confdefs.h"
    18511884
     
    18541887; return 0; }
    18551888EOF
    1856 if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1889if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    18571890  rm -rf conftest*
    18581891  eval "ac_cv_lib_$ac_lib_var=yes"
     
    18821915
    18831916echo $ac_n "checking for main in -lstdc++""... $ac_c" 1>&6
    1884 echo "configure:1885: checking for main in -lstdc++" >&5
     1917echo "configure:1918: checking for main in -lstdc++" >&5
    18851918ac_lib_var=`echo stdc++'_'main | sed 'y%./+-%__p_%'`
    18861919if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    18901923LIBS="-lstdc++  $LIBS"
    18911924cat > conftest.$ac_ext <<EOF
    1892 #line 1893 "configure"
     1925#line 1926 "configure"
    18931926#include "confdefs.h"
    18941927
     
    18971930; return 0; }
    18981931EOF
    1899 if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1932if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    19001933  rm -rf conftest*
    19011934  eval "ac_cv_lib_$ac_lib_var=yes"
     
    19251958
    19261959echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
    1927 echo "configure:1928: checking for main in -lcrypt" >&5
     1960echo "configure:1961: checking for main in -lcrypt" >&5
    19281961ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
    19291962if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    19331966LIBS="-lcrypt  $LIBS"
    19341967cat > conftest.$ac_ext <<EOF
    1935 #line 1936 "configure"
     1968#line 1969 "configure"
    19361969#include "confdefs.h"
    19371970
     
    19401973; return 0; }
    19411974EOF
    1942 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1975if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    19431976  rm -rf conftest*
    19441977  eval "ac_cv_lib_$ac_lib_var=yes"
     
    19742007ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    19752008echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
    1976 echo "configure:1977: checking for $ac_hdr that defines DIR" >&5
     2009echo "configure:2010: checking for $ac_hdr that defines DIR" >&5
    19772010if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    19782011  echo $ac_n "(cached) $ac_c" 1>&6
    19792012else
    19802013  cat > conftest.$ac_ext <<EOF
    1981 #line 1982 "configure"
     2014#line 2015 "configure"
    19822015#include "confdefs.h"
    19832016#include <sys/types.h>
     
    19872020; return 0; }
    19882021EOF
    1989 if { (eval echo configure:1990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2022if { (eval echo configure:2023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    19902023  rm -rf conftest*
    19912024  eval "ac_cv_header_dirent_$ac_safe=yes"
     
    20122045if test $ac_header_dirent = dirent.h; then
    20132046echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
    2014 echo "configure:2015: checking for opendir in -ldir" >&5
     2047echo "configure:2048: checking for opendir in -ldir" >&5
    20152048ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
    20162049if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    20202053LIBS="-ldir  $LIBS"
    20212054cat > conftest.$ac_ext <<EOF
    2022 #line 2023 "configure"
     2055#line 2056 "configure"
    20232056#include "confdefs.h"
    20242057/* Override any gcc2 internal prototype to avoid an error.  */
     
    20312064; return 0; }
    20322065EOF
    2033 if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2066if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    20342067  rm -rf conftest*
    20352068  eval "ac_cv_lib_$ac_lib_var=yes"
     
    20532086else
    20542087echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
    2055 echo "configure:2056: checking for opendir in -lx" >&5
     2088echo "configure:2089: checking for opendir in -lx" >&5
    20562089ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
    20572090if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    20612094LIBS="-lx  $LIBS"
    20622095cat > conftest.$ac_ext <<EOF
    2063 #line 2064 "configure"
     2096#line 2097 "configure"
    20642097#include "confdefs.h"
    20652098/* Override any gcc2 internal prototype to avoid an error.  */
     
    20722105; return 0; }
    20732106EOF
    2074 if { (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2107if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    20752108  rm -rf conftest*
    20762109  eval "ac_cv_lib_$ac_lib_var=yes"
     
    20952128
    20962129echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    2097 echo "configure:2098: checking for ANSI C header files" >&5
     2130echo "configure:2131: checking for ANSI C header files" >&5
    20982131if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    20992132  echo $ac_n "(cached) $ac_c" 1>&6
    21002133else
    21012134  cat > conftest.$ac_ext <<EOF
    2102 #line 2103 "configure"
     2135#line 2136 "configure"
    21032136#include "confdefs.h"
    21042137#include <stdlib.h>
     
    21082141EOF
    21092142ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2110 { (eval echo configure:2111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2143{ (eval echo configure:2144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    21112144ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    21122145if test -z "$ac_err"; then
     
    21252158  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    21262159cat > conftest.$ac_ext <<EOF
    2127 #line 2128 "configure"
     2160#line 2161 "configure"
    21282161#include "confdefs.h"
    21292162#include <string.h>
     
    21432176  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    21442177cat > conftest.$ac_ext <<EOF
    2145 #line 2146 "configure"
     2178#line 2179 "configure"
    21462179#include "confdefs.h"
    21472180#include <stdlib.h>
     
    21642197else
    21652198  cat > conftest.$ac_ext <<EOF
    2166 #line 2167 "configure"
     2199#line 2200 "configure"
    21672200#include "confdefs.h"
    21682201#include <ctype.h>
     
    21752208
    21762209EOF
    2177 if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2210if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    21782211then
    21792212  :
     
    22022235ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    22032236echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2204 echo "configure:2205: checking for $ac_hdr" >&5
     2237echo "configure:2238: checking for $ac_hdr" >&5
    22052238if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    22062239  echo $ac_n "(cached) $ac_c" 1>&6
    22072240else
    22082241  cat > conftest.$ac_ext <<EOF
    2209 #line 2210 "configure"
     2242#line 2243 "configure"
    22102243#include "confdefs.h"
    22112244#include <$ac_hdr>
    22122245EOF
    22132246ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2214 { (eval echo configure:2215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2247{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    22152248ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    22162249if test -z "$ac_err"; then
     
    22392272
    22402273cat > conftest.$ac_ext <<EOF
    2241 #line 2242 "configure"
     2274#line 2275 "configure"
    22422275#include "confdefs.h"
    22432276#include <stdio.h>
     
    22542287
    22552288cat > conftest.$ac_ext <<EOF
    2256 #line 2257 "configure"
     2289#line 2290 "configure"
    22572290#include "confdefs.h"
    22582291#include <stdio.h>
     
    22692302
    22702303cat > conftest.$ac_ext <<EOF
    2271 #line 2272 "configure"
     2304#line 2305 "configure"
    22722305#include "confdefs.h"
    22732306#include <sys/procfs.h>
     
    22872320# for constant arguments.  Useless!
    22882321echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
    2289 echo "configure:2290: checking for working alloca.h" >&5
     2322echo "configure:2323: checking for working alloca.h" >&5
    22902323if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    22912324  echo $ac_n "(cached) $ac_c" 1>&6
    22922325else
    22932326  cat > conftest.$ac_ext <<EOF
    2294 #line 2295 "configure"
     2327#line 2328 "configure"
    22952328#include "confdefs.h"
    22962329#include <alloca.h>
     
    22992332; return 0; }
    23002333EOF
    2301 if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2334if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    23022335  rm -rf conftest*
    23032336  ac_cv_header_alloca_h=yes
     
    23202353
    23212354echo $ac_n "checking for alloca""... $ac_c" 1>&6
    2322 echo "configure:2323: checking for alloca" >&5
     2355echo "configure:2356: checking for alloca" >&5
    23232356if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    23242357  echo $ac_n "(cached) $ac_c" 1>&6
    23252358else
    23262359  cat > conftest.$ac_ext <<EOF
    2327 #line 2328 "configure"
     2360#line 2361 "configure"
    23282361#include "confdefs.h"
    23292362
     
    23532386; return 0; }
    23542387EOF
    2355 if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    23562389  rm -rf conftest*
    23572390  ac_cv_func_alloca_works=yes
     
    23852418
    23862419echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
    2387 echo "configure:2388: checking whether alloca needs Cray hooks" >&5
     2420echo "configure:2421: checking whether alloca needs Cray hooks" >&5
    23882421if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    23892422  echo $ac_n "(cached) $ac_c" 1>&6
    23902423else
    23912424  cat > conftest.$ac_ext <<EOF
    2392 #line 2393 "configure"
     2425#line 2426 "configure"
    23932426#include "confdefs.h"
    23942427#if defined(CRAY) && ! defined(CRAY2)
     
    24152448for ac_func in _getb67 GETB67 getb67; do
    24162449  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2417 echo "configure:2418: checking for $ac_func" >&5
     2450echo "configure:2451: checking for $ac_func" >&5
    24182451if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    24192452  echo $ac_n "(cached) $ac_c" 1>&6
    24202453else
    24212454  cat > conftest.$ac_ext <<EOF
    2422 #line 2423 "configure"
     2455#line 2456 "configure"
    24232456#include "confdefs.h"
    24242457/* System header to define __stub macros and hopefully few prototypes,
     
    24432476; return 0; }
    24442477EOF
    2445 if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2478if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    24462479  rm -rf conftest*
    24472480  eval "ac_cv_func_$ac_func=yes"
     
    24702503
    24712504echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
    2472 echo "configure:2473: checking stack direction for C alloca" >&5
     2505echo "configure:2506: checking stack direction for C alloca" >&5
    24732506if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    24742507  echo $ac_n "(cached) $ac_c" 1>&6
     
    24782511else
    24792512  cat > conftest.$ac_ext <<EOF
    2480 #line 2481 "configure"
     2513#line 2514 "configure"
    24812514#include "confdefs.h"
    24822515find_stack_direction ()
     
    24972530}
    24982531EOF
    2499 if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2532if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    25002533then
    25012534  ac_cv_c_stack_direction=1
     
    25202553if test $ac_cv_prog_gcc = yes; then
    25212554    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
    2522 echo "configure:2523: checking whether ${CC-cc} needs -traditional" >&5
     2555echo "configure:2556: checking whether ${CC-cc} needs -traditional" >&5
    25232556if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    25242557  echo $ac_n "(cached) $ac_c" 1>&6
     
    25262559    ac_pattern="Autoconf.*'x'"
    25272560  cat > conftest.$ac_ext <<EOF
    2528 #line 2529 "configure"
     2561#line 2562 "configure"
    25292562#include "confdefs.h"
    25302563#include <sgtty.h>
     
    25442577  if test $ac_cv_prog_gcc_traditional = no; then
    25452578    cat > conftest.$ac_ext <<EOF
    2546 #line 2547 "configure"
     2579#line 2580 "configure"
    25472580#include "confdefs.h"
    25482581#include <termio.h>
     
    25662599
    25672600echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
    2568 echo "configure:2569: checking return type of signal handlers" >&5
     2601echo "configure:2602: checking return type of signal handlers" >&5
    25692602if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    25702603  echo $ac_n "(cached) $ac_c" 1>&6
    25712604else
    25722605  cat > conftest.$ac_ext <<EOF
    2573 #line 2574 "configure"
     2606#line 2607 "configure"
    25742607#include "confdefs.h"
    25752608#include <sys/types.h>
     
    25882621; return 0; }
    25892622EOF
    2590 if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2623if { (eval echo configure:2624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    25912624  rm -rf conftest*
    25922625  ac_cv_type_signal=void
     
    26072640
    26082641echo $ac_n "checking for vprintf""... $ac_c" 1>&6
    2609 echo "configure:2610: checking for vprintf" >&5
     2642echo "configure:2643: checking for vprintf" >&5
    26102643if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
    26112644  echo $ac_n "(cached) $ac_c" 1>&6
    26122645else
    26132646  cat > conftest.$ac_ext <<EOF
    2614 #line 2615 "configure"
     2647#line 2648 "configure"
    26152648#include "confdefs.h"
    26162649/* System header to define __stub macros and hopefully few prototypes,
     
    26352668; return 0; }
    26362669EOF
    2637 if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2670if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    26382671  rm -rf conftest*
    26392672  eval "ac_cv_func_vprintf=yes"
     
    26592692if test "$ac_cv_func_vprintf" != yes; then
    26602693echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
    2661 echo "configure:2662: checking for _doprnt" >&5
     2694echo "configure:2695: checking for _doprnt" >&5
    26622695if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
    26632696  echo $ac_n "(cached) $ac_c" 1>&6
    26642697else
    26652698  cat > conftest.$ac_ext <<EOF
    2666 #line 2667 "configure"
     2699#line 2700 "configure"
    26672700#include "confdefs.h"
    26682701/* System header to define __stub macros and hopefully few prototypes,
     
    26872720; return 0; }
    26882721EOF
    2689 if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2722if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    26902723  rm -rf conftest*
    26912724  eval "ac_cv_func__doprnt=yes"
     
    27142747do
    27152748echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2716 echo "configure:2717: checking for $ac_func" >&5
     2749echo "configure:2750: checking for $ac_func" >&5
    27172750if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    27182751  echo $ac_n "(cached) $ac_c" 1>&6
    27192752else
    27202753  cat > conftest.$ac_ext <<EOF
    2721 #line 2722 "configure"
     2754#line 2755 "configure"
    27222755#include "confdefs.h"
    27232756/* System header to define __stub macros and hopefully few prototypes,
     
    27422775; return 0; }
    27432776EOF
    2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2777if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    27452778  rm -rf conftest*
    27462779  eval "ac_cv_func_$ac_func=yes"
     
    27692802do
    27702803echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2771 echo "configure:2772: checking for $ac_func" >&5
     2804echo "configure:2805: checking for $ac_func" >&5
    27722805if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    27732806  echo $ac_n "(cached) $ac_c" 1>&6
    27742807else
    27752808  cat > conftest.$ac_ext <<EOF
    2776 #line 2777 "configure"
     2809#line 2810 "configure"
    27772810#include "confdefs.h"
    27782811/* System header to define __stub macros and hopefully few prototypes,
     
    27972830; return 0; }
    27982831EOF
    2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2832if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    28002833  rm -rf conftest*
    28012834  eval "ac_cv_func_$ac_func=yes"
     
    28282861# ---------------------------------------------------------------------------
    28292862echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6
    2830 echo "configure:2831: checking for HP-UX needing gmalloc" >&5
     2863echo "configure:2864: checking for HP-UX needing gmalloc" >&5
    28312864if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
    28322865  echo "$ac_t""yes" 1>&6
     
    28412874do
    28422875echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2843 echo "configure:2844: checking for $ac_func" >&5
     2876echo "configure:2877: checking for $ac_func" >&5
    28442877if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    28452878  echo $ac_n "(cached) $ac_c" 1>&6
    28462879else
    28472880  cat > conftest.$ac_ext <<EOF
    2848 #line 2849 "configure"
     2881#line 2882 "configure"
    28492882#include "confdefs.h"
    28502883/* System header to define __stub macros and hopefully few prototypes,
     
    28692902; return 0; }
    28702903EOF
    2871 if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2904if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    28722905  rm -rf conftest*
    28732906  eval "ac_cv_func_$ac_func=yes"
     
    28962929
    28972930echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
    2898 echo "configure:2899: checking if malloc debugging is wanted" >&5
     2931echo "configure:2932: checking if malloc debugging is wanted" >&5
    28992932# Check whether --with-dmalloc or --without-dmalloc was given.
    29002933if test "${with_dmalloc+set}" = set; then
     
    29172950
    29182951echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6
    2919 echo "configure:2920: checking which of rx or regex is wanted" >&5
     2952echo "configure:2953: checking which of rx or regex is wanted" >&5
    29202953# Check whether --with-regex or --without-regex was given.
    29212954if test "${with_regex+set}" = set; then
     
    29352968  echo "$ac_t""rx" 1>&6
    29362969  echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6
    2937 echo "configure:2938: checking for re_rx_search" >&5
     2970echo "configure:2971: checking for re_rx_search" >&5
    29382971if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then
    29392972  echo $ac_n "(cached) $ac_c" 1>&6
    29402973else
    29412974  cat > conftest.$ac_ext <<EOF
    2942 #line 2943 "configure"
     2975#line 2976 "configure"
    29432976#include "confdefs.h"
    29442977/* System header to define __stub macros and hopefully few prototypes,
     
    29632996; return 0; }
    29642997EOF
    2965 if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2998if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29662999  rm -rf conftest*
    29673000  eval "ac_cv_func_re_rx_search=yes"
     
    30033036
    30043037echo $ac_n "checking "that the GDBM library is available"""... $ac_c" 1>&6
    3005 echo "configure:3006: checking "that the GDBM library is available"" >&5
     3038echo "configure:3039: checking "that the GDBM library is available"" >&5
    30063039cat > conftest.$ac_ext <<EOF
    3007 #line 3008 "configure"
     3040#line 3041 "configure"
    30083041#include "confdefs.h"
    30093042#include <gdbm.h>
     
    30133046; return 0; }
    30143047EOF
    3015 if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3048if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    30163049  rm -rf conftest*
    30173050  success=yes
     
    30303063
    30313064echo $ac_n "checking "that Perl 5 is available"""... $ac_c" 1>&6
    3032 echo "configure:3033: checking "that Perl 5 is available"" >&5
     3065echo "configure:3066: checking "that Perl 5 is available"" >&5
    30333066success="no"
    30343067pl_path="$PATH"
     
    30603093success=no
    30613094echo $ac_n "checking "whether STL library has known faults"""... $ac_c" 1>&6
    3062 echo "configure:3063: checking "whether STL library has known faults"" >&5
     3095echo "configure:3096: checking "whether STL library has known faults"" >&5
    30633096
    30643097cat > conftest.$ac_ext <<EOF
    3065 #line 3066 "configure"
     3098#line 3099 "configure"
    30663099#include "confdefs.h"
    30673100#include <vector>
     
    30713104; return 0; }
    30723105EOF
    3073 if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3106if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    30743107  rm -rf conftest*
    30753108  success=yes
     
    30823115if test $success = "no"; then
    30833116cat > conftest.$ac_ext <<EOF
    3084 #line 3085 "configure"
     3117#line 3118 "configure"
    30853118#include "confdefs.h"
    30863119#include <vector.h>
     
    30903123; return 0; }
    30913124EOF
    3092 if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3125if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    30933126  rm -rf conftest*
    30943127  success="yes"
     
    31023135if test $success = "no"; then
    31033136cat > conftest.$ac_ext <<EOF
    3104 #line 3105 "configure"
     3137#line 3138 "configure"
    31053138#include "confdefs.h"
    31063139#include <ospace\\std\\vector>
     
    31103143; return 0; }
    31113144EOF
    3112 if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3145if { (eval echo configure:3146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    31133146  rm -rf conftest*
    31143147  success="yes"
     
    31313164
    31323165echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6
    3133 echo "configure:3134: checking for HP-UX needing gmalloc" >&5
     3166echo "configure:3167: checking for HP-UX needing gmalloc" >&5
    31343167if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
    31353168  echo "$ac_t""yes" 1>&6
     
    31443177do
    31453178echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3146 echo "configure:3147: checking for $ac_func" >&5
     3179echo "configure:3180: checking for $ac_func" >&5
    31473180if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    31483181  echo $ac_n "(cached) $ac_c" 1>&6
    31493182else
    31503183  cat > conftest.$ac_ext <<EOF
    3151 #line 3152 "configure"
     3184#line 3185 "configure"
    31523185#include "confdefs.h"
    31533186/* System header to define __stub macros and hopefully few prototypes,
     
    31753208; return 0; }
    31763209EOF
    3177 if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3210if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    31783211  rm -rf conftest*
    31793212  eval "ac_cv_func_$ac_func=yes"
     
    32023235
    32033236echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
    3204 echo "configure:3205: checking if malloc debugging is wanted" >&5
     3237echo "configure:3238: checking if malloc debugging is wanted" >&5
    32053238# Check whether --with-dmalloc or --without-dmalloc was given.
    32063239if test "${with_dmalloc+set}" = set; then
     
    32233256
    32243257echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6
    3225 echo "configure:3226: checking which of rx or regex is wanted" >&5
     3258echo "configure:3259: checking which of rx or regex is wanted" >&5
    32263259# Check whether --with-regex or --without-regex was given.
    32273260if test "${with_regex+set}" = set; then
     
    32413274  echo "$ac_t""rx" 1>&6
    32423275  echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6
    3243 echo "configure:3244: checking for re_rx_search" >&5
     3276echo "configure:3277: checking for re_rx_search" >&5
    32443277if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then
    32453278  echo $ac_n "(cached) $ac_c" 1>&6
    32463279else
    32473280  cat > conftest.$ac_ext <<EOF
    3248 #line 3249 "configure"
     3281#line 3282 "configure"
    32493282#include "confdefs.h"
    32503283/* System header to define __stub macros and hopefully few prototypes,
     
    32723305; return 0; }
    32733306EOF
    3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3307if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    32753308  rm -rf conftest*
    32763309  eval "ac_cv_func_re_rx_search=yes"
     
    34473480s%@VERSION@%$VERSION%g
    34483481s%@USE_FASTCGI@%$USE_FASTCGI%g
     3482s%@USE_CORBA@%$USE_CORBA%g
     3483s%@MICO_DIR@%$MICO_DIR%g
    34493484s%@CC@%$CC%g
    34503485s%@CXX@%$CXX%g
  • trunk/gsdl/configure.in

    r1722 r1860  
    1111AC_SUBST(VERSION)
    1212
     13dnl
     14dnl Set use of fast cgi
     15dnl
    1316USE_FASTCGI=0
    1417if test USE_FASTCGI = 1; then
     
    1619AC_SUBST(USE_FASTCGI)
    1720fi
     21
     22
     23dnl
     24dnl Set use of corba
     25dnl
     26AC_ARG_ENABLE(corba, [ --enable-corba     Enable CORBA support], USE_CORBA=1, USE_CORBA=0)
     27AC_DEFINE(USE_CORBA)
     28AC_SUBST(USE_CORBA, $(USE_CORBA))
     29
     30AC_ARG_WITH(micodir, [  --with-micodir    Use installed MICO directory], MICO_DIR=$enableval, MICO_DIR="default")
     31AC_DEFINE(MICO_DIR)
     32AC_SUBST(MICO_DIR, $(MICO_DIR))
    1833
    1934dnl Checks for programs.
  • trunk/gsdl/lib/Makefile.in

    r1283 r1860  
    2828AR = ar
    2929CC = @CC@
     30CPP = @CXX@
    3031#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
    3132CCFLAGS = @CFLAGS@
     33MCFLAGS = @CFLAGS@ -Wall -Wunused
    3234DEFS = @DEFS@
    33 INCLUDES = -I../packages/mg/lib
     35INCLUDES = -I../packages/mg/lib -I..
     36MICO_DIR = @MICO_DIR@
     37ifeq ($(MICO_DIR), default)
     38MICO_INC = -I../packages/mico/include
     39else
     40ifeq ($(MICO_DIR), yes)
     41MICO_INC =
     42else
     43MICO_INC = -I$(MICO_DIR)
     44endif
     45endif
     46MINCLUDES = -I. -I../packages/mg/lib $(MICO_INC) -I..
    3447RANLIB = @RANLIB@
     48USE_CORBA = @USE_CORBA@
    3549
    3650COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
     51CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
     52
     53ifneq ($(USE_CORBA), 0)
     54MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
     55else
     56MCOMPILE = $(COMPILE)
     57endif
    3758
    3859.SUFFIXES:
     
    4364.SUFFIXES: .cpp .o
    4465.cpp.o:
    45     $(COMPILE) $<
     66    $(CPPCOMPILE) $<
     67
     68.SUFFIXES: .mpp .o
     69.mpp.o:
     70    $(MCOMPILE) $<
    4671
    4772
     73ifneq ($(USE_CORBA), 0)
     74CORBAHEADERS = \
     75  corbaconv_text_t.h corbatext_t.h
     76CORBASOURCES = \
     77  corbaiface.mpp    corbatext_t.mpp  corbaconv_text_t.mpp
     78CORBAOBJECTS = \
     79  corbaiface.o      corbatext_t.o    corbaconv_text_t.o
     80else
     81CORBAHEADERS =
     82CORBASOURCE =
     83CORBAOBJECTS =
     84endif
     85
    4886HEADERS = \
    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
    5191
    5292SOURCES = \
    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)
    5596
    5697OBJECTS = \
    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)
    59101
    60102
    61103all: gsdllib.a
    62104
     105corbaiface.mpp: corbaiface.idl
     106    idl --c++-suffix=mpp $?
    63107
    64108GSDLLIBOBJECTS = $(OBJECTS)
     
    69113    $(RANLIB) gsdllib.a
    70114
    71 distclean:
    72     rm -f $(OBJECTS) gsdllib.a Makefile
    73 
    74115clean:
    75116    rm -f $(OBJECTS) gsdllib.a
     
    79120depend:
    80121    makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
     122
     123
     124
     125
  • trunk/gsdl/lib/display.cpp

    r1495 r1860  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
     24 * $Id$
     25 *
    2426 *********************************************************************/
    2527
     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 */
    2695#include "display.h"
    2796#include "gsdlunicode.h"
     
    15651634    }
    15661635
     1636  // GRB: deal with remaining code properly as it faults
     1637  return false;
     1638
    15671639  if (logout != NULL) {
    15681640    (*logout) << text_t2ascii << "Warning: _" <<
  • trunk/gsdl/lib/text_t.cpp

    r1310 r1860  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
     24 * $Id$
     25 *
    2426 *********************************************************************/
     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 */
    2586
    2687#include "text_t.h"
     
    3899#endif
    39100
     101#ifdef HAVE_CONFIG_H
     102# ifdef __WIN32__
     103#  include "WIN32cfg.h"
     104# else
     105#  include "config.h"
     106# endif
     107#endif
     108
    40109
    41110#include "unitool.h"
     
    44113// text_t methods
    45114////////////////////////////////////
     115
     116// new stream converter ...
     117ostream& 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}
    46143
    47144text_t::text_t ()
     
    64161  appendcstr (s);
    65162}
     163
    66164
    67165void text_t::append (const text_t &t)
     
    265363    }
    266364  return first;
     365}
     366
     367text_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
    267393}
    268394
  • trunk/gsdl/lib/text_t.h

    r1596 r1860  
    2121 * along with this program; if not, write to the Free Software
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     23 *
     24 * $Id$
    2325 *
    2426 *********************************************************************/
     
    9799  unsigned short getencoding () {return encoding;};
    98100
     101  usvector& text_as_usvector() { return text ; };
     102  const usvector& text_as_usvector() const { return text ; };
     103
    99104  // basic container support
    100105  iterator begin () {return text.begin();}
     
    162167  char *getcarr(size_type &len) const;
    163168  char *getcstr() const;
    164 };
    165 
     169
     170};
     171
     172// new stream converter ...
     173ostream& operator<< (ostream &o, const text_t text);
    166174
    167175inline text_t operator+(const text_t &t1, const text_t &t2)
     
    216224text_t::iterator findchar (text_t::iterator first, text_t::iterator last,
    217225               unsigned short c);
     226
     227text_t::iterator findword (text_t::iterator first, text_t::iterator last,
     228               const text_t &word);
    218229
    219230// get a string up to the next delimiter (which is skipped)
  • trunk/gsdl/packages/Makefile

    r1715 r1860  
    3030# clean, and distclean.
    3131
    32 PACKAGEDIRS = unix/wv/wv-0.6.0-gs  wget/wget-1.5.3 yaz
     32PACKAGEDIRS = wv #wget yaz
    3333
    3434all:
  • 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 YYMINOR 9
    7 #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
    1212 
    1313#include "sysfuncs.h"
     
    4848static u_long invf_ptr;
    4949static u_long invf_len;
    50 #line 65 "bool_parser.y"
     50
     51#line 66 "bool_parser.y"
    5152typedef union {
    5253  char *text;
    5354  bool_tree_node *node;
    5455} 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
     72static 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
     102static const short yyprhs[] = {     0,
     103     0,     2,     4,     8,    10,    12,    14,    17,    21,    24,
     104    26,    30
     105};
     106
     107static 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
     117static 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
     126static const char * const yytname[] = {   "$","error","$undefined.","TERM","'('",
     127"')'","'*'","'_'","'!'","'&'","'|'","query","term","not","and","or", NULL
     128};
     129#endif
     130
     131static const short yyr1[] = {     0,
     132    11,    12,    12,    12,    12,    13,    13,    14,    14,    14,
     133    15,    15
     134};
     135
     136static const short yyr2[] = {     0,
     137     1,     1,     3,     1,     1,     1,     2,     3,     2,     1,
     138     3,     1
     139};
     140
     141static 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
     146static const short yydefgoto[] = {    18,
     147     6,     7,     8,     9
     148};
     149
     150static 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
     155static const short yypgoto[] = {-32768,
     156-32768,    -5,   -12,    18
     157};
     158
     159
     160#define YYLAST      24
     161
     162
     163static 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
     169static 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) \
     272do                              \
     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; }  \
     281while (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
     310int yychar;         /*  the lookahead symbol        */
     311YYSTYPE yylval;         /*  the semantic value of the       */
     312                /*  lookahead symbol            */
     313
     314#ifdef YYLSP_NEEDED
     315YYLTYPE yylloc;         /*  location data for the lookahead */
     316                /*  symbol              */
     317#endif
     318
     319int yynerrs;            /*  number of parse errors so far       */
     320#endif  /* not YYPURE */
     321
     322#if YYDEBUG != 0
     323int 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
    168338#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.  */
     358static 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.  */
     376static 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
     415int yyparse (void *);
    170416#else
    171 #ifdef YYMAXDEPTH
    172 #define YYSTACKSIZE YYMAXDEPTH
     417int yyparse (void);
     418#endif
     419#endif
     420
     421int
     422yyparse(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--)
    173444#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.  */
     490yynewstate:
     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.  */
     689yydefault:
     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.  */
     696yyreduce:
     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
     719case 1:
     720#line 76 "bool_parser.y"
     721{ tree_base = yyvsp[0].node;;
     722    break;}
     723case 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;}
     727case 3:
     728#line 81 "bool_parser.y"
     729{ yyval.node = yyvsp[-1].node; ;
     730    break;}
     731case 4:
     732#line 82 "bool_parser.y"
     733{ yyval.node = CreateBoolTreeNode(N_all, NULL, NULL); ;
     734    break;}
     735case 5:
     736#line 83 "bool_parser.y"
     737{ yyval.node = CreateBoolTreeNode(N_none, NULL, NULL); ;
     738    break;}
     739case 7:
     740#line 87 "bool_parser.y"
     741{ yyval.node = CreateBoolTreeNode(N_not, yyvsp[0].node, NULL); ;
     742    break;}
     743case 8:
     744#line 90 "bool_parser.y"
     745{ yyval.node = CreateBoolTreeNode(N_and, yyvsp[-2].node, yyvsp[0].node); ;
     746    break;}
     747case 9:
     748#line 91 "bool_parser.y"
     749{ yyval.node = CreateBoolTreeNode(N_and, yyvsp[-1].node, yyvsp[0].node); ;
     750    break;}
     751case 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
     811yyerrlab:   /* 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;
     863yyerrlab1:   /* 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
     888yyerrdefault:  /* 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
     897yyerrpop:   /* 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
     917yyerrhandle:
     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}
    189978#line 99 "bool_parser.y"
     979
    190980 
    191981/* Bison on one mips machine defined "const" to be nothing but
     
    3811171bool_tree_node *
    3821172ParseBool(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,
    3851174      stemmed_dict * the_sd, int is_indexed,   /* [RPAP - Jan 97: Stem Index Change] */
    3861175      QueryTermList **the_query_term_list)  /* [RPAP - Feb 97: Term Frequency] */
     
    4071196 
    4081197
    409 #line 407 "y.tab.c"
    410 #define YYABORT goto yyabort
    411 #define YYREJECT goto yyabort
    412 #define YYACCEPT goto yyaccept
    413 #define YYERROR goto yyerrlab
    414 int
    415 yyparse()
    416 {
    417     register int yym, yyn, yystate;
    418 #if YYDEBUG
    419     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 #endif
    429 
    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 YYDEBUG
    444         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 #endif
    453     }
    454     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
    455             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    456     {
    457 #if YYDEBUG
    458         if (yydebug)
    459             printf("%sdebug: state %d, shifting to state %d\n",
    460                     YYPREFIX, yystate, yytable[yyn]);
    461 #endif
    462         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 lint
    480     goto yynewerror;
    481 #endif
    482 yynewerror:
    483     yyerror("syntax error");
    484 #ifdef lint
    485     goto yyerrlab;
    486 #endif
    487 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 YYDEBUG
    499                 if (yydebug)
    500                     printf("%sdebug: state %d, error recovery shifting\
    501  to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
    502 #endif
    503                 if (yyssp >= yyss + yystacksize - 1)
    504                 {
    505                     goto yyoverflow;
    506                 }
    507                 *++yyssp = yystate = yytable[yyn];
    508                 *++yyvsp = yylval;
    509                 goto yyloop;
    510             }
    511             else
    512             {
    513 #if YYDEBUG
    514                 if (yydebug)
    515                     printf("%sdebug: error recovery discarding state %d\n",
    516                             YYPREFIX, *yyssp);
    517 #endif
    518                 if (yyssp <= yyss) goto yyabort;
    519                 --yyssp;
    520                 --yyvsp;
    521             }
    522         }
    523     }
    524     else
    525     {
    526         if (yychar == 0) goto yyabort;
    527 #if YYDEBUG
    528         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 #endif
    537         yychar = (-1);
    538         goto yyloop;
    539     }
    540 yyreduce:
    541 #if YYDEBUG
    542     if (yydebug)
    543         printf("%sdebug: state %d, reducing by rule %d (%s)\n",
    544                 YYPREFIX, yystate, yyn, yyrule[yyn]);
    545 #endif
    546     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 YYDEBUG
    595         if (yydebug)
    596             printf("%sdebug: after reduction, shifting from state 0 to\
    597  state %d\n", YYPREFIX, YYFINAL);
    598 #endif
    599         yystate = YYFINAL;
    600         *++yyssp = YYFINAL;
    601         *++yyvsp = yyval;
    602         if (yychar < 0)
    603         {
    604             if ((yychar = yylex()) < 0) yychar = 0;
    605 #if YYDEBUG
    606             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 #endif
    615         }
    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     else
    623         yystate = yydgoto[yym];
    624 #if YYDEBUG
    625     if (yydebug)
    626         printf("%sdebug: after reduction, shifting from state %d \
    627 to state %d\n", YYPREFIX, *yyssp, yystate);
    628 #endif
    629     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  
    1111# PARTICULAR PURPOSE.
    1212
    13 #######
    14 # Modified for the NZDL Greenstone project. The original is still in
    15 # Makefile.am, for processing with automake.
    16 #######
    1713
    1814SHELL = @SHELL@
     
    4541top_builddir = .
    4642
     43ACLOCAL = @ACLOCAL@
     44AUTOCONF = @AUTOCONF@
     45AUTOMAKE = @AUTOMAKE@
     46AUTOHEADER = @AUTOHEADER@
     47
     48INSTALL = @INSTALL@
     49INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
     50INSTALL_DATA = @INSTALL_DATA@
     51INSTALL_SCRIPT = @INSTALL_SCRIPT@
     52transform = @program_transform_name@
     53
     54NORMAL_INSTALL = :
     55PRE_INSTALL = :
     56POST_INSTALL = :
     57NORMAL_UNINSTALL = :
     58PRE_UNINSTALL = :
     59POST_UNINSTALL = :
    4760ASNMODULE = @ASNMODULE@
    4861CC = @CC@
     
    5972have_sgml2txt = @have_sgml2txt@
    6073
     74AUTOMAKE_OPTIONS = foreign
     75
    6176DIST_SUBDIRS = util odr z39.50 asn ill zutil comstack ccl tab retrieval server lib include client ztest doc
    6277
    6378SUBDIRS = @SUBDIRS_VAR@
    6479
     80noinst_SCRIPTS = yaz-config
    6581SPEC_FILE = $(PACKAGE).spec
    6682EXTRA_DIST = $(SPEC_FILE) README LICENSE CHANGELOG TODO windows.txt
    6783ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    6884mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    69 CONFIG_CLEAN_FILES = config.status config.cache config.log
     85CONFIG_CLEAN_FILES =
     86SCRIPTS =  $(noinst_SCRIPTS)
    7087
    7188DIST_COMMON =  Makefile.am Makefile.in TODO aclocal.m4 configure \
     
    7592DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
    7693
    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)
     94TAR = gtar
     95GZIP_ENV = --best
     96all: 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
     101Makefile: $(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
     108config.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)
    104112
    105113# This directory's subdirectories are mostly independent; you can cd
     
    110118# (2) otherwise, pass the desired values on the `make' command line.
    111119
    112 # @SET_MAKE@
    113 
    114 clean-recursive all-recursive:
    115     set fnord $(MAKEFLAGS); amf=$$2; \
     120@SET_MAKE@
     121
     122all-recursive install-data-recursive install-exec-recursive \
     123installdirs-recursive install-recursive uninstall-recursive  \
     124check-recursive installcheck-recursive info-recursive dvi-recursive:
     125    @set fnord $(MAKEFLAGS); amf=$$2; \
     126    dot_seen=no; \
    116127    target=`echo $@ | sed s/-recursive//`; \
    117128    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) \
    119137       || 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
     143mostlyclean-recursive clean-recursive distclean-recursive \
     144maintainer-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"
     163tags-recursive:
     164    list='$(SUBDIRS)'; for subdir in $$list; do \
     165      test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
     166    done
     167
     168tags: TAGS
     169
     170ID: $(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
     178TAGS: 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
     193mostlyclean-tags:
     194
     195clean-tags:
     196
     197distclean-tags:
     198    -rm -f TAGS ID
     199
     200maintainer-clean-tags:
    126201
    127202distdir = $(PACKAGE)-$(VERSION)
    128203top_distdir = $(distdir)
    129204
    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.
     208distcheck: 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"
     228dist: distdir
     229    -chmod -R a+r $(distdir)
     230    GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
     231    -rm -rf $(distdir)
     232dist-all: distdir
     233    -chmod -R a+r $(distdir)
     234    GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
     235    -rm -rf $(distdir)
     236distdir: $(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
     261info-am:
     262info: info-recursive
     263dvi-am:
     264dvi: dvi-recursive
     265check-am: all-am
     266check: check-recursive
     267installcheck-am:
     268installcheck: installcheck-recursive
     269install-exec-am:
     270install-exec: install-exec-recursive
     271
     272install-data-am:
     273install-data: install-data-recursive
     274
     275install-am: all-am
     276    @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
     277install: install-recursive
     278uninstall-am:
     279uninstall: uninstall-recursive
     280all-am: Makefile $(SCRIPTS)
     281all-redirect: all-recursive
     282install-strip:
     283    $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
     284installdirs: installdirs-recursive
     285installdirs-am:
     286
     287
     288mostlyclean-generic:
     289
     290clean-generic:
     291
     292distclean-generic:
     293    -rm -f Makefile $(CONFIG_CLEAN_FILES)
     294    -rm -f config.cache config.log stamp-h stamp-h[0-9]*
     295
     296maintainer-clean-generic:
     297mostlyclean-am:  mostlyclean-tags mostlyclean-generic
     298
     299mostlyclean: mostlyclean-recursive
     300
     301clean-am:  clean-tags clean-generic mostlyclean-am
     302
     303clean: clean-recursive
     304
     305distclean-am:  distclean-tags distclean-generic clean-am
     306
     307distclean: distclean-recursive
     308    -rm -f config.status
     309
     310maintainer-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
     315maintainer-clean: maintainer-clean-recursive
     316    -rm -f config.status
     317
     318.PHONY: install-data-recursive uninstall-data-recursive \
     319install-exec-recursive uninstall-exec-recursive installdirs-recursive \
     320uninstalldirs-recursive all-recursive check-recursive \
     321installcheck-recursive info-recursive dvi-recursive \
     322mostlyclean-recursive distclean-recursive clean-recursive \
     323maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
     324distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
     325dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
     326install-exec install-data-am install-data install-am install \
     327uninstall-am uninstall all-redirect all-am all installdirs-am \
     328installdirs mostlyclean-generic distclean-generic clean-generic \
     329maintainer-clean-generic clean mostlyclean distclean maintainer-clean
     330
    134331
    135332yaz-config:
  • trunk/gsdl/packages/yaz/include/yaz/proto.h

    r1713 r1860  
    55 *
    66 * $Log$
    7  * Revision 1.3  2000/11/28 22:30:14  jrm21
    8  * Tidied up YAZ Makefiles and Makefiles.ins
     7 * Revision 1.4  2001/01/25 18:26:44  cs025
     8 * Included CORBA branch for first time
    99 *
    1010 * Revision 1.1  2000/08/03 03:11:01  johnmcp
  • trunk/gsdl/src/colservr/Makefile.in

    r1776 r1860  
    2828AR = ar
    2929CC = @CC@
     30CPP = @CXX@
    3031#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
    3132CCFLAGS = @CFLAGS@
     33MCFLAGS = @CFLAGS@ -Wall -Wunused
     34DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@
    3235
    3336USE_FASTCGI = @USE_FASTCGI@
     
    3740
    3841CGI_INCLUDES =
    39 
    4042else
    4143DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
     
    6567endif
    6668
    67 INCLUDES = -I../.. -I../../lib -I ../recpt \
     69INCLUDES = -I. -I../.. -I../../lib -I../recpt \
    6870        $(CGI_INCLUDES) $(MG_INCLUDES)
     71MICO_DIR = @MICO_DIR@
     72ifeq ($(MICO_DIR), default)
     73MICO_INC = -I../../packages/mico/include
     74else
     75ifeq ($(MICO_DIR), yes)
     76MICO_INC =
     77else
     78MICO_INC = -I$(MICO_DIR)
     79endif
     80endif
     81MINCLUDES = -I. -I../../lib -I../recpt $(MICO_INC)
     82
     83USE_CORBA = @USE_CORBA@
    6984
    7085RANLIB = @RANLIB@
     
    7691
    7792COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
    78 LINK = $(CC) $(LDFLAGS) -o $@
     93LINK = $(CPP) $(LDFLAGS) -o $@
     94
     95CPPCOMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
     96CPPLINK = $(CPP) $(LDFLAGS) -o $@
     97
     98MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
     99MLINK = mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
    79100
    80101.SUFFIXES:
     
    85106.SUFFIXES: .cpp .o
    86107.cpp.o:
    87     $(COMPILE) $<
     108    $(CPPCOMPILE) $<
    88109
    89 HEADERS = search.h  querycache.h queryinfo.h collectserver.h \
     110.SUFFIXES: .mpp .o
     111.mpp.o:
     112    $(MCOMPILE) $<
     113
     114ifneq ($(USE_CORBA), 0)
     115CORBAHEADERS = \
     116  corbaServer.h
     117CORBASOURCES = \
     118  corbaServer.mpp
     119CORBAOBJECTS = \
     120  corbaServer.o
     121else
     122CORBAHEADERS =
     123CORBASOURCES =
     124CORBAOBJECTS =
     125endif
     126
     127HEADERS = search.h querycache.h queryinfo.h collectserver.h collectset.h \
    90128          colservrconfig.h maptools.h filter.h source.h browsefilter.h \
    91129          queryfilter.h mggdbmsource.h phrasesearch.h phrasequeryfilter.h \
    92       $(MG_HEADERS)
     130      $(MG_HEADERS) $(CORBAHEADERS)
    93131
    94132SOURCES = search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
    95133          colservrconfig.cpp maptools.cpp filter.cpp source.cpp \
    96134          browsefilter.cpp queryfilter.cpp mggdbmsource.cpp phrasesearch.cpp \
    97           phrasequeryfilter.cpp \
    98       $(MG_SOURCES)
     135          phrasequeryfilter.cpp collectset.cpp \
     136      $(MG_SOURCES) $(CORBASOURCES)
    99137
    100138OBJECTS = search.o querycache.o queryinfo.o collectserver.o \
    101139          colservrconfig.o maptools.o filter.o source.o browsefilter.o \
    102140          queryfilter.o mggdbmsource.o phrasesearch.o phrasequeryfilter.o \
    103       $(MG_OBJECTS)
     141      collectset.o $(MG_OBJECTS) $(CORBAOBJECTS)
    104142
    105143all : $(OBJECTS)
     
    108146distclean:
    109147    rm -f $(OBJECTS) Makefile mgppsearch.o mgppqueryfilter.o
    110 
    111148clean:
    112149    rm -f $(OBJECTS) mgppsearch.o mgppqueryfilter.o
     
    116153depend:
    117154    makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
    118 
    119 
    120 
    121 
  • trunk/gsdl/src/colservr/collectserver.cpp

    r1459 r1860  
    9191    else if (key == "building" && cfgline.size() == 2)
    9292      collectinfo.building[cfgline[0]] = cfgline[1];
     93    else if (key == "httpdomain") collectinfo.httpdomain = value;
     94    else if (key == "httpprefix") collectinfo.httpprefix = value;
    9395    else if (key == "receptionist") collectinfo.receptionist = value;
    9496    else if (key == "buildtype") collectinfo.buildType = value;
  • trunk/gsdl/src/colservr/collectserver.h

    r1285 r1860  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
     24 * $Id$
     25 *
    2426 *********************************************************************/
    2527
     
    2830#define COLLECTSERVER_H
    2931
     32// Library header files
    3033#include "gsdlconf.h"
    3134#include "text_t.h"
     
    3437#include "source.h"
    3538#include "cfgread.h"
     39#include "cnfgable.h"
    3640
    3741#if defined(GSDL_USE_OBJECTSPACE)
     
    6064
    6165
    62 class collectserver {
     66class collectserver : public configurable {
    6367protected:
    6468  colservrconf configinfo;
  • trunk/gsdl/src/colservr/colservrconfig.cpp

    r1285 r1860  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
     24 * $Id$
     25 *
    2426 *********************************************************************/
     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
    2545
    2646#include "colservrconfig.h"
     
    5373  }
    5474
     75  return cserver.read_configfile(filename);
     76  /*
    5577  // read in the collection configuration file
    5678  text_t key;
     
    7496  }
    7597  return false;
     98  */
    7699}
    77100
     
    91114  }
    92115
     116  return cserver.read_configfile(filename);
     117
     118  /*
    93119  // read in the build configuration file
    94120  text_t key;
     
    112138  }
    113139  return false;
     140  */
    114141}
  • trunk/gsdl/src/colservr/mgsearch.cpp

    r1497 r1860  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
     24 * $Id$
     25 *
    2426 *********************************************************************/
     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 */
    25116
    26117#include "gsdlconf.h"
     
    299390}
    300391
    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 */
    302397bool mgsearchclass::search(const queryparamclass &queryparams,
    303398               queryresultsclass &queryresults) {
    304399  //  assert (cache != NULL);
    305400
     401  // clear any previous results
    306402  queryresults.clear();
    307403  // first check the cache
     
    314410  if (makeindexcurrent (queryparams.index, queryparams.subcollection,
    315411            queryparams.language, queryparams.collection)) {
     412    // initialise the form of results
    316413    setsearchmode (queryparams);
     414
     415    // execute the query
    317416    submitquery (queryparams);
     417
     418    // retrieve the results
    318419    getresults (queryparams, queryresults);
     420
    319421    return true;
    320422  }
     
    361463}
    362464
    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 */
    364470void mgsearchclass::submitquery (const queryparamclass &queryparams)
    365471{
    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
    367474  text_t ttquerystring = queryparams.querystring;
    368475  filterquery (ttquerystring);
     
    372479  mgq_ask(querystring);
    373480
     481  // destroy the temporary character array
    374482  delete querystring;
    375483}
    376484
    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 */
    378494void mgsearchclass::getresults (const queryparamclass &queryparams,
    379495                queryresultsclass &queryresults) {
    380 
     496  // get the configuration for the maximum number of documents to
     497  // retrieve
    381498  int howmany = queryparams.maxdocs;
    382499  if (howmany == -1) howmany = MAXNUMDOCS;
     
    412529}
    413530
     531/**
     532 * Tidies the given querystring, removing special characters
     533 */
    414534void mgsearchclass::filterquery (text_t &ttquerystring) {
    415535  text_t::iterator ithere = ttquerystring.begin ();
  • trunk/gsdl/src/colservr/queryfilter.cpp

    r1459 r1860  
    354354}
    355355
    356 
    357 
    358 
  • trunk/gsdl/src/db2txt/Makefile.in

    r1802 r1860  
    3030AR = ar
    3131CC = @CC@
     32CPP = @CXX@
    3233CCFLAGS = -Wall @CFLAGS@
    3334DEFS = @DEFS@
     
    4243 
    4344COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
     45CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
    4446LINK = $(CC) $(LDFLAGS) -o $@
     47CPPLINK = $(CPP) $(LDFLAGS) -o $@
    4548 
    4649.SUFFIXES:
     
    5154.SUFFIXES: .cpp .o
    5255.cpp.o:
    53     $(COMPILE) $<
     56    $(CPPCOMPILE) $<
    5457 
    5558
  • trunk/gsdl/src/recpt/Makefile.in

    r1776 r1860  
    2727AR = ar
    2828CC = @CC@
     29CPP = @CXX@
    2930#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
    3031CCFLAGS = @CFLAGS@
     
    3637ifneq ($(USE_FASTCGI), 1)
    3738DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
    38 
    3939INCLUDES = -I../../lib -I. -I../colservr -I../../packages/mg \
    4040       -I../../packages/mg/lib -I../../packages/mg/src/text \
     
    4848       -I../mgpp/text
    4949endif
     50MICO_DIR = @MICO_DIR@
     51ifeq ($(MICO_DIR), yes)
     52MICO_INC =
     53MICO_LIB =
     54else
     55ifeq ($(MICO_DIR), default)
     56MICO_DIR = ../../packages/mico/include
     57endif
     58MICO_INC = -I$(MICO_DIR)
     59MICO_LIB = -L$(MICO_DIR)
     60endif
     61MINCLUDES = -I. -I../../lib -I../colservr $(MICO_INC)
     62
     63USE_CORBA = @USE_CORBA@
    5064
    5165RANLIB = @RANLIB@
     
    5872COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
    5973LINK = $(CC) $(LDFLAGS) -o $@
     74
     75CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
     76CPPLINK = $(CPP) $(LDFLAGS) -o $@
     77
     78MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
     79MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o  $@
     80MLIBS = $(LIBS) -lmico2.2.7                 
    6081
    6182.SUFFIXES:
     
    6687.SUFFIXES: .cpp .o
    6788.cpp.o:
    68     $(COMPILE) $<
     89    $(CPPCOMPILE) $<
     90
     91.SUFFIXES: .mpp .o
     92.mpp.o:
     93    $(MCOMPILE) $<
    6994
    7095COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
     
    81106RECEPTHEADERS =
    82107
     108ifeq ($(USE_CORBA), 1)
     109LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h corbaproto.h
     110else
    83111LIBRARYHEADERS = nullproto.h z3950proto.h z3950server.h
     112endif
    84113
    85114HEADERS = $(COMMONHEADERS) $(RECPTHEADERS) $(LIBRARYHEADERS)
     
    141170          ../colservr/mgqueryfilter.o \
    142171          ../colservr/mgppsearch.o \
    143           ../colservr/mgppqueryfilter.o
    144 
     172          ../colservr/mgppqueryfilter.o \
     173          ../colservr/collectset.o
     174
     175ifeq ($(USE_CORBA), 1)
     176#EXEC = recpt library corbaserver corbarecptldd
     177EXEC = library corbaserver corbarecptldd
     178else
    145179#EXEC = recpt library
    146180EXEC = library
     181endif
    147182
    148183all: $(EXEC)
     
    186221
    187222install:
    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
    189226
    190227depend:
     
    211248
    212249recpt: $(RECPT_OBJS)
    213     $(LINK) $(RECPT_OBJS) $(LIBS)
     250    $(CPPLINK) $(RECPT_OBJS) $(LIBS)
    214251
    215252# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
     
    235272
    236273library: $(LIBRARY_OBJS)
    237     $(LINK) $(LIBRARY_OBJS) $(LIBS)
    238 
    239 
    240 
    241 
    242 
     274    $(CPPLINK) $(LIBRARY_OBJS) $(LIBS)
     275
     276# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
     277
     278RECPTLIB_OBJECTS = nullproto.o corbaproto.o \
     279                   ../../lib/corbatext_t.o ../../lib/corbaconv_text_t.o \
     280           ../../lib/corbaiface.o
     281ifneq ($(USE_FASTCGI), 1)
     282RLIBRARY_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
     288else
     289RLIBRARY_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
     296endif
     297RECPTLIB_OBJS = $(RLIBRARY_OBJS) ../colservr/corbaServer.o
     298
     299corbaserver: $(RECPTLIB_OBJS)
     300    $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
     301
     302# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
     303
     304CORBARECPT_OBJECTS = nullproto.o corbaproto.o corbaclient.o
     305ifneq ($(USE_FASTCGI), 1)
     306CORBARECPT_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
     312else
     313CORBARECPT_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
     320endif
     321
     322corbarecptldd: $(CORBARECPT_OBJS)
     323    $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
     324
     325test:
  • trunk/gsdl/src/recpt/OIDtools.cpp

    r1695 r1860  
    9191  request.fields = metadata;
    9292  request.docSet.push_back (OID);
    93  
    9493  assert (collectproto != NULL);
     94
    9595  collectproto->filter (collection, request, response, err, logout);
    9696  if (err != noError) {
  • trunk/gsdl/src/recpt/browserclass.h

    r1285 r1860  
    2121 * along with this program; if not, write to the Free Software
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     23 *
     24 * $Id$
    2325 *
    2426 *********************************************************************/
     
    7476  void set_filter_options (FilterRequest_t &request, cgiargsclass &args);
    7577 
    76   // returns the number of tabs to add before displaying the
     78  // output_section_group returns the number of tabs to add before displaying the
    7779  // 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
    7885  virtual int output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
    7986                    const text_t &collection, int colnumber,
  • trunk/gsdl/src/recpt/browsetools.cpp

    r1610 r1860  
    2323 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2424 *
     25 * $Id$
     26 *
    2527 *********************************************************************/
    2628
    2729#include "browsetools.h"
    2830#include "OIDtools.h"
    29 
    3031
    3132// output_controls displays the detach, expand/contract contents,
     
    411412  text_t OID = args["d"];
    412413  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
    413417  if (OID.empty()) {
    414418    OID = args["cl"];
    415419    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)
    417424    get_top (args["cl"], classification);   
    418425
     
    500507}
    501508
     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 */
    502513void output_toc (cgiargsclass &args, browsermapclass *browsermap,
    503514                 formatinfo_t &formatinfo, recptproto *collectproto,
  • trunk/gsdl/src/recpt/cgiwrapper.cpp

    r1354 r1860  
    3030#include <stdlib.h>
    3131#include <assert.h>
     32#include <iostream.h>
    3233
    3334#if defined(GSDL_USE_OBJECTSPACE)
     
    281282
    282283  outconvertclass text_t2ascii;
    283   recptconf configinfo = recpt.get_configinfo ();
     284  recptconf &configinfo = recpt.get_configinfo ();
    284285  text_t etc_dir = filename_cat (configinfo.gsdlhome, "etc");
    285286
     
    525526    // couldn't find the main configuration file
    526527    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 ****
    528529    // don't have any collections
    529530    page_errorcollect (gsdlhome, errorpage, debug);
     
    641642
    642643
     644    // if there has been no error so far, perform the production of the
     645    // output page
    643646    if (errorpage.empty()) {
    644647      text_t error_file = filename_cat (gsdlhome, "etc", "errout.txt");
     
    656659    page_errorparseargs(gsdlhome, debug, errorpage);
    657660      } else {
     661    // produce the output page
     662
    658663    if (!recpt.produce_cgi_page (args, pageout, errout, fastcgienv)) {
    659664      errout.close ();
  • trunk/gsdl/src/recpt/cgiwrapper.h

    r1285 r1860  
    3030
    3131#include "receptionist.h"
     32#include "collectset.h"
    3233
    3334// cgiwrapper does everything necessary to output a page
     
    3536// collection then "collection" should be set, otherwise it
    3637// 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!
    3742void cgiwrapper (receptionist &recpt, text_t collection);
    3843
  • trunk/gsdl/src/recpt/comtypes.cpp

    r1330 r1860  
    5858  format.erase(format.begin(), format.end());
    5959  building.erase(format.begin(), format.end());
     60  httpdomain.clear();
     61  httpprefix.clear();
    6062  receptionist.clear();
    6163}
  • trunk/gsdl/src/recpt/comtypes.h

    r1773 r1860  
    9999  text_tmap format;
    100100  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'
    103105};
    104106
  • trunk/gsdl/src/recpt/documentaction.cpp

    r1804 r1860  
    667667          << "<html><head></head>\n"
    668668          << "<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="
    671671          << args["d"] << "\">"
    672672          << "<noframes>\n"
     
    819819      ResultDocInfo_tarray::iterator sechere = inforesponse.docInfo.begin();
    820820      ResultDocInfo_tarray::iterator secend = inforesponse.docInfo.end();
    821    
     821
    822822      if (arg_gt == 1) {
    823823    // check if there are more than 10 sections containing text to be expanded -
  • trunk/gsdl/src/recpt/librarymain.cpp

    r1856 r1860  
    3030// z39.50 stuff - johnmcp
    3131#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>
    3244
    3345#include "action.h"
     
    5769int main () {
    5870  receptionist recpt;
    59   nullproto nproto;
     71  nullproto    nproto;
     72  collectset  *cservers;
    6073#ifndef __WIN32__
    61   z3950proto zproto;
     74  z3950proto   zproto;
    6275#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");
    6491  text_tarray collections;
    65 
    66   // get gsdlhome
    67   text_t gsdlhome;
    68   site_cfg_read (gsdlhome);
    69   text_t collectdir = filename_cat (gsdlhome, "collect");
    7092  read_dir (collectdir, collections);
    71  
     93
    7294  text_tarray::const_iterator thiscol = collections.begin();
    7395  text_tarray::const_iterator endcol = collections.end();
    74  
     96
    7597  while (thiscol != endcol) {
    76    
     98
    7799    // ignore the modelcol
    78100    if (*thiscol == "modelcol") {
     
    84106    nproto.add_collection (*thiscol, &recpt, gsdlhome, gsdlhome);
    85107   
     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);
    86172    thiscol ++;
    87173  }
     174  */
    88175
    89176  // add the protocol to the receptionist
    90177  recpt.add_protocol (&nproto);
     178
     179  // z39.50 stuff - johnmcp
    91180
    92181  // z39.50 stuff - johnmcp
     
    300389
    301390  cgiwrapper (recpt, "");
     391  delete cservers;
    302392  return 0;
    303393}
  • trunk/gsdl/src/recpt/nullproto.cpp

    r1679 r1860  
    2525
    2626#include "nullproto.h"
    27 #include "colservrconfig.h"
    2827#include <assert.h>
    2928
     
    4039
    4140nullproto::~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();
    5241}
    5342
    5443// add_collection sets up the collectionserver and calls
    5544// add_collectserver
     45/*
    5646void 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*/
    15250
    15351// remove_collection deletes the collection server of collection.
     
    15654// cleans up all collectservers when the program exits.
    15755void 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);
    17257}
    17358
     
    17762  // it should be done just after the collection server has been
    17863  // created
    179   if (key == "collection" || key == "collectdir") return;
    18064
    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);
    19869  }
    19970}
     
    20172// this init will configure and init each of the collection servers
    20273bool nullproto::init (ostream &logout) {
    203   collectservermapclass::iterator here = cservers.begin();
    204   collectservermapclass::iterator end = cservers.end();
     74  return cset->init(logout);
     75}
    20576
    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;
     77text_t nullproto::get_site_name () {
     78  return "";
    24779}
    24880
     
    25486void nullproto::get_collection_list (text_tarray &collist, comerror_t &err,
    25587                     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
    26891}
    26992
    27093void nullproto::has_collection (const text_t &collection, bool &hascollection,
    27194                comerror_t &err, ostream &/*logout*/) {
    272   hascollection = (cservers.getcollectserver(collection) != NULL);
     95  hascollection = (cset->getCollectServer(collection) != NULL);
    27396  err = noError;
    27497}
     
    27699void nullproto::ping (const text_t &collection, bool &wassuccess,
    277100              comerror_t &err, ostream &/*logout*/) {
    278   wassuccess = (cservers.getcollectserver(collection) != NULL);
     101  wassuccess = (cset->getCollectServer(collection) != NULL);
    279102  err = noError;
    280103}
     
    283106                 ColInfoResponse_t &collectinfo,
    284107                 comerror_t &err, ostream &logout) {
    285   collectserver *cserver = cservers.getcollectserver (collection);
     108  collectserver *cserver = cset->getCollectServer (collection);
    286109  if (cserver != NULL) cserver->get_collectinfo (collectinfo, err, logout);
    287110  else err = protocolError;
     
    292115                InfoFiltersResponse_t &response,
    293116                comerror_t &err, ostream &logout) {
    294   collectserver *cserver = cservers.getcollectserver (collection);
     117  collectserver *cserver = cset->getCollectServer (collection);
    295118  if (cserver != NULL) cserver->get_filterinfo (response, err, logout);
    296119  else err = protocolError;
     
    301124                   InfoFilterOptionsResponse_t &response,
    302125                   comerror_t &err, ostream &logout) {
    303   collectserver *cserver = cservers.getcollectserver (collection);
     126  collectserver *cserver = cset->getCollectServer (collection);
    304127  if (cserver != NULL) cserver->get_filteroptions (request, response, err, logout);
    305128  else err = protocolError;
     
    310133            FilterResponse_t &response,
    311134            comerror_t &err, ostream &logout) {
    312   collectserver *cserver = cservers.getcollectserver (collection);
     135  collectserver *cserver = cset->getCollectServer (collection);
    313136  if (cserver != NULL) cserver->filter (request, response, err, logout);
    314137  else err = protocolError;
     
    319142                  DocumentResponse_t &response,
    320143                  comerror_t &err, ostream &logout) {
    321   collectserver *cserver = cservers.getcollectserver (collection);
     144  collectserver *cserver = cset->getCollectServer (collection);
    322145  if (cserver != NULL) cserver->get_document (request, response, err, logout);
    323146  else err = protocolError;
  • trunk/gsdl/src/recpt/nullproto.h

    r1739 r1860  
    3030#include "gsdlconf.h"
    3131#include "collectserver.h"
     32#include "collectset.h"
    3233#include "recptproto.h"
    3334#include "receptionist.h"
     
    3536class nullproto : public recptproto {
    3637protected:
    37   collectservermapclass cservers;
     38  collectset           *cset;
    3839public:
    3940  virtual ~nullproto();
     
    4142  // add_collection sets up the collectionserver and calls
    4243  // add_collectserver
    43   virtual void add_collection (const text_t &collection, void *recpt,
    44                    const text_t &gsdlhome, const text_t &gdbmhome);
     44  // virtual void add_collection (const text_t &collection, void *recpt,
     45  //                         const text_t &gsdlhome, const text_t &gdbmhome);
    4546
    4647  // add_collectserver should be called for each collection server
    4748  // before any configuration is done
    48   void add_collectserver (collectserver *thecserver)
    49     {cservers.addcollectserver(thecserver);}
     49  void set_collectset(collectset *set) { this->cset = set; }
    5050
    5151  // remove_collection deletes the collection server of collection.
     
    6262
    6363  text_t get_protocol_name ();
     64  text_t get_site_name ();
     65
    6466  void get_collection_list (text_tarray &collist, comerror_t &err,
    6567                ostream &logout);
  • trunk/gsdl/src/recpt/pageaction.cpp

    r1856 r1860  
    8080void pageaction::set_homeextra_macro (displayclass &disp, recptprotolistclass *protos,
    8181                      ostream &logout) {
     82  cout << "Setting homepage " << endl;
    8283
    8384  text_t homeextra = "<center><table width=_pagewidth_><tr valign=top>\n";
     
    105106         
    106107          found_valid_col = true;
    107           FilterResponse_t response;
     108          FilterResponse_t response;
    108109          text_tset metadata;
    109110          metadata.insert ("collectionname");
     
    112113          text_t collectionname = *collist_here;
    113114          text_t alt = collectionname;
     115
    114116          if (get_info ("collection", *collist_here, metadata, false,
    115117                (*rprotolist_here).p, response, logout)) {
     
    117119          alt = response.docInfo[0].metadata["collectionname"].values[0];
    118120       
     121        text_t iconurl;
     122        iconurl.clear();
     123
    119124        if (!response.docInfo[0].metadata["iconcollectionsmall"].values[0].empty())
    120125          collectionname = "<img width=150 border=1 src=\""
     
    122127            + "\" alt=\"" + alt + "\">";
    123128        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
    128160          }
    129161          if ((count%3 == 0) && (!first))
    130162        homeextra += "</tr><tr valign=top>\n";
    131163         
    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 + "\">";
    133169          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 + "\">";
    135171          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 + "\">";
    137173
    138174          if (!cinfo->receptionist.empty())
     
    166202                     recptprotolistclass *protos, ostream &logout) {
    167203
     204  cout << "Defining internal macros" << endl;
     205
    168206  // define_internal_macros sets the following macros:
    169207
     
    211249
    212250 
     251  cout << "Defining internal macros" << endl;
     252
    213253  if (recpt == NULL) {
    214254    logout << "ERROR (pageaction::define_internal_macros): This action does not contain\n"
     
    218258  }
    219259
     260  cout << "Defining internal macros" << endl;
     261
    220262  text_t &arg_p = args["p"];
    221263  text_t &arg_c = args["c"];
    222264  ColInfoResponse_t *cinfo = NULL;
     265
     266  cout << "Subaction is " << arg_p << endl;
    223267
    224268  recptproto* collectproto = protos->getrecptproto (arg_c, logout);
     
    231275    disp.setmacro ("builddate", "Global", builddate);
    232276  }
     277
     278  cout << "Subaction is " << arg_p << endl;
    233279
    234280  if (arg_p == "home") {
     
    318364    }
    319365      }
     366
     367      if (pref_langs.find("zh") == pref_langs.end())
     368    disp.setmacro ("encodingoption", "preferences", "");
    320369
    321370    } else {
  • trunk/gsdl/src/recpt/queryaction.cpp

    r1717 r1860  
    566566      if (size>5&&args["hcl"]==1) { //compress the list, show the expand button
    567567       
    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";
    569569      }
    570570      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";
    572572      }
    573573      historylist += "</table>\n";
     
    591591    historylist += "<tr> <td width=40 align=center>"+c+"</td>\n";
    592592    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_&";
    594594    historylist += *here+"\"><img name=\"display\" src=\"_httpicondisplay_\" width=_widthdisplay_ ";
    595595    historylist += "height=_heightdisplay_ border=\"0\" alt=\"" + userinfo +"\"></a></td></tr>\n";
     
    632632      << "<form name=QueryForm method=get action=\"_gwcgi_\">\n"
    633633      << "<input type=hidden name=a value=\"q\">\n"
     634          << "<input type=hidden name=site value=\"_cgiargsite_\"\n"
    634635      << "<input type=hidden name=e value=\"_compressedoptions_\">\n"
    635636      << "<input type=hidden name=ccp value=\"1\">\n"
  • trunk/gsdl/src/recpt/receptionist.cpp

    r1856 r1860  
    890890    if (!a->do_action (args, &protocols, &browsers, disp, (*outconverter), contentout, logout))
    891891      return false;
    892 
    893892  } else {
    894893    // the action was not found!!
     
    11381137  bool first = true;
    11391138
     1139  cout << "Action is " << a->get_action_name() << endl;
     1140
    11401141  text_tmap::iterator params_here = configinfo.pageparams.begin();
    11411142  text_tmap::iterator params_end = configinfo.pageparams.end();
     
    11561157  disp.openpage(pageparams, configinfo.macroprecedence);
    11571158
    1158 
    11591159  // define external macros for each action
    11601160  actionptrmap::iterator actionhere = actions.begin ();
     
    11631163  while (actionhere != actionend) {
    11641164    assert ((*actionhere).second.a != NULL);
    1165     if ((*actionhere).second.a != NULL)
     1165    if ((*actionhere).second.a != NULL) {
    11661166      (*actionhere).second.a->define_external_macros (disp, args, &protocols, logout);
     1167    }
    11671168    actionhere++;
    11681169  }
     
    11851186  disp.setmacro ("httpimg", "Global", configinfo.httpimg);
    11861187  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
    11871204  text_t compressedoptions = get_compressed_arg(args, logout);
    11881205  disp.setmacro ("compressedoptions", "Global", dm_safe(compressedoptions));
     
    12551272    }
    12561273      }
     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    }
    12571289    }
    12581290  }
     
    13041336  }
    13051337}
     1338
     1339
  • trunk/gsdl/src/recpt/receptionist.h

    r1856 r1860  
    3737#include "cfgread.h"
    3838#include "action.h"
     39#include "cnfgable.h"
    3940
    4041// the MACROPRECEDENCE macro is used as a default. override
     
    116117};
    117118
    118 class receptionist {
     119class receptionist : public configurable {
    119120protected:
    120121  recptconf configinfo;
     
    188189  // it contains. The configuration should take place after everything
    189190  // has been added but before the initialisation.
    190   virtual void configure (const text_t &key, const text_tarray &cfgline);
     191  void configure (const text_t &key, const text_tarray &cfgline);
    191192  virtual void configure (const text_t &key, const text_t &value);
    192193  const recptconf &get_configinfo () {return configinfo;}
  • trunk/gsdl/src/recpt/recptconfig.cpp

    r1285 r1860  
    2727#include "fileutil.h"
    2828#include "cfgread.h"
     29#include "cnfgator.h"
    2930
    3031
     
    4041#endif
    4142
     43class __site_configuration : public configurable {
     44private:
     45  text_t *gsdlhome;
     46  text_t *httpdomain;
     47  text_t *httpprefix;
     48  int    *maxrequests;
     49public:
     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
    4290
    4391// reads site configuration file returning true on success
     
    4593// gsdlsite.cfg should be in same directory as library executable
    4694bool site_cfg_read (receptionist &recpt, text_t &gsdlhome, int &maxrequests) {
     95  // initialise configurator, etc.
     96  __site_configuration sitecfg (&gsdlhome, &maxrequests);
     97  configurator         gsdlconfigurator(&recpt);
    4798
     99  gsdlconfigurator.add_configurable(&sitecfg);
     100
     101  // blank the gsdl home text
    48102  gsdlhome.clear();
    49103
    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")) {
    79105    return true;
    80106  }
     
    82108}
    83109
    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
     112bool 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);
    87117
    88118  gsdlhome.clear();
     119  httpdomain.clear();
     120  httpprefix.clear();
    89121
    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  }
    93126
    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;
    99128
    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   }
    112129  return false;
    113130}
     
    121138  // read in the main configuration file
    122139  bool rv = false;
     140
    123141  text_t key, filename;
    124142  text_tarray cfgline;
     
    126144  filename = filename_cat (filename, "main.cfg");
    127145  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);
    151147  }
    152148 
     
    165161
    166162    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);
    190164    }
    191165  }
  • trunk/gsdl/src/recpt/recptconfig.h

    r1285 r1860  
    3232#include "text_t.h"
    3333#include "receptionist.h"
     34#include "collectset.h"
    3435
    3536
    3637// reads site configuration file returning true on success
    3738bool site_cfg_read (receptionist &recpt, text_t &gsdlhome, int &maxrequests);
    38 bool site_cfg_read (text_t &gsdlhome);
     39bool site_cfg_read (text_t &gsdlhome, text_t &httpdomain, text_t &httpprefix);
    3940
    4041// main_cfg_read reads either collect.cfg or main.cfg and returning
  • trunk/gsdl/src/recpt/recptmain.cpp

    r1285 r1860  
    3333  return 0;
    3434}
     35
  • trunk/gsdl/src/recpt/recptproto.cpp

    r1679 r1860  
    4545bool recptproto::init (ostream &/*logout*/) {
    4646  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
     53text_t recptproto::get_site_name() {
     54  return "";
    4755}
    4856
  • trunk/gsdl/src/recpt/recptproto.h

    r1679 r1860  
    6767  // out to the log file and no other output should be produced.
    6868  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();
    6975
    7076  // get_protocol_name should return the name of this protocol (e.g. recptproto)
  • trunk/gsdl/src/recpt/statusaction.cpp

    r1837 r1860  
    7373
    7474        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="
    7676            << protoname
    7777            << "&c="
  • trunk/gsdl/src/txt2db/Makefile.in

    r1004 r1860  
    2929AR = ar
    3030CC = @CC@
     31CPP = @CXX@
    3132CCFLAGS = -Wall @CFLAGS@
    3233DEFS = @DEFS@
     
    3536LDFLAGS = @LDFLAGS@
    3637DPLIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o
    37 #LIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o -lstdc++ -lgdbm
    3838LIBS = ../../lib/gsdllib.a ../../packages/mg/lib/unitool.o @LIBS@
    3939GSDLOS = @gsdlos@
     
    4141 
    4242COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
     43CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
     44MCOMPILE = mico-c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
    4345LINK = $(CC) $(LDFLAGS) -o $@
     46MLINK = mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
     47CPPLINK = $(CPP) $(LDFLAGS) -o $@
    4448 
    4549.SUFFIXES:
     
    5054.SUFFIXES: .cpp .o
    5155.cpp.o:
    52     $(COMPILE) $<
     56    $(CPPCOMPILE) $<
    5357 
     58.SUFFIXES: .mpp .o
     59.mpp.o:
     60    $(MCOMPILE) $<
    5461
    5562HEADERS =
     
    8289
    8390txt2db: $(TXT2DB_OBJS) $(DPLIBS)
    84     $(LINK) $(TXT2DB_OBJS) $(LIBS)
     91    $(MLINK) $(TXT2DB_OBJS) $(LIBS)
    8592
    8693
Note: See TracChangeset for help on using the changeset viewer.