AFM-Handling problem
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Mon Feb 12 07:39:39 CST 2001
On Mon, Feb 12, 2001 at 01:56:09PM +0100, Joerg Mayer wrote:
> Moin,
>
> Marcus last patch to add default paths for afm files triggered a bug:
> Inside my font dirs, there is a directory that contains gzipped afm
> files. After I unzipped these files, wine started up again. Not nice.
How about something like this?
[We should also make the afm parsing robust against non-afm files].
Huw.
--
Dr. Huw D M Davies | Clarendon Laboratory
h.davies1 at physics.ox.ac.uk | Parks Road
Tel: +44 1865 272390 | Oxford OX1 3PU
Fax: +44 1865 272400 | UK
-------------- next part --------------
Index: dlls/wineps/afm.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/afm.c,v
retrieving revision 1.5
diff -u -r1.5 afm.c
--- dlls/wineps/afm.c 2001/02/12 01:25:46 1.5
+++ dlls/wineps/afm.c 2001/02/12 13:23:46
@@ -430,7 +430,8 @@
if (dir) {
struct dirent *dent;
while ((dent=readdir(dir))) {
- if (strstr(dent->d_name,".afm")) {
+ int len = strlen(dent->d_name);
+ if (len > 4 && !strcmp(dent->d_name + len - 4 ,".afm")) {
char *afmfn;
afmfn=(char*)HeapAlloc(GetProcessHeap(),0,strlen(afmdir)+strlen(dent->d_name)+1);
More information about the wine-devel
mailing list