... still programming ...

This commit is contained in:
Thomas Jensen 1999-03-19 17:51:19 +00:00
parent cc3348c999
commit 33c6e9cdc1

View File

@ -1,23 +1,21 @@
/*
* File: boxes.h
#ifdef DEBUG * Date created: March 18, 1999 (Thursday, 15:09h)
#ifndef DEBUG_STUFF * Author: Thomas Jensen
#define DEBUG_STUFF * tsjensen@stud.informatik.uni-erlangen.de
* Version: $Id$
char *shape_name[] = { * Language: ANSI C
"NW", "NNW", "N", "NNE", "NE", "ENE", "E", "ESE", * Purpose: Project-wide globals and data structures
"SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW" * Remarks: ---
}; *
* Revision History:
char *ofs_name[] = { *
"NW_NNW", "NNW_N", "N_NNE", "NNE_NE", "NE_ENE", "ENE_E", "E_ESE", "ESE_SE", * $Log$
"SE_SSE", "SSE_S", "S_SSW", "SSW_SW", "SW_WSW", "WSW_W", "W_WNW", "WNW_NW" * Revision 1.1 1999/03/18 15:09:34 tsjensen
}; * Initial revision
*
#endif /* DEBUG_STUFF */ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#endif /* DEBUG */ */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#ifndef BOXES_H #ifndef BOXES_H
#define BOXES_H #define BOXES_H
@ -25,6 +23,12 @@ char *ofs_name[] = {
#define PROJECT "boxes" /* name of program */ #define PROJECT "boxes" /* name of program */
#define VERSION "1.0" /* current release of project */ #define VERSION "1.0" /* current release of project */
static const char rcsid_boxes_h[] =
"$Id$";
extern char *shape_name[];
extern char *ofs_name[];
#define ANZ_OFFSETS 16 #define ANZ_OFFSETS 16
typedef enum { typedef enum {
@ -39,11 +43,23 @@ typedef enum {
NW, NNW, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW NW, NNW, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW
} shape_t; } shape_t;
#define SHAPES_PER_SIDE 5
#define ANZ_SIDES 4
#define ANZ_CORNERS 4
extern shape_t north_side[SHAPES_PER_SIDE]; /* groups of shapes, clockwise */
extern shape_t east_side[SHAPES_PER_SIDE];
extern shape_t south_side[SHAPES_PER_SIDE];
extern shape_t west_side[SHAPES_PER_SIDE];
extern shape_t corners[ANZ_CORNERS];
extern shape_t *sides[];
typedef struct { typedef struct {
char **chars; char **chars;
int height; int height;
int width; int width;
int elastic;
} sentry_t; } sentry_t;
typedef struct { typedef struct {
@ -55,8 +71,6 @@ typedef struct {
char *sample; char *sample;
sentry_t shape[ANZ_SHAPES]; sentry_t shape[ANZ_SHAPES];
int offset[ANZ_OFFSETS]; int offset[ANZ_OFFSETS];
shape_t elastic[ANZ_SHAPES];
int anz_elastic;
} design_t; } design_t;
extern design_t *designs; extern design_t *designs;
@ -65,7 +79,8 @@ extern int design_idx;
extern int yylineno; extern int yylineno;
int yyerror (const char *fmt, ...); int yyerror (const char *fmt, ...);
shape_t *on_side (const shape_t shape1, const shape_t shape2);
int shape_distance (const shape_t s1, const shape_t s2);
#endif /* BOXES_H */ #endif /* BOXES_H */