|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 1908 (0x774)
Types: TextFile
Names: »sunwin.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z«
└─⟦d846658bd⟧
└─⟦this⟧ »osimis/smap/sunwin.c«
/*
* Copyright (c) 1988 University College London
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the Department of Computer Science, University College London.
* The name of the University may not be used to
* endorse or promote products derived from this software without
* specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* adapts the osimon curses display for Sun window changes */
/*
* By George Pavlou, October 1988
*/
#include <stdio.h>
#include <sys/file.h>
#ifdef SUNWIN
#include <sunwindow/win_struct.h>
#endif
#include "defs.h"
#ifndef SUNWIN
extern int COLS, LINES; /* to be set by curses */
#else
int COLS, LINES;
static int pfd, bfd;
int winchange;
setwinchange ()
{
winchange = YES;
}
getwinsize ()
{
COLS = win_getwidth(bfd) / 8; /* get window size */
LINES = win_getheight(bfd) / 16;
}
int setupwindow ()
{
char pwin [WIN_NAMESIZE+1]; /* parent window name */
if (we_getgfxwindow(pwin) != 0) {
advise(NULLCP, "can't get parent window name");
return(NOTOK);
}
pfd = open(pwin, O_RDWR);
bfd = win_getnewwindow(); /* "blanket" window */
if (win_insertblanket(bfd, pfd) != 0) {
advise(NULLCP, "can't cover parent window");
return(NOTOK);
}
getwinsize();
return(OK);
}
clearwindow ()
{
close(bfd);
win_removeblanket(bfd);
close(pfd);
}
#endif