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>
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;
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
/* Declaritions for functions in just_display.c */
-#if NeedFunctionPrototypes
char *Malloc(unsigned);
char *Realloc(char *, int);
char *Get_Display_Name(int *, char **);
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 */
* 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
from The Open Group.
*/
-/* $XFree86: xc/programs/xprop/xprop.c,v 1.12 2002/12/02 22:10:23 tsi Exp $ */
+/* $XFree86: xc/programs/xprop/xprop.c,v 1.16 2003/10/31 21:49:48 herrb Exp $ */
#include <X11/Xlib.h>
}
static const char *
-Scan_Octal (const char *string, long *value)
+Scan_Octal (const char *string, unsigned long *value)
{
if (sscanf(string, "%lo", value)!=1)
Fatal_Error("Bad octal number: %s.", string);
{"RECTANGLE", XA_RECTANGLE, "16iicc", RECTANGLE_DFORMAT },
{"RGB_COLOR_MAP", XA_RGB_COLOR_MAP,"32xcccccccxx",RGB_COLOR_MAP_DFORMAT},
{"STRING", XA_STRING, "8s", 0 },
- {"WINDOW", XA_WINDOW, "32x", ": window id # $0\n" },
+ {"WINDOW", XA_WINDOW, "32x", ": window id # $0+\n" },
{"VISUALID", XA_VISUALID, "32x", ": visual id # $0\n" },
{"WM_COLORMAP_WINDOWS", 0, "32x", ": window id # $0+\n"},
{"WM_COMMAND", XA_WM_COMMAND, "8s", " = { $0+ }\n" },
Handle_Backslash (const char *dformat)
{
char c;
- long i;
+ unsigned long i;
if (!(c = *(dformat++)))
return dformat;
static unsigned short data16[MAXELEMENTS];
static unsigned long data32[MAXELEMENTS];
unsigned long intvalue;
- unsigned char * value2 = strdup(value);
- unsigned char * tmp = strtok(value2,",");
+ char * value2 = strdup(value);
+ char * tmp = strtok(value2,",");
nelements = 1;
intvalue = strtoul(tmp, NULL, 0);
switch(size) {
static unsigned short data16[MAXELEMENTS];
static unsigned long data32[MAXELEMENTS];
unsigned long intvalue;
- unsigned char * value2 = strdup(value);
- unsigned char * tmp = strtok(value2,",");
+ char * value2 = strdup(value);
+ char * tmp = strtok(value2,",");
nelements = 1;
intvalue = strtoul(tmp, NULL, 0);
switch(size) {
Fatal_Error("Bad format: %s.", format);
dformat = NULL;
- if (ARGC>0 && Is_A_DFormat(ARGV[1])) {
+ if (ARGC>1 && Is_A_DFormat(ARGV[1])) {
ARGV++; ARGC--; dformat = OPTION;
}