[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog src/devices/grops/psrm.cpp
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog src/devices/grops/psrm.cpp |
Date: |
Sun, 10 Feb 2013 08:23:51 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 13/02/10 08:23:51
Modified files:
. : ChangeLog
src/devices/grops: psrm.cpp
Log message:
[grops] Make binary `%%BeginData' work; support `fontset' resource.
*src/devices/grops/psrm.cpp (resource_table): Add `fontset'.
(resource_manager::read_resource_arg): Do a case insensitive
comparison. The PostScript Reference Manual gives the following
example for a CFF resource (example 5.7):
%!PS-Adobe-3.0 Resource-FontSet
%%DocumentNeedResources: ProcSet (FontSetInit)
%%Title: (FontSet/CFFRoman27)
%%Version: 1.000
%%EndComments
%%IncludeResource: ProcSet (FontSetInit)
%%BeginResource: FontSet (CFFRoman27)
/FontSetInit /ProcSet findresource begin
%%BeginData: 622532 Binary Bytes
/CFFRoman27 622503 StartData
... 622,503 bytes of binary data ...
%%EndData
%%EndResource
%%EOF
Note the `ProcSet' and `FontSet' keywords. While the old DSC
(Document Structure Convention) documentation doesn't cover
`FontSet' at all (the DSC documentation predates the invention of
CFF), it describes only `procset' (all letters downcase), and it
also says that the DSC parser works in a case sensitive manner.
In other words, `ProcSet' is not valid according to the DSC
documentation, only `procset' is. So much about today's validity of
DSC... This patch adapts grops's code to the PostScript reality.
(resource_manager::do_begin_data): Fix typo (present since the
beginning) which prevented correct handling of binary data.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1391&r2=1.1392
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grops/psrm.cpp?cvsroot=groff&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1391
retrieving revision 1.1392
diff -u -b -r1.1391 -r1.1392
--- ChangeLog 10 Feb 2013 01:39:29 -0000 1.1391
+++ ChangeLog 10 Feb 2013 08:23:50 -0000 1.1392
@@ -1,3 +1,41 @@
+2013-02-10 Werner LEMBERG <address@hidden>
+
+ [grops] Make binary `%%BeginData' work; support `fontset' resource.
+
+ *src/devices/grops/psrm.cpp (resource_table): Add `fontset'.
+
+ (resource_manager::read_resource_arg): Do a case insensitive
+ comparison. The PostScript Reference Manual gives the following
+ example for a CFF resource (example 5.7):
+
+ %!PS-Adobe-3.0 Resource-FontSet
+ %%DocumentNeedResources: ProcSet (FontSetInit)
+ %%Title: (FontSet/CFFRoman27)
+ %%Version: 1.000
+ %%EndComments
+ %%IncludeResource: ProcSet (FontSetInit)
+ %%BeginResource: FontSet (CFFRoman27)
+ /FontSetInit /ProcSet findresource begin
+ %%BeginData: 622532 Binary Bytes
+ /CFFRoman27 622503 StartData
+ ... 622,503 bytes of binary data ...
+ %%EndData
+ %%EndResource
+ %%EOF
+
+ Note the `ProcSet' and `FontSet' keywords. While the old DSC
+ (Document Structure Convention) documentation doesn't cover
+ `FontSet' at all (the DSC documentation predates the invention of
+ CFF), it describes only `procset' (all letters downcase), and it
+ also says that the DSC parser works in a case sensitive manner.
+
+ In other words, `ProcSet' is not valid according to the DSC
+ documentation, only `procset' is. So much about today's validity of
+ DSC... This patch adapts grops's code to the PostScript reality.
+
+ (resource_manager::do_begin_data): Fix typo (present since the
+ beginning) which prevented correct handling of binary data.
+
2013-02-10 Bernd Warken <address@hidden>
* contrib/lilypond: New files for adding lilypond parts into groff
Index: src/devices/grops/psrm.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grops/psrm.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/devices/grops/psrm.cpp 5 Jan 2009 20:10:57 -0000 1.6
+++ src/devices/grops/psrm.cpp 10 Feb 2013 08:23:51 -0000 1.7
@@ -1,6 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004,
- 2009
+/* Copyright (C) 1989-1992, 2000-2004, 2009, 2013
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
@@ -89,6 +88,7 @@
const char *resource_table[] = {
"font",
+ "fontset",
"procset",
"file",
"encoding",
@@ -566,7 +566,7 @@
int ri;
for (ri = 0; ri < NRESOURCES; ri++)
if (strlen(resource_table[ri]) == size_t(*ptr - name)
- && memcmp(resource_table[ri], name, *ptr - name) == 0)
+ && strncasecmp(resource_table[ri], name, *ptr - name) == 0)
break;
if (ri >= NRESOURCES) {
error("unknown resource type");
@@ -840,7 +840,7 @@
current_lineno++;
}
if (cc != EOF)
- ungetc(c, fp);
+ ungetc(cc, fp);
}
else if (c == '\n') {
linecount++;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog src/devices/grops/psrm.cpp,
Werner LEMBERG <=