base: Remove unused IP address conversion functions
These functions were only used by the SMS code that has been removed already a while ago. It does not make sense anymore to parse them during each boot, and even if we'd still need them, they should not reside in base.fs. Since we're currently do not need them anymore, let's simply remove them completely. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
parent
73ffb4b37f
commit
f3d4426b76
|
@ -582,26 +582,3 @@ defer cursor-off ( -- )
|
|||
|
||||
: $dnumber base @ >r decimal $number r> base ! ;
|
||||
: (.d) base @ >r decimal (.) r> base ! ;
|
||||
|
||||
\ IP address conversion
|
||||
|
||||
: (ipaddr) ( "a.b.c.d" -- FALSE | n1 n2 n3 n4 TRUE )
|
||||
base @ >r decimal
|
||||
over s" 000.000.000.000" comp 0= IF 2drop false r> base ! EXIT THEN
|
||||
[char] . left-parse-string $number IF 2drop false r> base ! EXIT THEN -rot
|
||||
[char] . left-parse-string $number IF 2drop false r> base ! EXIT THEN -rot
|
||||
[char] . left-parse-string $number IF 2drop false r> base ! EXIT THEN -rot
|
||||
$number IF false r> base ! EXIT THEN
|
||||
true r> base !
|
||||
;
|
||||
|
||||
: (ipformat) ( n1 n2 n3 n4 -- str len )
|
||||
base @ >r decimal
|
||||
0 <# # # # [char] . hold drop # # # [char] . hold
|
||||
drop # # # [char] . hold drop # # #s #>
|
||||
r> base !
|
||||
;
|
||||
|
||||
: ipformat ( n1 n2 n3 n4 -- ) (ipformat) type ;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue