xrpn 1.1.12 → 1.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/xrpn +23 -1
- data/xrpn.gemspec +1 -1
- metadata +2 -3
- data/xlib/optparse +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7a19f8e4bef73ee3b6099d50a418d033d129ecbfb808b7e6ca2e058f1036a74
|
4
|
+
data.tar.gz: 0eda38a9de877944f51b0c7c2407261b60d386edf1a7f7c1e466b9a601bdc01d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c70decfd7068d4defa8b912cbafa7d30fb2595425f2df8a5a5ebf3ca02f775e1a4acca00cf7710413ba3f06907e11fa534778748da752db24e526788bbd0a9a
|
7
|
+
data.tar.gz: 118569c5be20f93115c304b9072dfae4e9c6254ab2fdd7ca78c75d5e8231ec580f035f252528734465b335b609a5d9187507b016ffa571fa1766b3f78425caa1
|
data/bin/xrpn
CHANGED
@@ -10,6 +10,28 @@ require 'open-uri'
|
|
10
10
|
require 'json'
|
11
11
|
require 'tty-prompt'
|
12
12
|
|
13
|
+
# Handle the command line options
|
14
|
+
options = {}
|
15
|
+
optparse = OptionParser.new do |opts|
|
16
|
+
# Set a banner, displayed at the top of the help screen.
|
17
|
+
opts.banner = "Usage: xrpn [options]"
|
18
|
+
|
19
|
+
# Define the options, and what they do
|
20
|
+
opts.on('-f', '--file program', 'Specify the file to process') { |f| $rfile = f }
|
21
|
+
opts.on('-l', '--load program(s)', Array, 'File(s) to load, but not run') { |l| $lfile = l }
|
22
|
+
opts.on('-s', '--state STATE', 'Load a State file') { |s| $sfile = s }
|
23
|
+
opts.on('-c', '--check program', 'Program file to check for errors') { |c| check(c); exit }
|
24
|
+
opts.on('-x', '--X X-value', 'Set initial value in the X register') { |x| @x = x.to_f }
|
25
|
+
opts.on('-y', '--Y Y-value', 'Set initial value in the Y register') { |y| @y = y.to_f }
|
26
|
+
opts.on('-z', '--Z Z-value', 'Set initial value in the Z register') { |z| @z = z.to_f }
|
27
|
+
opts.on('-t', '--T T-value', 'Set initial value in the T register') { |t| @t = t.to_f }
|
28
|
+
opts.on('-a', '--Alpha Alpha-string', 'Set initial string in Alpha') { |a| @a = a.to_s }
|
29
|
+
opts.on('-h', 'Display SHORT help text') { puts opts; exit }
|
30
|
+
opts.on('--help', 'Display LONG help text') { help; puts; puts opts; exit}
|
31
|
+
opts.on('-v', '--version', 'Display the XRPN version number') { xrpn_version; exit }
|
32
|
+
end
|
33
|
+
optparse.parse!
|
34
|
+
|
13
35
|
# ENSURE DIRs
|
14
36
|
Dir.mkdir(Dir.home + "/.xrpn") unless File.exist?(Dir.home + "/.xrpn")
|
15
37
|
["data", "extra", "print", "xcmd", "xlib"].each do |d|
|
@@ -19,11 +41,11 @@ end
|
|
19
41
|
# INITIALIZE
|
20
42
|
$theme = "dark"
|
21
43
|
@x, @y, @z, @t, @a = 0, 0, 0, 0, ""
|
22
|
-
Dir[Dir.home+"/.xrpn/xlib/*"].each { |file| load file } # Read libraries
|
23
44
|
begin
|
24
45
|
require 'xrpn'
|
25
46
|
rescue LoadError
|
26
47
|
end
|
48
|
+
Dir[Dir.home+"/.xrpn/xlib/*"].each { |file| load file } # Read libraries
|
27
49
|
read_cmd # Read XRPN commands
|
28
50
|
@p = XRPN.new($rfile)
|
29
51
|
@p.x, @p.y, @p.z, @p.t, @p.a = @x, @y, @z, @t, @a
|
data/xrpn.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'xrpn'
|
3
|
-
s.version = '1.1.
|
3
|
+
s.version = '1.1.13'
|
4
4
|
s.licenses = ['Unlicense']
|
5
5
|
s.summary = "XRPN - The eXtended RPN (Reverse Polish Notation) programming language"
|
6
6
|
s.description = "A full programming language and environment extending the features of the venerable HP calculator programmable calculators. With XRPN you can accomplish a wide range of modern programming tasks as well as running existing HP-41 FOCAL programs directly. XRPN gives modern life to tens of thousands of old HP calculator programs and opens the possibilities to many, many more."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrpn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-prompt
|
@@ -313,7 +313,6 @@ files:
|
|
313
313
|
- xlib/locate_prg
|
314
314
|
- xlib/numeric
|
315
315
|
- xlib/numformat
|
316
|
-
- xlib/optparse
|
317
316
|
- xlib/read_cmd
|
318
317
|
- xlib/read_state
|
319
318
|
- xlib/save_state
|
data/xlib/optparse
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# Handle the command line options
|
2
|
-
options = {}
|
3
|
-
optparse = OptionParser.new do |opts|
|
4
|
-
# Set a banner, displayed at the top of the help screen.
|
5
|
-
opts.banner = "Usage: xrpn [options]"
|
6
|
-
|
7
|
-
# Define the options, and what they do
|
8
|
-
opts.on('-f', '--file program', 'Specify the file to process') { |f| $rfile = f }
|
9
|
-
opts.on('-l', '--load program(s)', Array, 'File(s) to load, but not run') { |l| $lfile = l }
|
10
|
-
opts.on('-s', '--state STATE', 'Load a State file') { |s| $sfile = s }
|
11
|
-
opts.on('-c', '--check program', 'Program file to check for errors') { |c| check(c); exit }
|
12
|
-
opts.on('-x', '--X X-value', 'Set initial value in the X register') { |x| @x = x.to_f }
|
13
|
-
opts.on('-y', '--Y Y-value', 'Set initial value in the Y register') { |y| @y = y.to_f }
|
14
|
-
opts.on('-z', '--Z Z-value', 'Set initial value in the Z register') { |z| @z = z.to_f }
|
15
|
-
opts.on('-t', '--T T-value', 'Set initial value in the T register') { |t| @t = t.to_f }
|
16
|
-
opts.on('-a', '--Alpha Alpha-string', 'Set initial string in Alpha') { |a| @a = a.to_s }
|
17
|
-
opts.on('-h', 'Display SHORT help text') { puts opts; exit }
|
18
|
-
opts.on('--help', 'Display LONG help text') { help; puts; puts opts; exit}
|
19
|
-
opts.on('-v', '--version', 'Display the XRPN version number') { xrpn_version; exit }
|
20
|
-
end
|
21
|
-
optparse.parse!
|
22
|
-
|
23
|
-
# vim:ft=ruby:
|