+/******************************************************************************
+ * $Id: clr.c,v 1.2 2003-01-07 10:59:52 dron Exp $
+ *
+ * Project: Library fo reading EPPL7 file format
+ * Purpose: Read palette from the EPPL7 file
+ *
+ ******************************************************************************
+ *
+ * Copyright (C) 1997, Victor Wagner <vitus@ice.ru>
+ * Copyright (C) 2003, Andrey Kiselev <dron@remotesensing.org>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *****************************************************************************
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include "eppl_ut.h"
#include <clr.h>
#include <X11/Xlib.h>
-int defarray[]={
+static int defarray[]={
#include "defpal.h"
};
PALETTE default_palette=defarray;
PALETTE read_palette(FILE *f)
-/* þÉÔÁÅÔ ÐÁÌÉÔÒÕ ÉÚ ÆÁÊÌÁ × ÆÏÒÍÁÔÅ EPPL7 */
+/* Read palette from the EPPL7 file */
{ PALETTE pal;
int index,r,g,b;
pal=memcpy(malloc(256*sizeof(long int)),default_palette,256*sizeof(long int));
return buffer;
}
-char *Xcolor_string(PALETTE palette,int index)
+/* char *Xcolor_string(PALETTE palette,int index)
{ int value;
static char buffer[24];
if(index>=0&&index<255)
value=palette[index]; else value=palette[255];
sprintf(buffer,"#%06x",value);
return buffer;
-}
+}*/
+
XColor Xcolor_struct(PALETTE palette,int index)
{ int value;
XColor buffer;