• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/kconfig/lxdialog/menubox.c
Yann E. MORINYann E. MORIN committed b48e35a28a614 Nov 2013
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
/*
2
 *  menubox.c -- implements the menu box
3
 *
4
 *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
5
 *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com)
6
 *
7
 *  This program is free software; you can redistribute it and/or
8
 *  modify it under the terms of the GNU General Public License
9
 *  as published by the Free Software Foundation; either version 2
10
 *  of the License, or (at your option) any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
 */
21
​
22
/*
23
 *  Changes by Clifford Wolf (god@clifford.at)
24
 *
25
 *  [ 1998-06-13 ]
26
 *
27
 *    *)  A bugfix for the Page-Down problem
28
 *
29
 *    *)  Formerly when I used Page Down and Page Up, the cursor would be set
30
 *        to the first position in the menu box.  Now lxdialog is a bit
31
 *        smarter and works more like other menu systems (just have a look at
32
 *        it).
33
 *
34
 *    *)  Formerly if I selected something my scrolling would be broken because
35
 *        lxdialog is re-invoked by the Menuconfig shell script, can't
36
 *        remember the last scrolling position, and just sets it so that the
37
 *        cursor is at the bottom of the box.  Now it writes the temporary file
38
 *        lxdialog.scrltmp which contains this information. The file is
39
 *        deleted by lxdialog if the user leaves a submenu or enters a new
40
 *        one, but it would be nice if Menuconfig could make another "rm -f"
41
 *        just to be sure.  Just try it out - you will recognise a difference!
42
 *
43
 *  [ 1998-06-14 ]
44
 *
45
 *    *)  Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files
46
 *        and menus change their size on the fly.
47
 *
48
 *    *)  If for some reason the last scrolling position is not saved by
49
 *        lxdialog, it sets the scrolling so that the selected item is in the
50
 *        middle of the menu box, not at the bottom.
51
 *
52
 * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
53
 * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus.
54
 * This fixes a bug in Menuconfig where using ' ' to descend into menus
55
 * would leave mis-synchronized lxdialog.scrltmp files lying around,
56
 * fscanf would read in 'scroll', and eventually that value would get used.
57
 */
58
​
59
#include "dialog.h"
60
​
61
static int menu_width, item_x;
62
​
63
/*
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.