Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.471 diff -u -2 -0 -r1.471 ChangeLog --- xc/ChangeLog 17 Oct 2004 22:47:03 -0000 1.471 +++ xc/ChangeLog 17 Oct 2004 23:02:31 -0000 @@ -1,20 +1,26 @@ +2004-10-17 Roland Mainz + * xc/programs/xset/Imakefile + * xc/programs/xset/xset.c + Bugzilla #1659: Fix built problem which caused the Xprint support + in "xset" not being build. + 2004-10-17 Alex Deucher * programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c: - Fix DFP detection in r128 driver (bug 1386, Klaus Kusche) * programs/Xserver/hw/xfree86/input/mouse/mouse.c: (MouseCommonOptions): * programs/Xserver/hw/xfree86/input/mouse/mouse.man: - Fix EmulateWheelInertia defaults (bug 1115, Andrew Pimlott) 2004-10-17 Alex Deucher * programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c: (S3PreInit), (S3ModeInit): - Add interlaced support to S3 driver (bug 332, Leo Savernik) * programs/Xserver/hw/xfree86/input/mouse/mouse.c: (MouseCommonOptions), (MouseProc), (MouseDoPostEvent): * programs/Xserver/hw/xfree86/input/mouse/mouse.man: * programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h: - EmulateWheelTimeout (bug 323, Mathias Fröhlich) - single button double-click (bug 322, Rob Brown) Index: xc/programs/xset/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/xset/Imakefile,v retrieving revision 1.7 diff -u -2 -0 -r1.7 Imakefile --- xc/programs/xset/Imakefile 2 Sep 2004 08:40:33 -0000 1.7 +++ xc/programs/xset/Imakefile 17 Oct 2004 23:03:16 -0000 @@ -1,28 +1,28 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:55:03 cpqbld Exp $ XCOMM $XFree86: xc/programs/xset/Imakefile,v 3.10 2001/01/17 23:46:27 dawes Exp $ #if BuildXF86MiscLibrary DEPXF86LIBS = $(DEPXXF86MISCLIB) XF86LIBS = $(XXF86MISCLIB) #endif #if BuildFontCacheLib DEPFONTLIBS = $(DEPXFONTCACHELIB) FONTLIBS = $(XFONTCACHELIB) #endif #if BuildXprintLib && BuildXprintClients DEPXPRINTLIBS = $(DEPXPRINTLIB) XPRINTLIBS = $(XPLIB) - XPRINTDEFINES = -DINCLUDE_XPRINT_SUPPORT + XPRINTDEFINES = -DBUILD_PRINTSUPPORT #endif DEFINES = ExtensionDefines DPMSDefines \ FontCacheExtensionDefines \ - XkbDefines + XkbDefines $(XPRINTDEFINES) DEPLIBS = $(DEPXMUULIB) $(DEPXLIB) $(DEPXF86LIBS) $(DEPFONTLIBS) LOCAL_LIBRARIES = $(XMUULIB) $(XF86LIBS) $(FONTLIBS) $(XPRINTLIBS) $(XLIB) SimpleProgramTarget(xset) Index: xc/programs/xset/xset.c =================================================================== RCS file: /cvs/xorg/xc/programs/xset/xset.c,v retrieving revision 1.5 diff -u -2 -0 -r1.5 xset.c --- xc/programs/xset/xset.c 2 Sep 2004 05:50:38 -0000 1.5 +++ xc/programs/xset/xset.c 17 Oct 2004 23:03:16 -0000 @@ -71,41 +71,41 @@ #include #include #include #ifdef MITMISC #include #endif #ifdef XF86MISC #include #include #endif #ifdef XKB #include #endif #ifdef FONTCACHE #include #include static Status set_font_cache(Display *, long, long, long); static void query_cache_status(Display *dpy); #endif -#ifdef INCLUDE_XPRINT_SUPPORT +#ifdef BUILD_PRINTSUPPORT #include #endif #define ON 1 #define OFF 0 #define SERVER_DEFAULT (-1) #define DONT_CHANGE -2 #define DEFAULT_ON (-50) #define DEFAULT_TIMEOUT (-600) #define ALL -1 #define TIMEOUT 1 #define INTERVAL 2 #define PREFER_BLANK 3 #define ALLOW_EXP 4 #ifdef XF86MISC #define KBDDELAY_DEFAULT 500 @@ -189,41 +189,41 @@ #endif progName = argv[0]; for (i = 1; i < argc; i++) { arg = argv[i]; if (strcmp (arg, "-display") == 0 || strcmp (arg, "-d") == 0) { if (++i >= argc) usage ("missing argument to -display", NULL); disp = argv[i]; } else { hasargs = True; } } if (!hasargs) { usage (NULL, NULL); /* replace with window interface */ } dpy = XOpenDisplay(disp); /* Open display and check for success */ if (dpy == NULL) { fprintf(stderr, "%s: unable to open display \"%s\"\n", argv[0], XDisplayName (disp)); - exit(1); + exit(EXIT_FAILURE); } XSetErrorHandler (local_xerror); for (i = 1; i < argc; ) { arg = argv[i++]; if (strcmp (arg, "-display") == 0 || strcmp (arg, "-d") == 0) { ++i; /* already dealt with */ continue; } else if (*arg == '-' && *(arg + 1) == 'c'){ /* Does arg start with "-c"? */ set_click(dpy, 0); /* If so, turn click off and */ } else if (*arg == 'c') { /* Well, does it start with "c", then? */ percent = SERVER_DEFAULT; /* Default click volume. */ if (i >= argc) { set_click (dpy, percent); /* set click to default */ break; } arg = nextarg(i, argv); if (strcmp(arg, "on") == 0) { /* Let click be default. */ percent = DEFAULT_ON; i++; @@ -339,41 +339,41 @@ } arg = nextarg(i, argv); if (is_number(arg, 90)) { balance = atoi(arg); i++; if (!(10 <= balance && balance <= 90)) { usage("balance must be 10 to 90\n"); } set_font_cache(dpy, himark, lowmark, balance); } } } else if (strcmp(arg, "s") == 0 || strcmp(arg, "status") == 0) { /* display cache status */ query_cache_status(dpy); } } else { fprintf(stderr, "server does not have extension for fc option\n"); } } #endif -#ifdef INCLUDE_XPRINT_SUPPORT +#ifdef BUILD_PRINTSUPPORT else if (strcmp(arg, "rehashprinterlist") == 0) { /* rehash list of printers */ short dummy; if (XpQueryVersion(dpy, &dummy, &dummy)) { XpRehashPrinterList(dpy); } else { fprintf(stderr, "server does not have extension for rehashprinterlist option\n"); } } #endif else if (strcmp(arg, "fp") == 0) { /* set font path */ if (i >= argc) { arg = "default"; } else { arg = nextarg(i, argv); } set_font_path(dpy, arg, 1, 0, 0); /* special argument */ i++; } else if (strcmp(arg, "fp=") == 0) { /* unconditionally set */ if (i >= argc) { @@ -500,54 +500,54 @@ } arg = argv[i]; if (*arg >= '0' && *arg <= '9') { sscanf(arg, "%hu", &standby_timeout); i++; arg = argv[i]; if ((arg)&&(*arg >= '0' && *arg <= '9')) { sscanf(arg, "%hu", &suspend_timeout); i++; arg = argv[i]; if ((arg)&&(*arg >= '0' && *arg <= '9')) { sscanf(arg, "%hu", &off_timeout); i++; arg = argv[i]; } } if ((suspend_timeout != 0)&&(standby_timeout > suspend_timeout)) { fprintf(stderr, "illegal combination of values\n"); fprintf(stderr, " standby time of %d is greater than suspend time of %d\n", standby_timeout, suspend_timeout); - exit(0); + exit(EXIT_FAILURE); } if ((off_timeout != 0)&&(suspend_timeout > off_timeout)) { fprintf(stderr, "illegal combination of values\n"); fprintf(stderr, " suspend time of %d is greater than off time of %d\n", suspend_timeout, off_timeout); - exit(0); + exit(EXIT_FAILURE); } if ((suspend_timeout == 0)&&(off_timeout != 0)&& (standby_timeout > off_timeout)) { fprintf(stderr, "illegal combination of values\n"); fprintf(stderr, " standby time of %d is greater than off time of %d\n", standby_timeout, off_timeout); - exit(0); + exit(EXIT_FAILURE); } DPMSEnable(dpy); DPMSSetTimeouts(dpy, standby_timeout, suspend_timeout, off_timeout); } else if (i+1 < argc && strcmp(arg, "force") == 0) { i++; arg = argv[i]; /* * The calls to usleep below are necessary to delay the actual * DPMS mode setting briefly. Without them, it's likely that the * mode will be set between the Down and Up key transitions, in * which case the Up transition may immediately turn the display * back on. * * On OS/2, use _sleep2() */ #ifdef SVR4 # ifdef sun /* Anything to avoid linking with -lposix4 */ # define Usleep(us) { \ @@ -931,41 +931,41 @@ } } directoryList = (char **) malloc (ndirs*sizeof (char *)); if (!directoryList) error ("out of memory for font path directory list"); { /* mung the path and set directoryList pointers */ int i = 0; char *cp = path; directoryList[i++] = cp; while ((cp = strchr(cp, ',')) != NULL) { directoryList[i++] = cp + 1; *cp++ = '\0'; } if (i != ndirs) { fprintf (stderr, "%s: internal error, only parsed %d of %d directories.\n", progName, i, ndirs); - exit (1); + exit (EXIT_FAILURE); } } /* * now we have have parsed the input path, so we can set it */ if (before == 0 && after == 0) { XSetFontPath (dpy, directoryList, ndirs); } /* if adding to list, build a superset */ if (before > 0 || after > 0) { int nnew = ndirs + ncurrent; char **newList = (char **) malloc (nnew * sizeof (char *)); if (!newList) error ("out of memory"); if (before > 0) { /* new + current */ memmove( (char *) newList, (char *) directoryList, (unsigned) (ndirs*sizeof (char *))); @@ -1496,81 +1496,81 @@ #ifdef DPMSExtension fprintf (stderr, " To control Energy Star (DPMS) features:\n"); fprintf (stderr, "\t-dpms Energy Star features off\n"); fprintf (stderr, "\t+dpms Energy Star features on\n"); fprintf (stderr, "\t dpms [standby [suspend [off]]] \n"); fprintf (stderr, "\t force standby \n"); fprintf (stderr, "\t force suspend \n"); fprintf (stderr, "\t force off \n"); fprintf (stderr, "\t force on \n"); fprintf (stderr, "\t (also implicitly enables DPMS features) \n"); fprintf (stderr, "\t a timeout value of zero disables the mode \n"); #endif #ifdef FONTCACHE fprintf (stderr, " To control font cache:\n"); fprintf (stderr, "\t fc [hi-mark [low-mark [balance]]]\n"); fprintf (stderr, "\t both mark values spcecified in KB\n"); fprintf (stderr, "\t balance value spcecified in percent (10 - 90)\n"); fprintf (stderr, " Show font cache statistics:\n"); fprintf (stderr, "\t fc s\n"); #endif -#ifdef INCLUDE_XPRINT_SUPPORT +#ifdef BUILD_PRINTSUPPORT fprintf (stderr, " To control Xprint features:\n"); fprintf (stderr, "\t rehashprinterlist Recomputes the list of available printers\n"); #endif fprintf (stderr, " To set the font path:\n" ); fprintf (stderr, "\t fp= path[,path...]\n" ); fprintf (stderr, " To restore the default font path:\n"); fprintf (stderr, "\t fp default\n"); fprintf (stderr, " To have the server reread font databases:\n"); fprintf (stderr, "\t fp rehash\n"); fprintf (stderr, " To remove elements from font path:\n"); fprintf (stderr, "\t-fp path[,path...] fp- path[,path...]\n"); fprintf (stderr, " To prepend or append elements to font path:\n"); fprintf (stderr, "\t+fp path[,path...] fp+ path[,path...]\n"); fprintf (stderr, " To set LED states off or on:\n"); fprintf (stderr, "\t-led [1-32] led off\n"); fprintf (stderr, "\t led [1-32] led on\n"); fprintf (stderr, " To set mouse acceleration and threshold:\n"); fprintf (stderr, "\t m [acc_mult[/acc_div] [thr]] m default\n"); fprintf (stderr, " To set pixel colors:\n"); fprintf (stderr, "\t p pixel_value color_name\n"); fprintf (stderr, " To turn auto-repeat off or on:\n"); fprintf (stderr, "\t-r [keycode] r off\n"); fprintf (stderr, "\t r [keycode] r on\n"); #if defined(XF86MISC) || defined(XKB) fprintf (stderr, "\t r rate [delay [rate]]\n"); #endif fprintf (stderr, " For screen-saver control:\n"); fprintf (stderr, "\t s [timeout [cycle]] s default s on\n"); fprintf (stderr, "\t s blank s noblank s off\n"); fprintf (stderr, "\t s expose s noexpose\n"); fprintf (stderr, "\t s activate s reset\n"); fprintf (stderr, " For status information: q\n"); - exit(0); + exit(EXIT_SUCCESS); } static void error(char *message) { fprintf( stderr, "%s: %s\n", progName, message ); - exit( 1 ); + exit(EXIT_FAILURE); } static int local_xerror(Display *dpy, XErrorEvent *rep) { if (rep->request_code == X_SetFontPath && rep->error_code == BadValue) { fprintf(stderr, "%s: bad font path element (#%ld), possible causes are:\n", progName, rep->resourceid); fprintf(stderr," Directory does not exist or has wrong permissions\n"); fprintf(stderr," Directory missing fonts.dir\n"); fprintf(stderr," Incorrect font server address or syntax\n"); } else if (rep->request_code == X_StoreColors) { switch (rep->error_code) { case BadAccess: fprintf(stderr, "%s: pixel not allocated read/write\n", progName); break; case BadValue: