From f3d4426b76f171033fc931f662d9f2bb38875183 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 29 Apr 2016 09:01:16 +0200 Subject: [PATCH] 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 Reviewed-by: Nikunj A Dadhania Signed-off-by: Alexey Kardashevskiy --- 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 ; - -