GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-3973a58369
color_insrt.c File Reference
#include <grass/gis.h>
#include <grass/raster.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)
 

Functions

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

Macro Definition Documentation

◆ LIMIT

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

Definition at line 12 of file color_insrt.c.

◆ umalloc

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

Definition at line 9 of file color_insrt.c.

◆ urealloc

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

Definition at line 10 of file color_insrt.c.

Function Documentation

◆ Rast__insert_color_into_lookup()

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

Definition at line 18 of file color_insrt.c.