#ifndef CELL_H #define CELL_H #include "scanner.h" #ifdef __cplusplus extern "C" { #endif typedef enum { LEFT=0, RIGHT=1, CENTER=2, AUTOADJUST=3 } Adjust; typedef enum { BASE=0, ITERATIVE=1, CONTINGENT=2 } ContentVariety; typedef unsigned char ColorNum; #define MAX_MAX_COLORS UCHAR_MAX; typedef struct { Token **contents[CONTINGENT]; char *label; Token value; Token resvalue; Adjust adjust; int precision; ColorNum foreground; ColorNum background; unsigned int updated:1; unsigned int shadowed:1; unsigned int scientific:1; unsigned int locked:1; unsigned int transparent:1; unsigned int ignored:1; unsigned int clock_t0:1; unsigned int clock_t1:1; unsigned int clock_t2:1; unsigned int bold:1; unsigned int underline:1; } Cell; #define NULLCELL ((Cell*)0) Token **getcont(const Cell *cell, ContentVariety v); Adjust getadjust(const Cell *cell); bool shadowed(const Cell *cell); bool isbold(const Cell *cell); bool underlined(const Cell *cell); ColorNum cell_bg(const Cell *cell); ColorNum cell_fg(const Cell *cell); bool locked(const Cell *cell); bool transparent(const Cell *cell); bool ignored(const Cell *cell); bool getscientific(const Cell *cell); int getprecision(const Cell* cell); const char *getlabel(const Cell *cell); void initcellcontents(Cell *cell); void freecellcontents(Cell *cell); void copycell(Cell *to, const Cell *from); #ifdef __cplusplus } #endif #endif