Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit merge bdftopcf 1.1.1 and fstobdf 1.0.7.



details:   https://anonhg.NetBSD.org/xsrc/rev/cd7a9b69fc6b
branches:  trunk
changeset: 7189:cd7a9b69fc6b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Oct 16 22:48:18 2022 +0000

description:
merge bdftopcf 1.1.1 and fstobdf 1.0.7.

diffstat:

 external/mit/bdftopcf/dist/README   |  30 -----------
 external/mit/bdftopcf/dist/stubs.h  |  79 -------------------------------
 external/mit/fstobdf/dist/README    |  28 -----------
 external/mit/fstobdf/dist/fstobdf.c |  94 ++++++++++++++++++------------------
 4 files changed, 46 insertions(+), 185 deletions(-)

diffs (296 lines):

diff -r 55f0aaf06289 -r cd7a9b69fc6b external/mit/bdftopcf/dist/README
--- a/external/mit/bdftopcf/dist/README Sun Oct 16 22:46:00 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-bdftopcf is a font compiler for the X server and font server.  Fonts
-in Portable Compiled Format can be read by any architecture, although
-the file is structured to allow one particular architecture to read
-them directly without reformatting.  This allows fast reading on the
-appropriate machine, but the files are still portable (but read more
-slowly) on other machines.
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
-        git://anongit.freedesktop.org/git/xorg/app/bdftopcf
-
-        http://cgit.freedesktop.org/xorg/app/bdftopcf
-
-For patch submission instructions, see:
-
-       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
-
diff -r 55f0aaf06289 -r cd7a9b69fc6b external/mit/bdftopcf/dist/stubs.h
--- a/external/mit/bdftopcf/dist/stubs.h        Sun Oct 16 22:46:00 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#include <stdio.h>
-#include "fntfilst.h"
-#include "font.h"
-
-#ifndef True
-#define True (-1)
-#endif
-#ifndef False
-#define False (0)
-#endif
-
-/* this probably works for Mach-O too, but probably not for PE */
-#if defined(__ELF__) && defined(__GNUC__) && (__GNUC__ >= 3)
-#define weak __attribute__((weak))
-#else
-#define weak
-#ifndef __SUNPRO_C /* Sun compilers use #pragma weak in .c files instead */
-#define NO_WEAK_SYMBOLS
-#endif
-#endif
-
-#if defined(NO_WEAK_SYMBOLS) && defined(PIC)
-#include <stdarg.h>
-extern int _font_init_stubs(void);
-#define OVERRIDE_DATA(sym) \
-    _font_init_stubs(); \
-    if (__ptr_##sym && __ptr_##sym != &sym) \
-      sym = *__ptr_##sym
-#define OVERRIDE_SYMBOL(sym,...) \
-    _font_init_stubs(); \
-    if (__##sym && __##sym != sym) \
-      return (*__##sym)(__VA_ARGS__)
-#define OVERRIDE_VA_SYMBOL(sym,f) \
-    va_list _args; \
-    _font_init_stubs(); \
-    va_start(_args, f); \
-    if (__##sym) \
-      (*__##sym)(f, _args); \
-    va_end(_args)
-
-extern int (*__client_auth_generation)(ClientPtr);
-extern Bool (*__ClientSignal)(ClientPtr);
-extern void (*__DeleteFontClientID)(Font);
-extern void (*__VErrorF)(const char *, va_list);
-extern FontPtr (*__find_old_font)(FSID);
-extern FontResolutionPtr (*__GetClientResolutions)(int *);
-extern int (*__GetDefaultPointSize)(void);
-extern Font (*__GetNewFontClientID)(void);
-extern unsigned long (*__GetTimeInMillis)(void);
-extern int (*__init_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr);
-extern int (*__RegisterFPEFunctions)(NameCheckFunc, InitFpeFunc, FreeFpeFunc,
-            ResetFpeFunc, OpenFontFunc, CloseFontFunc, ListFontsFunc,
-            StartLfwiFunc, NextLfwiFunc, WakeupFpeFunc, ClientDiedFunc,
-            LoadGlyphsFunc, StartLaFunc, NextLaFunc, SetPathFunc);
-extern void (*__remove_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr, Bool);
-extern void **__ptr_serverClient;
-extern int (*__set_font_authorizations)(char **, int *, ClientPtr);
-extern int (*__StoreFontClientFont)(FontPtr, Font);
-extern Atom (*__MakeAtom)(const char *, unsigned, int);
-extern int (*__ValidAtom)(Atom);
-extern char *(*__NameForAtom)(Atom);
-extern unsigned long *__ptr_serverGeneration;
-extern void (*__register_fpe_functions)(void);
-#else /* NO_WEAK_SYMBOLS && PIC */
-#define OVERRIDE_DATA(sym)
-#define OVERRIDE_SYMBOL(sym,...)
-#define OVERRIDE_VA_SYMBOL(sym,f)
-#endif
-
-extern FontPtr find_old_font ( FSID id );
-extern int set_font_authorizations ( char **authorizations,
-                                    int *authlen,
-                                    ClientPtr client );
-
-extern unsigned long GetTimeInMillis (void);
-
-extern void ErrorF(const char *format, ...);
-
-/* end of file */
diff -r 55f0aaf06289 -r cd7a9b69fc6b external/mit/fstobdf/dist/README
--- a/external/mit/fstobdf/dist/README  Sun Oct 16 22:46:00 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-The fstobdf program reads a font from a font server and prints a BDF
-file on the standard output that may be used to recreate the font.
-This is useful in testing servers, debugging font metrics, and
-reproducing lost BDF files.
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
-        git://anongit.freedesktop.org/git/xorg/app/fstobdf
-
-        http://cgit.freedesktop.org/xorg/app/fstobdf
-
-For patch submission instructions, see:
-
-       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
-
diff -r 55f0aaf06289 -r cd7a9b69fc6b external/mit/fstobdf/dist/fstobdf.c
--- a/external/mit/fstobdf/dist/fstobdf.c       Sun Oct 16 22:46:00 2022 +0000
+++ b/external/mit/fstobdf/dist/fstobdf.c       Sun Oct 16 22:48:18 2022 +0000
@@ -44,7 +44,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
 #include       <stdio.h>
@@ -59,9 +59,8 @@
     if (msg)
         fprintf(stderr, "%s: %s\n", progName, msg);
     fprintf(stderr,
-           "Usage: %s [-server <font server>] -fn <font name>\n"
-           "   or: %s -version\n",
-           progName, progName);
+            "Usage: %s [-server <font server>] -fn <font name>\n"
+            "  or: %s -version\n", progName, progName);
     exit(0);
 }
 
@@ -75,79 +74,78 @@
 int
 main(int argc, char *argv[])
 {
-    FSServer   *fontServer;
-    Font        fontID,
-                dummy;
+    FSServer *fontServer;
+    Font fontID, dummy;
     FSBitmapFormat bitmapFormat;
     FSXFontInfoHeader fontHeader;
-    FSPropInfo  propInfo;
+    FSPropInfo propInfo;
     FSPropOffset *propOffsets;
     unsigned char *propData;
 
-    FILE       *outFile;
-    char       *fontName;
-    char       *serverName;
-    int         i;
+    FILE *outFile;
+    char *fontName;
+    char *serverName;
+    int i;
 
     fontName = NULL;
     serverName = NULL;
     outFile = stdout;
 
     for (i = 1; i < argc; i++) {
-       if (!strncmp(argv[i], "-s", 2)) {
-           if (argv[++i])
-               serverName = argv[i];
-           else
-               usage(argv[0], "-server requires an argument");
-       } else if (!strncmp(argv[i], "-fn", 3)) {
-           if (argv[++i])
-               fontName = argv[i];
-           else
-               usage(argv[0], "-fn requires an argument");
-       }
-       else if (!strcmp(argv[i], "-version")) {
-           printf("%s\n", PACKAGE_STRING);
-           exit(0);
-       }
-       else {
-           fprintf(stderr, "%s: unrecognized option '%s'\n",
-                   argv[0], argv[i]);
-           usage(argv[0], NULL);
-       }
+        if (!strncmp(argv[i], "-s", 2)) {
+            if (argv[++i])
+                serverName = argv[i];
+            else
+                usage(argv[0], "-server requires an argument");
+        }
+        else if (!strncmp(argv[i], "-fn", 3)) {
+            if (argv[++i])
+                fontName = argv[i];
+            else
+                usage(argv[0], "-fn requires an argument");
+        }
+        else if (!strcmp(argv[i], "-version")) {
+            printf("%s\n", PACKAGE_STRING);
+            exit(0);
+        }
+        else {
+            fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], argv[i]);
+            usage(argv[0], NULL);
+        }
     }
 
     if (fontName == NULL)
-       usage(argv[0], "No font name specified");
+        usage(argv[0], "No font name specified");
 
     fontServer = FSOpenServer(serverName);
     if (!fontServer) {
-       const char *sn = FSServerName(serverName);
-       if (sn)
-           fprintf(stderr, "%s: can't open font server \"%s\"\n",
-                   argv[0], sn);
-       else
-           usage(argv[0], "No font server specified.");
-       exit(0);
+        const char *sn = FSServerName(serverName);
+
+        if (sn)
+            fprintf(stderr, "%s: can't open font server \"%s\"\n", argv[0], sn);
+        else
+            usage(argv[0], "No font server specified.");
+        exit(0);
     }
     bitmapFormat = 0;
     fontID = FSOpenBitmapFont(fontServer, bitmapFormat, (FSBitmapFormatMask) 0,
-                             fontName, &dummy);
+                              fontName, &dummy);
     if (!fontID) {
-       printf("can't open font \"%s\"\n", fontName);
-       exit(0);
+        printf("can't open font \"%s\"\n", fontName);
+        exit(0);
     }
     FSQueryXInfo(fontServer, fontID, &fontHeader, &propInfo, &propOffsets,
-                &propData);
+                 &propData);
 
     if (!EmitHeader(outFile, &fontHeader, &propInfo, propOffsets, propData))
-       Fail(argv[0]);
+        Fail(argv[0]);
     if (!EmitProperties(outFile, &fontHeader, &propInfo, propOffsets, propData))
-       Fail(argv[0]);
+        Fail(argv[0]);
     if (!EmitCharacters(outFile, fontServer, &fontHeader, fontID))
-       Fail(argv[0]);
+        Fail(argv[0]);
     fprintf(outFile, "ENDFONT\n");
 
     FSFree((char *) propOffsets);
     FSFree((char *) propData);
-    exit (0);
+    exit(0);
 }



Home | Main Index | Thread Index | Old Index