Changeset 2468
- Timestamp:
- 2001-05-24T17:06:48+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/mgpp
- Files:
-
- 2 added
- 101 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/mgpp/lib/WIN32.MAK
r855 r2468 1 # Generated automatically from Makefile.in by configure.2 1 ########################################################################### 3 2 # 4 # Makefile.in -- Makefile for the general purpose library 5 # Copyright (C) 1994 Neil Sharman; (C) 1995 Tim Shimmin 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 # 6 10 # 7 11 # This program is free software; you can redistribute it and/or modify … … 19 23 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 24 # 21 # @(#)Makefile.in 1.3 16 Mar 199422 #23 25 ########################################################################### 24 26 27 GSDLHOME = ..\..\.. 28 USE_STLPORT = 0 25 29 26 PACKAGE = mg 27 VERSION = 1.3 28 29 AR = lib 30 STLPATH = "$(GSDLHOME)\packages\windows\stlport\stlport" 31 30 32 CC = cl 31 #CFLAGS = -g -O 32 CPPFLAGS = 33 DEFS = -DQUIET -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN 34 35 COMPILE = $(CC) -c $(DEFS) -I. -I.. 36 33 CPPFLAGS = 34 DEFS = -DSHORT_SUFFIX -DSILENT -DHAVE_CONFIG_H -D__WIN32__ 35 INCLUDES = -I"$(GSDLHOME)" 36 !IF $(USE_STLPORT) 37 DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS 38 INCLUDES = $(INCLUDES) -I$(STLPATH) 39 !ENDIF 40 41 LDFLAGS = 42 43 LIBS = 44 45 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) 46 LINK = $(CC) $(LDFLAGS) 47 37 48 .SUFFIXES: 38 .SUFFIXES: .c .obj 49 .SUFFIXES: .c .obj .cpp 39 50 .c.obj: 40 51 $(COMPILE) $< 52 .cpp.obj: 53 $(COMPILE) $< 41 54 42 ANSI2KNR =43 55 o = .obj 44 45 46 INCLUDES = -I.. 47 56 48 57 HEADERS = \ 49 58 bitio_m_random.h local_strings.h lovinstem.h \ 50 bitio_m_stdio.h getopt.hmemlib.h netorder.h \59 bitio_m_stdio.h memlib.h netorder.h \ 51 60 bitio_gen.h mgheap.h messages.h \ 52 61 bitio_m.h huffman.h \ 53 62 bitio_m_mem.h perf_hash.h \ 54 bitio_m_mems.h \63 bitio_m_mems.h getopt.h \ 55 64 pathmax.h getpagesize.h sysfuncs.h bitio_m_abstract.h \ 56 65 random.h simplefrenchstem.h unitool.h longlong.h \ 57 non_ansi.h win32in.h 58 66 non_ansi.h 59 67 60 68 SOURCES = \ 61 mgheap.cpp memlib.cpp\69 mgheap.cpp \ 62 70 huffman.cpp messages.cpp \ 63 71 bitio_gen.cpp perf_hash.cpp \ 64 getopt.cpp \ 65 getopt1.cpp local_strings.cpp lovinstem.cpp \ 72 local_strings.cpp lovinstem.cpp \ 66 73 bitio_m_mem.cpp bitio_m_stdio.cpp bitio_m_mems.cpp \ 67 alloca.c 68 gmalloc.cftruncate.cpp strcasecmp.cpp random.cpp \74 alloca.c xmalloc.c strstr.cpp \ 75 ftruncate.cpp strcasecmp.cpp random.cpp \ 69 76 simplefrenchstem.cpp unitool.cpp bitio_m_random.cpp \ 70 bitio_m_abstract.cpp win32in.c77 bitio_m_abstract.cpp getopt.c 71 78 72 OBJECTS = mgheap$o memlib$o\79 OBJECTS = mgheap$o \ 73 80 huffman$o messages$o \ 74 81 bitio_gen$o perf_hash$o \ 75 getopt$o \ 76 getopt1$o local_strings$o lovinstem$o \ 82 local_strings$o lovinstem$o \ 77 83 bitio_m_mem$o bitio_m_stdio$o bitio_m_mems$o \ 78 84 xmalloc$o bitio_m_random$o bitio_m_abstract$o \ 79 gmalloc$orandom$o simplefrenchstem$o \80 unitool$o win32in$o85 random$o simplefrenchstem$o \ 86 unitool$o getopt$o 81 87 82 83 DISTFILES = Makefile.in $(HEADERS) $(SOURCES)84 85 88 all : libmg.lib 86 89 87 libmg.lib : $(OBJECTS) 90 libmg.lib: $(OBJECTS) 91 if EXIST libmg.lib del libmg.lib 92 lib /out:libmg.lib $(OBJECTS) 93 94 clean: 95 del *$o 88 96 del libmg.lib 89 $(AR) /out:libmg.lib $(OBJECTS)90 97 91 $(OBJECTS): ..\win32cfg.h 92 93 install: 94 installdirs: 95 uninstall: 96 execinstall: 97 execuninstall: 98 maninstall: 99 manuninstall: 100 101 #dist: $(DISTFILES) 102 # for file in $(DISTFILES); do \ 103 # ln $$file $(distdir) 2> /dev/null \ 104 # || cp -p $$file $(distdir); \ 105 # done 106 107 mostlyclean: 108 del *.obj 109 110 clean: mostlyclean 111 del libmg.lib 112 113 distclean: clean 114 rm -f Makefile 115 116 maintainer-clean: distclean 117 @echo "This command is intended only for maintainers to use;" 118 @echo "rebuilding the deleted files may require special tools." 119 120 #Makefile: Makefile.in ../config.status 121 # cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status 122 123 # Tell versions [3.59,3.63) of GNU make not to export all variables. 124 # Otherwise a system limit (for SysV at least) may be exceeded. 125 #.NOEXPORT: 98 install: -
trunk/gsdl/src/mgpp/lib/bitio_gen.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:16:58 sjboddie27 Rodgers new C++ mg28 29 Revision 1.1 1999/10/11 02:54:54 cs02530 Base install of MG-PP31 32 Revision 1.1 1999/08/10 21:16:42 sjboddie33 renamed mg-1.3d directory mg34 35 Revision 1.1 1998/11/17 09:31:40 rjmcnab36 *** empty log message ***37 38 * Revision 1.1 1994/08/22 00:24:38 tes39 * Initial placement under CVS.40 *41 */42 43 static char *RCSID = "$Id$";44 21 45 22 #include "sysfuncs.h" 46 23 #include "bitio_m_abstract.h" 47 48 49 50 24 51 25 int fprintf (FILE *, const char *,...); -
trunk/gsdl/src/mgpp/lib/bitio_gen.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 ************************************************************************** -
trunk/gsdl/src/mgpp/lib/bitio_m_mem.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 ************************************************************************** -
trunk/gsdl/src/mgpp/lib/bitio_m_mems.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 ************************************************************************** -
trunk/gsdl/src/mgpp/lib/bitio_m_random.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 ************************************************************************** -
trunk/gsdl/src/mgpp/lib/bitio_m_stdio.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 ************************************************************************** -
trunk/gsdl/src/mgpp/lib/huffman.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:17:06 sjboddie27 Rodgers new C++ mg28 29 Revision 1.2 1999/10/17 23:39:13 cs02530 Changes to eradicate Xmalloc etc31 32 Revision 1.1 1999/10/11 02:55:09 cs02533 Base install of MG-PP34 35 Revision 1.1 1999/08/10 21:16:51 sjboddie36 renamed mg-1.3d directory mg37 38 Revision 1.1 1998/11/17 09:32:03 rjmcnab39 *** empty log message ***40 41 * Revision 1.1 1994/08/22 00:24:44 tes42 * Initial placement under CVS.43 *44 */45 46 static char *RCSID = "$Id$";47 21 48 22 #include "sysfuncs.h" … … 67 41 goto error0; 68 42 } 69 if (!(heap = new (unsigned long)[num * 2]))43 if (!(heap = new unsigned long[num * 2])) 70 44 goto error1; 71 45 if (!(hd->clens = new char[num])) … … 250 224 if (!(vals = new unsigned long[data->num_codes])) 251 225 return (NULL); 252 if (!(values = new (unsigned long *)[MAX_HUFFCODE_LEN + 1]))226 if (!(values = new unsigned long *[MAX_HUFFCODE_LEN + 1])) 253 227 { 254 228 delete vals; -
trunk/gsdl/src/mgpp/lib/huffman.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/lib/local_strings.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 static char *RCSID = "$Id$";25 21 26 22 #include "sysfuncs.h" -
trunk/gsdl/src/mgpp/lib/local_strings.h
r2442 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/lib/longlong.h
r855 r2468 23 23 #define H_LONGLONG 24 24 25 #include "config.h" 25 #ifdef HAVE_CONFIG_H 26 # ifdef __WIN32__ 27 # include <WIN32cfg.h> 28 # else 29 # include <config.h> 30 # endif 31 #endif 26 32 27 33 /* -
trunk/gsdl/src/mgpp/lib/lovinstem.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 static char *RCSID = "$Id$";25 21 26 22 #include "sysfuncs.h" -
trunk/gsdl/src/mgpp/lib/lovinstem.h
r855 r2468 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 * 21 * $Id$22 *23 21 **************************************************************************/ 24 22 25 /*26 $Log$27 Revision 1.1 2000/01/14 02:17:09 sjboddie28 Rodgers new C++ mg29 30 Revision 1.1 1999/10/11 02:55:15 cs02531 Base install of MG-PP32 33 Revision 1.1 1999/08/10 21:16:54 sjboddie34 renamed mg-1.3d directory mg35 36 Revision 1.1 1998/11/25 07:55:36 rjmcnab37 38 Modified mg to that you can specify the stemmer you want39 to use via a command line option. You specify it to40 mg_passes during the build process. The number of the41 stemmer that you used is stored within the inverted42 dictionary header and the stemmed dictionary header so43 the correct stemmer is used in later stages of building44 and querying.45 46 Revision 1.1 1998/11/17 09:32:47 rjmcnab47 *** empty log message ***48 49 * Revision 1.2 1994/09/20 04:20:10 tes50 * Changes made for 1.151 *52 *53 */54 23 #ifndef LOVINSTEM_H 55 24 #define LOVINSTEM_H -
trunk/gsdl/src/mgpp/lib/memlib.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:17:09 sjboddie27 Rodgers new C++ mg28 29 Revision 1.2 1999/10/17 23:39:45 cs02530 Changes to eradicate Xmalloc etc31 32 Revision 1.1 1999/10/11 02:55:15 cs02533 Base install of MG-PP34 35 Revision 1.1 1999/08/10 21:16:54 sjboddie36 renamed mg-1.3d directory mg37 38 Revision 1.1 1998/11/17 09:32:10 rjmcnab39 *** empty log message ***40 41 * Revision 1.1 1994/08/22 00:24:47 tes42 * Initial placement under CVS.43 *44 */45 46 static char *RCSID = "$Id$";47 48 21 49 22 #include "sysfuncs.h" -
trunk/gsdl/src/mgpp/lib/memlib.h
r2383 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 21 25 22 #ifndef H_MEMLIB … … 33 30 #define Xrealloc realloc 34 31 #define Xfree free 35 #define Xstrdup strdup 32 33 #if defined (__WIN32__) 34 # define Xstrdup _strdup 35 #else 36 # define Xstrdup strdup 37 #endif 36 38 37 39 #else -
trunk/gsdl/src/mgpp/lib/messages.cpp
r860 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.2 2000/01/18 03:53:19 rjmcnab27 Fixed a couple of bugs and made building silent if needed.28 29 Revision 1.1 2000/01/14 02:17:10 sjboddie30 Rodgers new C++ mg31 32 Revision 1.1 1999/10/11 02:55:16 cs02533 Base install of MG-PP34 35 Revision 1.1 1999/08/10 21:16:55 sjboddie36 renamed mg-1.3d directory mg37 38 Revision 1.2 1998/11/23 03:38:06 rjmcnab39 40 combined unix and windows versions of mg41 42 Revision 1.1 1998/11/19 03:00:32 sjboddie43 Added windows gdbm and mg versions44 45 * Revision 1.1 1994/08/22 00:24:48 tes46 * Initial placement under CVS.47 *48 */49 50 static char *RCSID = "$Id$";51 21 52 22 #include "sysfuncs.h" -
trunk/gsdl/src/mgpp/lib/messages.h
r1295 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/lib/mgheap.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:17:11 sjboddie27 Rodgers new C++ mg28 29 Revision 1.1 1999/10/11 02:55:18 cs02530 Base install of MG-PP31 32 Revision 1.1 1999/08/10 21:16:55 sjboddie33 renamed mg-1.3d directory mg34 35 Revision 1.1 1999/01/15 03:05:50 rjmcnab36 37 Renamed lib/heap to be lib/mgheap (it was causing some problems with38 some versions of the STL libraries which contained a heap.h)39 40 Revision 1.1 1998/11/17 09:32:01 rjmcnab41 *** empty log message ***42 43 * Revision 1.1 1994/08/22 00:24:43 tes44 * Initial placement under CVS.45 *46 */47 48 static char *RCSID = "$Id$";49 21 50 22 #include "mgheap.h" -
trunk/gsdl/src/mgpp/lib/mgheap.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/lib/perf_hash.cpp
r2377 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 ************************************************************************** 23 21 * … … 27 25 * 28 26 **************************************************************************/ 29 30 /*31 $Log$32 Revision 1.2 2001/05/07 04:59:59 jrm2133 replaced bcopy with memcpy34 35 Revision 1.1 2000/01/14 02:17:13 sjboddie36 Rodgers new C++ mg37 38 Revision 1.1 1998/11/17 09:32:17 rjmcnab39 *** empty log message ***40 41 * Revision 1.2 1994/08/22 00:26:30 tes42 * Made perf_hash take the ceiling of 1.23 * num43 * in lieu of the floor.44 * This was done so that perf_hash works ok on45 * a small number of keys.46 *47 * Revision 1.1 1994/08/22 00:24:49 tes48 * Initial placement under CVS.49 *50 */51 52 static char *RCSID = "$Id$";53 54 27 55 28 #define STRUCT -
trunk/gsdl/src/mgpp/lib/perf_hash.h
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 22 #ifndef H_PERF_HASH 25 23 #define H_PERF_HASH 26 27 28 29 24 30 25 struct tb_entry -
trunk/gsdl/src/mgpp/lib/random.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:17:14 sjboddie27 Rodgers new C++ mg28 29 Revision 1.1 1999/10/11 02:55:22 cs02530 Base install of MG-PP31 32 Revision 1.1 1999/08/10 21:16:57 sjboddie33 renamed mg-1.3d directory mg34 35 Revision 1.1 1998/11/17 09:32:20 rjmcnab36 *** empty log message ***37 38 */39 40 static char *RCSID = "$Id$";41 21 42 22 /* -
trunk/gsdl/src/mgpp/lib/random.h
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 /*25 $Log$26 Revision 1.1 2000/01/14 02:17:15 sjboddie27 Rodgers new C++ mg28 29 Revision 1.1 1999/10/11 02:55:22 cs02530 Base install of MG-PP31 32 Revision 1.1 1999/08/10 21:16:58 sjboddie33 renamed mg-1.3d directory mg34 35 Revision 1.1 1998/11/17 09:32:21 rjmcnab36 *** empty log message ***37 38 */39 21 40 22 #ifndef RANDOM_H -
trunk/gsdl/src/mgpp/lib/simplefrenchstem.cpp
r855 r2468 16 16 * along with this program; if not, write to the Free Software 17 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 *19 * $Id$20 18 * 21 19 **************************************************************************/ -
trunk/gsdl/src/mgpp/lib/simplefrenchstem.h
r855 r2468 17 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 18 * 19 * $Id$20 *21 19 **************************************************************************/ 22 23 /*24 $Log$25 Revision 1.1 2000/01/14 02:17:15 sjboddie26 Rodgers new C++ mg27 28 Revision 1.1 1999/10/11 02:55:29 cs02529 Base install of MG-PP30 31 Revision 1.1 1999/08/10 21:17:04 sjboddie32 renamed mg-1.3d directory mg33 34 Revision 1.1 1998/11/25 07:55:37 rjmcnab35 36 Modified mg to that you can specify the stemmer you want37 to use via a command line option. You specify it to38 mg_passes during the build process. The number of the39 stemmer that you used is stored within the inverted40 dictionary header and the stemmed dictionary header so41 the correct stemmer is used in later stages of building42 and querying.43 44 Revision 1.1 1998/11/24 06:37:53 rjmcnab45 46 Incorporated the french stemmer better.47 48 49 */50 20 51 21 #ifndef SIMPLEFRENCHSTEM_H -
trunk/gsdl/src/mgpp/lib/strcasecmp.cpp
r855 r2468 56 56 57 57 int 58 strcasecmp(s1, s2) 59 char *s1, *s2; 58 strcasecmp(char *s1, char *s2) 60 59 { 61 60 register unsigned char u1, u2; -
trunk/gsdl/src/mgpp/lib/strstr.cpp
r855 r2468 22 22 23 23 char * 24 strstr (s1, s2) 25 char *s1; 26 char *s2; 24 strstr (char *s1, char *s2) 27 25 { 28 26 int i; -
trunk/gsdl/src/mgpp/lib/sysfuncs.h
r2442 r2468 296 296 #endif 297 297 298 #ifndef __WIN32__ 298 299 #include <pathmax.h> 300 #endif 299 301 300 302 /* Until getoptold function is declared in getopt.h, we need this here for -
trunk/gsdl/src/mgpp/lib/win32in.h
r855 r2468 1 1 /* This module provides an equivalent of <netinet/in.h> on */ 2 2 /* unix systems. */ 3 4 #include "longlong.h" 3 5 4 6 unsigned long htonl(unsigned long x); -
trunk/gsdl/src/mgpp/lib/xmalloc.c
r855 r2468 56 56 int xmalloc_exit_failure = EXIT_FAILURE; 57 57 58 #if defined(__WIN32__) 59 void error (int, int, const char *, ...); 60 #else 58 61 #if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT) 59 62 void error (int, int, const char *, ...); 60 63 #else 61 void error ( );64 void error (int, int, char *, char *, char *, char *, char *, char *, char *, char *, char *); 62 65 #endif 66 #endif; 63 67 64 68 static VOID * 65 fixup_null_alloc (size_t n) 69 fixup_null_alloc (n) 70 size_t n; 66 71 { 67 72 VOID *p; … … 78 83 79 84 VOID * 80 xmalloc (size_t n) 85 xmalloc (n) 86 size_t n; 81 87 { 82 88 VOID *p; … … 93 99 94 100 VOID * 95 xrealloc (VOID *p, size_t n) 101 xrealloc (p, n) 102 VOID *p; 103 size_t n; 96 104 { 97 105 if (p == 0) -
trunk/gsdl/src/mgpp/text/FIvfLevelInfo.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/FIvfLevelInfo.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/FText.cpp
r860 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/FText.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/FileBuf.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 25 23 #include "sysfuncs.h" 26 24 25 #ifdef __WIN32__ 26 # include <io.h> 27 # define read _read 28 #endif 27 29 28 30 bool FileBuf::NextBuf () { 29 31 if (fd < 0) return false; 30 31 32 int numbytes = read (fd, buf, FILEBUFSIZE); 32 33 if (numbytes < 0) numbytes = 0; -
trunk/gsdl/src/mgpp/text/FileBuf.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/FragLevelConvert.cpp
r927 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 103 101 104 102 } 105 106 107 -
trunk/gsdl/src/mgpp/text/FragLevelConvert.h
r927 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/GSDLQueryLex.cpp
r1127 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/GSDLQueryLex.h
r1127 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/GSDLQueryParser.cpp
r1770 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 94 92 // default is within 20 words 95 93 static void SetRangeValues (TermNode &termNode, 96 UCArray &near ) {97 UCArray NEAR ; SetCStr(NEAR, "NEAR");98 if (near == NEAR) { // no modifier94 UCArray &nearby) { 95 UCArray NEARBY; SetCStr(NEARBY, "NEAR"); 96 if (nearby == NEARBY) { // no modifier 99 97 termNode.startRange = -21; 100 98 termNode.endRange = 20; 101 99 } 102 100 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(); 105 103 int size=0; 106 104 while (here != end) { … … 112 110 termNode.endRange = size; 113 111 } 114 115 116 } 112 } 113 117 114 static unsigned long GetStemMethod(LexEl &el, int defaultStemMethod) { 118 115 // here expect el to contain some of c,s,i,u -
trunk/gsdl/src/mgpp/text/GSDLQueryParser.h
r1770 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 -
trunk/gsdl/src/mgpp/text/IndexData.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/IndexData.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/MGQuery.cpp
r1848 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 657 655 result.docs.begin()+resultsSize, 658 656 result.ranks.begin()+resultsSize, 659 result.ranks.size()-resultsSize, gtRank); 657 (unsigned long) result.ranks.size()-resultsSize, 658 gtRank); 660 659 661 660 // sort into descending order … … 760 759 761 760 } 762 763 764 765 766 767 768 -
trunk/gsdl/src/mgpp/text/MGQuery.h
r1836 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 28 26 #include <limits.h> 29 27 #include "Terms.h" 30 31 32 28 33 29 // forms base for defining and calculating the boolean … … 200 196 201 197 #endif 202 203 204 205 206 207 208 209 210 211 -
trunk/gsdl/src/mgpp/text/QueryLex.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/QueryLex.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/QueryParser.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/QueryParser.h
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 -
trunk/gsdl/src/mgpp/text/QueryResultsSort.h
r861 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 93 91 swap (*(parallelHeap), *(parallelHeap+heapSize-1)); 94 92 swap (*(docNumHeap), *(docNumHeap+heapSize-1)); 95 AdjustHeap (docNumHeap, parallelHeap, 0, heapSize-1, comp);93 AdjustHeap (docNumHeap, parallelHeap, (unsigned long)0, heapSize-1, comp); 96 94 } 97 95 … … 135 133 swap (*(docNumHeap), *(docNumAdd+i)); 136 134 swap (*(parallelHeap), *(parallelAdd+i)); 137 AdjustHeap (docNumHeap, parallelHeap, 0, heapSize, comp);135 AdjustHeap (docNumHeap, parallelHeap, (unsigned long)0, heapSize, comp); 138 136 } 139 137 } -
trunk/gsdl/src/mgpp/text/QueryTester.cpp
r855 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 98 96 rcDocSet.push_back (19); rcRankSet.push_back (1.4); 99 97 100 if ( result != resultCompare) {98 if (!(result == resultCompare)) { 101 99 cout << "Test failed!!!\n"; 102 100 cout << resultCompare; … … 157 155 rcDocSet.push_back (19); 158 156 159 if ( result != resultCompare) {157 if (!(result == resultCompare)) { 160 158 cout << "Test failed!!!\n"; 161 159 cout << resultCompare; … … 232 230 233 231 234 if ( result != resultCompare) {232 if (!(result == resultCompare)) { 235 233 cout << "Test failed!!!\n"; 236 234 cout << resultCompare; … … 304 302 305 303 306 if ( result != resultCompare) {304 if (!(result == resultCompare)) { 307 305 cout << "Test failed!!!\n"; 308 306 cout << resultCompare; … … 368 366 369 367 370 if ( result != resultCompare) {368 if (!(result == resultCompare)) { 371 369 cout << "Test failed!!!\n"; 372 370 cout << resultCompare; … … 429 427 430 428 431 if ( result != resultCompare) {429 if (!(result == resultCompare)) { 432 430 cout << "Test failed!!!\n"; 433 431 cout << resultCompare; -
trunk/gsdl/src/mgpp/text/Queryer.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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 26 30 27 31 #include "MGQuery.h" … … 249 253 textData.UnloadData (); 250 254 indexData.UnloadData (); 255 256 return (0); 251 257 } 252 258 -
trunk/gsdl/src/mgpp/text/TagInfo.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/TagInfo.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/Terms.cpp
r2377 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 798 796 799 797 } 800 801 802 -
trunk/gsdl/src/mgpp/text/Terms.h
r1847 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 216 214 217 215 #endif 218 219 220 221 222 -
trunk/gsdl/src/mgpp/text/TextEl.cpp
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/TextEl.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/TextGet.cpp
r1123 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 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 23 26 24 27 #include "TextGet.h" -
trunk/gsdl/src/mgpp/text/TextGet.h
r1123 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/UCArray.cpp
r1297 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/UCArray.h
r1297 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 22 #ifndef UCARRAY_H 25 23 #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> 28 using namespace std; 29 #endif 26 30 27 31 #if defined(GSDL_USE_OBJECTSPACE) … … 113 117 114 118 #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 ########################################################################### 3 26 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, 27 GSDLHOME = ..\..\.. 28 USE_STLPORT = 0 29 30 STLPATH = "$(GSDLHOME)\packages\windows\stlport\stlport" 11 31 12 32 CC = cl 13 #CC = cl /Z7 this gives symbol and line number debugging (set /DEBUG on link)14 #CFLAGS = -g -O15 33 CPPFLAGS = 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} 34 DEFS = -DSHORT_SUFFIX -DSILENT -DHAVE_CONFIG_H -D__WIN32__ -D__STDC__ -D__GNU_LIBRARY__ -D__MSDOS__ 35 INCLUDES = -I"$(GSDLHOME)\src\mgpp\lib" -I"$(GSDLHOME)" 36 !IF $(USE_STLPORT) 37 DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS 38 INCLUDES = $(INCLUDES) -I$(STLPATH) 39 !ENDIF 40 20 41 LDFLAGS = 21 LIBS = ..\..\lib\libmg.lib22 #TOUCH = echo timestamp >23 #AWK = gawk24 42 25 #bindir = $(exec_prefix)/bin 26 #datadir = $(prefix)/share 27 #libexecdir = $(exec_prefix)/libexec 28 #localedir = $(datadir)/locale 29 #mandir = $(prefix)/man/man1 43 LIBS = "$(GSDLHOME)\src\mgpp\lib\libmg.lib" 30 44 31 COMPILE = $(CC) -c $(DEFS) -I. -I..\.. -I..\..\lib45 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) 32 46 LINK = $(CC) $(LDFLAGS) 33 47 … … 41 55 o = .obj 42 56 e = .exe 43 44 #############################################################################45 #46 # Uncomment (and possibly edit) the following lines if you wish47 # to use the GNU readline library for the input in mgquery48 #49 #READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib50 #READLINE_LIBS = -lreadline -ltermcap51 #52 #53 #############################################################################54 55 57 56 58 SOURCES = \ … … 67 69 invf.cpp mg_invf_dict_dump.cpp Weights.cpp \ 68 70 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 70 73 71 74 … … 77 80 IndexData.h build.h mg_errors.h \ 78 81 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 86 84 87 85 EXEC = mg_passes$e mg_decompress_text$e mg_perf_hash_build$e \ … … 90 88 QueryTester$e Queryer$e 91 89 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.196 97 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #98 99 100 90 all: $(EXEC) libtextin.lib 101 102 103 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #104 105 HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o words$o106 107 mg_hilite_words$e: $(HILITE_OBJS)108 $(LINK) $(HILITE_OBJS) $(LIBS)109 110 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #111 91 112 92 PASSES_OBJS = \ … … 117 97 FText$o text$o FIvfLevelInfo$o 118 98 119 mg_passes : $(PASSES_OBJS)99 mg_passes$e: $(PASSES_OBJS) 120 100 $(LINK) $(PASSES_OBJS) $(LIBS) 121 101 122 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #123 102 124 103 QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \ 125 104 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \ 126 105 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \ 127 QueryParser$oQueryLex$o words$o106 GSDLQueryParser$o GSDLQueryLex$o words$o 128 107 129 Queryer : $(QUERYER_OBJS)108 Queryer$e: $(QUERYER_OBJS) 130 109 $(LINK) $(QUERYER_OBJS) $(LIBS) 131 110 … … 134 113 IndexData$o stemmer$o Weights$o 135 114 136 QueryTester : $(QUERY_TESTER_OBJS)115 QueryTester$e: $(QUERY_TESTER_OBJS) 137 116 $(LINK) $(QUERY_TESTER_OBJS) $(LIBS) 138 117 … … 140 119 FIvfLevelInfo$o FragLevelConvert$o 141 120 142 mg_weights_build : $(WEIGHTS_BUILD_OBJS)121 mg_weights_build$e: $(WEIGHTS_BUILD_OBJS) 143 122 $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS) 144 123 145 124 COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o 146 125 147 mg_compression_dict : $(COMP_DICT_OBJS)126 mg_compression_dict$e: $(COMP_DICT_OBJS) 148 127 $(LINK) $(COMP_DICT_OBJS) $(LIBS) 149 128 150 129 FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o 151 130 152 mg_fast_comp_dict : $(FAST_COMP_OBJS)131 mg_fast_comp_dict$e: $(FAST_COMP_OBJS) 153 132 $(LINK) $(FAST_COMP_OBJS) $(LIBS) 154 133 155 134 INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o invf$o UCArray$o 156 135 157 mg_invf_dump : $(INVF_DUMP_OBJS)136 mg_invf_dump$e: $(INVF_DUMP_OBJS) 158 137 $(LINK) $(INVF_DUMP_OBJS) $(LIBS) 159 138 160 139 INVF_DICT_OBJS = mg_invf_dict$o mg_files$o invf$o UCArray$o 161 140 162 mg_invf_dict : $(INVF_DICT_OBJS)141 mg_invf_dict$e: $(INVF_DICT_OBJS) 163 142 $(LINK) $(INVF_DICT_OBJS) $(LIBS) 164 143 165 144 INVF_DICT_DUMP_OBJS = mg_invf_dict_dump$o mg_files$o invf$o UCArray$o 166 145 167 mg_invf_dict_dump : $(INVF_DICT_DUMP_OBJS)146 mg_invf_dict_dump$e: $(INVF_DICT_DUMP_OBJS) 168 147 $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS) 169 148 170 149 PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o invf$o UCArray$o 171 150 172 mg_perf_hash_build : $(PERF_HASH_OBJS)151 mg_perf_hash_build$e: $(PERF_HASH_OBJS) 173 152 $(LINK) $(PERF_HASH_OBJS) $(LIBS) 174 153 … … 176 155 invf$o UCArray$o 177 156 178 mg_stem_idx : $(STEM_IDX_OBJS)157 mg_stem_idx$e: $(STEM_IDX_OBJS) 179 158 $(LINK) $(STEM_IDX_OBJS) $(LIBS) 180 159 … … 183 162 locallib$o text$o UCArray$o TextGet$o FText$o 184 163 185 mg_decompress_text : $(DECOMPRESS_TEXT_OBJS)164 mg_decompress_text$e: $(DECOMPRESS_TEXT_OBJS) 186 165 $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS) 187 166 188 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #189 167 190 install: execinstall maninstall 191 uninstall: execuninstall manuninstall 168 PASS_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 172 mgpass$e: $(PASS_OBJS) 173 $(LINK) $(PASS_OBJS) $(LIBS) 192 174 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" 198 179 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 \ 180 LIB_OBJS = mg_files$o mg_errors$o locallib$o invf$o UCArray$o \ 206 181 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \ 207 182 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \ 208 QueryParser$oQueryLex$o words$o183 GSDLQueryParser$o GSDLQueryLex$o words$o 209 184 210 185 libtextin.lib: $(LIB_OBJS) 211 del libtextin.lib186 if EXIST libtextin.lib del libtextin.lib 212 187 lib /out:libtextin.lib $(LIB_OBJS) 213 188 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: 189 clean: 190 del *$o 191 del $(EXEC) -
trunk/gsdl/src/mgpp/text/Weights.cpp
r861 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 22 #include "UCArray.h" 24 23 #include "Weights.h" 25 24 #include "sysfuncs.h" 26 #include "UCArray.h"27 25 28 26 #define MAXBITS (sizeof(unsigned long) * 8) -
trunk/gsdl/src/mgpp/text/Weights.h
r855 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/WordData.h
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/build.h
r856 r2468 18 18 * along with this program; if not, write to the Free Software 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 *21 * $Id$22 20 * 23 21 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/comp_dict.cpp
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ … … 35 33 #include "locallib.h" 36 34 #include "mg_files.h" 37 38 /*39 $Log$40 Revision 1.1 2000/01/14 02:26:04 sjboddie41 Rodgers new C++ mg42 43 Revision 1.1 1999/10/11 02:57:10 cs02544 Base install of MG-PP45 46 Revision 1.1 1999/08/10 21:17:48 sjboddie47 renamed mg-1.3d directory mg48 49 Revision 1.1 1998/11/17 09:34:34 rjmcnab50 *** empty log message ***51 52 * Revision 1.3 1994/10/20 03:56:41 tes53 * I have rewritten the boolean query optimiser and abstracted out the54 * components of the boolean query.55 *56 * Revision 1.2 1994/09/20 04:41:24 tes57 * For version 1.158 *59 */60 61 35 62 36 compression_dict_header cdh; -
trunk/gsdl/src/mgpp/text/comp_dict.h
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 25 26 27 22 #define HASH_RATIO 2 28 29 30 31 23 32 24 typedef struct dict_hash_table … … 39 31 } 40 32 dict_hash_table; 41 42 43 44 33 45 34 extern compression_dict_header cdh; -
trunk/gsdl/src/mgpp/text/hash.h
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 21 25 22 #ifndef H_HASH 26 23 #define H_HASH 27 28 29 24 30 25 #define HASH(h, step, wd, tablesize) \ -
trunk/gsdl/src/mgpp/text/invf.cpp
r1300 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 -
trunk/gsdl/src/mgpp/text/ivf.pass1.cpp
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 22 #include "UCArray.h" 24 23 #include "sysfuncs.h" 25 26 24 #include "mg_files.h" 27 25 #include "invf.h" … … 29 27 #include "build.h" 30 28 #include "locallib.h" 31 #include "UCArray.h"32 29 #include "bitio_m_stdio.h" 33 30 #include "bitio_gen.h" … … 47 44 # include <map> 48 45 #endif 49 50 51 /*52 $Log$53 Revision 1.1 2000/01/14 02:26:07 sjboddie54 Rodgers new C++ mg55 56 *57 */58 59 60 46 61 47 // a fragment corresponds to the index level (word-level is the -
trunk/gsdl/src/mgpp/text/ivf.pass2.cpp
r2448 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 /*25 $Log$26 Revision 1.3 2001/05/18 03:20:10 kjm1827 fixed unsigned long overflow error in Condense Invf function28 bytesOutput cast to mg_ullong.29 30 Revision 1.2 2001/05/17 04:52:38 jrm2131 added some #defines for proper portability.32 (eg ftruncate needs _XOPEN_SOURCE_EXTENDED)33 34 Revision 1.1 2000/01/14 02:26:07 sjboddie35 Rodgers new C++ mg36 37 */38 22 #define _XOPEN_SOURCE 1 39 23 #define _XOPEN_SOURCE_EXTENDED 1 24 40 25 #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" 45 38 #include "sysfuncs.h" 46 47 39 #include "mg_files.h" 48 40 #include "invf.h" … … 50 42 #include "build.h" 51 43 #include "locallib.h" 52 #include "UCArray.h"53 44 #include "bitio_m_random.h" 54 45 #include "bitio_m_stdio.h" … … 64 55 65 56 #include "longlong.h" 66 67 #ifdef __WIN32_68 #include <io.h>69 #endif70 57 71 58 #if defined(GSDL_USE_OBJECTSPACE) … … 387 374 char path[512]; 388 375 sprintf (path, FILE_NAME_FORMAT ".%ld", get_basepath (), filename, 389 376 ".invf.state", (long) getpid ()); 390 377 if (!(stateFile = fopen (path, "wb+"))) { 391 378 Message ("Unable to create \"%s\"", path); … … 393 380 } 394 381 unlink (path); // file will be deleted after it is closed 395 396 382 // reset the buffer 397 383 startNum = 0; … … 1067 1053 1068 1054 #ifdef __WIN32__ 1069 if ( !(_chsize (_fileno (outInvfFile), bytesOutput)))1055 if (_chsize (_fileno (outInvfFile), bytesOutput) != 0) 1070 1056 Message ("Could not truncate invf."); 1071 1057 #else -
trunk/gsdl/src/mgpp/text/locallib.cpp
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 31 29 #include "locallib.h" 32 30 #include "text.h" 33 34 /*35 $Log$36 Revision 1.1 2000/01/14 02:26:08 sjboddie37 Rodgers new C++ mg38 39 Revision 1.1 1999/10/11 02:57:43 cs02540 Base install of MG-PP41 42 Revision 1.1 1999/08/10 21:18:02 sjboddie43 renamed mg-1.3d directory mg44 45 Revision 1.1 1998/11/17 09:34:49 rjmcnab46 *** empty log message ***47 48 * Revision 1.3 1994/10/20 03:56:51 tes49 * I have rewritten the boolean query optimiser and abstracted out the50 * components of the boolean query.51 *52 * Revision 1.2 1994/09/20 04:41:38 tes53 * For version 1.154 *55 */56 57 31 58 32 int -
trunk/gsdl/src/mgpp/text/locallib.h
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/mg.h
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 33 31 #define BUFFERSIZE (MAXSTRING+30000) 34 32 35 36 37 38 33 #define MAXLN 65536 39 34 #define WORDS 1 -
trunk/gsdl/src/mgpp/text/mg.special.cpp
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 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 26 24 27 #include "sysfuncs.h" 25 26 28 #include "mg.h" 27 29 #include "build.h" 28 29 30 /*31 $Log$32 Revision 1.1 2000/01/14 02:26:10 sjboddie33 Rodgers new C++ mg34 35 Revision 1.1 1999/10/11 02:57:45 cs02536 Base install of MG-PP37 38 Revision 1.1 1999/08/10 21:18:03 sjboddie39 renamed mg-1.3d directory mg40 41 Revision 1.1 1998/11/17 09:34:51 rjmcnab42 *** empty log message ***43 44 * Revision 1.3 1994/10/20 03:56:53 tes45 * I have rewritten the boolean query optimiser and abstracted out the46 * components of the boolean query.47 *48 * Revision 1.2 1994/09/20 04:41:44 tes49 * For version 1.150 *51 */52 53 30 54 31 int init_special (const TagInfo &/*tagInfo*/, char * /*FileName*/) { -
trunk/gsdl/src/mgpp/text/mg_compression_dict.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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 26 35 27 36 #include "sysfuncs.h" 28 29 37 #include "memlib.h" 30 38 #include "messages.h" … … 44 52 45 53 #define MAXBITS (sizeof(unsigned long) * 8) 46 47 /*48 $Log$49 Revision 1.3 2001/05/17 04:38:15 jrm2150 portability changes, use getopt from unistd.h (all POSIX systems)51 52 Revision 1.2 2000/01/18 03:53:22 rjmcnab53 Fixed a couple of bugs and made building silent if needed.54 55 Revision 1.1 2000/01/14 02:26:11 sjboddie56 Rodgers new C++ mg57 58 Revision 1.3 1999/10/17 23:43:25 cs02559 Changes to eradicate Xmalloc60 61 Revision 1.2 1999/10/11 22:03:03 cs02562 Changed mistaken use of NTOHUL on a double to NTOHD as per report63 from Craig Neville-Manning of problems installing mg/gsdl.64 65 Revision 1.1 1999/10/11 02:57:46 cs02566 Base install of MG-PP67 68 Revision 1.1 1999/08/10 21:18:04 sjboddie69 renamed mg-1.3d directory mg70 71 Revision 1.4 1999/01/15 03:05:51 rjmcnab72 73 Renamed lib/heap to be lib/mgheap (it was causing some problems with74 some versions of the STL libraries which contained a heap.h)75 76 Revision 1.3 1998/12/17 09:12:52 rjmcnab77 78 Altered mg to process utf-8 encoded Unicode. The main changes79 are in the parsing of the input, the casefolding, and the stemming.80 81 Revision 1.2 1998/11/25 07:55:44 rjmcnab82 83 Modified mg to that you can specify the stemmer you want84 to use via a command line option. You specify it to85 mg_passes during the build process. The number of the86 stemmer that you used is stored within the inverted87 dictionary header and the stemmed dictionary header so88 the correct stemmer is used in later stages of building89 and querying.90 91 Revision 1.1 1998/11/17 09:34:52 rjmcnab92 *** empty log message ***93 94 * Revision 1.3 1994/10/20 03:56:54 tes95 * I have rewritten the boolean query optimiser and abstracted out the96 * components of the boolean query.97 *98 * Revision 1.2 1994/09/20 04:41:45 tes99 * For version 1.1100 *101 */102 103 /* #define DEBUG1 */104 105 /* #define DEBUG */106 54 107 55 #define is_power_of_two(a) ((a) != 0 && (((a) & ((a)-1)) == 0)) … … 264 212 Message ("Actual mem required : %8u\n", mem_reqd); 265 213 #endif 266 exit(0);214 return (0); 267 215 } 268 216 -
trunk/gsdl/src/mgpp/text/mg_decompress_text.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 22 #define _XOPEN_SOURCE 1 25 23 #define _XOPEN_SOURCE_EXTENDED 1 26 #include <unistd.h>27 24 25 #if defined __WIN32__ 26 # include "getopt.h" 27 #else 28 # include <unistd.h> 29 #endif 30 31 #include "UCArray.h" 28 32 #include "sysfuncs.h" 29 30 33 #include "TextGet.h" 31 #include "UCArray.h"32 33 34 #include "messages.h" 34 35 #include "mg_files.h" 35 36 36 37 37 int main (int argc, char **argv) { -
trunk/gsdl/src/mgpp/text/mg_errors.cpp
r2445 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #define _XOPEN_SOURCE_EXTENDED 1 … … 28 27 29 28 #include "mg_errors.h" 30 31 32 29 33 30 int mg_errno = MG_NOERROR; -
trunk/gsdl/src/mgpp/text/mg_errors.h
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 -
trunk/gsdl/src/mgpp/text/mg_fast_comp_dict.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 25 /*26 $Log$27 Revision 1.3 2001/05/17 04:38:15 jrm2128 portability changes, use getopt from unistd.h (all POSIX systems)29 30 Revision 1.2 2000/01/18 03:53:23 rjmcnab31 Fixed a couple of bugs and made building silent if needed.32 33 Revision 1.1 2000/01/14 02:26:13 sjboddie34 Rodgers new C++ mg35 36 Revision 1.2 1999/10/17 23:43:26 cs02537 Changes to eradicate Xmalloc38 39 Revision 1.1 1999/10/11 02:57:50 cs02540 Base install of MG-PP41 42 Revision 1.1 1999/08/10 21:18:06 sjboddie43 renamed mg-1.3d directory mg44 45 Revision 1.2 1998/11/25 07:55:44 rjmcnab46 47 Modified mg to that you can specify the stemmer you want48 to use via a command line option. You specify it to49 mg_passes during the build process. The number of the50 stemmer that you used is stored within the inverted51 dictionary header and the stemmed dictionary header so52 the correct stemmer is used in later stages of building53 and querying.54 55 Revision 1.1 1998/11/17 09:34:57 rjmcnab56 *** empty log message ***57 58 * Revision 1.3 1994/10/20 03:56:55 tes59 * I have rewritten the boolean query optimiser and abstracted out the60 * components of the boolean query.61 *62 * Revision 1.2 1994/09/20 04:41:47 tes63 * For version 1.164 *65 */66 21 67 22 #define _XOPEN_SOURCE 1 68 23 #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 70 35 71 36 #include "sysfuncs.h" 72 73 37 #include "huffman.h" 74 38 #include "messages.h" … … 212 176 save_fast_dict (filename); 213 177 214 exit(0);178 return (0); 215 179 } 216 180 … … 708 672 } 709 673 710 711 674 static void 712 675 save_fast_dict (char *filename) -
trunk/gsdl/src/mgpp/text/mg_files.cpp
r2382 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #define _XOPEN_SOURCE_EXTENDED 1 … … 33 32 /* This must contain a valid path without a trailing slash */ 34 33 static char *basepath = NULL; 35 36 37 34 38 35 /* This sets the base path for all file operations */ -
trunk/gsdl/src/mgpp/text/mg_files.h
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/mg_invf_dict.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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 26 35 27 36 #include "sysfuncs.h" 28 37 #include "messages.h" 29 30 38 #include "mg_files.h" 31 39 #include "invf.h" 32 33 /*34 $Log$35 Revision 1.3 2001/05/17 04:38:15 jrm2136 portability changes, use getopt from unistd.h (all POSIX systems)37 38 Revision 1.2 2000/01/18 03:53:24 rjmcnab39 Fixed a couple of bugs and made building silent if needed.40 41 Revision 1.1 2000/01/14 02:26:16 sjboddie42 Rodgers new C++ mg43 44 */45 46 40 47 41 static void process_files (char *filename, unsigned long entriesPerBlock) { -
trunk/gsdl/src/mgpp/text/mg_invf_dict_dump.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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 26 35 27 36 #include "sysfuncs.h" 28 37 #include "messages.h" 29 30 38 #include "mg_files.h" 31 39 #include "invf.h" 32 33 /*34 $Log$35 Revision 1.3 2001/05/17 04:38:15 jrm2136 portability changes, use getopt from unistd.h (all POSIX systems)37 38 Revision 1.2 2001/02/02 01:13:05 kjm1839 changed the help message40 41 Revision 1.1 2000/01/14 02:17:51 sjboddie42 Rodgers new C++ mg43 44 */45 46 40 47 41 static void process_files (char *filename, -
trunk/gsdl/src/mgpp/text/mg_invf_dump.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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 26 35 27 36 #include "sysfuncs.h" 28 29 37 #include "messages.h" 30 38 #include "bitio_m_stdio.h" … … 37 45 #include "invf.h" 38 46 #include "WordData.h" 39 40 /*41 $Log$42 Revision 1.3 2001/05/17 04:38:16 jrm2143 portability changes, use getopt from unistd.h (all POSIX systems)44 45 Revision 1.2 2001/02/02 01:12:29 kjm1846 added more command line options, and better help message47 48 Revision 1.1 2000/01/14 02:26:17 sjboddie49 Rodgers new C++ mg50 51 Revision 1.1 1999/10/11 02:57:55 cs02552 Base install of MG-PP53 54 Revision 1.1 1999/08/10 21:18:09 sjboddie55 renamed mg-1.3d directory mg56 57 Revision 1.2 1998/11/25 07:55:46 rjmcnab58 59 Modified mg to that you can specify the stemmer you want60 to use via a command line option. You specify it to61 mg_passes during the build process. The number of the62 stemmer that you used is stored within the inverted63 dictionary header and the stemmed dictionary header so64 the correct stemmer is used in later stages of building65 and querying.66 67 Revision 1.1 1998/11/17 09:35:05 rjmcnab68 *** empty log message ***69 70 * Revision 1.3 1994/11/29 00:32:01 tes71 * Committing the new merged files and changes.72 *73 * Revision 1.2 1994/09/20 04:41:50 tes74 * For version 1.175 *76 */77 78 47 79 48 static void PrintInvfWord (FILE *invfFile, -
trunk/gsdl/src/mgpp/text/mg_passes.cpp
r2442 r2468 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 * 21 * $Id$22 *23 21 **************************************************************************/ 24 22 25 23 #define _XOPEN_SOURCE 1 26 24 #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 27 30 28 31 #include "sysfuncs.h" … … 32 35 #endif 33 36 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 35 45 36 46 #include "memlib.h" 37 47 #include "messages.h" 38 39 48 #include "longlong.h" 40 41 49 #include "mg_files.h" 42 50 #include "mg.h" … … 44 52 #include "text.h" 45 53 #include "stemmer.h" 46 47 54 #include "FileBuf.h" 48 55 #include "TextEl.h" 49 56 #include "TagInfo.h" 50 51 52 /*53 $Log$54 Revision 1.2 2001/05/17 04:38:16 jrm2155 portability changes, use getopt from unistd.h (all POSIX systems)56 57 Revision 1.1 2000/01/14 02:26:18 sjboddie58 Rodgers new C++ mg59 60 Revision 1.1 1999/10/11 02:58:00 cs02561 Base install of MG-PP62 63 Revision 1.1 1999/08/10 21:18:12 sjboddie64 renamed mg-1.3d directory mg65 66 Revision 1.3 1998/12/17 09:12:53 rjmcnab67 68 Altered mg to process utf-8 encoded Unicode. The main changes69 are in the parsing of the input, the casefolding, and the stemming.70 71 Revision 1.2 1998/11/25 07:55:47 rjmcnab72 73 Modified mg to that you can specify the stemmer you want74 to use via a command line option. You specify it to75 mg_passes during the build process. The number of the76 stemmer that you used is stored within the inverted77 dictionary header and the stemmed dictionary header so78 the correct stemmer is used in later stages of building79 and querying.80 81 Revision 1.1 1998/11/17 09:35:13 rjmcnab82 *** empty log message ***83 84 * Revision 1.3 1994/10/20 03:56:57 tes85 * I have rewritten the boolean query optimiser and abstracted out the86 * components of the boolean query.87 *88 * Revision 1.2 1994/09/20 04:41:52 tes89 * For version 1.190 *91 */92 57 93 58 #define MAX_PASSES 5 … … 208 173 } 209 174 210 211 212 175 int main (int argc, char **argv) { 213 176 int ch, in_fd; … … 296 259 Driver (in_fd, filename, tagInfo, compatMode); 297 260 298 exit(0);299 } 261 return (0); 262 } -
trunk/gsdl/src/mgpp/text/mg_perf_hash_build.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 24 22 #define _XOPEN_SOURCE 1 25 23 #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 27 35 28 36 #include "sysfuncs.h" … … 39 47 #include "mg.h" 40 48 41 /*42 $Log$43 Revision 1.4 2001/05/17 04:38:16 jrm2144 portability changes, use getopt from unistd.h (all POSIX systems)45 46 Revision 1.3 2001/05/07 05:01:47 jrm2147 replaced bcopy with memcpy48 49 Revision 1.2 2000/02/15 22:45:22 kjm1850 added feature to retrieve doc nums at a different level than the level51 queried at. eg query at Document level, but retrieve section level docnums52 bug in mg_perf_hash_build.cpp fixed53 54 Revision 1.1 2000/01/14 02:26:19 sjboddie55 Rodgers new C++ mg56 57 Revision 1.2 1999/10/17 23:43:27 cs02558 Changes to eradicate Xmalloc59 60 Revision 1.1 1999/10/11 02:58:01 cs02561 Base install of MG-PP62 63 Revision 1.1 1999/08/10 21:18:13 sjboddie64 renamed mg-1.3d directory mg65 66 Revision 1.2 1998/11/25 07:55:47 rjmcnab67 68 Modified mg to that you can specify the stemmer you want69 to use via a command line option. You specify it to70 mg_passes during the build process. The number of the71 stemmer that you used is stored within the inverted72 dictionary header and the stemmed dictionary header so73 the correct stemmer is used in later stages of building74 and querying.75 76 Revision 1.1 1998/11/17 09:35:15 rjmcnab77 *** empty log message ***78 79 * Revision 1.3 1994/10/20 03:56:58 tes80 * I have rewritten the boolean query optimiser and abstracted out the81 * components of the boolean query.82 *83 * Revision 1.2 1994/09/20 04:41:53 tes84 * For version 1.185 *86 */87 88 89 90 49 #define POOL_SIZE 1024*1024 91 92 50 93 51 static void ProcessFiles (char *filename, int r) { -
trunk/gsdl/src/mgpp/text/mg_stem_idx.cpp
r2442 r2468 22 22 #define _XOPEN_SOURCE 1 23 23 #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" 26 32 #include "sysfuncs.h" 27 33 #include "messages.h" 28 29 34 #include "mg_files.h" 30 35 #include "invf.h" 31 #include "UCArray.h"32 36 #include "words.h" 33 34 37 #include "stemmer.h" 35 36 38 37 39 #if defined(GSDL_USE_OBJECTSPACE) … … 46 48 #endif 47 49 48 49 /*50 $Log$51 Revision 1.5 2001/05/17 04:38:16 jrm2152 portability changes, use getopt from unistd.h (all POSIX systems)53 54 Revision 1.4 2001/05/07 05:01:47 jrm2155 replaced bcopy with memcpy56 57 Revision 1.3 2000/01/18 03:53:24 rjmcnab58 Fixed a couple of bugs and made building silent if needed.59 60 Revision 1.2 2000/01/14 02:45:51 sjboddie61 fixed compiler warning62 63 Revision 1.1 2000/01/14 02:26:20 sjboddie64 Rodgers new C++ mg65 66 */67 68 69 50 typedef vector<unsigned long> WordNumList; 70 51 typedef map<UCArray, WordNumList, DictLTUCArray> StemMapDict; 71 72 52 73 53 void CreateStemDict (char *filename, -
trunk/gsdl/src/mgpp/text/mg_weights_build.cpp
r2442 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 21 23 22 #define _XOPEN_SOURCE 1 24 23 #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" 27 32 #include "sysfuncs.h" 28 33 #include "memlib.h" … … 31 36 #include "bitio_gen.h" 32 37 #include "bitio_m_stdio.h" 33 34 38 #include "mg_files.h" 35 39 #include "locallib.h" 36 40 #include "invf.h" 37 // #include "WordData.h"38 #include "UCArray.h"39 41 #include "FIvfLevelInfo.h" 40 42 #include "FragLevelConvert.h" … … 47 49 # include <map> 48 50 #endif 49 50 51 /*52 $Log$53 Revision 1.4 2001/05/17 04:38:16 jrm2154 portability changes, use getopt from unistd.h (all POSIX systems)55 56 Revision 1.3 2000/01/18 23:24:19 rjmcnab57 fixed a few more bugs58 59 Revision 1.2 2000/01/18 03:53:24 rjmcnab60 Fixed a couple of bugs and made building silent if needed.61 62 Revision 1.1 2000/01/14 02:26:21 sjboddie63 Rodgers new C++ mg64 65 Revision 1.1 1999/10/11 02:58:06 cs02566 Base install of MG-PP67 68 Revision 1.1 1999/08/10 21:18:16 sjboddie69 renamed mg-1.3d directory mg70 71 Revision 1.2 1998/11/25 07:55:49 rjmcnab72 73 Modified mg to that you can specify the stemmer you want74 to use via a command line option. You specify it to75 mg_passes during the build process. The number of the76 stemmer that you used is stored within the inverted77 dictionary header and the stemmed dictionary header so78 the correct stemmer is used in later stages of building79 and querying.80 81 Revision 1.1 1998/11/17 09:35:22 rjmcnab82 *** empty log message ***83 84 * Revision 1.4 1994/11/29 00:32:05 tes85 * Committing the new merged files and changes.86 *87 * Revision 1.3 1994/10/20 03:57:00 tes88 * I have rewritten the boolean query optimiser and abstracted out the89 * components of the boolean query.90 *91 * Revision 1.2 1994/09/20 04:41:55 tes92 * For version 1.193 *94 */95 51 96 52 #define MAXBITS (sizeof(unsigned long) * 8) -
trunk/gsdl/src/mgpp/text/stemmer.cpp
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 … … 28 26 #include "simplefrenchstem.h" 29 27 #include "unitool.h" 30 31 /*32 $Log$33 Revision 1.1 2000/01/14 02:26:22 sjboddie34 Rodgers new C++ mg35 36 Revision 1.1 1999/10/11 02:58:34 cs02537 Base install of MG-PP38 39 Revision 1.1 1999/08/10 21:18:23 sjboddie40 renamed mg-1.3d directory mg41 42 Revision 1.3 1998/12/17 09:12:54 rjmcnab43 44 Altered mg to process utf-8 encoded Unicode. The main changes45 are in the parsing of the input, the casefolding, and the stemming.46 47 Revision 1.2 1998/11/25 07:55:51 rjmcnab48 49 Modified mg to that you can specify the stemmer you want50 to use via a command line option. You specify it to51 mg_passes during the build process. The number of the52 stemmer that you used is stored within the inverted53 dictionary header and the stemmed dictionary header so54 the correct stemmer is used in later stages of building55 and querying.56 57 Revision 1.1 1998/11/17 09:35:42 rjmcnab58 *** empty log message ***59 60 * Revision 1.3 1994/10/20 03:57:05 tes61 * I have rewritten the boolean query optimiser and abstracted out the62 * components of the boolean query.63 *64 * Revision 1.2 1994/09/20 04:42:10 tes65 * For version 1.166 *67 */68 69 28 70 29 #define LOVINSTEMMER 0 -
trunk/gsdl/src/mgpp/text/stemmer.h
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/ -
trunk/gsdl/src/mgpp/text/text.cpp
r1298 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 21 22 // UCArray currently contains all the basic reading and writing functions 23 #include "UCArray.h" 24 24 #include "text.h" 25 26 // UCArray currently contains all the basic reading and writing27 // functions28 #include "UCArray.h"29 30 25 31 26 compressed_text_header::compressed_text_header () { -
trunk/gsdl/src/mgpp/text/text.h
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 23 24 25 21 26 22 #ifndef H_TEXT … … 29 25 #include "huffman.h" 30 26 #include <stdio.h> 31 32 33 34 27 35 28 /***************************************************************************** -
trunk/gsdl/src/mgpp/text/text.pass1.cpp
r856 r2468 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 * 21 * $Id$22 *23 21 **************************************************************************/ 24 22 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 25 28 #include "sysfuncs.h" 26 27 29 #include "memlib.h" 28 30 #include "messages.h" 29 31 #include "huffman.h" 30 32 #include "netorder.h" /* [RPAP - Jan 97: Endian Ordering] */ 31 32 33 33 #include "mg_files.h" 34 34 #include "mg.h" … … 39 39 #include "hash.h" 40 40 #include "local_strings.h" 41 42 41 #include "TextEl.h" 43 44 45 /*46 $Log$47 Revision 1.1 2000/01/14 02:26:23 sjboddie48 Rodgers new C++ mg49 50 Revision 1.1 1999/10/11 02:58:37 cs02551 Base install of MG-PP52 53 Revision 1.1 1999/08/10 21:18:25 sjboddie54 renamed mg-1.3d directory mg55 56 Revision 1.2 1998/12/17 09:12:54 rjmcnab57 58 Altered mg to process utf-8 encoded Unicode. The main changes59 are in the parsing of the input, the casefolding, and the stemming.60 61 Revision 1.1 1998/11/17 09:35:46 rjmcnab62 *** empty log message ***63 64 * Revision 1.4 1994/11/25 03:47:47 tes65 * Committing files before adding the merge stuff.66 *67 * Revision 1.3 1994/10/20 03:57:09 tes68 * I have rewritten the boolean query optimiser and abstracted out the69 * components of the boolean query.70 *71 * Revision 1.2 1994/09/20 04:42:13 tes72 * For version 1.173 *74 */75 76 42 77 43 #define POOL_SIZE 1024*1024 78 44 #define INITIAL_HASH_SIZE 7927 79 80 81 82 83 84 45 85 46 -
trunk/gsdl/src/mgpp/text/text.pass2.cpp
r856 r2468 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 * 21 * $Id$22 *23 21 **************************************************************************/ 24 22 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 25 32 26 33 #include "sysfuncs.h" 27 28 34 #include "memlib.h" 29 35 #include "messages.h" … … 32 38 #include "huffman.h" 33 39 #include "netorder.h" /* [RPAP - Jan 97: Endian Ordering] */ 34 35 40 #include "mg.h" 36 41 #include "mg_files.h" … … 41 46 #include "locallib.h" 42 47 #include "comp_dict.h" 43 44 48 #include "FText.h" 45 49 46 47 /*48 $Log$49 Revision 1.1 2000/01/14 02:26:24 sjboddie50 Rodgers new C++ mg51 52 Revision 1.1 1999/10/11 02:58:38 cs02553 Base install of MG-PP54 55 Revision 1.1 1999/08/10 21:18:25 sjboddie56 renamed mg-1.3d directory mg57 58 Revision 1.2 1998/12/17 09:12:54 rjmcnab59 60 Altered mg to process utf-8 encoded Unicode. The main changes61 are in the parsing of the input, the casefolding, and the stemming.62 63 Revision 1.1 1998/11/17 09:35:47 rjmcnab64 *** empty log message ***65 66 * Revision 1.3 1994/10/20 03:57:10 tes67 * I have rewritten the boolean query optimiser and abstracted out the68 * components of the boolean query.69 *70 * Revision 1.2 1994/09/20 04:42:14 tes71 * For version 1.172 *73 */74 75 50 #define POOL_SIZE 1024*256 51 76 52 77 53 struct char_pool { -
trunk/gsdl/src/mgpp/text/words.cpp
r856 r2468 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 19 * 20 * $Id$21 *22 20 **************************************************************************/ 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 23 26 24 27 #include "words.h" -
trunk/gsdl/src/mgpp/text/words.h
r856 r2468 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 *20 * $Id$21 19 * 22 20 **************************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.