standalone-ruby 1.4.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -22
  3. data/lib/data/{tcc → c_compilers/tcc}/include/_mingw.h +54 -54
  4. data/lib/data/{tcc → c_compilers/tcc}/include/assert.h +71 -71
  5. data/lib/data/{tcc → c_compilers/tcc}/include/conio.h +159 -159
  6. data/lib/data/{tcc → c_compilers/tcc}/include/ctype.h +232 -232
  7. data/lib/data/{tcc → c_compilers/tcc}/include/dir.h +26 -26
  8. data/lib/data/{tcc → c_compilers/tcc}/include/direct.h +95 -95
  9. data/lib/data/{tcc → c_compilers/tcc}/include/dirent.h +96 -96
  10. data/lib/data/{tcc → c_compilers/tcc}/include/dos.h +110 -110
  11. data/lib/data/{tcc → c_compilers/tcc}/include/errno.h +117 -117
  12. data/lib/data/{tcc → c_compilers/tcc}/include/excpt.h +20 -20
  13. data/lib/data/{tcc → c_compilers/tcc}/include/fcntl.h +135 -135
  14. data/lib/data/{tcc → c_compilers/tcc}/include/fenv.h +85 -85
  15. data/lib/data/{tcc → c_compilers/tcc}/include/float.h +224 -224
  16. data/lib/data/{tcc → c_compilers/tcc}/include/inttypes.h +275 -275
  17. data/lib/data/{tcc → c_compilers/tcc}/include/io.h +296 -296
  18. data/lib/data/{tcc → c_compilers/tcc}/include/limits.h +115 -115
  19. data/lib/data/{tcc → c_compilers/tcc}/include/locale.h +100 -100
  20. data/lib/data/{tcc → c_compilers/tcc}/include/malloc.h +87 -87
  21. data/lib/data/{tcc → c_compilers/tcc}/include/math.h +438 -438
  22. data/lib/data/{tcc → c_compilers/tcc}/include/mem.h +8 -8
  23. data/lib/data/{tcc → c_compilers/tcc}/include/memory.h +9 -9
  24. data/lib/data/{tcc → c_compilers/tcc}/include/process.h +158 -158
  25. data/lib/data/{tcc → c_compilers/tcc}/include/setjmp.h +72 -72
  26. data/lib/data/{tcc → c_compilers/tcc}/include/share.h +44 -44
  27. data/lib/data/{tcc → c_compilers/tcc}/include/signal.h +111 -111
  28. data/lib/data/{tcc → c_compilers/tcc}/include/stdarg.h +16 -16
  29. data/lib/data/{tcc → c_compilers/tcc}/include/stdbool.h +10 -10
  30. data/lib/data/{tcc → c_compilers/tcc}/include/stddef.h +26 -26
  31. data/lib/data/{tcc → c_compilers/tcc}/include/stdint.h +184 -184
  32. data/lib/data/{tcc → c_compilers/tcc}/include/stdio.h +413 -413
  33. data/lib/data/{tcc → c_compilers/tcc}/include/stdlib.h +482 -482
  34. data/lib/data/{tcc → c_compilers/tcc}/include/string.h +206 -206
  35. data/lib/data/{tcc → c_compilers/tcc}/include/sys/fcntl.h +8 -8
  36. data/lib/data/{tcc → c_compilers/tcc}/include/sys/file.h +9 -9
  37. data/lib/data/{tcc → c_compilers/tcc}/include/sys/locking.h +52 -52
  38. data/lib/data/{tcc → c_compilers/tcc}/include/sys/stat.h +190 -190
  39. data/lib/data/{tcc → c_compilers/tcc}/include/sys/time.h +3 -3
  40. data/lib/data/{tcc → c_compilers/tcc}/include/sys/timeb.h +82 -82
  41. data/lib/data/{tcc → c_compilers/tcc}/include/sys/types.h +118 -118
  42. data/lib/data/{tcc/include → c_compilers/tcc/include/sys}/unistd.h +9 -10
  43. data/lib/data/{tcc → c_compilers/tcc}/include/sys/utime.h +89 -89
  44. data/lib/data/{tcc → c_compilers/tcc}/include/tchar.h +367 -367
  45. data/lib/data/{tcc → c_compilers/tcc}/include/time.h +219 -219
  46. data/lib/data/{tcc/include/sys → c_compilers/tcc/include}/unistd.h +10 -9
  47. data/lib/data/{tcc → c_compilers/tcc}/include/values.h +4 -4
  48. data/lib/data/{tcc → c_compilers/tcc}/include/varargs.h +11 -11
  49. data/lib/data/{tcc → c_compilers/tcc}/include/wchar.h +318 -318
  50. data/lib/data/{tcc → c_compilers/tcc}/include/wctype.h +127 -127
  51. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/basetsd.h +119 -119
  52. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/basetyps.h +144 -144
  53. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winbase.h +1852 -1852
  54. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/wincon.h +207 -207
  55. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/windef.h +240 -240
  56. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/windows.h +176 -176
  57. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winerror.h +1054 -1054
  58. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/wingdi.h +2843 -2843
  59. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnetwk.h +346 -346
  60. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnls.h +651 -651
  61. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnt.h +2667 -2667
  62. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winreg.h +159 -159
  63. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winsvc.h +309 -309
  64. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winuser.h +3472 -3472
  65. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winver.h +133 -133
  66. data/lib/data/{tcc → c_compilers/tcc}/lib/gdi32.def +337 -337
  67. data/lib/data/{tcc → c_compilers/tcc}/lib/kernel32.def +763 -763
  68. data/lib/data/{tcc → c_compilers/tcc}/lib/msvcrt.def +782 -782
  69. data/lib/data/{tcc → c_compilers/tcc}/lib/user32.def +654 -654
  70. data/lib/data/{exe_template → exe_templates}/launcher_stub.c +2 -2
  71. data/lib/data/exe_templates/launcher_stub.cpp +31 -0
  72. data/lib/data/{vbs → launcher_templates/vbs}/default_vbs.txt +7 -7
  73. data/lib/data/{vbs → launcher_templates/vbs}/vbs_gui.txt +8 -8
  74. data/lib/data/resource_files/default.rc +17 -0
  75. data/lib/{utils/displayer.rb → displayer.rb} +6 -6
  76. data/lib/exe_packer.rb +68 -0
  77. data/lib/{utils/launcher.rb → launcher.rb} +18 -24
  78. data/lib/launcher_handler.rb +41 -0
  79. data/lib/parameter_parser.rb +201 -0
  80. data/lib/{utils/ruby_copy.rb → ruby_copy.rb} +0 -6
  81. data/lib/sfx_generator.rb +9 -0
  82. data/lib/standalone_ruby.rb +1 -1
  83. data/lib/version/version.rb +1 -1
  84. metadata +84 -87
  85. data/lib/data/bat-cmd/default_bat_cmd.txt +0 -9
  86. data/lib/data/exe_template/launcher_stub.cpp +0 -9
  87. data/lib/data/tcc/tiny_impdef.exe +0 -0
  88. data/lib/data/tcc/tiny_libmaker.exe +0 -0
  89. data/lib/utils/config_generator.rb +0 -5
  90. data/lib/utils/exe_packer.rb +0 -72
  91. data/lib/utils/launcher_handler.rb +0 -111
  92. data/lib/utils/logger_helper.rb +0 -24
  93. data/lib/utils/parameter_parser.rb +0 -211
  94. /data/lib/data/{tcc → c_compilers/tcc}/lib/libtcc1.a +0 -0
  95. /data/lib/data/{tcc → c_compilers/tcc}/tcc.exe +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe559b571044132ebcebf950af268390f5009c482bdb015854f72b632e42c3da
