GCC build with Myspell support (mingw-cygwin)

This commit is contained in:
Stas Degteff 2006-03-12 07:57:03 +00:00
parent 99aedb1707
commit df1529fd6a
19 changed files with 280 additions and 163 deletions

View File

@ -76,6 +76,6 @@
# Uncomment to disable Synchronet BBS support # Uncomment to disable Synchronet BBS support
#CPPFLAGS+=-DGCFG_NOSYNCHRONET #CPPFLAGS+=-DGCFG_NOSYNCHRONET
# Uncomment to disable MS Office spellchecker support (win32 only) # Uncomment to disable MS Office spellchecker support (win32 only)
CPPFLAGS+=-DGCFG_NO_MSSPELL #CPPFLAGS+=-DGCFG_NO_MSSPELL
# Uncomment to disable MySpell spellchecker support (multiplatform) # Uncomment to disable MySpell spellchecker support (multiplatform)
CPPFLAGS+=-DGCFG_NO_MYSPELL #CPPFLAGS+=-DGCFG_NO_MYSPELL

View File

@ -16,7 +16,7 @@ FOBJPATH=$(TOP)/$(OBJPATH)/$(PLATFORM)/$(TARGET)
FDEPPATH=$(TOP)/$(OBJPATH)/$(PLATFORM)/$(TARGET) FDEPPATH=$(TOP)/$(OBJPATH)/$(PLATFORM)/$(TARGET)
FLIBPATH=$(TOP)/$(LIBPATH)/$(PLATFORM) FLIBPATH=$(TOP)/$(LIBPATH)/$(PLATFORM)
.SUFFIXES: .c .cpp .all .rc .SUFFIXES: .c .cpp .all .rc .cxx
sourcelist: bld$(PLATFORM).inc sourcelist: bld$(PLATFORM).inc
@ -33,6 +33,14 @@ $(FOBJPATH)/%$(OBJEXT): %.cpp
$(CAT) $(patsubst %.cpp,%.d,$<)>>$(FDEPPATH)/$(patsubst %.cpp,%.d,$<) &&\ $(CAT) $(patsubst %.cpp,%.d,$<)>>$(FDEPPATH)/$(patsubst %.cpp,%.d,$<) &&\
rm $(patsubst %.cpp,%.d,$<) || true" rm $(patsubst %.cpp,%.d,$<) || true"
$(FOBJPATH)/%$(OBJEXT): %.cxx
@echo building $(basename $<)$(OBJEXT)
$(CXX) -c -MD $(CPPFLAGS) -o $@ $<
@$(SHELL) -c "[ -s $(patsubst %.cxx,%.d,$<) ] && \
echo -n $(FOBJPATH)/>$(FDEPPATH)/$(patsubst %.cxx,%.d,$<) && \
$(CAT) $(patsubst %.cxx,%.d,$<)>>$(FDEPPATH)/$(patsubst %.cxx,%.d,$<) &&\
rm $(patsubst %.cxx,%.d,$<) || true"
$(FOBJPATH)/%$(OBJEXT): %.c $(FOBJPATH)/%$(OBJEXT): %.c
@echo building $(basename $<)$(OBJEXT) @echo building $(basename $<)$(OBJEXT)
$(CC) -c -MD $(CFLAGS) -o $@ $< $(CC) -c -MD $(CFLAGS) -o $@ $<
@ -59,12 +67,12 @@ include bld$(PLATFORM).inc
endif endif
ifeq ($(PLATFORM),cyg) ifeq ($(PLATFORM),cyg)
OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.rc,%$(OBJEXT),$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(filter %.c %.cpp %.rc,$(SOURCES)))))) OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.rc,%$(OBJEXT),$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(patsubst %.cxx,%$(OBJEXT),$(filter %.c %.cpp %.cxx %.rc,$(SOURCES)))))))
else else
ifeq ($(PLATFORM),emx) ifeq ($(PLATFORM),emx)
OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.rc,%.res,$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(filter %.c %.cpp %.rc,$(SOURCES)))))) OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.rc,%.res,$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(patsubst %.cxx,%$(OBJEXT),$(filter %.c %.cpp %.cxx %.rc,$(SOURCES)))))))
else else
OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(filter %.c %.cpp %.rc,$(SOURCES))))) OBJS=$(addprefix $(FOBJPATH)/,$(patsubst %.c,%$(OBJEXT),$(patsubst %.cpp,%$(OBJEXT),$(patsubst %.cxx,%$(OBJEXT),$(filter %.c %.cpp %.cxx %.rc,$(SOURCES))))))
endif endif
endif endif
DEPS = $(wildcard $(FDEPPATH)/*.d) DEPS = $(wildcard $(FDEPPATH)/*.d)

View File

@ -1,10 +1,15 @@
# -*- makefile -*- # -*- makefile -*-
include GNUmakef.def include GNUmakef.def
include Config.def
.PHONY: all clean distclean dirs sourcelists deps docs .PHONY: all clean distclean dirs sourcelists deps docs
LIBS=gall gcfg gmb3 glibc uulib smblib msgidlib myspell LIBS=gall gcfg gmb3 glibc uulib smblib msgidlib
ifneq ($(findstring GCFG_NO_MYSPELL, $(CPPFLAGS)), GCFG_NO_MYSPELL)
LIBS+=myspell
endif
EXECUTABLES=golded3 goldnode rddt EXECUTABLES=golded3 goldnode rddt
all: sourcelists all: sourcelists

View File

@ -300,6 +300,7 @@ REPLYLINKLIST
REPLYLINKSHOWALWAYS REPLYLINKSHOWALWAYS
ROBOTNAME ROBOTNAME
SCHECKERDEFLANG SCHECKERDEFLANG
SCHECKERDICPATH
SCHECKERENABLED SCHECKERENABLED
SCHECKERUSERDIC SCHECKERUSERDIC
SCREENBLANKER SCREENBLANKER
@ -354,6 +355,7 @@ TIMEOUTSAVEMSG
TIMESLICE TIMESLICE
TIMESREAD TIMESREAD
TITLESTATUS TITLESTATUS
TRANSLATE
TWITMODE TWITMODE
TWITNAME TWITNAME
TWITSUBJ TWITSUBJ

View File

@ -3,6 +3,7 @@
* These macroses may be used in: * These macroses may be used in:
* template file, externutil command line, tearline and tagline. * template file, externutil command line, tearline and tagline.
========================================================================== ==========================================================================
@align
@areaname @areaname
@areapath @areapath
@areatype @areatype
@ -57,7 +58,9 @@
@otime @otime
@oto @oto
@otzoffset @otzoffset
@pad
@pid @pid
@pipe
@pseudo @pseudo
@rev @rev
@subject @subject
@ -69,6 +72,7 @@
@tlname @tlname
@tname @tname
@tpseudo @tpseudo
@tr
@ver @ver
@version @version
@widepid @widepid

View File

@ -9,9 +9,14 @@ endif
endif endif
TOP=.. TOP=..
include $(TOP)/Config.def
SHORTTARGET=ged SHORTTARGET=ged
TARGET=golded3 TARGET=golded3
GLIBS=gmb3 gall gcfg uulib smblib msgidlib GLIBS=gmb3 gall gcfg uulib smblib msgidlib
ifneq ($(findstring GCFG_NO_MYSPELL, $(CPPFLAGS)), GCFG_NO_MYSPELL)
GLIBS+=myspell
endif
INCS=-I. -I$(TOP)/goldlib/gall -I$(TOP)/goldlib/gcfg -I$(TOP)/goldlib/gmb3 -I$(TOP)/goldlib/uulib -I$(TOP)/goldlib/smblib -I$(TOP)/goldlib/msgidlib INCS=-I. -I$(TOP)/goldlib/gall -I$(TOP)/goldlib/gcfg -I$(TOP)/goldlib/gmb3 -I$(TOP)/goldlib/uulib -I$(TOP)/goldlib/smblib -I$(TOP)/goldlib/msgidlib
ifeq ($(findstring EMX, $(PATH)), EMX) ifeq ($(findstring EMX, $(PATH)), EMX)

View File

@ -19,6 +19,11 @@ INCS+=-I$(TOP)/goldlib/glibc
endif endif
endif endif
include $(TOP)/Config.def
ifneq ($(findstring GCFG_NO_MYSPELL, $(CPPFLAGS)), GCFG_NO_MYSPELL)
INCS+=-I$(TOP)/goldlib/myspell
endif
include $(TOP)/GNUmakef.inc include $(TOP)/GNUmakef.inc
ifeq ($(PLATFORM),emx) ifeq ($(PLATFORM),emx)

View File

@ -35,7 +35,9 @@
#include <gdirposx.h> #include <gdirposx.h>
#include <gstrall.h> #include <gstrall.h>
#if !defined(GCFG_NO_MYSPELL)
#include <myspell.hxx> #include <myspell.hxx>
#endif
#include <gespell.h> #include <gespell.h>
typedef char XlatName[17]; typedef char XlatName[17];

9
goldlib/myspell/Makefile Normal file
View File

@ -0,0 +1,9 @@
# -*- makefile -*-
TOP=../..
TARGET=myspell
INCS=-I$(TOP)/goldlib/myspell -I$(TOP)/goldlib/gall
CFLAGS=
include $(TOP)/GNUmakef.inc
include $(TOP)/GNUmakef.lib

View File

@ -1,4 +1,4 @@
#include "license.readme" #include "license.rea"
#include <cctype> #include <cctype>

View File

@ -2,7 +2,7 @@
#define _AFFIX_HXX_ #define _AFFIX_HXX_
#include "atypes.hxx" #include "atypes.hxx"
#include "baseaffix.hxx" #include "baseaffi.hxx"
#include "affixmgr.hxx" #include "affixmgr.hxx"

View File

@ -1,4 +1,4 @@
#include "license.readme" #include "license.rea"
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -2,7 +2,7 @@
#define _AFFIXMGR_HXX_ #define _AFFIXMGR_HXX_
#include "atypes.hxx" #include "atypes.hxx"
#include "baseaffix.hxx" #include "baseaffi.hxx"
#include "hashmgr.hxx" #include "hashmgr.hxx"
#include <cstdio> #include <cstdio>

View File

@ -0,0 +1,17 @@
#ifndef _BASEAFF_HXX_
#define _BASEAFF_HXX_
class AffEntry
{
protected:
char * appnd;
char * strip;
short appndl;
short stripl;
short numconds;
short xpflg;
char achar;
char conds[SETSIZE];
};
#endif

View File

@ -1,4 +1,4 @@
#include "license.readme" #include "license.rea"
#if !defined(_MSC_VER) #if !defined(_MSC_VER)
#include <unistd.h> #include <unistd.h>

View File

@ -0,0 +1,61 @@
/*
* Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada
* And Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All modifications to the source code must be clearly marked as
* such. Binary redistributions based on modified source code
* must be clearly marked as modified versions in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*
* NOTE: A special thanks and credit goes to Geoff Kuenning
* the creator of ispell. MySpell's affix algorithms were
* based on those of ispell which should be noted is
* copyright Geoff Kuenning et.al. and now available
* under a BSD style license. For more information on ispell
* and affix compression in general, please see:
* http://www.cs.ucla.edu/ficus-members/geoff/ispell.html
* (the home page for ispell)
*
* An almost complete rewrite of MySpell for use by
* the Mozilla project has been developed by David Einstein
* (Deinst@world.std.com). David and I are now
* working on parallel development tracks to help
* our respective projects (Mozilla and OpenOffice.org
* and we will maintain full affix file and dictionary
* file compatibility and work on merging our versions
* of MySpell back into a single tree. David has been
* a significant help in improving MySpell.
*
* Special thanks also go to La'szlo' Ne'meth
* <nemethl@gyorsposta.hu> who is the author of the
* Hungarian dictionary and who developed and contributed
* the code to support compound words in MySpell
* and fixed numerous problems with the encoding
* case conversion tables.
*
*/

View File

@ -2,7 +2,6 @@ affentry cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
affixmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun affixmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
csutil cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun csutil cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
dictmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun dictmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
example cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
hashmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun hashmgr cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
hashmgr hxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun hashmgr hxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun
myspell cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun myspell cxx all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be sun

View File

@ -1,4 +1,4 @@
#include "license.readme" #include "license.rea"
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>

View File

@ -1,4 +1,4 @@
#include "license.readme" #include "license.rea"
#include <cstdlib> #include <cstdlib>
#include <cctype> #include <cctype>