/****************************************************************************
- * Copyright (c) 1998-2011,2016 Free Software Foundation, Inc. *
+ * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <curses.priv.h>
#include <stddef.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.72 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.76 2021/10/23 18:53:38 tom Exp $")
#define window_is(name) ((sp)->_##name == win)
WINDOWLIST *p, *q;
q = 0;
- for (each_window(SP_PARM, p)) {
+ for (each_window(sp, p)) {
if (&(p->win) == win) {
remove_window_from_screen(win);
if (q == 0)
- WindowList(SP_PARM) = p->next;
+ WindowList(sp) = p->next;
else
q->next = p->next;
- if (!(win->_flags & _SUBWIN)) {
+ if (!IS_SUBWIN(win)) {
int i;
for (i = 0; i <= win->_maxy; i++)
if (num_columns == 0)
num_columns = orig->_maxx + 1 - begx;
- if (orig->_flags & _ISPAD)
+ if (IS_PAD(orig))
flags |= _ISPAD;
win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx num_lines, num_columns,
NCURSES_EXPORT(WINDOW *)
_nc_curscr_of(SCREEN *sp)
{
- return sp == 0 ? 0 : CurScreen(sp);
+ return (sp == 0) ? NULL : CurScreen(sp);
}
NCURSES_EXPORT(WINDOW *)
_nc_newscr_of(SCREEN *sp)
{
- return sp == 0 ? 0 : NewScreen(sp);
+ return (sp == 0) ? NULL : NewScreen(sp);
}
NCURSES_EXPORT(WINDOW *)
_nc_stdscr_of(SCREEN *sp)
{
- return sp == 0 ? 0 : StdScreen(sp);
+ return (sp == 0) ? NULL : StdScreen(sp);
}
#endif