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
adcf7b45
Commit
adcf7b45
authored
May 15, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the correct display for cached metrics file name.
Store metrics in specified config dir.
parent
8e3e6b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
xfont.c
graphics/x11drv/xfont.c
+12
-16
No files found.
graphics/x11drv/xfont.c
View file @
adcf7b45
...
...
@@ -34,8 +34,9 @@
#include "ldt.h"
#include "tweak.h"
#include "x11font.h"
#include "server.h"
DEFAULT_DEBUG_CHANNEL
(
font
)
DEFAULT_DEBUG_CHANNEL
(
font
)
;
#define X_PFONT_MAGIC (0xFADE0000)
#define X_FMC_MAGIC (0x0000CAFE)
...
...
@@ -72,7 +73,6 @@ TC_CP_STROKE | TC_CR_ANY |
/* X11R6 adds TC_SF_X_YINDEP, maybe more... */
static
const
char
*
INIWinePrefix
=
"/.wine"
;
static
const
char
*
INIFontMetrics
=
"/cachedmetrics."
;
static
const
char
*
INIFontSection
=
"fonts"
;
static
const
char
*
INIAliasSection
=
"Alias"
;
...
...
@@ -1684,22 +1684,18 @@ static void XFONT_LoadIgnores(void)
*/
static
char
*
XFONT_UserMetricsCache
(
char
*
buffer
,
int
*
buf_size
)
{
char
*
pchDisplay
,
*
home
;
const
char
*
confdir
=
get_config_dir
();
const
char
*
display_name
=
Options
.
display
;
int
len
=
strlen
(
confdir
)
+
strlen
(
INIFontMetrics
)
+
strlen
(
display_name
)
+
2
;
pchDisplay
=
getenv
(
"DISPLAY"
);
if
(
!
pchDisplay
)
pchDisplay
=
"0"
;
if
((
home
=
getenv
(
"HOME"
))
!=
NULL
)
if
((
len
>
*
buf_size
)
&&
!
(
buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
,
*
buf_size
=
len
)))
{
int
i
=
strlen
(
home
)
+
strlen
(
INIWinePrefix
)
+
strlen
(
INIFontMetrics
)
+
strlen
(
pchDisplay
)
+
2
;
if
(
i
>
*
buf_size
)
buffer
=
(
char
*
)
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
,
*
buf_size
=
i
);
strcpy
(
buffer
,
home
);
strcat
(
buffer
,
INIWinePrefix
);
strcat
(
buffer
,
INIFontMetrics
);
strcat
(
buffer
,
pchDisplay
);
}
else
buffer
[
0
]
=
'\0'
;
ERR
(
"out of memory
\n
"
);
ExitProcess
(
1
);
}
sprintf
(
buffer
,
"%s/%s%s"
,
confdir
,
INIFontMetrics
,
display_name
);
return
buffer
;
}
...
...
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