xcolors-1.5a.orig/0040755000175000017500000000000005425335000013464 5ustar hallonhallonxcolors-1.5a.orig/xcolors0100755000175000017500000003200405425334564015115 0ustar hallonhallon d K-̀\ `-@D$4 `P`[̀rUS 'Rh8$h ``hR$h ` ` $= $tRhk$h `` ;u]]U(VSu] UU؅tx]Ss `@EEEPhb*`EPhb*`V@*`}u3\*`}t\*`PS 'Rho$h `_`hEE$EE?\*`܉UjPV*` }t E\*` E\*`U܉UjEP'R*`e[^]USMEj1҃8tR]S]]USMEj1҃8tR]S]]UE 8!u=$'!u @9'uj`]UlWVS] jjh\!SURjh"h$EP*`ǃ$jjjh!h('W5*` 'EHEtj`=0'EPEP0'RW*`@0PW*`PL `u10'R 'Rh$h `h`j`fUfUfUfUfUfUEEjh$UR*`j]SW\t0`Rh%)`E\*`E jSVlg0`Rh%)`'jSV80`Rh%)`(jSPph0`Rh%)`4'RURURUR('RP,=#u 'Rh%h `\`j_jW*`W*`#R*`PW*`jh8%W*`Pe `$'$jhE%W*`PG `'jh'W*`PW*`PB `W*`PW*`Pt `(UR)`e[^_]UWVS] EݝxhV%,'Pd_Eu,'P`j_EEEu̐VEPEPEPhX%EPM_ttSV u19}uE9Eu E9E}twE+EtU+U‰tU+UttR$E@t؃$ `ܝxE)}tEPEPttc}EEEEVEP`}tEPEP=t,'PS 'Phh%h `_h[^_]U`VSu] ]Sm`@EEEPhb*`EPhb*`V:)`}tMUEd\*`E E?\*`EEjRV o0`QS@)`#E 'Qh%h `_h%h `_h%h `_1e[^]UWVS]u ;>tu= `}= `}}Wt%9u } :}Wt"%9u}:9uCF;t >u;u>t1e[^_]/libXaw.so.3DLL Jump 3.0pl1/libXt.so.3DLL Jump 3.0pl1/libX11.so.3DLL Jump 3.0pl1libm.so.4DLL Jump 4.4pl1libc.so.4DLL Jump 4.4pl1S'u1҃='t'B8uЅt'Ѓ'u[S&=&t Ѓ;uh>_[=\&u\&/usr/lib//lib// S\$̀[̀}أd&Ð%1̀}أd&Ð%/̀}أd&Ð%2̀}أd&Ð%SV\$̀} أd&[S\$L$ T$̀} أd&[WVT$ t$1Ou^_WVSt$\$T$t%1IQRVu Su[^_' : can't load library 'Incompatible version. Too many libraries. No such library. Permission denied. Exec format error. Unspecified error. Corrupt fixup table. VSt$ F8tU8t'jh jhxD PK}[^UWVS\$S|$99t"jh jdh 3x|$WD PN}S:ltT19u~M||$?t8L$1ې|$u|$D;)|$D;9uF9u[^_]VSt$ F88t#jh jh+xD PK}1| tD L CN9C#TDN9[^LD_LIBRARY_PATH). : incompatible minor version numbers (: Warning: ) ( U4WVS}EDžft%_f9uf9t Dž1IU:tH߾AItuu1 r؅u<=:u1҃t ti:`Dž1ۀ:t*9:uC>u݋\$)ĉ h&ω4)Dž<$Dž:tb㋕8:u%/BB B>u8/D19h&~d :>C9h&*@{Dž h&Džt&=t&6~1ۋƅ QCV?PVVM9~ =d&td&jh, Qh0 u 6Vj$000000 000000000000jhG Njh^ >jhs .jh jh jh j hU?_ ف9u9ttQjh6~WhPh;M Qh>j$Ijh, Vh0 } ?WjjhG j hr8hDžt&=t&t=jhH qVhK9WhNje8ujjh&h&zjh&~h&[^_]*Label.Font: 5x7*panes.Width: 985*Text*Height: 50*viewport.allowVert: on*sample*String: Button 1 sets the text color, button 2 sets the background.\nPress q to quit. You can also type new text here.*Label*translations: #override : set-foreground()\n : set-background()*Box*baseTranslations: #override q: quit()  ' 8 P (!startColorStartColorrgbFileRgbFile/usr/X386/lib/X11/rgb.txtnearColorNearColornearDistanceNearDistance|!!b*`b*`!!b*`b*`!!!b*`b*`!!b*` b*`@-start.startColor-rgbfile.rgbFile-near.nearColor-distance.nearDistance\"c"o"x"""""WM_PROTOCOLS: quit() " -rgbfile filename rgb.txt color database file to use -start colorname first color to show -near colorname only show colors similar to this one -distance int how far in 0-255 RGB space is similar#_###$usage: %s [-options ...] where options include: %s %s: no such color as "%s" for %s quitset-foregroundset-background$$$Xcolors%s: color "%s" is not known to the X server panessampleviewportcolors%s: no colors to display WM_PROTOCOLSWM_DELETE_WINDOWr%d %d %d %[^ ] %s: "%s" not found in %s %s: Not enough room in color map. To see colors after this, use the -start option to name a starting color. P]0`@0`p|*`@*` `@ ``````&%&&0&D&`?` &&&,&@&T&`e__PLT_Pp__PLT__`__PLT___pA0`@*` A0`@*`xcolors-1.5a.orig/xcolors.c0100444000175000017500000002411005073124630015316 0ustar hallonhallon/* * xcolors - display all X color names and colors * Time-stamp: <91/10/04 13:49:11 gildea> * * Copyright (c) 1989,1991 by Stephen Gildea * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appears in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation. The authors make no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * Author: Stephen Gildea * Orignal program by Paul Vixie. */ #include #include #include #include #include #include #include #include #include #include /* for sqrt() */ #ifndef RGB_TXT #define RGB_TXT "/usr/lib/X11/rgb.txt" #endif String fallback_resources[] = { "*Label.Font: 5x7", "*panes.Width: 985", "*Text*Height: 50", "*viewport.allowVert: on", "*sample*String: \ Button 1 sets the text color, button 2 sets the background.\\n\ Press q to quit. You can also type new text here.", "*Label*translations: #override \ : set-foreground()\\n\ : set-background()", "*Box*baseTranslations: #override \ q: quit()", NULL}; struct OptionVals { char *start_color; char *rgb_file; char *near_color; int near_distance; /* radius, 0 to sqrt(3)*256 */ } opts; XtResource resources[] = { { "startColor", "StartColor", XtRString, sizeof (char *), XtOffsetOf(struct OptionVals, start_color), XtRString, NULL }, { "rgbFile", "RgbFile", XtRString, sizeof (char *), XtOffsetOf(struct OptionVals, rgb_file), XtRString, RGB_TXT }, { "nearColor", "NearColor", XtRString, sizeof (char *), XtOffsetOf(struct OptionVals, near_color), XtRString, NULL }, { "nearDistance", "NearDistance", XtRInt, sizeof (int), XtOffsetOf(struct OptionVals, near_distance),XtRImmediate,(XtPointer)64}, }; XrmOptionDescRec cmd_options[] = { {"-start", ".startColor", XrmoptionSepArg, NULL}, {"-rgbfile", ".rgbFile", XrmoptionSepArg, NULL}, {"-near", ".nearColor", XrmoptionSepArg, NULL}, {"-distance", ".nearDistance", XrmoptionSepArg, NULL}, }; String wm_trans = "WM_PROTOCOLS: quit()\n"; char *program_name; int n_colors_displayed = 0; /* number of colors we are showing */ Atom wm_delete_window; Atom wm_protocols; Widget sample; /* the sample text */ void usage() { static char *option_help[] = { " -rgbfile filename rgb.txt color database file to use", " -start colorname first color to show", " -near colorname only show colors similar to this one", " -distance int how far in 0-255 RGB space is similar", "", NULL}; char **cpp; fprintf (stderr, "usage: %s [-options ...]\n", program_name); fprintf (stderr, " where options include:\n"); for (cpp = option_help; *cpp; cpp++) { fprintf (stderr, "%s\n", *cpp); } } void do_set_color(w, colorname, foreground_flag) Widget w; String colorname; /* if null, get from w */ Boolean foreground_flag; { Arg arg[2]; int n; XrmValue namein, pixelout; Pixel color; if (colorname) { namein.addr = colorname; namein.size = strlen(colorname) + 1; pixelout.size = 0; /* so we can check for success */ XtConvert(w, XtRString, &namein, XtRPixel, &pixelout); if (pixelout.size == 0) { fprintf(stderr, "%s: no such color as \"%s\" for %s\n", program_name, colorname, foreground_flag ? XtNforeground : XtNbackground); return; } color = *(Pixel*)(pixelout.addr); } else { n = 0; XtSetArg(arg[n], XtNborderColor, &color); n++; XtGetValues(w, arg, n); } /* set the value in the text sample */ XtSetArg(arg[0], foreground_flag ? XtNforeground : XtNbackground, color); XtSetValues(sample, arg, 1); } /* ARGSUSED */ void set_foreground(w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { do_set_color(w, *num_params ? params[0] : NULL, TRUE); } /* ARGSUSED */ void set_background(w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { do_set_color(w, *num_params ? params[0] : NULL, FALSE); } /* ARGSUSED */ void quit_action(w, event, params, num_params) Widget w; XEvent *event; String *params; Cardinal *num_params; { if(event->type == ClientMessage && event->xclient.type == wm_protocols && event->xclient.data.l[0] != wm_delete_window) return; exit(0); } XtActionsRec actionTable[] = { {"quit", quit_action}, {"set-foreground", set_foreground}, {"set-background", set_background}, }; main(argc, argv) int argc; char *argv[]; { XtAppContext app_context; Widget toplevel, panes, viewport, colors; Arg arg[10]; int n; Status stat; XColor near_rgb, junk_rgb; toplevel = XtAppInitialize(&app_context, "Xcolors", cmd_options, XtNumber(cmd_options), &argc, argv, fallback_resources, NULL, 0); XtGetApplicationResources (toplevel, (XtPointer) &opts, resources, XtNumber(resources), NULL, 0); program_name = argv[0]; argc--; argv++; if (argc != 0) { usage(); exit(3); } if (opts.near_color) { /* User asked to only see colors near this in RGB space. Get the color from the server and scale it for comparison with rgb.txt values */ stat = XLookupColor(XtDisplay(toplevel), DefaultColormapOfScreen(XtScreen(toplevel)), opts.near_color, &near_rgb, &junk_rgb); if (!stat) { fprintf(stderr, "%s: color \"%s\" is not known to the X server\n", program_name, opts.near_color); exit(1); } near_rgb.red >>= 8; near_rgb.green >>= 8; near_rgb.blue >>= 8; near_rgb.flags = DoRed|DoBlue|DoGreen; } else near_rgb.flags = 0; XtAppAddActions(app_context, actionTable, XtNumber(actionTable)); n = 0; panes = XtCreateManagedWidget("panes", panedWidgetClass, toplevel, arg, n); n = 0; XtSetArg(arg[n], XtNeditType, XawtextEdit); n++; sample = XtCreateManagedWidget("sample", asciiTextWidgetClass, panes, arg, n); n = 0; viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, panes, arg, n); n = 0; colors = XtCreateManagedWidget("colors", boxWidgetClass, viewport, arg, n); colordemo(colors, opts.start_color, near_rgb, opts.near_distance); if (n_colors_displayed == 0) { fprintf(stderr, "%s: no colors to display\n", program_name); exit(5); } XtSetMappedWhenManaged(toplevel, FALSE); XtRealizeWidget(toplevel); /* do WM_DELETE_WINDOW before map */ XtOverrideTranslations(toplevel, XtParseTranslationTable(wm_trans)); wm_protocols = XInternAtom(XtDisplay(toplevel), "WM_PROTOCOLS", False); wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW", False); XSetWMProtocols(XtDisplay(toplevel), XtWindow(toplevel), &wm_delete_window, 1); XtMapWidget(toplevel); XtAppMainLoop(app_context); /* NOTREACHED */ } colordemo(parent, startcolor, nearcolor, maxdist) Widget parent; char *startcolor; XColor nearcolor; /* scaled 0-255 */ int maxdist; { int r, g, b, prev_r, prev_g, prev_b; char colorname[50], save_colorname[50]; FILE *rgb; Bool do_color(); double ddist = maxdist; rgb = fopen(opts.rgb_file, "r"); if (rgb == NULL) { perror(opts.rgb_file); exit(2); } prev_r = prev_g = prev_b = -1; save_colorname[0] = '\0'; while (4 == fscanf(rgb, "%d %d %d %[^\n]\n", &r, &g, &b, colorname)) { if (startcolor) if (l_strcasecmp(colorname, startcolor)) continue; /* haven't reached starting point yet */ else startcolor = (char *)NULL; if (r != prev_r || g != prev_g || b != prev_b) { if (nearcolor.flags) { double ourdist = sqrt((double)((nearcolor.red-r)*(nearcolor.red-r) + (nearcolor.green-g)*(nearcolor.green-g) + (nearcolor.blue-b)*(nearcolor.blue-b))); if (ourdist > ddist) continue; } if (save_colorname[0] != '\0') /* skip first time through */ if (!do_color(parent, save_colorname)) return; prev_r = r; prev_g = g; prev_b = b; } strcpy(save_colorname, colorname); } if (save_colorname[0] != '\0') (void)do_color(parent, save_colorname); if (startcolor) { /* never found starting color in the file */ fprintf(stderr, "%s: \"%s\" not found in %s\n", program_name, startcolor, opts.rgb_file); } } /* * does one color. * Returns a success code. */ Bool do_color(parent, colorname) Widget parent; char *colorname; { Arg arg[10]; int n; XrmValue namein, pixelout; /* convert colorname to a Pixel (a colormap index) */ namein.addr = colorname; namein.size = strlen(colorname) + 1; pixelout.size = 0; /* so we can check for success */ XtConvert(parent, XtRString, &namein, XtRPixel, &pixelout); if (pixelout.size == 0) { fprintf(stderr, "%s: Not enough room in color map.\n", program_name); fprintf(stderr, "To see colors after this, "); fprintf(stderr, "use the -start option to name a starting color.\n"); return FALSE; } /* create a widget to display the color */ n = 0; XtSetArg(arg[n], XtNborderWidth, 10); n++; XtSetArg(arg[n], XtNborderColor, *(Pixel*)(pixelout.addr)); n++; XtCreateManagedWidget(colorname, labelWidgetClass, parent, arg, n); n_colors_displayed++; return TRUE; } /* * Not all systems have strcasecmp, so we provide our own. * Similar to strcmp, but ignores case. * Always returns 1 if different. */ int l_strcasecmp(s1, s2) char *s1, *s2; { for ( ; *s1 && *s2 ; s1++, s2++) if ((isupper(*s1) ? tolower(*s1) : *s1) != (isupper(*s2) ? tolower(*s2) : *s2)) return 1; if (*s1 || *s2) return 1; return 0; } xcolors-1.5a.orig/xcolors.man0100444000175000017500000000614605073135340015660 0ustar hallonhallon.\" Time-stamp: <91/10/04 15:02:55 gildea> .TH XCOLORS 1 "3 October 1991" "X Version 11" .SH NAME xcolors \- display all X11 color names and colors .SH SYNOPSIS .B xcolors [ .B \-start .I color ] [ .B \-near .I color ] [ .B \-distance .I howfar ] .SH DESCRIPTION .I xcolors reads the \fIrgb.txt\fP file that defines the color names the X server knows and displays the colors found. .PP At the top of the window is a sample region containing text. By clicking on the color names, the color of the sample text can be changed. Mouse button 1 changes the foreground; button 2 changes the background. The text can also be edited. .PP Typing ``q'' exits the program. .SH OPTIONS In addition the the usual X Toolkit options, \fIxcolors\fP understands these command line options: .TP .B \-start \fIname\fP specify a color name to start with; colors before this one in the \fIrgb.txt\fP file are skipped. This option is useful if there are more colors than will fit on your screen or in your colormap. .TP .B \-rgbfile \fIfilename\fP specify an alternate color database file to read. .TP .B \-near \fInearcolor\fP only show colors near this one in the RGB space. All colors within a sphere in the RGB-space centered on \fInearcolor\fP are displayed. .TP .B \-distance \fIhowfar\fP defines how close colors have to be to \fInearcolor\fP to be displayed. This option sets the radius of the sphere used by the \fB\-near\fP option. The scale is such that the RGB cube is 256 units on a side. The default is 64. .SH ACTIONS .TP .B set-foreground(\fR[\fP\fIcolor\fP\fR]\fP) Set the foreground color of the sample region. If no \fIcolor\fP is provided, the color is taken from the border color of the widget where the action occurred. .TP .B set-background(\fR[\fP\fIcolor\fP\fR]\fP) Same as \fBset-foreground\fP() but sets the background color. .TP .B quit() Exit \fIxcolors\fP. .SH RESOURCES \fIXcolors\fP has a few top-level application resources that allow customizations that are specific to \fIxcolors\fP. .TP .BR "startColor " (class \fBStartColor\fP) See the \fB\-start\fP option. .TP .BR "rgbFile " (class \fBRgbFile\fP) See the \fB\-rgbfile\fP option. .TP .BR "nearColor " (class \fBNearColor\fP) See the \fB\-near\fP option. .TP .BR "nearDistance " (class \fBNearDistance\fP) See the \fB\-distance\fP option. .SH "WIDGET HIERARCHY" Knowing the name and position in the hierarchy of each widget is useful when specifying resources for them. In the chart below, the class and name of each widget is given. .LP .nf Xcolors \fIxcolors\fP Paned panes AsciiText sample Viewport viewport Box colors Label \fIcolorname\fP Label \fIcolorname\fP . . . .fi .SH FILES .TP .I /usr/lib/X11/rgb.txt X color names and values. .SH BUGS Assumes that all names for the same color are consecutive in the \fIrgb.txt\fP file. .PP Because \fIxcolors\fP cannot read the server's color name database, the color names it uses may not match those in the server. This is most likely to happen if \fIxcolors\fP is run from a remote host. .PP The program would be faster if it used gadgets instead of widgets for the color spots. .SH AUTHOR Stephen Gildea, MIT X Consortium xcolors-1.5a.orig/Changes0100444000175000017500000000234605072757155015000 0ustar hallonhallonxcolors Xcolors reads the rgb.txt file that defines the color names the X server knows and displays the colors found. For R5 there new features: o text region where you can try out different colors o scrollbar o -rgbfile for choosing an alternate color database o -near and -dist for only showing a spherical section of the RGB cube Stephen Gildea gildea@expo.lcs.mit.edu 3 October 1991 The X11R4 README file: This program was originally written by Paul Vixie as "a gross hack intended to show off toolkit programming." It was fixed up (slightly) by Stephen Gildea and submitted to the X Consortium for inclusion in the X11R4 distribution. Paul doesn't want to have anything to do with it any more. I think it's useful, so I am currently maintaining it. Stephen Gildea gildea@bbn.com 14 November 1989 The original README file: Colordemo V1.0 April 4, 1988 Paul Vixie vix@ub.com This is a quick Xt11 program that reads rgb.txt and generates a label widget in each color found therein. It's slow, there are probably better ways to do what it does. It's also reasonably cute. Distribute freely except don't remove my name. Add your own copyrights as you please. Note that many excerpts were ripped from the MIT toolkit examples. xcolors-1.5a.orig/Imakefile0100444000175000017500000000043605072757501015307 0ustar hallonhallonRGBDBFILE = DefaultRGBDatabase DEPLIBS = XawClientDepLibs LOCAL_LIBRARIES = XawClientLibs SRCS = xcolors.c OBJS = xcolors.o SYS_LIBRARIES = -lm DEFINES = -DRGB_TXT=\"$(RGBDBFILE).txt\" ComplexProgramTarget(xcolors) InstallAppDefaults(Xcolors) xcolors-1.5a.orig/Xcolors.ad0100444000175000017500000000054705073124626015435 0ustar hallonhallon*Label.Font: 5x7 *panes.Width: 985 *Text*Height: 50 *viewport*allowVert: true *sample*String: \ Button 1 sets the text color, button 2 sets the background.\n\ Press q to quit. You can also type new text here. *Label*Translations: #override \ : set-foreground()\n\ : set-background()\n *Box*baseTranslations: #override \ q: quit()\n