X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_newwin.c;h=5d48107a3003d9fee2917c8bf3af9de50984adda;hp=564c07fbb1f9e32f85e743880147e992547036e9;hb=0de8912c1c0746eb37b733e9e6fdf852aab9506a;hpb=76a479337308b4b5e749fa8c38b7b7f482998c5b diff --git a/ncurses/base/lib_newwin.c b/ncurses/base/lib_newwin.c index 564c07fb..5d48107a 100644 --- a/ncurses/base/lib_newwin.c +++ b/ncurses/base/lib_newwin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2011,2016 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -43,7 +43,7 @@ #include #include -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.74 2017/05/13 23:17:29 tom Exp $") #define window_is(name) ((sp)->_##name == win) @@ -104,12 +104,12 @@ _nc_freewin(WINDOW *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; @@ -388,18 +388,18 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx 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