STIR 6.4.0
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)
 
#define KB_UPARROW   0x41
 
#define KB_DNARROW   0x42
 
#define KB_RTARROW   0x43
 
#define KB_LTARROW   0x44
 
#define Min(x, y)
 
#define Max(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.

Macro Definition Documentation

◆ KB_DIRECTION

#define KB_DIRECTION ( c)
Value:
(c == 0x1b && getch() == 0x5b && (c = getch()) >= 0x41 && c <= 0x44)

◆ Min

#define Min ( x,
y )
Value:
((x) < (y) ? (x) : (y))

◆ Max

#define Max ( x,
y )
Value:
((x) > (y) ? (x) : (y))