| 1 | /* |
| 2 | $Header: d:/cvsroot/tads/TADS2/msdos/OSDBG.H,v 1.2 1999/05/17 02:52:18 MJRoberts Exp $ |
| 3 | */ |
| 4 | |
| 5 | /* |
| 6 | * Copyright (c) 1992, 2002 Michael J. Roberts. All Rights Reserved. |
| 7 | * |
| 8 | * Please see the accompanying license file, LICENSE.TXT, for information |
| 9 | * on using and copying this software. |
| 10 | */ |
| 11 | /* |
| 12 | Name |
| 13 | osdbg.h - DOS interface definitions for os routines for debugger |
| 14 | Function |
| 15 | DOS interface definitions for os routines for debugger |
| 16 | Notes |
| 17 | none |
| 18 | Modified |
| 19 | 04/21/92 MJRoberts - creation |
| 20 | */ |
| 21 | |
| 22 | #ifndef OSDBG_INCLUDED |
| 23 | #define OSDBG_INCLUDED |
| 24 | |
| 25 | /* window definiton */ |
| 26 | struct oswdef |
| 27 | { |
| 28 | int oswx; /* current x location */ |
| 29 | int oswy; /* current y location */ |
| 30 | int oswcolor; /* current text color */ |
| 31 | int oswx1; /* left edge of window (this column is included in window) */ |
| 32 | int oswy1; /* top line of window */ |
| 33 | int oswx2; /* right edge of window */ |
| 34 | int oswy2; /* bottom line of window */ |
| 35 | int oswflg; /* flags for window */ |
| 36 | # define OSWFCLIP 0x01 /* don't wrap long lines */ |
| 37 | # define OSWFMORE 0x02 /* use [more] mode in this window */ |
| 38 | int oswmore; /* number of lines since last [more] */ |
| 39 | }; |
| 40 | typedef struct oswdef oswdef; |
| 41 | |
| 42 | /* print to the debugger window */ |
| 43 | void osdbgpt(oswdef *, char *fmt, ...); |
| 44 | |
| 45 | /* locate in the debugger window */ |
| 46 | void ossdbgloc(char y, char x); |
| 47 | |
| 48 | /* scroll a window up a line */ |
| 49 | static void osdbgsc(oswdef *win); |
| 50 | |
| 51 | /* clear a window */ |
| 52 | void osdbgclr(oswdef *win); |
| 53 | |
| 54 | /* initialize debugger UI */ |
| 55 | int osdbgini(int rows, int cols); |
| 56 | |
| 57 | /* set video page */ |
| 58 | int ossvpg(char pg); |
| 59 | |
| 60 | /* open a window - set up location */ |
| 61 | void osdbgwop(oswdef *win, int x1, int y1, int x2, int y2, int color); |
| 62 | |
| 63 | /* get some text */ |
| 64 | int osdbggts(oswdef *win, char *buf, int (*cmdfn)(void *, char), void *cmdctx); |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | #endif /* OSDBG_INCLUDED */ |