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
02c04ea2
Commit
02c04ea2
authored
Aug 19, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Aug 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv: Write-strings warnings fix.
parent
6e07f234
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
34 deletions
+62
-34
info.c
dlls/winspool.drv/info.c
+62
-34
No files found.
dlls/winspool.drv/info.c
View file @
02c04ea2
...
...
@@ -376,17 +376,26 @@ static BOOL CUPS_LoadPrinters(void)
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegCloseKey
(
hkeyPrinter
);
}
else
{
static
CHAR
data_type
[]
=
"RAW"
,
print_proc
[]
=
"WinPrint"
,
driver_name
[]
=
"PS Driver"
,
comment
[]
=
"WINEPS Printer using CUPS"
,
location
[]
=
"<physical location of printer>"
,
params
[]
=
"<parameters?>"
,
share_name
[]
=
"<share name?>"
,
sep_file
[]
=
"<sep file?>"
;
memset
(
&
pinfo2a
,
0
,
sizeof
(
pinfo2a
));
pinfo2a
.
pPrinterName
=
dests
[
i
].
name
;
pinfo2a
.
pDatatype
=
"RAW"
;
pinfo2a
.
pPrintProcessor
=
"WinPrint"
;
pinfo2a
.
pDriverName
=
"PS Driver"
;
pinfo2a
.
pComment
=
"WINEPS Printer using CUPS"
;
pinfo2a
.
pLocation
=
"<physical location of printer>"
;
pinfo2a
.
pPortName
=
port
;
pinfo2a
.
pParameters
=
"<parameters?>"
;
pinfo2a
.
pShareName
=
"<share name?>"
;
pinfo2a
.
pSepFile
=
"<sep file?>"
;
pinfo2a
.
pPrinterName
=
dests
[
i
].
name
;
pinfo2a
.
pDatatype
=
data_type
;
pinfo2a
.
pPrintProcessor
=
print_proc
;
pinfo2a
.
pDriverName
=
driver_name
;
pinfo2a
.
pComment
=
comment
;
pinfo2a
.
pLocation
=
location
;
pinfo2a
.
pPortName
=
port
;
pinfo2a
.
pParameters
=
params
;
pinfo2a
.
pShareName
=
share_name
;
pinfo2a
.
pSepFile
=
sep_file
;
if
(
!
AddPrinterA
(
NULL
,
2
,(
LPBYTE
)
&
pinfo2a
))
{
if
(
GetLastError
()
!=
ERROR_PRINTER_ALREADY_EXISTS
)
...
...
@@ -405,7 +414,7 @@ static BOOL CUPS_LoadPrinters(void)
#endif
static
BOOL
PRINTCAP_ParseEntry
(
c
har
*
pent
,
BOOL
isfirst
)
{
PRINTCAP_ParseEntry
(
c
onst
char
*
pent
,
BOOL
isfirst
)
{
PRINTER_INFO_2A
pinfo2a
;
char
*
e
,
*
s
,
*
name
,
*
prettyname
,
*
devname
;
BOOL
ret
=
FALSE
,
set_default
=
FALSE
;
...
...
@@ -490,17 +499,25 @@ PRINTCAP_ParseEntry(char *pent,BOOL isfirst) {
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegCloseKey
(
hkeyPrinter
);
}
else
{
static
CHAR
data_type
[]
=
"RAW"
,
print_proc
[]
=
"WinPrint"
,
driver_name
[]
=
"PS Driver"
,
comment
[]
=
"WINEPS Printer using LPR"
,
params
[]
=
"<parameters?>"
,
share_name
[]
=
"<share name?>"
,
sep_file
[]
=
"<sep file?>"
;
memset
(
&
pinfo2a
,
0
,
sizeof
(
pinfo2a
));
pinfo2a
.
pPrinterName
=
devname
;
pinfo2a
.
pDatatype
=
"RAW"
;
pinfo2a
.
pPrintProcessor
=
"WinPrint"
;
pinfo2a
.
pDriverName
=
"PS Driver"
;
pinfo2a
.
pComment
=
"WINEPS Printer using LPR"
;
pinfo2a
.
pLocation
=
prettyname
;
pinfo2a
.
pPortName
=
port
;
pinfo2a
.
pParameters
=
"<parameters?>"
;
pinfo2a
.
pShareName
=
"<share name?>"
;
pinfo2a
.
pSepFile
=
"<sep file?>"
;
pinfo2a
.
pPrinterName
=
devname
;
pinfo2a
.
pDatatype
=
data_type
;
pinfo2a
.
pPrintProcessor
=
print_proc
;
pinfo2a
.
pDriverName
=
driver_name
;
pinfo2a
.
pComment
=
comment
;
pinfo2a
.
pLocation
=
prettyname
;
pinfo2a
.
pPortName
=
port
;
pinfo2a
.
pParameters
=
params
;
pinfo2a
.
pShareName
=
share_name
;
pinfo2a
.
pSepFile
=
sep_file
;
if
(
!
AddPrinterA
(
NULL
,
2
,(
LPBYTE
)
&
pinfo2a
))
{
if
(
GetLastError
()
!=
ERROR_PRINTER_ALREADY_EXISTS
)
...
...
@@ -587,17 +604,25 @@ void WINSPOOL_LoadSystemPrinters(void)
DWORD
needed
,
num
,
i
;
WCHAR
PrinterName
[
256
];
BOOL
done
=
FALSE
;
static
CHAR
name
[]
=
"PS Driver"
,
driver_path
[]
=
"wineps16"
,
data_file
[]
=
"<datafile?>"
,
config_file
[]
=
"wineps16"
,
help_file
[]
=
"<helpfile?>"
,
dep_file
[]
=
"<dependend files?>"
,
monitor_name
[]
=
"<monitor name?>"
,
default_data_type
[]
=
"RAW"
;
di3a
.
cVersion
=
(
GetVersion
()
&
0x80000000
)
?
0
:
3
;
/* FIXME: add 1, 2 */
di3a
.
pName
=
"PS Driver"
;
di3a
.
pEnvironment
=
NULL
;
/* NULL means auto */
di3a
.
pDriverPath
=
"wineps16"
;
di3a
.
pDataFile
=
"<datafile?>"
;
di3a
.
pConfigFile
=
"wineps16"
;
di3a
.
pHelpFile
=
"<helpfile?>"
;
di3a
.
pDependentFiles
=
"<dependend files?>"
;
di3a
.
pMonitorName
=
"<monitor name?>"
;
di3a
.
pDefaultDataType
=
"RAW"
;
di3a
.
pName
=
name
;
di3a
.
pEnvironment
=
NULL
;
/* NULL means auto */
di3a
.
pDriverPath
=
driver_path
;
di3a
.
pDataFile
=
data_file
;
di3a
.
pConfigFile
=
config_file
;
di3a
.
pHelpFile
=
help_file
;
di3a
.
pDependentFiles
=
dep_file
;
di3a
.
pMonitorName
=
monitor_name
;
di3a
.
pDefaultDataType
=
default_data_type
;
if
(
!
AddPrinterDriverA
(
NULL
,
3
,(
LPBYTE
)
&
di3a
))
{
ERR
(
"Failed adding PS Driver (%ld)
\n
"
,
GetLastError
());
...
...
@@ -3936,6 +3961,8 @@ BOOL WINAPI AddPrinterDriverA(LPSTR pName, DWORD level, LPBYTE pDriverInfo)
{
DRIVER_INFO_3A
di3
;
HKEY
hkeyDrivers
,
hkeyName
;
static
CHAR
empty
[]
=
""
,
nullnull
[]
=
"
\0
"
;
TRACE
(
"(%s,%ld,%p)
\n
"
,
debugstr_a
(
pName
),
level
,
pDriverInfo
);
...
...
@@ -3966,10 +3993,11 @@ BOOL WINAPI AddPrinterDriverA(LPSTR pName, DWORD level, LPBYTE pDriverInfo)
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
di3
.
pDefaultDataType
)
di3
.
pDefaultDataType
=
""
;
if
(
!
di3
.
pDependentFiles
)
di3
.
pDependentFiles
=
"
\0
"
;
if
(
!
di3
.
pHelpFile
)
di3
.
pHelpFile
=
""
;
if
(
!
di3
.
pMonitorName
)
di3
.
pMonitorName
=
""
;
if
(
!
di3
.
pDefaultDataType
)
di3
.
pDefaultDataType
=
empty
;
if
(
!
di3
.
pDependentFiles
)
di3
.
pDependentFiles
=
nullnull
;
if
(
!
di3
.
pHelpFile
)
di3
.
pHelpFile
=
empty
;
if
(
!
di3
.
pMonitorName
)
di3
.
pMonitorName
=
empty
;
hkeyDrivers
=
WINSPOOL_OpenDriverReg
(
di3
.
pEnvironment
,
FALSE
);
...
...
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