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

« back to all changes in this revision

Viewing changes to ncurses/base/nc_panel.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) 1998-2000,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998,2000 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            *
32
32
 
33
33
#include <curses.priv.h>
34
34
 
35
 
MODULE_ID("$Id: nc_panel.c,v 1.5 2009/04/11 21:05:10 tom Exp $")
36
 
 
37
 
NCURSES_EXPORT(struct panelhook *)
38
 
NCURSES_SP_NAME(_nc_panelhook) (NCURSES_SP_DCL0)
39
 
{
40
 
    return (SP_PARM
41
 
            ? &(SP_PARM->_panelHook)
42
 
            : (CURRENT_SCREEN
43
 
               ? &(CURRENT_SCREEN->_panelHook)
44
 
               : 0));
45
 
}
46
 
 
47
 
#if NCURSES_SP_FUNCS
 
35
MODULE_ID("$Id: nc_panel.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
 
36
 
48
37
NCURSES_EXPORT(struct panelhook *)
49
38
_nc_panelhook(void)
50
39
{
51
 
    return NCURSES_SP_NAME(_nc_panelhook) (CURRENT_SCREEN);
 
40
    return (SP ? &(SP->_panelHook) : NULL);
52
41
}
53
 
#endif