/****************************************************************************
- * Copyright 2019-2020,2021 Thomas E. Dickey *
+ * Copyright 2019-2021,2023 Thomas E. Dickey *
* Copyright 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_screen.c,v 1.103 2021/10/18 22:40:48 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.105 2023/04/28 20:58:54 tom Exp $")
#define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */
typedef struct {
const char name[17];
PARAM_TYPE type;
- size_t size;
size_t offset;
} SCR_PARAMS;
};
#undef DATA
-#define sizeof2(type,name) sizeof(((type *)0)->name)
-#define DATA(name, type) { { #name }, type, sizeof2(WINDOW, name), offsetof(WINDOW, name) }
+#define DATA(name, type) { { #name }, type, offsetof(WINDOW, name) }
static const SCR_PARAMS scr_params[] =
{
returnWin(0);
}
- if (tmp._flags & _ISPAD) {
+ if (IS_PAD(&tmp)) {
nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
tmp._maxy + 1,
tmp._maxx + 1);
nwin->_regtop = tmp._regtop;
nwin->_regbottom = tmp._regbottom;
- if (tmp._flags & _ISPAD)
+ if (IS_PAD(&tmp))
nwin->_pad = tmp._pad;
if (old_format) {
attr_t attr;
*buffer = '\0';
- if (!strncmp(name, "_pad.", (size_t) 5) && !(win->_flags & _ISPAD)) {
+ if (!strncmp(name, "_pad.", (size_t) 5) && !IS_PAD(win)) {
continue;
}
switch (scr_params[y].type) {