VPutColormap


 
Name
  VPutColormap - updates the RGB values of each colormap entry.
 
Synopsis
  VPutColormap(colors, ncolors)
  ViewnixColor *colors;
  int ncolors;
 
Description
  VPutColormap updates the RGB values of each colormap entry specified by
colors[].pixel to the hardware colors closest to those specified in red,
green, and blue of the same structure. Each pixel value must be a read/write
cell (i.e. the status of that colorcell is 1) or a reserved color cell
(i.e. the status of that colorcell is 3) and must have a valid index in the 
colormap. If the colorcell to  be updated is reserved by an overlay or is a 
read-only colorcell, VPutColormap does not update that entry, but no error 
code is returned.
 
Structures
  typedef struct {
        unsigned long pixel;            /*pixel value*/
        unsigned short  red,green,blue; /*RGB values*/
  } ViewnixColor;
 
Return Value
  0 - work successfully.
  1 - memory allocation error.
  231 - try to update colormap when truecolor is on.
  232 - invalid pixel index in the colormap.
 
Parameters
  colors - specifies an array of ViewnixColor structures.
  ncolors - specifies number of ViewnixColor structures in the colors array.
 
Side Effects
  None.
 
Entry Conditions
  If ncolors is less than or equal to zero, colors is NULL, or
VCreateColormap is not called earlier, VPutColormap prints an error
message to the standard error stream, produces a core dump file and exits
from the current process.
 
Related Functions
VGetReservedColormap, VGetFreeColorcells, VLoadColormap, VGetColormap, VSaveColormap, VCreateColormap, VGetColorcellStatus.