#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
-
-#include <sys/types.h>
-#include <sys/file.h>
#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD80_ENV)
#include <sgtty.h>
#endif
-#include <stdio.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
#include <lwp.h>
#include "gtxobjects.h"
#include "gtxframe.h"
-
-
int curses_debug; /*Is debugging turned on? */
static char mn[] = "gator_curseswindows"; /*Module name */
fprintf(stderr,
"[%s:%s] Allocating %" AFS_SIZET_FMT " bytes for curses window private space in base window\n",
mn, rn, sizeof(struct gator_cursesgwin));
- c_data =
- (struct gator_cursesgwin *)malloc(sizeof(struct gator_cursesgwin));
+ c_data = malloc(sizeof(struct gator_cursesgwin));
if (c_data == (struct gator_cursesgwin *)0) {
fprintf(stderr,
"[%s:%s] Can't allocate %" AFS_SIZET_FMT " bytes for curses window private space in base window\n",
fprintf(stderr,
"[%s:%s] Allocating %" AFS_SIZET_FMT " bytes for new gwin structure\n", mn,
rn, sizeof(struct gwin));
- newgwin = (struct gwin *)malloc(sizeof(struct gwin));
+ newgwin = malloc(sizeof(struct gwin));
if (newgwin == NULL) {
fprintf(stderr,
"[%s:%s] Can't malloc() %" AFS_SIZET_FMT " bytes for new gwin structure: Errno is %d\n",
fprintf(stderr,
"[%s:%s] Allocating %" AFS_SIZET_FMT " bytes for curses window private space\n",
mn, rn, sizeof(struct gator_cursesgwin));
- c_data =
- (struct gator_cursesgwin *)malloc(sizeof(struct gator_cursesgwin));
+ c_data = malloc(sizeof(struct gator_cursesgwin));
if (c_data == (struct gator_cursesgwin *)0) {
fprintf(stderr,
"[%s:%s] Can't allocate %" AFS_SIZET_FMT " bytes for curses window private space\n",
mn, rn, params->c, cwp->wp, params->x, params->y, curses_y,
curses_x, (params->highlight ? ", using standout mode" : ""));
wmove(cwp->wp, curses_y, curses_x);
- if (params->highlight)
+ if (params->highlight) {
code=wstandout(cwp->wp);
if (code)
return (code);
+ }
waddch(cwp->wp, params->c);
- if (params->highlight)
+ if (params->highlight) {
code=wstandend(cwp->wp);
if (code)
return (code);
+ }
return (0);
mn, rn, params->s, cwp->wp, params->x, params->y, curses_y,
curses_x, (params->highlight ? ", using standout mode" : ""));
wmove(cwp->wp, curses_y, curses_x);
- if (params->highlight)
+ if (params->highlight) {
code=wstandout(cwp->wp);
if (code)
return (code);
+ }
waddstr(cwp->wp, params->s);
- if (params->highlight)
+ if (params->highlight) {
code=wstandend(cwp->wp);
if (code)
return (code);
+ }
return (code);
struct gator_cursesgwin *cwp; /*Curses-specific data */
cwp = (struct gator_cursesgwin *)(gwp->w_data);
-#if defined(AFS_NBSD_ENV) || defined(AFS_DARWIN100_ENV)
- aparms->maxx = getmaxx(cwp->wp);
- aparms->maxy = getmaxy(cwp->wp);
-#else
- aparms->maxx = cwp->wp->_maxx;
- aparms->maxy = cwp->wp->_maxy;
-#endif
+ getmaxyx(cwp->wp, aparms->maxy, aparms->maxx);
return (0);