Changeset 408

Show
Ignore:
Timestamp:
03/04/10 21:50:26 (6 months ago)
Author:
walter
Message:

add spell checking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/dsymbol.c

    r253 r408  
    11 
    22// Compiler implementation of the D programming language 
    3 // Copyright (c) 1999-2009 by Digital Mars 
     3// Copyright (c) 1999-2010 by Digital Mars 
    44// All Rights Reserved 
    55// written by Walter Bright 
    66// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    1111#include <stdio.h> 
    1212#include <string.h> 
    1313#include <assert.h> 
    1414 
    1515#include "rmem.h" 
     16#include "speller.h" 
    1617 
    1718#include "mars.h" 
    1819#include "dsymbol.h" 
    1920#include "aggregate.h" 
    2021#include "identifier.h" 
     
    328329 
    329330Dsymbol *Dsymbol::search(Loc loc, Identifier *ident, int flags) 
    330331{ 
    331332    //printf("Dsymbol::search(this=%p,%s, ident='%s')\n", this, toChars(), ident->toChars()); 
    332333    return NULL; 
     334} 
     335 
     336/*************************************************** 
     337 * Search for symbol with correct spelling. 
     338 */ 
     339 
     340void *symbol_search_fp(void *arg, const char *seed) 
     341{ 
     342    Dsymbol *s = (Dsymbol *)arg; 
     343    Identifier id(seed, 0); 
     344    Module::clearCache(); 
     345    s = s->search(0, &id, 4|2); 
     346    return s; 
     347} 
     348 
     349Dsymbol *Dsymbol::search_correct(Identifier *ident) 
     350{ 
     351    if (global.gag) 
     352    return NULL;        // don't do it for speculative compiles; too time consuming 
     353 
     354    return (Dsymbol *)speller(ident->toChars(), &symbol_search_fp, this, idchars); 
    333355} 
    334356 
    335357/*************************************** 
    336358 * Search for identifier id as a member of 'this'. 
    337359 * id may be a template instance. 
  • branches/dmd-1.x/src/dsymbol.h

    r342 r408  
    11 
    22// Compiler implementation of the D programming language 
    3 // Copyright (c) 1999-2009 by Digital Mars 
     3// Copyright (c) 1999-2010 by Digital Mars 
    44// All Rights Reserved 
    55// written by Walter Bright 
    66// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    145145    virtual void semantic(Scope *sc); 
    146146    virtual void semantic2(Scope *sc); 
    147147    virtual void semantic3(Scope *sc); 
    148148    virtual void inlineScan(); 
    149149    virtual Dsymbol *search(Loc loc, Identifier *ident, int flags); 
     150    Dsymbol *search_correct(Identifier *id); 
    150151    Dsymbol *searchX(Loc loc, Scope *sc, Identifier *id); 
    151152    virtual int overloadInsert(Dsymbol *s); 
    152153#ifdef _DH 
    153154    char *toHChars(); 
    154155    virtual void toHBuffer(OutBuffer *buf, HdrGenState *hgs); 
  • branches/dmd-1.x/src/expression.c

    r405 r408  
    20892089        } 
    20902090        e = new DsymbolExp(loc, s); 
    20912091    } 
    20922092    return e->semantic(sc); 
    20932093    } 
    2094     error("undefined identifier %s", ident->toChars()); 
     2094#if DMDV2 
     2095    if (ident == Id::ctfe) 
     2096    {  // Create the magic __ctfe bool variable 
     2097       VarDeclaration *vd = new VarDeclaration(loc, Type::tbool, Id::ctfe, NULL); 
     2098       Expression *e = new VarExp(loc, vd); 
     2099       e = e->semantic(sc); 
     2100       return e; 
     2101    } 
     2102#endif 
     2103 
     2104    s = sc->search_correct(ident); 
     2105    if (s) 
     2106    error("undefined identifier %s, did you mean %s %s?", ident->toChars(), s->kind(), s->toChars()); 
     2107    else 
     2108    error("undefined identifier %s", ident->toChars()); 
    20952109    type = Type::terror; 
    20962110    return this; 
    20972111} 
    20982112 
    20992113char *IdentifierExp::toChars() 
  • branches/dmd-1.x/src/module.c

    r342 r408  
    862862 * for this Module. 
    863863 */ 
    864864 
    865865int Module::needModuleInfo() 
    866866{ 
     867    //printf("needModuleInfo() %s, %d, %d\n", toChars(), needmoduleinfo, global.params.cov); 
    867868    return needmoduleinfo || global.params.cov; 
    868869} 
    869870 
    870871Dsymbol *Module::search(Loc loc, Identifier *ident, int flags) 
    871872{ 
     
    900901{ 
    901902    searchCacheIdent = 0;   // symbol is inserted, so invalidate cache 
    902903    return Package::symtabInsert(s); 
    903904} 
    904905 
     906void Module::clearCache() 
     907{ 
     908    for (int i = 0; i < amodules.dim; i++) 
     909    {   Module *m = (Module *)amodules.data[i]; 
     910    m->searchCacheIdent = NULL; 
     911    } 
     912} 
    905913 
    906914/******************************************* 
    907915 * Can't run semantic on s now, try again later. 
    908916 */ 
    909917 
  • branches/dmd-1.x/src/module.h

    r342 r408  
    139139    Dsymbol *search(Loc loc, Identifier *ident, int flags); 
    140140    Dsymbol *symtabInsert(Dsymbol *s); 
    141141    void deleteObjFile(); 
    142142    void addDeferredSemantic(Dsymbol *s); 
    143143    static void runDeferredSemantic(); 
     144    static void clearCache(); 
    144145    int imports(Module *m); 
    145146 
    146147    // Back end 
    147148 
    148149    int doppelganger;       // sub-module 
  • branches/dmd-1.x/src/mtype.c

    r382 r408  
    590590    e = new IntegerExp(loc, size(loc), Type::tsize_t); 
    591591    } 
    592592    else if (ident == Id::size) 
    593593    { 
    594594    error(loc, ".size property should be replaced with .sizeof"); 
    595     e = new IntegerExp(loc, size(loc), Type::tsize_t); 
     595    e = new ErrorExp(); 
    596596    } 
    597597    else if (ident == Id::alignof) 
    598598    { 
    599599    e = new IntegerExp(loc, alignsize(), Type::tsize_t); 
    600600    } 
     
    628628    Scope sc; 
    629629    e = e->semantic(&sc); 
    630630    } 
    631631    else 
    632632    { 
    633     error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars()); 
    634     e = new IntegerExp(loc, 1, Type::tint32); 
     633    Dsymbol *s = NULL; 
     634    if (ty == Tstruct || ty == Tclass || ty == Tenum || ty == Ttypedef) 
     635        s = toDsymbol(NULL); 
     636    if (s) 
     637        s = s->search_correct(ident); 
     638    if (s) 
     639        error(loc, "no property '%s' for type '%s', did you mean '%s'?", ident->toChars(), toChars(), s->toChars()); 
     640    else 
     641        error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars()); 
     642    e = new ErrorExp(); 
    635643    } 
    636644    return e; 
    637645} 
    638646 
    639647Expression *Type::dotExp(Scope *sc, Expression *e, Identifier *ident) 
  • branches/dmd-1.x/src/scope.c

    r294 r408  
    11 
    2 // Copyright (c) 1999-2005 by Digital Mars 
     2// Copyright (c) 1999-2010 by Digital Mars 
    33// All Rights Reserved 
    44// written by Walter Bright 
    55// http://www.digitalmars.com 
    66// License for redistribution is by either the Artistic License 
    77// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    99 
    1010#include <stdio.h> 
    1111#include <assert.h> 
    1212 
    1313#include "root.h" 
     14#include "speller.h" 
    1415 
    1516#include "mars.h" 
    1617#include "init.h" 
    1718#include "identifier.h" 
    1819#include "scope.h" 
     
    357358    //assert(!sc->enclosing || sc != sc->enclosing->enclosing); 
    358359    //if (++i == 10) 
    359360        //assert(0); 
    360361    } 
    361362} 
     363 
     364 
     365/************************************************ 
     366 * Given the failed search attempt, try to find 
     367 * one with a close spelling. 
     368 */ 
     369 
     370void *scope_search_fp(void *arg, const char *seed) 
     371{ 
     372    //printf("scope_search_fp('%s')\n", seed); 
     373    Scope *sc = (Scope *)arg; 
     374    Identifier id(seed, 0); 
     375    Module::clearCache(); 
     376    Dsymbol *s = sc->search(0, &id, NULL); 
     377    return s; 
     378} 
     379 
     380Dsymbol *Scope::search_correct(Identifier *ident) 
     381{ 
     382    if (global.gag) 
     383    return NULL;        // don't do it for speculative compiles; too time consuming 
     384 
     385    return (Dsymbol *)speller(ident->toChars(), &scope_search_fp, this, idchars); 
     386} 
  • branches/dmd-1.x/src/scope.h

    r243 r408  
    108108    Scope *pop(); 
    109109 
    110110    void mergeCallSuper(Loc loc, unsigned cs); 
    111111 
    112112    Dsymbol *search(Loc loc, Identifier *ident, Dsymbol **pscopesym); 
     113    Dsymbol *search_correct(Identifier *ident); 
    113114    Dsymbol *insert(Dsymbol *s); 
    114115 
    115116    ClassDeclaration *getClassScope(); 
    116117    AggregateDeclaration *getStructClassScope(); 
    117118    void setNoFree(); 
  • branches/dmd-1.x/src/template.c

    r351 r408  
    36573657    int i; 
    36583658 
    36593659    id = name; 
    36603660    s = sc->search(loc, id, &scopesym); 
    36613661    if (!s) 
    3662     {   error("template '%s' is not defined", id->toChars()); 
     3662    { 
     3663        s = sc->search_correct(id); 
     3664        if (s) 
     3665        error("template '%s' is not defined, did you mean %s?", id->toChars(), s->toChars()); 
     3666        else 
     3667        error("template '%s' is not defined", id->toChars()); 
    36633668        return NULL; 
    36643669    } 
    36653670#if LOG 
    36663671    printf("It's an instance of '%s' kind '%s'\n", s->toChars(), s->kind()); 
    36673672    if (s->parent) 
  • branches/dmd-1.x/src/win32.mak

    r262 r408  
    9494    bcomplex.obj iasm.obj ptrntab.obj aa.obj ti_achar.obj md5.obj 
    9595 
    9696# from ROOT 
    9797 
    9898ROOTOBJS= lstring.obj array.obj gnuc.obj man.obj rmem.obj port.obj root.obj \ 
    99     stringtable.obj dchar.obj response.obj async.obj 
     99    stringtable.obj dchar.obj response.obj async.obj speller.obj 
    100100 
    101101OBJS= $(OBJ1) $(OBJ8) $(ROOTOBJS) 
    102102 
    103103SRCS= mars.c enum.c struct.c dsymbol.c import.c idgen.c impcnvgen.c utf.h \ 
    104104    utf.c entity.c identifier.c mtype.c expression.c optimize.c \ 
     
    147147ROOTSRC= $(ROOT)\dchar.h $(ROOT)\dchar.c $(ROOT)\lstring.h \ 
    148148    $(ROOT)\lstring.c $(ROOT)\root.h $(ROOT)\root.c $(ROOT)\array.c \ 
    149149    $(ROOT)\rmem.h $(ROOT)\rmem.c $(ROOT)\port.h \ 
    150150    $(ROOT)\stringtable.h $(ROOT)\stringtable.c \ 
    151151    $(ROOT)\gnuc.h $(ROOT)\gnuc.c $(ROOT)\man.c $(ROOT)\port.c \ 
    152     $(ROOT)\response.c $(ROOT)\async.h $(ROOT)\async.c 
     152    $(ROOT)\response.c $(ROOT)\async.h $(ROOT)\async.c \ 
     153    $(ROOT)\speller.h $(ROOT)\speller.c 
    153154 
    154155MAKEFILES=win32.mak linux.mak osx.mak freebsd.mak solaris.mak 
    155156 
    156157######################################### 
    157158 
     
    417418root.obj : $(ROOT)\root.c 
    418419    $(CC) -c $(CFLAGS) $(ROOT)\root.c 
    419420 
    420421response.obj : $(ROOT)\response.c 
    421422    $(CC) -c $(CFLAGS) $(ROOT)\response.c 
     423 
     424speller.obj : $(ROOT)\speller.h $(ROOT)\speller.c 
     425    $(CC) -c $(CFLAGS) $(ROOT)\speller.c 
    422426 
    423427stringtable.obj : $(ROOT)\stringtable.c 
    424428    $(CC) -c $(CFLAGS) $(ROOT)\stringtable.c 
    425429 
    426430 
  • trunk/src/dsymbol.c

    r402 r408  
    11 
    22// Compiler implementation of the D programming language 
    3 // Copyright (c) 1999-2009 by Digital Mars 
     3// Copyright (c) 1999-2010 by Digital Mars 
    44// All Rights Reserved 
    55// written by Walter Bright 
    66// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    1111#include <stdio.h> 
    1212#include <string.h> 
    1313#include <assert.h> 
    1414 
    1515#include "rmem.h" 
     16#include "speller.h" 
    1617 
    1718#include "mars.h" 
    1819#include "dsymbol.h" 
    1920#include "aggregate.h" 
    2021#include "identifier.h" 
     
    328329 
    329330Dsymbol *Dsymbol::search(Loc loc, Identifier *ident, int flags) 
    330331{ 
    331332    //printf("Dsymbol::search(this=%p,%s, ident='%s')\n", this, toChars(), ident->toChars()); 
    332333    return NULL; 
     334} 
     335 
     336/*************************************************** 
     337 * Search for symbol with correct spelling. 
     338 */ 
     339 
     340void *symbol_search_fp(void *arg, const char *seed) 
     341{ 
     342    Dsymbol *s = (Dsymbol *)arg; 
     343    Identifier id(seed, 0); 
     344    Module::clearCache(); 
     345    s = s->search(0, &id, 4|2); 
     346    return s; 
     347} 
     348 
     349Dsymbol *Dsymbol::search_correct(Identifier *ident) 
     350{ 
     351    if (global.gag) 
     352    return NULL;        // don't do it for speculative compiles; too time consuming 
     353 
     354    return (Dsymbol *)speller(ident->toChars(), &symbol_search_fp, this, idchars); 
    333355} 
    334356 
    335357/*************************************** 
    336358 * Search for identifier id as a member of 'this'. 
    337359 * id may be a template instance. 
     
    12001222{ 
    12011223#ifdef DEBUG 
    12021224    assert(ident); 
    12031225    assert(tab); 
    12041226#endif 
     1227    //printf("DsymbolTable::lookup(%s)\n", (char*)ident->string); 
    12051228    StringValue *sv = tab->lookup((char*)ident->string, ident->len); 
    12061229    return (Dsymbol *)(sv ? sv->ptrvalue : NULL); 
    12071230} 
    12081231 
    12091232Dsymbol *DsymbolTable::insert(Dsymbol *s) 
  • trunk/src/dsymbol.h

    r402 r408  
    147147    virtual void semantic(Scope *sc); 
    148148    virtual void semantic2(Scope *sc); 
    149149    virtual void semantic3(Scope *sc); 
    150150    virtual void inlineScan(); 
    151151    virtual Dsymbol *search(Loc loc, Identifier *ident, int flags); 
     152    Dsymbol *search_correct(Identifier *id); 
    152153    Dsymbol *searchX(Loc loc, Scope *sc, Identifier *id); 
    153154    virtual int overloadInsert(Dsymbol *s); 
    154155#ifdef _DH 
    155156    char *toHChars(); 
    156157    virtual void toHBuffer(OutBuffer *buf, HdrGenState *hgs); 
  • trunk/src/expression.c

    r406 r408  
    22552255       VarDeclaration *vd = new VarDeclaration(loc, Type::tbool, Id::ctfe, NULL); 
    22562256       Expression *e = new VarExp(loc, vd); 
    22572257       e = e->semantic(sc); 
    22582258       return e; 
    22592259    } 
    2260     error("undefined identifier %s", ident->toChars()); 
     2260 
     2261    s = sc->search_correct(ident); 
     2262    if (s) 
     2263    error("undefined identifier %s, did you mean %s %s?", ident->toChars(), s->kind(), s->toChars()); 
     2264    else 
     2265    error("undefined identifier %s", ident->toChars()); 
    22612266    type = Type::terror; 
    22622267    return this; 
    22632268} 
    22642269 
    22652270char *IdentifierExp::toChars() 
     
    58585863 
    58595864    /* Disable access to another module's private imports. 
    58605865     * The check for 'is sds our current module' is because 
    58615866     * the current module should have access to its own imports. 
    58625867     */ 
    5863     Dsymbol *s = ie->sds->search(loc, ident, //0); 
     5868    Dsymbol *s = ie->sds->search(loc, ident, 
    58645869        (ie->sds->isModule() && ie->sds != sc->module) ? 1 : 0); 
    58655870    if (s) 
    58665871    { 
    58675872        s = s->toAlias(); 
    58685873        checkDeprecated(sc, s); 
     
    1064910654    (t2->ty == Tarray || t2->ty == Tsarray)) 
    1065010655    {   Type *t1n = t1->nextOf()->toBasetype(); 
    1065110656    Type *t2n = t2->nextOf()->toBasetype(); 
    1065210657    if (t1n->constOf() != t2n->constOf() && 
    1065310658        !((t1n->ty == Tchar || t1n->ty == Twchar || t1n->ty == Tdchar) && 
    10654           (t2n->ty == Tchar || t2n->ty == Twchar || t2n->ty == Tdchar)) 
     10659          (t2n->ty == Tchar || t2n->ty == Twchar || t2n->ty == Tdchar)) && 
     10660        !(t1n->ty == Tvoid || t2n->ty == Tvoid) 
    1065510661       ) 
    1065610662    {   /* Rewrite as: 
    1065710663         * _ArrayEq(e1, e2) 
    1065810664         */ 
    1065910665        Expression *eq = new IdentifierExp(loc, Id::_ArrayEq); 
  • trunk/src/module.c

    r393 r408  
    910910{ 
    911911    searchCacheIdent = 0;   // symbol is inserted, so invalidate cache 
    912912    return Package::symtabInsert(s); 
    913913} 
    914914 
     915void Module::clearCache() 
     916{ 
     917    for (int i = 0; i < amodules.dim; i++) 
     918    {   Module *m = (Module *)amodules.data[i]; 
     919    m->searchCacheIdent = NULL; 
     920    } 
     921} 
    915922 
    916923/******************************************* 
    917924 * Can't run semantic on s now, try again later. 
    918925 */ 
    919926 
  • trunk/src/module.h

    r395 r408  
    142142    Dsymbol *search(Loc loc, Identifier *ident, int flags); 
    143143    Dsymbol *symtabInsert(Dsymbol *s); 
    144144    void deleteObjFile(); 
    145145    void addDeferredSemantic(Dsymbol *s); 
    146146    static void runDeferredSemantic(); 
     147    static void clearCache(); 
    147148    int imports(Module *m); 
    148149 
    149150    // Back end 
    150151 
    151152    int doppelganger;       // sub-module 
  • trunk/src/mtype.c

    r407 r408  
    16441644    Scope sc; 
    16451645    e = e->semantic(&sc); 
    16461646    } 
    16471647    else 
    16481648    { 
    1649     error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars()); 
     1649    Dsymbol *s = NULL; 
     1650    if (ty == Tstruct || ty == Tclass || ty == Tenum || ty == Ttypedef) 
     1651        s = toDsymbol(NULL); 
     1652    if (s) 
     1653        s = s->search_correct(ident); 
     1654    if (s) 
     1655        error(loc, "no property '%s' for type '%s', did you mean '%s'?", ident->toChars(), toChars(), s->toChars()); 
     1656    else 
     1657        error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars()); 
    16501658    e = new ErrorExp(); 
    16511659    } 
    16521660    return e; 
    16531661} 
    16541662 
  • trunk/src/scope.c

    r294 r408  
    11 
    2 // Copyright (c) 1999-2005 by Digital Mars 
     2// Copyright (c) 1999-2010 by Digital Mars 
    33// All Rights Reserved 
    44// written by Walter Bright 
    55// http://www.digitalmars.com 
    66// License for redistribution is by either the Artistic License 
    77// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    99 
    1010#include <stdio.h> 
    1111#include <assert.h> 
    1212 
    1313#include "root.h" 
     14#include "speller.h" 
    1415 
    1516#include "mars.h" 
    1617#include "init.h" 
    1718#include "identifier.h" 
    1819#include "scope.h" 
     
    357358    //assert(!sc->enclosing || sc != sc->enclosing->enclosing); 
    358359    //if (++i == 10) 
    359360        //assert(0); 
    360361    } 
    361362} 
     363 
     364 
     365/************************************************ 
     366 * Given the failed search attempt, try to find 
     367 * one with a close spelling. 
     368 */ 
     369 
     370void *scope_search_fp(void *arg, const char *seed) 
     371{ 
     372    //printf("scope_search_fp('%s')\n", seed); 
     373    Scope *sc = (Scope *)arg; 
     374    Identifier id(seed, 0); 
     375    Module::clearCache(); 
     376    Dsymbol *s = sc->search(0, &id, NULL); 
     377    return s; 
     378} 
     379 
     380Dsymbol *Scope::search_correct(Identifier *ident) 
     381{ 
     382    if (global.gag) 
     383    return NULL;        // don't do it for speculative compiles; too time consuming 
     384 
     385    return (Dsymbol *)speller(ident->toChars(), &scope_search_fp, this, idchars); 
     386} 
  • trunk/src/scope.h

    r242 r408  
    108108    Scope *pop(); 
    109109 
    110110    void mergeCallSuper(Loc loc, unsigned cs); 
    111111 
    112112    Dsymbol *search(Loc loc, Identifier *ident, Dsymbol **pscopesym); 
     113    Dsymbol *search_correct(Identifier *ident); 
    113114    Dsymbol *insert(Dsymbol *s); 
    114115 
    115116    ClassDeclaration *getClassScope(); 
    116117    AggregateDeclaration *getStructClassScope(); 
    117118    void setNoFree(); 
  • trunk/src/template.c

    r402 r408  
    40414041    int i; 
    40424042 
    40434043    id = name; 
    40444044    s = sc->search(loc, id, &scopesym); 
    40454045    if (!s) 
    4046     {   error("template '%s' is not defined", id->toChars()); 
     4046    { 
     4047        s = sc->search_correct(id); 
     4048        if (s) 
     4049        error("template '%s' is not defined, did you mean %s?", id->toChars(), s->toChars()); 
     4050        else 
     4051        error("template '%s' is not defined", id->toChars()); 
    40474052        return NULL; 
    40484053    } 
    40494054 
    40504055    /* If an OverloadSet, look for a unique member that is a template declaration 
    40514056     */ 
  • trunk/src/win32.mak

    r258 r408  
    44# All Rights Reserved 
    55# Build dmd with Digital Mars C++ compiler 
    66 
    77D= 
    88DMDSVN=\svnproj\dmd\trunk\src 
     9#DMDSVN=\svnproj\dmd\branches\dmd-1.x\src 
    910SCROOT=$D\dm 
    1011INCLUDE=$(SCROOT)\include 
    1112CC=\dm\bin\dmc 
    1213LIBNT=$(SCROOT)\lib 
    1314SNN=$(SCROOT)\lib\snn 
     
    9394    bcomplex.obj iasm.obj ptrntab.obj aa.obj ti_achar.obj md5.obj 
    9495 
    9596# from ROOT 
    9697 
    9798ROOTOBJS= lstring.obj array.obj gnuc.obj man.obj rmem.obj port.obj root.obj \ 
    98     stringtable.obj dchar.obj response.obj async.obj 
     99    stringtable.obj dchar.obj response.obj async.obj speller.obj 
    99100 
    100101OBJS= $(OBJ1) $(OBJ8) $(ROOTOBJS) 
    101102 
    102103SRCS= mars.c enum.c struct.c dsymbol.c import.c idgen.c impcnvgen.c utf.h \ 
    103104    utf.c entity.c identifier.c mtype.c expression.c optimize.c \ 
     
    146147ROOTSRC= $(ROOT)\dchar.h $(ROOT)\dchar.c $(ROOT)\lstring.h \ 
    147148    $(ROOT)\lstring.c $(ROOT)\root.h $(ROOT)\root.c $(ROOT)\array.c \ 
    148149    $(ROOT)\rmem.h $(ROOT)\rmem.c $(ROOT)\port.h \ 
    149150    $(ROOT)\stringtable.h $(ROOT)\stringtable.c \ 
    150151    $(ROOT)\gnuc.h $(ROOT)\gnuc.c $(ROOT)\man.c $(ROOT)\port.c \ 
    151     $(ROOT)\response.c $(ROOT)\async.h $(ROOT)\async.c 
     152    $(ROOT)\response.c $(ROOT)\async.h $(ROOT)\async.c \ 
     153    $(ROOT)\speller.h $(ROOT)\speller.c 
    152154 
    153155MAKEFILES=win32.mak linux.mak osx.mak freebsd.mak solaris.mak 
    154156 
    155157######################################### 
    156158 
     
    416418root.obj : $(ROOT)\root.c 
    417419    $(CC) -c $(CFLAGS) $(ROOT)\root.c 
    418420 
    419421response.obj : $(ROOT)\response.c 
    420422    $(CC) -c $(CFLAGS) $(ROOT)\response.c 
     423 
     424speller.obj : $(ROOT)\speller.h $(ROOT)\speller.c 
     425    $(CC) -c $(CFLAGS) $(ROOT)\speller.c 
    421426 
    422427stringtable.obj : $(ROOT)\stringtable.c 
    423428    $(CC) -c $(CFLAGS) $(ROOT)\stringtable.c 
    424429 
    425430