summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:12 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:49:12 +0000
commitcda1111da10a2dfe4e7e647ba099f74703833c8f (patch)
tree41123e3c0eefe5958e873eb5d11314dea956cc5e
parenta5a7a469cf31cfcb12ad8693113af63db2cbe917 (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASEXINERAMA_2XEVIE
-rw-r--r--dsimple.c4
-rw-r--r--dsimple.h24
-rw-r--r--xlsfonts.c24
3 files changed, 17 insertions, 35 deletions
diff --git a/dsimple.c b/dsimple.c
index bbdbd93..cd4cbc9 100644
--- a/dsimple.c
+++ b/dsimple.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/xlsfonts/dsimple.c,v 3.6 2001/12/14 20:02:09 dawes Exp $ */
+/* $XFree86: xc/programs/xlsfonts/dsimple.c,v 3.7 2003/09/24 02:43:38 dawes Exp $ */
#include <X11/Xos.h>
#include <X11/Xlib.h>
@@ -306,7 +306,7 @@ Window Select_Window_Args(rargc, argv)
w=0;
sscanf(OPTION, "0x%lx", &w);
if (!w)
- sscanf(OPTION, "%ld", &w);
+ sscanf(OPTION, "%lu", &w);
if (!w)
Fatal_Error("Invalid window id format: %s.", OPTION);
continue;
diff --git a/dsimple.h b/dsimple.h
index a11cae7..7efd5c0 100644
--- a/dsimple.h
+++ b/dsimple.h
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/xlsfonts/dsimple.h,v 1.8 2002/12/24 17:43:01 tsi Exp $ */
+/* $XFree86: xc/programs/xlsfonts/dsimple.h,v 1.9 2003/11/17 22:20:54 dawes Exp $ */
/*
* Just_display.h: This file contains the definitions needed to use the
@@ -50,7 +50,6 @@ extern int screen; /* The current screen */
/* Declaritions for functions in just_display.c */
-#if NeedFunctionPrototypes
char *Malloc(unsigned);
char *Realloc(char *, int);
char *Get_Display_Name(int *, char **);
@@ -62,19 +61,6 @@ Pixmap ReadBitmapFile(Drawable, char *, int *, int *, int *, int *);
void WriteBitmapFile(char *, Pixmap, int, int, int, int);
Window Select_Window_Args(int *, char **);
void usage(void);
-#else
-char *Malloc();
-char *Realloc();
-char *Get_Display_Name();
-Display *Open_Display();
-void Setup_Display_And_Screen();
-XFontStruct *Open_Font();
-void Beep();
-Pixmap ReadBitmapFile();
-void WriteBitmapFile();
-Window Select_Window_Args();
-void usage();
-#endif
#define X_USAGE "[host:display]" /* X arguments handled by
Get_Display_Name */
@@ -87,19 +73,11 @@ void usage();
* Send bugs, etc. to chariot@athena.mit.edu.
*/
-#if NeedFunctionPrototypes
unsigned long Resolve_Color(Window, char *);
Pixmap Bitmap_To_Pixmap(Display *, Drawable, GC, Pixmap, int, int);
Window Select_Window(Display *);
void blip(void);
Window Window_With_Name(Display *, Window, char *);
-#else
-unsigned long Resolve_Color();
-Pixmap Bitmap_To_Pixmap();
-Window Select_Window();
-void blip();
-Window Window_With_Name();
-#endif
#ifdef __GNUC__
void Fatal_Error(char *, ...) __attribute__((__noreturn__));
#else
diff --git a/xlsfonts.c b/xlsfonts.c
index 52aced8..fa22341 100644
--- a/xlsfonts.c
+++ b/xlsfonts.c
@@ -24,7 +24,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* */
-/* $XFree86: xc/programs/xlsfonts/xlsfonts.c,v 1.8 2001/12/14 20:02:10 dawes Exp $ */
+/* $XFree86: xc/programs/xlsfonts/xlsfonts.c,v 1.10 2003/09/13 21:33:11 dawes Exp $ */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -57,13 +57,10 @@ typedef struct {
FontList *font_list;
-#if NeedFunctionPrototypes
-extern void usage(void);
-extern int main(int, char **);
-extern void get_list(char *);
-extern void show_fonts(void);
-extern void copy_number(char **, char **, int, int);
-extern void do_query_font(Display *, char *);
+static void get_list(char *);
+static void show_fonts(void);
+static void copy_number(char **, char **, int, int);
+static void do_query_font(Display *, char *);
static int compare(const void *, const void *);
#ifndef max
static int max(int, int);
@@ -72,7 +69,6 @@ static int IgnoreError(Display *, XErrorEvent *);
static void PrintProperty(XFontProp *);
static void ComputeFontType(XFontStruct *);
static void print_character_metrics(register XFontStruct *);
-#endif
void
@@ -477,6 +473,9 @@ static char* stringValued [] = { /* values are atoms */
"RASTERIZER_NAME",
"RASTERIZER_VERSION",
+ /* other registered font properties (see the X.org Registry, sec. 15) */
+ "_ADOBE_POSTSCRIPT_FONTNAME",
+
/* unregistered font properties */
"CHARSET_COLLECTIONS",
"CLASSIFICATION",
@@ -504,7 +503,12 @@ static void PrintProperty (prop)
(void)sprintf (atom, "No such atom = %ld", prop->name);
}
printf (" %s", atom);
- for (i = strlen(atom); i < 22; i++) printf (" ");
+
+ /* Pad out to a column width of 22, but ensure there is always at
+ least one space between property name & value. */
+ for (i = strlen(atom); i < 21; i++) putchar (' ');
+ putchar(' ');
+
for (i = 0; ; i++) {
if (stringValued[i] == NULL) {
printf ("%ld\n", prop->card32);