aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/fc
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-05 10:23:14 +0100
committermarha <marha@users.sourceforge.net>2012-03-05 10:23:14 +0100
commit8db4c7567d495ef6f6162406394ac192e6c2cfe7 (patch)
tree9d8233b2f54ad198da3354aa9dbd8d0082156a9c /libXfont/src/fc
parentc14f2432d6bfb3de6c6289efd0471f038a289327 (diff)
parent50ace52bb8308fd62b8bad9ae912dc18c4ae32ff (diff)
downloadvcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.tar.gz
vcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.tar.bz2
vcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXfont/src/fc')
-rw-r--r--libXfont/src/fc/Makefile.in1
-rw-r--r--libXfont/src/fc/fsio.c26
-rw-r--r--libXfont/src/fc/fsio.h8
3 files changed, 18 insertions, 17 deletions
diff --git a/libXfont/src/fc/Makefile.in b/libXfont/src/fc/Makefile.in
index faf33b715..779f06f11 100644
--- a/libXfont/src/fc/Makefile.in
+++ b/libXfont/src/fc/Makefile.in
@@ -95,6 +95,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
diff --git a/libXfont/src/fc/fsio.c b/libXfont/src/fc/fsio.c
index 6d558091e..1c6a8cb6c 100644
--- a/libXfont/src/fc/fsio.c
+++ b/libXfont/src/fc/fsio.c
@@ -74,7 +74,7 @@ _fs_resize (FSBufPtr buf, long size);
static void
_fs_downsize (FSBufPtr buf, long size);
-
+
int
_fs_poll_connect (XtransConnInfo trans_conn, int timeout)
{
@@ -151,7 +151,7 @@ _fs_fill (FSFpePtr conn)
long avail;
long bytes_read;
Bool waited = FALSE;
-
+
if (_fs_flush (conn) < 0)
return FSIO_ERROR;
/*
@@ -201,7 +201,7 @@ int
_fs_start_read (FSFpePtr conn, long size, char **buf)
{
int ret;
-
+
conn->inNeed = size;
if (fs_inqueued(conn) < size)
{
@@ -247,7 +247,7 @@ _fs_flush (FSFpePtr conn)
{
long bytes_written;
long remain;
-
+
/* XXX - hack. The right fix is to remember that the font server
has gone away when we first discovered it. */
if (conn->fs_fd < 0)
@@ -297,7 +297,7 @@ _fs_resize (FSBufPtr buf, long size)
{
if (buf->remove != buf->insert)
{
- memmove (buf->buf,
+ memmove (buf->buf,
buf->buf + buf->remove,
buf->insert - buf->remove);
}
@@ -347,7 +347,7 @@ _fs_io_init (FSFpePtr conn)
if (!conn->outBuf.buf)
return FALSE;
conn->outBuf.size = FS_BUF_INC;
-
+
conn->inBuf.insert = conn->inBuf.remove = 0;
conn->inBuf.buf = malloc (FS_BUF_INC);
if (!conn->inBuf.buf)
@@ -357,7 +357,7 @@ _fs_io_init (FSFpePtr conn)
return FALSE;
}
conn->inBuf.size = FS_BUF_INC;
-
+
return TRUE;
}
@@ -371,7 +371,7 @@ _fs_io_fini (FSFpePtr conn)
}
static int
-_fs_do_write(FSFpePtr conn, char *data, long len, long size)
+_fs_do_write(FSFpePtr conn, const char *data, long len, long size)
{
if (size == 0) {
#ifdef DEBUG
@@ -382,8 +382,8 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size)
if (conn->fs_fd == -1)
return FSIO_ERROR;
-
- while (conn->outBuf.insert + size > conn->outBuf.size)
+
+ while (conn->outBuf.insert + size > conn->outBuf.size)
{
if (_fs_flush (conn) < 0)
return FSIO_ERROR;
@@ -405,16 +405,16 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size)
* Write the indicated bytes
*/
int
-_fs_write (FSFpePtr conn, char *data, long len)
+_fs_write (FSFpePtr conn, const char *data, long len)
{
return _fs_do_write (conn, data, len, len);
}
-
+
/*
* Write the indicated bytes adding any appropriate pad
*/
int
-_fs_write_pad(FSFpePtr conn, char *data, long len)
+_fs_write_pad(FSFpePtr conn, const char *data, long len)
{
return _fs_do_write (conn, data, len, len + padlength[len & 3]);
}
diff --git a/libXfont/src/fc/fsio.h b/libXfont/src/fc/fsio.h
index bd0c621e8..2bb8e0b73 100644
--- a/libXfont/src/fc/fsio.h
+++ b/libXfont/src/fc/fsio.h
@@ -110,9 +110,9 @@ typedef struct _fs_fpe_data {
CARD32 brokenWriteTime; /* time to retry broken write */
CARD32 blockedConnectTime; /* time to abort blocked connect */
CARD32 brokenConnectionTime; /* time to retry broken connection */
-
+
FSBlockDataPtr blockedRequests;
-
+
struct _XtransConnInfo *trans_conn; /* transport connection object */
} FSFpeRec;
@@ -129,8 +129,8 @@ typedef struct _fs_fpe_data {
#define FSIO_ERROR -1
extern Bool _fs_reopen_server ( FSFpePtr conn );
-extern int _fs_write ( FSFpePtr conn, char *data, long size );
-extern int _fs_write_pad ( FSFpePtr conn, char *data, long len );
+extern int _fs_write ( FSFpePtr conn, const char *data, long size );
+extern int _fs_write_pad ( FSFpePtr conn, const char *data, long len );
extern int _fs_wait_for_readable ( FSFpePtr conn, int ms );
extern long _fs_pad_length (long len);