~ubuntu-branches/debian/sid/ncurses/sid-200908151540

« back to all changes in this revision

Viewing changes to ncurses/tinfo/init_keytry.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-11-30 03:43:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20081130034300-lw6qrujyjmv6e32x
Tags: 5.7+20081122-2
Adding patch from Samuel Thibault to ensure that aalib checks the
value returned by Gpm_GetEvent() and only proceeds if value == 1
(Closes: #506717).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
3
3
 *                                                                          *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a  *
5
5
 * copy of this software and associated documentation files (the            *
27
27
 ****************************************************************************/
28
28
 
29
29
#include <curses.priv.h>
 
30
 
 
31
#include <term.h>
 
32
/* keypad_xmit, keypad_local, meta_on, meta_off */
 
33
/* cursor_visible,cursor_normal,cursor_invisible */
 
34
 
30
35
#include <tic.h>                /* struct tinfo_fkeys */
31
36
 
32
37
#include <term_entry.h>
33
38
 
34
 
MODULE_ID("$Id: init_keytry.c,v 1.14 2009/05/10 00:48:29 tom Exp $")
 
39
MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
35
40
 
36
41
/*
37
42
**      _nc_init_keytry()
45
50
 * than cur_term.
46
51
 */
47
52
#undef CUR
48
 
#define CUR SP_TERMTYPE 
 
53
#define CUR (sp->_term)->type.
49
54
 
50
55
#if     BROKEN_LINKER
51
56
#undef  _nc_tinfo_fkeys
97
102
                if (name != 0
98
103
                    && *name == 'k'
99
104
                    && value != 0
100
 
                    && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx
101
 
                                                     value) == 0) {
 
105
                    && key_defined(value) == 0) {
102
106
                    (void) _nc_add_to_try(&(sp->_keytry),
103
107
                                          value,
104
108
                                          n - STRCOUNT + KEY_MAX);