xrpn 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -5
- data/bin/xrpn +2 -1
- data/xcmd/abs +1 -0
- data/xcmd/acos +1 -0
- data/xcmd/adate +1 -0
- data/xcmd/adateiso +1 -0
- data/xcmd/add +1 -0
- data/xcmd/adv +1 -0
- data/xcmd/agsub +1 -0
- data/xcmd/aleng +1 -0
- data/xcmd/almcat +1 -0
- data/xcmd/almnow +1 -0
- data/xcmd/anum +1 -0
- data/xcmd/aoff +1 -0
- data/xcmd/aon +1 -0
- data/xcmd/appchr +1 -0
- data/xcmd/apprec +1 -0
- data/xcmd/arcl +1 -0
- data/xcmd/arcli +1 -0
- data/xcmd/arclrec +1 -0
- data/xcmd/arot +1 -0
- data/xcmd/ashf +1 -0
- data/xcmd/asin +1 -0
- data/xcmd/asroom +1 -0
- data/xcmd/asto +1 -0
- data/xcmd/asub +1 -0
- data/xcmd/atan +1 -0
- data/xcmd/atime +1 -0
- data/xcmd/atime24 +1 -0
- data/xcmd/atox +1 -0
- data/xcmd/aview +1 -0
- data/xcmd/aviewc +1 -0
- data/xcmd/beep +1 -0
- data/xcmd/bindec +1 -0
- data/xcmd/cat +1 -0
- data/xcmd/cf +1 -0
- data/xcmd/chs +2 -1
- data/xcmd/cla +2 -1
- data/xcmd/clalma +1 -0
- data/xcmd/clalmx +1 -0
- data/xcmd/cld +1 -0
- data/xcmd/clear +1 -0
- data/xcmd/clfl +2 -1
- data/xcmd/clk12 +2 -1
- data/xcmd/clk24 +2 -1
- data/xcmd/clkeys +1 -0
- data/xcmd/clock +1 -0
- data/xcmd/clp +1 -0
- data/xcmd/clralms +1 -0
- data/xcmd/clrg +2 -1
- data/xcmd/clrgx +2 -1
- data/xcmd/cls +2 -1
- data/xcmd/clst +2 -1
- data/xcmd/clx +2 -1
- data/xcmd/cmdadd +2 -1
- data/xcmd/cmddel +2 -1
- data/xcmd/cmdhelp +23 -0
- data/xcmd/correct +1 -0
- data/xcmd/cos +1 -0
- data/xcmd/crflas +2 -1
- data/xcmd/crfld +2 -1
- data/xcmd/cube +2 -1
- data/xcmd/d_r +2 -1
- data/xcmd/date +2 -1
- data/xcmd/dateplus +2 -1
- data/xcmd/ddate +2 -1
- data/xcmd/dec +2 -1
- data/xcmd/decbin +2 -1
- data/xcmd/dechex +2 -1
- data/xcmd/decoct +2 -1
- data/xcmd/deg +2 -1
- data/xcmd/degq +2 -1
- data/xcmd/delchr +2 -1
- data/xcmd/delrec +2 -1
- data/xcmd/divide +2 -1
- data/xcmd/dmy +2 -1
- data/xcmd/dot +1 -0
- data/xcmd/dow +2 -1
- data/xcmd/drop +2 -1
- data/xcmd/dropy +2 -1
- data/xcmd/dse +1 -0
- data/xcmd/ed +1 -0
- data/xcmd/emdir +2 -1
- data/xcmd/emdirx +2 -1
- data/xcmd/emroom +1 -0
- data/xcmd/end +1 -0
- data/xcmd/eng +1 -0
- data/xcmd/enter +2 -1
- data/xcmd/exp +2 -1
- data/xcmd/expx1 +2 -1
- data/xcmd/fact +2 -1
- data/xcmd/fc +1 -0
- data/xcmd/fcc +1 -0
- data/xcmd/fcs +1 -0
- data/xcmd/fix +1 -0
- data/xcmd/fixq +2 -1
- data/xcmd/flsize +1 -0
- data/xcmd/frc +2 -1
- data/xcmd/fs +1 -0
- data/xcmd/fsc +1 -0
- data/xcmd/fss +1 -0
- data/xcmd/geir +2 -1
- data/xcmd/getas +2 -1
- data/xcmd/getfile +2 -1
- data/xcmd/getfilea +2 -1
- data/xcmd/getkey +2 -1
- data/xcmd/getkeyx +2 -1
- data/xcmd/getp +2 -1
- data/xcmd/getr +2 -1
- data/xcmd/getrec +2 -1
- data/xcmd/getrx +2 -1
- data/xcmd/getsub +1 -0
- data/xcmd/getweb +2 -1
- data/xcmd/getx +2 -1
- data/xcmd/grad +2 -1
- data/xcmd/gsb +1 -0
- data/xcmd/gto +1 -0
- data/xcmd/help +2 -1
- data/xcmd/hexdec +2 -1
- data/xcmd/hms +2 -1
- data/xcmd/hmsminus +2 -1
- data/xcmd/hmsplus +2 -1
- data/xcmd/hr +2 -1
- data/xcmd/inschr +2 -1
- data/xcmd/insrec +2 -1
- data/xcmd/int +2 -1
- data/xcmd/invf +1 -0
- data/xcmd/isg +1 -0
- data/xcmd/lastx +2 -1
- data/xcmd/lbl +1 -0
- data/xcmd/lift +2 -1
- data/xcmd/ln +2 -1
- data/xcmd/ln1x +2 -1
- data/xcmd/log +1 -0
- data/xcmd/mdy +2 -1
- data/xcmd/mean +2 -1
- data/xcmd/mod +1 -0
- data/xcmd/multiply +1 -0
- data/xcmd/oct +2 -1
- data/xcmd/octdec +2 -1
- data/xcmd/off +2 -1
- data/xcmd/on +1 -0
- data/xcmd/p_r +2 -1
- data/xcmd/pack +1 -0
- data/xcmd/page +1 -0
- data/xcmd/pagedel +1 -0
- data/xcmd/pageq +2 -1
- data/xcmd/pageswap +2 -1
- data/xcmd/pasn +1 -0
- data/xcmd/pcat +2 -1
- data/xcmd/pclps +2 -1
- data/xcmd/percent +1 -0
- data/xcmd/percentch +1 -0
- data/xcmd/pi +2 -1
- data/xcmd/posa +2 -1
- data/xcmd/posfl +2 -1
- data/xcmd/pow +2 -1
- data/xcmd/pprg +2 -1
- data/xcmd/pprgx +1 -1
- data/xcmd/pra +2 -1
- data/xcmd/prflags +2 -1
- data/xcmd/prompt +2 -1
- data/xcmd/prp +2 -1
- data/xcmd/prregs +2 -1
- data/xcmd/prstk +2 -1
- data/xcmd/prx +2 -1
- data/xcmd/prxm +2 -1
- data/xcmd/pse +2 -1
- data/xcmd/psize +1 -0
- data/xcmd/purfl +2 -1
- data/xcmd/r_d +1 -0
- data/xcmd/r_p +2 -1
- data/xcmd/rad +2 -1
- data/xcmd/rand +2 -1
- data/xcmd/rcl +1 -0
- data/xcmd/rclaf +1 -0
- data/xcmd/rclflag +2 -1
- data/xcmd/rclpt +2 -1
- data/xcmd/rclpta +2 -1
- data/xcmd/rclsw +1 -0
- data/xcmd/rdn +2 -1
- data/xcmd/recip +1 -0
- data/xcmd/regmove +2 -1
- data/xcmd/regswap +2 -1
- data/xcmd/reload +2 -1
- data/xcmd/reszfl +1 -0
- data/xcmd/rnd +2 -1
- data/xcmd/root +2 -1
- data/xcmd/rtn +2 -1
- data/xcmd/rubycmd +2 -1
- data/xcmd/runsw +1 -0
- data/xcmd/rup +2 -1
- data/xcmd/saveas +2 -1
- data/xcmd/savep +2 -1
- data/xcmd/saver +2 -1
- data/xcmd/saverx +2 -1
- data/xcmd/savex +2 -1
- data/xcmd/savexm +2 -1
- data/xcmd/sci +1 -0
- data/xcmd/sdev +2 -1
- data/xcmd/seekpt +2 -1
- data/xcmd/seekpta +2 -1
- data/xcmd/sep +1 -0
- data/xcmd/setaf +1 -0
- data/xcmd/setsw +1 -0
- data/xcmd/sf +1 -0
- data/xcmd/shellcmd +2 -1
- data/xcmd/sign +2 -1
- data/xcmd/sin +1 -0
- data/xcmd/size +1 -0
- data/xcmd/sizeq +1 -0
- data/xcmd/sminus +1 -0
- data/xcmd/splus +1 -0
- data/xcmd/sqr +2 -1
- data/xcmd/sqrt +2 -1
- data/xcmd/sreg +1 -0
- data/xcmd/sregq +2 -1
- data/xcmd/stdivide +1 -0
- data/xcmd/stmultiply +1 -0
- data/xcmd/sto +1 -0
- data/xcmd/stoflag +2 -1
- data/xcmd/stop +2 -1
- data/xcmd/stopsw +1 -0
- data/xcmd/stplus +1 -0
- data/xcmd/stsubtract +1 -0
- data/xcmd/subtract +1 -0
- data/xcmd/sw +1 -0
- data/xcmd/swap +2 -1
- data/xcmd/swpt +1 -0
- data/xcmd/tan +1 -0
- data/xcmd/tenx +2 -1
- data/xcmd/time +2 -1
- data/xcmd/tx +1 -0
- data/xcmd/version +1 -0
- data/xcmd/view +1 -0
- data/xcmd/writefile +2 -1
- data/xcmd/xeq +1 -0
- data/xcmd/xeq0 +2 -1
- data/xcmd/xeqnn +2 -1
- data/xcmd/xeqy +2 -1
- data/xcmd/xf +1 -0
- data/xcmd/xgt0 +2 -1
- data/xcmd/xgteq0 +2 -1
- data/xcmd/xgteqnn +2 -1
- data/xcmd/xgteqy +2 -1
- data/xcmd/xgtnn +2 -1
- data/xcmd/xgty +2 -1
- data/xcmd/xlt0 +2 -1
- data/xcmd/xlteq0 +2 -1
- data/xcmd/xlteqnn +2 -1
- data/xcmd/xlteqy +2 -1
- data/xcmd/xltnn +2 -1
- data/xcmd/xlty +2 -1
- data/xcmd/xmexistq +2 -1
- data/xcmd/xmfileq +2 -1
- data/xcmd/xneq0 +2 -1
- data/xcmd/xneqnn +2 -1
- data/xcmd/xneqy +2 -1
- data/xcmd/xnn +1 -0
- data/xcmd/xtoa +2 -1
- data/xcmd/xy +2 -1
- data/xcmd/xyzalm +1 -0
- data/xlib/_xrpn_version +1 -1
- data/xlib/debug_mode +2 -18
- data/xlib/read_xcmd +4 -4
- data/xrpn.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde19bba9fcbbbce58e8447c363ceff212510f83d86d5b8bfa62f9156e3876e5
|
4
|
+
data.tar.gz: c06bdf45c23fcebfa983205fc4af530c28492e35a32bbe45a0008c8e1145aca9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 487924f70e9fd85bc45b18521fd153d764ea1f94327f175411441886ef986e398154be889976784dbf53b356cdef7074d1462cf95e10d6971158fce6a331ce58
|
7
|
+
data.tar.gz: 34997709120a14cbd8759bfa9c99d91054b7bf5df752951e29540af9d13476e2b9b0d34f68ddae2051fdc80a28d589944ee9f30c95a874e6d97fb2630438a747
|
data/README.md
CHANGED
@@ -16,11 +16,7 @@ XRPN implements indirect addressing, self-modification and features well beyond
|
|
16
16
|
|
17
17
|
You need Ruby installed to get XRPN to work.
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
To install XRPN, simply clone this repository and run the script `INSTALL.sh`. It is only tested on Linux but should work well on Mac OS and BSD systems. If you are on Windows, please tell me if it works in that environment. The install script will put create a symbolic link in your home directory - named ".xrpn" to make it a hidden directory - pointing to the cloned repo. It will also attempt to add a symlink to "~/bin" to make it easy to run XRPN.
|
22
|
-
|
23
|
-
A Ruby Gemfile will be created soon that will make all this a lot easier.
|
19
|
+
To install XRPN, you can do `gem install 'xrpn'` or by cloning this repository and run the script `INSTALL.sh`. It is only tested on Linux but should work well on Mac OS and BSD systems. If you are on Windows, please tell me if it works in that environment. The install script will put create a symbolic link in your home directory - named ".xrpn" to make it a hidden directory - pointing to the cloned repo. It will also attempt to add a symlink to "~/bin" to make it easy to run XRPN. If you install XRPN by cloning this repo, you also need to install the Ruby Gem tty-prompt: `gem install tty-prompt`. If you install via `gem install 'xrpn'`, then this dependency is automatically taken care of. The gem is slower on startup than running XRPN from this repo.
|
24
20
|
|
25
21
|
## Run
|
26
22
|
|
data/bin/xrpn
CHANGED
@@ -10,7 +10,7 @@ require 'open-uri'
|
|
10
10
|
require 'json'
|
11
11
|
require 'tty-prompt'
|
12
12
|
|
13
|
-
$gem = Gem.latest_spec_for("xrpn").gem_dir
|
13
|
+
$gem = Gem.latest_spec_for("xrpn").gem_dir
|
14
14
|
|
15
15
|
# ENSURE DIRs
|
16
16
|
Dir.mkdir(Dir.home + "/.xrpn") unless File.exist?(Dir.home + "/.xrpn")
|
@@ -77,6 +77,7 @@ load(Dir.home+'/.xrpn/theme') if File.exist?(Dir.home+'/.xrpn/theme') # Override
|
|
77
77
|
# THE CORE OF THE RPN PROGRAM
|
78
78
|
@nl = false # Nolift set to false
|
79
79
|
@i = 0 # Counter to prevent infinite loops
|
80
|
+
@debugprompt = TTY::Prompt.new
|
80
81
|
until @p.pc == @p.prg[@p.pg].length do
|
81
82
|
# Enter debug mode if $debug or $prompt is set, else read next program line
|
82
83
|
($debug or $prompt) ? debug_mode : @line = @p.prg[@p.pg][@p.pc]
|
data/xcmd/abs
CHANGED
data/xcmd/acos
CHANGED
data/xcmd/adate
CHANGED
data/xcmd/adateiso
CHANGED
data/xcmd/add
CHANGED
data/xcmd/adv
CHANGED
data/xcmd/agsub
CHANGED
data/xcmd/aleng
CHANGED
data/xcmd/almcat
CHANGED
data/xcmd/almnow
CHANGED
data/xcmd/anum
CHANGED
data/xcmd/aoff
CHANGED
data/xcmd/aon
CHANGED
data/xcmd/appchr
CHANGED
data/xcmd/apprec
CHANGED
data/xcmd/arcl
CHANGED
data/xcmd/arcli
CHANGED
data/xcmd/arclrec
CHANGED
data/xcmd/arot
CHANGED
data/xcmd/ashf
CHANGED
data/xcmd/asin
CHANGED
data/xcmd/asroom
CHANGED
data/xcmd/asto
CHANGED
data/xcmd/asub
CHANGED
data/xcmd/atan
CHANGED
data/xcmd/atime
CHANGED
data/xcmd/atime24
CHANGED
data/xcmd/atox
CHANGED
data/xcmd/aview
CHANGED
data/xcmd/aviewc
CHANGED
data/xcmd/beep
CHANGED
data/xcmd/bindec
CHANGED
data/xcmd/cat
CHANGED
data/xcmd/cf
CHANGED
data/xcmd/chs
CHANGED
data/xcmd/cla
CHANGED
data/xcmd/clalma
CHANGED
data/xcmd/clalmx
CHANGED
data/xcmd/cld
CHANGED
data/xcmd/clear
CHANGED
data/xcmd/clfl
CHANGED
data/xcmd/clk12
CHANGED
data/xcmd/clk24
CHANGED
data/xcmd/clkeys
CHANGED
data/xcmd/clock
CHANGED
data/xcmd/clp
CHANGED
data/xcmd/clralms
CHANGED
data/xcmd/clrg
CHANGED
data/xcmd/clrgx
CHANGED
data/xcmd/cls
CHANGED
data/xcmd/clst
CHANGED
data/xcmd/clx
CHANGED
data/xcmd/cmdadd
CHANGED
data/xcmd/cmddel
CHANGED
data/xcmd/cmdhelp
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
class XRPN
|
2
|
+
# Show help text for the command in Alpha
|
3
|
+
def cmdhelp
|
4
|
+
if $gem
|
5
|
+
c_gem = $gem + "/xcmd/" + @a
|
6
|
+
c = File.read(c_gem) if File.exist?(c_gem)
|
7
|
+
end
|
8
|
+
c_loc = Dir.home + "/.xrpn/xcmd/" + @a
|
9
|
+
c = File.read(c_loc) if File.exist?(c_loc)
|
10
|
+
if c
|
11
|
+
c = c[/.*#.*\n/][2..-2]
|
12
|
+
c = nil if c["vim:"]
|
13
|
+
end
|
14
|
+
if not $cmd.include?(@a.downcase)
|
15
|
+
puts "No such command: #{@a}"
|
16
|
+
else
|
17
|
+
puts c if c
|
18
|
+
puts "No help for the command \"#{@a}\"" unless c
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# vim:ft=ruby:
|
data/xcmd/correct
CHANGED
data/xcmd/cos
CHANGED
data/xcmd/crflas
CHANGED
data/xcmd/crfld
CHANGED
data/xcmd/cube
CHANGED
data/xcmd/d_r
CHANGED
data/xcmd/date
CHANGED
data/xcmd/dateplus
CHANGED
data/xcmd/ddate
CHANGED
data/xcmd/dec
CHANGED
data/xcmd/decbin
CHANGED