X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=72847bc94a9dc4c1f59df87052f2a59c118d4e27;hp=5e490715e0da2affa9b9f1bdfeaa0353aafd1c99;hb=47c323416bb23200896a311ceadbea794b0eb3a6;hpb=493e2f7b3fc309879f561a094fdfc15e5304b3d6 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 5e490715..72847bc9 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -35,7 +35,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.644 2021/08/18 21:55:42 tom Exp $ + * $Id: curses.priv.h,v 1.649 2022/04/30 18:32:29 tom Exp $ * * curses.priv.h * @@ -575,6 +575,10 @@ NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); #endif +#define IS_SUBWIN(w) ((w)->_flags & _SUBWIN) +#define IS_PAD(w) ((w)->_flags & _ISPAD) +#define IS_WRAPPED(w) ((w)->_flags & _WRAPPED) + #define HasHardTabs() (NonEmpty(clear_all_tabs) && NonEmpty(set_tab)) #define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ @@ -899,8 +903,7 @@ typedef enum { /* * The SCREEN structure. */ - -struct screen { +typedef struct screen { int _ifd; /* input file descriptor for screen */ int _ofd; /* output file descriptor for screen */ FILE *_ofp; /* output file ptr for screen */ @@ -1184,7 +1187,8 @@ struct screen { const char *_tputs_trace; #endif #endif -}; +#undef SCREEN +} SCREEN; extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; @@ -1502,6 +1506,13 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; _nc_err_abort(MSG_NO_MEMORY); \ } while (0) +#define TYPE_CALLOC(type, size, name) \ + do { \ + name = typeCalloc(type, size); \ + if (name == 0) \ + _nc_err_abort(MSG_NO_MEMORY); \ + } while (0) + #define TYPE_REALLOC(type, size, name) \ do { \ name = typeRealloc(type, size, name); \ @@ -1615,6 +1626,8 @@ typedef void VoidFunc(void); #define returnWin(code) TRACE_RETURN1(code,win) #define returnDB(rc) do { TR(TRACE_DATABASE,(T_RETURN("code %d"), (rc))); return (rc); } while (0) +#define returnPtrDB(rc) do { TR(TRACE_DATABASE,(T_RETURN("%p"), (rc))); return (rc); } while (0) +#define returnVoidDB do { TR(TRACE_DATABASE,(T_RETURN(""))); return; } while (0) extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (int); extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *); @@ -2212,7 +2225,7 @@ extern NCURSES_EXPORT_VAR(SCREEN *) SP; /* * We don't want to use the lines or columns capabilities internally, because - * if the application is running multiple screens under X, it's quite possible + * if the application is running multiple screens under X, it is quite possible * they could all have type xterm but have different sizes! So... */ #define screen_lines(sp) (sp)->_lines