curses 1.2.7 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +19 -0
  3. data/.github/workflows/ubuntu.yml +26 -0
  4. data/.github/workflows/windows.yml +25 -0
  5. data/.gitmodules +1 -1
  6. data/History.md +41 -0
  7. data/README.md +14 -46
  8. data/Rakefile +0 -83
  9. data/curses.gemspec +2 -3
  10. data/ext/curses/curses.c +1314 -176
  11. data/ext/curses/extconf.rb +140 -17
  12. data/lib/curses.rb +5 -12
  13. data/sample/form.rb +52 -0
  14. data/sample/menu.rb +1 -1
  15. data/vendor/PDCurses/.gitignore +47 -0
  16. data/vendor/PDCurses/.travis.yml +49 -0
  17. data/vendor/PDCurses/CMakeLists.txt +68 -0
  18. data/vendor/PDCurses/HISTORY.md +2036 -0
  19. data/vendor/PDCurses/IMPLEMNT.md +327 -0
  20. data/vendor/PDCurses/README.md +77 -0
  21. data/vendor/PDCurses/acs_defs.h +265 -0
  22. data/vendor/PDCurses/appveyor.yml +218 -0
  23. data/vendor/PDCurses/cmake/README.md +71 -0
  24. data/vendor/PDCurses/cmake/build_dependencies.cmake +178 -0
  25. data/vendor/PDCurses/cmake/build_options.cmake +25 -0
  26. data/vendor/PDCurses/cmake/dll_version.cmake +26 -0
  27. data/vendor/PDCurses/cmake/gen_config_header.cmake +43 -0
  28. data/vendor/PDCurses/cmake/get_version.cmake +17 -0
  29. data/vendor/PDCurses/cmake/make_uninstall.cmake +19 -0
  30. data/vendor/PDCurses/cmake/project_common.cmake +121 -0
  31. data/vendor/PDCurses/cmake/resource.in.cmake +52 -0
  32. data/vendor/PDCurses/cmake/sdl2_ttf/CMakeLists.txt +83 -0
  33. data/vendor/PDCurses/cmake/target_arch.cmake +36 -0
  34. data/vendor/PDCurses/cmake/version.in.cmake +73 -0
  35. data/vendor/PDCurses/cmake/watcom_open_dos16_toolchain.cmake +96 -0
  36. data/vendor/PDCurses/cmake/watcom_open_dos32_toolchain.cmake +106 -0
  37. data/vendor/PDCurses/cmake/watcom_open_os2v2_toolchain.cmake +105 -0
  38. data/vendor/PDCurses/curses.h +1846 -0
  39. data/vendor/PDCurses/curspriv.h +134 -0
  40. data/vendor/PDCurses/demos/README.md +25 -0
  41. data/vendor/PDCurses/demos/firework.c +144 -0
  42. data/vendor/PDCurses/demos/newtest.c +581 -0
  43. data/vendor/PDCurses/demos/ozdemo.c +447 -0
  44. data/vendor/PDCurses/demos/ptest.c +283 -0
  45. data/vendor/PDCurses/demos/rain.c +157 -0
  46. data/vendor/PDCurses/demos/testcurs.c +1607 -0
  47. data/vendor/PDCurses/demos/tui.c +1048 -0
  48. data/vendor/PDCurses/demos/tui.h +65 -0
  49. data/vendor/PDCurses/demos/tuidemo.c +233 -0
  50. data/vendor/PDCurses/demos/version.c +61 -0
  51. data/vendor/PDCurses/demos/worm.c +432 -0
  52. data/vendor/PDCurses/demos/xmas.c +955 -0
  53. data/vendor/PDCurses/dos/CMakeLists.txt +47 -0
  54. data/vendor/PDCurses/dos/Makefile.bcc +83 -0
  55. data/vendor/PDCurses/dos/Makefile.dmc +257 -0
  56. data/vendor/PDCurses/dos/Makefile.msc +113 -0
  57. data/vendor/PDCurses/dos/Makefile.wcc +107 -0
  58. data/vendor/PDCurses/dos/README.md +51 -0
  59. data/vendor/PDCurses/dos/bccdos.lrf +9 -0
  60. data/vendor/PDCurses/dos/mscdos.lrf +50 -0
  61. data/vendor/PDCurses/dos/pdcclip.c +132 -0
  62. data/vendor/PDCurses/dos/pdcdisp.c +135 -0
  63. data/vendor/PDCurses/dos/pdcdos.h +194 -0
  64. data/vendor/PDCurses/dos/pdcgetsc.c +98 -0
  65. data/vendor/PDCurses/dos/pdckbd.c +513 -0
  66. data/vendor/PDCurses/dos/pdcscrn.c +785 -0
  67. data/vendor/PDCurses/dos/pdcsetsc.c +101 -0
  68. data/vendor/PDCurses/dos/pdcutil.c +212 -0
  69. data/vendor/PDCurses/libobjs.mif +26 -0
  70. data/vendor/PDCurses/makedist.mif +20 -0
  71. data/vendor/PDCurses/man/README.md +21 -0
  72. data/vendor/PDCurses/man/intro.md +361 -0
  73. data/vendor/PDCurses/man/manext.c +119 -0
  74. data/vendor/PDCurses/man/sdl.md +152 -0
  75. data/vendor/PDCurses/man/sdl2.md +58 -0
  76. data/vendor/PDCurses/man/x11.md +407 -0
  77. data/vendor/PDCurses/ncurses/CMakeLists.txt +66 -0
  78. data/vendor/PDCurses/ncurses/README.md +26 -0
  79. data/vendor/PDCurses/ncurses/makefile +29 -0
  80. data/vendor/PDCurses/os2/CMakeLists.txt +41 -0
  81. data/vendor/PDCurses/os2/Makefile.bcc +90 -0
  82. data/vendor/PDCurses/os2/Makefile.wcc +43 -0
  83. data/vendor/PDCurses/os2/README.md +43 -0
  84. data/vendor/PDCurses/os2/iccos2.lrf +50 -0
  85. data/vendor/PDCurses/os2/iccos2.mak +256 -0
  86. data/vendor/PDCurses/os2/pdcclip.c +188 -0
  87. data/vendor/PDCurses/os2/pdcdisp.c +93 -0
  88. data/vendor/PDCurses/os2/pdcgetsc.c +89 -0
  89. data/vendor/PDCurses/os2/pdckbd.c +521 -0
  90. data/vendor/PDCurses/os2/pdcos2.h +55 -0
  91. data/vendor/PDCurses/os2/pdcscrn.c +449 -0
  92. data/vendor/PDCurses/os2/pdcsetsc.c +112 -0
  93. data/vendor/PDCurses/os2/pdcutil.c +52 -0
  94. data/vendor/PDCurses/panel.h +56 -0
  95. data/vendor/PDCurses/pdcurses/README.md +25 -0
  96. data/vendor/PDCurses/pdcurses/addch.c +693 -0
  97. data/vendor/PDCurses/pdcurses/addchstr.c +245 -0
  98. data/vendor/PDCurses/pdcurses/addstr.c +240 -0
  99. data/vendor/PDCurses/pdcurses/attr.c +359 -0
  100. data/vendor/PDCurses/pdcurses/beep.c +68 -0
  101. data/vendor/PDCurses/pdcurses/bkgd.c +223 -0
  102. data/vendor/PDCurses/pdcurses/border.c +411 -0
  103. data/vendor/PDCurses/pdcurses/clear.c +159 -0
  104. data/vendor/PDCurses/pdcurses/color.c +298 -0
  105. data/vendor/PDCurses/pdcurses/debug.c +109 -0
  106. data/vendor/PDCurses/pdcurses/delch.c +96 -0
  107. data/vendor/PDCurses/pdcurses/deleteln.c +211 -0
  108. data/vendor/PDCurses/pdcurses/deprec.c +27 -0
  109. data/vendor/PDCurses/pdcurses/getch.c +417 -0
  110. data/vendor/PDCurses/pdcurses/getstr.c +474 -0
  111. data/vendor/PDCurses/pdcurses/getyx.c +139 -0
  112. data/vendor/PDCurses/pdcurses/inch.c +127 -0
  113. data/vendor/PDCurses/pdcurses/inchstr.c +214 -0
  114. data/vendor/PDCurses/pdcurses/initscr.c +367 -0
  115. data/vendor/PDCurses/pdcurses/inopts.c +324 -0
  116. data/vendor/PDCurses/pdcurses/insch.c +271 -0
  117. data/vendor/PDCurses/pdcurses/insstr.c +264 -0
  118. data/vendor/PDCurses/pdcurses/instr.c +246 -0
  119. data/vendor/PDCurses/pdcurses/kernel.c +259 -0
  120. data/vendor/PDCurses/pdcurses/keyname.c +157 -0
  121. data/vendor/PDCurses/pdcurses/mouse.c +438 -0
  122. data/vendor/PDCurses/pdcurses/move.c +57 -0
  123. data/vendor/PDCurses/pdcurses/outopts.c +159 -0
  124. data/vendor/PDCurses/pdcurses/overlay.c +214 -0
  125. data/vendor/PDCurses/pdcurses/pad.c +260 -0
  126. data/vendor/PDCurses/pdcurses/panel.c +633 -0
  127. data/vendor/PDCurses/pdcurses/printw.c +126 -0
  128. data/vendor/PDCurses/pdcurses/refresh.c +279 -0
  129. data/vendor/PDCurses/pdcurses/scanw.c +578 -0
  130. data/vendor/PDCurses/pdcurses/scr_dump.c +213 -0
  131. data/vendor/PDCurses/pdcurses/scroll.c +101 -0
  132. data/vendor/PDCurses/pdcurses/slk.c +591 -0
  133. data/vendor/PDCurses/pdcurses/termattr.c +182 -0
  134. data/vendor/PDCurses/pdcurses/terminfo.c +217 -0
  135. data/vendor/PDCurses/pdcurses/touch.c +163 -0
  136. data/vendor/PDCurses/pdcurses/util.c +312 -0
  137. data/vendor/PDCurses/pdcurses/window.c +569 -0
  138. data/vendor/PDCurses/sdl1/Makefile.mng +110 -0
  139. data/vendor/PDCurses/sdl1/README.md +31 -0
  140. data/vendor/PDCurses/sdl1/deffont.h +385 -0
  141. data/vendor/PDCurses/sdl1/deficon.h +23 -0
  142. data/vendor/PDCurses/sdl1/pdcclip.c +131 -0
  143. data/vendor/PDCurses/sdl1/pdcdisp.c +373 -0
  144. data/vendor/PDCurses/sdl1/pdcgetsc.c +30 -0
  145. data/vendor/PDCurses/sdl1/pdckbd.c +405 -0
  146. data/vendor/PDCurses/sdl1/pdcscrn.c +414 -0
  147. data/vendor/PDCurses/sdl1/pdcsdl.h +31 -0
  148. data/vendor/PDCurses/sdl1/pdcsetsc.c +64 -0
  149. data/vendor/PDCurses/sdl1/pdcutil.c +40 -0
  150. data/vendor/PDCurses/sdl1/sdltest.c +79 -0
  151. data/vendor/PDCurses/sdl2/CMakeLists.txt +76 -0
  152. data/vendor/PDCurses/sdl2/Makefile.vc +164 -0
  153. data/vendor/PDCurses/sdl2/README.md +34 -0
  154. data/vendor/PDCurses/sdl2/deffont.h +385 -0
  155. data/vendor/PDCurses/sdl2/deficon.h +23 -0
  156. data/vendor/PDCurses/sdl2/pdcclip.c +93 -0
  157. data/vendor/PDCurses/sdl2/pdcdisp.c +534 -0
  158. data/vendor/PDCurses/sdl2/pdcgetsc.c +30 -0
  159. data/vendor/PDCurses/sdl2/pdckbd.c +480 -0
  160. data/vendor/PDCurses/sdl2/pdcscrn.c +443 -0
  161. data/vendor/PDCurses/sdl2/pdcsdl.h +33 -0
  162. data/vendor/PDCurses/sdl2/pdcsetsc.c +67 -0
  163. data/vendor/PDCurses/sdl2/pdcutil.c +39 -0
  164. data/vendor/PDCurses/sdl2/sdltest.c +81 -0
  165. data/vendor/PDCurses/term.h +48 -0
  166. data/vendor/PDCurses/version.mif +7 -0
  167. data/vendor/PDCurses/vt/CMakeLists.txt +28 -0
  168. data/vendor/PDCurses/vt/Makefile.bcc +111 -0
  169. data/vendor/PDCurses/vt/Makefile.dmc +258 -0
  170. data/vendor/PDCurses/vt/Makefile.vc +144 -0
  171. data/vendor/PDCurses/vt/Makefile.wcc +107 -0
  172. data/vendor/PDCurses/vt/README.md +64 -0
  173. data/vendor/PDCurses/vt/pdcclip.c +20 -0
  174. data/vendor/PDCurses/vt/pdcdisp.c +284 -0
  175. data/vendor/PDCurses/vt/pdcgetsc.c +27 -0
  176. data/vendor/PDCurses/vt/pdckbd.c +394 -0
  177. data/vendor/PDCurses/vt/pdcscrn.c +434 -0
  178. data/vendor/PDCurses/vt/pdcsetsc.c +45 -0
  179. data/vendor/PDCurses/vt/pdcutil.c +43 -0
  180. data/vendor/PDCurses/vt/pdcvt.h +16 -0
  181. data/vendor/PDCurses/watcom.mif +68 -0
  182. data/vendor/PDCurses/wincon/CMakeLists.txt +27 -0
  183. data/vendor/PDCurses/wincon/Makefile.bcc +88 -0
  184. data/vendor/PDCurses/wincon/Makefile.dmc +256 -0
  185. data/vendor/PDCurses/wincon/Makefile.lcc +273 -0
  186. data/vendor/PDCurses/wincon/Makefile.mng +176 -0
  187. data/vendor/PDCurses/wincon/Makefile.vc +144 -0
  188. data/vendor/PDCurses/wincon/Makefile.wcc +51 -0
  189. data/vendor/PDCurses/wincon/README.md +85 -0
  190. data/vendor/PDCurses/wincon/pdcclip.c +174 -0
  191. data/vendor/PDCurses/wincon/pdcdisp.c +143 -0
  192. data/vendor/PDCurses/wincon/pdcgetsc.c +55 -0
  193. data/vendor/PDCurses/wincon/pdckbd.c +786 -0
  194. data/vendor/PDCurses/wincon/pdcscrn.c +717 -0
  195. data/vendor/PDCurses/wincon/pdcsetsc.c +91 -0
  196. data/vendor/PDCurses/wincon/pdcurses.ico +0 -0
  197. data/vendor/PDCurses/wincon/pdcurses.rc +28 -0
  198. data/vendor/PDCurses/wincon/pdcutil.c +41 -0
  199. data/vendor/PDCurses/wincon/pdcwin.h +31 -0
  200. data/vendor/PDCurses/wingui/CMakeLists.txt +27 -0
  201. data/vendor/PDCurses/wingui/Makefile.bcc +85 -0
  202. data/vendor/PDCurses/wingui/Makefile.dmc +259 -0
  203. data/vendor/PDCurses/wingui/Makefile.lcc +273 -0
  204. data/vendor/PDCurses/wingui/Makefile.mng +171 -0
  205. data/vendor/PDCurses/wingui/Makefile.vc +144 -0
  206. data/vendor/PDCurses/wingui/Makefile.wcc +51 -0
  207. data/vendor/PDCurses/wingui/README.md +93 -0
  208. data/vendor/PDCurses/wingui/pdcclip.c +174 -0
  209. data/vendor/PDCurses/wingui/pdcdisp.c +718 -0
  210. data/vendor/PDCurses/wingui/pdcgetsc.c +30 -0
  211. data/vendor/PDCurses/wingui/pdckbd.c +143 -0
  212. data/vendor/PDCurses/wingui/pdcscrn.c +2797 -0
  213. data/vendor/PDCurses/wingui/pdcsetsc.c +89 -0
  214. data/vendor/PDCurses/wingui/pdcurses.ico +0 -0
  215. data/vendor/PDCurses/wingui/pdcurses.rc +28 -0
  216. data/vendor/PDCurses/wingui/pdcutil.c +61 -0
  217. data/vendor/PDCurses/wingui/pdcwin.h +122 -0
  218. data/vendor/PDCurses/x11/Makefile.in +754 -0
  219. data/vendor/PDCurses/x11/PDCurses.spec +82 -0
  220. data/vendor/PDCurses/x11/README.md +62 -0
  221. data/vendor/PDCurses/x11/ScrollBox.c +319 -0
  222. data/vendor/PDCurses/x11/ScrollBox.h +51 -0
  223. data/vendor/PDCurses/x11/ScrollBoxP.h +70 -0
  224. data/vendor/PDCurses/x11/aclocal.m4 +994 -0
  225. data/vendor/PDCurses/x11/big_icon.xbm +46 -0
  226. data/vendor/PDCurses/x11/compose.h +201 -0
  227. data/vendor/PDCurses/x11/config.guess +1500 -0
  228. data/vendor/PDCurses/x11/config.h.in +100 -0
  229. data/vendor/PDCurses/x11/config.sub +1616 -0
  230. data/vendor/PDCurses/x11/configure +6700 -0
  231. data/vendor/PDCurses/x11/configure.ac +295 -0
  232. data/vendor/PDCurses/x11/debian/changelog +6 -0
  233. data/vendor/PDCurses/x11/debian/compat +1 -0
  234. data/vendor/PDCurses/x11/debian/control +11 -0
  235. data/vendor/PDCurses/x11/debian/copyright +27 -0
  236. data/vendor/PDCurses/x11/debian/rules +98 -0
  237. data/vendor/PDCurses/x11/install-sh +253 -0
  238. data/vendor/PDCurses/x11/little_icon.xbm +14 -0
  239. data/vendor/PDCurses/x11/ncurses_cfg.h +45 -0
  240. data/vendor/PDCurses/x11/pdcclip.c +173 -0
  241. data/vendor/PDCurses/x11/pdcdisp.c +85 -0
  242. data/vendor/PDCurses/x11/pdcgetsc.c +28 -0
  243. data/vendor/PDCurses/x11/pdckbd.c +104 -0
  244. data/vendor/PDCurses/x11/pdcscrn.c +258 -0
  245. data/vendor/PDCurses/x11/pdcsetsc.c +95 -0
  246. data/vendor/PDCurses/x11/pdcutil.c +52 -0
  247. data/vendor/PDCurses/x11/pdcx11.c +316 -0
  248. data/vendor/PDCurses/x11/pdcx11.h +191 -0
  249. data/vendor/PDCurses/x11/sb.c +155 -0
  250. data/vendor/PDCurses/x11/x11.c +3686 -0
  251. data/vendor/PDCurses/x11/xcurses-config.in +81 -0
  252. metadata +255 -24
  253. data/.travis.yml +0 -13
  254. data/appveyor.yml +0 -16
