annotate src/offix-types.h @ 1296:87084e8445a7

[xemacs-hg @ 2003-02-14 09:50:15 by ben] syntax-table fixes 1. the updating of mirror tables every time a syntax table was modified was taking up huge amounts of time so i added a dirty flag and made the updating "just-in-time". 2. no-longer-used char-table-entries were not getting "freed", generating tons of garbage. 3. syntax_match() was being incorrectly called on mirror tables in the cache, not the original syntax table. buffer.c, syntax.c: Move syntax table description from buffer.c to syntax.c. chartab.c, chartab.h: Free extra char table entries to avoid excessive garbage. Add flags for dirty and mirror_table_p to char tables. Add a back pointer from mirror tables to the original syntax table. When modifying a syntax table, don't update the mirror table right away, just mark as dirty. Add various asserts to make sure we are dealing with the right type of table (mirror or non-mirror). font-lock.c, syntax.c, syntax.h: Add entry to syntax caches for the non-mirror table. Set it appropriately when initializing the syntax table. Use it, not the mirror table, for calls to syntax_match(). Don't create a bogus float each time, just once at startup. Add some asserts, as in chartab.c. syntax.h: When retrieving the syntax code, check the dirty flag and update the mirror tables as appropriate. Add some asserts, as above.
author ben
date Fri, 14 Feb 2003 09:50:17 +0000
parents 74fd4e045ea6
children 697ef44129c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
1 /*
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
2 Copyright (C) 1996 César Crusius
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
3
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
4 This file is part of the DND Library. This library is free
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
5 software; you can redistribute it and/or modify it under the terms of
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
6 the GNU Library General Public License as published by the Free
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
7 Software Foundation; either version 2 of the License, or (at your
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
8 option) any later version. This library is distributed in the hope
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
9 that it will be useful, but WITHOUT ANY WARRANTY; without even the
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
10 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
11 PURPOSE. See the GNU Library General Public License for more details.
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
12 You should have received a copy of the GNU Library General Public
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
13 License along with this library; if not, write to the Free Software
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
14 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
15 */
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
16
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 197
diff changeset
17 #ifndef INCLUDED_offix_types_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 197
diff changeset
18 #define INCLUDED_offix_types_h_
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
19
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
20 #define DndNotDnd -1
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
21 #define DndUnknown 0
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
22 #define DndRawData 1
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
23 #define DndFile 2
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
24 #define DndFiles 3
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
25 #define DndText 4
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
26 #define DndDir 5
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
27 #define DndLink 6
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
28 #define DndExe 7
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
29 #define DndURL 8
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
30 #define DndMIME 9
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
31
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
32 #define DndEND 10
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents:
diff changeset
33
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 197
diff changeset
34 #endif /* INCLUDED_offix_types_h_ */