initial
This commit is contained in:
22
hacks.h
Normal file
22
hacks.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user