Ignore:
Timestamp:
2001-05-24T17:06:48+12:00 (23 years ago)
Author:
sjboddie
Message:

Fiddled about with mgpp to get it compiling on Windows under VC++ 6.0. I
still can't get it to compile under VC++ 4.2 because of some weird
behaviour in STLport.

Also tidied up a little and removed some of the old log information
that was scattered about in some of the files.

Location:
trunk/gsdl/src/mgpp/text
Files:
70 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/FIvfLevelInfo.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/FIvfLevelInfo.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/FText.cpp

    r860 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/FText.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/FileBuf.cpp

    r855 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    2523#include "sysfuncs.h"
    2624
     25#ifdef __WIN32__
     26# include <io.h>
     27# define read _read
     28#endif
    2729
    2830bool FileBuf::NextBuf () {
    2931  if (fd < 0) return false;
    30 
    3132  int numbytes = read (fd, buf, FILEBUFSIZE);
    3233  if (numbytes < 0) numbytes = 0;
  • trunk/gsdl/src/mgpp/text/FileBuf.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/FragLevelConvert.cpp

    r927 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    103101
    104102}
    105 
    106 
    107 
  • trunk/gsdl/src/mgpp/text/FragLevelConvert.h

    r927 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/GSDLQueryLex.cpp

    r1127 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/GSDLQueryLex.h

    r1127 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/GSDLQueryParser.cpp

    r1770 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    9492// default is within 20 words
    9593static void SetRangeValues (TermNode &termNode,
    96                 UCArray &near) {
    97   UCArray NEAR; SetCStr(NEAR, "NEAR");
    98   if (near == NEAR) { // no modifier
     94                UCArray &nearby) {
     95  UCArray NEARBY; SetCStr(NEARBY, "NEAR");
     96  if (nearby == NEARBY) { // no modifier
    9997    termNode.startRange = -21;
    10098    termNode.endRange = 20;
    10199  }
    102100  else { // extract number
    103     UCArray::const_iterator here = near.begin()+4;
    104     UCArray::const_iterator end = near.end();
     101    UCArray::const_iterator here = nearby.begin()+4;
     102    UCArray::const_iterator end = nearby.end();
    105103    int size=0;
    106104    while (here != end) {
     
    112110    termNode.endRange = size;
    113111  }
    114 
    115 
    116 }
     112}
     113
    117114static unsigned long GetStemMethod(LexEl &el, int defaultStemMethod) {
    118115  // here expect el to contain some of c,s,i,u
  • trunk/gsdl/src/mgpp/text/GSDLQueryParser.h

    r1770 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
  • trunk/gsdl/src/mgpp/text/IndexData.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/IndexData.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/MGQuery.cpp

    r1848 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    657655           result.docs.begin()+resultsSize,
    658656           result.ranks.begin()+resultsSize,
    659            result.ranks.size()-resultsSize, gtRank);
     657           (unsigned long) result.ranks.size()-resultsSize,
     658           gtRank);
    660659
    661660    // sort into descending order
     
    760759
    761760}
    762 
    763 
    764 
    765 
    766 
    767 
    768 
  • trunk/gsdl/src/mgpp/text/MGQuery.h

    r1836 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    2826#include <limits.h>
    2927#include "Terms.h"
    30 
    31 
    3228
    3329// forms base for defining and calculating the boolean
     
    200196
    201197#endif
    202 
    203 
    204 
    205 
    206 
    207 
    208 
    209 
    210 
    211 
  • trunk/gsdl/src/mgpp/text/QueryLex.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/QueryLex.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/QueryParser.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/QueryParser.h

    r855 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
  • trunk/gsdl/src/mgpp/text/QueryResultsSort.h

    r861 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    9391  swap (*(parallelHeap), *(parallelHeap+heapSize-1));
    9492  swap (*(docNumHeap), *(docNumHeap+heapSize-1));
    95   AdjustHeap (docNumHeap, parallelHeap, 0, heapSize-1, comp);
     93  AdjustHeap (docNumHeap, parallelHeap, (unsigned long)0, heapSize-1, comp);
    9694}
    9795
     
    135133      swap (*(docNumHeap), *(docNumAdd+i));
    136134      swap (*(parallelHeap), *(parallelAdd+i));
    137       AdjustHeap (docNumHeap, parallelHeap, 0, heapSize, comp);
     135      AdjustHeap (docNumHeap, parallelHeap, (unsigned long)0, heapSize, comp);
    138136    }
    139137  }
  • trunk/gsdl/src/mgpp/text/QueryTester.cpp

    r855 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    9896  rcDocSet.push_back (19);  rcRankSet.push_back (1.4);
    9997
    100   if (result != resultCompare) {
     98  if (!(result == resultCompare)) {
    10199    cout << "Test failed!!!\n";
    102100    cout << resultCompare;
     
    157155  rcDocSet.push_back (19);
    158156
    159   if (result != resultCompare) {
     157  if (!(result == resultCompare)) {
    160158    cout << "Test failed!!!\n";
    161159    cout << resultCompare;
     
    232230 
    233231
    234   if (result != resultCompare) {
     232  if (!(result == resultCompare)) {
    235233    cout << "Test failed!!!\n";
    236234    cout << resultCompare;
     
    304302 
    305303
    306   if (result != resultCompare) {
     304  if (!(result == resultCompare)) {
    307305    cout << "Test failed!!!\n";
    308306    cout << resultCompare;
     
    368366 
    369367
    370   if (result != resultCompare) {
     368  if (!(result == resultCompare)) {
    371369    cout << "Test failed!!!\n";
    372370    cout << resultCompare;
     
    429427 
    430428
    431   if (result != resultCompare) {
     429  if (!(result == resultCompare)) {
    432430    cout << "Test failed!!!\n";
    433431    cout << resultCompare;
  • trunk/gsdl/src/mgpp/text/Queryer.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
     24
     25#if defined (__WIN32__)
     26# include "getopt.h"
     27#else
     28# include <unistd.h>
     29#endif
    2630
    2731#include "MGQuery.h"
     
    249253  textData.UnloadData ();
    250254  indexData.UnloadData ();
     255
     256  return (0);
    251257}
    252258
  • trunk/gsdl/src/mgpp/text/TagInfo.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/TagInfo.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/Terms.cpp

    r2377 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    798796
    799797}
    800 
    801 
    802 
  • trunk/gsdl/src/mgpp/text/Terms.h

    r1847 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    216214
    217215#endif
    218 
    219 
    220 
    221 
    222 
  • trunk/gsdl/src/mgpp/text/TextEl.cpp

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/TextEl.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/TextGet.cpp

    r1123 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
     22// need this to avoid bizarre compiler problems under VC++ 6.0
     23#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     24# include <iostream>
     25#endif
    2326
    2427#include "TextGet.h"
  • trunk/gsdl/src/mgpp/text/TextGet.h

    r1123 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/UCArray.cpp

    r1297 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/UCArray.h

    r1297 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
    2422#ifndef UCARRAY_H
    2523#define UCARRAY_H
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28using namespace std;
     29#endif
    2630
    2731#if defined(GSDL_USE_OBJECTSPACE)
     
    113117
    114118#endif
    115 
    116 
    117 
    118 
    119 
  • trunk/gsdl/src/mgpp/text/WIN32.MAK

    r856 r2468  
    1 #PACKAGE = mg
    2 #VERSION = 1.3
     1###########################################################################
     2#
     3# win32 makefile -- mgpp\text
     4# A component of the Greenstone digital library software
     5# from the New Zealand Digital Library Project at the
     6# University of Waikato, New Zealand.
     7#
     8# Copyright (C) 2000  The New Zealand Digital Library Project
     9#
     10#
     11# This program is free software; you can redistribute it and/or modify
     12# it under the terms of the GNU General Public License as published by
     13# the Free Software Foundation; either version 2 of the License, or
     14# (at your option) any later version.
     15#
     16# This program is distributed in the hope that it will be useful,
     17# but WITHOUT ANY WARRANTY; without even the implied warranty of
     18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19# GNU General Public License for more details.
     20#
     21# You should have received a copy of the GNU General Public License
     22# along with this program; if not, write to the Free Software
     23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     24#
     25###########################################################################
    326
    4 #SHELL = /bin/sh
    5 #exec_prefix = ${prefix}
    6 #prefix = /image/httpd/mg-1.2
    7 #srcdir = .
    8 #subdir = src/text
    9 #top_srcdir = ../..
    10 #transform = s,x,x,
     27GSDLHOME = ..\..\..
     28USE_STLPORT = 0
     29
     30STLPATH = "$(GSDLHOME)\packages\windows\stlport\stlport"
    1131
    1232CC = cl
    13 #CC = cl /Z7  this gives symbol and line number debugging (set /DEBUG on link)
    14 #CFLAGS = -g -O
    1533CPPFLAGS =
    16 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
    17 #INSTALL = /usr/local/gnu/bin/install -c
    18 #INSTALL_DATA = ${INSTALL} -m 644
    19 #INSTALL_PROGRAM = ${INSTALL}
     34DEFS = -DSHORT_SUFFIX -DSILENT -DHAVE_CONFIG_H -D__WIN32__ -D__STDC__ -D__GNU_LIBRARY__ -D__MSDOS__
     35INCLUDES = -I"$(GSDLHOME)\src\mgpp\lib" -I"$(GSDLHOME)"
     36!IF $(USE_STLPORT)
     37DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
     38INCLUDES = $(INCLUDES) -I$(STLPATH)
     39!ENDIF
     40
    2041LDFLAGS =
    21 LIBS = ..\..\lib\libmg.lib
    22 #TOUCH = echo timestamp >
    23 #AWK = gawk
    2442
    25 #bindir = $(exec_prefix)/bin
    26 #datadir = $(prefix)/share
    27 #libexecdir = $(exec_prefix)/libexec
    28 #localedir = $(datadir)/locale
    29 #mandir = $(prefix)/man/man1
     43LIBS = "$(GSDLHOME)\src\mgpp\lib\libmg.lib"
    3044
    31 COMPILE = $(CC) -c $(DEFS) -I. -I..\.. -I..\..\lib
     45COMPILE = $(CC) -c $(DEFS) $(INCLUDES)
    3246LINK = $(CC) $(LDFLAGS)
    3347
     
    4155o = .obj
    4256e = .exe
    43 
    44 #############################################################################
    45 #
    46 # Uncomment (and possibly edit) the following lines if you wish
    47 # to use the GNU readline library for the input in mgquery
    48 #
    49 #READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
    50 #READLINE_LIBS = -lreadline -ltermcap
    51 #
    52 #
    53 #############################################################################
    54 
    5557
    5658SOURCES = \
     
    6769  invf.cpp                 mg_invf_dict_dump.cpp    Weights.cpp            \
    6870  MGQuery.cpp              Terms.cpp                QueryTester.cpp        \
    69   QueryLex.cpp             QueryParser.cpp          Queryer.cpp
     71  QueryLex.cpp             QueryParser.cpp         \
     72  GSDLQueryLex.cpp     GSDLQueryParser.cpp      Queryer.cpp
    7073
    7174
     
    7780  IndexData.h         build.h             mg_errors.h                    \
    7881  TagInfo.h           comp_dict.h         mg_files.h          Weights.h  \
    79   MGQuery.h           Terms.h             QueryLex.h          QueryParser.h
    80 
    81 #MISC          = Makefile.in
    82 
    83 ALLFILES      = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
    84 
    85 DISTFILES     = $(ALLFILES)
     82  MGQuery.h           Terms.h             QueryLex.h          QueryParser.h \
     83  GSDLQueryLex.h    GSDLQueryParser.h
    8684
    8785EXEC          = mg_passes$e mg_decompress_text$e mg_perf_hash_build$e \
     
    9088                QueryTester$e Queryer$e
    9189
    92 MAN           =  mg_weights_build.1  mg_invf_dict.1 \
    93                  mg_passes.1 mg_perf_hash_build.1 \
    94                  mg_compression_dict.1  mg_fast_comp_dict.1 \
    95                  mg_stem_idx.1
    96 
    97 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    98 
    99 
    10090all:    $(EXEC) libtextin.lib
    101 
    102 
    103 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    104 
    105 HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o words$o
    106 
    107 mg_hilite_words$e: $(HILITE_OBJS)
    108     $(LINK) $(HILITE_OBJS) $(LIBS)
    109 
    110 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    11191
    11292PASSES_OBJS = \
     
    11797        FText$o text$o FIvfLevelInfo$o
    11898
    119 mg_passes: $(PASSES_OBJS)
     99mg_passes$e: $(PASSES_OBJS)
    120100    $(LINK) $(PASSES_OBJS) $(LIBS)
    121101
    122 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    123102
    124103QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
    125104               FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
    126105               IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
    127                QueryParser$o QueryLex$o words$o
     106               GSDLQueryParser$o GSDLQueryLex$o words$o
    128107
    129 Queryer: $(QUERYER_OBJS)
     108Queryer$e: $(QUERYER_OBJS)
    130109    $(LINK) $(QUERYER_OBJS) $(LIBS)
    131110
     
    134113                    IndexData$o stemmer$o Weights$o
    135114
    136 QueryTester: $(QUERY_TESTER_OBJS)
     115QueryTester$e: $(QUERY_TESTER_OBJS)
    137116    $(LINK) $(QUERY_TESTER_OBJS) $(LIBS)
    138117
     
    140119                     FIvfLevelInfo$o FragLevelConvert$o
    141120
    142 mg_weights_build: $(WEIGHTS_BUILD_OBJS)
     121mg_weights_build$e: $(WEIGHTS_BUILD_OBJS)
    143122    $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
    144123
    145124COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
    146125
    147 mg_compression_dict: $(COMP_DICT_OBJS)
     126mg_compression_dict$e: $(COMP_DICT_OBJS)
    148127    $(LINK) $(COMP_DICT_OBJS) $(LIBS)
    149128
    150129FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
    151130
    152 mg_fast_comp_dict: $(FAST_COMP_OBJS)
     131mg_fast_comp_dict$e: $(FAST_COMP_OBJS)
    153132    $(LINK) $(FAST_COMP_OBJS) $(LIBS)
    154133
    155134INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o invf$o UCArray$o
    156135
    157 mg_invf_dump: $(INVF_DUMP_OBJS)
     136mg_invf_dump$e: $(INVF_DUMP_OBJS)
    158137    $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
    159138
    160139INVF_DICT_OBJS = mg_invf_dict$o mg_files$o invf$o UCArray$o
    161140
    162 mg_invf_dict: $(INVF_DICT_OBJS)
     141mg_invf_dict$e: $(INVF_DICT_OBJS)
    163142    $(LINK) $(INVF_DICT_OBJS) $(LIBS)
    164143
    165144INVF_DICT_DUMP_OBJS = mg_invf_dict_dump$o mg_files$o invf$o UCArray$o
    166145
    167 mg_invf_dict_dump: $(INVF_DICT_DUMP_OBJS)
     146mg_invf_dict_dump$e: $(INVF_DICT_DUMP_OBJS)
    168147    $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS)
    169148
    170149PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o invf$o UCArray$o
    171150
    172 mg_perf_hash_build: $(PERF_HASH_OBJS)
     151mg_perf_hash_build$e: $(PERF_HASH_OBJS)
    173152    $(LINK) $(PERF_HASH_OBJS) $(LIBS)
    174153
     
    176155                invf$o UCArray$o
    177156
    178 mg_stem_idx: $(STEM_IDX_OBJS)
     157mg_stem_idx$e: $(STEM_IDX_OBJS)
    179158    $(LINK) $(STEM_IDX_OBJS) $(LIBS)
    180159
     
    183162                locallib$o text$o UCArray$o TextGet$o FText$o
    184163
    185 mg_decompress_text: $(DECOMPRESS_TEXT_OBJS)
     164mg_decompress_text$e: $(DECOMPRESS_TEXT_OBJS)
    186165    $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
    187166
    188 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    189167
    190 install: execinstall maninstall
    191 uninstall: execuninstall manuninstall
     168PASS_OBJS = \
     169    words$o mgpass$o text.pass1$o comp_dict$o stemmer$o \
     170    text.pass2$o locallib$o \
     171    ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o
     172mgpass$e: $(PASS_OBJS)
     173    $(LINK) $(PASS_OBJS) $(LIBS)
    192174
    193 maninstall: $(MAN)
    194     $(top_srcdir)/mkinstalldirs $(mandir); \
    195     for f in $(MAN); do \
    196       $(INSTALL_DATA) $$f $(mandir)/$$f ;\
    197     done
     175#install:
     176#   if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
     177#   for %%i in ($(EXEC)) do \
     178#     copy %%i "$(GSDLHOME)\bin\windows"
    198179
    199 manuninstall: $(MAN)
    200     for f in $(MAN); do \
    201       rm -f $(mandir)/$$f ;\
    202     done
    203 
    204 
    205 LIB_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
     180LIB_OBJS = mg_files$o  mg_errors$o locallib$o invf$o UCArray$o \
    206181           FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
    207182           IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
    208            QueryParser$o QueryLex$o words$o
     183           GSDLQueryParser$o GSDLQueryLex$o words$o
    209184
    210185libtextin.lib: $(LIB_OBJS)
    211     del libtextin.lib
     186    if EXIST libtextin.lib del libtextin.lib
    212187    lib /out:libtextin.lib $(LIB_OBJS)
    213188
    214 
    215 mostlyclean:
    216     rm -f *$o _*.c _*.o *._c *._o core core.*
    217  
    218 clean: mostlyclean
    219     rm -f $(EXEC)
    220  
    221 distclean: clean
    222     rm -f ansi2knr
    223     rm -f Makefile
    224  
    225 maintainer-clean: distclean
    226     @echo "This command is intended only for maintainers to use;"
    227     @echo "rebuilding the deleted files may require special tools."
    228  
    229 #dist: $(DISTFILES)
    230 #        for file in $(DISTFILES); do \
    231 #          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
    232 #          || cp -p $(srcdir)/$$file $(distdir); \
    233 #        done
    234  
    235 #Makefile: Makefile.in ../../config.status
    236 #        cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
    237  
    238 # Tell versions [3.59,3.63) of GNU make not to export all variables.
    239 # Otherwise a system limit (for SysV at least) may be exceeded.
    240 #.NOEXPORT:
     189clean:
     190    del *$o
     191    del $(EXEC)
  • trunk/gsdl/src/mgpp/text/Weights.cpp

    r861 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     22#include "UCArray.h"
    2423#include "Weights.h"
    2524#include "sysfuncs.h"
    26 #include "UCArray.h"
    2725
    2826#define MAXBITS (sizeof(unsigned long) * 8)
  • trunk/gsdl/src/mgpp/text/Weights.h

    r855 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/WordData.h

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/build.h

    r856 r2468  
    1818 * along with this program; if not, write to the Free Software
    1919 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    20  *
    21  * $Id$
    2220 *
    2321 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/comp_dict.cpp

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
     
    3533#include "locallib.h"
    3634#include "mg_files.h"
    37 
    38 /*
    39    $Log$
    40    Revision 1.1  2000/01/14 02:26:04  sjboddie
    41    Rodgers new C++ mg
    42 
    43    Revision 1.1  1999/10/11 02:57:10  cs025
    44    Base install of MG-PP
    45 
    46    Revision 1.1  1999/08/10 21:17:48  sjboddie
    47    renamed mg-1.3d directory mg
    48 
    49    Revision 1.1  1998/11/17 09:34:34  rjmcnab
    50    *** empty log message ***
    51 
    52    * Revision 1.3  1994/10/20  03:56:41  tes
    53    * I have rewritten the boolean query optimiser and abstracted out the
    54    * components of the boolean query.
    55    *
    56    * Revision 1.2  1994/09/20  04:41:24  tes
    57    * For version 1.1
    58    *
    59  */
    60 
    6135
    6236compression_dict_header cdh;
  • trunk/gsdl/src/mgpp/text/comp_dict.h

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
    24 
    25 
    26 
    2722#define HASH_RATIO 2
    28 
    29 
    30 
    3123
    3224typedef struct dict_hash_table
     
    3931  }
    4032dict_hash_table;
    41 
    42 
    43 
    4433
    4534extern compression_dict_header cdh;
  • trunk/gsdl/src/mgpp/text/hash.h

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    23 
    2421
    2522#ifndef H_HASH
    2623#define H_HASH
    27 
    28 
    2924
    3025#define HASH(h, step, wd, tablesize)            \
  • trunk/gsdl/src/mgpp/text/invf.cpp

    r1300 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
  • trunk/gsdl/src/mgpp/text/ivf.pass1.cpp

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     22#include "UCArray.h"
    2423#include "sysfuncs.h"
    25 
    2624#include "mg_files.h"
    2725#include "invf.h"
     
    2927#include "build.h"
    3028#include "locallib.h"
    31 #include "UCArray.h"
    3229#include "bitio_m_stdio.h"
    3330#include "bitio_gen.h"
     
    4744#  include <map>
    4845#endif
    49 
    50 
    51 /*
    52    $Log$
    53    Revision 1.1  2000/01/14 02:26:07  sjboddie
    54    Rodgers new C++ mg
    55 
    56    *
    57  */
    58 
    59 
    6046
    6147// a fragment corresponds to the index level (word-level is the
  • trunk/gsdl/src/mgpp/text/ivf.pass2.cpp

    r2448 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
    24 /*
    25    $Log$
    26    Revision 1.3  2001/05/18 03:20:10  kjm18
    27    fixed unsigned long overflow error in Condense Invf function
    28    bytesOutput cast to mg_ullong.
    29 
    30    Revision 1.2  2001/05/17 04:52:38  jrm21
    31    added some #defines for proper portability.
    32      (eg ftruncate needs _XOPEN_SOURCE_EXTENDED)
    33 
    34    Revision 1.1  2000/01/14 02:26:07  sjboddie
    35    Rodgers new C++ mg
    36 
    37  */
    3822#define _XOPEN_SOURCE 1
    3923#define _XOPEN_SOURCE_EXTENDED 1
     24
    4025#include <stdio.h>
    41 #include <unistd.h>
    42 
    43 #include "non_ansi.h"
    44 
     26
     27#if defined __WIN32__
     28# include <process.h>
     29# include <io.h>
     30# define getpid _getpid
     31# define unlink _unlink
     32#else
     33# include <unistd.h>
     34# include "non_ansi.h"
     35#endif
     36
     37#include "UCArray.h"
    4538#include "sysfuncs.h"
    46 
    4739#include "mg_files.h"
    4840#include "invf.h"
     
    5042#include "build.h"
    5143#include "locallib.h"
    52 #include "UCArray.h"
    5344#include "bitio_m_random.h"
    5445#include "bitio_m_stdio.h"
     
    6455
    6556#include "longlong.h"
    66 
    67 #ifdef __WIN32_
    68 #include <io.h>
    69 #endif
    7057
    7158#if defined(GSDL_USE_OBJECTSPACE)
     
    387374  char path[512];
    388375  sprintf (path, FILE_NAME_FORMAT ".%ld", get_basepath (), filename,
    389        ".invf.state", (long) getpid ());
     376           ".invf.state", (long) getpid ());
    390377  if (!(stateFile = fopen (path, "wb+"))) {
    391378    Message ("Unable to create \"%s\"", path);
     
    393380  }
    394381  unlink (path); // file will be deleted after it is closed
    395  
    396382  // reset the buffer
    397383  startNum = 0;
     
    10671053
    10681054#ifdef __WIN32__
    1069   if (!(_chsize (_fileno (outInvfFile), bytesOutput)))
     1055  if (_chsize (_fileno (outInvfFile), bytesOutput) != 0)
    10701056    Message ("Could not truncate invf.");
    10711057#else
  • trunk/gsdl/src/mgpp/text/locallib.cpp

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    3129#include "locallib.h"
    3230#include "text.h"
    33 
    34 /*
    35    $Log$
    36    Revision 1.1  2000/01/14 02:26:08  sjboddie
    37    Rodgers new C++ mg
    38 
    39    Revision 1.1  1999/10/11 02:57:43  cs025
    40    Base install of MG-PP
    41 
    42    Revision 1.1  1999/08/10 21:18:02  sjboddie
    43    renamed mg-1.3d directory mg
    44 
    45    Revision 1.1  1998/11/17 09:34:49  rjmcnab
    46    *** empty log message ***
    47 
    48    * Revision 1.3  1994/10/20  03:56:51  tes
    49    * I have rewritten the boolean query optimiser and abstracted out the
    50    * components of the boolean query.
    51    *
    52    * Revision 1.2  1994/09/20  04:41:38  tes
    53    * For version 1.1
    54    *
    55  */
    56 
    5731
    5832int
  • trunk/gsdl/src/mgpp/text/locallib.h

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/mg.h

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    3331#define BUFFERSIZE      (MAXSTRING+30000)
    3432
    35 
    36 
    37 
    3833#define MAXLN   65536
    3934#define WORDS           1
  • trunk/gsdl/src/mgpp/text/mg.special.cpp

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     22// need this to avoid bizarre compiler problems under VC++ 6.0
     23#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     24# include <iostream>
     25#endif
     26
    2427#include "sysfuncs.h"
    25 
    2628#include "mg.h"
    2729#include "build.h"
    28 
    29 
    30 /*
    31    $Log$
    32    Revision 1.1  2000/01/14 02:26:10  sjboddie
    33    Rodgers new C++ mg
    34 
    35    Revision 1.1  1999/10/11 02:57:45  cs025
    36    Base install of MG-PP
    37 
    38    Revision 1.1  1999/08/10 21:18:03  sjboddie
    39    renamed mg-1.3d directory mg
    40 
    41    Revision 1.1  1998/11/17 09:34:51  rjmcnab
    42    *** empty log message ***
    43 
    44    * Revision 1.3  1994/10/20  03:56:53  tes
    45    * I have rewritten the boolean query optimiser and abstracted out the
    46    * components of the boolean query.
    47    *
    48    * Revision 1.2  1994/09/20  04:41:44  tes
    49    * For version 1.1
    50    *
    51  */
    52 
    5330
    5431int init_special (const TagInfo &/*tagInfo*/, char * /*FileName*/) {
  • trunk/gsdl/src/mgpp/text/mg_compression_dict.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    2635
    2736#include "sysfuncs.h"
    28 
    2937#include "memlib.h"
    3038#include "messages.h"
     
    4452
    4553#define MAXBITS (sizeof(unsigned long) * 8)
    46 
    47 /*
    48    $Log$
    49    Revision 1.3  2001/05/17 04:38:15  jrm21
    50    portability changes, use getopt from unistd.h (all POSIX systems)
    51 
    52    Revision 1.2  2000/01/18 03:53:22  rjmcnab
    53    Fixed a couple of bugs and made building silent if needed.
    54 
    55    Revision 1.1  2000/01/14 02:26:11  sjboddie
    56    Rodgers new C++ mg
    57 
    58    Revision 1.3  1999/10/17 23:43:25  cs025
    59    Changes to eradicate Xmalloc
    60 
    61    Revision 1.2  1999/10/11 22:03:03  cs025
    62    Changed mistaken use of NTOHUL on a double to NTOHD as per report
    63    from Craig Neville-Manning of problems installing mg/gsdl.
    64 
    65    Revision 1.1  1999/10/11 02:57:46  cs025
    66    Base install of MG-PP
    67 
    68    Revision 1.1  1999/08/10 21:18:04  sjboddie
    69    renamed mg-1.3d directory mg
    70 
    71    Revision 1.4  1999/01/15 03:05:51  rjmcnab
    72 
    73    Renamed lib/heap to be lib/mgheap (it was causing some problems with
    74    some versions of the STL libraries which contained a heap.h)
    75 
    76    Revision 1.3  1998/12/17 09:12:52  rjmcnab
    77 
    78    Altered mg to process utf-8 encoded Unicode. The main changes
    79    are in the parsing of the input, the casefolding, and the stemming.
    80 
    81    Revision 1.2  1998/11/25 07:55:44  rjmcnab
    82 
    83    Modified mg to that you can specify the stemmer you want
    84    to use via a command line option. You specify it to
    85    mg_passes during the build process. The number of the
    86    stemmer that you used is stored within the inverted
    87    dictionary header and the stemmed dictionary header so
    88    the correct stemmer is used in later stages of building
    89    and querying.
    90 
    91    Revision 1.1  1998/11/17 09:34:52  rjmcnab
    92    *** empty log message ***
    93 
    94    * Revision 1.3  1994/10/20  03:56:54  tes
    95    * I have rewritten the boolean query optimiser and abstracted out the
    96    * components of the boolean query.
    97    *
    98    * Revision 1.2  1994/09/20  04:41:45  tes
    99    * For version 1.1
    100    *
    101  */
    102 
    103 /* #define DEBUG1 */
    104 
    105 /* #define DEBUG */
    10654
    10755#define is_power_of_two(a) ((a) != 0 && (((a) & ((a)-1)) == 0))
     
    264212  Message ("Actual mem required : %8u\n", mem_reqd);
    265213#endif
    266   exit (0);
     214  return (0);
    267215}
    268216
  • trunk/gsdl/src/mgpp/text/mg_decompress_text.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
    2422#define _XOPEN_SOURCE 1
    2523#define _XOPEN_SOURCE_EXTENDED 1
    26 #include <unistd.h>
    2724
     25#if defined __WIN32__
     26# include "getopt.h"
     27#else
     28# include <unistd.h>
     29#endif
     30
     31#include "UCArray.h"
    2832#include "sysfuncs.h"
    29 
    3033#include "TextGet.h"
    31 #include "UCArray.h"
    32 
    3334#include "messages.h"
    3435#include "mg_files.h"
    35 
    3636
    3737int main (int argc, char **argv) {
  • trunk/gsdl/src/mgpp/text/mg_errors.cpp

    r2445 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
     
    2827
    2928#include "mg_errors.h"
    30 
    31 
    3229
    3330int mg_errno = MG_NOERROR;
  • trunk/gsdl/src/mgpp/text/mg_errors.h

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
  • trunk/gsdl/src/mgpp/text/mg_fast_comp_dict.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    23 
    24 
    25 /*
    26    $Log$
    27    Revision 1.3  2001/05/17 04:38:15  jrm21
    28    portability changes, use getopt from unistd.h (all POSIX systems)
    29 
    30    Revision 1.2  2000/01/18 03:53:23  rjmcnab
    31    Fixed a couple of bugs and made building silent if needed.
    32 
    33    Revision 1.1  2000/01/14 02:26:13  sjboddie
    34    Rodgers new C++ mg
    35 
    36    Revision 1.2  1999/10/17 23:43:26  cs025
    37    Changes to eradicate Xmalloc
    38 
    39    Revision 1.1  1999/10/11 02:57:50  cs025
    40    Base install of MG-PP
    41 
    42    Revision 1.1  1999/08/10 21:18:06  sjboddie
    43    renamed mg-1.3d directory mg
    44 
    45    Revision 1.2  1998/11/25 07:55:44  rjmcnab
    46 
    47    Modified mg to that you can specify the stemmer you want
    48    to use via a command line option. You specify it to
    49    mg_passes during the build process. The number of the
    50    stemmer that you used is stored within the inverted
    51    dictionary header and the stemmed dictionary header so
    52    the correct stemmer is used in later stages of building
    53    and querying.
    54 
    55    Revision 1.1  1998/11/17 09:34:57  rjmcnab
    56    *** empty log message ***
    57 
    58    * Revision 1.3  1994/10/20  03:56:55  tes
    59    * I have rewritten the boolean query optimiser and abstracted out the
    60    * components of the boolean query.
    61    *
    62    * Revision 1.2  1994/09/20  04:41:47  tes
    63    * For version 1.1
    64    *
    65  */
    6621
    6722#define _XOPEN_SOURCE 1
    6823#define _XOPEN_SOURCE_EXTENDED 1
    69 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    7035
    7136#include "sysfuncs.h"
    72 
    7337#include "huffman.h"
    7438#include "messages.h"
     
    212176  save_fast_dict (filename);
    213177
    214   exit (0);
     178  return (0);
    215179}
    216180
     
    708672}
    709673
    710 
    711674static void
    712675save_fast_dict (char *filename)
  • trunk/gsdl/src/mgpp/text/mg_files.cpp

    r2382 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
     
    3332/* This must contain a valid path without a trailing slash */
    3433static char *basepath = NULL;
    35 
    36 
    3734
    3835/* This sets the base path for all file operations */
  • trunk/gsdl/src/mgpp/text/mg_files.h

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/mg_invf_dict.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    2635
    2736#include "sysfuncs.h"
    2837#include "messages.h"
    29 
    3038#include "mg_files.h"
    3139#include "invf.h"
    32 
    33 /*
    34    $Log$
    35    Revision 1.3  2001/05/17 04:38:15  jrm21
    36    portability changes, use getopt from unistd.h (all POSIX systems)
    37 
    38    Revision 1.2  2000/01/18 03:53:24  rjmcnab
    39    Fixed a couple of bugs and made building silent if needed.
    40 
    41    Revision 1.1  2000/01/14 02:26:16  sjboddie
    42    Rodgers new C++ mg
    43 
    44  */
    45 
    4640
    4741static void process_files (char *filename, unsigned long entriesPerBlock) {
  • trunk/gsdl/src/mgpp/text/mg_invf_dict_dump.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    2635
    2736#include "sysfuncs.h"
    2837#include "messages.h"
    29 
    3038#include "mg_files.h"
    3139#include "invf.h"
    32 
    33 /*
    34    $Log$
    35    Revision 1.3  2001/05/17 04:38:15  jrm21
    36    portability changes, use getopt from unistd.h (all POSIX systems)
    37 
    38    Revision 1.2  2001/02/02 01:13:05  kjm18
    39    changed the help message
    40 
    41    Revision 1.1  2000/01/14 02:17:51  sjboddie
    42    Rodgers new C++ mg
    43 
    44  */
    45 
    4640
    4741static void process_files (char *filename,
  • trunk/gsdl/src/mgpp/text/mg_invf_dump.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    2635
    2736#include "sysfuncs.h"
    28 
    2937#include "messages.h"
    3038#include "bitio_m_stdio.h"
     
    3745#include "invf.h"
    3846#include "WordData.h"
    39 
    40 /*
    41    $Log$
    42    Revision 1.3  2001/05/17 04:38:16  jrm21
    43    portability changes, use getopt from unistd.h (all POSIX systems)
    44 
    45    Revision 1.2  2001/02/02 01:12:29  kjm18
    46    added more command line options, and better help message
    47 
    48    Revision 1.1  2000/01/14 02:26:17  sjboddie
    49    Rodgers new C++ mg
    50 
    51    Revision 1.1  1999/10/11 02:57:55  cs025
    52    Base install of MG-PP
    53 
    54    Revision 1.1  1999/08/10 21:18:09  sjboddie
    55    renamed mg-1.3d directory mg
    56 
    57    Revision 1.2  1998/11/25 07:55:46  rjmcnab
    58 
    59    Modified mg to that you can specify the stemmer you want
    60    to use via a command line option. You specify it to
    61    mg_passes during the build process. The number of the
    62    stemmer that you used is stored within the inverted
    63    dictionary header and the stemmed dictionary header so
    64    the correct stemmer is used in later stages of building
    65    and querying.
    66 
    67    Revision 1.1  1998/11/17 09:35:05  rjmcnab
    68    *** empty log message ***
    69 
    70    * Revision 1.3  1994/11/29  00:32:01  tes
    71    * Committing the new merged files and changes.
    72    *
    73    * Revision 1.2  1994/09/20  04:41:50  tes
    74    * For version 1.1
    75    *
    76  */
    77 
    7847
    7948static void PrintInvfWord (FILE *invfFile,
  • trunk/gsdl/src/mgpp/text/mg_passes.cpp

    r2442 r2468  
    1919 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2020 *
    21  * $Id$
    22  *
    2321 **************************************************************************/
    2422
    2523#define _XOPEN_SOURCE 1
    2624#define _XOPEN_SOURCE_EXTENDED 1
     25
     26// need this to avoid bizarre compiler problems under VC++ 6.0
     27#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     28# include <iostream>
     29#endif
    2730
    2831#include "sysfuncs.h"
     
    3235#endif
    3336
    34 #include <unistd.h>
     37#if defined __WIN32__
     38# include <io.h>
     39# include "getopt.h"
     40# define close _close
     41# define open _open
     42#else
     43# include <unistd.h>
     44#endif
    3545
    3646#include "memlib.h"
    3747#include "messages.h"
    38 
    3948#include "longlong.h"
    40 
    4149#include "mg_files.h"
    4250#include "mg.h"
     
    4452#include "text.h"
    4553#include "stemmer.h"
    46 
    4754#include "FileBuf.h"
    4855#include "TextEl.h"
    4956#include "TagInfo.h"
    50 
    51 
    52 /*
    53    $Log$
    54    Revision 1.2  2001/05/17 04:38:16  jrm21
    55    portability changes, use getopt from unistd.h (all POSIX systems)
    56 
    57    Revision 1.1  2000/01/14 02:26:18  sjboddie
    58    Rodgers new C++ mg
    59 
    60    Revision 1.1  1999/10/11 02:58:00  cs025
    61    Base install of MG-PP
    62 
    63    Revision 1.1  1999/08/10 21:18:12  sjboddie
    64    renamed mg-1.3d directory mg
    65 
    66    Revision 1.3  1998/12/17 09:12:53  rjmcnab
    67 
    68    Altered mg to process utf-8 encoded Unicode. The main changes
    69    are in the parsing of the input, the casefolding, and the stemming.
    70 
    71    Revision 1.2  1998/11/25 07:55:47  rjmcnab
    72 
    73    Modified mg to that you can specify the stemmer you want
    74    to use via a command line option. You specify it to
    75    mg_passes during the build process. The number of the
    76    stemmer that you used is stored within the inverted
    77    dictionary header and the stemmed dictionary header so
    78    the correct stemmer is used in later stages of building
    79    and querying.
    80 
    81    Revision 1.1  1998/11/17 09:35:13  rjmcnab
    82    *** empty log message ***
    83 
    84    * Revision 1.3  1994/10/20  03:56:57  tes
    85    * I have rewritten the boolean query optimiser and abstracted out the
    86    * components of the boolean query.
    87    *
    88    * Revision 1.2  1994/09/20  04:41:52  tes
    89    * For version 1.1
    90    *
    91  */
    9257
    9358#define MAX_PASSES 5
     
    208173}
    209174
    210 
    211 
    212175int main (int argc, char **argv) {
    213176  int ch, in_fd;
     
    296259  Driver (in_fd, filename, tagInfo, compatMode);
    297260
    298   exit (0);
    299 }
     261  return (0);
     262}
  • trunk/gsdl/src/mgpp/text/mg_perf_hash_build.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
    2422#define _XOPEN_SOURCE 1
    2523#define _XOPEN_SOURCE_EXTENDED 1
    26 #include <unistd.h>
     24
     25// need this to avoid bizarre compiler problems under VC++ 6.0
     26#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     27# include <iostream>
     28#endif
     29
     30#if defined (__WIN32__)
     31# include "getopt.h"
     32#else
     33# include <unistd.h>
     34#endif
    2735
    2836#include "sysfuncs.h"
     
    3947#include "mg.h"
    4048
    41 /*
    42    $Log$
    43    Revision 1.4  2001/05/17 04:38:16  jrm21
    44    portability changes, use getopt from unistd.h (all POSIX systems)
    45 
    46    Revision 1.3  2001/05/07 05:01:47  jrm21
    47    replaced bcopy with memcpy
    48 
    49    Revision 1.2  2000/02/15 22:45:22  kjm18
    50    added feature to retrieve doc nums at a different level than the level
    51    queried at. eg query at Document level, but retrieve section level docnums
    52    bug in mg_perf_hash_build.cpp fixed
    53 
    54    Revision 1.1  2000/01/14 02:26:19  sjboddie
    55    Rodgers new C++ mg
    56 
    57    Revision 1.2  1999/10/17 23:43:27  cs025
    58    Changes to eradicate Xmalloc
    59 
    60    Revision 1.1  1999/10/11 02:58:01  cs025
    61    Base install of MG-PP
    62 
    63    Revision 1.1  1999/08/10 21:18:13  sjboddie
    64    renamed mg-1.3d directory mg
    65 
    66    Revision 1.2  1998/11/25 07:55:47  rjmcnab
    67 
    68    Modified mg to that you can specify the stemmer you want
    69    to use via a command line option. You specify it to
    70    mg_passes during the build process. The number of the
    71    stemmer that you used is stored within the inverted
    72    dictionary header and the stemmed dictionary header so
    73    the correct stemmer is used in later stages of building
    74    and querying.
    75 
    76    Revision 1.1  1998/11/17 09:35:15  rjmcnab
    77    *** empty log message ***
    78 
    79    * Revision 1.3  1994/10/20  03:56:58  tes
    80    * I have rewritten the boolean query optimiser and abstracted out the
    81    * components of the boolean query.
    82    *
    83    * Revision 1.2  1994/09/20  04:41:53  tes
    84    * For version 1.1
    85    *
    86  */
    87 
    88 
    89 
    9049#define POOL_SIZE 1024*1024
    91 
    9250
    9351static void ProcessFiles (char *filename, int r) {
  • trunk/gsdl/src/mgpp/text/mg_stem_idx.cpp

    r2442 r2468  
    2222#define _XOPEN_SOURCE 1
    2323#define _XOPEN_SOURCE_EXTENDED 1
    24 #include <unistd.h>
    25 
     24
     25#if defined (__WIN32__)
     26# include "getopt.h"
     27#else
     28# include <unistd.h>
     29#endif
     30
     31#include "UCArray.h"
    2632#include "sysfuncs.h"
    2733#include "messages.h"
    28 
    2934#include "mg_files.h"
    3035#include "invf.h"
    31 #include "UCArray.h"
    3236#include "words.h"
    33 
    3437#include "stemmer.h"
    35 
    3638
    3739#if defined(GSDL_USE_OBJECTSPACE)
     
    4648#endif
    4749
    48 
    49 /*
    50    $Log$
    51    Revision 1.5  2001/05/17 04:38:16  jrm21
    52    portability changes, use getopt from unistd.h (all POSIX systems)
    53 
    54    Revision 1.4  2001/05/07 05:01:47  jrm21
    55    replaced bcopy with memcpy
    56 
    57    Revision 1.3  2000/01/18 03:53:24  rjmcnab
    58    Fixed a couple of bugs and made building silent if needed.
    59 
    60    Revision 1.2  2000/01/14 02:45:51  sjboddie
    61    fixed compiler warning
    62 
    63    Revision 1.1  2000/01/14 02:26:20  sjboddie
    64    Rodgers new C++ mg
    65 
    66  */
    67 
    68 
    6950typedef vector<unsigned long> WordNumList;
    7051typedef map<UCArray, WordNumList, DictLTUCArray> StemMapDict;
    71 
    7252
    7353void CreateStemDict (char *filename,
  • trunk/gsdl/src/mgpp/text/mg_weights_build.cpp

    r2442 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
    2322#define _XOPEN_SOURCE 1
    2423#define _XOPEN_SOURCE_EXTENDED 1
    25 #include <unistd.h>
    26 
     24
     25#if defined (__WIN32__)
     26# include "getopt.h"
     27#else
     28# include <unistd.h>
     29#endif
     30
     31#include "UCArray.h"
    2732#include "sysfuncs.h"
    2833#include "memlib.h"
     
    3136#include "bitio_gen.h"
    3237#include "bitio_m_stdio.h"
    33 
    3438#include "mg_files.h"
    3539#include "locallib.h"
    3640#include "invf.h"
    37 // #include "WordData.h"
    38 #include "UCArray.h"
    3941#include "FIvfLevelInfo.h"
    4042#include "FragLevelConvert.h"
     
    4749#  include <map>
    4850#endif
    49 
    50 
    51 /*
    52    $Log$
    53    Revision 1.4  2001/05/17 04:38:16  jrm21
    54    portability changes, use getopt from unistd.h (all POSIX systems)
    55 
    56    Revision 1.3  2000/01/18 23:24:19  rjmcnab
    57    fixed a few more bugs
    58 
    59    Revision 1.2  2000/01/18 03:53:24  rjmcnab
    60    Fixed a couple of bugs and made building silent if needed.
    61 
    62    Revision 1.1  2000/01/14 02:26:21  sjboddie
    63    Rodgers new C++ mg
    64 
    65    Revision 1.1  1999/10/11 02:58:06  cs025
    66    Base install of MG-PP
    67 
    68    Revision 1.1  1999/08/10 21:18:16  sjboddie
    69    renamed mg-1.3d directory mg
    70 
    71    Revision 1.2  1998/11/25 07:55:49  rjmcnab
    72 
    73    Modified mg to that you can specify the stemmer you want
    74    to use via a command line option. You specify it to
    75    mg_passes during the build process. The number of the
    76    stemmer that you used is stored within the inverted
    77    dictionary header and the stemmed dictionary header so
    78    the correct stemmer is used in later stages of building
    79    and querying.
    80 
    81    Revision 1.1  1998/11/17 09:35:22  rjmcnab
    82    *** empty log message ***
    83 
    84    * Revision 1.4  1994/11/29  00:32:05  tes
    85    * Committing the new merged files and changes.
    86    *
    87    * Revision 1.3  1994/10/20  03:57:00  tes
    88    * I have rewritten the boolean query optimiser and abstracted out the
    89    * components of the boolean query.
    90    *
    91    * Revision 1.2  1994/09/20  04:41:55  tes
    92    * For version 1.1
    93    *
    94  */
    9551
    9652#define MAXBITS (sizeof(unsigned long) * 8)
  • trunk/gsdl/src/mgpp/text/stemmer.cpp

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     
    2826#include "simplefrenchstem.h"
    2927#include "unitool.h"
    30 
    31 /*
    32    $Log$
    33    Revision 1.1  2000/01/14 02:26:22  sjboddie
    34    Rodgers new C++ mg
    35 
    36    Revision 1.1  1999/10/11 02:58:34  cs025
    37    Base install of MG-PP
    38 
    39    Revision 1.1  1999/08/10 21:18:23  sjboddie
    40    renamed mg-1.3d directory mg
    41 
    42    Revision 1.3  1998/12/17 09:12:54  rjmcnab
    43 
    44    Altered mg to process utf-8 encoded Unicode. The main changes
    45    are in the parsing of the input, the casefolding, and the stemming.
    46 
    47    Revision 1.2  1998/11/25 07:55:51  rjmcnab
    48 
    49    Modified mg to that you can specify the stemmer you want
    50    to use via a command line option. You specify it to
    51    mg_passes during the build process. The number of the
    52    stemmer that you used is stored within the inverted
    53    dictionary header and the stemmed dictionary header so
    54    the correct stemmer is used in later stages of building
    55    and querying.
    56 
    57    Revision 1.1  1998/11/17 09:35:42  rjmcnab
    58    *** empty log message ***
    59 
    60    * Revision 1.3  1994/10/20  03:57:05  tes
    61    * I have rewritten the boolean query optimiser and abstracted out the
    62    * components of the boolean query.
    63    *
    64    * Revision 1.2  1994/09/20  04:42:10  tes
    65    * For version 1.1
    66    *
    67  */
    68 
    6928
    7029#define LOVINSTEMMER        0
  • trunk/gsdl/src/mgpp/text/stemmer.h

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
  • trunk/gsdl/src/mgpp/text/text.cpp

    r1298 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    2321
     22// UCArray currently contains all the basic reading and writing functions
     23#include "UCArray.h"
    2424#include "text.h"
    25 
    26 // UCArray currently contains all the basic reading and writing
    27 // functions
    28 #include "UCArray.h"
    29 
    3025
    3126compressed_text_header::compressed_text_header () {
  • trunk/gsdl/src/mgpp/text/text.h

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
    23 
    24 
    2521
    2622#ifndef H_TEXT
     
    2925#include "huffman.h"
    3026#include <stdio.h>
    31 
    32 
    33 
    3427
    3528/*****************************************************************************
  • trunk/gsdl/src/mgpp/text/text.pass1.cpp

    r856 r2468  
    1919 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2020 *
    21  * $Id$
    22  *
    2321 **************************************************************************/
    2422
     23// need this to avoid bizarre compiler problems under VC++ 6.0
     24#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     25# include <iostream>
     26#endif
     27
    2528#include "sysfuncs.h"
    26 
    2729#include "memlib.h"
    2830#include "messages.h"
    2931#include "huffman.h"
    3032#include "netorder.h"  /* [RPAP - Jan 97: Endian Ordering] */
    31 
    32 
    3333#include "mg_files.h"
    3434#include "mg.h"
     
    3939#include "hash.h"
    4040#include "local_strings.h"
    41 
    4241#include "TextEl.h"
    43 
    44 
    45 /*
    46    $Log$
    47    Revision 1.1  2000/01/14 02:26:23  sjboddie
    48    Rodgers new C++ mg
    49 
    50    Revision 1.1  1999/10/11 02:58:37  cs025
    51    Base install of MG-PP
    52 
    53    Revision 1.1  1999/08/10 21:18:25  sjboddie
    54    renamed mg-1.3d directory mg
    55 
    56    Revision 1.2  1998/12/17 09:12:54  rjmcnab
    57 
    58    Altered mg to process utf-8 encoded Unicode. The main changes
    59    are in the parsing of the input, the casefolding, and the stemming.
    60 
    61    Revision 1.1  1998/11/17 09:35:46  rjmcnab
    62    *** empty log message ***
    63 
    64    * Revision 1.4  1994/11/25  03:47:47  tes
    65    * Committing files before adding the merge stuff.
    66    *
    67    * Revision 1.3  1994/10/20  03:57:09  tes
    68    * I have rewritten the boolean query optimiser and abstracted out the
    69    * components of the boolean query.
    70    *
    71    * Revision 1.2  1994/09/20  04:42:13  tes
    72    * For version 1.1
    73    *
    74  */
    75 
    7642
    7743#define POOL_SIZE 1024*1024
    7844#define INITIAL_HASH_SIZE 7927
    79 
    80 
    81 
    82 
    83 
    8445
    8546
  • trunk/gsdl/src/mgpp/text/text.pass2.cpp

    r856 r2468  
    1919 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2020 *
    21  * $Id$
    22  *
    2321 **************************************************************************/
    2422
     23// need this to avoid bizarre compiler problems under VC++ 6.0
     24#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     25# include <iostream>
     26#endif
     27
     28#if defined (__WIN32__)
     29# include <stdio.h>
     30# define unlink _unlink
     31#endif
    2532
    2633#include "sysfuncs.h"
    27 
    2834#include "memlib.h"
    2935#include "messages.h"
     
    3238#include "huffman.h"
    3339#include "netorder.h"  /* [RPAP - Jan 97: Endian Ordering] */
    34 
    3540#include "mg.h"
    3641#include "mg_files.h"
     
    4146#include "locallib.h"
    4247#include "comp_dict.h"
    43 
    4448#include "FText.h"
    4549
    46 
    47 /*
    48    $Log$
    49    Revision 1.1  2000/01/14 02:26:24  sjboddie
    50    Rodgers new C++ mg
    51 
    52    Revision 1.1  1999/10/11 02:58:38  cs025
    53    Base install of MG-PP
    54 
    55    Revision 1.1  1999/08/10 21:18:25  sjboddie
    56    renamed mg-1.3d directory mg
    57 
    58    Revision 1.2  1998/12/17 09:12:54  rjmcnab
    59 
    60    Altered mg to process utf-8 encoded Unicode. The main changes
    61    are in the parsing of the input, the casefolding, and the stemming.
    62 
    63    Revision 1.1  1998/11/17 09:35:47  rjmcnab
    64    *** empty log message ***
    65 
    66    * Revision 1.3  1994/10/20  03:57:10  tes
    67    * I have rewritten the boolean query optimiser and abstracted out the
    68    * components of the boolean query.
    69    *
    70    * Revision 1.2  1994/09/20  04:42:14  tes
    71    * For version 1.1
    72    *
    73  */
    74 
    7550#define POOL_SIZE 1024*256
     51
    7652
    7753struct char_pool {
  • trunk/gsdl/src/mgpp/text/words.cpp

    r856 r2468  
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1919 *
    20  * $Id$
    21  *
    2220 **************************************************************************/
     21
     22// need this to avoid bizarre compiler problems under VC++ 6.0
     23#if defined (__WIN32__) && !defined (GSDL_USE_IOS_H)
     24# include <iostream>
     25#endif
    2326
    2427#include "words.h"
  • trunk/gsdl/src/mgpp/text/words.h

    r856 r2468  
    1717 * along with this program; if not, write to the Free Software
    1818 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    19  *
    20  * $Id$
    2119 *
    2220 **************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.