4
- data.tar.gz: a64e59f677a1748f79e297ac3b6070bde2b061e07dd2c7aabf206f081bb8687a
3
+ metadata.gz: c724970cd908e926f103830ca76508f7da51862fe862ae9d12aa8dec27a6f504
4
+ data.tar.gz: 2931a5adefac88cdf0d432bbfcf4d61af96c38060e0a065e227aeea6e967cc4f
5
5
  SHA512:
6
- metadata.gz: 5d8deff562c776976cfec36842691c02c1c2bac027af1cd6a53cc4d6eed966e4679500737e8618b754b0a19d30cdfcd1566654800d7939ec08e93b8cfc80bba7
7
- data.tar.gz: 9ed83514709d966dfea42547053c59b1de8cd67df2c3988110cf328fd513e85b4539ce55d69d3aa13743ef3d1fbe9ce7e4b68b3833fa8664ea893992e0295250
6
+ metadata.gz: fe7a0dbb6b0a7452769ae5529c4de5d7df1a4fdfecc7272d2f2c049875a607d2823b1b6130e6b5afcc2582f83581f63e412c6a66b6bb24f42ea95b316ff9824e
7
+ data.tar.gz: 2a1dcf854840db1dd0ed5d5b99df82691d9d1386d420d56c3e1a410ac86c6cf8110509d902b2d3e31ba1468088b03eafc8ab8492633c9a82028f69f09ac447fa
data/CHANGELOG.md CHANGED
@@ -1,34 +1,48 @@
1
1
  # Changelog
