Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fontconfig
fontconfig
Commits
3cf9f5ce
Commit
3cf9f5ce
authored
Jan 27, 2006
by
Patrick Lam
Browse files
Add a couple of missing normalizations to make fc-cache work right; only
scan subdirectories once.
parent
4073203d
Changes
3
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
3cf9f5ce
2006-01-26 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcDirCacheValid, FcDirCacheHasCurrentArch):
* src/fccfg.c (FcConfigNormalizeFontDir):
Add a couple of missing normalizations to make fc-cache work
right; only scan subdirectories once.
2006-01-26 Mike Fabian <mfabian@suse.de>
2006-01-26 Mike Fabian <mfabian@suse.de>
reviewed by: plam
reviewed by: plam
...
...
src/fccache.c
View file @
3cf9f5ce
...
@@ -609,6 +609,10 @@ FcDirCacheValid (const FcChar8 *dir)
...
@@ -609,6 +609,10 @@ FcDirCacheValid (const FcChar8 *dir)
struct
stat
file_stat
,
dir_stat
;
struct
stat
file_stat
,
dir_stat
;
int
fd
;
int
fd
;
dir
=
FcConfigNormalizeFontDir
(
FcConfigGetCurrent
(),
dir
);
if
(
!
dir
)
return
FcFalse
;
if
(
stat
((
char
*
)
dir
,
&
dir_stat
)
<
0
)
if
(
stat
((
char
*
)
dir
,
&
dir_stat
)
<
0
)
return
FcFalse
;
return
FcFalse
;
...
@@ -644,6 +648,10 @@ FcDirCacheHasCurrentArch (const FcChar8 *dir)
...
@@ -644,6 +648,10 @@ FcDirCacheHasCurrentArch (const FcChar8 *dir)
off_t
current_arch_start
;
off_t
current_arch_start
;
char
*
current_arch_machine_name
;
char
*
current_arch_machine_name
;
dir
=
FcConfigNormalizeFontDir
(
FcConfigGetCurrent
(),
dir
);
if
(
!
dir
)
return
FcFalse
;
fd
=
FcDirCacheOpen
(
dir
);
fd
=
FcDirCacheOpen
(
dir
);
if
(
fd
<
0
)
if
(
fd
<
0
)
goto
bail
;
goto
bail
;
...
...
src/fccfg.c
View file @
3cf9f5ce
...
@@ -432,7 +432,7 @@ FcConfigNormalizeFontDir (FcConfig *config,
...
@@ -432,7 +432,7 @@ FcConfigNormalizeFontDir (FcConfig *config,
/* If this is a bottleneck, we can cache the fontDir inodes. */
/* If this is a bottleneck, we can cache the fontDir inodes. */
ino_t
di
;
ino_t
di
;
dev_t
dd
;
dev_t
dd
;
int
n
;
int
n
,
n0
;
struct
stat
s
;
struct
stat
s
;
if
(
stat
((
char
*
)
d
,
&
s
)
==
-
1
)
if
(
stat
((
char
*
)
d
,
&
s
)
==
-
1
)
...
@@ -448,7 +448,7 @@ FcConfigNormalizeFontDir (FcConfig *config,
...
@@ -448,7 +448,7 @@ FcConfigNormalizeFontDir (FcConfig *config,
}
}
/* Ok, we didn't find it in fontDirs; let's add subdirs.... */
/* Ok, we didn't find it in fontDirs; let's add subdirs.... */
for
(
n
=
0
;
n
<
config
->
fontDirs
->
num
;
n
++
)
for
(
n
=
0
,
n
0
=
config
->
fontDirs
->
num
;
n
<
n0
;
n
++
)
FcConfigAddFontDirSubdirs
(
config
,
config
->
fontDirs
->
strs
[
n
]);
FcConfigAddFontDirSubdirs
(
config
,
config
->
fontDirs
->
strs
[
n
]);
/* ... and try again. */
/* ... and try again. */
...
...
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