]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-scr.c
ui/ncurses: Always provide a key definition for backtab
[petitboot] / ui / ncurses / nc-scr.c
index e8c5fcabc1b783b46ba051c1db45ec415a50b329..41e35de849381a568cfb6b4f04ecfd862f23d8a4 100644 (file)
@@ -16,9 +16,9 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#if defined(HAVE_CONFIG_H)
 #include "config.h"
-
-#define _GNU_SOURCE
+#endif
 
 #include <assert.h>
 #include <stdarg.h>
@@ -128,7 +128,7 @@ int nc_scr_init(struct nc_scr *scr, enum pb_nc_sig sig, int begin_x,
 
        scr->sub_ncw = derwin(scr->main_ncw,
                LINES - nc_scr_frame_lines,
-               COLS - 1 - begin_x,
+               COLS - nc_scr_frame_cols - begin_x,
                nc_scr_pos_sub,
                begin_x);