Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
ff81a526
Commit
ff81a526
authored
Jul 04, 2016
by
Kristian Høgsberg
Committed by
Mike Gabriel
Jul 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make WriteToClient take a const void * like any decent IO write function.
Enough with the casting. Doesn't break API or even ABI, but does make a lot of silly casts superfluos.
parent
06a97857
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
os.h
nx-X11/programs/Xserver/include/os.h
+2
-2
io.c
nx-X11/programs/Xserver/os/io.c
+5
-3
osdep.h
nx-X11/programs/Xserver/os/osdep.h
+1
-1
No files found.
nx-X11/programs/Xserver/include/os.h
View file @
ff81a526
...
...
@@ -124,7 +124,7 @@ extern void FlushIfCriticalOutputPending(void);
extern
void
SetCriticalOutputPending
(
void
);
extern
int
WriteToClient
(
ClientPtr
/*who*/
,
int
/*count*/
,
c
har
*
/*
buf*/
);
extern
int
WriteToClient
(
ClientPtr
/*who*/
,
int
/*count*/
,
c
onst
void
*
/*__
buf*/
);
extern
void
ResetOsBuffers
(
void
);
...
...
@@ -444,7 +444,7 @@ typedef struct {
extern
CallbackListPtr
ReplyCallback
;
typedef
struct
{
ClientPtr
client
;
void
*
replyData
;
const
void
*
replyData
;
unsigned
long
dataLenBytes
;
unsigned
long
bytesRemaining
;
Bool
startOfReply
;
...
...
nx-X11/programs/Xserver/os/io.c
View file @
ff81a526
...
...
@@ -857,11 +857,12 @@ SetCriticalOutputPending(void)
*****************/
int
WriteToClient
(
ClientPtr
who
,
int
count
,
c
har
*
buf
)
WriteToClient
(
ClientPtr
who
,
int
count
,
c
onst
void
*
__
buf
)
{
OsCommPtr
oc
;
ConnectionOutputPtr
oco
;
int
padBytes
;
const
char
*
buf
=
__buf
;
#ifdef DEBUG_COMMUNICATION
Bool
multicount
=
FALSE
;
#endif
...
...
@@ -999,13 +1000,14 @@ WriteToClient (ClientPtr who, int count, char *buf)
**********************/
int
FlushClient
(
ClientPtr
who
,
OsCommPtr
oc
,
c
har
*
extraBuf
,
int
extraCount
)
FlushClient
(
ClientPtr
who
,
OsCommPtr
oc
,
c
onst
void
*
__
extraBuf
,
int
extraCount
)
{
ConnectionOutputPtr
oco
=
oc
->
output
;
int
connection
=
oc
->
fd
;
XtransConnInfo
trans_conn
=
oc
->
trans_conn
;
struct
iovec
iov
[
3
];
static
char
padBuffer
[
3
];
const
char
*
extraBuf
=
__extraBuf
;
long
written
;
long
padsize
;
long
notWritten
;
...
...
@@ -1051,7 +1053,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
}
InsertIOV
((
char
*
)
oco
->
buf
,
oco
->
count
)
InsertIOV
(
extraBuf
,
extraCount
)
InsertIOV
(
(
char
*
)
extraBuf
,
extraCount
)
InsertIOV
(
padBuffer
,
padsize
)
errno
=
0
;
...
...
nx-X11/programs/Xserver/os/osdep.h
View file @
ff81a526
...
...
@@ -187,7 +187,7 @@ typedef struct _osComm {
extern
int
FlushClient
(
ClientPtr
/*who*/
,
OsCommPtr
/*oc*/
,
c
har
*
/*
extraBuf*/
,
c
onst
void
*
/*__
extraBuf*/
,
int
/*extraCount*/
);
...
...
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