home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
355_03
/
slk3.exe
/
TEST
/
TST
/
MINMAC.TST
< prev
next >
Wrap
Text File
|
1989-06-27
|
1KB
|
24 lines
typedef unsigned short word;
typedef struct {
word st_col; /* starting column of line. */
word st_row; /* starting row. */
word end_col; /* ending column. */
word end_row; /* ending row. */
word st_arcol; /* starting col of arrorhead. */
word st_arrow; /* starting row. */
word end_arcol; /* ending col. */
word end_arrow; /* ending row. */
} line;
#define min(a,b) ( ((a) < (b)) ? (a) : (b) )
#define max(a,b) ( ((a) > (b)) ? (a) : (b) )
extern void generate_line(line *l)
{
word min_row_ext, min_col_ext, max_row_ext, max_col_ext; /* used if calculate_extent is set */
min_row_ext = min(min_row_ext, min(l->st_arrow, min(l->end_arrow, min(l->st_row, l->end_row))));
min_col_ext = min(min_col_ext, min(l->st_arcol, min(l->end_arcol, min(l->st_row, l->end_col))));
max_row_ext = max(max_row_ext, max(l->st_arrow, max(l->end_arrow, max(l->st_row, l->end_row))));
max_col_ext = max(max_col_ext, max(l->st_arcol, max(l->end_arcol, max(l->st_row, l->end_col))));
}