windows-pr 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/README +5 -1
- data/lib/windows/console.rb +0 -5
- data/lib/windows/msvcrt/io.rb +80 -0
- data/windows-pr.gemspec +1 -1
- metadata +4 -3
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
= 0.6.6 - 3-May-2007
|
2
|
+
* Added the Windows::MSVCRT::IO module.
|
3
|
+
* Removed the SetConsoleCommandHistoryMode method from the Windows::Console
|
4
|
+
module. This was a preliminary function for Vista only, and it has since
|
5
|
+
been removed. Thanks go to Drew Colthorp for the spot.
|
6
|
+
|
1
7
|
= 0.6.5 - 28-Feb-2007
|
2
8
|
* Important bug fixes for the Windows::Directory, Windows::Memory,
|
3
9
|
Windows::Synchronize and Windows::Volume modules. These were either fixes
|
data/README
CHANGED
@@ -39,7 +39,11 @@
|
|
39
39
|
|
40
40
|
Boolean methods automatically perform a check for success or failure. So,
|
41
41
|
instead of having to do something like 'if PathIsRoot(path) > 0' you can
|
42
|
-
just do 'if PathIsRoot(path)'.
|
42
|
+
just do 'if PathIsRoot(path)'. However, I do not add this nicety for the
|
43
|
+
MSVCRT functions that return int's because some functions have multiple
|
44
|
+
return values which you may want to inspect. So, rather than making you
|
45
|
+
guess, I have simply declared that you must inspect return values manually
|
46
|
+
for any MSVCRT module.
|
43
47
|
|
44
48
|
Source files contain related functions, by topic. For example, the
|
45
49
|
clipboard.rb file contains clipboard related functions, such as
|
data/lib/windows/console.rb
CHANGED
@@ -73,7 +73,6 @@ module Windows
|
|
73
73
|
ReadConsoleOutputCharacter = Win32API.new('kernel32', 'ReadConsoleOutputCharacter', 'LPLLP', 'I')
|
74
74
|
ScrollConsoleScreenBuffer = Win32API.new('kernel32', 'ScrollConsoleScreenBuffer', 'LPPLP', 'I')
|
75
75
|
SetConsoleActiveScreenBuffer = Win32API.new('kernel32', 'SetConsoleActiveScreenBuffer', 'L', 'I')
|
76
|
-
SetConsoleCommandHistoryMode = Win32API.new('kernel32', 'SetConsoleCommandHistoryMode', 'L', 'I')
|
77
76
|
SetConsoleCP = Win32API.new('kernel32', 'SetConsoleCP', 'L', 'I')
|
78
77
|
SetConsoleCtrlHandler = Win32API.new('kernel32', 'SetConsoleCtrlHandler', 'PI', 'I')
|
79
78
|
SetConsoleCursorInfo = Win32API.new('kernel32', 'SetConsoleCursorInfo', 'LP', 'I')
|
@@ -229,10 +228,6 @@ module Windows
|
|
229
228
|
SetConsoleActiveScreenBuffer.call(handle) != 0
|
230
229
|
end
|
231
230
|
|
232
|
-
def SetConsoleCommandHistoryMode(flags)
|
233
|
-
SetConsoleCommandHistoryMode.call(flags) != 0
|
234
|
-
end
|
235
|
-
|
236
231
|
def SetConsoleCP(code_page_id)
|
237
232
|
SetConsoleCP.call(code_page_id) != 0
|
238
233
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'Win32API'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
class IO
|
5
|
+
S_IFMT = 0170000 # file type mask
|
6
|
+
S_IFDIR = 0040000 # directory
|
7
|
+
S_IFCHR = 0020000 # character special
|
8
|
+
S_IFIFO = 0010000 # pipe
|
9
|
+
S_IFREG = 0100000 # regular
|
10
|
+
S_IREAD = 0000400 # read permission, owner
|
11
|
+
S_IWRITE = 0000200 # write permission, owner
|
12
|
+
S_IEXEC = 0000100 # execute/search permission, owner
|
13
|
+
|
14
|
+
Clearerr = Win32API.new('msvcrt', 'clearerr', 'I', 'V')
|
15
|
+
Close = Win32API.new('msvcrt', '_close', 'I', 'V')
|
16
|
+
Fclose = Win32API.new('msvcrt', 'fclose', 'I', 'I')
|
17
|
+
Fcloseall = Win32API.new('msvcrt', '_fcloseall', 'V', 'I')
|
18
|
+
Fdopen = Win32API.new('msvcrt', '_fdopen', 'IP', 'I')
|
19
|
+
Feof = Win32API.new('msvcrt', 'feof', 'I', 'I')
|
20
|
+
Fflush = Win32API.new('msvcrt', 'fflush', 'I', 'I')
|
21
|
+
Fileno = Win32API.new('msvcrt', '_fileno', 'I', 'I')
|
22
|
+
Fopen = Win32API.new('msvcrt', 'fopen', 'PP', 'I')
|
23
|
+
Open = Win32API.new('msvcrt', '_open', 'PPI', 'I')
|
24
|
+
Wopen = Win32API.new('msvcrt', '_wopen', 'PPI', 'I')
|
25
|
+
Wfdopen = Win32API.new('msvcrt', '_wfdopen', 'IP', 'I')
|
26
|
+
Wfopen = Win32API.new('msvcrt', '_wfopen', 'PPI', 'I')
|
27
|
+
|
28
|
+
def clearerr(stream)
|
29
|
+
Clearerr.call(stream)
|
30
|
+
end
|
31
|
+
|
32
|
+
def close
|
33
|
+
Close.call(fd)
|
34
|
+
end
|
35
|
+
|
36
|
+
def fclose(stream)
|
37
|
+
Fclose.call(stream)
|
38
|
+
end
|
39
|
+
|
40
|
+
def fcloseall
|
41
|
+
Fcloseall.call
|
42
|
+
end
|
43
|
+
|
44
|
+
def fdopen(fd, mode)
|
45
|
+
Fdopen.call(fd, mode)
|
46
|
+
end
|
47
|
+
|
48
|
+
def feof(stream)
|
49
|
+
Feof.call(stream)
|
50
|
+
end
|
51
|
+
|
52
|
+
def fflush(stream)
|
53
|
+
Fflush.call(stream)
|
54
|
+
end
|
55
|
+
|
56
|
+
def fileno(stream)
|
57
|
+
Fileno.call(stream)
|
58
|
+
end
|
59
|
+
|
60
|
+
def fopen(file, mode)
|
61
|
+
Fopen.call(file, mode)
|
62
|
+
end
|
63
|
+
|
64
|
+
def open(file, flag, mode)
|
65
|
+
Open.call(file, flag, mode)
|
66
|
+
end
|
67
|
+
|
68
|
+
def wopen(file, flag, mode)
|
69
|
+
Wopen.call(file, flag, mode)
|
70
|
+
end
|
71
|
+
|
72
|
+
def wfdopen(fd, mode)
|
73
|
+
Wfdopen.call(fd, mode)
|
74
|
+
end
|
75
|
+
|
76
|
+
def wfopen(file, mode)
|
77
|
+
Wfopen.call(file, mode)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/windows-pr.gemspec
CHANGED
@@ -2,7 +2,7 @@ require "rubygems"
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
4
|
gem.name = "windows-pr"
|
5
|
-
gem.version = "0.6.
|
5
|
+
gem.version = "0.6.6"
|
6
6
|
gem.author = "Daniel J. Berger"
|
7
7
|
gem.email = "djberg96@gmail.com"
|
8
8
|
gem.homepage = "http://www.rubyforge.org/projects/win32utils"
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.0.8
|
3
3
|
specification_version: 1
|
4
4
|
name: windows-pr
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.6.6
|
7
|
+
date: 2007-05-03 00:00:00 -06:00
|
8
8
|
summary: Windows functions and constants predefined via Win32API
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- test/ts_all.rb
|
62
62
|
- lib/windows/msvcrt/buffer.rb
|
63
63
|
- lib/windows/msvcrt/file.rb
|
64
|
+
- lib/windows/msvcrt/io.rb
|
64
65
|
- lib/windows/msvcrt/string.rb
|
65
66
|
- test/CVS
|
66
67
|
- test/tc_clipboard.rb
|