STIR  6.2.0
Macros | Functions
gen.h File Reference

Declares some utility functions used by the screen* files. More...

#include <stdio.h>
#include <curses.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define KB_DIRECTION(c)   (c == 0x1b && getch() == 0x5b && (c = getch()) >= 0x41 && c <= 0x44)
 
#define KB_UPARROW   0x41
 
#define KB_DNARROW   0x42
 
#define KB_RTARROW   0x43
 
#define KB_LTARROW   0x44
 
#define Min(x, y)   ((x) < (y) ? (x) : (y))
 
#define Max(x, y)   ((x) > (y) ? (x) : (y))
 

Functions

size_t fread_check (char str[], void *buffer, size_t size, FILE *infile)
 
size_t fwrite_check (char str[], void *buffer, size_t size, FILE *outfile)
 
void fseek_check (char str[], FILE *file, long offset, int pos)
 
int asknr (char str[], int minv, int maxv, int def)
 
void message (char *fmt,...)
 
void error (char *fmt,...)
 

Detailed Description

Declares some utility functions used by the screen* files.

Author
Kris Thielemans
PARAPET project

This is part of a library by Kris Thielemans, mainly written in 1991.