Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
988d1c23
Commit
988d1c23
authored
Feb 13, 2001
by
Peter H. Ganten
Committed by
Alexandre Julliard
Feb 13, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- only parse AFM-files, which start with "BeginFontMetrics"
- use fgetc instead of fgets to cope with AFM-Files with Macintosh-Style line-breaks ('\r') in the parser.
parent
38bed060
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
afm.c
dlls/wineps/afm.c
+22
-1
No files found.
dlls/wineps/afm.c
View file @
988d1c23
...
...
@@ -130,6 +130,7 @@ static AFM *PSDRV_AFMParse(char const *file)
char
*
value
;
AFM
*
afm
;
char
*
cp
;
int
afmfile
=
0
;
TRACE
(
"parsing '%s'
\n
"
,
file
);
...
...
@@ -144,12 +145,32 @@ static AFM *PSDRV_AFMParse(char const *file)
return
NULL
;
}
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
{
cp
=
buf
;
while
(
(
*
cp
=
fgetc
(
fp
)
)
!=
EOF
)
{
if
(
*
cp
==
'\r'
||
*
cp
==
'\n'
||
cp
-
buf
==
sizeof
(
buf
)
-
1
)
{
if
(
cp
==
buf
)
continue
;
*
(
cp
+
1
)
=
'\0'
;
}
else
{
cp
++
;
continue
;
}
cp
=
buf
+
strlen
(
buf
);
do
{
*
cp
=
'\0'
;
cp
--
;
}
while
(
cp
>
buf
&&
isspace
(
*
cp
));
cp
=
buf
;
if
(
afmfile
==
0
&&
strncmp
(
buf
,
"StartFontMetrics"
,
16
)
)
{
HeapFree
(
PSDRV_Heap
,
0
,
afm
);
return
NULL
;
}
else
{
afmfile
=
1
;
}
value
=
strchr
(
buf
,
' '
);
if
(
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment