3 次代码提交 c8b933a210 ... ba0b1c5afa

作者 SHA1 备注 提交日期
  Menche ba0b1c5afa update build configuration script 8 年之前
  Menche 2427318344 ignore vim temporary files 8 年之前
  Menche f9880482f6 some cleanup 8 年之前
共有 3 个文件被更改,包括 26 次插入8 次删除
  1. 1 0
      .gitignore
  2. 23 5
      configure
  3. 2 3
      src/main.c

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 bin/rl
 src/*.o
 config.mk
+*.swp

+ 23 - 5
configure

@@ -1,15 +1,33 @@
 #! /bin/sh
 
-if which ncurses5-config >/dev/null
+if which ncursesw6-config >/dev/null
 then
-	echo 'using ncurses autoconfiguration script.'
+	echo 'using ncursesw6 autoconfiguration script…'
+	NCURSES_FLAGS=$(ncursesw6-config --cflags)
+	NCURSES_LIBS=$(ncursesw6-config --libs)
+
+elif which ncursesw5-config >/dev/null
+then
+	echo 'using ncursesw5 autoconfiguration script…'
+	NCURSES_FLAGS=$(ncursesw5-config --cflags)
+	NCURSES_LIBS=$(ncursesw5-config --libs)
+elif which ncurses6-config >/dev/null
+then
+	echo 'using ncurses6 autoconfiguration script…'
+	NCURSES_FLAGS=$(ncurses6-config --cflags)
+	NCURSES_LIBS=$(ncurses6-config --libs)
+
+elif which ncurses5-config >/dev/null
+then
+	echo 'using ncurses5 autoconfiguration script…'
 	NCURSES_FLAGS=$(ncurses5-config --cflags)
 	NCURSES_LIBS=$(ncurses5-config --libs)
+
 elif which pkg-config >/dev/null
 then
-	echo 'ncurses autoconfiguration script not found!  trying pkg-config…'
-	NCURSES_FLAGS=$(pkg-config ncurses --cflags)
-	NCURSES_LIBS=$(pkg-config ncurses --libs)
+	echo 'using  pkg-config…'
+	NCURSES_FLAGS=$(pkg-config ncursesw --cflags)
+	NCURSES_LIBS=$(pkg-config ncursesw --libs)
 else
 	echo 'can not configure! you will have to manually specify flags.'
 	NCURSES_FLAGS='# manual configuration required'

+ 2 - 3
src/main.c

@@ -1,4 +1,5 @@
 #include <ncurses.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include "util.h"
 
@@ -20,9 +21,7 @@ int main(int argc, char** argv)
 			break ;
 		}
 
-		wnoutrefresh(stdscr) ;
-		wnoutrefresh(game_window) ;
-		doupdate() ;
+		refresh() ;
 	} while(1) ;