2
2
 
3
- ## [1.0] - 2025-03-27
4
- - First version of Standalone-Ruby released.
5
-
6
- ## [1.1] - 2025-03-28
7
- - Added support for projects with visual interfaces.
3
+ ## [1.5.1] - 2025-04-13
4
+ - Logger support removed
5
+ - Platform analysis process fixed
6
+
7
+ ## [1.5.0] - 2025-04-11
8
+ - Added support for .rc files in exe compilation
9
+ - Changes were made to the file structure
10
+ - Foundation laid for SFX exe file support
11
+ - New changes have been made to the parameter parser.
12
+ - Sample project output changed
13
+ - Prevented some antiviruses from detecting compiled exe files as viruses
14
+ - Default values ​​assigned
15
+ - VBS files are now automatically created as launcher.vbs
8
16
 
9
- ## [1.2] - 2025-04-02
10
- - Added .cmd file extension support.
11
- - Added options for new supports
12
- - Project text outputs corrected
13
- - Added launcher to lib folder
17
+ ## [1.4.2] - 2025-04-08
18
+ - The text output of the Robocopy operation is removed from the screen
19
+ - Help message edited
14
20
 
15
- ## [1.2.1] - 2025-04-03
16
- - Project text outputs corrected again
21
+ ## [1.4.1] - 2025-04-06
22
+ - Displayer outputs changed.
17
23
 
18
- ## [1.3] - 2025-04-04
19
- - Logger support has been added for testing purposes and will be adjusted later.
24
+ ## [1.4] - 2025-04-06
25
+ - Added exe support!
26
+ - Improvements have been made for non-GUI programs.
20
27
 
21
28
  ## [1.3.1] - 2025-04-04
22
29
  - Added platform analysis function
23
30
  - Logger support fixed
24
31
 
25
- ## [1.4] - 2025-04-06
26
- - Added exe support!
27
- - Improvements have been made for non-GUI programs.
32
+ ## [1.3] - 2025-04-04
33
+ - Logger support has been added for testing purposes and will be adjusted later.
28
34
 
29
- ## [1.4.1] - 2025-04-06
30
- - Displayer outputs changed.
35
+ ## [1.2.1] - 2025-04-03
36
+ - Project text outputs corrected again
31
37
 
