[git] Pinentry - branch, master, updated. pinentry-0.8.2-6-g462f00d
by Ben Kibbey
cvs at cvs.gnupg.org
Sat Feb 16 03:26:10 CET 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".
The branch, master has been updated
via 462f00dfc6636fbfe2e453c1b820d919ec1d0c99 (commit)
from 31467f7c2cd748d6f822ccf627a2ce8870fb09c6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 462f00dfc6636fbfe2e453c1b820d919ec1d0c99
Author: Ben Kibbey <bjk at luxsci.net>
Date: Fri Feb 15 06:40:01 2013 -0500
Curses build fix for DOS'ish systems.
diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 2957aa2..58da255 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -60,7 +60,9 @@ static short pinentry_color[] = { -1, -1, COLOR_BLACK, COLOR_RED,
COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE,
COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE };
static int init_screen;
+#ifndef HAVE_DOSISH_SYSTEM
static int timed_out;
+#endif
typedef enum
{
@@ -713,8 +715,10 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
FILE *ttyfo = NULL;
SCREEN *screen = 0;
int done = 0;
- int no_input = 1;
char *pin_utf8;
+#ifndef HAVE_DOSISH_SYSTEM
+ int no_input = 1;
+#endif
#ifdef HAVE_NCURSESW
char *old_ctype = NULL;
@@ -788,24 +792,29 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
return -2;
dialog_switch_pos (&diag, diag.pin ? DIALOG_POS_PIN : DIALOG_POS_OK);
+#ifndef HAVE_DOSISH_SYSTEM
wtimeout (stdscr, 70);
+#endif
do
{
int c;
c = wgetch (stdscr); /* Refresh, accept single keystroke of input. */
-
+#ifndef HAVE_DOSISH_SYSTEM
if (timed_out && no_input)
{
done = -2;
break;
}
+#endif
switch (c)
{
+#ifndef HAVE_DOSISH_SYSTEM
case ERR:
continue;
+#endif
case KEY_LEFT:
case KEY_UP:
switch (diag.pos)
@@ -901,8 +910,9 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
if (diag.pos == DIALOG_POS_PIN)
dialog_input (&diag, c);
}
-
+#ifndef HAVE_DOSISH_SYSTEM
no_input = 0;
+#endif
}
while (!done);
@@ -974,18 +984,21 @@ do_touch_file (pinentry_t pinentry)
#endif /*HAVE_UTIME_H*/
}
+#ifndef HAVE_DOSISH_SYSTEM
static void
catchsig (int sig)
{
if (sig == SIGALRM)
timed_out = 1;
}
+#endif
int
curses_cmd_handler (pinentry_t pinentry)
{
int rc;
+#ifndef HAVE_DOSISH_SYSTEM
timed_out = 0;
if (pinentry->timeout)
@@ -997,6 +1010,7 @@ curses_cmd_handler (pinentry_t pinentry)
sigaction (SIGALRM, &sa, NULL);
alarm (pinentry->timeout);
}
+#endif
rc = dialog_run (pinentry, pinentry->ttyname, pinentry->ttytype);
do_touch_file (pinentry);
-----------------------------------------------------------------------
Summary of changes:
pinentry/pinentry-curses.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list