diff options
Diffstat (limited to 'x11/xfstt/patches/patch-ad')
-rw-r--r-- | x11/xfstt/patches/patch-ad | 86 |
1 files changed, 5 insertions, 81 deletions
diff --git a/x11/xfstt/patches/patch-ad b/x11/xfstt/patches/patch-ad index 3aea86af8d7..9b042edb27f 100644 --- a/x11/xfstt/patches/patch-ad +++ b/x11/xfstt/patches/patch-ad @@ -1,91 +1,15 @@ -$NetBSD: patch-ad,v 1.2 2001/02/18 04:34:17 hubertf Exp $ +$NetBSD: patch-ad,v 1.3 2002/08/22 02:21:07 grant Exp $ ---- xfstt.cpp.orig Sat Dec 11 19:23:45 1999 +--- xfstt.cpp.orig Wed Jul 31 08:18:20 2002 +++ xfstt.cpp -@@ -11,8 +11,8 @@ +@@ -12,8 +12,8 @@ #define UNSTRAPLIMIT 10500U - // Change these if you don't lie being FHS complient + // Change these if you don't like being FHS complient -#define TTFONTDIR "/usr/share/fonts/truetype" -#define TTCACHEDIR "/var/cache/xfstt" -+#define TTFONTDIR "@X11BASE@/lib/X11/fonts/TrueType" ++#define TTFONTDIR "@X11BASE@/lib/X11/fonts/TrueType" +#define TTCACHEDIR "@X11BASE@/lib/X11/fonts/TrueType" #define TTINFO_LEAF "ttinfo.dir" #define TTNAME_LEAF "ttname.dir" -@@ -73,6 +73,7 @@ - char* fontdir = TTFONTDIR; - char* cachedir = TTCACHEDIR; - int defaultres = 0; -+int NoTCP = 0; - - uid_t newuid = (uid_t)(-2); - gid_t newgid = (uid_t)(-2); -@@ -89,12 +90,14 @@ - printf( "Usage: xfstt [[--gslist]--sync][--port portno][--unstrap]" - "[--user username]\n" - "\t\t[--dir ttfdir][--encoding list_of_encodings]" -- "[--daemon][--inetd]\n\n"); -+ "[--daemon][--inetd]\n" -+ "\t\t[--notcp]\n\n"); - if( !verbose) - return; - printf( "\t--sync put ttf-fonts in \"%s\" in database\n", fontdir); - printf( "\t--gslist print ghostscript style ttf fontlist\n "); - printf( "\t--port change port number from default 7101\n"); -+ printf( "\t--notcp don't open TCP socket, use unix domain only\n"); - printf( "\t--dir use other font directory than "TTFONTDIR"\n"); - printf( "\t--cache use other font cache directory than "TTCACHEDIR"\n"); - printf( "\t--res force default resolution to this value\n"); -@@ -470,10 +473,12 @@ - raster->getFontExtent( &xfs->fe); - - int used = (xfs->fe.bitmaps + xfs->fe.bmplen) - xfs->fe.buffer; -+ int bmpoff = xfs->fe.bitmaps - xfs->fe.buffer; - xfs->fe.buffer = (U8*)shrinkMem( xfs->fe.buffer, used); -- if( xfs->fe.buffer) -+ if( xfs->fe.buffer) { - xfs->fe.buflen = used; -- else { -+ xfs->fe.bitmaps = xfs->fe.buffer + bmpoff; -+ } else { - xfs->fid = 0; //### - xfs = 0; - } -@@ -652,7 +657,7 @@ - listen( sd_unix, 1); // only one connection - } - -- if( !sd_inet) { -+ if( !NoTCP && !sd_inet) { - // prepare inet connection - sd_inet = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP); - -@@ -668,7 +673,8 @@ - fd_set sdlist; - FD_ZERO( &sdlist); - FD_SET( sd_unix, &sdlist); -- FD_SET( sd_inet, &sdlist); -+ if( !NoTCP ) -+ FD_SET( sd_inet, &sdlist); - int maxsd = (sd_inet > sd_unix) ? sd_inet : sd_unix; - select( maxsd+1, &sdlist, 0L, 0L, 0L); - -@@ -676,7 +682,7 @@ - unsigned int saLength = sizeof(struct sockaddr); - if( FD_ISSET( sd_unix, &sdlist)) - sd = accept( sd_unix, (struct sockaddr*)&s_unix, &saLength); -- else if( FD_ISSET( sd_inet, &sdlist)) -+ else if( !NoTCP && FD_ISSET( sd_inet, &sdlist)) - sd = accept( sd_inet, (struct sockaddr*)&s_inet, &saLength); - dprintf2( "accept( saLength = %d) = %d\n", saLength, sd); - -@@ -1604,6 +1610,8 @@ - inetdConnection = 1; - } else if( !strcmp( argv[i], "--multi")) { - multiConnection = 1; -+ } else if( !strcmp( argv[i], "--notcp")) { -+ NoTCP = 1; - } else if( !strcmp( argv[i], "--once")) { - multiConnection = 0; - } else if( !strcmp( argv[i], "--unstrap")) { |