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
4c7f394b
Commit
4c7f394b
authored
Sep 12, 2011
by
Andrew Talbot
Committed by
Alexandre Julliard
Sep 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv: Const-correctness fix.
parent
96567b18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
info.c
dlls/winspool.drv/info.c
+13
-8
No files found.
dlls/winspool.drv/info.c
View file @
4c7f394b
...
@@ -516,6 +516,8 @@ static BOOL CUPS_LoadPrinters(void)
...
@@ -516,6 +516,8 @@ static BOOL CUPS_LoadPrinters(void)
static
BOOL
static
BOOL
PRINTCAP_ParseEntry
(
const
char
*
pent
,
BOOL
isfirst
)
{
PRINTCAP_ParseEntry
(
const
char
*
pent
,
BOOL
isfirst
)
{
PRINTER_INFO_2A
pinfo2a
;
PRINTER_INFO_2A
pinfo2a
;
const
char
*
r
;
size_t
name_len
;
char
*
e
,
*
s
,
*
name
,
*
prettyname
,
*
devname
;
char
*
e
,
*
s
,
*
name
,
*
prettyname
,
*
devname
;
BOOL
ret
=
FALSE
,
set_default
=
FALSE
;
BOOL
ret
=
FALSE
,
set_default
=
FALSE
;
char
*
port
=
NULL
,
*
env_default
;
char
*
port
=
NULL
,
*
env_default
;
...
@@ -523,14 +525,17 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
...
@@ -523,14 +525,17 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
WCHAR
devnameW
[
MAX_PATH
];
WCHAR
devnameW
[
MAX_PATH
];
while
(
isspace
(
*
pent
))
pent
++
;
while
(
isspace
(
*
pent
))
pent
++
;
s
=
strchr
(
pent
,
':'
);
r
=
strchr
(
pent
,
':'
);
if
(
s
)
*
s
=
'\0'
;
if
(
r
)
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
pent
)
+
1
);
name_len
=
r
-
pent
;
strcpy
(
name
,
pent
);
else
if
(
s
)
{
name_len
=
strlen
(
pent
);
*
s
=
':'
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
name_len
+
1
);
pent
=
s
;
memcpy
(
name
,
pent
,
name_len
);
}
else
name
[
name_len
]
=
'\0'
;
if
(
r
)
pent
=
r
;
else
pent
=
""
;
pent
=
""
;
TRACE
(
"name=%s entry=%s
\n
"
,
name
,
pent
);
TRACE
(
"name=%s entry=%s
\n
"
,
name
,
pent
);
...
...
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