diff options
Diffstat (limited to 'libXfont/src')
-rw-r--r-- | libXfont/src/FreeType/ftenc.c | 2 | ||||
-rw-r--r-- | libXfont/src/FreeType/makefile | 14 | ||||
-rw-r--r-- | libXfont/src/Speedo/makefile | 34 | ||||
-rw-r--r-- | libXfont/src/Type1/makefile | 25 | ||||
-rw-r--r-- | libXfont/src/bitmap/bitmapfunc.c | 6 | ||||
-rw-r--r-- | libXfont/src/bitmap/bitmaputil.c | 4 | ||||
-rw-r--r-- | libXfont/src/bitmap/bitscale.c | 2 | ||||
-rw-r--r-- | libXfont/src/bitmap/makefile | 20 | ||||
-rw-r--r-- | libXfont/src/builtins/makefile | 10 | ||||
-rw-r--r-- | libXfont/src/fc/fsio.c | 1 | ||||
-rw-r--r-- | libXfont/src/fc/fstrans.c | 1 | ||||
-rw-r--r-- | libXfont/src/fc/makefile | 9 | ||||
-rw-r--r-- | libXfont/src/fontfile/catalogue.c | 15 | ||||
-rw-r--r-- | libXfont/src/fontfile/fontfile.c | 32 | ||||
-rw-r--r-- | libXfont/src/fontfile/makefile | 33 | ||||
-rw-r--r-- | libXfont/src/makefile | 78 | ||||
-rw-r--r-- | libXfont/src/stubs/makefile | 27 | ||||
-rw-r--r-- | libXfont/src/util/fontxlfd.c | 4 | ||||
-rw-r--r-- | libXfont/src/util/makefile | 10 |
19 files changed, 314 insertions, 13 deletions
diff --git a/libXfont/src/FreeType/ftenc.c b/libXfont/src/FreeType/ftenc.c index f6436fc40..2a22689f9 100644 --- a/libXfont/src/FreeType/ftenc.c +++ b/libXfont/src/FreeType/ftenc.c @@ -38,7 +38,7 @@ THE SOFTWARE. #include <X11/fonts/fontmisc.h> #include <X11/fonts/fontenc.h> -#include <ft2build.h> +#include <config/ftheader.h> #include FT_FREETYPE_H #include FT_TRUETYPE_IDS_H #include FT_TRUETYPE_TABLES_H diff --git a/libXfont/src/FreeType/makefile b/libXfont/src/FreeType/makefile new file mode 100644 index 000000000..a1f05a560 --- /dev/null +++ b/libXfont/src/FreeType/makefile @@ -0,0 +1,14 @@ +LIBRARY = libft + +CSRCS = \ + ftenc.c \ + ftfuncs.c \ + fttools.c \ + xttcap.c + +INCLUDES += $(MHMAKECONF)\freetype\include\freetype $(MHMAKECONF)\freetype\include + +DEFINES += strcasecmp=_stricmp + +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/Speedo/makefile b/libXfont/src/Speedo/makefile new file mode 100644 index 000000000..c128a5198 --- /dev/null +++ b/libXfont/src/Speedo/makefile @@ -0,0 +1,34 @@ +LIBRARY = libspeedo + +CSRCS = \ + adobe-iso.h \ + bics-iso.h \ + bics-unicode.c \ + bics-unicode.h \ + do_char.c \ + do_trns.c \ + keys.h \ + out_bl2d.c \ + out_blk.c \ + out_outl.c \ + out_scrn.c \ + out_util.c \ + reset.c \ + set_spcs.c \ + set_trns.c \ + spdo_prv.h \ + speedo.h \ + spencode.c \ + sperr.c \ + spfile.c \ + spfont.c \ + spfuncs.c \ + spglyph.c \ + spinfo.c \ + spint.h \ + useropt.h +CSRCS:=$(filter-out %.h,$(CSRCS)) + +INCLUDES := ../../../../build $(INCLUDES) + + diff --git a/libXfont/src/Type1/makefile b/libXfont/src/Type1/makefile new file mode 100644 index 000000000..161785514 --- /dev/null +++ b/libXfont/src/Type1/makefile @@ -0,0 +1,25 @@ +LIBRARY = libtype1 + +CSRCS = \ + arith.c \ + curves.c \ + fontfcn.c \ + hints.c \ + lines.c \ + objects.c \ + paths.c \ + regions.c \ + scanfont.c \ + spaces.c \ + t1funcs.c \ + t1info.c \ + t1io.c \ + t1malloc.c \ + t1snap.c \ + t1unicode.c \ + token.c \ + type1.c \ + util.c + +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/bitmap/bitmapfunc.c b/libXfont/src/bitmap/bitmapfunc.c index e980dfbcc..670c0a900 100644 --- a/libXfont/src/bitmap/bitmapfunc.c +++ b/libXfont/src/bitmap/bitmapfunc.c @@ -107,6 +107,7 @@ static BitmapFileFunctionsRec readers[] = { #if XFONT_PCFFORMAT { pmfReadFont, pcfReadFontInfo} , #endif + { NULL, NULL } }; @@ -238,11 +239,12 @@ static FontRendererRec renderers[] = { #if XFONT_PCFFORMAT { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable, BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES } + CAPABILITIES }, #endif + { NULL, 0, NULL, 0, NULL, NULL, 0, 0 } }; -#define numRenderers (sizeof renderers / sizeof renderers[0]) +#define numRenderers (sizeof renderers / sizeof renderers[0] - 1) void BitmapRegisterFontFileFunctions (void) diff --git a/libXfont/src/bitmap/bitmaputil.c b/libXfont/src/bitmap/bitmaputil.c index 3487f7f92..43f93ca6e 100644 --- a/libXfont/src/bitmap/bitmaputil.c +++ b/libXfont/src/bitmap/bitmaputil.c @@ -37,13 +37,9 @@ from The Open Group. #include <X11/fonts/bitmap.h> #include <X11/fonts/bdfint.h> -#ifndef MAXSHORT #define MAXSHORT 32767 -#endif -#ifndef MINSHORT #define MINSHORT -32768 -#endif static xCharInfo initMinMetrics = { MAXSHORT, MAXSHORT, MAXSHORT, MAXSHORT, MAXSHORT, 0xFFFF}; diff --git a/libXfont/src/bitmap/bitscale.c b/libXfont/src/bitmap/bitscale.c index ffdbe1d3c..aedf5ee84 100644 --- a/libXfont/src/bitmap/bitscale.c +++ b/libXfont/src/bitmap/bitscale.c @@ -138,6 +138,7 @@ static const ScaleFunc scale[] = #if XFONT_PCFFORMAT PrinterScaleBitmaps, #endif + NULL }; static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, @@ -188,6 +189,7 @@ static const FindToScale find_scale[] = #if XFONT_PCFFORMAT FindPmfToScale, #endif + 0 }; static unsigned long bitscaleGeneration = 0; /* initialization flag */ diff --git a/libXfont/src/bitmap/makefile b/libXfont/src/bitmap/makefile new file mode 100644 index 000000000..9faa86a30 --- /dev/null +++ b/libXfont/src/bitmap/makefile @@ -0,0 +1,20 @@ +LIBRARY = libbitmap + +CSRCS = \ + bdfread.c \ + bdfutils.c \ + bitmap.c \ + bitmapfunc.c \ + bitmaputil.c \ + bitscale.c \ + fontink.c \ + pcfread.c \ + pcfwrite.c \ + snfread.c + +#DEFINES += XFONT_PCFFORMAT XFONT_SNFFORMAT XFONT_BDFFORMAT X_GZIP_FONT_COMPRESSION + +INCLUDES := ../../../../build $(INCLUDES) + +#INCLUDE=$(INCLUDE);..\..\include\X11;..\..\src\xlibi18n;..\..\src + diff --git a/libXfont/src/builtins/makefile b/libXfont/src/builtins/makefile new file mode 100644 index 000000000..bde6d880f --- /dev/null +++ b/libXfont/src/builtins/makefile @@ -0,0 +1,10 @@ +LIBRARY = libbuiltins + +CSRCS = dir.c \ + file.c \ + fonts.c \ + fpe.c \ + render.c + +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/fc/fsio.c b/libXfont/src/fc/fsio.c index 2b55f8520..dfac4b9f9 100644 --- a/libXfont/src/fc/fsio.c +++ b/libXfont/src/fc/fsio.c @@ -34,6 +34,7 @@ #ifdef WIN32 #define _WILLWINSOCK_ +#include "X11/Xwinsock.h" #include "X11/Xwindows.h" #endif diff --git a/libXfont/src/fc/fstrans.c b/libXfont/src/fc/fstrans.c index c334c2504..74a884e63 100644 --- a/libXfont/src/fc/fstrans.c +++ b/libXfont/src/fc/fstrans.c @@ -22,6 +22,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> +#include <dix-config.h> #endif #define FONT_t #define TRANS_CLIENT diff --git a/libXfont/src/fc/makefile b/libXfont/src/fc/makefile new file mode 100644 index 000000000..51b78369c --- /dev/null +++ b/libXfont/src/fc/makefile @@ -0,0 +1,9 @@ +LIBRARY = libfc + +CSRCS = fsconvert.c \ + fserve.c \ + fsio.c \ + fstrans.c + +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c index d49423617..651ebc1a0 100644 --- a/libXfont/src/fontfile/catalogue.c +++ b/libXfont/src/fontfile/catalogue.c @@ -30,8 +30,12 @@ #include <X11/fonts/fntfilst.h> #include <sys/types.h> #include <sys/stat.h> +#ifdef _MSC_VER +#include <direct.h> +#else #include <dirent.h> #include <unistd.h> +#endif static const char CataloguePrefix[] = "catalogue:"; @@ -135,19 +139,24 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) FontPathElementPtr subfpe; struct stat statbuf; const char *path; +#ifndef _MSC_VER DIR *dir; struct dirent *entry; +#endif int len; int pathlen; path = fpe->name + strlen(CataloguePrefix); - if (stat(path, &statbuf) < 0 || !S_ISDIR(statbuf.st_mode)) + if (stat(path, &statbuf) < 0 || (statbuf.st_mode&_S_IFDIR)) return BadFontPath; if ((forceScan == FALSE) && (statbuf.st_mtime <= cat->mtime)) return Successful; - dir = opendir(path); +#ifdef _MSC_VER +__asm int 3; +#else + dir = opendir(path); if (dir == NULL) { xfree(cat); @@ -221,7 +230,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) } closedir(dir); - +#endif qsort(cat->fpeList, cat->fpeCount, sizeof cat->fpeList[0], ComparePriority); diff --git a/libXfont/src/fontfile/fontfile.c b/libXfont/src/fontfile/fontfile.c index f900f7508..3a0391835 100644 --- a/libXfont/src/fontfile/fontfile.c +++ b/libXfont/src/fontfile/fontfile.c @@ -40,7 +40,10 @@ in this Software without prior written authorization from The Open Group. #ifdef WIN32 #include <ctype.h> #endif - +#ifdef _MSC_VER +#define BOOL W32BOOL +#include <windows.h> +#endif /* * Map FPE functions to renderer functions */ @@ -54,6 +57,32 @@ static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont, int FontFileNameCheck (char *name) { +#ifdef _MSC_VER + WIN32_FIND_DATA FindData; + HANDLE hFind; + char Tmp; + int LenName=strlen(name)-1; + Tmp=name[LenName]; + if (Tmp=='/') + name[LenName]=0; + hFind=FindFirstFile(name,&FindData); + name[LenName]=Tmp; + + if (hFind==INVALID_HANDLE_VALUE) + { + return 0; + } + else + { + FindClose(hFind); + if (FindData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) + { + return 1; + } + return 0; + } + +#else #ifndef NCD #if defined(__UNIXOS2__) || defined(WIN32) /* OS/2 uses D:/... as a path name for fonts, so accept this as a valid @@ -66,6 +95,7 @@ FontFileNameCheck (char *name) #else return ((strcmp(name, "built-ins") == 0) || (*name == '/')); #endif +#endif } int diff --git a/libXfont/src/fontfile/makefile b/libXfont/src/fontfile/makefile new file mode 100644 index 000000000..019c87802 --- /dev/null +++ b/libXfont/src/fontfile/makefile @@ -0,0 +1,33 @@ +#FONTENCDIR=@ENCODINGSDIR@ +#FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(FONTENCDIR)/encodings.dir\" + +LIBRARY = libfontfile + +INCLUDES += $(MHMAKECONF)\zlib\src\zlib-1.2.3 + +#DEFINES += XFONT_TYPE1 XFONT_SPEEDO XFONT_BITMAP XFONT_FREETYPE BUILD_SPEEDO BUILD_TYPE1 BUILD_FREETYPE X_GZIP_FONT_COMPRESSION +DEFINES += X_GZIP_FONT_COMPRESSION + +CSRCS = bitsource.c \ + bufio.c \ + decompress.c \ + defaults.c \ + dirfile.c \ + ffcheck.c \ + fileio.c \ + filewr.c \ + fontdir.c \ + fontencc.c \ + fontfile.c \ + fontscale.c \ + gunzip.c \ + printerfont.c \ + register.c \ + renderers.c \ + catalogue.c + +#if X_BZIP2_FONT_COMPRESSION +#libfontfile_la_SOURCES += bunzip2.c +#endif +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/makefile b/libXfont/src/makefile new file mode 100644 index 000000000..3e0cbfae0 --- /dev/null +++ b/libXfont/src/makefile @@ -0,0 +1,78 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Keith Packard not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Keith Packard makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +lib_LTLIBRARIES = libXfont.la + +if XFONT_FONTFILE +FONTFILE_DIR = fontfile +FONTFILE_LIB = fontfile/libfontfile.la +endif + +if XFONT_FREETYPE +FREETYPE_DIR = FreeType +FREETYPE_LIB = FreeType/libft.la +endif + +if XFONT_BITMAP +BITMAP_DIR = bitmap +BITMAP_LIB = bitmap/libbitmap.la +endif + +if XFONT_BUILTINS +BUILTINS_DIR = builtins +BUILTINS_LIB = builtins/libbuiltins.la +endif + +if XFONT_FC +FC_DIR = fc +FC_LIB = fc/libfc.la +endif + +if XFONT_TYPE1 +TYPE1_DIR = Type1 +TYPE1_LIB = Type1/libtype1.la +endif + +if XFONT_SPEEDO +SPEEDO_DIR = Speedo +SPEEDO_LIB = Speedo/libspeedo.la +endif + +UTIL_DIR = util +UTIL_LIB = util/libutil.la + +STUBS_LIB = stubs/libstubs.la +STUBS_DIR = stubs + +SUBDIRS=\ + $(FONTFILE_DIR) $(FREETYPE_DIR) $(BITMAP_DIR) \ + $(BUILTINS_DIR) $(FC_DIR) $(UTIL_DIR) $(STUBS_DIR) \ + $(TYPE1_DIR) $(SPEEDO_DIR) + +libXfont_la_LIBADD = \ + $(FONTFILE_LIB) $(FREETYPE_LIB) $(BITMAP_LIB) \ + $(BUILTINS_LIB) $(FC_LIB) $(UTIL_LIB) $(STUBS_LIB) \ + $(TYPE1_LIB) $(SPEEDO_LIB) \ + $(FREETYPE_LIBS) $(Z_LIBS) $(MATH_LIBS) $(XFONT_LIBS) + +libXfont_la_SOURCES = dummy.c + +libXfont_la_LDFLAGS = -version-number 1:4:1 -no-undefined diff --git a/libXfont/src/stubs/makefile b/libXfont/src/stubs/makefile new file mode 100644 index 000000000..66cfc644f --- /dev/null +++ b/libXfont/src/stubs/makefile @@ -0,0 +1,27 @@ +LIBRARY = libstubs + +CSRCS = \ + cauthgen.c \ + csignal.c \ + delfntcid.c \ + errorf.c \ + fatalerror.c \ + findoldfnt.c \ + fontmod.c \ + getcres.c \ + getdefptsize.c \ + getnewfntcid.c \ + gettime.c \ + initfshdl.c \ + regfpefunc.c \ + rmfshdl.c \ + servclient.c \ + setfntauth.c \ + stfntcfnt.c \ + stubs.h \ + xpstubs.c + +CSRCS:=$(filter-out %.h,$(CSRCS)) + +INCLUDES := ../../../../build $(INCLUDES) + diff --git a/libXfont/src/util/fontxlfd.c b/libXfont/src/util/fontxlfd.c index 7adf74f4c..f402aa9dd 100644 --- a/libXfont/src/util/fontxlfd.c +++ b/libXfont/src/util/fontxlfd.c @@ -36,6 +36,7 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include <float.h> #include <X11/fonts/fontmisc.h> #include <X11/fonts/fontstruct.h> #include <X11/fonts/fontxlfd.h> @@ -203,7 +204,6 @@ xlfd_round_double(double x) defined(__amd64__) || defined(__amd64) || \ defined(sgi) #if !defined(__UNIXOS2__) -#include <float.h> /* if we have IEEE 754 fp, we can round to binary digits... */ @@ -243,7 +243,7 @@ xlfd_round_double(double x) j = 1 << ((DBL_MANT_DIG-XLFD_NDIGITS_2) & 0x07); for (; i<7; i++) { k = d.b[i] + j; - d.b[i] = k; + d.b[i] = k&0xff; if (k & 0x100) j = 1; else break; } diff --git a/libXfont/src/util/makefile b/libXfont/src/util/makefile new file mode 100644 index 000000000..69cbeac95 --- /dev/null +++ b/libXfont/src/util/makefile @@ -0,0 +1,10 @@ +LIBRARY = libutil + +INCLUDES += ../stubs + +CSRCS = atom.c fontaccel.c fontnames.c fontutil.c fontxlfd.c format.c miscutil.c \ + patcache.c private.c utilbitmap.c + +INCLUDES := ../../../../build $(INCLUDES) + + |