home *** CD-ROM | disk | FTP | other *** search
- /*
- borddrwt.c 5/7/87
-
- % bd_DrawTitle()
-
- OWL 1.1
- Copyright (c) 1986, 1987, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 7/27/88 jmd Upgraded to new border stuff
- 8/13/88 jmd Changed name to bord_DrawTitle
- 11/13/88 jmd removed test for negative row
- 3/31/89 ted Renamed from bdtools.c.
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "bordobj.h"
- #include "bordod.h"
- /* -------------------------------------------------------------------------- */
-
- void bord_DrawTitle(ptd, row, col, title, attr, width)
- ptd_struct *ptd;
- int row, col;
- char *title;
- byte attr;
- int width;
- /*
- Draws the title at row and column.
- Breaks at newlines
- */
- {
- char *p, *t, temp;
-
- if (title == NULL) {
- return;
- }
-
- p = title;
- do {
- t = p;
- while (*p != '\n' && *p != '\0') {
- p++;
- }
- temp = *p;
- *p = '\0';
- ptd_DrawString(ptd, row, col, t, attr, width);
- row++;
- *p = temp;
- }
- while(*p++ != '\0' && *p != '\0');
- }
- /* -------------------------------------------------------------------------- */
-
-