aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-04-24 21:54:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-04-24 22:26:26 +0200
commit83e57e6aabcd59b453f0e96695e7ceaf31c1ad6b (patch)
tree01f4c9ea7d3751814e808855434748b522b51ba9 /mod
parentfb9feea5950caec1c9bd7b9a3188cc312bf61956 (diff)
parent82b5ae174ac15bb6c2b7180980da12c1908de7df (diff)
Merge branch 'FormatLine' into next
Diffstat (limited to 'mod')
-rw-r--r--mod/ipcalc.rsc13
1 files changed, 7 insertions, 6 deletions
diff --git a/mod/ipcalc.rsc b/mod/ipcalc.rsc
index ee78378..eaa5c97 100644
--- a/mod/ipcalc.rsc
+++ b/mod/ipcalc.rsc
@@ -13,18 +13,19 @@
:set IPCalc do={
:local Input [ :tostr $1 ];
+ :global FormatLine;
:global IPCalcReturn;
:global PrettyPrint;
:local Values [ $IPCalcReturn $1 ];
$PrettyPrint ( \
- "Address: " . $Values->"address" . "\n" . \
- "Netmask: " . $Values->"netmask" . "\n" . \
- "Network: " . $Values->"network" . "\n" . \
- "HostMin: " . $Values->"hostmin" . "\n" . \
- "HostMax: " . $Values->"hostmax" . "\n" . \
- "Broadcast: " . $Values->"broadcast");
+ [ $FormatLine "Address" ($Values->"address") ] . "\n" . \
+ [ $FormatLine "Netmask" ($Values->"netmask") ] . "\n" . \
+ [ $FormatLine "Network" ($Values->"network") ] . "\n" . \
+ [ $FormatLine "HostMin" ($Values->"hostmin") ] . "\n" . \
+ [ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
+ [ $FormatLine "Broadcast" ($Values->"broadcast") ]);
}
# calculate and return netmask, network, min host, max host and broadcast