curses 1.3.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) 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/History.md +34 -0
  6. data/README.md +14 -46
  7. data/Rakefile +0 -86
  8. data/curses.gemspec +2 -3
  9. data/ext/curses/curses.c +70 -58
  10. data/ext/curses/extconf.rb +134 -21
  11. data/lib/curses.rb +5 -12
  12. data/sample/addch.rb +16 -0
  13. data/sample/attr_demo.rb +32 -0
  14. data/sample/colors.rb +26 -0
  15. data/sample/menu.rb +3 -3
  16. data/sample/mouse_move.rb +75 -0
  17. data/vendor/PDCurses/.gitignore +47 -0
  18. data/vendor/PDCurses/.travis.yml +49 -0
  19. data/vendor/PDCurses/CMakeLists.txt +68 -0
  20. data/vendor/PDCurses/HISTORY.md +2036 -0
  21. data/vendor/PDCurses/IMPLEMNT.md +327 -0
  22. data/vendor/PDCurses/README.md +77 -0
  23. data/vendor/PDCurses/acs_defs.h +265 -0
  24. data/vendor/PDCurses/appveyor.yml +218 -0
  25. data/vendor/PDCurses/cmake/README.md +71 -0
  26. data/vendor/PDCurses/cmake/build_dependencies.cmake +178 -0
  27. data/vendor/PDCurses/cmake/build_options.cmake +25 -0
  28. data/vendor/PDCurses/cmake/dll_version.cmake +26 -0
  29. data/vendor/PDCurses/cmake/gen_config_header.cmake +43 -0
  30. data/vendor/PDCurses/cmake/get_version.cmake +17 -0
  31. data/vendor/PDCurses/cmake/make_uninstall.cmake +19 -0
  32. data/vendor/PDCurses/cmake/project_common.cmake +121 -0
  33. data/vendor/PDCurses/cmake/resource.in.cmake +52 -0
  34. data/vendor/PDCurses/cmake/sdl2_ttf/CMakeLists.txt +83 -0
  35. data/vendor/PDCurses/cmake/target_arch.cmake +36 -0
  36. data/vendor/PDCurses/cmake/version.in.cmake +73 -0
  37. data/vendor/PDCurses/cmake/watcom_open_dos16_toolchain.cmake +96 -0
  38. data/vendor/PDCurses/cmake/watcom_open_dos32_toolchain.cmake +106 -0
  39. data/vendor/PDCurses/cmake/watcom_open_os2v2_toolchain.cmake +105 -0
  40. data/vendor/PDCurses/curses.h +1846 -0
  41. data/vendor/PDCurses/curspriv.h +134 -0
  42. data/vendor/PDCurses/demos/README.md +25 -0
  43. data/vendor/PDCurses/demos/firework.c +144 -0
  44. data/vendor/PDCurses/demos/newtest.c +581 -0
  45. data/vendor/PDCurses/demos/ozdemo.c +447 -0
  46. data/vendor/PDCurses/demos/ptest.c +283 -0
  47. data/vendor/PDCurses/demos/rain.c +157 -0
  48. data/vendor/PDCurses/demos/testcurs.c +1607 -0
  49. data/vendor/PDCurses/demos/tui.c +1048 -0
  50. data/vendor/PDCurses/demos/tui.h +65 -0
  51. data/vendor/PDCurses/demos/tuidemo.c +233 -0
  52. data/vendor/PDCurses/demos/version.c +61 -0
  53. data/vendor/PDCurses/demos/worm.c +432 -0
  54. data/vendor/PDCurses/demos/xmas.c +955 -0
  55. data/vendor/PDCurses/dos/CMakeLists.txt +47 -0
  56. data/vendor/PDCurses/dos/Makefile.bcc +83 -0
  57. data/vendor/PDCurses/dos/Makefile.dmc +257 -0
  58. data/vendor/PDCurses/dos/Makefile.msc +113 -0
  59. data/vendor/PDCurses/dos/Makefile.wcc +107 -0
  60. data/vendor/PDCurses/dos/README.md +51 -0
  61. data/vendor/PDCurses/dos/bccdos.lrf +9 -0
  62. data/vendor/PDCurses/dos/mscdos.lrf +50 -0
  63. data/vendor/PDCurses/dos/pdcclip.c +132 -0
  64. data/vendor/PDCurses/dos/pdcdisp.c +135 -0
  65. data/vendor/PDCurses/dos/pdcdos.h +194 -0
  66. data/vendor/PDCurses/dos/pdcgetsc.c +98 -0
  67. data/vendor/PDCurses/dos/pdckbd.c +513 -0
  68. data/vendor/PDCurses/dos/pdcscrn.c +785 -0
  69. data/vendor/PDCurses/dos/pdcsetsc.c +101 -0
  70. data/vendor/PDCurses/dos/pdcutil.c +212 -0
  71. data/vendor/PDCurses/libobjs.mif +26 -0
  72. data/vendor/PDCurses/makedist.mif +20 -0
  73. data/vendor/PDCurses/man/README.md +21 -0
  74. data/vendor/PDCurses/man/intro.md +361 -0
  75. data/vendor/PDCurses/man/manext.c +119 -0
  76. data/vendor/PDCurses/man/sdl.md +152 -0
  77. data/vendor/PDCurses/man/sdl2.md +58 -0
  78. data/vendor/PDCurses/man/x11.md +407 -0
  79. data/vendor/PDCurses/ncurses/CMakeLists.txt +66 -0
  80. data/vendor/PDCurses/ncurses/README.md +26 -0
  81. data/vendor/PDCurses/ncurses/makefile +29 -0
  82. data/vendor/PDCurses/os2/CMakeLists.txt +41 -0
  83. data/vendor/PDCurses/os2/Makefile.bcc +90 -0
  84. data/vendor/PDCurses/os2/Makefile.wcc +43 -0
  85. data/vendor/PDCurses/os2/README.md +43 -0
  86. data/vendor/PDCurses/os2/iccos2.lrf +50 -0
  87. data/vendor/PDCurses/os2/iccos2.mak +256 -0
  88. data/vendor/PDCurses/os2/pdcclip.c +188 -0
  89. data/vendor/PDCurses/os2/pdcdisp.c +93 -0
  90. data/vendor/PDCurses/os2/pdcgetsc.c +89 -0
  91. data/vendor/PDCurses/os2/pdckbd.c +521 -0
  92. data/vendor/PDCurses/os2/pdcos2.h +55 -0
  93. data/vendor/PDCurses/os2/pdcscrn.c +449 -0
  94. data/vendor/PDCurses/os2/pdcsetsc.c +112 -0
  95. data/vendor/PDCurses/os2/pdcutil.c +52 -0
  96. data/vendor/PDCurses/panel.h +56 -0
  97. data/vendor/PDCurses/pdcurses/README.md +25 -0
  98. data/vendor/PDCurses/pdcurses/addch.c +693 -0
  99. data/vendor/PDCurses/pdcurses/addchstr.c +245 -0
  100. data/vendor/PDCurses/pdcurses/addstr.c +240 -0
  101. data/vendor/PDCurses/pdcurses/attr.c +359 -0
  102. data/vendor/PDCurses/pdcurses/beep.c +68 -0
  103. data/vendor/PDCurses/pdcurses/bkgd.c +223 -0
  104. data/vendor/PDCurses/pdcurses/border.c +411 -0
  105. data/vendor/PDCurses/pdcurses/clear.c +159 -0
  106. data/vendor/PDCurses/pdcurses/color.c +298 -0
  107. data/vendor/PDCurses/pdcurses/debug.c +109 -0
  108. data/vendor/PDCurses/pdcurses/delch.c +96 -0
  109. data/vendor/PDCurses/pdcurses/deleteln.c +211 -0
  110. data/vendor/PDCurses/pdcurses/deprec.c +27 -0
  111. data/vendor/PDCurses/pdcurses/getch.c +417 -0
  112. data/vendor/PDCurses/pdcurses/getstr.c +474 -0
  113. data/vendor/PDCurses/pdcurses/getyx.c +139 -0
  114. data/vendor/PDCurses/pdcurses/inch.c +127 -0
  115. data/vendor/PDCurses/pdcurses/inchstr.c +214 -0
  116. data/vendor/PDCurses/pdcurses/initscr.c +367 -0
  117. data/vendor/PDCurses/pdcurses/inopts.c +324 -0
  118. data/vendor/PDCurses/pdcurses/insch.c +271 -0
  119. data/vendor/PDCurses/pdcurses/insstr.c +264 -0
  120. data/vendor/PDCurses/pdcurses/instr.c +246 -0
  121. data/vendor/PDCurses/pdcurses/kernel.c +259 -0
  122. data/vendor/PDCurses/pdcurses/keyname.c +157 -0
  123. data/vendor/PDCurses/pdcurses/mouse.c +438 -0
  124. data/vendor/PDCurses/pdcurses/move.c +57 -0
  125. data/vendor/PDCurses/pdcurses/outopts.c +159 -0
  126. data/vendor/PDCurses/pdcurses/overlay.c +214 -0
  127. data/vendor/PDCurses/pdcurses/pad.c +260 -0
  128. data/vendor/PDCurses/pdcurses/panel.c +633 -0
  129. data/vendor/PDCurses/pdcurses/printw.c +126 -0
  130. data/vendor/PDCurses/pdcurses/refresh.c +279 -0
  131. data/vendor/PDCurses/pdcurses/scanw.c +578 -0
  132. data/vendor/PDCurses/pdcurses/scr_dump.c +213 -0
  133. data/vendor/PDCurses/pdcurses/scroll.c +101 -0
  134. data/vendor/PDCurses/pdcurses/slk.c +591 -0
  135. data/vendor/PDCurses/pdcurses/termattr.c +182 -0
  136. data/vendor/PDCurses/pdcurses/terminfo.c +217 -0
  137. data/vendor/PDCurses/pdcurses/touch.c +163 -0
  138. data/vendor/PDCurses/pdcurses/util.c +312 -0
  139. data/vendor/PDCurses/pdcurses/window.c +569 -0
  140. data/vendor/PDCurses/sdl1/Makefile.mng +110 -0
  141. data/vendor/PDCurses/sdl1/README.md +31 -0
  142. data/vendor/PDCurses/sdl1/deffont.h +385 -0
  143. data/vendor/PDCurses/sdl1/deficon.h +23 -0
  144. data/vendor/PDCurses/sdl1/pdcclip.c +131 -0
  145. data/vendor/PDCurses/sdl1/pdcdisp.c +373 -0
  146. data/vendor/PDCurses/sdl1/pdcgetsc.c +30 -0
  147. data/vendor/PDCurses/sdl1/pdckbd.c +405 -0
  148. data/vendor/PDCurses/sdl1/pdcscrn.c +414 -0
  149. data/vendor/PDCurses/sdl1/pdcsdl.h +31 -0
  150. data/vendor/PDCurses/sdl1/pdcsetsc.c +64 -0
  151. data/vendor/PDCurses/sdl1/pdcutil.c +40 -0
  152. data/vendor/PDCurses/sdl1/sdltest.c +79 -0
  153. data/vendor/PDCurses/sdl2/CMakeLists.txt +76 -0
  154. data/vendor/PDCurses/sdl2/Makefile.vc +164 -0
  155. data/vendor/PDCurses/sdl2/README.md +34 -0
  156. data/vendor/PDCurses/sdl2/deffont.h +385 -0
  157. data/vendor/PDCurses/sdl2/deficon.h +23 -0
  158. data/vendor/PDCurses/sdl2/pdcclip.c +93 -0
  159. data/vendor/PDCurses/sdl2/pdcdisp.c +534 -0
  160. data/vendor/PDCurses/sdl2/pdcgetsc.c +30 -0
  161. data/vendor/PDCurses/sdl2/pdckbd.c +480 -0
  162. data/vendor/PDCurses/sdl2/pdcscrn.c +443 -0
  163. data/vendor/PDCurses/sdl2/pdcsdl.h +33 -0
  164. data/vendor/PDCurses/sdl2/pdcsetsc.c +67 -0
  165. data/vendor/PDCurses/sdl2/pdcutil.c +39 -0
  166. data/vendor/PDCurses/sdl2/sdltest.c +81 -0
  167. data/vendor/PDCurses/term.h +48 -0
  168. data/vendor/PDCurses/version.mif +7 -0
  169. data/vendor/PDCurses/vt/CMakeLists.txt +28 -0
  170. data/vendor/PDCurses/vt/Makefile.bcc +111 -0
  171. data/vendor/PDCurses/vt/Makefile.dmc +258 -0
  172. data/vendor/PDCurses/vt/Makefile.vc +144 -0
  173. data/vendor/PDCurses/vt/Makefile.wcc +107 -0
  174. data/vendor/PDCurses/vt/README.md +64 -0
  175. data/vendor/PDCurses/vt/pdcclip.c +20 -0
  176. data/vendor/PDCurses/vt/pdcdisp.c +284 -0
  177. data/vendor/PDCurses/vt/pdcgetsc.c +27 -0
  178. data/vendor/PDCurses/vt/pdckbd.c +394 -0
  179. data/vendor/PDCurses/vt/pdcscrn.c +434 -0
  180. data/vendor/PDCurses/vt/pdcsetsc.c +45 -0
  181. data/vendor/PDCurses/vt/pdcutil.c +43 -0
  182. data/vendor/PDCurses/vt/pdcvt.h +16 -0
  183. data/vendor/PDCurses/watcom.mif +68 -0
  184. data/vendor/PDCurses/wincon/CMakeLists.txt +27 -0
  185. data/vendor/PDCurses/wincon/Makefile.bcc +88 -0
  186. data/vendor/PDCurses/wincon/Makefile.dmc +256 -0
  187. data/vendor/PDCurses/wincon/Makefile.lcc +273 -0
  188. data/vendor/PDCurses/wincon/Makefile.mng +176 -0
  189. data/vendor/PDCurses/wincon/Makefile.vc +144 -0
  190. data/vendor/PDCurses/wincon/Makefile.wcc +51 -0
  191. data/vendor/PDCurses/wincon/README.md +85 -0
  192. data/vendor/PDCurses/wincon/pdcclip.c +174 -0
  193. data/vendor/PDCurses/wincon/pdcdisp.c +143 -0
  194. data/vendor/PDCurses/wincon/pdcgetsc.c +55 -0
  195. data/vendor/PDCurses/wincon/pdckbd.c +786 -0
  196. data/vendor/PDCurses/wincon/pdcscrn.c +717 -0
  197. data/vendor/PDCurses/wincon/pdcsetsc.c +91 -0
  198. data/vendor/PDCurses/wincon/pdcurses.ico +0 -0
  199. data/vendor/PDCurses/wincon/pdcurses.rc +28 -0
  200. data/vendor/PDCurses/wincon/pdcutil.c +41 -0
  201. data/vendor/PDCurses/wincon/pdcwin.h +31 -0
  202. data/vendor/PDCurses/wingui/CMakeLists.txt +27 -0
  203. data/vendor/PDCurses/wingui/Makefile.bcc +85 -0
  204. data/vendor/PDCurses/wingui/Makefile.dmc +259 -0
  205. data/vendor/PDCurses/wingui/Makefile.lcc +273 -0
  206. data/vendor/PDCurses/wingui/Makefile.mng +171 -0
  207. data/vendor/PDCurses/wingui/Makefile.vc +144 -0
  208. data/vendor/PDCurses/wingui/Makefile.wcc +51 -0
  209. data/vendor/PDCurses/wingui/README.md +93 -0
  210. data/vendor/PDCurses/wingui/pdcclip.c +174 -0
  211. data/vendor/PDCurses/wingui/pdcdisp.c +718 -0
  212. data/vendor/PDCurses/wingui/pdcgetsc.c +30 -0
  213. data/vendor/PDCurses/wingui/pdckbd.c +143 -0
  214. data/vendor/PDCurses/wingui/pdcscrn.c +2797 -0
  215. data/vendor/PDCurses/wingui/pdcsetsc.c +89 -0
  216. data/vendor/PDCurses/wingui/pdcurses.ico +0 -0
  217. data/vendor/PDCurses/wingui/pdcurses.rc +28 -0
  218. data/vendor/PDCurses/wingui/pdcutil.c +61 -0
  219. data/vendor/PDCurses/wingui/pdcwin.h +122 -0
  220. data/vendor/PDCurses/x11/Makefile.in +754 -0
  221. data/vendor/PDCurses/x11/PDCurses.spec +82 -0
  222. data/vendor/PDCurses/x11/README.md +62 -0
  223. data/vendor/PDCurses/x11/ScrollBox.c +319 -0
  224. data/vendor/PDCurses/x11/ScrollBox.h +51 -0
  225. data/vendor/PDCurses/x11/ScrollBoxP.h +70 -0
  226. data/vendor/PDCurses/x11/aclocal.m4 +994 -0
  227. data/vendor/PDCurses/x11/big_icon.xbm +46 -0
  228. data/vendor/PDCurses/x11/compose.h +201 -0
  229. data/vendor/PDCurses/x11/config.guess +1500 -0
  230. data/vendor/PDCurses/x11/config.h.in +100 -0
  231. data/vendor/PDCurses/x11/config.sub +1616 -0
  232. data/vendor/PDCurses/x11/configure +6700 -0
  233. data/vendor/PDCurses/x11/configure.ac +295 -0
  234. data/vendor/PDCurses/x11/debian/changelog +6 -0
  235. data/vendor/PDCurses/x11/debian/compat +1 -0
  236. data/vendor/PDCurses/x11/debian/control +11 -0
  237. data/vendor/PDCurses/x11/debian/copyright +27 -0
  238. data/vendor/PDCurses/x11/debian/rules +98 -0
  239. data/vendor/PDCurses/x11/install-sh +253 -0
  240. data/vendor/PDCurses/x11/little_icon.xbm +14 -0
  241. data/vendor/PDCurses/x11/ncurses_cfg.h +45 -0
  242. data/vendor/PDCurses/x11/pdcclip.c +173 -0
  243. data/vendor/PDCurses/x11/pdcdisp.c +85 -0
  244. data/vendor/PDCurses/x11/pdcgetsc.c +28 -0
  245. data/vendor/PDCurses/x11/pdckbd.c +104 -0
  246. data/vendor/PDCurses/x11/pdcscrn.c +258 -0
  247. data/vendor/PDCurses/x11/pdcsetsc.c +95 -0
  248. data/vendor/PDCurses/x11/pdcutil.c +52 -0
  249. data/vendor/PDCurses/x11/pdcx11.c +316 -0
  250. data/vendor/PDCurses/x11/pdcx11.h +191 -0
  251. data/vendor/PDCurses/x11/sb.c +155 -0
  252. data/vendor/PDCurses/x11/x11.c +3686 -0
  253. data/vendor/PDCurses/x11/xcurses-config.in +81 -0
  254. metadata +258 -24
  255. data/.travis.yml +0 -16
  256. data/appveyor.yml +0 -16
