6e89799a34
- Pass maintainership to submitter Added file(s): - files/patch-builtin.cpp - files/patch-directory.cpp - files/patch-encoding.l - files/patch-ttf.cpp - files/patch-util.h This release contains additional patches and impovements from Redhat and net: - Compressed fonts support via Zlib - Improve performance when checking if a font has a mapping present - Base font file selection on the magic at the start of the file - iso8859-13 support - Default read system encodings.dir instead of the one in current directory - A lot of bugfixes PR: ports/100520 Submitted by: Stanislav Sedov <ssedov@mbsd.msk.ru>
44 lines
1.3 KiB
Text
44 lines
1.3 KiB
Text
--- encoding.l.orig Wed Jul 19 11:39:18 2006
|
|
+++ encoding.l Wed Jul 19 11:39:22 2006
|
|
@@ -8,7 +8,7 @@
|
|
#include "ttmkfdir.h"
|
|
#include "encoding.h"
|
|
|
|
-#define DEFAULT_SIZE 0x100 /* 8 bit encoding */
|
|
+#define DEFAULT_SIZE 0xFFFF /* 8 bit encoding */
|
|
#define YY_DECL int yylex (char *current_file, Encodings_t &dest)
|
|
|
|
static unsigned int line_number = 1;
|
|
@@ -43,6 +43,7 @@
|
|
STARTENCODING{WHITESPACES}{STRING} {
|
|
cur_enc = new Encoding;
|
|
cur_enc->names.push_back (strip_first (yytext));
|
|
+ cur_enc->size = DEFAULT_SIZE;
|
|
BEGIN(INSIDE_ENC_BLOCK);
|
|
}
|
|
|
|
@@ -97,6 +98,7 @@
|
|
<INSIDE_MAP_BLOCK>UNDEFINE{WHITESPACES}{NUMBER}({WHITESPACES}{NUMBER})? {
|
|
char *startptr = strip_first (yytext);
|
|
char *endptr;
|
|
+ long msize = cur_map->size();
|
|
|
|
int i1 = std::strtol (startptr, &endptr, 0);
|
|
startptr = endptr;
|
|
@@ -108,13 +110,14 @@
|
|
}
|
|
|
|
/* now mark all the unassigned codes */
|
|
- for (long i = i1; i <= i2; i++) {
|
|
+ for (long i = i1; i <= i2 && i < msize; i++) {
|
|
(*cur_map)[i] = -1;
|
|
}
|
|
}
|
|
|
|
<INSIDE_MAP_BLOCK>{NUMBER}({WHITESPACES}{NUMBER}){0,2} {
|
|
- int numbers[3], i = 0, start_range, end_range, target, res;
|
|
+ int numbers[3], target, res;
|
|
+ unsigned int i = 0, start_range, end_range;
|
|
char *startptr;
|
|
char *endptr = yytext;
|
|
|