xcolmix-1.07/ 40755 1750 1750 0 6730204451 12055 5ustar rhogeerhogeexcolmix-1.07/xcolmix.README100644 1750 1750 6465 6730203714 14530 0ustar rhogeerhogee -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= X C O L M I X a color mixer for X-windows Karel Kubat (karel@icce.rug.nl) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Introduction Xcolmix is a color mixer, that enables you to mix your own colors in order to determine three values (the R/G/B code, or red-green-blue mix) of a color. You can use those colors to, e.g., define the foreground or background of X applications which support it. Furthermore, xcolmix lets you retrieve RGB values from the X system's database of `predefined' colors. Obtaining xcolmix You can ftp the xcolmix package from the site ftp.icce.rug.nl, directory /pub/unix, file xcolmix-X.YY.tar.gz, where X.YY stands for a version number, e.g., 1.00. The archive extracts using tar and spills into a subdirectory xcolmix. It is suggested that you extract the archive in a `sources' subdirectory, say /usr/local/src: cd /usr/local/src tar xvzf ...../xcolmix-X.YY.tar.gz cd xcolmix Get the XForms library and headers. See the Makefile in the src subdirectory, extracted from the archive. Then, edit the Makefile following the directions stated therein and `make install'. Using xcolmix Xcolmix lets you define a separate background and a foreground color for a part of the mixer window (the logo). Use this logo to, e.g., compare whether a particular text color looks good on a particular background. Use the `foreground / background' buttons to select between the foreground or the background. Then, use the three silders labelled `red', `green' and `blue' to change the color. The button `lookup' starts a second window, with a browser showing the system color database. The default database name is /usr/lib/X11/rgb.txt, though you can overrule this filename with a file argument in the command that starts up xcolmix. Copyright XColmix - an RGB colour mixer. Copyright (C) 1996 Karel Kubat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You may link this software with XForms (Copyright (C) by T.C. Zhao and Mark Overmars) and distribute the resulting binary, under the restrictions in clause 3 of the GPL, even though the resulting binary is not, as a whole, covered by the GPL. (You still need a separate license to do so from the owner(s) of the copyright for XForms, however). If a derivative no longer requires XForms, you may use the unsupplemented GPL as its license by deleting this paragraph and therefore removing this exemption for XForms. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA xcolmix-1.07/xcolmix.lsm100644 1750 1750 1063 6704541322 14354 0ustar rhogeerhogeeBegin3 Title: xcolmix: Color mixer for X Version: 1.06 Entered-date: 1996 Description: xcolmix lets you mix your own colors, either starting `from scratch' or starting from a color in the X color database. Keywords: X color mixer Author: karel@icce.rug.nl (Karel Kubat) Maintained-by: karel@icce.rug.nl (Karel Kubat) Primary-site: ftp.icce.rug.nl: /pub/unix/xcolmix-X.YY.tar.gz Alternate-site: sunsite.unc.edu: no idea where tsx-11.mit.edu : no idea where Copying-policy: GPL + permission to link against Xforms clause End xcolmix-1.07/COPYING100644 1750 1750 2377 6730203624 13217 0ustar rhogeerhogeeXColmix - an RGB colour mixer. Copyright (C) 1996 Karel Kubat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You may link this software with XForms (Copyright (C) by T.C. Zhao and Mark Overmars) and distribute the resulting binary, under the restrictions in clause 3 of the GPL, even though the resulting binary is not, as a whole, covered by the GPL. (You still need a separate license to do so from the owner(s) of the copyright for XForms, however). If a derivative no longer requires XForms, you may use the unsupplemented GPL as its license by deleting this paragraph and therefore removing this exemption for XForms. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA xcolmix-1.07/src/ 40755 1750 1750 0 6730204043 12641 5ustar rhogeerhogeexcolmix-1.07/src/Makefile100644 1750 1750 4667 6705157656 14436 0ustar rhogeerhogee# -------------------------------------------------------------------------- # # Makefile for xcolmix # # -------------------------------------------------------------------------- # Note: you will need the XForms library to get things compiled. You can # obtain the library at one of the Linux ftp sites (sunsite.unc.edu, # tsx-11.mit.edu) or at the primary sites: bloch.phys.uwm.edu:/pub/xforms # and ftp.cs.ruu.nl:/pub/XFORMS. # If you have installed XForms as the Makefile of the package does, you won't # have any problems compiling all. Otherwise, set XFLIBDIR to "-L..." (the # directory where the library lives) and XFLIBINC to "-I..." (the directory # where the include file forms.h lives). # XFLIBDIR= -L/usr/X11R6/lib # XFINCDIR = -I/usr/local/inc # A `make install' will create a stripped version of xcolmix and install it # to BINDIR. Define that directory here. If you want to make the program first # to check it out, before installing it, must do a `make final' before the # `make install'. prefix = /usr/local BINDIR = $(prefix)/bin MANDIR = $(prefix)/man/man1 # Standard compilation flags. You probably won't have to change these, if # you are using gcc. STDCFLAGS = -c -O2 -Wall $(XFINCDIR) STDLFLAGS = -s -L/usr/X11R6/lib # Compilation flags for `make debug'. Again, OK for gcc. DEBUGCFLAGS = -g DEBUGLFLAGS = -static # You have edited enough. Now run `make'. # -------------------------------------------------------------------------- # objects we need for the program OBJ = xcolmix.o callbacks.o initforms.o makecolor.o usage.o design.o \ loadlookupbrowser.o foobar: @echo 'Make what? Choose one of:' @echo 'make final : make final version of xcolmix' @echo 'make debug : make debugging version of xcolmix' @echo 'make clean : remove objects and binary' @echo 'make install : make final version and install to' $(BINDIR) @echo 'make dist : make distribution (for me, Karel, only)' exit 1 final: make xcolmix CFLAGS="$(STDCFLAGS)" LFLAGS="$(STDLFLAGS)" debug: make xcolmix CFLAGS="$(STDCFLAGS) $(DEBUGCFLAGS)" \ LFLAGS="$(DEBUGLFLAGS)" clean: rm -f xcolmix $(OBJ) install: final install -s xcolmix $(BINDIR) install -m 644 xcolmix.1 $(MANDIR)/xcolmix.1 xcolmix: $(OBJ) $(CC) -o xcolmix.new $(OBJ) $(XFLIBDIR) -lforms -lX11 -lm $(LFLAGS) mv xcolmix.new xcolmix dist: clean header -ak0 design.h design.c header -rk *.c *.h .makedist $(BINDIR) # extra deps initforms.o: initforms.c version.h usage.o: usage.c version.h xcolmix-1.07/src/callbacks.c100644 1750 1750 11043 6704530755 15055 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" void cb_search (FL_OBJECT *ob, long data) { char const *col = fl_get_input (ob); int i; if (! col || ! *col) return; for (i = fl_get_browser (lookup_browser) + 1; i <= fl_get_browser_maxline (lookup_browser); i++) { if (strstr (fl_get_browser_line (lookup_browser, i), col)) { fl_select_browser_line (lookup_browser, i); if (i > 1) fl_set_browser_topline (lookup_browser, i - 1); else fl_set_browser_topline (lookup_browser, 1); cb_selectcolor (lookup_browser, 0); return; } } } void cb_quit(FL_OBJECT *ob, long data) { fl_finish (); exit (0); } void cb_red (FL_OBJECT *ob, long data) { register int val = (int) fl_get_slider_value (ob); if (foreground_selected) fg_red = val; else bg_red = val; makecolor (); } void cb_green (FL_OBJECT *ob, long data) { register int val = (int) fl_get_slider_value (ob); if (foreground_selected) fg_green = val; else bg_green = val; makecolor (); } void cb_blue (FL_OBJECT *ob, long data) { register int val = (int) fl_get_slider_value (ob); if (foreground_selected) fg_blue = val; else bg_blue = val; makecolor (); } void cb_lookup (FL_OBJECT *ob, long data) { if (! lookup_on_screen) { fl_set_form_position (lookup, 0, 0); fl_show_form (lookup, FL_PLACE_FREE, FL_FULLBORDER, "Color Lookup"); lookup_on_screen = 1; } } void cb_selectcolor (FL_OBJECT *ob, long data) { register int sel = fl_get_browser (ob); register char const *text; int r, g, b; if (! sel) return; text = fl_get_browser_line (ob, sel); if (sscanf (text, "%d %d %d", &r, &g, &b) < 3) return; if (foreground_selected) { fg_red = r; fg_green = g; fg_blue = b; } else { bg_red = r; bg_green = g; bg_blue = b; } makecolor (); } void cb_lookupdone (FL_OBJECT *ob, long data) { fl_hide_form (lookup); lookup_on_screen = 0; } void cb_select_foreground (FL_OBJECT *ob, long data) { foreground_selected = 1; fl_set_button (background_button, 0); fl_set_button (foreground_button, 1); makecolor (); } void cb_select_background (FL_OBJECT *ob, long data) { foreground_selected = 0; fl_set_button (background_button, 1); fl_set_button (foreground_button, 0); makecolor (); } xcolmix-1.07/src/.makedist100755 1750 1750 1174 6151074147 14555 0ustar rhogeerhogee#!/bin/sh if [ "$1" = "" ] ; then echo 'Usage: .makedist bin-directory' echo 'You should really run this script from "make dist".' exit 1 fi echo 'Making xcolmix distribution..' VER=`grep VER version.h | sed 's/#define VER "//' | sed 's/"//'` echo 'Version:' $VER echo 'Copying binary..' cp $1/xcolmix ../bin-linux/xcolmix echo 'Making archive..' cd ../.. tar cvzf xcolmix-$VER.tar.gz xcolmix echo 'Uploading to ftp site..' ftp ftp << ENDFTP cd /home/ftp/pub/karel/tounix put xcolmix-$VER.tar.gz put xcolmix/xcolmix.README xcolmix.README put xcolmix/xcolmix.lsm xcolmix.lsm quit ENDFTP xcolmix-1.07/src/design.h100644 1750 1750 6071 6704531061 14370 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #ifndef FD_colormixer_h_ #define FD_colormixer_h_ /* Header file generated with fdesign. */ /**** Callback routines ****/ extern void cb_quit(FL_OBJECT *, long); extern void cb_red(FL_OBJECT *, long); extern void cb_green(FL_OBJECT *, long); extern void cb_blue(FL_OBJECT *, long); extern void cb_lookup(FL_OBJECT *, long); extern void cb_select_foreground(FL_OBJECT *, long); extern void cb_select_background(FL_OBJECT *, long); extern void cb_selectcolor(FL_OBJECT *, long); extern void cb_lookupdone(FL_OBJECT *, long); extern void cb_search(FL_OBJECT *, long); /**** Forms and Objects ****/ extern FL_FORM *colormixer; extern FL_OBJECT *logo, *red_slider, *green_slider, *blue_slider, *foreground_button, *background_button, *hexdisplay; extern FL_FORM *lookup; extern FL_OBJECT *lookup_browser, *search_input; /**** Creation Routine ****/ extern void create_the_forms(void); #endif /* FD_colormixer_h_ */ xcolmix-1.07/src/initforms.c100644 1750 1750 7322 6704531105 15123 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" #include "version.h" void initforms () { /* initialize fore/background color */ makecolor (); /* make all forms */ create_the_forms (); /* color mixer form definition */ /* --------------------------- */ /* color redefs of logo */ fl_set_object_lcol (logo, FG_COL); fl_set_object_color (logo, BG_COL, 0); /* color redefs of hex display and font */ fl_set_object_lcol (hexdisplay, FG_COL); fl_set_object_color (hexdisplay, BG_COL, 0); fl_set_browser_fontsize (hexdisplay, FL_MEDIUM_SIZE); fl_set_browser_fontstyle (hexdisplay, FL_FIXEDBOLD_STYLE); /* bounds and precisions of sliders */ fl_set_slider_bounds (red_slider, 0, 255); fl_set_slider_step (red_slider, 1); fl_set_slider_precision (red_slider, 0); fl_set_slider_value (red_slider, bg_red); fl_set_slider_bounds (green_slider, 0, 255); fl_set_slider_step (green_slider, 1); fl_set_slider_precision (green_slider, 0); fl_set_slider_value (green_slider, bg_green); fl_set_slider_bounds (blue_slider, 0, 255); fl_set_slider_step (blue_slider, 1); fl_set_slider_precision (blue_slider, 0); fl_set_slider_value (blue_slider, bg_blue); /* the lookup form definition */ /* -------------------------- */ fl_set_browser_fontstyle (lookup_browser, FL_FIXED_STYLE); load_lookup_browser (); /* when should the search object generate a callback */ /* ------------------------------------------------- */ fl_set_object_return (search_input, FL_RETURN_END); /* now re-display objects that affect colors */ makecolor (); } xcolmix-1.07/src/usage.c100644 1750 1750 6054 6704531162 14221 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" #include "version.h" void usage () { fprintf (stderr, "\n" "X Color Mixer V" VER "\n" "Copyright (c) Karel Kubat/ICCE 1996. All rights reserved.\n" "Another MegaHard production!\n" "\n" "Usage: xcolmix [X options] \n" " or: xcolmix [X options] rgb-database-file\n" "The rgb-database-file is the file which holds the X-windows color\n" "definitions, when absent: /usr/lib/X11/rgb.txt is used.\n" "Options may be:\n" " -display host:display - the display, default: $DISPLAY\n" " -name applicationname - application name for X resource managing\n" " default: xcolmix\n" " -visual class - visual class, e.g. TrueColor\n" " -depth n - visual depth\n" " -private, -shared,\n" " -stdcmap - defines color mapping\n" " -debug d - verbosity of XForms window management\n" " -sync - forces synchronous mode\n" ); exit (1); } xcolmix-1.07/src/makecolor.c100644 1750 1750 6530 6704531143 15067 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" void makecolor () { char buf [80]; /* define colors to use */ fl_mapcolor (FG_COL, fg_red, fg_green, fg_blue); fl_mapcolor (BG_COL, bg_red, bg_green, bg_blue); if (! logo) /* done when forms not yet on screen */ return; /* make sure logo affects the colors */ fl_redraw_object (logo); /* show hexadecimal color selection */ fl_clear_browser (hexdisplay); sprintf (buf, "Hex fg: #%2.2X%2.2X%2.2X\n", fg_red, fg_green, fg_blue); fl_add_browser_line (hexdisplay, buf); sprintf (buf, "Hex bg: #%2.2X%2.2X%2.2X\n", bg_red, bg_green, bg_blue); fl_add_browser_line (hexdisplay, buf); fl_redraw_object (hexdisplay); /* update rgb sliders */ if (foreground_selected) { fl_set_slider_value (red_slider, fg_red); fl_set_slider_value (green_slider, fg_green); fl_set_slider_value (blue_slider, fg_blue); } else { fl_set_slider_value (red_slider, bg_red); fl_set_slider_value (green_slider, bg_green); fl_set_slider_value (blue_slider, bg_blue); } /* redraw rgb sliders */ fl_redraw_object (red_slider); fl_redraw_object (green_slider); fl_redraw_object (blue_slider); } xcolmix-1.07/src/xcolmix.c100644 1750 1750 5723 6704531235 14603 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" /* global vars */ /* -------------- FL_FORM *colormixer, *lookup; FL_OBJECT *red_slider, *green_slider, *blue_slider, *logo, *foreground_button, *background_button; no longer needed, now in design.h --------------- */ int fg_red = 0, fg_green = 0, fg_blue = 0, bg_red = 255, bg_green = 255, bg_blue = 255, foreground_selected = 0, lookup_on_screen = 0; char *rgbfile = "/usr/lib/X11/rgb.txt"; void main (int argc, char **argv) { /* initialize XForms */ fl_initialize (&argc, argv, "XColmix", 0, 0); /* check arguments */ if (argc > 2) usage (); else if (argc == 2) { if (access (argv [1], R_OK)) usage (); rgbfile = argv [1]; } initforms (); fl_show_form (colormixer, FL_PLACE_CENTER, FL_FULLBORDER, "Color Mixer"); fl_do_forms (); /* not reached */ } xcolmix-1.07/src/xcolmix.h100644 1750 1750 6314 6704531257 14611 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include #include #include #include #include "design.h" /* defines */ #define FG_COL FL_FREE_COL1 #define BG_COL FL_FREE_COL2 /* global vars */ /* ------------- extern FL_FORM *colormixer, *lookup; extern FL_OBJECT *logo, *red_slider, *green_slider, *blue_slider, *foreground_button, *background_button; --------------- no longer needed, now in design.h */ extern int fg_red, fg_green, fg_blue, bg_red, bg_green, bg_blue, foreground_selected, lookup_on_screen; extern char *rgbfile; /* functions */ extern void cb_quit (FL_OBJECT *, long); extern void cb_red (FL_OBJECT *, long); extern void cb_green (FL_OBJECT *, long); extern void cb_blue (FL_OBJECT *, long); extern void cb_lookup (FL_OBJECT *, long); extern void cb_selectcolor(FL_OBJECT *, long); extern void cb_select_foreground (FL_OBJECT *, long); extern void cb_select_background (FL_OBJECT *, long); extern void cb_lookupdone (FL_OBJECT *, long); extern void initforms (void); extern void load_lookup_browser (); extern void makecolor (void); extern void usage (void); xcolmix-1.07/src/version.h100644 1750 1750 23 6726750135 14544 0ustar rhogeerhogee#define VER "1.07" xcolmix-1.07/src/.header100644 1750 1750 2412 6730203751 14173 0ustar rhogeerhogeeThis file is part of the xcolmix package. Copyright (C) 1996 Karel Kubat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You may link this software with XForms (Copyright (C) by T.C. Zhao and Mark Overmars) and distribute the resulting binary, under the restrictions in clause 3 of the GPL, even though the resulting binary is not, as a whole, covered by the GPL. (You still need a separate license to do so from the owner(s) of the copyright for XForms, however). If a derivative no longer requires XForms, you may use the unsupplemented GPL as its license by deleting this paragraph and therefore removing this exemption for XForms. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA xcolmix-1.07/src/design.fd100644 1750 1750 11705 6154554074 14562 0ustar rhogeerhogeeMagic: 13000 Internal Form Definition File (do not change) Number of forms: 2 Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: colormixer Width: 320 Height: 230 Number of Objects: 10 -------------------- class: FL_BOX type: UP_BOX box: 0 0 320 230 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_TEXT type: NORMAL_TEXT box: 10 10 140 70 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_BOLDITALIC_STYLE size: FL_MEDIUM_SIZE lcol: FL_BLUE label: Color Mixer\nV1.00 shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: logo callback: argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 235 180 75 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Quit shortcut: Qq^Q^[ resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: cb_quit argument: 0 -------------------- class: FL_VALSLIDER type: HOR_SLIDER box: 40 85 270 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Red shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: red_slider callback: cb_red argument: 0 -------------------- class: FL_VALSLIDER type: HOR_SLIDER box: 40 115 270 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Green shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: green_slider callback: cb_green argument: 0 -------------------- class: FL_VALSLIDER type: HOR_SLIDER box: 40 145 270 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Blue shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: blue_slider callback: cb_blue argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 145 180 75 35 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Lookup shortcut: Ll resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: cb_lookup argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 20 180 20 20 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Foreground shortcut: Ff resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: foreground_button callback: cb_select_foreground argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON box: 20 200 20 20 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Background shortcut: Bb resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: background_button callback: cb_select_background argument: 0 -------------------- class: FL_BROWSER type: NORMAL_BROWSER box: 160 10 150 70 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_FIXEDBOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: hexdisplay callback: argument: =============== FORM =============== Name: lookup Width: 315 Height: 375 Number of Objects: 4 -------------------- class: FL_BOX type: UP_BOX box: 0 0 315 375 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER box: 10 40 295 325 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_BOTTOM style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: lookup_browser callback: cb_selectcolor argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON box: 195 5 110 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Dismiss shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: cb_lookupdone argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT box: 50 5 135 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Search: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: search_input callback: cb_search argument: 0 ============================== create_the_forms xcolmix-1.07/src/design.c100644 1750 1750 12377 6704531025 14411 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ /* Form definition file generated with fdesign. */ #include #include #include "design.h" FL_FORM *colormixer; FL_OBJECT *logo, *red_slider, *green_slider, *blue_slider, *foreground_button, *background_button, *hexdisplay; void create_form_colormixer(void) { FL_OBJECT *obj; if (colormixer) return; colormixer = fl_bgn_form(FL_NO_BOX,320,230); obj = fl_add_box(FL_UP_BOX,0,0,320,230,""); logo = obj = fl_add_text(FL_NORMAL_TEXT,10,10,140,70,"Color Mixer\nV1.00"); fl_set_object_lcol(obj,FL_BLUE); fl_set_object_lsize(obj,FL_MEDIUM_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLDITALIC_STYLE); obj = fl_add_button(FL_NORMAL_BUTTON,235,180,75,35,"Quit"); fl_set_button_shortcut(obj,"Qq^Q^[",1); fl_set_object_callback(obj,cb_quit,0); red_slider = obj = fl_add_valslider(FL_HOR_SLIDER,40,85,270,25,"Red"); fl_set_object_lsize(obj,FL_DEFAULT_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); fl_set_object_callback(obj,cb_red,0); fl_set_slider_return(obj, FL_RETURN_CHANGED); green_slider = obj = fl_add_valslider(FL_HOR_SLIDER,40,115,270,25,"Green"); fl_set_object_lsize(obj,FL_DEFAULT_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); fl_set_object_callback(obj,cb_green,0); fl_set_slider_return(obj, FL_RETURN_CHANGED); blue_slider = obj = fl_add_valslider(FL_HOR_SLIDER,40,145,270,25,"Blue"); fl_set_object_lsize(obj,FL_DEFAULT_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); fl_set_object_callback(obj,cb_blue,0); fl_set_slider_return(obj, FL_RETURN_CHANGED); obj = fl_add_button(FL_NORMAL_BUTTON,145,180,75,35,"Lookup"); fl_set_button_shortcut(obj,"Ll",1); fl_set_object_callback(obj,cb_lookup,0); foreground_button = obj = fl_add_checkbutton(FL_PUSH_BUTTON,20,180,20,20,"Foreground"); fl_set_button_shortcut(obj,"Ff",1); fl_set_object_callback(obj,cb_select_foreground,0); background_button = obj = fl_add_checkbutton(FL_PUSH_BUTTON,20,200,20,20,"Background"); fl_set_button_shortcut(obj,"Bb",1); fl_set_object_callback(obj,cb_select_background,0); hexdisplay = obj = fl_add_browser(FL_NORMAL_BROWSER,160,10,150,70,""); fl_set_object_boxtype(obj,FL_FLAT_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lstyle(obj,FL_FIXEDBOLD_STYLE); fl_end_form(); } /*---------------------------------------*/ FL_FORM *lookup; FL_OBJECT *lookup_browser, *search_input; void create_form_lookup(void) { FL_OBJECT *obj; if (lookup) return; lookup = fl_bgn_form(FL_NO_BOX,315,375); obj = fl_add_box(FL_UP_BOX,0,0,315,375,""); lookup_browser = obj = fl_add_browser(FL_HOLD_BROWSER,10,40,295,325,""); fl_set_object_callback(obj,cb_selectcolor,0); obj = fl_add_button(FL_NORMAL_BUTTON,195,5,110,30,"Dismiss"); fl_set_object_callback(obj,cb_lookupdone,0); search_input = obj = fl_add_input(FL_NORMAL_INPUT,50,5,135,30,"Search:"); fl_set_object_callback(obj,cb_search,0); fl_end_form(); } /*---------------------------------------*/ void create_the_forms(void) { create_form_colormixer(); create_form_lookup(); } xcolmix-1.07/src/loadlookupbrowser.c100644 1750 1750 6334 6704531126 16673 0ustar rhogeerhogee/* <<< Start of information >>> */ /* This file is part of the xcolmix package. */ /* Copyright (C) 1996 Karel Kubat. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the GNU General Public License as published by the */ /* Free Software Foundation; either version 2 of the License, or (at your */ /* option) any later version. */ /* */ /* You may link this software with XForms (Copyright (C) by T.C. Zhao and */ /* Mark Overmars) and distribute the resulting binary, under the */ /* restrictions in clause 3 of the GPL, even though the resulting binary is */ /* not, as a whole, covered by the GPL. (You still need a separate license */ /* to do so from the owner(s) of the copyright for XForms, however). If a */ /* derivative no longer requires XForms, you may use the unsupplemented GPL */ /* as its license by deleting this paragraph and therefore removing this */ /* exemption for XForms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* <<< End of information >>> */ #include "xcolmix.h" typedef struct { int r, g, b; } RGB_; static RGB_ *rgb; int nrgb; static int rgb_lookup (int rr, int gg, int bb) { int i; for (i = 0; i < nrgb; i++) if (rgb [i].r == rr && rgb [i].g == gg && rgb [i].b == bb) return (1); return (0); } static void rgb_insert (int rr, int gg, int bb) { rgb = (RGB_ *) realloc (rgb, (nrgb + 1) * sizeof (RGB_)); rgb [nrgb].r = rr; rgb [nrgb].g = gg; rgb [nrgb++].b = bb; } void load_lookup_browser () { FILE *f; char buf [128]; int r, g, b; /* try to open file */ if (! (f = fopen (rgbfile, "r")) ) { fl_add_browser_line (lookup_browser, "Cannot read RGB data file!!"); return; } while (1) { fgets (buf, 127, f); if (feof (f)) break; if (sscanf (buf, "%d %d %d", &r, &g, &b) >= 3 && ! rgb_lookup (r, g, b) ) { fl_add_browser_line (lookup_browser, buf); rgb_insert (r, g, b); } } fclose (f); } xcolmix-1.07/src/xcolmix.1100644 1750 1750 5003 6704523654 14516 0ustar rhogeerhogee.TH XCOLMIX 1 .SH NAME xcolmix \- an RGB colour mixer .SH SYNOPSIS .B xcolmix .I "[-display host:dpy] [-name appname] [-visual class] [-depth d] [-private] [-shared] [-stdcmap] [-debug d] [-sync] rgb-database-file" The rgb-database-file is the file which holds the X-windows colour definitions, when absent: /usr/lib/X11/rgb.txt is used. .SH "DESCRIPTION" This manual page documents briefly the .BR xcolmix , command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .PP .B xcolmix is a colour mixer that enables you to mix your own colours in order to determine three values (the R/G/B code, or red-green-blue mix) of a colour. You can use those colours to, e.g., define the foreground or background of X applications which support it. Furthermore, xcolmix lets you retrieve RGB values from the X system's database of `predefined' colours. .B xcolmix is non longer actively maintained upstream. If you would like to take it over, talk to the author: Karel Kubat . .SH OPTIONS xcolmix is built with the XForms Graphical User Interface Toolkit for X, and hence supports a number of flags which are interpreted by XForms. The flags must be stated before any file arguments, and are: .TP .B \-display host:dpy defines the X display. .TP .B \-name appname defines the application name (default is xcolmix). .TP .B \-visual class TrueColor, PseudoColor etc... .TP .B \-depth d visual depth in bits .TP .B \-private forces a private colourmap. .TP .B \-shared forces a shared colourmap. .TP .B \-stdcmap forces a standard colourmap. .TP .B \-debug l prints debugging information, l is the level. .TP .B \-sync forces synchronous mode. .SH USING XCOLMIX Xcolmix lets you define a separate background and a foreground colour for a part of the mixer window (the logo). Use this logo to, e.g., compare whether a particular text colour looks good on a particular background. Use the `foreground / background' buttons to select between the foreground or the background. Then, use the three silders labelled `red', `green' and `blue' to change the colour. The button `lookup' starts a second window, with a browser showing the system colour database. The default database name is /usr/lib/X11/rgb.txt, though you can overrule this filename with a file argument in the command that starts up xcolmix. .SH AUTHOR Karel Kubat This manual page was written by Peter S Galbraith , for the Debian GNU/Linux system (but may be used by others). xcolmix-1.07/GPL100644 1750 1750 43077 6016663624 12562 0ustar rhogeerhogee GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xcolmix-1.07/ChangeLog100644 1750 1750 515 6730203646 13712 0ustar rhogeerhogee1999-06-11 Peter S Galbraith * Version 1.07 released. * New license (GPL + permission to link against XForms). * Added the Debian man page to upstream package. * Makefile did not build properly design.c and xcolmix.h now have #include Hacked the Makefile a little to add library path.