|
|
1.1 ! root 1: /* ds.h - definitions for DS */ ! 2: ! 3: #include <doscalls.h> ! 4: #include <subcalls.h> ! 5: ! 6: #define FALSE 0 ! 7: #define TRUE 1 ! 8: ! 9: #define VioHandle 0 ! 10: ! 11: #define MAX_IMAGE_ROWS 200 ! 12: #define MAX_COLS 80 ! 13: ! 14: #define FILE_NAME_LEN 13 ! 15: #define MAX_PATH_LEN (64+FILE_NAME_LEN) ! 16: ! 17: #define DosAttrReadOnly 0x01 ! 18: #define DosAttrHidden 0x02 ! 19: #define DosAttrSystem 0x04 ! 20: #define DosAttrLabel 0x08 ! 21: #define DosAttrSubDir 0x10 ! 22: #define DosAttrArchive 0x20 ! 23: ! 24: #define DosAttrAll 0x3F ! 25: ! 26: #define DosErrorFileNotFound 2 ! 27: #define DosErrorNoMoreFiles 18 ! 28: ! 29: #define D_INDENT FILE_NAME_LEN ! 30: #define RT_CHAR 0xC8 ! 31: #define LT_CHAR 0xBC ! 32: #define BR_CHAR 0xC9 ! 33: #define BL_CHAR 0xBB ! 34: #define BT_CHAR 0xBA ! 35: #define LR_CHAR 0xCD ! 36: #define BRT_CHAR 0xCC ! 37: ! 38: #define optKey 0x0054 ! 39: #define helpKey 0x003B ! 40: #define enterKey 0x0D00 ! 41: #define upKey 0x0048 ! 42: #define pgUpKey 0x0049 ! 43: #define downKey 0x0050 ! 44: #define pgDownKey 0x0051 ! 45: #define exitKey 0x0043 ! 46: #define leftKey 0x004B ! 47: #define rightKey 0x004D ! 48: ! 49: #define WINDOW_TOP 2 /* Start tree window on third row */ ! 50: #define WINDOW_LEFT 0 /* Start tree window at left column */ ! 51: ! 52: #define titleC 0 ! 53: #define nameC 1 ! 54: #define cursorC 2 ! 55: #define barC 3 ! 56: #define statusC 4 ! 57: #define popupC 5 ! 58: #define errorC 6 ! 59: #define blankC 7 ! 60: ! 61: #define N_COLORS 8 ! 62: ! 63: #define INIT_SYMBOL "USER" ! 64: #define INIT_FILE "DS.INI" ! 65: #define INIT_FILE_HEADER "DS Initialization File - Ben Slivka\n" ! 66: ! 67: ! 68: typedef struct FileFindBuf FileSearch; ! 69: ! 70: ! 71: #define SB_LENGTH 43 ! 72: ! 73: ! 74: typedef struct DirStruct { ! 75: char d_name[FILE_NAME_LEN]; /* Directory name */ ! 76: int d_row; /* Row to display name */ ! 77: int d_col; /* Column to display name */ ! 78: struct DirStruct *d_parent; /* Parent directory at higher level */ ! 79: struct DirStruct *d_prev; /* Previous directory at same level */ ! 80: struct DirStruct *d_next; /* Next directory at same level */ ! 81: struct DirStruct *d_child; /* First directory at lower level */ ! 82: struct DirStruct *d_link; /* Breadth-first link */ ! 83: } Directory; ! 84: ! 85: typedef struct { ! 86: unsigned char theChar; ! 87: unsigned char theAttr; ! 88: } cellType; ! 89: ! 90: typedef struct { ! 91: unsigned a_fore : 3; ! 92: unsigned a_bright : 1; ! 93: unsigned a_back : 3; ! 94: unsigned a_blink : 1; ! 95: } AttrStruct; ! 96: ! 97: ! 98: /* Stuff from VIO.H */ ! 99: ! 100: typedef struct { ! 101: unsigned char ch; /* character */ ! 102: unsigned char at; /* attribute */ ! 103: } Cell; ! 104: ! 105: typedef unsigned char Attr; ! 106: /* ! 107: #define cefs(a) (Cell far *)(a) ! 108: */ ! 109: #define cefs(a) (char far *)(a) /* Bogus for subcalls.h */ ! 110: ! 111: #define afs(a) (Attr far *)(a) ! 112: #define chfs(a) (char far *)(a) ! 113: #define ifs(a) (int far *)(a) ! 114: #define ufs(a) (unsigned int far *)(a) ! 115: ! 116: /*** Attribute definitions */ ! 117: ! 118: #define black 0 ! 119: #define blue 1 ! 120: #define green 2 ! 121: #define cyan 3 ! 122: #define red 4 ! 123: #define magenta 5 ! 124: #define yellow 6 ! 125: #define white 7 ! 126: #define bright 8 ! 127: #define blinking 8 ! 128: ! 129: /*** attr - compute a character attribute ! 130: * ! 131: * ENTRY: f = foreground attribute ! 132: * b = backround attribute ! 133: * ! 134: * EXIT: returns combined attribute ! 135: */ ! 136: ! 137: #define attr(f,b) ((b)<<4) + (f)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.