@@ -0,0 +1,25 @@
1
+
2
+ option(PDC_BUILD_SHARED "Build dynamic libs for pdcurses" ON)
3
+ option(PDC_UTF8 "Force to UTF8" OFF)
4
+ option(PDC_WIDE "Wide - pulls in sdl-ttf" OFF)
5
+ option(PDCDEBUG "Debug tracing" OFF)
6
+ option(PDC_CHTYPE_32 "CHTYPE_32" OFF)
7
+ option(PDC_CHTYPE_16 "CHTYPE_16" OFF)
8
+ option(PDC_OS2_BUILD "Build OS/2 Project" OFF)
9
+ option(PDC_DOS_BUILD "Build DOS Project" OFF)
10
+ option(PDC_SDL2_BUILD "Build SDL2 Project" ON)
11
+ option(PDC_SDL2_DEPS_BUILD "Build SDL2 and dependencies" ON)
12
+
13
+ message(STATUS "PDC_BUILD_SHARED ....... ${PDC_BUILD_SHARED}")
14
+ message(STATUS "PDC_UTF8 ............... ${PDC_UTF8}")
15
+ message(STATUS "PDC_WIDE ............... ${PDC_WIDE}")
16
+ message(STATUS "PDCDEBUG ............... ${PDCDEBUG}")
17
+ message(STATUS "PDC_CHTYPE_32 .......... ${PDC_CHTYPE_32}")
18
+ message(STATUS "PDC_CHTYPE_16 .......... ${PDC_CHTYPE_16}")
19
+ message(STATUS "PDC_OS/2_BUILD ......... ${PDC_OS2_BUILD}")
20
+ message(STATUS "PDC_DOS_BUILD .......... ${PDC_DOS_BUILD}")
21
+ message(STATUS "PDC_SDL2_BUILD ......... ${PDC_SDL2_BUILD}")
22
+ message(STATUS "PDC_SDL2_DEPS_BUILD .... ${PDC_SDL2_DEPS_BUILD}")
23
+
24
+ # normalize a windows path
25
+ file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)
@@ -0,0 +1,26 @@
1
+ set(PRODUCT_FILE_DESCRIPTION "Public Domain Curses ")
2
+ set(PRODUCT_INTERNAL_NAME "PDCurses - ${PROJECT_NAME}")
3
+ set(PRODUCT_COMPANY_COPYRIGHT "Public Domain")
4
+ set(PRODUCT_NAME "Public Domain Curses Library")
5
+ set(PRODUCT_ORIGINAL_FILENAME "PDCURSES.DLL")
6
+ set(PRODUCT_ICON "pdcurses.ico")
7
+
8
+ set(PRODUCT_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
9
+ set(PRODUCT_VERSION_MINOR ${PROJECT_VERSION_MINOR})
10
+ set(PRODUCT_VERSION_PATCH ${PROJECT_VERSION_PATCH})
11
+ set(PRODUCT_VERSION_BUILD ${PROJECT_VERSION_TWEAK})
12
+
13
+ set(FILE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
14
+ set(FILE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
15
+ set(FILE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
16
+ set(FILE_VERSION_BUILD ${PROJECT_VERSION_TWEAK})
17
+
18
+ if(MSVC)
19
+ set(TOOL_NAME MS)
20
+ endif()
21
+
22
+ set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_FILE_DESCRIPTION} ${TOOL_NAME} ${TARGET_ARCH}")
23
+
24
+ configure_file ( ${CMAKE_SOURCE_DIR}/cmake/version.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY )
25
+ configure_file ( ${CMAKE_SOURCE_DIR}/cmake/resource.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/resource.h @ONLY )
26
+ configure_file ( ${CMAKE_SOURCE_DIR}/wincon/pdcurses.ico ${CMAKE_CURRENT_BINARY_DIR}/pdcurses.ico COPYONLY )
@@ -0,0 +1,43 @@
1
+ INCLUDE(CheckFunctionExists)
2
+
3
+ CHECK_FUNCTION_EXISTS(vsnprintf PDC_HAVE_VSNPRINTF)
4
+ CHECK_FUNCTION_EXISTS(vsscanf PDC_HAVE_VSSCANF)
5
+
6
+ IF(PDC_HAVE_VSNPRINTF)
7
+ ADD_DEFINITIONS(-DHAVE_VSNPRINTF)
8
+ ENDIF(PDC_HAVE_VSNPRINTF)
9
+ IF(PDC_HAVE_VSSCANF)
10
+ ADD_DEFINITIONS(-DHAVE_VSSCANF)
11
+ ENDIF(PDC_HAVE_VSSCANF)
12
+
13
+ if (PDC_BUILD_SHARED)
14
+ if(MSVC)
15
+ add_definitions(-DPDC_DLL_BUILD)
16
+ endif()
17
+ endif (PDC_BUILD_SHARED)
18
+ IF (PDC_WIDE)
19
+ ADD_DEFINITIONS(-DPDC_WIDE)
20
+ ENDIF(PDC_WIDE)
21
+ IF (PDC_UTF8)
22
+ ADD_DEFINITIONS(-DPDC_FORCE_UTF8)
23
+ ENDIF (PDC_UTF8)
24
+ IF (PDC_CHTYPE_16)
25
+ ADD_DEFINITIONS(-DCHTYPE_16)
26
+ ENDIF (PDC_CHTYPE_16)
27
+ IF (PDC_CHTYPE_32)
28
+ ADD_DEFINITIONS(-DCHTYPE_32)
29
+ ENDIF (PDC_CHTYPE_32)
30
+ IF(PDCDEBUG)
31
+ ADD_DEFINITIONS(-DPDCDEBUG)
32
+ ENDIF(PDCDEBUG)
33
+
34
+ IF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
35
+ ADD_DEFINITIONS(-D_DEBUG)
36
+ ENDIF ()
37
+
38
+ #################################
39
+ # Target Arch #
40
+ #################################
41
+ include (target_arch)
42
+ get_target_arch(TARGET_ARCH)
43
+ message(STATUS "Target ................. ${TARGET_ARCH}")
@@ -0,0 +1,17 @@
1
+
2
+ file(READ ${CMAKE_SOURCE_DIR}/curses.h _CURSES_H_CONTENTS)
3
+
4
+ string(REGEX MATCH "#define PDC_VER_MAJOR ([a-zA-Z0-9_]+)" PDC_VER_MAJOR "${_CURSES_H_CONTENTS}")
5
+ string(REPLACE "#define PDC_VER_MAJOR " "" PDC_VER_MAJOR "${PDC_VER_MAJOR}")
6
+
7
+ string(REGEX MATCH "#define PDC_VER_MINOR ([a-zA-Z0-9_]+)" PDC_VER_MINOR "${_CURSES_H_CONTENTS}")
8
+ string(REPLACE "#define PDC_VER_MINOR " "" PDC_VER_MINOR "${PDC_VER_MINOR}")
9
+
10
+ string(REGEX MATCH "#define PDC_VER_CHANGE ([a-zA-Z0-9_]+)" PDC_VER_CHANGE "${_CURSES_H_CONTENTS}")
11
+ string(REPLACE "#define PDC_VER_CHANGE " "" PDC_VER_CHANGE "${PDC_VER_CHANGE}")
12
+
13
+ if(BUILD_NUMBER)
14
+ set(CURSES_VERSION ${PDC_VER_MAJOR}.${PDC_VER_MINOR}.${PDC_VER_CHANGE}.${BUILD_NUMBER})
15
+ else()
16
+ set(CURSES_VERSION ${PDC_VER_MAJOR}.${PDC_VER_MINOR}.${PDC_VER_CHANGE}.0)
17
+ endif()
@@ -0,0 +1,19 @@
1
+
2
+ if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
3
+ message(FATAL_ERROR "Cannot find install manifest: ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
4
+ endif()
5
+
6
+ file(READ "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt" files)
7
+ string(REGEX REPLACE "[\r\n]" ";" files "${files}")
8
+
9
+ foreach(file ${files})
10
+ message(STATUS "Uninstalling ${file}")
11
+ if(EXISTS "${file}")
12
+ file(REMOVE ${file})
13
+ if (EXISTS "${file}")
14
+ message(FATAL_ERROR "Problem when removing ${file}, please check your permissions")
15
+ endif()
16
+ else()
17
+ message(STATUS "File ${file} does not exist.")
18
+ endif()
19
+ endforeach()
@@ -0,0 +1,121 @@
1
+ message(STATUS "**** ${PROJECT_NAME} ****")
2
+
3
+ set(PDCURSES_SRCDIR ${CMAKE_SOURCE_DIR})
4
+ set(PDCURSES_DIST ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
5
+
6
+ set(osdir ${PDCURSES_SRCDIR}/${PROJECT_NAME})
7
+ set(demodir ${PDCURSES_SRCDIR}/demos)
8
+
9
+ set(pdc_src_files
10
+ ${osdir}/pdcclip.c
11
+ ${osdir}/pdcdisp.c
12
+ ${osdir}/pdcgetsc.c
13
+ ${osdir}/pdckbd.c
14
+ ${osdir}/pdcscrn.c
15
+ ${osdir}/pdcsetsc.c
16
+ ${osdir}/pdcutil.c
17
+ )
18
+
19
+ include_directories (..)
20
+ include_directories (${osdir})
21
+
22
+
23
+ if(WIN32 AND NOT WATCOM)
24
+ include(dll_version)
25
+ list(APPEND pdc_src_files ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
26
+
27
+ add_definitions(-D_WIN32 -D_CRT_SECURE_NO_WARNINGS)
28
+
29
+ if(${TARGET_ARCH} STREQUAL "ARM" OR ${TARGET_ARCH} STREQUAL "ARM64")
30
+ add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1)
31
+ endif()
32
+
33
+ set(EXTRA_LIBS gdi32.lib winspool.lib shell32.lib ole32.lib comdlg32.lib advapi32.lib)
34
+ set(SDL2_DEP_LIBRARIES version.lib winmm.lib imm32.lib)
35
+ elseif(APPLE)
36
+ set(EXTRA_LIBS "")
37
+ set(SDL2_DEP_LIBRARIES "dl")
38
+ else()
39
+ set(EXTRA_LIBS "")
40
+ set(SDL2_DEP_LIBRARIES "dl")
41
+ endif()
42
+
43
+ if (APPLE)
44
+ find_library(COREVIDEO CoreVideo)
45
+ list(APPEND EXTRA_LIBS ${COREVIDEO})
46
+
47
+ find_library(COCOA_LIBRARY Cocoa)
48
+ list(APPEND EXTRA_LIBS ${COCOA_LIBRARY})
49
+
50
+ find_library(IOKIT IOKit)
51
+ list(APPEND EXTRA_LIBS ${IOKIT})
52
+
53
+ find_library(FORCEFEEDBACK ForceFeedback)
54
+ list(APPEND EXTRA_LIBS ${FORCEFEEDBACK})
55
+
56
+ find_library(CARBON_LIBRARY Carbon)
57
+ list(APPEND EXTRA_LIBS ${CARBON_LIBRARY})
58
+
59
+ find_library(COREAUDIO CoreAudio)
60
+ list(APPEND EXTRA_LIBS ${COREAUDIO})
61
+
62
+ find_library(AUDIOTOOLBOX AudioToolbox)
63
+ list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
64
+
65
+ include(CheckLibraryExists)
66
+ check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
67
+ if(HAVE_LIBICONV)
68
+ list(APPEND EXTRA_LIBS iconv)
69
+ endif()
70
+ endif()
71
+
72
+ if(PDC_BUILD_SHARED)
73
+ set(PDCURSE_PROJ ${PROJECT_NAME}_pdcurses)
74
+ add_library(${PDCURSE_PROJ} SHARED ${pdc_src_files} ${pdcurses_src_files})
75
+
76
+ if(APPLE)
77
+ set_target_properties(${PDCURSE_PROJ} PROPERTIES MACOSX_RPATH 1)
78
+ endif()
79
+
80
+ if(${PROJECT_NAME} STREQUAL "sdl2")
81
+ if(PDC_WIDE)
82
+ target_link_libraries(${PDCURSE_PROJ} ${EXTRA_LIBS}
83
+ ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARY} ${FT2_LIBRARY} ${ZLIB_LIBRARY}
84
+ ${SDL2_DEP_LIBRARIES})
85
+ else()
86
+ target_link_libraries(${PDCURSE_PROJ} ${EXTRA_LIBS}
87
+ ${SDL2_LIBRARIES} ${SDL2_DEP_LIBRARIES})
88
+ endif()
89
+ else()
90
+ target_link_libraries(${PDCURSE_PROJ} ${EXTRA_LIBS})
91
+ endif()
92
+
93
+ install(TARGETS ${PDCURSE_PROJ}
94
+ ARCHIVE DESTINATION ${PDCURSES_DIST}/lib/${PROJECT_NAME}
95
+ LIBRARY DESTINATION ${PDCURSES_DIST}/lib/${PROJECT_NAME}
96
+ RUNTIME DESTINATION ${PDCURSES_DIST}/bin/${PROJECT_NAME} COMPONENT applications)
97
+ set_target_properties(${PDCURSE_PROJ} PROPERTIES OUTPUT_NAME "pdcurses")
98
+ else()
99
+ set(PDCURSE_PROJ ${PROJECT_NAME}_pdcursesstatic)
100
+ add_library (${PDCURSE_PROJ} STATIC ${pdc_src_files} ${pdcurses_src_files})
101
+ install (TARGETS ${PDCURSE_PROJ} ARCHIVE DESTINATION ${PDCURSES_DIST}/lib/${PROJECT_NAME} COMPONENT applications)
102
+ set_target_properties(${PDCURSE_PROJ} PROPERTIES OUTPUT_NAME "pdcursesstatic")
103
+ endif()
104
+
105
+ macro (demo_app dir targ)
106
+ set(bin_name "${PROJECT_NAME}_${targ}")
107
+ if(${targ} STREQUAL "tuidemo")
108
+ set(src_files ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/tuidemo.c ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/tui.c)
109
+ else()
110
+ set(src_files ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${targ}.c)
111
+ endif()
112
+
113
+ add_executable(${bin_name} ${src_files})
114
+
115
+ target_link_libraries(${bin_name} ${PDCURSE_PROJ} ${EXTRA_LIBS})
116
+
117
+ add_dependencies(${bin_name} ${PDCURSE_PROJ})
118
+ set_target_properties(${bin_name} PROPERTIES OUTPUT_NAME ${targ})
119
+
120
+ install(TARGETS ${bin_name} RUNTIME DESTINATION ${PDCURSES_DIST}/bin/${PROJECT_NAME} COMPONENT applications)
121
+ endmacro ()
@@ -0,0 +1,52 @@
1
+ //{{NO_DEPENDENCIES}}
2
+ // Used by version.rc
3
+ //
4
+ #define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
5
+ #define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@
6
+ #define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@
7
+ #define PRODUCT_VERSION_BUILD @PRODUCT_VERSION_BUILD@
8
+
9
+ #define FILE_VERSION_MAJOR @FILE_VERSION_MAJOR@
10
+ #define FILE_VERSION_MINOR @FILE_VERSION_MINOR@
11
+ #define FILE_VERSION_PATCH @FILE_VERSION_PATCH@
12
+ #define FILE_VERSION_BUILD @FILE_VERSION_BUILD@
13
+
14
+ #ifndef __TO_STRING
15
+ #define __TO_STRING_IMPL(x) #x
16
+ #define __TO_STRING(x) __TO_STRING_IMPL(x)
17
+ #endif
18
+
19
+ #define PRODUCT_VERSION_MAJOR_MINOR_STR __TO_STRING(PRODUCT_VERSION_MAJOR) "." __TO_STRING(PRODUCT_VERSION_MINOR)
20
+ #define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR PRODUCT_VERSION_MAJOR_MINOR_STR "." __TO_STRING(PRODUCT_VERSION_PATCH)
21
+ #define PRODUCT_VERSION_FULL_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(PRODUCT_VERSION_BUILD)
22
+ #define PRODUCT_VERSION_RESOURCE PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,PRODUCT_VERSION_BUILD
23
+ #define PRODUCT_VERSION_RESOURCE_STR PRODUCT_VERSION_FULL_STR "\0"
24
+
25
+ #define FILE_VERSION_MAJOR_MINOR_STR __TO_STRING(FILE_VERSION_MAJOR) "." __TO_STRING(FILE_VERSION_MINOR)
26
+ #define FILE_VERSION_MAJOR_MINOR_PATCH_STR FILE_VERSION_MAJOR_MINOR_STR "." __TO_STRING(FILE_VERSION_PATCH)
27
+ #define FILE_VERSION_FULL_STR FILE_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(FILE_VERSION_BUILD)
28
+ #define FILE_VERSION_RESOURCE FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,FILE_VERSION_BUILD
29
+ #define FILE_VERSION_RESOURCE_STR FILE_VERSION_FULL_STR "\0"
30
+
31
+
32
+ #define PRODUCT_FILE_DESCRIPTION "@PRODUCT_FILE_DESCRIPTION@\0"
33
+ #define PRODUCT_INTERNAL_NAME "@PRODUCT_INTERNAL_NAME@\0"
34
+ #define PRODUCT_COMPANY_COPYRIGHT "@PRODUCT_COMPANY_COPYRIGHT@\0"
35
+ #define PRODUCT_ORIGINAL_FILENAME "@PRODUCT_ORIGINAL_FILENAME@\0"
36
+ #define PRODUCT_NAME "@PRODUCT_NAME@\0"
37
+ #define PRODUCT_ICON "@PRODUCT_ICON@"
38
+
39
+ #define VS_VERSION_INFO 1
40
+ #define IDC_STATIC -1
41
+
42
+
43
+ // Next default values for new objects
44
+ //
45
+ #ifdef APSTUDIO_INVOKED
46
+ #ifndef APSTUDIO_READONLY_SYMBOLS
47
+ #define _APS_NEXT_RESOURCE_VALUE 101
48
+ #define _APS_NEXT_COMMAND_VALUE 40001
49
+ #define _APS_NEXT_CONTROL_VALUE 1000
50
+ #define _APS_NEXT_SYMED_VALUE 101
51
+ #endif
52
+ #endif
@@ -0,0 +1,83 @@
1
+ CMAKE_MINIMUM_REQUIRED (VERSION 3.11)
2
+
3
+ if(NOT CMAKE_BUILD_TYPE)
4
+ set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
5
+ message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to MinSizeRel.")
6
+ endif()
7
+
8
+ PROJECT (sdl2_ttf VERSION ${SDL2_TTF_RELEASE} LANGUAGES C)
9
+
10
+ if(MSVC)
11
+ SET(CMAKE_DEBUG_POSTFIX d)
12
+ endif()
13
+
14
+ INCLUDE_DIRECTORIES(
15
+ ${ZLIB_INCLUDE_DIR}
16
+ ${FT2_INCLUDE_DIR}
17
+ ${SDL2_INCLUDE_DIR})
18
+
19
+ LINK_DIRECTORIES(
20
+ ${ZLIB_LIBRARY_DIR}
21
+ ${FT2_LIBRARY_DIR}
22
+ ${SDL2_LIBRARY_DIR})
23
+
24
+
25
+ INSTALL (FILES SDL_ttf.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/SDL2_ttf)
26
+
27
+ set(SDL2_ttf_source_files SDL_ttf.c)
28
+
29
+ IF(WIN32)
30
+ LIST(INSERT SDL2_ttf_source_files 0 Version.rc)
31
+ ENDIF()
32
+
33
+ if (APPLE)
34
+ find_library(COREVIDEO CoreVideo)
35
+ list(APPEND EXTRA_LIBS ${COREVIDEO})
36
+
37
+ find_library(COCOA_LIBRARY Cocoa)
38
+ list(APPEND EXTRA_LIBS ${COCOA_LIBRARY})
39
+
40
+ find_library(IOKIT IOKit)
41
+ list(APPEND EXTRA_LIBS ${IOKIT})
42
+
43
+ find_library(FORCEFEEDBACK ForceFeedback)
44
+ list(APPEND EXTRA_LIBS ${FORCEFEEDBACK})
45
+
46
+ find_library(CARBON_LIBRARY Carbon)
47
+ list(APPEND EXTRA_LIBS ${CARBON_LIBRARY})
48
+
49
+ find_library(COREAUDIO CoreAudio)
50
+ list(APPEND EXTRA_LIBS ${COREAUDIO})
51
+
52
+ find_library(AUDIOTOOLBOX AudioToolbox)
53
+ list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
54
+
55
+ include(CheckLibraryExists)
56
+ check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
57
+ if(HAVE_LIBICONV)
58
+ list(APPEND EXTRA_LIBS iconv)
59
+ endif()
60
+ endif()
61
+
62
+ ADD_LIBRARY(SDL2_ttf-static STATIC ${SDL2_ttf_source_files} SDL_ttf.h)
63
+ INSTALL (TARGETS SDL2_ttf-static
64
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
65
+ COMPONENT libraries)
66
+
67
+ ADD_LIBRARY(SDL2_ttf SHARED ${SDL2_ttf_source_files} SDL_ttf.h)
68
+ TARGET_LINK_LIBRARIES (SDL2_ttf ${SDL2_LIBRARY} ${FT2_LIBRARY} ${ZLIB_LIBRARY} ${EXTRA_LIBS})
69
+ INSTALL (TARGETS SDL2_ttf
70
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
71
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
72
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
73
+ COMPONENT libraries)
74
+
75
+ ADD_EXECUTABLE (showfont ${CMAKE_SOURCE_DIR}/showfont.c)
76
+ TARGET_LINK_LIBRARIES (showfont SDL2_ttf ${SDL2_LIBRARIES} ${FT2_LIBRARY} ${ZLIB_LIBRARY} ${EXTRA_LIBS})
77
+ INSTALL (TARGETS showfont RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin COMPONENT applications)
78
+
79
+ ADD_EXECUTABLE (glfont ${CMAKE_SOURCE_DIR}/glfont.c)
80
+ TARGET_LINK_LIBRARIES (glfont SDL2_ttf ${SDL2_LIBRARIES} ${FT2_LIBRARY} ${ZLIB_LIBRARY} ${EXTRA_LIBS})
81
+ INSTALL (TARGETS glfont RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin COMPONENT applications)
82
+
83
+ set(CPACK_COMPONENTS_ALL libraries applications)
@@ -0,0 +1,36 @@
1
+
2
+ set(TARGET_ARCH_DETECT_CODE "
3
+
4
+ #if defined(_M_ARM) || defined(__arm__)
5
+ #error cmake_arch ARM
6
+ #elif defined(_M_ARM64) || defined(__aarch64__)
7
+ #error cmake_arch ARM64
8
+ #elif defined(_M_AMD64) || defined(__x86_64__)
9
+ #error cmake_arch x86_64
10
+ #elif defined(_M_X64)
11
+ #error cmake_arch x64
12
+ #elif defined(_M_IX86) || defined(__i386__)
13
+ #error cmake_arch x86
14
+ #else
15
+ #error cmake_arch unknown
16
+ #endif
17
+ ")
18
+
19
+ function(get_target_arch out)
20
+
21
+ file(WRITE
22
+ "${CMAKE_BINARY_DIR}/target_arch_detect.c"
23
+ "${TARGET_ARCH_DETECT_CODE}")
24
+
25
+ try_run(
26
+ run_result_unused compile_result_unused
27
+ "${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}/target_arch_detect.c"
28
+ COMPILE_OUTPUT_VARIABLE TARGET_ARCH)
29
+
30
+ # parse compiler output
31
+ string(REGEX MATCH "cmake_arch ([a-zA-Z0-9_]+)" TARGET_ARCH "${TARGET_ARCH}")
32
+ string(REPLACE "cmake_arch " "" TARGET_ARCH "${TARGET_ARCH}")
33
+
34
+ set(${out} "${TARGET_ARCH}" PARENT_SCOPE)
35
+
36
+ endfunction()
@@ -0,0 +1,73 @@
1
+ // Microsoft Visual C++ generated resource script.
2
+ //
3
+ #include <windows.h>
4
+ #include "resource.h"
5
+ /////////////////////////////////////////////////////////////////////////////
6
+ // English (United States) resources
7
+
8
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
9
+ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
10
+ #pragma code_page(1252)
11
+
12
+ /////////////////////////////////////////////////////////////////////////////
13
+ //
14
+ // Version
15
+ //
16
+
17
+ VS_VERSION_INFO VERSIONINFO
18
+ FILEVERSION FILE_VERSION_RESOURCE
19
+ PRODUCTVERSION PRODUCT_VERSION_RESOURCE
20
+ FILEFLAGSMASK 0x3fL
21
+ #ifdef _DEBUG
22
+ FILEFLAGS 0x1L
23
+ #else
24
+ FILEFLAGS 0x0L
25
+ #endif
26
+ FILEOS 0x0L
27
+ FILETYPE 0x2L
28
+ FILESUBTYPE 0x0L
29
+ BEGIN
30
+ BLOCK "StringFileInfo"
31
+ BEGIN
32
+ BLOCK "040004b0"
33
+ BEGIN
34
+ VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION
35
+ VALUE "FileVersion", FILE_VERSION_RESOURCE_STR
36
+ VALUE "InternalName", PRODUCT_INTERNAL_NAME
37
+ VALUE "LegalCopyright", PRODUCT_COMPANY_COPYRIGHT
38
+ VALUE "OriginalFilename", PRODUCT_ORIGINAL_FILENAME
39
+ VALUE "ProductName", PRODUCT_NAME
40
+ VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR
41
+ END
42
+ END
43
+ BLOCK "VarFileInfo"
44
+ BEGIN
45
+ VALUE "Translation", 0x400, 1200, 0x409, 1200
46
+ END
47
+ END
48
+
49
+
50
+ /////////////////////////////////////////////////////////////////////////////
51
+ //
52
+ // Icon
53
+ //
54
+
55
+ // Icon with lowest ID value placed first to ensure application icon
56
+ // remains consistent on all systems.
57
+ 1 ICON PRODUCT_ICON
58
+
59
+
60
+ #endif // English (United States) resources
61
+ /////////////////////////////////////////////////////////////////////////////
62
+
63
+
64
+
65
+ #ifndef APSTUDIO_INVOKED
66
+ /////////////////////////////////////////////////////////////////////////////
67
+ //
68
+ // Generated from the TEXTINCLUDE 3 resource.
69
+ //
70
+
71
+
72
+ /////////////////////////////////////////////////////////////////////////////
73
+ #endif // not APSTUDIO_INVOKED