GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
color_insrt.c File Reference
#include <grass/gis.h>
Include dependency graph for color_insrt.c:

Go to the source code of this file.

Macros

#define umalloc(n)   (unsigned char *) G_malloc((size_t)n)
 
#define urealloc(s, n)   (unsigned char *) G_realloc(s,(size_t)n)
 
#define LIMIT(x)   if (x < 0) x = 0; else if (x > 255) x = 255;
 

Functions

int G__insert_color_into_lookup (CELL cat, int red, int grn, int blu, struct _Color_Info_ *cp)
 

Macro Definition Documentation

#define LIMIT (   x)    if (x < 0) x = 0; else if (x > 255) x = 255;

Definition at line 10 of file color_insrt.c.

Referenced by G__insert_color_into_lookup().

#define umalloc (   n)    (unsigned char *) G_malloc((size_t)n)

Definition at line 7 of file color_insrt.c.

Referenced by G__insert_color_into_lookup().

#define urealloc (   s,
  n 
)    (unsigned char *) G_realloc(s,(size_t)n)

Definition at line 8 of file color_insrt.c.

Referenced by G__insert_color_into_lookup().

Function Documentation

int G__insert_color_into_lookup ( CELL  cat,
int  red,
int  grn,
int  blu,
struct _Color_Info_ *  cp 
)

Definition at line 12 of file color_insrt.c.

References cat, LIMIT, min, umalloc, and urealloc.