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
b2accddf
Commit
b2accddf
authored
Apr 16, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Simplify cups function loading.
parent
7af7c786
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
info.c
dlls/winspool.drv/info.c
+14
-13
No files found.
dlls/winspool.drv/info.c
View file @
b2accddf
...
...
@@ -469,12 +469,19 @@ static BOOL add_printer_driver(WCHAR *name)
}
#ifdef SONAME_LIBCUPS
static
typeof
(
cupsFreeDests
)
*
pcupsFreeDests
;
static
typeof
(
cupsGetDests
)
*
pcupsGetDests
;
static
typeof
(
cupsGetPPD
)
*
pcupsGetPPD
;
static
typeof
(
cupsPrintFile
)
*
pcupsPrintFile
;
static
void
*
cupshandle
;
#define CUPS_FUNCS \
DO_FUNC(cupsFreeDests); \
DO_FUNC(cupsGetDests); \
DO_FUNC(cupsGetPPD); \
DO_FUNC(cupsPrintFile);
#define DO_FUNC(f) static typeof(f) *p##f
CUPS_FUNCS
;
#undef DO_FUNC
static
BOOL
CUPS_LoadPrinters
(
void
)
{
int
i
,
nrofdests
;
...
...
@@ -493,15 +500,9 @@ static BOOL CUPS_LoadPrinters(void)
}
TRACE
(
"%p: %s loaded
\n
"
,
cupshandle
,
SONAME_LIBCUPS
);
#define DYNCUPS(x) \
p##x = wine_dlsym(cupshandle, #x, NULL,0); \
if (!p##x) return FALSE;
DYNCUPS
(
cupsFreeDests
);
DYNCUPS
(
cupsGetPPD
);
DYNCUPS
(
cupsGetDests
);
DYNCUPS
(
cupsPrintFile
);
#undef DYNCUPS
#define DO_FUNC(x) p##x = wine_dlsym( cupshandle, #x, NULL, 0 ); if (!p##x) return FALSE;
CUPS_FUNCS
;
#undef DO_FUNC
if
(
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
PrintersW
,
&
hkeyPrinters
)
!=
ERROR_SUCCESS
)
{
...
...
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