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

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Fri Apr 29 17:32:15 AEST 2016


Thomas Huth <thuth at redhat.com> writes:

> 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>

Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.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
>
> _______________________________________________
> SLOF mailing list
> SLOF at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/slof



More information about the SLOF mailing list