home *** CD-ROM | disk | FTP | other *** search
- /*=======================================================*/
- /* TVWTITLE.C */
- /* */
- /* (c) Copyright 1988 Ralf Brown All Rights Reserved */
- /* May be freely copied for noncommercial use, so long */
- /* as this copyright notice remains intact, and any */
- /* changes are marked in the comment blocks preceding */
- /* functions. */
- /*=======================================================*/
-
- #include <string.h>
- #include "tvapi.h"
- #include "tvstream.h"
-
- /*=======================================================*/
- /* TVwin_title change window's title */
- /* Ralf Brown 4/3/88 */
- /*=======================================================*/
-
- void pascal TVwin_title(OBJECT win,char *title)
- {
- int size = strlen(title) ;
- BYTE *stream = (BYTE *)malloc(size+7) ;
-
- if (stream)
- {
- stream[0] = 0x1B ;
- stream[1] = 0x00 ;
- *((int *)(stream+2)) = size + 2 ;
- stream[4] = 0xEF ;
- stream[5] = size ;
- strncpy((char *)stream+6,title,size) ;
- TVwin_stream(win,stream) ;
- free(stream) ;
- }
- }
-
- /* End of TVWTITLE.C */
-