From: Dekel Tsur Date: Mon, 3 Sep 2001 16:46:28 +0000 (+0000) Subject: Check for duplicate symbols. X-Git-Tag: 1.6.10~20678 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a9bea7bbdc211c5e0e404626f60c50be9603e1fa;p=features.git Check for duplicate symbols. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2668 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index a2ccdb77aa..5c3683bab1 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2001-09-03 Dekel Tsur + + * math_hash.C (ReadSymbols): Check for duplicate symbols + 2001-09-02 Angus Leeming * support.C: added a using std::map directive. diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 9c24fd243f..a0eb1eeb43 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -4,7 +4,6 @@ #include "lyxlex.h" #include "debug.h" #include "support/filetools.h" // LibFileSearch -#include "support/lyxfunctional.h" #include @@ -131,7 +130,7 @@ latexkeys_a wordlist_array[] = {"widetilde", LM_TK_DECORATION, 0}, {"{", LM_TK_SPECIAL, '{'}, {"|", LM_TK_UNDEF, '|'}, - {"}", LM_TK_SPECIAL, '}'}, + {"}", LM_TK_SPECIAL, '}'} }; @@ -184,7 +183,11 @@ void ReadSymbols(string const & filename) tmp.id = lex.getInteger(); if (lex.next()) tmp.type = symbolType(lex.getString()); - wordlist[tmp.name] = tmp; + if (wordlist.find(tmp.name) != wordlist.end()) + lyxerr << "ReadSymbols: token " << tmp.name + << " already exists.\n"; + else + wordlist[tmp.name] = tmp; } }