~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/vask/V_init.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/**
3
 
 * \file V_init.c
4
 
 *
5
 
 * \brief Interactive initialization functions.
6
 
 *
7
 
 * (C) 1999-2009 by the GRASS Development Team 
8
 
 * 
9
 
 * This program is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU General Public License as published by
11
 
 * the Free Software Foundation; either version 2 of the License, or (at
12
 
 * your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful, but
15
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 
 * General Public License for more details.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License
20
 
 * along with this program; if not, write to the Free Software
21
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
 
 *
23
 
 * \author GRASS GIS Development Team
24
 
 *
25
 
 * \date 1999-2009
26
 
 */
27
 
 
28
 
#include <grass/config.h>
29
 
#include <stdlib.h>
30
 
#include <grass/gis.h>
31
 
#include <grass/vask.h>
32
 
 
33
 
 
34
 
/**
35
 
 * \fn int V_init ()
36
 
 *
37
 
 * \brief Initialize curses and prepare screen.
38
 
 *
39
 
 * \return always returns 0
40
 
 */
41
 
 
42
 
void V_init(void)
43
 
{
44
 
    static int first = 1;
45
 
 
46
 
    G_clear_screen();           /* this is a kludge - xterm has problems
47
 
                                 * it shows what was on the screen after
48
 
                                 * endwin is called in V_exit()
49
 
                                 */
50
 
    if (first) {
51
 
        initscr();              /* initialize curses and tty */
52
 
        first = 0;
53
 
    }
54
 
 
55
 
    /* the order of these 3 calls is important for
56
 
     * Mips' braindead implementation of curses  */
57
 
    noecho();
58
 
    nonl();
59
 
    raw();
60
 
 
61
 
    clear();
62
 
    refresh();
63
 
#ifdef HAVE_KEYPAD
64
 
    keypad(stdscr, 1);
65
 
#endif
66
 
}