[SLOF] [PATCH 1/5] base: Remove unused IP address conversion functions

Thomas Huth thuth at redhat.com
Fri Apr 29 17:01:16 AEST 2016


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 at redhat.com>
---
 slof/fs/base.fs | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/slof/fs/base.fs b/slof/fs/base.fs
index 79faaae..5eb0008 100644
--- a/slof/fs/base.fs
+++ b/slof/fs/base.fs
@@ -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 ;
-
-
-- 
1.8.3.1



More information about the SLOF mailing list