GRASS Programmer's Manual  6.4.2(2012)
V_exit.c
Go to the documentation of this file.
00001 
00028 #include <grass/config.h>
00029 #include <stdio.h>
00030 #include <grass/vask.h>
00031 
00032 
00041 void V_exit(void)
00042 {
00043 #ifdef HAVE_KEYPAD
00044     keypad(stdscr, 0);
00045 #endif
00046     clear();
00047     refresh();
00048 
00049     /* added for Mips' braindead implementation of curses 
00050      * and the ordering is important
00051      */
00052     echo();
00053     nl();
00054     noraw();
00055 
00056     endwin();
00057     fflush(stdout);
00058     fflush(stderr);
00059     fflush(stdin);
00060 
00061     /* Added 17 Sep 1990  dpg.  is a hack we have been using on Sys V 
00062      * machines it is not the correct way, but it seems to do the job.
00063      * Fixes the problem with prompts not being displayed after 
00064      * exitting curses. */
00065 #ifdef SYSV
00066     setvbuf(stderr, NULL, _IONBF, 0);
00067     setvbuf(stdout, NULL, _IONBF, 0);
00068 #endif
00069 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines