rpms/ttmkfdir/FC-4 ttmkfdir-3.0.9-fix-crash.patch, NONE, 1.1 ttmkfdir-3.0.9-warnings.patch, NONE, 1.1 ttmkfdir.spec, 1.9, 1.10 ttmkfdir-3.0.9-crashplus.patch, 1.1, NONE ttmkfdir-3.0.9-defautl_enc_size.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Aug 4 09:59:28 UTC 2005
Author: petersen
Update of /cvs/dist/rpms/ttmkfdir/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv22649
Modified Files:
ttmkfdir.spec
Added Files:
ttmkfdir-3.0.9-fix-crash.patch ttmkfdir-3.0.9-warnings.patch
Removed Files:
ttmkfdir-3.0.9-crashplus.patch
ttmkfdir-3.0.9-defautl_enc_size.patch
Log Message:
- replace ttmkfdir-3.0.9-defautl_enc_size.patch and
ttmkfdir-3.0.9-crashplus.patch with ttmkfdir-3.0.9-fix-crash.patch
to fix missing native encodings of fonts (Akira Tagoh, #143941)
- buildrequire flex
- add ttmkfdir-3.0.9-warnings.patch to silence most of compiler warnings
ttmkfdir-3.0.9-fix-crash.patch:
encoding.l | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
--- NEW FILE ttmkfdir-3.0.9-fix-crash.patch ---
--- ttmkfdir-3.0.9.orig/encoding.l 2003-01-08 14:25:25.000000000 +0900
+++ ttmkfdir-3.0.9/encoding.l 2005-08-03 19:24:22.000000000 +0900
@@ -21,6 +21,19 @@
static Encoding *cur_enc;
static NumericMapping *cur_map;
+static int is_created_map = 0;
+
+static void
+create_mapping(void)
+{
+ cur_map = new NumericMapping (cur_enc->size,
+ TT_PLATFORM_MICROSOFT,
+ TT_MS_ID_UNICODE_CS);
+
+ cur_enc->enc_size = 0;
+ cur_enc->start_code = 0xffff;
+ is_created_map = 1;
+}
%}
@@ -67,12 +80,6 @@
}
<INSIDE_ENC_BLOCK>STARTMAPPING{WHITESPACES}unicode {
- cur_map = new NumericMapping (cur_enc->size,
- TT_PLATFORM_MICROSOFT,
- TT_MS_ID_UNICODE_CS);
-
- cur_enc->enc_size = 0;
- cur_enc->start_code = 0xffff;
BEGIN(INSIDE_MAP_BLOCK);
}
@@ -107,6 +114,12 @@
i2 = i1;
}
+ /* avoid a crash issue */
+ if (cur_enc->size < i2)
+ cur_enc->size = i2;
+ if (!is_created_map)
+ create_mapping();
+
/* now mark all the unassigned codes */
for (long i = i1; i <= i2; i++) {
(*cur_map)[i] = -1;
@@ -114,10 +127,14 @@
}
<INSIDE_MAP_BLOCK>{NUMBER}({WHITESPACES}{NUMBER}){0,2} {
- int numbers[3], i = 0, start_range, end_range, target, res;
+ unsigned int start_range;
+ int numbers[3], i = 0, end_range, target, res;
char *startptr;
char *endptr = yytext;
+ if (!is_created_map)
+ create_mapping();
+
for (i = 0;;i++) {
startptr = endptr;
res = std::strtol (startptr, &endptr, 0);
@@ -150,9 +167,14 @@
<INSIDE_MAP_BLOCK>ENDMAPPING {
+ /* it may not happens but to be safe */
+ if (!is_created_map)
+ create_mapping();
+
cur_enc->AddMapping (cur_map);
dest.insert (std::make_pair(cur_map->cmapkey(), cur_enc));;
BEGIN(INSIDE_ENC_BLOCK);
+ is_created_map = 0;
}
<INSIDE_UNKNOWN_MAP>ENDMAPPING {
ttmkfdir-3.0.9-warnings.patch:
commandline.cpp | 2 ++
encoding.cpp | 2 +-
encoding.l | 6 +++---
ttf.cpp | 4 ++--
ttmkfdir.cpp | 2 +-
5 files changed, 9 insertions(+), 7 deletions(-)
--- NEW FILE ttmkfdir-3.0.9-warnings.patch ---
--- ttmkfdir-3.0.9/encoding.l~ 2005-08-03 19:33:07.000000000 +0900
+++ ttmkfdir-3.0.9/encoding.l 2005-08-03 21:52:15.000000000 +0900
@@ -115,7 +115,7 @@
}
/* avoid a crash issue */
- if (cur_enc->size < i2)
+ if ((int) (cur_enc->size) < i2)
cur_enc->size = i2;
if (!is_created_map)
create_mapping();
@@ -127,8 +127,8 @@
}
<INSIDE_MAP_BLOCK>{NUMBER}({WHITESPACES}{NUMBER}){0,2} {
- unsigned int start_range;
- int numbers[3], i = 0, end_range, target, res;
+ unsigned int start_range = 0, i = 0, end_range = 0;
+ int numbers[3], target = 0, res;
char *startptr;
char *endptr = yytext;
--- ttmkfdir-3.0.9/commandline.cpp~ 2002-12-09 17:29:11.000000000 +0900
+++ ttmkfdir-3.0.9/commandline.cpp 2005-08-03 21:12:40.000000000 +0900
@@ -1,6 +1,8 @@
#include <cstdlib>
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <getopt.h>
#include "commandline.h"
--- ttmkfdir-3.0.9/ttmkfdir.cpp~ 2003-01-20 08:33:11.000000000 +0900
+++ ttmkfdir-3.0.9/ttmkfdir.cpp 2005-08-03 21:08:43.000000000 +0900
@@ -76,7 +76,7 @@
return 1;
}
- fprintf (output, "%d\n", fontdir.size ());
+ fprintf (output, "%d\n", (int)(fontdir.size ()));
for (vector<string>::const_iterator i = fontdir.begin (); i != fontdir.end (); i++) {
fprintf (output, "%s\n", i->c_str ());
--- ttmkfdir-3.0.9/ttf.cpp~ 2005-08-03 19:33:07.000000000 +0900
+++ ttmkfdir-3.0.9/ttf.cpp 2005-08-03 21:31:48.000000000 +0900
@@ -533,7 +533,7 @@
const char *
Face::Weight (void) const
{
- const char *result;
+ const char *result = NULL;
if (cmdline::instance()->option ("panose") && ((result = PanoseWeight ()) != 0)) {
return result;
@@ -614,7 +614,7 @@
const char *
Face::Width (void) const
{
- const char *result;
+ const char *result = NULL;
if (cmdline::instance()->option ("panose") && ((result = PanoseWidth ()) != 0)) {
return result;
--- ttmkfdir-3.0.9/encoding.cpp~ 2005-08-03 19:33:07.000000000 +0900
+++ ttmkfdir-3.0.9/encoding.cpp 2005-08-03 21:31:44.000000000 +0900
@@ -121,7 +121,7 @@
NumericMapping *m = new NumericMapping (size, b->mapdata.platform, b->mapdata.encoding);
- for (int i = 0; i < size; i++)
+ for (unsigned int i = 0; i < size; i++)
(*m)[i] = b->mapdata.mappingtable[i];
AddMapping (m);
Index: ttmkfdir.spec
===================================================================
RCS file: /cvs/dist/rpms/ttmkfdir/FC-4/ttmkfdir.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ttmkfdir.spec 20 Mar 2005 13:55:39 -0000 1.9
+++ ttmkfdir.spec 4 Aug 2005 09:59:25 -0000 1.10
@@ -1,27 +1,27 @@
-Summary: Utility used to create fonts.scale files for truetype fonts
+Summary: Utility to create fonts.scale files for truetype fonts
Name: ttmkfdir
Version: 3.0.9
-Release: 16
+Release: 16.1
Source0: %{name}-%{version}.tar.bz2
Patch: ttmkfdir-3.0.9-cpp.patch
Patch1: ttmkfdir-3.0.9-zlib.patch
Patch2: ttmkfdir-3.0.9-fix-freetype217.patch
Patch3: ttmkfdir-3.0.9-namespace.patch
-Patch4: ttmkfdir-3.0.9-defautl_enc_size.patch
-Patch5: ttmkfdir-3.0.9-crashplus.patch
+Patch4: ttmkfdir-3.0.9-fix-crash.patch
+Patch5: ttmkfdir-3.0.9-warnings.patch
License: GPL
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: freetype-devel >= 2.0
-BuildRequires: zlib-devel
+BuildRequires: zlib-devel flex
# ttmkfdir used to be in the following packages at one point
Conflicts: XFree86-font-utils < 4.2.99.2-0.20021126.3
Conflicts: freetype < 2.0.6-3
%description
-ttmkfdir is a utility which is used to create fonts.scale files in
-directories full of TrueType fonts in order to prepare them for use
+ttmkfdir is a utility used to create fonts.scale files in
+TrueType font directories in order to prepare them for use
by the font server.
%prep
@@ -38,7 +38,6 @@
%install
rm -rf $RPM_BUILD_ROOT
-
%makeinstall DESTDIR=$RPM_BUILD_ROOT
%clean
@@ -50,6 +49,13 @@
%{_bindir}/ttmkfdir
%changelog
+* Wed Aug 3 2005 Jens Petersen <petersen at redhat.com> - 3.0.9-16.1
+- replace ttmkfdir-3.0.9-defautl_enc_size.patch and
+ ttmkfdir-3.0.9-crashplus.patch with ttmkfdir-3.0.9-fix-crash.patch
+ to fix missing native encodings of fonts (Akira Tagoh, #143941)
+- buildrequire flex
+- add ttmkfdir-3.0.9-warnings.patch to silence most of compiler warnings
+
* Sun Mar 20 2005 Yu Shao <yshao at redhat.com> 3.0.9-16
- rebuild with GCC 4
--- ttmkfdir-3.0.9-crashplus.patch DELETED ---
--- ttmkfdir-3.0.9-defautl_enc_size.patch DELETED ---
More information about the fedora-cvs-commits
mailing list