32
- ## [1.4.2] - 2025-04-08
33
- - The text output of the Robocopy operation is removed from the screen
34
- - Help message edited
38
+ ## [1.2] - 2025-04-02
39
+ - Added .cmd file extension support.
40
+ - Added options for new supports
41
+ - Project text outputs corrected
42
+ - Added launcher to lib folder
43
+
44
+ ## [1.1] - 2025-03-28
45
+ - Added support for projects with visual interfaces.
46
+
47
+ ## [1.0] - 2025-03-27
48
+ - First version of Standalone-Ruby released.
@@ -1,54 +1,54 @@
1
- /*
2
- * _mingw.h
3
- *
4
- * This file is for TCC-PE and not part of the Mingw32 package.
5
- *
6
- * THIS SOFTWARE IS NOT COPYRIGHTED
7
- *
8
- * This source code is offered for use in the public domain. You may
9
- * use, modify or distribute it freely.
10
- *
11
- * This code is distributed in the hope that it will be useful but
12
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
13
- * DISCLAIMED. This includes but is not limited to warranties of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
- *
16
- */
17
-
18
- #ifndef __MINGW_H
19
- #define __MINGW_H
20
-
21
- #include <stddef.h>
22
-
23
- #define __int64 long long
24
- #define __int32 long
25
- #define __int16 short
26
- #define __int8 char
27
- #define __cdecl __attribute__((__cdecl__))
28
- #define __stdcall __attribute__((__stdcall__))
29
- #define __declspec(x) __attribute__((x))
30
-
31
- #define __MINGW32_VERSION 2.0
32
- #define __MINGW32_MAJOR_VERSION 2
33
- #define __MINGW32_MINOR_VERSION 0
34
-
35
- #define __MSVCRT__ 1
36
- #define __MINGW_IMPORT extern
37
- #define _CRTIMP
38
- #define __CRT_INLINE extern __inline__
39
-
40
- #define WIN32 1
41
-
42
- #ifndef _WINT_T
43
- #define _WINT_T
44
- typedef unsigned int wint_t;
45
- #endif
46
-
47
- /* for winapi */
48
- #define _ANONYMOUS_UNION
49
- #define _ANONYMOUS_STRUCT
50
- #define DECLSPEC_NORETURN
51
- #define WIN32_LEAN_AND_MEAN
52
- #define DECLARE_STDCALL_P(type) __stdcall type
53
-
54
- #endif /* __MINGW_H */
1
+ /*
2
+ * _mingw.h
3
+ *
4
+ * This file is for TCC-PE and not part of the Mingw32 package.
5
+ *
6
+ * THIS SOFTWARE IS NOT COPYRIGHTED
7
+ *
8
+ * This source code is offered for use in the public domain. You may
9
+ * use, modify or distribute it freely.
10
+ *
11
+ * This code is distributed in the hope that it will be useful but
12
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
13
+ * DISCLAIMED. This includes but is not limited to warranties of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ *
16
+ */
17
+
18
+ #ifndef __MINGW_H
19
+ #define __MINGW_H
20
+
21
+ #include <stddef.h>
22
+
23
+ #define __int64 long long
24
+ #define __int32 long
25
+ #define __int16 short
26
+ #define __int8 char
27
+ #define __cdecl __attribute__((__cdecl__))
28
+ #define __stdcall __attribute__((__stdcall__))
29
+ #define __declspec(x) __attribute__((x))
30
+
31
+ #define __MINGW32_VERSION 2.0
32
+ #define __MINGW32_MAJOR_VERSION 2
33
+ #define __MINGW32_MINOR_VERSION 0
34
+
35
+ #define __MSVCRT__ 1
36
+ #define __MINGW_IMPORT extern
37
+ #define _CRTIMP
38
+ #define __CRT_INLINE extern __inline__
39
+
40
+ #define WIN32 1
41
+
42
+ #ifndef _WINT_T
43
+ #define _WINT_T
44
+ typedef unsigned int wint_t;
45
+ #endif
46
+
47
+ /* for winapi */
48
+ #define _ANONYMOUS_UNION
49
+ #define _ANONYMOUS_STRUCT
50
+ #define DECLSPEC_NORETURN
51
+ #define WIN32_LEAN_AND_MEAN
52
+ #define DECLARE_STDCALL_P(type) __stdcall type
53
+
54
+ #endif /* __MINGW_H */
@@ -1,71 +1,71 @@
1
- /*
2
- * assert.h
3
- *
4
- * Define the assert macro for debug output.
5
- *
6
- * This file is part of the Mingw32 package.
7
- *
8
- * Contributors:
9
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10
- *
11
- * THIS SOFTWARE IS NOT COPYRIGHTED
12
- *
13
- * This source code is offered for use in the public domain. You may
14
- * use, modify or distribute it freely.
15
- *
16
- * This code is distributed in the hope that it will be useful but
17
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18
- * DISCLAIMED. This includes but is not limited to warranties of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
- *
21
- * $Revision: 1.2 $
22
- * $Author: bellard $
23
- * $Date: 2005/04/17 13:14:29 $
24
- *
25
- */
26
-
27
- #ifndef _ASSERT_H_
28
- #define _ASSERT_H_
29
-
30
- /* All the headers include this file. */
31
- #include <_mingw.h>
32
-
33
- #ifndef RC_INVOKED
34
-
35
- #ifdef __cplusplus
36
- extern "C" {
37
- #endif
38
-
39
- #ifdef NDEBUG
40
-
41
- /*
42
- * If not debugging, assert does nothing.
43
- */
44
- #define assert(x) ((void)0)
45
-
46
- #else /* debugging enabled */
47
-
48
- /*
49
- * CRTDLL nicely supplies a function which does the actual output and
50
- * call to abort.
51
- */
52
- void _assert (const char*, const char*, int)
53
- #ifdef __GNUC__
54
- __attribute__ ((noreturn))
55
- #endif
56
- ;
57
-
58
- /*
59
- * Definition of the assert macro.
60
- */
61
- #define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
62
- #endif /* NDEBUG */
63
-
64
- #ifdef __cplusplus
65
- }
66
- #endif
67
-
68
- #endif /* Not RC_INVOKED */
69
-
70
- #endif /* Not _ASSERT_H_ */
71
-
1
+ /*
2
+ * assert.h
3
+ *
4
+ * Define the assert macro for debug output.
5
+ *
6
+ * This file is part of the Mingw32 package.
7
+ *
8
+ * Contributors:
9
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10
+ *
11
+ * THIS SOFTWARE IS NOT COPYRIGHTED
12
+ *
13
+ * This source code is offered for use in the public domain. You may
14
+ * use, modify or distribute it freely.
15
+ *
16
+ * This code is distributed in the hope that it will be useful but
17
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18
+ * DISCLAIMED. This includes but is not limited to warranties of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
+ *
21
+ * $Revision: 1.2 $
22
+ * $Author: bellard $
23
+ * $Date: 2005/04/17 13:14:29 $
24
+ *
25
+ */
26
+
27
+ #ifndef _ASSERT_H_
28
+ #define _ASSERT_H_
29
+
30
+ /* All the headers include this file. */
31
+ #include <_mingw.h>
32
+
33
+ #ifndef RC_INVOKED
34
+
35
+ #ifdef __cplusplus
36
+ extern "C" {
37
+ #endif
38
+
39
+ #ifdef NDEBUG
40
+
41
+ /*
42
+ * If not debugging, assert does nothing.
43
+ */
44
+ #define assert(x) ((void)0)
45
+
46
+ #else /* debugging enabled */
47
+
48
+ /*
49
+ * CRTDLL nicely supplies a function which does the actual output and
50
+ * call to abort.
51
+ */
52
+ void _assert (const char*, const char*, int)
53
+ #ifdef __GNUC__
54
+ __attribute__ ((noreturn))
55
+ #endif
56
+ ;
57
+
58
+ /*
59
+ * Definition of the assert macro.
60
+ */
61
+ #define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
62
+ #endif /* NDEBUG */
63
+
64
+ #ifdef __cplusplus
65
+ }
66
+ #endif
67
+
68
+ #endif /* Not RC_INVOKED */
69
+
70
+ #endif /* Not _ASSERT_H_ */
71
+
@@ -1,159 +1,159 @@
1
- /* A conio implementation for Mingw/Dev-C++.
2
- *
3
- * Written by:
4
- * Hongli Lai <hongli@telekabel.nl>
5
- * tkorrovi <tkorrovi@altavista.net> on 2002/02/26.
6
- * Andrew Westcott <ajwestco@users.sourceforge.net>
7
- *
8
- * Offered for use in the public domain without any warranty.
9
- */
10
-
11
- #ifndef _CONIO_H_
12
- #define _CONIO_H_
13
-
14
-
15
- #include <stdio.h>
16
-
17
- #ifdef __cplusplus
18
- extern "C" {
19
- #endif
20
-
21
- #define BLINK 0
22
-
23
- typedef enum
24
- {
25
- BLACK,
26
- BLUE,
27
- GREEN,
28
- CYAN,
29
- RED,
30
- MAGENTA,
31
- BROWN,
32
- LIGHTGRAY,
33
- DARKGRAY,
34
- LIGHTBLUE,
35
- LIGHTGREEN,
36
- LIGHTCYAN,
37
- LIGHTRED,
38
- LIGHTMAGENTA,
39
- YELLOW,
40
- WHITE
41
- } COLORS;
42
-
43
-
44
- #define cgets _cgets
45
- #define cprintf _cprintf
46
- #define cputs _cputs
47
- #define cscanf _cscanf
48
- #define ScreenClear clrscr
49
-
50
- /* blinkvideo */
51
-
52
- void clreol (void);
53
- void clrscr (void);
54
-
55
- int _conio_gettext (int left, int top, int right, int bottom,
56
- char *str);
57
- /* _conio_kbhit */
58
-
59
- void delline (void);
60
-
61
- /* gettextinfo */
62
- void gotoxy(int x, int y);
63
- /*
64
- highvideo
65
- insline
66
- intensevideo
67
- lowvideo
68
- movetext
69
- normvideo
70
- */
71
-
72
- void puttext (int left, int top, int right, int bottom, char *str);
73
-
74
- // Screen Variables
75
-
76
- /* ScreenCols
77
- ScreenGetChar
78
- ScreenGetCursor
79
- ScreenMode
80
- ScreenPutChar
81
- ScreenPutString
82
- ScreenRetrieve
83
- ScreenRows
84
- ScreenSetCursor
85
- ScreenUpdate
86
- ScreenUpdateLine
87
- ScreenVisualBell
88
- _set_screen_lines */
89
-
90
- void _setcursortype (int type);
91
-
92
- void textattr (int _attr);
93
-
94
- void textbackground (int color);
95
-
96
- void textcolor (int color);
97
-
98
- /* textmode */
99
-
100
- int wherex (void);
101
-
102
- int wherey (void);
103
-
104
- /* window */
105
-
106
-
107
-
108
- /* The code below was part of Mingw's conio.h */
109
- /*
110
- * conio.h
111
- *
112
- * Low level console I/O functions. Pretty please try to use the ANSI
113
- * standard ones if you are writing new code.
114
- *
115
- * This file is part of the Mingw32 package.
116
- *
117
- * Contributors:
118
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
119
- *
120
- * THIS SOFTWARE IS NOT COPYRIGHTED
121
- *
122
- * This source code is offered for use in the public domain. You may
123
- * use, modify or distribute it freely.
124
- *
125
- * This code is distributed in the hope that it will be useful but
126
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
127
- * DISCLAMED. This includes but is not limited to warranties of
128
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
129
- *
130
- * $Revision: 1.2 $
131
- * $Author: bellard $
132
- * $Date: 2005/04/17 13:14:29 $
133
- *
134
- */
135
-
136
- char* _cgets (char*);
137
- int _cprintf (const char*, ...);
138
- int _cputs (const char*);
139
- int _cscanf (char*, ...);
140
-
141
- int _getch (void);
142
- int _getche (void);
143
- int _kbhit (void);
144
- int _putch (int);
145
- int _ungetch (int);
146
-
147
-
148
- int getch (void);
149
- int getche (void);
150
- int kbhit (void);
151
- int putch (int);
152
- int ungetch (int);
153
-
154
-
155
- #ifdef __cplusplus
156
- }
157
- #endif
158
-
159
- #endif /* _CONIO_H_ */
1
+ /* A conio implementation for Mingw/Dev-C++.
2
+ *
3
+ * Written by:
4
+ * Hongli Lai <hongli@telekabel.nl>
5
+ * tkorrovi <tkorrovi@altavista.net> on 2002/02/26.
6
+ * Andrew Westcott <ajwestco@users.sourceforge.net>
7
+ *
8
+ * Offered for use in the public domain without any warranty.
9
+ */
10
+
11
+ #ifndef _CONIO_H_
12
+ #define _CONIO_H_
13
+
14
+
15
+ #include <stdio.h>
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ #define BLINK 0
22
+
23
+ typedef enum
24
+ {
25
+ BLACK,
26
+ BLUE,
27
+ GREEN,
28
+ CYAN,
29
+ RED,
30
+ MAGENTA,
31
+ BROWN,
32
+ LIGHTGRAY,
33
+ DARKGRAY,
34
+ LIGHTBLUE,
35
+ LIGHTGREEN,
36
+ LIGHTCYAN,
37
+ LIGHTRED,
38
+ LIGHTMAGENTA,
39
+ YELLOW,
40
+ WHITE
41
+ } COLORS;
42
+
43
+
44
+ #define cgets _cgets
45
+ #define cprintf _cprintf
46
+ #define cputs _cputs
47
+ #define cscanf _cscanf
48
+ #define ScreenClear clrscr
49
+
50
+ /* blinkvideo */
51
+
52
+ void clreol (void);
53
+ void clrscr (void);
54
+
55
+ int _conio_gettext (int left, int top, int right, int bottom,
56
+ char *str);
57
+ /* _conio_kbhit */
58
+
59
+ void delline (void);
60
+
61
+ /* gettextinfo */
62
+ void gotoxy(int x, int y);
63
+ /*
64
+ highvideo
65
+ insline
66
+ intensevideo
67
+ lowvideo
68
+ movetext
69
+ normvideo
70
+ */
71
+
72
+ void puttext (int left, int top, int right, int bottom, char *str);
73
+
74
+ // Screen Variables
75
+
76
+ /* ScreenCols
77
+ ScreenGetChar
78
+ ScreenGetCursor
79
+ ScreenMode
80
+ ScreenPutChar
81
+ ScreenPutString
82
+ ScreenRetrieve
83
+ ScreenRows
84
+ ScreenSetCursor
85
+ ScreenUpdate
86
+ ScreenUpdateLine
87
+ ScreenVisualBell
88
+ _set_screen_lines */
89
+
90
+ void _setcursortype (int type);
91
+
92
+ void textattr (int _attr);
93
+
94
+ void textbackground (int color);
95
+
96
+ void textcolor (int color);
97
+
98
+ /* textmode */
99
+
100
+ int wherex (void);
101
+
102
+ int wherey (void);
103
+
104
+ /* window */
105
+
106
+
107
+
108
+ /* The code below was part of Mingw's conio.h */
109
+ /*
110
+ * conio.h
111
+ *
112
+ * Low level console I/O functions. Pretty please try to use the ANSI
113
+ * standard ones if you are writing new code.
114
+ *
115
+ * This file is part of the Mingw32 package.
116
+ *
117
+ * Contributors:
118
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
119
+ *
120
+ * THIS SOFTWARE IS NOT COPYRIGHTED
121
+ *
122
+ * This source code is offered for use in the public domain. You may
123
+ * use, modify or distribute it freely.
124
+ *
125
+ * This code is distributed in the hope that it will be useful but
126
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
127
+ * DISCLAMED. This includes but is not limited to warranties of
128
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
129
+ *
130
+ * $Revision: 1.2 $
131
+ * $Author: bellard $
132
+ * $Date: 2005/04/17 13:14:29 $
133
+ *
134
+ */
135
+
136
+ char* _cgets (char*);
137
+ int _cprintf (const char*, ...);
138
+ int _cputs (const char*);
139
+ int _cscanf (char*, ...);
140
+
141
+ int _getch (void);
142
+ int _getche (void);
143
+ int _kbhit (void);
144
+ int _putch (int);
145
+ int _ungetch (int);
146
+
147
+
148
+ int getch (void);
149
+ int getche (void);
150
+ int kbhit (void);
151
+ int putch (int);
152
+ int ungetch (int);
153
+
154
+
155
+ #ifdef __cplusplus
156
+ }
157
+ #endif
158
+
159
+ #endif /* _CONIO_H_ */