home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / BORDDRWT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.1 KB  |  57 lines

  1. /*
  2.       borddrwt.c        5/7/87
  3.  
  4.     % bd_DrawTitle()
  5.  
  6.     OWL 1.1
  7.     Copyright (c) 1986, 1987, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12.      7/27/88 jmd     Upgraded to new border stuff
  13.      8/13/88 jmd     Changed name to bord_DrawTitle
  14.     11/13/88 jmd     removed test for negative row
  15.      3/31/89 ted    Renamed from bdtools.c.
  16. */
  17.  
  18. #include "oakhead.h"
  19. #include "disppriv.h"
  20. #include "bordobj.h"
  21. #include "bordod.h"
  22. /* -------------------------------------------------------------------------- */
  23.  
  24. void bord_DrawTitle(ptd, row, col, title, attr, width)
  25.     ptd_struct *ptd;
  26.     int  row, col;
  27.     char *title;
  28.     byte attr;
  29.     int  width;
  30. /*
  31.     Draws the title at row and column.
  32.     Breaks at newlines
  33. */
  34. {
  35.     char *p, *t, temp;
  36.  
  37.     if (title == NULL) {
  38.         return;
  39.     }
  40.  
  41.     p = title;
  42.     do {
  43.         t = p;
  44.         while (*p != '\n' && *p != '\0') {
  45.             p++;
  46.         }
  47.         temp = *p;
  48.         *p = '\0';
  49.         ptd_DrawString(ptd, row, col, t, attr, width);
  50.         row++;
  51.         *p = temp;
  52.     }
  53.     while(*p++ != '\0' && *p != '\0');
  54. }
  55. /* -------------------------------------------------------------------------- */
  56.  
  57.