ruby-termios 0.9.6 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7989540ec17a8b084f9ce330170ca5af65bec771
4
+ data.tar.gz: e3d8d0e57f3c759fda3ca21fbaa902a7ae191466
5
+ SHA512:
6
+ metadata.gz: 179a3a17337203fa718f4655835670fff214645099441c7d54e1ec89e8cb521f2b5221e358abbcf1afc0ef0d4ad4bceb0659e1c0bab9149fac1119fd0f58a087
7
+ data.tar.gz: cee0c2554b0ecd40191ee3d117b2234a2da49956a4b449f81c9d2c824a20a7a1128787200ba0317c912f14324b84b963b2048f7c8dd8fe0fa9e82f0d09906ca9
data/.cvsignore ADDED
@@ -0,0 +1,2 @@
1
+ Makefile
2
+ mkmf.log
data/.gitignore ADDED
@@ -0,0 +1,99 @@
1
+ # Created by https://www.gitignore.io/api/ruby,osx,vim
2
+
3
+ ### Ruby ###
4
+ *.gem
5
+ *.rbc
6
+ *.so
7
+ *.o
8
+ *.bundle
9
+ /.config
10
+ /coverage/
11
+ /InstalledFiles
12
+ /pkg/
13
+ /spec/reports/
14
+ /spec/examples.txt
15
+ /test/tmp/
16
+ /test/version_tmp/
17
+ /tmp/
18
+ /Makefile
19
+ /mkmf.log
20
+
21
+ # Used by dotenv library to load environment variables.
22
+ # .env
23
+
24
+ ## Specific to RubyMotion:
25
+ .dat*
26
+ .repl_history
27
+ build/
28
+ *.bridgesupport
29
+ build-iPhoneOS/
30
+ build-iPhoneSimulator/
31
+
32
+ ## Specific to RubyMotion (use of CocoaPods):
33
+ #
34
+ # We recommend against adding the Pods directory to your .gitignore. However
35
+ # you should judge for yourself, the pros and cons are mentioned at:
36
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
37
+ #
38
+ # vendor/Pods/
39
+
40
+ ## Documentation cache and generated files:
41
+ /.yardoc/
42
+ /_yardoc/
43
+ /doc/
44
+ /rdoc/
45
+
46
+ ## Environment normalization:
47
+ /.bundle/
48
+ /vendor/bundle
49
+ /lib/bundler/man/
50
+
51
+ # for a library or gem, you might want to ignore these files since the code is
52
+ # intended to run in multiple environments; otherwise, check them in:
53
+ Gemfile.lock
54
+ .ruby-version
55
+ .ruby-gemset
56
+
57
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
58
+ .rvmrc
59
+
60
+
61
+ ### OSX ###
62
+ *.DS_Store
63
+ .AppleDouble
64
+ .LSOverride
65
+
66
+ # Icon must end with two \r
67
+ Icon
68
+
69
+ # Thumbnails
70
+ ._*
71
+
72
+ # Files that might appear in the root of a volume
73
+ .DocumentRevisions-V100
74
+ .fseventsd
75
+ .Spotlight-V100
76
+ .TemporaryItems
77
+ .Trashes
78
+ .VolumeIcon.icns
79
+ .com.apple.timemachine.donotpresent
80
+
81
+ # Directories potentially created on remote AFP share
82
+ .AppleDB
83
+ .AppleDesktop
84
+ Network Trash Folder
85
+ Temporary Items
86
+ .apdisk
87
+
88
+
89
+ ### Vim ###
90
+ # swap
91
+ [._]*.s[a-w][a-z]
92
+ [._]s[a-w][a-z]
93
+ # session
94
+ Session.vim
95
+ # temporary
96
+ .netrwhist
97
+ *~
98
+ # auto-generated tag files
99
+ tags
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in termios.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # Ruby-Termios
2
+
3
+ This extension library provides Termios module. It enables you to use
4
+ termios(3) interface.
5
+
6
+ Termios module is simple wrapper of termios(3). It can be included into
7
+ IO-family classes and can extend IO-family objects. In addition, the
8
+ methods can use as module function.
9
+
10
+ ## Installation
11
+
12
+ ### Gem
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ ```ruby
17
+ gem 'ruby-termios', require: 'termios'
18
+ ```
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install ruby-termios
27
+
28
+ ### Make
29
+
30
+ $ ruby ext/extconf.rb
31
+ $ make install
32
+
33
+ ## Development
34
+
35
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
36
+
37
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+
39
+ ## Contributing
40
+
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/arika/ruby-termios.
42
+
43
+
44
+ ## License
45
+
46
+ The gem is available as open source under the terms of the [Ruby's Licens](https://www.ruby-lang.org/en/about/license.txt).
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ require 'rake/extensiontask'
5
+
6
+ task build: :compile
7
+
8
+ Rake::ExtensionTask.new('termios') do |ext|
9
+ ext.ext_dir = 'ext'
10
+ ext.lib_dir = 'lib'
11
+ end
12
+
13
+ task default: [:clobber, :compile]
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'termios'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require 'pry'
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,5 +1,9 @@
1
1
  require 'mkmf'
2
2
 
3
+ Dir.glob('./lib/**/*.rb') do |f|
4
+ $INSTALLFILES << [f, '$(RUBYLIBDIR)', 'lib']
5
+ end
6
+
3
7
  if have_header('termios.h') &&
4
8
  have_header('unistd.h')
5
9
  have_header('sys/ioctl.h')
@@ -834,7 +834,7 @@ Init_termios()
834
834
  line_disciplines = rb_hash_new();
835
835
  line_disciplines_names = rb_ary_new();
836
836
  rb_define_const(mTermios, "LINE_DISCIPLINES", line_disciplines);
837
- rb_define_const(mTermios, "LINE_DISCIPLINE_NAMES", line_disciplines);
837
+ rb_define_const(mTermios, "LINE_DISCIPLINE_NAMES", line_disciplines_names);
838
838
 
839
839
  #define define_flag(hash, flag) \
840
840
  { \
@@ -0,0 +1,3 @@
1
+ module Termios
2
+ VERSION = '1.0.1'
3
+ end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'termios/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'ruby-termios'
8
+ spec.version = Termios::VERSION
9
+ spec.authors = ['akira yamada']
10
+ spec.email = ['akira@arika.org']
11
+
12
+ spec.summary = 'a simple wrapper of termios(3)'
13
+ spec.description = <<-E
14
+ Termios module is simple wrapper of termios(3).
15
+ It can be included into IO-family classes and can extend IO-family objects.
16
+ In addition, the methods can use as module function.
17
+ E
18
+ spec.homepage = 'https://github.com/arika/ruby-termios'
19
+ spec.license = "Ruby's"
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'exe'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+ spec.extensions = ['ext/extconf.rb']
26
+
27
+ spec.add_development_dependency 'bundler', '~> 1.12'
28
+ spec.add_development_dependency 'rake', '~> 10.0'
29
+ spec.add_development_dependency 'rake-compiler'
30
+ end
data/termios.rd ADDED
@@ -0,0 +1,158 @@
1
+ =begin
2
+
3
+ = ruby-termios
4
+
5
+ Ruby-termios enables you to use termios(3) interface.
6
+
7
+
8
+ == Termios module
9
+
10
+ Termios module are simple wrapper for termios(3). It can be included
11
+ into IO-family classes and can extend IO-family objects. In addition,
12
+ the methods can use as module function.
13
+
14
+ === Module Functions
15
+
16
+ --- Termios.tcdrain(io)
17
+ --- Termios.drain(io)
18
+ It calls tcdrain(3) for ((|io|)).
19
+
20
+ --- Termios.tcflow(io, action)
21
+ --- Termios.flow(io, action)
22
+ It calls tcflow(3) for ((|io|)).
23
+
24
+ --- Termios.tcflush(io, queue_selector)
25
+ --- Termios.flush(io, queue_selector)
26
+ It calls tcflush(3) for ((|io|)).
27
+
28
+ --- Termios.tcgetattr(io)
29
+ --- Termios.getattr(io)
30
+ It calls tcgetattr(3) for ((|io|)).
31
+
32
+ --- Termios.tcgetpgrp(io)
33
+ --- Termios.getpgrp(io)
34
+ It calls tcgetpgrp(3) for ((|io|)).
35
+
36
+ --- Termios.tcsendbreak(io, duration)
37
+ --- Termios.sendbreak(io, duration)
38
+ It calls tcsendbreak(3) for ((|io|)).
39
+
40
+ --- Termios.tcsetattr(io, flag, termios)
41
+ --- Termios.setattr(io, flag, termios)
42
+ It calls tcsetattr(3) for ((|io|)).
43
+
44
+ --- Termios.tcsetpgrp(io, pgrpid)
45
+ --- Termios.setpgrp(io, pgrpid)
46
+ It calls tcsetpgrp(3) for ((|io|)).
47
+
48
+ --- Termios.new_termios
49
+ It is alias of ((<Termios::Termios.new>)).
50
+
51
+ === Methods
52
+
53
+ The methods can use for objects which include Termios module or are
54
+ extended by Termios module.
55
+
56
+ --- tcdrain
57
+ It calls tcdrain(3) for ((|self|)).
58
+
59
+ --- tcflow
60
+ It calls tcflow(3) for ((|self|)).
61
+
62
+ --- tcflush(queue_selector)
63
+ It calls tcflush(3) for ((|self|)).
64
+
65
+ --- tcgetattr
66
+ It calls tcgetattr(3) for ((|self|)).
67
+
68
+ --- tcgetpgrp
69
+ It calls tcgetpgrp(3) for ((|self|)).
70
+
71
+ --- tcsendbreak(duratiofn)
72
+ It calls tcsendbreak(3) for ((|self|)).
73
+
74
+ --- tcsetattr(flag, termios)
75
+ It calls tcsetattr(3) for ((|self|)).
76
+
77
+ --- tcsetpgrp(pgrpid)
78
+ It calls tcsetpgrp(3) for ((|self|)).
79
+
80
+ === Constants
81
+
82
+ Many constants which are derived from "termios.h" are defined on Termios
83
+ module.
84
+
85
+ IFLAGS, OFLAGS, CFLAGS and LFLAGS are Hash object. They contains Symbols of
86
+ constants for c_iflag, c_oflag, c_cflag and c_lflag.
87
+
88
+ CCINDEX and BAUDS are Hash object too. They contains Symbols of constats for
89
+ c_cc or ispeed and ospeed.
90
+
91
+ == Termios::Termios class
92
+
93
+ A wrapper class for "struct termios" in C.
94
+
95
+ === Class Methods
96
+
97
+ --- Termios::Termios.new
98
+ It creates a new Termios::Termios object.
99
+
100
+ === Instance Methods
101
+
102
+ --- iflag
103
+ --- c_iflag
104
+ It returns value of c_iflag.
105
+
106
+ --- iflag=(flag)
107
+ --- c_iflag=(flag)
108
+ It sets flag to c_iflag.
109
+
110
+ --- oflag
111
+ --- c_oflag
112
+ It returns value of c_oflag.
113
+
114
+ --- oflag=(flag)
115
+ --- c_oflag=(flag)
116
+ It sets flag to c_oflag.
117
+
118
+ --- cflag
119
+ --- c_cflag
120
+ It returns value of c_cflag.
121
+
122
+ --- cflag=(flag)
123
+ --- c_cflag=(flag)
124
+ It sets flag to c_cflag.
125
+
126
+ --- lflag
127
+ --- c_lflag
128
+ It returns value of c_lflag.
129
+
130
+ --- lflag=(flag)
131
+ --- c_lflag=(flag)
132
+ It sets flag to c_lflag.
133
+
134
+ --- cc
135
+ --- c_cc
136
+ It returns values of c_cc.
137
+
138
+ --- cc=(cc_ary)
139
+ --- c_cc=(cc_ary)
140
+ It sets cc_ary to c_cc.
141
+
142
+ --- ispeed
143
+ --- c_ispeed
144
+ It returns c_ispeeed.
145
+
146
+ --- ispeed=(speed)
147
+ --- c_ispeed=(speed)
148
+ It sets speed to c_ispeed.
149
+
150
+ --- ospeed
151
+ --- c_ospeed
152
+ It returns c_ospeeed.
153
+
154
+ --- ospeed=(speed)
155
+ --- c_ospeed=(speed)
156
+ It sets speed to c_ospeed.
157
+
158
+ =end
metadata CHANGED
@@ -1,81 +1,109 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-termios
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - akira yamada
8
8
  autorequire:
9
- bindir: false
9
+ bindir: exe
10
10
  cert_chain: []
11
-
12
- date: 2009-08-28 00:00:00 -07:00
13
- default_executable:
14
- dependencies: []
15
-
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake-compiler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
16
55
  description: |
17
- Termios module is simple wrapper of termios(3). It can be included into
18
- IO-family classes and can extend IO-family objects. In addition, the methods
19
- can use as module function.
20
-
21
- email: akira@arika.org
56
+ Termios module is simple wrapper of termios(3).
57
+ It can be included into IO-family classes and can extend IO-family objects.
58
+ In addition, the methods can use as module function.
59
+ email:
60
+ - akira@arika.org
22
61
  executables: []
23
-
24
- extensions:
25
- - extconf.rb
26
- extra_rdoc_files:
27
- - README
28
- - ChangeLog
29
- files:
30
- - README
31
- - ChangeLog
32
- - test/test0.rb
33
- - lib/termios.rb
34
- - examples/secret_input1.rb
35
- - examples/modem_check2.rb
62
+ extensions:
63
+ - ext/extconf.rb
64
+ extra_rdoc_files: []
65
+ files:
66
+ - ".cvsignore"
67
+ - ".gitignore"
68
+ - Gemfile
69
+ - README.md
70
+ - Rakefile
71
+ - bin/console
72
+ - bin/setup
36
73
  - examples/modem_check0.rb
37
- - examples/secret_input2.rb
38
74
  - examples/modem_check1.rb
39
- - termios.c
40
- has_rdoc: true
41
- homepage: http://arika.org/ruby/termios
42
- licenses: []
43
-
75
+ - examples/modem_check2.rb
76
+ - examples/secret_input1.rb
77
+ - examples/secret_input2.rb
78
+ - ext/extconf.rb
79
+ - ext/termios.c
80
+ - lib/termios.rb
81
+ - lib/termios/version.rb
82
+ - ruby-termios.gemspec
83
+ - termios.rd
84
+ homepage: https://github.com/arika/ruby-termios
85
+ licenses:
86
+ - Ruby's
87
+ metadata: {}
44
88
  post_install_message:
45
- rdoc_options:
46
- - --title
47
- - ruby-termios documentation
48
- - --charset
49
- - utf-8
50
- - --opname
51
- - index.html
52
- - --line-numbers
53
- - --main
54
- - README
55
- - --inline-source
56
- - --exclude
57
- - ^(examples|extras)/
58
- require_paths:
89
+ rdoc_options: []
90
+ require_paths:
59
91
  - lib
60
- - .
61
- required_ruby_version: !ruby/object:Gem::Requirement
62
- requirements:
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
63
94
  - - ">="
64
- - !ruby/object:Gem::Version
65
- version: "0"
66
- version:
67
- required_rubygems_version: !ruby/object:Gem::Requirement
68
- requirements:
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
69
99
  - - ">="
70
- - !ruby/object:Gem::Version
71
- version: "0"
72
- version:
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
73
102
  requirements: []
74
-
75
- rubyforge_project: termios
76
- rubygems_version: 1.3.5
103
+ rubyforge_project:
104
+ rubygems_version: 2.5.1
77
105
  signing_key:
78
- specification_version: 2
106
+ specification_version: 4
79
107
  summary: a simple wrapper of termios(3)
80
108
  test_files: []
81
-
109
+ has_rdoc:
data/ChangeLog DELETED
@@ -1,146 +0,0 @@
1
- 2009-08-28 akira yamada <akira@arika.org>
2
-
3
- * version 0.9.6.
4
-
5
- 2009-02-05 akira yamada <akira@arika.org>
6
-
7
- * termios.c: added RDoc.
8
-
9
- * README: converted to RDoc.
10
-
11
- * ruby-termios.gemspec: added.
12
-
13
- 2008-10-23 akira yamada <akira@arika.org>
14
-
15
- * termios.c: added IOCTL_COMMANDS, IOCTL_COMMAND_NAMES,
16
- MODEM_SIGNALS, MODEM_SIGNAL_NAMES, PTY_PACKET_OPTIONS,
17
- PTY_PACKET_OPTION_NAMES, LINE_DISCIPLINES and
18
- LINE_DISCIPLINE_NAMES.
19
-
20
- This change is contributed from Chris Hoffman
21
- <chrishoffman_cardialife.com>.
22
-
23
- * termios.c, extconf.rb: included <sys/ioctl.h>.
24
-
25
- 2008-06-03 akira yamada <akira@arika.org>
26
-
27
- * extconf.rb, termios.c: adjusted rb_io_t/OpenFile checks for Ruby
28
- 1.8.7.
29
-
30
- 2007-05-30 akira yamada <akira@arika.org>
31
-
32
- * extconf.rb: rb_io_t test isn't needed for Ruby 1.6.
33
-
34
- * version 0.9.5.
35
-
36
- 2007-05-29 Tanaka Akira <akr@fsij.org>
37
-
38
- * extconf.rb: check rb_io_t.
39
- check fd member in OpenFile.
40
-
41
- * termios.c: support Ruby 1.9.
42
- use unsigned long for flags bigger than Fixnum such as CRTSCTS.
43
- use rb_sys_fail instead of rb_raise(rb_eRuntimeError).
44
- (Termios_to_termios): use rb_ary_entry to access cc_ary to avoid SEGV.
45
- (termios_tcgetpgrp): use pid_t.
46
- (termios_tcsetpgrp): ditto.
47
- (Termios::Termios#dup): defined to duplicate cc.
48
- (Termios::Termios#clone): ditto.
49
- (Termios::POSIX_VDISABLE): defined.
50
- (Termios::CCINDEX_NAMES): defined.
51
- (Termios::IFLAG_NAMES): defined.
52
- (Termios::OFLAG_NAMES): defined.
53
- (Termios::OFLAG_CHOICES): defined.
54
- (Termios::CFLAG_NAMES): defined.
55
- (Termios::CFLAG_CHOICES): defined.
56
- (Termios::LFLAG_NAMES): defined.
57
- (Termios::BAUD_NAMES): defined.
58
- (Termios::IUTF8): defined.
59
- (Termios::VDSUSP): defined for 4.4BSD.
60
- (Termios::VSTATUS): defined for 4.4BSD.
61
- (Termios::MDMBUF): defined for 4.4BSD.
62
-
63
- * lib/termios.rb: new file. inspect and pretty_print defined.
64
-
65
- 2005-05-30 akira yamada <akira@arika.org>
66
-
67
- * termios.c: applied a patch which makes ruby-termios work under
68
- both ruby1.8 and ruby1.9. [ruby-talk:143781]
69
- Thanks to: Akr.
70
-
71
- 2002-10-13 akira yamada <akira@arika.org>
72
-
73
- * termios.c
74
- (termios_set_ispeed): fixed typo.
75
- (termios_initialize): 0-cleared "@cc".
76
- (Termios_to_termios): unknown cc-values are treated as 0.
77
-
78
- * examples/modem_check.rb: renamed examples/modem_check1.rb.
79
-
80
- * examples/modem_check0.rb, exampes/modem_check2.rb: new.
81
-
82
- * version 0.9.4.
83
-
84
- 2002-10-12 akira yamada <akira@arika.org>
85
-
86
- * termios.c: revoked Termios::Termios#set_cc and removed some methods
87
- such as Termios::Termios#iflag etc. they became attr_reader.
88
-
89
- * version 0.9.3.
90
-
91
- 2002-10-12 akira yamada <akira@arika.org>
92
-
93
- * termios.c
94
- (termios_cc): accepts index of c_cc.
95
- (termios_set_a_cc): new function for Termios::Termios#set_cc.
96
- (Init_termios): added new constants Termios::CCINDEX, Termios::IFLAGS,
97
- Termios::OFLAGS, Termios::CFLAGS, Termios::LFLAGS and Termios::BAUD.
98
-
99
- * examples/modem_check.rb: it did not work. rewrited.
100
-
101
- * test/test0.rb: rewrited.
102
-
103
- * version 0.9.2.
104
-
105
- 2002-10-10 akira yamada <akira@arika.org>
106
-
107
- * termios.c
108
- (Init_termios): revived Termios::Termios#c_foo/c_foo= for backward
109
- compatibility.
110
-
111
- 2002-09-25 akira yamada <akira@arika.org>
112
-
113
- * termios.c
114
- (termios_clone): new method "clone" for Termios::Termios.
115
- (Init_termios): revived Termios.new_termios for backward
116
- compatibility.
117
-
118
- * version 0.9.1.
119
-
120
- 2002-09-25 akira yamada <akira@arika.org>
121
-
122
- * Termios module can be included to IO classes and can extend IO
123
- objects.
124
-
125
- * now Termios::Termios is rb_cObject class.
126
-
127
- * version 0.9.0.
128
-
129
- Wed Nov 15 19:03:06 2000 akira yamada <akira@arika.org>
130
-
131
- * renamed to ruby-termios.
132
-
133
- Wed Dec 1 21:27:23 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
134
-
135
- * termios.c: removed c_line.
136
- * test1.rb: removed c_line.
137
- * test3.rb: stty -echo.
138
-
139
- Fri Feb 19 00:05:20 1999 akira yamada <akira@linux.or.jp>
140
-
141
- * termios.c (Init_termios): now sTermios is hidden.
142
- * test2.rb: rewrited.
143
-
144
- Fri Thu 18 02:24:21 1999 akira yamada <akira@linux.or.jp>
145
-
146
- * development started.
data/README DELETED
@@ -1,80 +0,0 @@
1
- = termios (ruby-termios) - a simple wrapper of termios(3)
2
-
3
- == Description
4
-
5
- This extension library provides Termios module. It enables you to use
6
- termios(3) interface.
7
-
8
- Termios module is simple wrapper of termios(3). It can be included into
9
- IO-family classes and can extend IO-family objects. In addition, the
10
- methods can use as module function.
11
-
12
- == Requires
13
-
14
- This extension library can use with Ruby 1.6, 1.8 or 1.9. (Ruby-termios can
15
- build with Ruby 1.6 but it has not yet been tested enough.)
16
-
17
- == Installation
18
-
19
- ruby extconf.rb
20
- make
21
- make install
22
-
23
- == Copyright
24
-
25
- Ruby-termios for Ruby is copyrighted free software by akira yamada
26
- <akira@arika.org>. You can redistribute it and/or modify it under either
27
- the terms of the GPL, or the conditions below:
28
-
29
- 1. You may make and give away verbatim copies of the source form of the
30
- software without restriction, provided that you duplicate all of the
31
- original copyright notices and associated disclaimers.
32
-
33
- 2. You may modify your copy of the software in any way, provided that
34
- you do at least ONE of the following:
35
-
36
- a) place your modifications in the Public Domain or otherwise
37
- make them Freely Available, such as by posting said
38
- modifications to Usenet or an equivalent medium, or by allowing
39
- the author to include your modifications in the software.
40
-
41
- b) use the modified software only within your corporation or
42
- organization.
43
-
44
- c) rename any non-standard executables so the names do not conflict
45
- with standard executables, which must also be provided.
46
-
47
- d) make other distribution arrangements with the author.
48
-
49
- 3. You may distribute the software in object code or executable
50
- form, provided that you do at least ONE of the following:
51
-
52
- a) distribute the executables and library files of the software,
53
- together with instructions (in the manual page or equivalent)
54
- on where to get the original distribution.
55
-
56
- b) accompany the distribution with the machine-readable source of
57
- the software.
58
-
59
- c) give non-standard executables non-standard names, with
60
- instructions on where to get the original software distribution.
61
-
62
- d) make other distribution arrangements with the author.
63
-
64
- 4. You may modify and include the part of the software into any other
65
- software (possibly commercial). But some files in the distribution
66
- are not written by the author, so that they are not under this terms.
67
- They are gc.c(partly), utils.c(partly), regex.[ch], fnmatch.[ch],
68
- glob.c, st.[ch] and some files under the ./missing directory. See
69
- each file for the copying condition.
70
-
71
- 5. The scripts and library files supplied as input to or produced as
72
- output from the software do not automatically fall under the
73
- copyright of the software, but belong to whomever generated them,
74
- and may be sold commercially, and may be aggregated with this
75
- software.
76
-
77
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
78
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
79
- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
80
- PURPOSE.
data/test/test0.rb DELETED
@@ -1,29 +0,0 @@
1
- require 'termios'
2
-
3
- def dump_termios(tio, banner)
4
- puts banner
5
- puts " ispeed = #{Termios::BAUDS[tio.ispeed]}, ospeed = #{Termios::BAUDS[tio.ospeed]}"
6
- ["iflag", "oflag", "cflag", "lflag"].each do |x|
7
- flag = tio.send(x)
8
- flags = []
9
- eval("Termios::#{x.upcase}S").each do |f, sym|
10
- flags << sym.to_s if flag & f != 0
11
- end
12
- puts " #{x} = #{flags.sort.join(' | ')}"
13
- end
14
- print " cc ="
15
- cc = tio.cc
16
- cc.each_with_index do |x, idx|
17
- print " #{Termios::CCINDEX[idx]}=#{x}" if Termios::CCINDEX.include?(idx)
18
- end
19
- puts
20
- end
21
-
22
- tio = Termios::getattr($stdin)
23
- dump_termios(tio, "STDIN:")
24
- Termios::setattr($stdin, Termios::TCSANOW, tio)
25
- dump_termios(tio, "STDIN:")
26
-
27
- puts
28
- puts " pid = #{$$}"
29
- puts "pgrp = #{Termios::getpgrp($stdin)}"