aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/fc
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 14:29:10 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 14:29:10 +0000
commitddfb922180a6a847d52609592a2bdb37179ca439 (patch)
tree7cc662bfb9ffb45c4c4452ea373e3c1a843b395a /libXfont/src/fc
parent02934f83dd4f5848083e2e5cdbc6ef7f60361f06 (diff)
parent2fb179f86b0f9ecb7876759b87f9c64634a3f114 (diff)
downloadvcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.tar.gz
vcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.tar.bz2
vcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.zip
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Gives currently link errors. xorg-server needs to be upgraded to.
Diffstat (limited to 'libXfont/src/fc')
-rw-r--r--libXfont/src/fc/Makefile.in46
-rw-r--r--libXfont/src/fc/fsconvert.c21
-rw-r--r--libXfont/src/fc/fserve.c122
-rw-r--r--libXfont/src/fc/fsio.c21
-rw-r--r--libXfont/src/fc/fslibos.h2
5 files changed, 72 insertions, 140 deletions
diff --git a/libXfont/src/fc/Makefile.in b/libXfont/src/fc/Makefile.in
index 77afa8db3..a94136b14 100644
--- a/libXfont/src/fc/Makefile.in
+++ b/libXfont/src/fc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -46,7 +46,7 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
libfc_la_LIBADD =
am_libfc_la_OBJECTS = fsconvert.lo fserve.lo fsio.lo fstrans.lo
libfc_la_OBJECTS = $(am_libfc_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/include/X11/fonts@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include/X11/fonts
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -77,22 +77,18 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENCODINGSDIR = @ENCODINGSDIR@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
FREETYPE_LIBS = @FREETYPE_LIBS@
FREETYPE_REQUIRES = @FREETYPE_REQUIRES@
@@ -102,17 +98,24 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MATH_LIBS = @MATH_LIBS@
MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OS_CFLAGS = @OS_CFLAGS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -122,6 +125,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -135,8 +139,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -169,6 +172,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -181,6 +185,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
@@ -206,8 +211,8 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -286,8 +291,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -299,8 +304,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -310,13 +315,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
diff --git a/libXfont/src/fc/fsconvert.c b/libXfont/src/fc/fsconvert.c
index 8cdda2a79..724bc5fb4 100644
--- a/libXfont/src/fc/fsconvert.c
+++ b/libXfont/src/fc/fsconvert.c
@@ -108,8 +108,7 @@ _fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd,
|| nprops > SIZE_MAX/(sizeof(FontPropRec) + sizeof(char)))
return -1;
- dprop = (FontPropPtr) xalloc(sizeof(FontPropRec) * nprops +
- sizeof (char) * nprops);
+ dprop = malloc(sizeof(FontPropRec) * nprops + sizeof (char) * nprops);
if (!dprop)
return -1;
@@ -132,7 +131,7 @@ _fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd,
local_off.value.length, 1);
if (dprop->value == BAD_RESOURCE)
{
- xfree (pfi->props);
+ free (pfi->props);
pfi->nprops = 0;
pfi->props = 0;
pfi->isStringProp = 0;
@@ -150,7 +149,7 @@ _fs_free_props (FontInfoPtr pfi)
{
if (pfi->props)
{
- xfree (pfi->props);
+ free (pfi->props);
pfi->nprops = 0;
pfi->props = 0;
}
@@ -616,12 +615,12 @@ _fs_unload_font(FontPtr pfont)
* fsdata points at FSFontRec, FSFontDataRec and name
*/
if (encoding)
- xfree(encoding);
+ free(encoding);
while ((glyphs = fsdata->glyphs))
{
fsdata->glyphs = glyphs->next;
- xfree (glyphs);
+ free (glyphs);
}
/* XXX we may get called after the resource DB has been cleaned out */
@@ -630,7 +629,7 @@ _fs_unload_font(FontPtr pfont)
_fs_free_props (&pfont->info);
- xfree(fsdata);
+ free(fsdata);
DestroyFontRec(pfont);
}
@@ -650,9 +649,7 @@ fs_create_font (FontPathElementPtr fpe,
pfont = CreateFontRec ();
if (!pfont)
return 0;
- fsfont = (FSFontPtr) xalloc (sizeof (FSFontRec) +
- sizeof (FSFontDataRec) +
- namelen + 1);
+ fsfont = malloc (sizeof (FSFontRec) + sizeof (FSFontDataRec) + namelen + 1);
if (!fsfont)
{
DestroyFontRec (pfont);
@@ -703,7 +700,7 @@ fs_create_font (FontPathElementPtr fpe,
/* save the ID */
if (!StoreFontClientFont(pfont, fsd->fontid))
{
- xfree (fsfont);
+ free (fsfont);
DestroyFontRec (pfont);
return 0;
}
@@ -717,7 +714,7 @@ fs_alloc_glyphs (FontPtr pFont, int size)
FSGlyphPtr glyphs;
FSFontPtr fsfont = (FSFontPtr) pFont->fontPrivate;
- glyphs = xalloc (sizeof (FSGlyphRec) + size);
+ glyphs = malloc (sizeof (FSGlyphRec) + size);
glyphs->next = fsfont->glyphs;
fsfont->glyphs = glyphs;
return (pointer) (glyphs + 1);
diff --git a/libXfont/src/fc/fserve.c b/libXfont/src/fc/fserve.c
index 07ada34b6..2ba08e8b0 100644
--- a/libXfont/src/fc/fserve.c
+++ b/libXfont/src/fc/fserve.c
@@ -217,14 +217,6 @@ _fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep)
static Bool
fs_name_check(char *name)
{
-#ifdef __UNIXOS2__
- /* OS/2 uses D:/usr/X11R6/.... as fontfile pathnames, so check that
- * there is not only a protocol/ prefix, but also that the first chars
- * are not a drive letter
- */
- if (name && isalpha(*name) && name[1] == ':')
- return FALSE;
-#endif
/* Just make sure there is a protocol/ prefix */
return (name && *name != '/' && strchr(name, '/'));
}
@@ -266,7 +258,7 @@ fs_close_conn(FSFpePtr conn)
for (client = conn->clients; client; client = nclient)
{
nclient = client->next;
- xfree (client);
+ free (client);
}
conn->clients = NULL;
}
@@ -411,7 +403,7 @@ fs_new_block_rec(FontPathElementPtr fpe, pointer client, int type)
size = 0;
break;
}
- blockrec = (FSBlockDataPtr) xalloc(sizeof(FSBlockDataRec) + size);
+ blockrec = malloc(sizeof(FSBlockDataRec) + size);
if (!blockrec)
return (FSBlockDataPtr) 0;
blockrec->data = (pointer) (blockrec + 1);
@@ -462,9 +454,9 @@ _fs_remove_block_rec(FSFpePtr conn, FSBlockDataPtr blockrec)
{
FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr)blockrec->data;
if (bglyph->num_expected_ranges)
- xfree(bglyph->expected_ranges);
+ free(bglyph->expected_ranges);
}
- xfree(blockrec);
+ free(blockrec);
_fs_set_pending_reply (conn);
}
@@ -477,7 +469,7 @@ _fs_signal_clients_depending(FSClientsDependingPtr *clients_depending)
{
*clients_depending = p->next;
ClientSignal(p->client);
- xfree(p);
+ free(p);
}
}
@@ -493,7 +485,7 @@ _fs_add_clients_depending(FSClientsDependingPtr *clients_depending, pointer clie
return Suspended;
}
- new = (FSClientsDependingPtr)xalloc (sizeof (FSClientsDependingRec));
+ new = malloc (sizeof (FSClientsDependingRec));
if (!new)
return BadAlloc;
@@ -981,7 +973,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
numInfos *= 2;
haveInk = TRUE;
}
- ci = pCI = (CharInfoPtr) xalloc(sizeof(CharInfoRec) * numInfos);
+ ci = pCI = malloc(sizeof(CharInfoRec) * numInfos);
if (!pCI)
{
@@ -1626,6 +1618,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
buf[0] = (unsigned char) namelen;
memcpy(&buf[1], name, namelen);
openreq.reqType = FS_OpenBitmapFont;
+ openreq.pad = 0;
openreq.fid = fsd->fontid;
openreq.format_hint = fsd->format;
openreq.format_mask = fsd->fmask;
@@ -1638,6 +1631,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
blockrec->sequenceNumber = conn->current_seq;
inforeq.reqType = FS_QueryXInfo;
+ inforeq.pad = 0;
inforeq.id = fsd->fontid;
inforeq.length = SIZEOF(fsQueryXInfoReq) >> 2;
@@ -1764,6 +1758,7 @@ fs_send_close_font(FontPathElementPtr fpe, Font id)
return Successful;
/* tell the font server to close the font */
req.reqType = FS_CloseFont;
+ req.pad = 0;
req.length = SIZEOF(fsCloseReq) >> 2;
req.id = id;
_fs_add_req_log(conn, FS_CloseFont);
@@ -2156,7 +2151,7 @@ _fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag,
if (nranges)
{
_fs_clean_aborted_loadglyphs(pfont, nranges, ranges);
- xfree(ranges);
+ free(ranges);
}
return _fs_add_clients_depending(clients_depending, client);
}
@@ -2184,7 +2179,7 @@ _fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag,
/* Since we're not ready to send the load_glyphs request yet,
clean up the damage caused by the fs_build_range() call. */
_fs_clean_aborted_loadglyphs(pfont, nranges, ranges);
- xfree(ranges);
+ free(ranges);
/* Now try to reopen the font. */
return fs_send_open_font(client, pfont->fpe,
@@ -2296,6 +2291,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
/* send the request */
req.reqType = FS_ListFonts;
+ req.pad = 0;
req.maxNames = maxnames;
req.nbytes = patlen;
req.length = (SIZEOF(fsListFontsReq) + patlen + 3) >> 2;
@@ -2466,6 +2462,7 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
/* send the request */
req.reqType = FS_ListFontsWithXInfo;
+ req.pad = 0;
req.maxNames = maxnames;
req.nbytes = len;
req.length = (SIZEOF(fsListFontsWithXInfoReq) + len + 3) >> 2;
@@ -2566,12 +2563,13 @@ fs_client_died(pointer client, FontPathElementPtr fpe)
{
if (cur->client == client) {
freeac.reqType = FS_FreeAC;
+ freeac.pad = 0;
freeac.id = cur->acid;
freeac.length = sizeof (fsFreeACReq) >> 2;
_fs_add_req_log(conn, FS_FreeAC);
_fs_write (conn, (char *) &freeac, sizeof (fsFreeACReq));
*prev = cur->next;
- xfree (cur);
+ free (cur);
break;
}
}
@@ -2625,7 +2623,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync)
}
if (!cur)
{
- cur = (FSClientPtr) xalloc (sizeof (FSClientRec));
+ cur = malloc (sizeof (FSClientRec));
if (!cur)
return;
cur->client = client;
@@ -2640,6 +2638,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync)
{
fsFreeACReq freeac;
freeac.reqType = FS_FreeAC;
+ freeac.pad = 0;
freeac.id = cur->acid;
freeac.length = sizeof (fsFreeACReq) >> 2;
_fs_add_req_log(conn, FS_FreeAC);
@@ -2668,6 +2667,7 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync)
if (conn->curacid != cur->acid)
{
setac.reqType = FS_SetAuthorization;
+ setac.pad = 0;
setac.length = sizeof (fsSetAuthorizationReq) >> 2;
setac.id = cur->acid;
_fs_add_req_log(conn, FS_SetAuthorization);
@@ -2810,15 +2810,14 @@ _fs_recv_conn_setup (FSFpePtr conn)
*/
if (conn->alts)
{
- xfree (conn->alts);
+ free (conn->alts);
conn->alts = 0;
conn->numAlts = 0;
}
if (setup->num_alternates)
{
- alts = (FSFpeAltPtr) xalloc (setup->num_alternates *
- sizeof (FSFpeAltRec) +
- (setup->alternate_len << 2));
+ alts = malloc (setup->num_alternates * sizeof (FSFpeAltRec) +
+ (setup->alternate_len << 2));
if (alts)
{
alt_names = (char *) (setup + 1);
@@ -2971,6 +2970,7 @@ _fs_send_cat_sync (FSFpePtr conn)
lcreq.length = (SIZEOF(fsListCataloguesReq)) >> 2;
lcreq.maxNames = 0;
lcreq.nbytes = 0;
+ lcreq.pad2 = 0;
_fs_add_req_log(conn, FS_SetCatalogues);
if (_fs_write(conn, (char *) &lcreq, SIZEOF(fsListCataloguesReq)) != FSIO_READY)
return FSIO_ERROR;
@@ -3151,13 +3151,12 @@ _fs_init_conn (char *servername)
{
FSFpePtr conn;
- conn = xalloc (sizeof (FSFpeRec) + strlen (servername) + 1);
+ conn = calloc (1, sizeof (FSFpeRec) + strlen (servername) + 1);
if (!conn)
return 0;
- memset (conn, '\0', sizeof (FSFpeRec));
if (!_fs_io_init (conn))
{
- xfree (conn);
+ free (conn);
return 0;
}
conn->servername = (char *) (conn + 1);
@@ -3173,8 +3172,8 @@ _fs_free_conn (FSFpePtr conn)
_fs_close_server (conn);
_fs_io_fini (conn);
if (conn->alts)
- xfree (conn->alts);
- xfree (conn);
+ free (conn->alts);
+ free (conn);
}
/*
@@ -3200,70 +3199,3 @@ fs_register_fpe_functions(void)
NULL,
NULL);
}
-
-static int
-check_fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
- fsBitmapFormat format, fsBitmapFormatMask fmask,
- XID id, FontPtr *ppfont,
- char **alias, FontPtr non_cachable_font)
-{
- if (XpClientIsBitmapClient(client))
- return (fs_open_font(client, fpe, flags, name, namelen, format,
- fmask, id, ppfont, alias, non_cachable_font) );
- return BadFontName;
-}
-
-static int
-check_fs_list_fonts(pointer client, FontPathElementPtr fpe,
- char *pattern, int patlen, int maxnames,
- FontNamesPtr newnames)
-{
- if (XpClientIsBitmapClient(client))
- return (fs_list_fonts(client, fpe, pattern, patlen, maxnames,
- newnames));
- return BadFontName;
-}
-
-static int
-check_fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
- char *pattern, int len, int maxnames,
- pointer *pdata)
-{
- if (XpClientIsBitmapClient(client))
- return (fs_start_list_with_info(client, fpe, pattern, len, maxnames,
- pdata));
- return BadFontName;
-}
-
-static int
-check_fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
- char **namep, int *namelenp,
- FontInfoPtr *pFontInfo, int *numFonts,
- pointer private)
-{
- if (XpClientIsBitmapClient(client))
- return (fs_next_list_with_info(client, fpe, namep, namelenp, pFontInfo,
- numFonts,private));
- return BadFontName;
-}
-
-void
-check_fs_register_fpe_functions(void)
-{
- RegisterFPEFunctions(fs_name_check,
- fs_init_fpe,
- fs_free_fpe,
- fs_reset_fpe,
- check_fs_open_font,
- fs_close_font,
- check_fs_list_fonts,
- check_fs_start_list_with_info,
- check_fs_next_list_with_info,
- fs_wakeup,
- fs_client_died,
- _fs_load_glyphs,
- NULL,
- NULL,
- NULL);
-}
diff --git a/libXfont/src/fc/fsio.c b/libXfont/src/fc/fsio.c
index dfac4b9f9..438418c72 100644
--- a/libXfont/src/fc/fsio.c
+++ b/libXfont/src/fc/fsio.c
@@ -65,9 +65,6 @@
#define EINTR WSAEINTR
#endif
-#ifdef __UNIXOS2__
-#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
-#endif
static int padlength[4] = {0, 3, 2, 1};
@@ -285,7 +282,7 @@ _fs_flush (FSFpePtr conn)
{
_fs_unmark_block (conn, FS_BROKEN_WRITE|FS_PENDING_WRITE);
if (conn->outBuf.size > FS_BUF_INC)
- conn->outBuf.buf = xrealloc (conn->outBuf.buf, FS_BUF_INC);
+ conn->outBuf.buf = realloc (conn->outBuf.buf, FS_BUF_INC);
conn->outBuf.remove = conn->outBuf.insert = 0;
}
return FSIO_READY;
@@ -311,7 +308,7 @@ _fs_resize (FSBufPtr buf, long size)
if (buf->size - buf->remove < size)
{
new_size = ((buf->remove + size + FS_BUF_INC) / FS_BUF_INC) * FS_BUF_INC;
- new = xrealloc (buf->buf, new_size);
+ new = realloc (buf->buf, new_size);
if (!new)
return FSIO_ERROR;
buf->buf = new;
@@ -328,7 +325,7 @@ _fs_downsize (FSBufPtr buf, long size)
buf->insert = buf->remove = 0;
if (buf->size > size)
{
- buf->buf = xrealloc (buf->buf, size);
+ buf->buf = realloc (buf->buf, size);
buf->size = size;
}
}
@@ -347,16 +344,16 @@ Bool
_fs_io_init (FSFpePtr conn)
{
conn->outBuf.insert = conn->outBuf.remove = 0;
- conn->outBuf.buf = xalloc (FS_BUF_INC);
+ conn->outBuf.buf = malloc (FS_BUF_INC);
if (!conn->outBuf.buf)
return FALSE;
conn->outBuf.size = FS_BUF_INC;
conn->inBuf.insert = conn->inBuf.remove = 0;
- conn->inBuf.buf = xalloc (FS_BUF_INC);
+ conn->inBuf.buf = malloc (FS_BUF_INC);
if (!conn->inBuf.buf)
{
- xfree (conn->outBuf.buf);
+ free (conn->outBuf.buf);
conn->outBuf.buf = 0;
return FALSE;
}
@@ -369,9 +366,9 @@ void
_fs_io_fini (FSFpePtr conn)
{
if (conn->outBuf.buf)
- xfree (conn->outBuf.buf);
+ free (conn->outBuf.buf);
if (conn->inBuf.buf)
- xfree (conn->inBuf.buf);
+ free (conn->inBuf.buf);
}
static int
@@ -398,6 +395,8 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size)
}
}
memcpy (conn->outBuf.buf + conn->outBuf.insert, data, len);
+ /* Clear pad data */
+ memset (conn->outBuf.buf + conn->outBuf.insert + len, 0, size - len);
conn->outBuf.insert += size;
_fs_mark_block (conn, FS_PENDING_WRITE);
return FSIO_READY;
diff --git a/libXfont/src/fc/fslibos.h b/libXfont/src/fc/fslibos.h
index acc1f16dc..65c440c7a 100644
--- a/libXfont/src/fc/fslibos.h
+++ b/libXfont/src/fc/fslibos.h
@@ -64,7 +64,7 @@ from The Open Group.
# endif
#endif
#ifndef OPEN_MAX
-#if defined(SVR4) || defined(__UNIXOS2__)
+#if defined(SVR4)
#define OPEN_MAX 256
#else
#include <sys/param.h>