23 lines
403 B
C
23 lines
403 B
C
#ifndef HACKS_H
|
|
#define HACKS_H
|
|
|
|
/*
|
|
* Ugly hack to print a message in the center column by taking half its length
|
|
* and subtracting that from the desired X position.
|
|
*/
|
|
#define midprint(y, x, len, message) mvwprintw(stdscr, y, x - (len * 0.5), message)
|
|
|
|
/*
|
|
* @brief string pointer with manual length stuck to it
|
|
*/
|
|
typedef struct {
|
|
char *s;
|
|
int l;
|
|
} lstring_t;
|
|
|
|
struct xy {
|
|
int x, y;
|
|
};
|
|
|
|
#endif
|