clio 0.0.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. data/CHANGES +66 -0
  2. data/MANIFEST +48 -169
  3. data/README +13 -17
  4. data/RELEASE +8 -0
  5. data/VERSION +1 -0
  6. data/lib/clio/buffer.rb +93 -0
  7. data/lib/clio/commandable.rb +71 -69
  8. data/lib/clio/commandline.rb +429 -230
  9. data/lib/clio/consoleutils.rb +0 -16
  10. data/lib/clio/facets/kernel.rb +13 -0
  11. data/lib/clio/facets/string.rb +25 -0
  12. data/lib/clio/layout.rb +14 -0
  13. data/lib/clio/layout/flow.rb +1 -0
  14. data/lib/clio/layout/line.rb +23 -0
  15. data/lib/clio/layout/list.rb +33 -0
  16. data/lib/clio/layout/split.rb +122 -0
  17. data/lib/clio/layout/stack.rb +17 -0
  18. data/lib/clio/layout/table.rb +46 -0
  19. data/lib/clio/progressbar.rb +189 -210
  20. data/lib/clio/string.rb +116 -109
  21. data/lib/clio/usage.rb +184 -0
  22. data/lib/clio/usage/argument.rb +84 -0
  23. data/lib/clio/usage/command.rb +440 -0
  24. data/lib/clio/usage/interface.rb +122 -0
  25. data/lib/clio/usage/main.rb +165 -0
  26. data/lib/clio/usage/option.rb +251 -0
  27. data/lib/clio/usage/parser.rb +191 -0
  28. data/lib/clio/usage/signature.rb +55 -0
  29. data/meta/abstract +3 -0
  30. data/meta/authors +1 -0
  31. data/meta/created +1 -0
  32. data/meta/homepage +1 -0
  33. data/meta/license +1 -0
  34. data/meta/repository +1 -0
  35. data/meta/summary +1 -0
  36. data/spec/commandline/autousage.rd +56 -0
  37. data/spec/commandline/bracket.rd +64 -0
  38. data/spec/commandline/completion.rd +38 -0
  39. data/spec/commandline/define.rd +44 -0
  40. data/spec/commandline/method.rd +60 -0
  41. data/spec/commandline/parse.rd +72 -0
  42. data/spec/commandline/scenario.rd +81 -0
  43. data/spec/commandline/subclass.rd +54 -0
  44. data/spec/string/unit.rd +58 -0
  45. data/spec/usage/define.rd +44 -0
  46. data/spec/usage/parse.rd +47 -0
  47. metadata +65 -196
  48. data/HISTORY +0 -11
  49. data/METADATA +0 -18
  50. data/NEWS +0 -10
  51. data/admin/config/reap.yaml +0 -30
  52. data/admin/depot/commandline.rb +0 -219
  53. data/admin/depot/multicommand.rb +0 -403
  54. data/admin/depot/test_multicommand.rb +0 -40
  55. data/admin/log/notes.xml +0 -28
  56. data/admin/log/stats.html +0 -25
  57. data/admin/log/syntax.log +0 -0
  58. data/admin/log/testunit.log +0 -16
  59. data/admin/pack/clio-0.0.1.gem +0 -0
  60. data/admin/share/reap/example.rb +0 -7
  61. data/admin/temps/lib/clio/about.rb.erb +0 -4
  62. data/lib/clio/command.rb +0 -296
  63. data/lib/clio/option.rb +0 -36
  64. data/lib/clio/runmode.rb +0 -126
  65. data/test/test_command.rb +0 -42
  66. data/test/test_commandline.rb +0 -83
  67. data/vendor/Console/Console.cpp +0 -1203
  68. data/vendor/Console/Console.rdoc +0 -690
  69. data/vendor/Console/Console_ANSI.rdoc +0 -302
  70. data/vendor/Console/HISTORY.txt +0 -7
  71. data/vendor/Console/INSTALL.txt +0 -18
  72. data/vendor/Console/Makefile +0 -162
  73. data/vendor/Console/README.txt +0 -26
  74. data/vendor/Console/doc/classes/Win32.html +0 -115
  75. data/vendor/Console/doc/classes/Win32/Console.html +0 -650
  76. data/vendor/Console/doc/classes/Win32/Console.src/M000001.html +0 -31
  77. data/vendor/Console/doc/classes/Win32/Console.src/M000002.html +0 -23
  78. data/vendor/Console/doc/classes/Win32/Console.src/M000003.html +0 -23
  79. data/vendor/Console/doc/classes/Win32/Console.src/M000004.html +0 -27
  80. data/vendor/Console/doc/classes/Win32/Console.src/M000005.html +0 -23
  81. data/vendor/Console/doc/classes/Win32/Console.src/M000006.html +0 -28
  82. data/vendor/Console/doc/classes/Win32/Console.src/M000007.html +0 -23
  83. data/vendor/Console/doc/classes/Win32/Console.src/M000008.html +0 -24
  84. data/vendor/Console/doc/classes/Win32/Console.src/M000009.html +0 -44
  85. data/vendor/Console/doc/classes/Win32/Console.src/M000010.html +0 -23
  86. data/vendor/Console/doc/classes/Win32/Console.src/M000011.html +0 -33
  87. data/vendor/Console/doc/classes/Win32/Console.src/M000012.html +0 -26
  88. data/vendor/Console/doc/classes/Win32/Console.src/M000013.html +0 -27
  89. data/vendor/Console/doc/classes/Win32/Console.src/M000014.html +0 -28
  90. data/vendor/Console/doc/classes/Win32/Console.src/M000015.html +0 -23
  91. data/vendor/Console/doc/classes/Win32/Console.src/M000016.html +0 -23
  92. data/vendor/Console/doc/classes/Win32/Console.src/M000017.html +0 -23
  93. data/vendor/Console/doc/classes/Win32/Console.src/M000018.html +0 -29
  94. data/vendor/Console/doc/classes/Win32/Console.src/M000019.html +0 -23
  95. data/vendor/Console/doc/classes/Win32/Console.src/M000020.html +0 -23
  96. data/vendor/Console/doc/classes/Win32/Console.src/M000021.html +0 -28
  97. data/vendor/Console/doc/classes/Win32/Console.src/M000022.html +0 -23
  98. data/vendor/Console/doc/classes/Win32/Console.src/M000023.html +0 -28
  99. data/vendor/Console/doc/classes/Win32/Console.src/M000024.html +0 -35
  100. data/vendor/Console/doc/classes/Win32/Console.src/M000025.html +0 -28
  101. data/vendor/Console/doc/classes/Win32/Console.src/M000026.html +0 -28
  102. data/vendor/Console/doc/classes/Win32/Console.src/M000027.html +0 -28
  103. data/vendor/Console/doc/classes/Win32/Console.src/M000028.html +0 -31
  104. data/vendor/Console/doc/classes/Win32/Console.src/M000029.html +0 -23
  105. data/vendor/Console/doc/classes/Win32/Console.src/M000030.html +0 -23
  106. data/vendor/Console/doc/classes/Win32/Console.src/M000031.html +0 -23
  107. data/vendor/Console/doc/classes/Win32/Console.src/M000032.html +0 -27
  108. data/vendor/Console/doc/classes/Win32/Console.src/M000033.html +0 -27
  109. data/vendor/Console/doc/classes/Win32/Console.src/M000034.html +0 -25
  110. data/vendor/Console/doc/classes/Win32/Console/ANSI.html +0 -103
  111. data/vendor/Console/doc/classes/Win32/Console/ANSI/IO.html +0 -220
  112. data/vendor/Console/doc/classes/Win32/Console/ANSI/IO.src/M000035.html +0 -32
  113. data/vendor/Console/doc/classes/Win32/Console/ANSI/IO.src/M000036.html +0 -205
  114. data/vendor/Console/doc/classes/Win32/Console/ANSI/IO.src/M000037.html +0 -40
  115. data/vendor/Console/doc/classes/Win32/Console/ANSI/IO.src/M000038.html +0 -25
  116. data/vendor/Console/doc/classes/Win32/Console/API.html +0 -758
  117. data/vendor/Console/doc/classes/Win32/Console/API.src/M000039.html +0 -27
  118. data/vendor/Console/doc/classes/Win32/Console/API.src/M000040.html +0 -27
  119. data/vendor/Console/doc/classes/Win32/Console/API.src/M000041.html +0 -27
  120. data/vendor/Console/doc/classes/Win32/Console/API.src/M000042.html +0 -32
  121. data/vendor/Console/doc/classes/Win32/Console/API.src/M000043.html +0 -32
  122. data/vendor/Console/doc/classes/Win32/Console/API.src/M000044.html +0 -28
  123. data/vendor/Console/doc/classes/Win32/Console/API.src/M000045.html +0 -26
  124. data/vendor/Console/doc/classes/Win32/Console/API.src/M000046.html +0 -26
  125. data/vendor/Console/doc/classes/Win32/Console/API.src/M000047.html +0 -27
  126. data/vendor/Console/doc/classes/Win32/Console/API.src/M000048.html +0 -30
  127. data/vendor/Console/doc/classes/Win32/Console/API.src/M000049.html +0 -29
  128. data/vendor/Console/doc/classes/Win32/Console/API.src/M000050.html +0 -27
  129. data/vendor/Console/doc/classes/Win32/Console/API.src/M000051.html +0 -28
  130. data/vendor/Console/doc/classes/Win32/Console/API.src/M000052.html +0 -30
  131. data/vendor/Console/doc/classes/Win32/Console/API.src/M000053.html +0 -27
  132. data/vendor/Console/doc/classes/Win32/Console/API.src/M000054.html +0 -29
  133. data/vendor/Console/doc/classes/Win32/Console/API.src/M000055.html +0 -29
  134. data/vendor/Console/doc/classes/Win32/Console/API.src/M000056.html +0 -28
  135. data/vendor/Console/doc/classes/Win32/Console/API.src/M000057.html +0 -27
  136. data/vendor/Console/doc/classes/Win32/Console/API.src/M000058.html +0 -47
  137. data/vendor/Console/doc/classes/Win32/Console/API.src/M000059.html +0 -32
  138. data/vendor/Console/doc/classes/Win32/Console/API.src/M000060.html +0 -47
  139. data/vendor/Console/doc/classes/Win32/Console/API.src/M000061.html +0 -34
  140. data/vendor/Console/doc/classes/Win32/Console/API.src/M000062.html +0 -32
  141. data/vendor/Console/doc/classes/Win32/Console/API.src/M000063.html +0 -32
  142. data/vendor/Console/doc/classes/Win32/Console/API.src/M000064.html +0 -35
  143. data/vendor/Console/doc/classes/Win32/Console/API.src/M000065.html +0 -26
  144. data/vendor/Console/doc/classes/Win32/Console/API.src/M000066.html +0 -27
  145. data/vendor/Console/doc/classes/Win32/Console/API.src/M000067.html +0 -29
  146. data/vendor/Console/doc/classes/Win32/Console/API.src/M000068.html +0 -27
  147. data/vendor/Console/doc/classes/Win32/Console/API.src/M000069.html +0 -27
  148. data/vendor/Console/doc/classes/Win32/Console/API.src/M000070.html +0 -28
  149. data/vendor/Console/doc/classes/Win32/Console/API.src/M000071.html +0 -27
  150. data/vendor/Console/doc/classes/Win32/Console/API.src/M000072.html +0 -26
  151. data/vendor/Console/doc/classes/Win32/Console/API.src/M000073.html +0 -27
  152. data/vendor/Console/doc/classes/Win32/Console/API.src/M000074.html +0 -31
  153. data/vendor/Console/doc/classes/Win32/Console/API.src/M000075.html +0 -27
  154. data/vendor/Console/doc/classes/Win32/Console/API.src/M000076.html +0 -32
  155. data/vendor/Console/doc/classes/Win32/Console/API.src/M000077.html +0 -27
  156. data/vendor/Console/doc/classes/Win32/Console/API.src/M000078.html +0 -32
  157. data/vendor/Console/doc/classes/Win32/Console/API.src/M000079.html +0 -32
  158. data/vendor/Console/doc/classes/Win32/Console/API.src/M000080.html +0 -32
  159. data/vendor/Console/doc/classes/Win32/Console/Constants.html +0 -360
  160. data/vendor/Console/doc/created.rid +0 -1
  161. data/vendor/Console/doc/files/Console_ANSI_rdoc.html +0 -407
  162. data/vendor/Console/doc/files/Console_cpp.html +0 -104
  163. data/vendor/Console/doc/files/Console_rdoc.html +0 -964
  164. data/vendor/Console/doc/files/lib/Win32/Console/ANSI_rb.html +0 -123
  165. data/vendor/Console/doc/files/lib/Win32/Console_rb.html +0 -297
  166. data/vendor/Console/doc/fr_class_index.html +0 -32
  167. data/vendor/Console/doc/fr_file_index.html +0 -31
  168. data/vendor/Console/doc/fr_method_index.html +0 -106
  169. data/vendor/Console/doc/index.html +0 -24
  170. data/vendor/Console/doc/rdoc-style.css +0 -172
  171. data/vendor/Console/extconf.rb +0 -18
  172. data/vendor/Console/lib/Term/ansicolor.rb +0 -76
  173. data/vendor/Console/lib/Win32/Console.rb +0 -970
  174. data/vendor/Console/lib/Win32/Console/ANSI.rb +0 -305
  175. data/vendor/Console/test/test_cursor.rb +0 -9
  176. data/vendor/Console/test/test_mouse.rb +0 -6
  177. data/vendor/Console/test/test_readinput.rb +0 -62
  178. data/vendor/Console/test/test_readoutput.rb +0 -52
  179. data/vendor/Console/test/test_sendevent.rb +0 -17
  180. data/vendor/Console/test/test_title.rb +0 -14
  181. data/vendor/Console/test/test_write.rb +0 -36
