summaryrefslogtreecommitdiff
path: root/lib/libFS/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-05-31 14:39:09 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-05-31 14:39:09 +0000
commit1d548f50e204758d38783f7cae7a52a4507e0abd (patch)
tree61d79cffeac4ec8911e39c0493b08317b54950f3 /lib/libFS/src
parent67a54ddd6653b8c8756f825881ee8253b2e836b9 (diff)
update to libFS 1.0.5
Diffstat (limited to 'lib/libFS/src')
-rw-r--r--lib/libFS/src/FSFontInfo.c235
-rw-r--r--lib/libFS/src/FSFtNames.c10
-rw-r--r--lib/libFS/src/FSGetCats.c7
-rw-r--r--lib/libFS/src/FSListCats.c11
-rw-r--r--lib/libFS/src/FSListExt.c8
-rw-r--r--lib/libFS/src/FSOpenServ.c29
-rw-r--r--lib/libFS/src/FSQGlyphs.c19
-rw-r--r--lib/libFS/src/FSQXExt.c7
-rw-r--r--lib/libFS/src/FSQXInfo.c7
-rw-r--r--lib/libFS/src/FSlibInt.c10
-rw-r--r--lib/libFS/src/Makefile.am4
-rw-r--r--lib/libFS/src/Makefile.in418
12 files changed, 403 insertions, 362 deletions
diff --git a/lib/libFS/src/FSFontInfo.c b/lib/libFS/src/FSFontInfo.c
index d9c84b68f..b51e04376 100644
--- a/lib/libFS/src/FSFontInfo.c
+++ b/lib/libFS/src/FSFontInfo.c
@@ -68,16 +68,17 @@ FSListFontsWithXInfo(
int i,
j;
size_t size = 0;
- FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) 0;
- FSPropInfo **pi = (FSPropInfo **) 0;
- FSPropOffset **po = (FSPropOffset **) 0;
- unsigned char **pd = (unsigned char **) 0;
+ FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) NULL;
+ FSPropInfo **pi = (FSPropInfo **) NULL;
+ FSPropOffset **po = (FSPropOffset **) NULL;
+ unsigned char **pd = (unsigned char **) NULL;
char **flist = NULL;
fsListFontsWithXInfoReply reply;
fsListFontsWithXInfoReq *req;
fsPropInfo local_pi;
fsPropOffset local_po;
Status status;
+ Bool eat_data = True;
GetReq(ListFontsWithXInfo, req);
req->maxNames = maxNames;
@@ -101,26 +102,8 @@ FSListFontsWithXInfo(
SIZEOF(fsGenericReply)) >> 2), fsFalse);
}
if (!status) {
- for (j = (i - 1); j >= 0; j--) {
- FSfree((char *) fhdr[j]);
- FSfree((char *) pi[j]);
- FSfree((char *) po[j]);
- FSfree((char *) pd[j]);
- FSfree(flist[j]);
- }
- if (flist)
- FSfree((char *) flist);
- if (fhdr)
- FSfree((char *) fhdr);
- if (pi)
- FSfree((char *) pi);
- if (po)
- FSfree((char *) po);
- if (pd)
- FSfree((char *) pd);
-
- SyncHandle();
- return (char **) NULL;
+ eat_data = False;
+ goto badmem;
}
if (reply.nameLength == 0) /* got last reply in version 1 */
break;
@@ -134,136 +117,67 @@ FSListFontsWithXInfo(
goto badmem;
if (fhdr) {
- FSXFontInfoHeader **tmp_fhdr = (FSXFontInfoHeader **)
- FSrealloc((char *) fhdr,
- (unsigned) (sizeof(FSXFontInfoHeader *) * size));
- char **tmp_flist = (char **) FSrealloc((char *) flist,
- (unsigned) (sizeof(char *) * size));
- FSPropInfo **tmp_pi = (FSPropInfo **)
- FSrealloc((char *) pi,
- (unsigned) (sizeof(FSPropInfo *) * size));
- FSPropOffset **tmp_po = (FSPropOffset **)
- FSrealloc((char *) po,
- (unsigned) (sizeof(FSPropOffset *) * size));
- unsigned char **tmp_pd = (unsigned char **)
- FSrealloc((char *) pd,
- (unsigned) (sizeof(unsigned char *) * size));
-
- if (!tmp_fhdr || !tmp_flist || !tmp_pi || !tmp_po || !tmp_pd) {
- for (j = (i - 1); j >= 0; j--) {
- FSfree((char *) flist[j]);
- FSfree((char *) fhdr[j]);
- FSfree((char *) pi[j]);
- FSfree((char *) po[j]);
- FSfree((char *) pd[j]);
- }
- if (tmp_flist)
- FSfree((char *) tmp_flist);
- else
- FSfree((char *) flist);
- if (tmp_fhdr)
- FSfree((char *) tmp_fhdr);
- else
- FSfree((char *) fhdr);
- if (tmp_pi)
- FSfree((char *) tmp_pi);
- else
- FSfree((char *) pi);
- if (tmp_po)
- FSfree((char *) tmp_po);
- else
- FSfree((char *) po);
- if (tmp_pd)
- FSfree((char *) tmp_pd);
- else
- FSfree((char *) pd);
- goto clearwire;
+#define ResizeArray(var, type) { \
+ type **tmp = FSrealloc(var, sizeof(type *) * size); \
+ if (tmp) \
+ var = tmp; \
+ else \
+ goto badmem; \
}
- fhdr = tmp_fhdr;
- flist = tmp_flist;
- pi = tmp_pi;
- po = tmp_po;
- pd = tmp_pd;
+
+ ResizeArray(fhdr, FSXFontInfoHeader)
+ ResizeArray(flist, char)
+ ResizeArray(pi, FSPropInfo)
+ ResizeArray(po, FSPropOffset)
+ ResizeArray(pd, unsigned char)
} else {
- if (!(fhdr = (FSXFontInfoHeader **)
- FSmalloc((unsigned) (sizeof(FSXFontInfoHeader *) * size))))
- goto clearwire;
- if (!(flist = (char **)
- FSmalloc((unsigned) (sizeof(char *) * size)))) {
- FSfree((char *) fhdr);
- goto clearwire;
- }
- if (!(pi = (FSPropInfo **)
- FSmalloc((unsigned) (sizeof(FSPropInfo *) * size)))) {
- FSfree((char *) fhdr);
- FSfree((char *) flist);
- goto clearwire;
- }
- if (!(po = (FSPropOffset **)
- FSmalloc((unsigned) (sizeof(FSPropOffset *) * size)))) {
- FSfree((char *) fhdr);
- FSfree((char *) flist);
- FSfree((char *) pi);
- goto clearwire;
- }
- if (!(pd = (unsigned char **)
- FSmalloc((unsigned) (sizeof(unsigned char *) * size)))) {
- FSfree((char *) fhdr);
- FSfree((char *) flist);
- FSfree((char *) pi);
- FSfree((char *) po);
- goto clearwire;
+#define InitArray(var, type) \
+ if ((var = FSmalloc(sizeof(type *) * size)) == NULL) { \
+ goto badmem; \
}
+
+ InitArray(fhdr, FSXFontInfoHeader)
+ InitArray(flist, char)
+ InitArray(pi, FSPropInfo)
+ InitArray(po, FSPropOffset)
+ InitArray(pd, unsigned char)
}
}
- fhdr[i] = (FSXFontInfoHeader *) FSmalloc(sizeof(FSXFontInfoHeader));
+ fhdr[i] = FSmalloc(sizeof(FSXFontInfoHeader));
if (!fhdr[i]) {
goto badmem;
}
FSUnpack_XFontInfoHeader(&reply, fhdr[i], FSProtocolVersion(svr));
/* alloc space for the name */
- flist[i] = (char *) FSmalloc((unsigned int) (reply.nameLength + 1));
+ flist[i] = FSmalloc(reply.nameLength + 1);
+ if (!flist[i])
+ goto cleanfhdr;
if (FSProtocolVersion(svr) == 1)
{
/* get the name */
- if (!flist[i]) {
- nbytes = (reply.nameLength + 3) & ~3;
- _FSEatData(svr, (unsigned long) nbytes);
- goto badmem;
- }
_FSReadPad(svr, flist[i], (long) reply.nameLength);
flist[i][reply.nameLength] = '\0';
}
- pi[i] = (FSPropInfo *) FSmalloc(sizeof(FSPropInfo));
- if (!pi[i]) {
- FSfree((char *) fhdr[i]);
- goto badmem;
- }
+ pi[i] = FSmalloc(sizeof(FSPropInfo));
+ if (!pi[i])
+ goto cleanflist;
_FSReadPad(svr, (char *) &local_pi, SIZEOF(fsPropInfo));
pi[i]->num_offsets = local_pi.num_offsets;
pi[i]->data_len = local_pi.data_len;
#if SIZE_MAX <= UINT_MAX
if (pi[i]->num_offsets > SIZE_MAX / sizeof(FSPropOffset))
- goto badmem;
+ goto cleanpi;
#endif
- po[i] = (FSPropOffset *)
- FSmalloc(pi[i]->num_offsets * sizeof(FSPropOffset));
- if (!po[i]) {
- FSfree((char *) fhdr[i]);
- FSfree((char *) pi[i]);
- goto badmem;
- }
- pd[i] = (unsigned char *) FSmalloc(pi[i]->data_len);
- if (!pd[i]) {
- FSfree((char *) fhdr[i]);
- FSfree((char *) pi[i]);
- FSfree((char *) po[i]);
- goto badmem;
- }
+ po[i] = FSmalloc(pi[i]->num_offsets * sizeof(FSPropOffset));
+ if (!po[i])
+ goto cleanpi;
+ pd[i] = FSmalloc(pi[i]->data_len);
+ if (!pd[i])
+ goto cleanpo;
/* get offsets */
for (j=0; j<pi[i]->num_offsets; j++)
{
@@ -284,11 +198,6 @@ FSListFontsWithXInfo(
if (FSProtocolVersion(svr) != 1)
{
/* get the name */
- if (!flist[i]) {
- nbytes = (reply.nameLength + 3) & ~3;
- _FSEatData(svr, (unsigned long) nbytes);
- goto badmem;
- }
_FSRead(svr, flist[i], (long) reply.nameLength);
flist[i][reply.nameLength] = '\0';
@@ -297,7 +206,7 @@ FSListFontsWithXInfo(
}
/* avoid integer overflow */
if (i > INT_MAX - 1) {
- goto badmem;
+ goto cleanpd;
}
}
*info = fhdr;
@@ -308,37 +217,45 @@ FSListFontsWithXInfo(
SyncHandle();
return flist;
+/* Error cleanup for when we're partway through filling in item #i in arrays */
+cleanpd:
+ FSfree(pd[i]);
+cleanpo:
+ FSfree(po[i]);
+cleanpi:
+ FSfree(pi[i]);
+cleanflist:
+ FSfree(flist[i]);
+cleanfhdr:
+ FSfree(fhdr[i]);
+/* Error cleanup for all previously filled in items in the arrays */
badmem:
for (j = (i - 1); j >= 0; j--) {
- FSfree((char *) pi[j]);
- FSfree((char *) po[j]);
- FSfree((char *) pd[j]);
+ FSfree(pi[j]);
+ FSfree(po[j]);
+ FSfree(pd[j]);
FSfree(flist[j]);
- FSfree((char *) fhdr[j]);
+ FSfree(fhdr[j]);
}
- if (flist)
- FSfree((char *) flist);
- if (fhdr)
- FSfree((char *) fhdr);
- if (pi)
- FSfree((char *) pi);
- if (po)
- FSfree((char *) po);
- if (pd)
- FSfree((char *) pd);
+ FSfree(flist);
+ FSfree(fhdr);
+ FSfree(pi);
+ FSfree(po);
+ FSfree(pd);
+ if (eat_data) {
+ do {
+ fsPropInfo ti;
-clearwire:
- do {
- fsPropInfo ti;
-
- _FSEatData(svr, (reply.nameLength + 3) & ~3);
- _FSReadPad(svr, (char *) &ti, SIZEOF(fsPropInfo));
- _FSEatData(svr, (SIZEOF(fsPropOffset) * ti.num_offsets));
- _FSEatData(svr, ti.data_len);
- } while (_FSReply(svr, (fsReply *) & reply,
- ((SIZEOF(fsListFontsWithXInfoReply)
- - SIZEOF(fsGenericReply)) >> 2), fsFalse) && (reply.nameLength != 0));
+ _FSEatData(svr, (reply.nameLength + 3) & ~3);
+ _FSReadPad(svr, (char *) &ti, SIZEOF(fsPropInfo));
+ _FSEatData(svr, (SIZEOF(fsPropOffset) * ti.num_offsets));
+ _FSEatData(svr, ti.data_len);
+ } while (_FSReply(svr, (fsReply *) &reply,
+ ((SIZEOF(fsListFontsWithXInfoReply)
+ - SIZEOF(fsGenericReply)) >> 2), fsFalse)
+ && (reply.nameLength != 0));
+ }
SyncHandle();
return (char **) NULL;
}
diff --git a/lib/libFS/src/FSFtNames.c b/lib/libFS/src/FSFtNames.c
index 9624205ff..1cac9d499 100644
--- a/lib/libFS/src/FSFtNames.c
+++ b/lib/libFS/src/FSFtNames.c
@@ -77,7 +77,7 @@ FSListFonts(
_FSSend(svr, pattern, nbytes);
if (!_FSReply(svr, (fsReply *) & rep,
(SIZEOF(fsListFontsReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse))
- return (char **) 0;
+ return (char **) NULL;
if (rep.nFonts
#if (SIZE_MAX >> 2) <= UINT_MAX
@@ -85,13 +85,13 @@ FSListFonts(
&& rep.length <= (SIZE_MAX >> 2)
#endif
) {
- flist = (char **) FSmalloc((unsigned) rep.nFonts * sizeof(char *));
+ flist = FSmalloc(rep.nFonts * sizeof(char *));
rlen = (rep.length << 2) - SIZEOF(fsListFontsReply);
- c = (char *) FSmalloc((unsigned) (rlen + 1));
+ c = FSmalloc(rlen + 1);
if ((!flist) || (!c)) {
if (flist)
- FSfree((char *) flist);
+ FSfree(flist);
if (c)
FSfree(c);
_FSEatData(svr, (unsigned long) rlen);
@@ -122,7 +122,7 @@ int FSFreeFontNames(char **list)
{
if (list) {
FSfree(list[0] - 1);
- FSfree((char *) list);
+ FSfree(list);
}
return 1;
}
diff --git a/lib/libFS/src/FSGetCats.c b/lib/libFS/src/FSGetCats.c
index 8c5e32ba2..75f8c369b 100644
--- a/lib/libFS/src/FSGetCats.c
+++ b/lib/libFS/src/FSGetCats.c
@@ -79,13 +79,12 @@ FSGetCatalogues(
&& rep.length <= (SIZE_MAX >> 2)
#endif
) {
- list = (char **)
- FSmalloc((unsigned) (rep.num_catalogues * sizeof(char *)));
+ list = FSmalloc(rep.num_catalogues * sizeof(char *));
rlen = (rep.length << 2) - SIZEOF(fsGetCataloguesReply);
- c = (char *) FSmalloc((unsigned) rlen + 1);
+ c = FSmalloc(rlen + 1);
if ((!list) || (!c)) {
if (list)
- FSfree((char *) list);
+ FSfree(list);
if (c)
FSfree(c);
_FSEatData(svr, (unsigned long) rlen);
diff --git a/lib/libFS/src/FSListCats.c b/lib/libFS/src/FSListCats.c
index 3474cdab4..7987f7962 100644
--- a/lib/libFS/src/FSListCats.c
+++ b/lib/libFS/src/FSListCats.c
@@ -77,7 +77,7 @@ FSListCatalogues(
_FSSend(svr, pattern, nbytes);
if (!_FSReply(svr, (fsReply *) & rep,
(SIZEOF(fsListCataloguesReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse))
- return (char **) 0;
+ return (char **) NULL;
if (rep.num_catalogues
#if (SIZE_MAX >> 2) <= UINT_MAX
@@ -85,14 +85,13 @@ FSListCatalogues(
&& rep.length <= (SIZE_MAX>>2)
#endif
) {
- clist = (char **)
- FSmalloc((unsigned) rep.num_catalogues * sizeof(char *));
+ clist = FSmalloc(rep.num_catalogues * sizeof(char *));
rlen = (rep.length << 2) - SIZEOF(fsListCataloguesReply);
- c = (char *) FSmalloc((unsigned) (rlen + 1));
+ c = FSmalloc(rlen + 1);
if ((!clist) || (!c)) {
if (clist)
- FSfree((char *) clist);
+ FSfree(clist);
if (c)
FSfree(c);
_FSEatData(svr, (unsigned long) rlen);
@@ -123,7 +122,7 @@ int FSFreeCatalogues(char **list)
{
if (list) {
FSfree(list[0] - 1);
- FSfree((char *) list);
+ FSfree(list);
}
return 1;
}
diff --git a/lib/libFS/src/FSListExt.c b/lib/libFS/src/FSListExt.c
index abe14726b..c127003f9 100644
--- a/lib/libFS/src/FSListExt.c
+++ b/lib/libFS/src/FSListExt.c
@@ -79,12 +79,12 @@ FSListExtensions(
&& rep.length <= (SIZE_MAX>>2)
#endif
) {
- list = (char **) FSmalloc((unsigned)(rep.nExtensions * sizeof(char *)));
+ list = FSmalloc(rep.nExtensions * sizeof(char *));
rlen = (rep.length << 2) - SIZEOF(fsListExtensionsReply);
- c = (char *) FSmalloc((unsigned) rlen + 1);
+ c = FSmalloc(rlen + 1);
if ((!list) || (!c)) {
if (list)
- FSfree((char *) list);
+ FSfree(list);
if (c)
FSfree(c);
_FSEatData(svr, (unsigned long) rlen);
@@ -115,7 +115,7 @@ int FSFreeExtensionList(char **list)
{
if (list != NULL) {
FSfree(list[0] - 1);
- FSfree((char *) list);
+ FSfree(list);
}
return 1;
}
diff --git a/lib/libFS/src/FSOpenServ.c b/lib/libFS/src/FSOpenServ.c
index 19efc13a5..15a657acd 100644
--- a/lib/libFS/src/FSOpenServ.c
+++ b/lib/libFS/src/FSOpenServ.c
@@ -80,7 +80,7 @@ void _FSFreeServerStructure(FSServer *svr)
if (svr->buffer)
FSfree(svr->buffer);
- FSfree((char *) svr);
+ FSfree(svr);
}
static
@@ -124,13 +124,12 @@ FSOpenServer(const char *server)
}
}
- if ((svr = (FSServer *) FScalloc(1, sizeof(FSServer))) == NULL) {
+ if ((svr = FScalloc(1, sizeof(FSServer))) == NULL) {
errno = ENOMEM;
return (FSServer *) NULL;
}
- if ((svr->server_name = FSmalloc((unsigned) (strlen(server) + 1)))
- == NULL) {
+ if ((svr->server_name = FSmalloc(strlen(server) + 1)) == NULL) {
goto fail;
}
(void) strcpy(svr->server_name, server);
@@ -159,7 +158,7 @@ FSOpenServer(const char *server)
setuplength = prefix.alternate_len << 2;
if (setuplength > (SIZE_MAX>>2)
|| (alt_data = (unsigned char *)
- (setup = FSmalloc((unsigned) setuplength))) == NULL) {
+ (setup = FSmalloc(setuplength))) == NULL) {
goto fail;
}
_FSRead(svr, (char *) alt_data, setuplength);
@@ -171,18 +170,17 @@ FSOpenServer(const char *server)
}
#endif
- alts = (AlternateServer *)
- FSmalloc(sizeof(AlternateServer) * prefix.num_alternates);
+ alts = FSmalloc(sizeof(AlternateServer) * prefix.num_alternates);
if (!alts) {
goto fail;
}
for (i = 0; i < prefix.num_alternates; i++) {
alts[i].subset = (Bool) *ad++;
altlen = (unsigned int) *ad++;
- alts[i].name = (char *) FSmalloc(altlen + 1);
+ alts[i].name = FSmalloc(altlen + 1);
if (!alts[i].name) {
while (--i) {
- FSfree((char *) alts[i].name);
+ FSfree(alts[i].name);
}
goto fail;
}
@@ -190,7 +188,7 @@ FSOpenServer(const char *server)
alts[i].name[altlen] = '\0';
ad += altlen + ((4 - (altlen + 2)) & 3);
}
- FSfree((char *) alt_data);
+ FSfree(alt_data);
alt_data = NULL;
svr->alternate_servers = alts;
@@ -199,7 +197,7 @@ FSOpenServer(const char *server)
setuplength = prefix.auth_len << 2;
if (setuplength > (SIZE_MAX>>2)
|| (auth_data = (char *)
- (setup = FSmalloc((unsigned) setuplength))) == NULL) {
+ (setup = FSmalloc(setuplength))) == NULL) {
goto fail;
}
_FSRead(svr, (char *) auth_data, setuplength);
@@ -212,8 +210,7 @@ FSOpenServer(const char *server)
/* get rest */
_FSRead(svr, (char *) &conn, (long) SIZEOF(fsConnSetupAccept));
- if ((vendor_string = (char *)
- FSmalloc((unsigned) conn.vendor_len + 1)) == NULL) {
+ if ((vendor_string = FSmalloc(conn.vendor_len + 1)) == NULL) {
goto fail;
}
_FSReadPad(svr, (char *) vendor_string, conn.vendor_len);
@@ -263,9 +260,9 @@ FSOpenServer(const char *server)
return (svr);
fail: /* Failure: clean up and return null */
- FSfree((char *) alts);
- FSfree((char *) alt_data);
- FSfree((char *) auth_data);
+ FSfree(alts);
+ FSfree(alt_data);
+ FSfree(auth_data);
OutOfMemory(svr, setup);
return (FSServer *) NULL;
diff --git a/lib/libFS/src/FSQGlyphs.c b/lib/libFS/src/FSQGlyphs.c
index bf3c3b2e2..9681ef062 100644
--- a/lib/libFS/src/FSQGlyphs.c
+++ b/lib/libFS/src/FSQGlyphs.c
@@ -91,23 +91,23 @@ FSQueryXBitmaps8(
return FSBadAlloc;
#endif
- offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars);
+ offs = FSmalloc(sizeof(FSOffset) * reply.num_chars);
*offsets = offs;
if (!offs)
return FSBadAlloc;
#if (SIZE_MAX >> 2) <= UINT_MAX
/* XXX This thest is incomplete */
if (reply.length > (SIZE_MAX >> 2)) {
- FSfree((char *) offs);
+ FSfree(offs);
return FSBadAlloc;
}
#endif
left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps8Reply)
- (SIZEOF(fsOffset32) * reply.num_chars);
- gd = (unsigned char *) FSmalloc(left);
+ gd = FSmalloc(left);
*glyphdata = gd;
if (!gd) {
- FSfree((char *) offs);
+ FSfree(offs);
return FSBadAlloc;
}
for (i=0; i<reply.num_chars; i++)
@@ -154,8 +154,7 @@ FSQueryXBitmaps16(
if (str_len > SIZE_MAX/SIZEOF(fsChar2b_version1))
return FSBadAlloc;
- swapped_str = (fsChar2b_version1 *)
- FSmalloc(SIZEOF(fsChar2b_version1) * str_len);
+ swapped_str = FSmalloc(SIZEOF(fsChar2b_version1) * str_len);
if (!swapped_str)
return FSBadAlloc;
for (i = 0; i < str_len; i++) {
@@ -177,23 +176,23 @@ FSQueryXBitmaps16(
if(reply.num_chars > SIZE_MAX/sizeof(FSOffset))
return FSBadAlloc;
#endif
- offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars);
+ offs = FSmalloc(sizeof(FSOffset) * reply.num_chars);
*offsets = offs;
if (!offs)
return FSBadAlloc;
#if (SIZE_MAX >> 2) <= UINT_MAX
/* XXX - this test is incomplete */
if (reply.length > (SIZE_MAX>>2)) {
- FSfree((char *) offs);
+ FSfree(offs);
return FSBadAlloc;
}
#endif
left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps16Reply)
- (SIZEOF(fsOffset32) * reply.num_chars);
- gd = (unsigned char *) FSmalloc(left);
+ gd = FSmalloc(left);
*glyphdata = gd;
if (!gd) {
- FSfree((char *) offs);
+ FSfree(offs);
return FSBadAlloc;
}
for (i=0; i<reply.num_chars; i++)
diff --git a/lib/libFS/src/FSQXExt.c b/lib/libFS/src/FSQXExt.c
index 9716f9d4b..e730df50c 100644
--- a/lib/libFS/src/FSQXExt.c
+++ b/lib/libFS/src/FSQXExt.c
@@ -98,7 +98,7 @@ FSQueryXExtents8(
return FSBadAlloc;
#endif
- ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents);
+ ext = FSmalloc(sizeof(FSXCharInfo) * reply.num_extents);
*extents = ext;
if (!ext)
return FSBadAlloc;
@@ -135,8 +135,7 @@ FSQueryXExtents16(
{
fsChar2b_version1 *swapped_str;
- swapped_str = (fsChar2b_version1 *)
- FSmalloc(SIZEOF(fsChar2b_version1) * str_len);
+ swapped_str = FSmalloc(SIZEOF(fsChar2b_version1) * str_len);
if (!swapped_str)
return FSBadAlloc;
for (i = 0; i < str_len; i++) {
@@ -159,7 +158,7 @@ FSQueryXExtents16(
return FSBadAlloc;
#endif
- ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents);
+ ext = FSmalloc(sizeof(FSXCharInfo) * reply.num_extents);
*extents = ext;
if (!ext)
return FSBadAlloc;
diff --git a/lib/libFS/src/FSQXInfo.c b/lib/libFS/src/FSQXInfo.c
index 4be9bce76..0edae0a14 100644
--- a/lib/libFS/src/FSQXInfo.c
+++ b/lib/libFS/src/FSQXInfo.c
@@ -98,13 +98,12 @@ FSQueryXInfo(
#endif
/* prepare for prop data */
- offset_data = (FSPropOffset *)
- FSmalloc(props->num_offsets * sizeof(FSPropOffset));
+ offset_data = FSmalloc(props->num_offsets * sizeof(FSPropOffset));
if (!offset_data)
return FSBadAlloc;
- pdata = (unsigned char *) FSmalloc(props->data_len);
+ pdata = FSmalloc(props->data_len);
if (!pdata) {
- FSfree((char *) offset_data);
+ FSfree(offset_data);
return FSBadAlloc;
}
/* get offsets */
diff --git a/lib/libFS/src/FSlibInt.c b/lib/libFS/src/FSlibInt.c
index db9cc4782..96c5e62c7 100644
--- a/lib/libFS/src/FSlibInt.c
+++ b/lib/libFS/src/FSlibInt.c
@@ -748,7 +748,8 @@ _FSReply(
unsigned long serial;
long err_data;
- err = *(fsError *) rep;
+ /* copy in the part we already read off the wire */
+ memcpy(&err, rep, SIZEOF(fsReply));
/* read the rest of the error */
_FSRead(svr, (char *) &err + SIZEOF(fsReply),
(long) (SIZEOF(fsError) - SIZEOF(fsReply)));
@@ -846,8 +847,7 @@ _FSEnq(
if ((qelt = _FSqfree) != NULL) {
/* If _FSqfree is non-NULL do this, else malloc a new one. */
_FSqfree = qelt->next;
- } else if ((qelt =
- (_FSQEvent *) FSmalloc((unsigned) sizeof(_FSQEvent))) == NULL) {
+ } else if ((qelt = FSmalloc(sizeof(_FSQEvent))) == NULL) {
/* Malloc call failed! */
ESET(ENOMEM);
(*_FSIOErrorFunction) (svr);
@@ -1105,7 +1105,7 @@ _FSAllocScratch(
if (svr->scratch_buffer != NULL)
FSfree(svr->scratch_buffer);
return (svr->scratch_length = nbytes,
- svr->scratch_buffer = FSmalloc((unsigned) nbytes));
+ svr->scratch_buffer = FSmalloc(nbytes));
}
return (svr->scratch_buffer);
}
@@ -1194,7 +1194,7 @@ doData16(
}
void
-Data16(svr, data, len)
+Data16(
FSServer *svr,
short *data,
unsigned len)
diff --git a/lib/libFS/src/Makefile.am b/lib/libFS/src/Makefile.am
index 06e958f27..56fd0db34 100644
--- a/lib/libFS/src/Makefile.am
+++ b/lib/libFS/src/Makefile.am
@@ -36,9 +36,9 @@ AM_CFLAGS = \
-DFS_t \
-DTRANS_CLIENT
-libFS_la_LIBADD = $(FS_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/X11/fonts
-INCLUDES = -I$(top_srcdir)/include/X11/fonts
+libFS_la_LIBADD = $(FS_LIBS)
libFS_la_LDFLAGS = -export-symbols-regex '^FS.*' -version-number 6:0:0 -no-undefined
diff --git a/lib/libFS/src/Makefile.in b/lib/libFS/src/Makefile.in
index 071838d07..43dcd8381 100644
--- a/lib/libFS/src/Makefile.in
+++ b/lib/libFS/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 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.
@@ -16,18 +16,32 @@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
-install_sh_PROGRAM = ${SHELL} $(install_sh) -c
-install_sh_SCRIPT = ${SHELL} $(install_sh) -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -40,7 +54,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = src
DIST_COMMON = $(libFSinclude_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+ $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -48,15 +63,36 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)" \
"$(DESTDIR)$(libFSincludedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libFS_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@ -67,22 +103,55 @@ am_libFS_la_OBJECTS = FSCloseFt.lo FSClServ.lo FSConnServ.lo \
FSQGlyphs.lo FSQuExt.lo FSQXExt.lo FSQXInfo.lo FSServName.lo \
FSSetCats.lo FSSync.lo FSSynchro.lo fs_transport.lo
libFS_la_OBJECTS = $(am_libFS_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libFS_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libFS_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(libFS_la_SOURCES)
DIST_SOURCES = $(libFS_la_SOURCES)
-lintlibDATA_INSTALL = $(INSTALL_DATA)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(lintlib_DATA)
-libFSincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(libFSinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
@@ -90,8 +159,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
@@ -128,6 +195,7 @@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FS_CFLAGS = @FS_CFLAGS@
FS_LIBS = @FS_LIBS@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -142,23 +210,17 @@ LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LINT = @LINT@
LINTLIB = @LINTLIB@
-LINT_FALSE = @LINT_FALSE@
LINT_FLAGS = @LINT_FLAGS@
-LINT_TRUE = @LINT_TRUE@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-MAKE_LINT_LIB_FALSE = @MAKE_LINT_LIB_FALSE@
-MAKE_LINT_LIB_TRUE = @MAKE_LINT_LIB_TRUE@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -170,6 +232,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
@@ -183,11 +246,13 @@ VERSION = @VERSION@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -199,6 +264,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -226,8 +292,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
lib_LTLIBRARIES = libFS.la
libFS_la_SOURCES = \
FSCloseFt.c \
@@ -265,8 +335,8 @@ AM_CFLAGS = \
-DFS_t \
-DTRANS_CLIENT
+AM_CPPFLAGS = -I$(top_srcdir)/include/X11/fonts
libFS_la_LIBADD = $(FS_LIBS)
-INCLUDES = -I$(top_srcdir)/include/X11/fonts
libFS_la_LDFLAGS = -export-symbols-regex '^FS.*' -version-number 6:0:0 -no-undefined
libFSincludedir = $(includedir)/X11/fonts
libFSinclude_HEADERS = \
@@ -281,18 +351,18 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(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; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -306,39 +376,47 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libFS.la: $(libFS_la_OBJECTS) $(libFS_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libFS_la_LDFLAGS) $(libFS_la_OBJECTS) $(libFS_la_LIBADD) $(LIBS)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libFS.la: $(libFS_la_OBJECTS) $(libFS_la_DEPENDENCIES) $(EXTRA_libFS_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libFS_la_LINK) -rpath $(libdir) $(libFS_la_OBJECTS) $(libFS_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -373,143 +451,167 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs_transport.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-lintlibDATA: $(lintlib_DATA)
@$(NORMAL_INSTALL)
- test -z "$(lintlibdir)" || $(mkdir_p) "$(DESTDIR)$(lintlibdir)"
- @list='$(lintlib_DATA)'; for p in $$list; do \
+ @list='$(lintlib_DATA)'; test -n "$(lintlibdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(lintlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(lintlibdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(lintlibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(lintlibdir)/$$f'"; \
- $(lintlibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(lintlibdir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lintlibdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(lintlibdir)" || exit $$?; \
done
uninstall-lintlibDATA:
@$(NORMAL_UNINSTALL)
- @list='$(lintlib_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(lintlibdir)/$$f'"; \
- rm -f "$(DESTDIR)$(lintlibdir)/$$f"; \
- done
+ @list='$(lintlib_DATA)'; test -n "$(lintlibdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(lintlibdir)'; $(am__uninstall_files_from_dir)
install-libFSincludeHEADERS: $(libFSinclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(libFSincludedir)" || $(mkdir_p) "$(DESTDIR)$(libFSincludedir)"
- @list='$(libFSinclude_HEADERS)'; for p in $$list; do \
+ @list='$(libFSinclude_HEADERS)'; test -n "$(libFSincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libFSincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libFSincludedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(libFSincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libFSincludedir)/$$f'"; \
- $(libFSincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libFSincludedir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libFSincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libFSincludedir)" || exit $$?; \
done
uninstall-libFSincludeHEADERS:
@$(NORMAL_UNINSTALL)
- @list='$(libFSinclude_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(libFSincludedir)/$$f'"; \
- rm -f "$(DESTDIR)$(libFSincludedir)/$$f"; \
- done
+ @list='$(libFSinclude_HEADERS)'; test -n "$(libFSincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libFSincludedir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
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; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
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; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
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; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/../include/X11/fonts
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -518,7 +620,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)" "$(DESTDIR)$(libFSincludedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -530,16 +632,22 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -553,7 +661,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -561,18 +669,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-libFSincludeHEADERS install-lintlibDATA
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am: install-libLTLIBRARIES
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -593,23 +721,26 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-libFSincludeHEADERS \
- uninstall-libLTLIBRARIES uninstall-lintlibDATA
+uninstall-am: uninstall-libFSincludeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-lintlibDATA
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool ctags distclean \
+ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
install-libFSincludeHEADERS install-libLTLIBRARIES \
- install-lintlibDATA install-man install-strip installcheck \
+ install-lintlibDATA install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-libFSincludeHEADERS uninstall-libLTLIBRARIES \
- uninstall-lintlibDATA
+ tags uninstall uninstall-am uninstall-libFSincludeHEADERS \
+ uninstall-libLTLIBRARIES uninstall-lintlibDATA
@LINT_TRUE@lint:
@@ -619,6 +750,7 @@ uninstall-am: uninstall-info-am uninstall-libFSincludeHEADERS \
@MAKE_LINT_LIB_TRUE@$(LINTLIB): $(libFS_la_SOURCES)
@MAKE_LINT_LIB_TRUE@ $(LINT) -y -oFS -x $(ALL_LINT_FLAGS) $(libFS_la_SOURCES) \
@MAKE_LINT_LIB_TRUE@ $(libFS_la_LIBADD) $(LIBS)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: