MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // pager.h -- generic pager header |
| 4 | // |
| 5 | // $Id: pager.h 6142 2007-01-31 20:34:39Z Zesstra $ |
| 6 | |
| 7 | #ifndef __PAGER_H__ |
| 8 | #define __PAGER_H__ |
| 9 | |
| 10 | // select language |
| 11 | #define GERMAN |
| 12 | //#define ENGLISH |
| 13 | |
| 14 | // select optimization |
| 15 | #define O_SPEED // speed optimization |
| 16 | #define O_SPEED_UP // additional speed up |
| 17 | // (works only with O_SPEED) |
| 18 | #define MAX_LINE_READ 625 // max. lines to be read by |
| 19 | // read_file() 50k/80c |
| 20 | |
| 21 | // the pager info structure |
| 22 | #define TEXT 0 // the filename or string |
| 23 | #define FILE 1 // 1 == file, 0 = string |
| 24 | #define CURL 2 // current line |
| 25 | #define MAXL 3 // last line |
| 26 | #define PAGE 4 // page length |
| 27 | #define REGX 5 // last regular expression |
| 28 | #define CTRL 6 // function to give control |
| 29 | #define CARG 7 // array of args to CTRL |
| 30 | #define FLAG 8 // special flags |
| 31 | # define E_PROMPT 1 // prompt at end of file |
| 32 | # define E_CAT 2 // do not prompt for more |
| 33 | # define E_ABS 4 // show line numbers at prompt |
| 34 | #ifdef O_SPEED |
| 35 | # define JUNK 9 // junk index |
| 36 | # define JUNKSIZE 10 // size of string junks |
| 37 | #endif |
| 38 | |
| 39 | #ifdef GERMAN |
| 40 | # define MSG_PROMPT "--mehr--" |
| 41 | # define MSG_TOP "ANFANG " |
| 42 | # define MSG_BOTTOM "ENDE " |
| 43 | # define MSG_OOPS "Ohh, da lief etwas schief!" |
| 44 | #else |
| 45 | # define MSG_PROMPT "--more--" |
| 46 | # define MSG_TOP "TOP " |
| 47 | # define MSG_BOTTOM "BOTTOM " |
| 48 | # define MSG_OOPS "Oops, something went wrong!" |
| 49 | #endif |
| 50 | |
| 51 | #include <player/base.h> |
| 52 | |
| 53 | #define PAGELENGTH (this_interactive() ? \ |
| 54 | this_interactive()->QueryProp(P_SCREENSIZE) : \ |
| 55 | (interactive(this_player()) ? \ |
| 56 | this_player()->QueryProp(P_SCREENSIZE) : 20)) |
| 57 | |
| 58 | // old_explode() must create an array that implode()'s to the same string |
| 59 | #define Explode(s,x) (explode(s,x)) |
| 60 | |
| 61 | #endif // __PAGER_H__ |
| 62 | |
| 63 | |