@@ -1,302 +0,0 @@
1
- #
2
- # = NAME
3
- #
4
- # Win32::Console::ANSI - Ruby extension to emulate ANSI console on Win32 system.
5
- #
6
- # = SYNOPSIS
7
- #
8
- # require "Win32::Console::ANSI"
9
- #
10
- # puts "\e[1;34mThis text is bold blue.\e[0m"
11
- # puts "This text is normal.""
12
- # puts "\e[33;45;1mBold yellow on magenta.\e[0m"
13
- # puts "This text is normal."
14
- #
15
- # With the Term::ANSIColor module one increases the readability:
16
- #
17
- # require "Win32::Console::ANSI"
18
- # require "Term::ANSIColor"
19
- #
20
- # puts color 'bold blue'
21
- # puts "This text is bold blue."
22
- # puts color 'reset'
23
- # puts "This text is normal."
24
- # puts colored ("Bold yellow on magenta.", 'bold yellow on_magenta')
25
- # puts "This text is normal."
26
- #
27
- # And even more with Term::ANSIScreen:
28
- #
29
- # require "Win32::Console::ANSI;
30
- # require "Term::ANSIScreen qw/:color :cursor :screen/;
31
- #
32
- # locate 1, 1; puts "@ This is (1,1)", savepos;
33
- # puts locate(24,60), "@ This is (24,60)"; loadpos;
34
- # puts down(2), clline, "@ This is (3,16)";
35
- # setscroll 1, 20;
36
- # color 'black on white'; clline;
37
- # puts "This line is black on white.";
38
- # puts color 'reset'; puts "This text is normal.";
39
- # puts colored ("This text is bold blue.", 'bold blue');
40
- # puts "This text is normal.";
41
- # puts colored ['bold blue'], "This text is bold blue.";
42
- # puts "This text is normal.";
43
- #
44
- # = DESCRIPTION
45
- #
46
- # Windows NT/2000/XP does not support ANSI escape sequences in Win32 Console
47
- # applications. This module emulates an ANSI console for the script which
48
- # uses it.
49
- #
50
- #
51
- # == Escape sequences for Cursor Movement
52
- #
53
- # * \e[#A
54
- #
55
- # CUU: CUrsor Up: Moves the cursor up by the specified number of lines without
56
- # changing columns. If the cursor is already on the top line, this sequence
57
- # is ignored. \e[A is equivalent to \e[1A.
58
- #
59
- # * \e[#B
60
- #
61
- # CUD: CUrsor Down: Moves the cursor down by the specified number of lines
62
- # without changing columns. If the cursor is already on the bottom line,
63
- # this sequence is ignored. \e[B is equivalent to \e[1B.
64
- #
65
- # * \e[#C
66
- #
67
- # CUF: CUrsor Forward: Moves the cursor forward by the specified number of
68
- # columns without changing lines. If the cursor is already in the
69
- # rightmost column, this sequence is ignored. \e[C is equivalent to \e[1C.
70
- #
71
- # * \e[#D
72
- #
73
- # CUB: CUrsor Backward: Moves the cursor back by the specified number of
74
- # columns without changing lines. If the cursor is already in the leftmost
75
- # column, this sequence is ignored. \e[D is equivalent to \e[1D.
76
- #
77
- # * \e[#E
78
- #
79
- # CNL: Cursor Next Line: Moves the cursor down the indicated # of rows, to
80
- # column 1. \e[E is equivalent to \e[1E.
81
- #
82
- # * \e[#F
83
- #
84
- # CPL: Cursor Preceding Line: Moves the cursor up the indicated # of rows,
85
- # to column 1. \e[F is equivalent to \e[1F.
86
- #
87
- # * \e[#G
88
- #
89
- # CHA: Cursor Horizontal Absolute: Moves the cursor to indicated column in
90
- # current row. \e[G is equivalent to \e[1G.
91
- #
92
- # * \e[#;#H
93
- #
94
- # CUP: CUrsor Position: Moves the cursor to the specified position. The first #
95
- # specifies the line number, the second # specifies the column.
96
- # If you do not specify a position, the cursor moves to the
97
- # home position: the upper-left corner of the screen (line 1, column 1).
98
- #
99
- # * \e[#;#f
100
- #
101
- # HVP: Horizontal and Vertical Position.
102
- # Works the same way as the preceding escape sequence.
103
- #
104
- # * \e[s
105
- #
106
- # SCP: Save Cursor Position: Saves the current cursor position. You can move
107
- # the cursor to the saved cursor position by using the Restore Cursor
108
- # Position sequence.
109
- #
110
- # * \e[u
111
- #
112
- # RCP: Restore Cursor Position: Returns the cursor to the position stored
113
- # by the Save Cursor Position sequence.
114
- #
115
- # == Escape sequences for Display Edition
116
- #
117
- # * \e[#J
118
- #
119
- # ED: Erase Display:
120
- #
121
- # * \e[0J
122
- #
123
- # Clears the screen from cursor to end of display. The cursor position is unchanged.
124
- #
125
- # * \e[1J
126
- #
127
- # Clears the screen from start to cursor. The cursor position is unchanged.
128
- #
129
- # * \e[2J
130
- #
131
- # Clears the screen and moves the cursor to the home position (line 1, column 1).
132
- #
133
- # \e[J is equivalent to \e[0J. (Some terminal/emulators respond to \e[J as if
134
- # it were \e[2J. Here, the default is 0; it's the norm)
135
- #
136
- # * \e[#K
137
- #
138
- # EL: Erase Line:
139
- #
140
- # * \e[0K
141
- #
142
- # Clears all characters from the cursor position to the end of the line
143
- # (including the character at the cursor position).
144
- # The cursor position is unchanged.
145
- #
146
- # * \e[1K
147
- #
148
- # Clears all characters from start of line to the cursor position.
149
- # (including the character at the cursor position).
150
- # The cursor position is unchanged.
151
- #
152
- # * \e[2K
153
- #
154
- # Clears all characters of the whole line.
155
- # The cursor position is unchanged.
156
- #
157
- # \e[K is equivalent to \e[0K.
158
- #
159
- # * \e[#L
160
- #
161
- # IL: Insert Lines: The cursor line and all lines below it move down # lines,
162
- # leaving blank space. The cursor position is unchanged. The bottommost #
163
- # lines are lost. \e[L is equivalent to \e[1L.
164
- #
165
- # * \e[#M
166
- #
167
- # DL: Delete Line: The block of # lines at and below the cursor are deleted;
168
- # all lines below them move up # lines to fill in the gap, leaving # blank
169
- # lines at the bottom of the screen. The cursor position is unchanged.
170
- # \e[M is equivalent to \e[1M.
171
- #
172
- # * \e#\@
173
- #
174
- # ICH: Insert CHaracter: The cursor character and all characters to the right
175
- # of it move right # columns, leaving behind blank space.
176
- # The cursor position is unchanged. The rightmost # characters on the line are lost.
177
- #
178
- # * \e[#P
179
- #
180
- # DCH: Delete CHaracter: The block of # characters at and to the right of the
181
- # cursor are deleted; all characters to the right of it move left # columns,
182
- # leaving behind blank space. The cursor position is unchanged.
183
- # \e[P is equivalent to \e[1P.
184
- #
185
- #
186
- # == Escape sequences for Set Graphics Rendition
187
- #
188
- # * \e[#;...;#m
189
- #
190
- # SGM: Set Graphics Mode: Calls the graphics functions specified by the
191
- # following values. These specified functions remain active until the next
192
- # occurrence of this escape sequence. Graphics mode changes the colors and
193
- # attributes of text (such as bold and underline) displayed on the
194
- # screen.
195
- #
196
- # * Text attributes
197
- #
198
- # 0 All attributes off
199
- # 1 Bold on
200
- # 4 Underscore on
201
- # 7 Reverse video on
202
- # 8 Concealed on
203
- #
204
- # 21 Bold off
205
- # 24 Underscore off
206
- # 27 Reverse video off
207
- # 28 Concealed off
208
- #
209
- # * Foreground colors
210
- #
211
- # 30 Black
212
- # 31 Red
213
- # 32 Green
214
- # 33 Yellow
215
- # 34 Blue
216
- # 35 Magenta
217
- # 36 Cyan
218
- # 37 White
219
- #
220
- # * Background colors
221
- #
222
- # 40 Black
223
- # 41 Red
224
- # 42 Green
225
- # 43 Yellow
226
- # 44 Blue
227
- # 45 Magenta
228
- # 46 Cyan
229
- # 47 White
230
- #
231
- # \e[m is equivalent to \e0m.
232
- #
233
- # == Escape sequences for Select Character Set
234
- #
235
- # * \e(U
236
- #
237
- # Select null mapping - straight to character from the codepage of the console.
238
- #
239
- # * \e(K
240
- #
241
- # Select Windows to DOS mapping, if the corresponding map exist; no effect
242
- # otherwise. This is the default mapping (if the map exist, of course). It's
243
- # useful becarequire "one types the script with a Windows-based editor (using a
244
- # Windows codepage) and the script prints its messages on the console using
245
- # another codepage: without translation, the characters with a code greatest
246
- # than 127 are different and the printed messages may be not readable.
247
- #
248
- # The conversion is done by the module Encode if it is installed (it's a
249
- # standard module with Perl5.8, not Ruby yet). Otherwise, the conversion is limited to the
250
- # following couples:
251
- #
252
- # WinLatin1 (cp1252) to DOSLatin1 (cp850)
253
- # WinLatin1 (cp1252) to DOSLatinUS (cp437)
254
- # WinLatin2 (cp1250) to DOSLatin2 (cp852)
255
- # WinCyrillic(cp1251) to DOSCyrillic (cp855)
256
- #
257
- # * \e(#X
258
- #
259
- # This escape sequence is I<not> standard! It's an experimental one, just for
260
- # fun :-)
261
- #
262
- # If <i>and only if</i> the console uses an Unicode police, it is possible to
263
- # change its codepage with this escape sequence. No effect with an ordinary
264
- # "Raster Font". (For Windows NT/2000/XP the currently available Unicode
265
- # console font is the Lucida Console TrueType font.)
266
- # # is the number of the codepage needed, 855 for cp855 for instance.
267
- #
268
- #
269
- # = LIMITATIONS
270
- #
271
- # * Due to DOS-console limitations, the blink mode (text attributes 5 and 25) is not implemented.
272
- #
273
- # = SEE ALSO
274
- #
275
- # <b>Win32::Console</b>, <b>Term::ANSIColor</b>, <b>Term::ANSIScreen</b>.
276
- #
277
- # = AUTHOR
278
- #
279
- # J-L Morel jl_morel@bribes.org
280
- #
281
- # Home page: http://www.bribes.org/perl/wANSIConsole.html
282
- #
283
- # Gonzalo Garramu�o GGarramuno@aol.com Ruby port
284
- #
285
- # = CREDITS
286
- #
287
- # Render unto C�sar the things which are C�sar's...
288
- #
289
- # This module requires the module Win32::Console. Thanks to Aldo Calpini.
290
- #
291
- # The method used to overload the print function is due to Matt Sergeant
292
- # (see his module Win32::ASP).
293
- #
294
- # = COPYRIGHT
295
- #
296
- # Copyright (c) 2004 Gonzalo Garramu�o. All rights reserved.
297
- # Copyright (c) 2003 J-L Morel. All rights reserved.
298
- #
299
- # This program is free software; you can redistribute it and/or modify it under
300
- # the terms of the Artistic License.
301
- #
302
- #
@@ -1,7 +0,0 @@
1
- v1.0 - Added .dup to _printString function to avoid mangling outside
2
- string references. Removed the other (later) .dup call.
3
- Turned of some exceptions that were conflicting with using
4
- the module with pipes or redirections.
5
- v0.8 - Fixed bugs in reading routines, added ruby docs, and
6
- sample test suite.
7
- v0.5 - First public release.
@@ -1,18 +0,0 @@
1
-
2
- To compile and install:
3
-
4
-
5
- Open a windows console.
6
- > vcvars32.bat # to set up microsoft's compiling environment
7
- # this is located in the bin/ directory of the MSVC compiler
8
- > ruby extconf.rb # to create a Makefile
9
- > nmake # to compile
10
- > nmake install # to install
11
-
12
-
13
- To test:
14
-
15
- > cd test
16
- > dir # to see available samples
17
- > ruby [anysample]
18
-
@@ -1,162 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- #### Start of system configuration section. ####
5
-
6
- srcdir = C:/ruby/visualc/Console
7
- topdir = $(rubylibdir)/$(arch)
8
- hdrdir = $(rubylibdir)/$(arch)
9
- VPATH = $(srcdir)
10
-
11
- DESTDIR = c:
12
- prefix = $(DESTDIR)/ruby
13
- exec_prefix = $(prefix)
14
- bindir = $(exec_prefix)/bin
15
- sitelibdir = $(sitedir)/$(ruby_version)
16
- datadir = $(prefix)/share
17
- sitedir = $(prefix)/lib/ruby/site_ruby
18
- sharedstatedir = $(DESTDIR)/etc
19
- archdir = $(rubylibdir)/$(arch)
20
- localstatedir = $(DESTDIR)/var
21
- infodir = $(prefix)/info
22
- oldincludedir = $(DESTDIR)/usr/include
23
- libexecdir = $(exec_prefix)/libexec
24
- compile_dir = $(DESTDIR)/WINDOWS/Escritorio/Programacion/ruby/win32
25
- sbindir = $(exec_prefix)/sbin
26
- includedir = $(prefix)/include
27
- sysconfdir = $(prefix)/etc
28
- sitearchdir = $(sitelibdir)/$(sitearch)
29
- mandir = $(prefix)/man
30
- libdir = $(exec_prefix)/lib
31
- rubylibdir = $(libdir)/ruby/$(ruby_version)
32
-
33
- CC = cl -nologo
34
- LIBRUBY = $(RUBY_SO_NAME).lib
35
- LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
36
- LIBRUBYARG_SHARED = $(LIBRUBY)
37
- LIBRUBYARG_STATIC = $(LIBRUBY_A)
38
-
39
- CFLAGS = -MD -Zi -O2b2xg- -G6
40
- CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -I. -I./.. -I./../missing
41
- CXXFLAGS = $(CFLAGS)
42
- DLDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE)
43
- LDSHARED = cl -nologo -LD
44
- AR = lib -nologo
45
- EXEEXT = .exe
46
-
47
- RUBY_INSTALL_NAME = ruby
48
- RUBY_SO_NAME = msvcrt-ruby18
49
- arch = i386-mswin32
50
- sitearch = i386-msvcrt
51
- ruby_version = 1.8
52
- RUBY = ruby
53
- RM = $(RUBY) -run -e rm -- -f
54
- MAKEDIRS = $(RUBY) -run -e mkdir -- -p
55
- INSTALL_PROG = $(RUBY) -run -e install -- -vpm 0755
56
- INSTALL_DATA = $(RUBY) -run -e install -- -vpm 0644
57
-
58
- #### End of system configuration section. ####
59
-
60
-
61
- LIBPATH = -libpath:"$(libdir)"
62
- DEFFILE = $(TARGET)-$(arch).def
63
-
64
- CLEANFILES =
65
- DISTCLEANFILES = $(DEFFILE)
66
-
67
- target_prefix =
68
- LOCAL_LIBS =
69
- LIBS = $(LIBRUBYARG_SHARED) oldnames.lib user32.lib advapi32.lib wsock32.lib
70
- OBJS = Console.obj
71
- TARGET = Console
72
- DLLIB = $(TARGET).so
73
- STATIC_LIB = $(TARGET).lib
74
-
75
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
76
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
77
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
78
-
79
- CLEANLIBS = "$(TARGET).{lib,exp,il?,tds,map}" $(DLLIB)
80
- CLEANOBJS = "*.{obj,lib,s[ol],pdb,bak}"
81
-
82
- all: $(DLLIB)
83
- static: $(STATIC_LIB)
84
-
85
- clean:
86
- @$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
87
-
88
- distclean: clean
89
- @$(RM) Makefile extconf.h conftest.* mkmf.log
90
- @$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
91
-
92
- realclean: distclean
93
- install: $(RUBYARCHDIR)
94
- install: $(RUBYARCHDIR)/$(DLLIB)
95
- $(RUBYARCHDIR)/$(DLLIB): $(DLLIB) $(RUBYARCHDIR)
96
- @$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
97
- install: $(RUBYLIBDIR)/Win32
98
- install: $(RUBYLIBDIR)/Win32/Console.rb
99
- $(RUBYLIBDIR)/Win32/Console.rb: $(srcdir)/lib/Win32/Console.rb $(RUBYLIBDIR)/Win32
100
- @$(INSTALL_DATA) $(srcdir)/lib/Win32/Console.rb $(RUBYLIBDIR)/Win32
101
- install: $(RUBYLIBDIR)/Win32/Console
102
- install: $(RUBYLIBDIR)/Win32/Console/ANSI.rb
103
- $(RUBYLIBDIR)/Win32/Console/ANSI.rb: $(srcdir)/lib/Win32/Console/ANSI.rb $(RUBYLIBDIR)/Win32/Console
104
- @$(INSTALL_DATA) $(srcdir)/lib/Win32/Console/ANSI.rb $(RUBYLIBDIR)/Win32/Console
105
- install: $(RUBYLIBDIR)/Term
106
- install: $(RUBYLIBDIR)/Term/ansicolor.rb
107
- $(RUBYLIBDIR)/Term/ansicolor.rb: $(srcdir)/lib/Term/ansicolor.rb $(RUBYLIBDIR)/Term
108
- @$(INSTALL_DATA) $(srcdir)/lib/Term/ansicolor.rb $(RUBYLIBDIR)/Term
109
- $(RUBYARCHDIR):
110
- @$(MAKEDIRS) $(RUBYARCHDIR)
111
- $(RUBYLIBDIR)/Win32:
112
- @$(MAKEDIRS) $(RUBYLIBDIR)/Win32
113
- $(RUBYLIBDIR)/Win32/Console:
114
- @$(MAKEDIRS) $(RUBYLIBDIR)/Win32/Console
115
- $(RUBYLIBDIR)/Term:
116
- @$(MAKEDIRS) $(RUBYLIBDIR)/Term
117
-
118
- site-install: install
119
-
120
- .SUFFIXES: .c .cc .m .cxx .cpp .C .obj
121
-
122
- {$(srcdir)}.cc{}.obj:
123
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
124
-
125
- .cc.obj:
126
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
127
-
128
- {$(srcdir)}.cpp{}.obj:
129
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
130
-
131
- .cpp.obj:
132
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
133
-
134
- {$(srcdir)}.cxx{}.obj:
135
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
136
-
137
- .cxx.obj:
138
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
139
-
140
- {$(srcdir)}.C{}.obj:
141
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
142
-
143
- .C.obj:
144
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
145
-
146
- {$(srcdir)}.c{}.obj:
147
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
148
-
149
- .c.obj:
150
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
151
-
152
- $(DLLIB): $(OBJS) $(DEFFILE)
153
- @-$(RM) $@
154
- @-$(RM) $(TARGET).lib
155
- $(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS)
156
-
157
- $(STATIC_LIB): $(OBJS)
158
- $(AR) -machine:x86 -out:$@ $(OBJS)
159
-
160
- $(DEFFILE):
161
- $(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'" > $@
162
-