@@ -0,0 +1,45 @@
1
+ #include <stdio.h>
2
+ #include <curspriv.h>
3
+ #include "pdcvt.h"
4
+
5
+ #define CURSOR_ON "\033[?25h"
6
+ #define CURSOR_OFF "\033[?25l"
7
+
8
+ int PDC_curs_set( int visibility)
9
+ {
10
+ int ret_vis;
11
+
12
+ PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility));
13
+
14
+ ret_vis = SP->visibility;
15
+
16
+ SP->visibility = visibility;
17
+
18
+ printf( visibility ? CURSOR_ON : CURSOR_OFF);
19
+
20
+ return ret_vis;
21
+ }
22
+
23
+ int PDC_really_blinking = FALSE;
24
+
25
+ void PDC_show_changes( const short pair, const short idx, const chtype attr);
26
+
27
+ int PDC_set_blink(bool blinkon)
28
+ {
29
+ if( PDC_really_blinking != blinkon)
30
+ {
31
+ PDC_really_blinking = blinkon;
32
+ PDC_show_changes( -1, -1, A_BLINK);
33
+ }
34
+ return OK;
35
+ }
36
+
37
+ void PDC_set_title( const char *title)
38
+ {
39
+ PDC_LOG(("PDC_set_title() - called:<%s>\n", title));
40
+
41
+ #ifndef DOS
42
+ if( !PDC_is_ansi)
43
+ printf( "\033]2;%s\a", title);
44
+ #endif
45
+ }
@@ -0,0 +1,43 @@
1
+ #ifdef _WIN32
2
+ #include <windows.h>
3
+ #undef MOUSE_MOVED
4
+ #else
5
+ #include <unistd.h>
6
+ #endif
7
+ #include "curses.h"
8
+
9
+ void PDC_beep(void)
10
+ {
11
+ }
12
+
13
+ void PDC_napms(int ms)
14
+ {
15
+ #ifdef _WIN32
16
+ Sleep(ms);
17
+ #else
18
+ #ifndef DOS
19
+ usleep(1000 * ms);
20
+ #endif
21
+ #endif
22
+ }
23
+
24
+
25
+ const char *PDC_sysname(void)
26
+ {
27
+ return( "VTx00");
28
+ }
29
+
30
+ PDC_version_info PDC_version = { PDC_PORT_VT,
31
+ PDC_VER_MAJOR, PDC_VER_MINOR, PDC_VER_CHANGE,
32
+ sizeof( chtype),
33
+ #ifdef PDC_WIDE
34
+ TRUE,
35
+ #else
36
+ FALSE,
37
+ #endif
38
+ #ifdef PDC_FORCE_UTF8
39
+ TRUE,
40
+ #else
41
+ FALSE,
42
+ #endif
43
+ };
@@ -0,0 +1,16 @@
1
+ #define PACKED_RGB uint32_t
2
+ #ifndef DIVROUND
3
+ #define DIVROUND( A, B) ((A + B / 2) / B)
4
+ #endif
5
+ #define PACK_RGB( R, G, B) (((uint32_t)(R) << 16) | ((uint32_t)(G) << 8) \
6
+ | (uint32_t)(B))
7
+
8
+ #define Get_RValue( rgb) ((int)( (rgb) >> 16))
9
+ #define Get_GValue( rgb) ((int)( (rgb) >> 8) & 0xff)
10
+ #define Get_BValue( rgb) ((int)((rgb) & 0xff))
11
+
12
+ int PDC_pair_content( short pair, short *fg, short *bg);
13
+
14
+ /* If the following is TRUE, only a limited subset of control
15
+ codes will actually work. Happens in older Windows and DOS. */
16
+ extern bool PDC_is_ansi;
@@ -0,0 +1,68 @@
1
+ # Common elements for the Watcom makefiles
2
+
3
+ !ifeq CROSS Y
4
+ DEL = rm -f
5
+ COPY = cp
6
+ !else
7
+ DEL = del
8
+ COPY = copy
9
+ !endif
10
+
11
+ srcdir = $(PDCURSES_SRCDIR)/pdcurses
12
+ demodir = $(PDCURSES_SRCDIR)/demos
13
+
14
+ LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj &
15
+ border.obj clear.obj color.obj delch.obj deleteln.obj deprec.obj &
16
+ getch.obj getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj &
17
+ insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj &
18
+ outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj &
19
+ scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj &
20
+ touch.obj util.obj window.obj debug.obj
21
+
22
+ PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj &
23
+ pdcsetsc.obj pdcutil.obj
24
+
25
+ DEMOS = testcurs.exe ozdemo.exe xmas.exe tuidemo.exe firework.exe &
26
+ newtest.exe ptest.exe rain.exe worm.exe
27
+
28
+ LIBCURSES = pdcurses.lib
29
+
30
+ LINK = wlink
31
+
32
+ !ifdef __LOADDLL__
33
+ ! loaddll wcc wccd
34
+ ! loaddll wcc386 wccd386
35
+ ! loaddll wlink wlinkd
36
+ ! loaddll wlib wlibd
37
+ !endif
38
+
39
+ all: $(LIBCURSES) $(DEMOS)
40
+
41
+ clean
42
+ -$(DEL) *.obj
43
+ -$(DEL) *.lib
44
+ -$(DEL) *.exe
45
+ -$(DEL) *.err
46
+
47
+ demos: $(DEMOS)
48
+
49
+ .c: $(srcdir);$(osdir);$(demodir)
50
+ .c.obj: .autodepend
51
+ $(CC) $(CFLAGS) -fo=$@ $<
52
+
53
+ .obj.exe:
54
+ $(LINK) $(LDFLAGS) n $@ f $*.obj l $(LIBCURSES)
55
+
56
+ testcurs.exe: testcurs.obj $(LIBCURSES)
57
+ ozdemo.exe: ozdemo.obj $(LIBCURSES)
58
+ newtest.exe: newtest.obj $(LIBCURSES)
59
+ xmas.exe: xmas.obj $(LIBCURSES)
60
+ firework.exe: firework.obj $(LIBCURSES)
61
+ rain.exe: rain.obj $(LIBCURSES)
62
+ worm.exe: worm.obj $(LIBCURSES)
63
+ ptest.exe: ptest.obj $(LIBCURSES)
64
+
65
+ tuidemo.exe: tuidemo.obj tui.obj $(LIBCURSES)
66
+ $(LINK) $(LDFLAGS) n $@ f tuidemo.obj f tui.obj l $(LIBCURSES)
67
+
68
+ dist: .symbolic
@@ -0,0 +1,27 @@
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 "No build type specified, defaulting to MinSizeRel.")
6
+ endif()
7
+
8
+ PROJECT(wincon VERSION "${PROJECT_VERSION}" LANGUAGES C)
9
+
10
+ INCLUDE(project_common)
11
+
12
+ demo_app(../demos version)
13
+ demo_app(../demos firework)
14
+ demo_app(../demos ozdemo)
15
+ demo_app(../demos newtest)
16
+ demo_app(../demos ptest)
17
+ demo_app(../demos rain)
18
+ demo_app(../demos testcurs)
19
+ demo_app(../demos tuidemo)
20
+ demo_app(../demos worm)
21
+ demo_app(../demos xmas)
22
+
23
+ IF(WIN32)
24
+ SET_TARGET_PROPERTIES(${PROJECT_NAME}_newtest PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
25
+ ENDIF(WIN32)
26
+
27
+ SET(CPACK_COMPONENTS_ALL applications)
@@ -0,0 +1,88 @@
1
+ # Borland MAKE Makefile for PDCurses library - Windows console BC++ 7.0+
2
+ #
3
+ # Usage: make -f [path\]Makefile.bcc [DEBUG=] [WIDE=] [UTF8=] [target]
4
+ #
5
+ # where target can be any of:
6
+ # [all|demos|pdcurses.lib|testcurs.exe...]
7
+
8
+ O = obj
9
+ E = .exe
10
+ RM = del
11
+
12
+ !ifndef PDCURSES_SRCDIR
13
+ PDCURSES_SRCDIR = ..
14
+ !endif
15
+
16
+ !include $(PDCURSES_SRCDIR)\version.mif
17
+ !include $(PDCURSES_SRCDIR)\libobjs.mif
18
+
19
+ osdir = $(PDCURSES_SRCDIR)\wincon
20
+
21
+ CC = bcc32c -q -Xdriver -Wno-deprecated-declarations
22
+
23
+ !ifdef DEBUG
24
+ CFLAGS = -N -v -y -DPDCDEBUG
25
+ !else
26
+ CFLAGS = -O
27
+ !endif
28
+
29
+ !ifdef WIDE
30
+ WIDEOPT = -DPDC_WIDE
31
+ !endif
32
+
33
+ !ifdef UTF8
34
+ UTF8OPT = -DPDC_FORCE_UTF8
35
+ !endif
36
+
37
+ BUILD = $(CC) -I$(PDCURSES_SRCDIR) -c -Tpe $(CFLAGS) \
38
+ $(WIDEOPT) $(UTF8OPT)
39
+
40
+ LIBEXE = tlib /C /E /0 /a
41
+
42
+ LIBCURSES = pdcurses.lib
43
+
44
+ all: $(LIBCURSES)
45
+
46
+ clean:
47
+ -$(RM) *.obj
48
+ -$(RM) *.lib
49
+ -$(RM) *.tds
50
+ -$(RM) *.exe
51
+
52
+ demos: $(DEMOS)
53
+
54
+ $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
55
+ -$(RM) $@
56
+ $(LIBEXE) $@ $(LIBOBJS) $(PDCOBJS)
57
+
58
+ .autodepend
59
+
60
+ {$(srcdir)\}.c.obj:
61
+ $(BUILD) $<
62
+
63
+ {$(osdir)\}.c.obj:
64
+ $(BUILD) $<
65
+
66
+ {$(demodir)\}.c.obj:
67
+ $(BUILD) $<
68
+
69
+ .c.obj:
70
+ $(BUILD) $<
71
+
72
+ .obj.exe:
73
+ $(CC) -e$@ $** $(LIBCURSES)
74
+
75
+ tuidemo.exe: tuidemo.obj tui.obj $(LIBCURSES)
76
+ $(CC) -e$@ $**
77
+
78
+ tui.obj: $(demodir)\tui.c $(demodir)\tui.h $(PDCURSES_CURSES_H)
79
+ $(BUILD) -I$(demodir) $(demodir)\tui.c
80
+
81
+ tuidemo.obj: $(demodir)\tuidemo.c $(PDCURSES_CURSES_H)
82
+ $(BUILD) -I$(demodir) $(demodir)\tuidemo.c
83
+
84
+ PLATFORM1 = Borland C++ Wincon
85
+ PLATFORM2 = Borland C/C++ 7.2 for Windows console
86
+ ARCNAME = pdc$(VER)_bcc_wincon
87
+
88
+ !include $(PDCURSES_SRCDIR)\makedist.mif
@@ -0,0 +1,256 @@
1
+ # Makefile for PDCurses library - WIN32 Digital Mars
2
+ #
3
+ # Usage: make -f Makefile.dmc [target]
4
+ #
5
+ # where target can be any of:
6
+ # [all|demos|pdcurses.lib|testcurs.exe...]
7
+
8
+ PDCURSES_SRCDIR = ..
9
+
10
+ PDCURSES_CURSES_H = $(PDCURSES_SRCDIR)\curses.h
11
+ PDCURSES_CURSPRIV_H = $(PDCURSES_SRCDIR)\curspriv.h
12
+ PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
13
+
14
+ PANEL_HEADER = $(PDCURSES_SRCDIR)\panel.h
15
+ TERM_HEADER = $(PDCURSES_SRCDIR)\term.h
16
+
17
+ srcdir = $(PDCURSES_SRCDIR)\pdcurses
18
+ osdir = $(PDCURSES_SRCDIR)\wincon
19
+ demodir = $(PDCURSES_SRCDIR)\demos
20
+
21
+ PDCURSES_WIN_H = $(osdir)\pdcwin.h
22
+
23
+ CC = dmc
24
+
25
+ CFLAGS = -c -o+space -Nc
26
+
27
+ CPPFLAGS = -I$(PDCURSES_SRCDIR) -DPDC_WIDE -DPDC_FORCE_UTF8
28
+
29
+ LINK = dmc
30
+ LIBEXE = lib
31
+
32
+ LIBCURSES = pdcurses.lib
33
+
34
+ BUILD = $(CC) $(CFLAGS) $(CPPFLAGS)
35
+
36
+ DEMOS = testcurs.exe ozdemo.exe newtest.exe xmas.exe tuidemo.exe \
37
+ firework.exe ptest.exe rain.exe worm.exe
38
+
39
+ all: $(LIBCURSES) $(DEMOS)
40
+
41
+ clean:
42
+ -del *.obj
43
+ -del *.lib
44
+ -del *.exe
45
+ -del *.map
46
+ -del advapi32.def
47
+
48
+ LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj \
49
+ border.obj clear.obj color.obj delch.obj deleteln.obj deprec.obj getch.obj \
50
+ getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj \
51
+ insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj \
52
+ outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj \
53
+ scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj \
54
+ touch.obj util.obj window.obj debug.obj
55
+
56
+ PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj \
57
+ pdcsetsc.obj pdcutil.obj
58
+
59
+ DEMOOBJS = testcurs.obj ozdemo.obj newtest.obj xmas.obj tuidemo.obj tui.obj \
60
+ firework.obj ptest.obj rain.obj worm.obj
61
+
62
+ $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
63
+ $(PDCOBJS) : $(PDCURSES_WIN_H)
64
+ panel.obj ptest.obj: $(PANEL_HEADER)
65
+ terminfo.obj: $(TERM_HEADER)
66
+
67
+ $(DEMOOBJS) : $(PDCURSES_CURSES_H)
68
+ $(DEMOS) : $(LIBCURSES)
69
+
70
+ $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
71
+ $(LIBEXE) -c $@ $(LIBOBJS) $(PDCOBJS)
72
+ -copy $(LIBCURSES) panel.lib
73
+
74
+ SRCBUILD = $(BUILD) $(srcdir)\$*.c
75
+ OSBUILD = $(BUILD) $(osdir)\$*.c
76
+ DEMOBUILD = $(LINK) $(CPPFLAGS) -o+space $@ $**
77
+
78
+ addch.obj: $(srcdir)\addch.c
79
+ $(SRCBUILD)
80
+
81
+ addchstr.obj: $(srcdir)\addchstr.c
82
+ $(SRCBUILD)
83
+
84
+ addstr.obj: $(srcdir)\addstr.c
85
+ $(SRCBUILD)
86
+
87
+ attr.obj: $(srcdir)\attr.c
88
+ $(SRCBUILD)
89
+
90
+ beep.obj: $(srcdir)\beep.c
91
+ $(SRCBUILD)
92
+
93
+ bkgd.obj: $(srcdir)\bkgd.c
94
+ $(SRCBUILD)
95
+
96
+ border.obj: $(srcdir)\border.c
97
+ $(SRCBUILD)
98
+
99
+ clear.obj: $(srcdir)\clear.c
100
+ $(SRCBUILD)
101
+
102
+ color.obj: $(srcdir)\color.c
103
+ $(SRCBUILD)
104
+
105
+ delch.obj: $(srcdir)\delch.c
106
+ $(SRCBUILD)
107
+
108
+ deleteln.obj: $(srcdir)\deleteln.c
109
+ $(SRCBUILD)
110
+
111
+ deprec.obj: $(srcdir)\deprec.c
112
+ $(SRCBUILD)
113
+
114
+ getch.obj: $(srcdir)\getch.c
115
+ $(SRCBUILD)
116
+
117
+ getstr.obj: $(srcdir)\getstr.c
118
+ $(SRCBUILD)
119
+
120
+ getyx.obj: $(srcdir)\getyx.c
121
+ $(SRCBUILD)
122
+
123
+ inch.obj: $(srcdir)\inch.c
124
+ $(SRCBUILD)
125
+
126
+ inchstr.obj: $(srcdir)\inchstr.c
127
+ $(SRCBUILD)
128
+
129
+ initscr.obj: $(srcdir)\initscr.c
130
+ $(SRCBUILD)
131
+
132
+ inopts.obj: $(srcdir)\inopts.c
133
+ $(SRCBUILD)
134
+
135
+ insch.obj: $(srcdir)\insch.c
136
+ $(SRCBUILD)
137
+
138
+ insstr.obj: $(srcdir)\insstr.c
139
+ $(SRCBUILD)
140
+
141
+ instr.obj: $(srcdir)\instr.c
142
+ $(SRCBUILD)
143
+
144
+ kernel.obj: $(srcdir)\kernel.c
145
+ $(SRCBUILD)
146
+
147
+ keyname.obj: $(srcdir)\keyname.c
148
+ $(SRCBUILD)
149
+
150
+ mouse.obj: $(srcdir)\mouse.c
151
+ $(SRCBUILD)
152
+
153
+ move.obj: $(srcdir)\move.c
154
+ $(SRCBUILD)
155
+
156
+ outopts.obj: $(srcdir)\outopts.c
157
+ $(SRCBUILD)
158
+
159
+ overlay.obj: $(srcdir)\overlay.c
160
+ $(SRCBUILD)
161
+
162
+ pad.obj: $(srcdir)\pad.c
163
+ $(SRCBUILD)
164
+
165
+ panel.obj: $(srcdir)\panel.c
166
+ $(SRCBUILD)
167
+
168
+ printw.obj: $(srcdir)\printw.c
169
+ $(SRCBUILD)
170
+
171
+ refresh.obj: $(srcdir)\refresh.c
172
+ $(SRCBUILD)
173
+
174
+ scanw.obj: $(srcdir)\scanw.c
175
+ $(SRCBUILD)
176
+
177
+ scr_dump.obj: $(srcdir)\scr_dump.c
178
+ $(SRCBUILD)
179
+
180
+ scroll.obj: $(srcdir)\scroll.c
181
+ $(SRCBUILD)
182
+
183
+ slk.obj: $(srcdir)\slk.c
184
+ $(SRCBUILD)
185
+
186
+ termattr.obj: $(srcdir)\termattr.c
187
+ $(SRCBUILD)
188
+
189
+ terminfo.obj: $(srcdir)\terminfo.c
190
+ $(SRCBUILD)
191
+
192
+ touch.obj: $(srcdir)\touch.c
193
+ $(SRCBUILD)
194
+
195
+ util.obj: $(srcdir)\util.c
196
+ $(SRCBUILD)
197
+
198
+ window.obj: $(srcdir)\window.c
199
+ $(SRCBUILD)
200
+
201
+ debug.obj: $(srcdir)\debug.c
202
+ $(SRCBUILD)
203
+
204
+ pdcclip.obj: $(osdir)\pdcclip.c
205
+ $(OSBUILD)
206
+
207
+ pdcdisp.obj: $(osdir)\pdcdisp.c
208
+ $(OSBUILD)
209
+
210
+ pdcgetsc.obj: $(osdir)\pdcgetsc.c
211
+ $(OSBUILD)
212
+
213
+ pdckbd.obj: $(osdir)\pdckbd.c
214
+ $(OSBUILD)
215
+
216
+ pdcscrn.obj: $(osdir)\pdcscrn.c
217
+ $(OSBUILD)
218
+
219
+ pdcsetsc.obj: $(osdir)\pdcsetsc.c
220
+ $(OSBUILD)
221
+
222
+ pdcutil.obj: $(osdir)\pdcutil.c
223
+ $(OSBUILD)
224
+
225
+ firework.exe: $(demodir)\firework.c
226
+ $(DEMOBUILD)
227
+
228
+ ozdemo.exe: $(demodir)\ozdemo.c
229
+ $(DEMOBUILD)
230
+
231
+ newtest.exe: $(demodir)\newtest.c
232
+ $(DEMOBUILD)
233
+
234
+ ptest.exe: $(demodir)\ptest.c
235
+ $(DEMOBUILD)
236
+
237
+ rain.exe: $(demodir)\rain.c
238
+ $(DEMOBUILD)
239
+
240
+ testcurs.exe: $(demodir)\testcurs.c
241
+ $(DEMOBUILD) advapi32.lib
242
+
243
+ tuidemo.exe: tuidemo.obj tui.obj
244
+ $(DEMOBUILD)
245
+
246
+ worm.exe: $(demodir)\worm.c
247
+ $(DEMOBUILD)
248
+
249
+ xmas.exe: $(demodir)\xmas.c
250
+ $(DEMOBUILD)
251
+
252
+ tui.obj: $(demodir)\tui.c $(demodir)\tui.h
253
+ $(BUILD) -I$(demodir) $(demodir)\$*.c
254
+
255
+ tuidemo.obj: $(demodir)\tuidemo.c
256
+ $(BUILD) -I$(demodir) $(demodir)\$*.c