projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 6.2 - patch 20210418
[ncurses.git]
/
ncurses
/
widechar
/
lib_get_wch.c
diff --git
a/ncurses/widechar/lib_get_wch.c
b/ncurses/widechar/lib_get_wch.c
index 689101732fde20b68238bad87bc45159a460b056..9f10d3bcf121063a791e411602c3801d699e5650 100644
(file)
--- a/
ncurses/widechar/lib_get_wch.c
+++ b/
ncurses/widechar/lib_get_wch.c
@@
-1,5
+1,6
@@
/****************************************************************************
/****************************************************************************
- * Copyright (c) 2002-2011,2016 Free Software Foundation, Inc. *
+ * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 2002-2011,2016 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 *
@@
-40,7
+41,7
@@
#include <curses.priv.h>
#include <ctype.h>
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_get_wch.c,v 1.2
4 2016/05/28 23:36:3
4 tom Exp $")
+MODULE_ID("$Id: lib_get_wch.c,v 1.2
6 2021/04/17 16:12:5
4 tom Exp $")
NCURSES_EXPORT(int)
wget_wch(WINDOW *win, wint_t *result)
NCURSES_EXPORT(int)
wget_wch(WINDOW *win, wint_t *result)
@@
-48,7
+49,6
@@
wget_wch(WINDOW *win, wint_t *result)
SCREEN *sp;
int code;
int value = 0;
SCREEN *sp;
int code;
int value = 0;
- wchar_t wch;
#ifndef state_unused
mbstate_t state;
#endif
#ifndef state_unused
mbstate_t state;
#endif
@@
-97,6
+97,7
@@
wget_wch(WINDOW *win, wint_t *result)
reset_mbytes(state);
status = count_mbytes(buffer, count, state);
if (status >= 0) {
reset_mbytes(state);
status = count_mbytes(buffer, count, state);
if (status >= 0) {
+ wchar_t wch;
reset_mbytes(state);
if (check_mbytes(wch, buffer, count, state) != status) {
code = ERR; /* the two calls should match */
reset_mbytes(state);
if (check_mbytes(wch, buffer, count, state) != status) {
code = ERR; /* the two calls should match */