- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright 2018-2022,2023 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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
show_loc = wmouse_trafo(win, &event.y, &event.x, FALSE);
if (show_loc) {
show_loc = wmouse_trafo(win, &event.y, &event.x, FALSE);
if (show_loc) {
while ((c = wGetchar(win)) == ERR) {
incount++;
if (blocking_getch(flags, delay)) {
while ((c = wGetchar(win)) == ERR) {
incount++;
if (blocking_getch(flags, delay)) {
while ((code = wGet_wchar(win, &c)) == ERR) {
incount++;
if (blocking_getch(flags, delay)) {
while ((code = wGet_wchar(win, &c)) == ERR) {
incount++;
if (blocking_getch(flags, delay)) {
WINDOW *my_wins[SIZEOF(attrs_to_test)];
ATTR_TBL my_list[SIZEOF(attrs_to_test)];
unsigned my_size = init_attr_list(my_list, termattrs());
if (my_size > 1) {
WINDOW *my_wins[SIZEOF(attrs_to_test)];
ATTR_TBL my_list[SIZEOF(attrs_to_test)];
unsigned my_size = init_attr_list(my_list, termattrs());
if (my_size > 1) {
for (j = 0; j < my_size; ++j) {
my_wins[j] = subwin(stdscr,
1, LEN_ATTRSTRING,
for (j = 0; j < my_size; ++j) {
my_wins[j] = subwin(stdscr,
1, LEN_ATTRSTRING,
memset(&ch, 0, sizeof(ch));
if (getbkgrnd(&ch) != ERR) {
memset(&ch, 0, sizeof(ch));
if (getbkgrnd(&ch) != ERR) {
if (getcchar(&ch, wch, &attr, &pair, 0) != ERR) {
result = attr;
}
if (getcchar(&ch, wch, &attr, &pair, 0) != ERR) {
result = attr;
}
W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
WINDOW *my_wins[SIZEOF(w_attrs_to_test)];
unsigned my_size = init_w_attr_list(my_list, term_attrs());
if (my_size > 1) {
W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
WINDOW *my_wins[SIZEOF(w_attrs_to_test)];
unsigned my_size = init_w_attr_list(my_list, term_attrs());
if (my_size > 1) {
for (j = 0; j < my_size; ++j) {
my_wins[j] = subwin(stdscr,
1, LEN_ATTRSTRING,
for (j = 0; j < my_size; ++j) {
my_wins[j] = subwin(stdscr,
1, LEN_ATTRSTRING,
#define InitExtendedPair(p,f,g) init_extended_pair((p),(f),(g))
#define ExtendedColorSet(p) color_set((NCURSES_PAIRS_T) (p), &(p))
#define EXTENDED_PAIRS_T int
#else
#define InitExtendedPair(p,f,g) init_extended_pair((p),(f),(g))
#define ExtendedColorSet(p) color_set((NCURSES_PAIRS_T) (p), &(p))
#define EXTENDED_PAIRS_T int
#else
-#define InitExtendedPair(p,f,g) init_pair((NCURSES_PAIRS_T) (p),(f),(g))
+#define InitExtendedPair(p,f,g) init_pair((NCURSES_PAIRS_T) (p),(NCURSES_COLOR_T)(f),(NCURSES_COLOR_T)(g))
#define ExtendedColorSet(p) color_set((NCURSES_PAIRS_T) (p), NULL)
#define EXTENDED_PAIRS_T NCURSES_PAIRS_T
#endif
#define ExtendedColorSet(p) color_set((NCURSES_PAIRS_T) (p), NULL)
#define EXTENDED_PAIRS_T NCURSES_PAIRS_T
#endif
fprintf(stderr, "\033]4;%d;?\007", n);
got = (int) read(0, result, sizeof(result) - 1);
if (got < 0)
fprintf(stderr, "\033]4;%d;?\007", n);
got = (int) read(0, result, sizeof(result) - 1);
if (got < 0)
while (fgets(buffer, sizeof(buffer), fp) != 0) {
if (sscanf(buffer, "scale:%d", &c) == 1) {
scale = c;
while (fgets(buffer, sizeof(buffer), fp) != 0) {
if (sscanf(buffer, "scale:%d", &c) == 1) {
scale = c;
-cycle_attr(int ch, unsigned *at_code, chtype *attr, ATTR_TBL * list, unsigned limit)
+cycle_attr(int ch, unsigned *at_code, attr_t *attr, ATTR_TBL * list, unsigned limit)
default:
if (cycle_attr(c, &at_code, &attr, my_list, my_size)) {
default:
if (cycle_attr(c, &at_code, &attr, my_list, my_size)) {
reset_mbytes(state);
test = count_mbytes(base, 0, &state);
if (test == (size_t) -1) {
reset_mbytes(state);
test = count_mbytes(base, 0, &state);
if (test == (size_t) -1) {
MvAddCh(LINES / 2, 0, colored_chtype(ACS_LTEE, attr, pair));
MvAddCh(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE, attr, pair));
/* *INDENT-ON* */
MvAddCh(LINES / 2, 0, colored_chtype(ACS_LTEE, attr, pair));
MvAddCh(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE, attr, pair));
/* *INDENT-ON* */
static cchar_t *
merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, NCURSES_PAIRS_T pair)
{
static cchar_t *
merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, NCURSES_PAIRS_T pair)
{
TEST_CCHAR(src, count, {
attr |= (test_attrs & A_ALTCHARSET);
setcchar(dst, test_wch, attr, pair, NULL);
TEST_CCHAR(src, count, {
attr |= (test_attrs & A_ALTCHARSET);
setcchar(dst, test_wch, attr, pair, NULL);
_nc_SPRINTF(tmp, _nc_SLIMIT(sizeof(tmp))
"%3ld (0x%lx)", (long) code, (long) code);
_nc_SPRINTF(tmp, _nc_SLIMIT(sizeof(tmp))
"%3ld (0x%lx)", (long) code, (long) code);
setcchar(&temp, codes, attr, pair, 0);
do {
setcchar(&temp, codes, attr, pair, 0);
do {
/*
* Give non-spacing characters something to combine with. If we
* don't, they'll bunch up in a heap on the space after the ":".
/*
* Give non-spacing characters something to combine with. If we
* don't, they'll bunch up in a heap on the space after the ":".
(void) mvadd_wch(LINES / 2, 0, MERGE_ATTR(0, WACS_LTEE));
(void) mvadd_wch(LINES / 2, COLS - 1, MERGE_ATTR(0, WACS_RTEE));
/* *INDENT-ON* */
(void) mvadd_wch(LINES / 2, 0, MERGE_ATTR(0, WACS_LTEE));
(void) mvadd_wch(LINES / 2, COLS - 1, MERGE_ATTR(0, WACS_RTEE));
/* *INDENT-ON* */
n = SHOW_UTF8(n, "WACS_S7", "\342\216\274");
(void) SHOW_UTF8(n, "WACS_S9", "\342\216\275");
/* *INDENT-ON* */
n = SHOW_UTF8(n, "WACS_S7", "\342\216\274");
(void) SHOW_UTF8(n, "WACS_S9", "\342\216\275");
/* *INDENT-ON* */
void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
unsigned my_size = init_w_attr_list(my_list, term_attrs());
void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
unsigned my_size = init_w_attr_list(my_list, term_attrs());
} else if (at_page[0] != '\0') {
sscanf(at_page, "%x", &digit);
}
} else if (at_page[0] != '\0') {
sscanf(at_page, "%x", &digit);
}
switch (legend[n].code) {
default:
_nc_STRCPY(buf, legend[n].msg, sizeof(buf));
switch (legend[n].code) {
default:
_nc_STRCPY(buf, legend[n].msg, sizeof(buf));
wclrtobot(current->wind);
wmove(current->wind, lr.y, lr.x);
}
wclrtobot(current->wind);
wmove(current->wind, lr.y, lr.x);
}
for (i = 0; i < my; i++) {
wmove(current->wind, i, tmp->x - ul.x + 1);
wclrtoeol(current->wind);
}
for (i = 0; i < my; i++) {
wmove(current->wind, i, tmp->x - ul.x + 1);
wclrtoeol(current->wind);
}
wnoutrefresh(current->wind);
memcpy(&lr, tmp, sizeof(pair));
wnoutrefresh(current->wind);
memcpy(&lr, tmp, sizeof(pair));
"Number repeats. Toggle legend:? filler:a timer:t scrollmark:s."
};
int n = ((int) SIZEOF(legend) - (LINES - line));
"Number repeats. Toggle legend:? filler:a timer:t scrollmark:s."
};
int n = ((int) SIZEOF(legend) - (LINES - line));
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
_nc_STRNCPY(temp, source ? source : "", have + 1);
len = (size_t) (char *) field_userptr(me);
if (c <= KEY_MAX) {
_nc_STRNCPY(temp, source ? source : "", have + 1);
len = (size_t) (char *) field_userptr(me);
if (c <= KEY_MAX) {
FORM *form;
FIELD *f[12], *secure;
FIELDTYPE *fty_middle = new_fieldtype(mi_field_check, mi_char_check);
FIELDTYPE *fty_passwd = new_fieldtype(pw_field_check, pw_char_check);
FORM *form;
FIELD *f[12], *secure;
FIELDTYPE *fty_middle = new_fieldtype(mi_field_check, mi_char_check);
FIELDTYPE *fty_passwd = new_fieldtype(pw_field_check, pw_char_check);
assert(state >= 0 && state < OVERLAP_FLAVORS);
for (item = 0; item < (2 * OVERLAP_FLAVORS); ++item) {
assert(state >= 0 && state < OVERLAP_FLAVORS);
for (item = 0; item < (2 * OVERLAP_FLAVORS); ++item) {
overlap_test_1(flavor[otBASE_fill], 0, win1, 'A');
break;
overlap_test_1(flavor[otBASE_fill], 0, win1, 'A');
break;
overlap_test_1(flavor[otBASE_fill], 1, win2, 'B');
break;
overlap_test_1(flavor[otBASE_fill], 1, win2, 'B');
break;
x_overlap_test_1(flavor[otBASE_fill], 0, win1, WIDE_A);
break;
x_overlap_test_1(flavor[otBASE_fill], 0, win1, WIDE_A);
break;
x_overlap_test_1(flavor[otBASE_fill], 1, win2, WIDE_B);
break;
x_overlap_test_1(flavor[otBASE_fill], 1, win2, WIDE_B);
break;
- ," -a f,b set default-colors (assumed white-on-black)"
- ," -d use default-colors if terminal supports them"
+ ," -a f,b set default-colors (assumed white-on-black)"
+ ," -d use default-colors if terminal supports them"
- ," -f rip-off footer line (can repeat)"
- ," -h rip-off header line (can repeat)"
+ ," -F rip-off footer line (can repeat)"
+ ," -H rip-off header line (can repeat)"
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32)
- ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment"
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_NC_WINDOWS)
+ ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment"
#endif
};
size_t n;
for (n = 0; n < SIZEOF(tbl); n++)
fprintf(stderr, "%s\n", tbl[n]);
#endif
};
size_t n;
for (n = 0; n < SIZEOF(tbl); n++)
fprintf(stderr, "%s\n", tbl[n]);
do {
printf("This is the ncurses main menu (uppercase for wide-characters)\n");
for (n = 0; n < SIZEOF(cmds); ++n) {
do {
printf("This is the ncurses main menu (uppercase for wide-characters)\n");
for (n = 0; n < SIZEOF(cmds); ++n) {
/*+-------------------------------------------------------------------------
main(argc,argv)
--------------------------------------------------------------------------*/
/*+-------------------------------------------------------------------------
main(argc,argv)
--------------------------------------------------------------------------*/
- while ((c = getopt(argc, argv, "a:dEe:fhmp:s:Tt:x")) != -1) {
- switch (c) {
-#ifdef NCURSES_VERSION
+ while ((ch = getopt(argc, argv, OPTS_COMMON "a:dEe:FHmp:s:Tt:x")) != -1) {
+ switch (ch) {
+#ifdef NCURSES_VERSION_PATCH
+#if HAVE_USE_DEFAULT_COLORS
+#if HAVE_ASSUME_DEFAULT_COLORS
case 'a':
assumed_colors = TRUE;
switch (sscanf(optarg, "%d,%d", &default_fg, &default_bg)) {
case 'a':
assumed_colors = TRUE;
switch (sscanf(optarg, "%d,%d", &default_fg, &default_bg)) {
ripoffline(1, rip_header);
break;
#endif /* HAVE_RIPOFFLINE */
ripoffline(1, rip_header);
break;
#endif /* HAVE_RIPOFFLINE */