Message ID | 1500541342-18962-1-git-send-email-thuth@redhat.com |
---|---|
State | Accepted |
Headers | show |
On Thu, Jul 20, 2017 at 11:02:22AM +0200, Thomas Huth wrote: > They are completely unused, and ishexdigit seems even to be implemented > in a wrong way, thus let's simply remove them. > -: ishexdigit ( char -- true | false ) > - 30 39 between 41 46 between OR 61 66 between OR > -; Huh, yes, wow. For reference: : ishexdigit ( char -- flag ) h# 10 digit nip ; ("digit" is a standard open firmware word). Segher
On 20/07/17 19:02, Thomas Huth wrote: > They are completely unused, and ishexdigit seems even to be implemented > in a wrong way, thus let's simply remove them. Thanks, applied. > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > slof/fs/base.fs | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/slof/fs/base.fs b/slof/fs/base.fs > index 62cfb00..edd474e 100644 > --- a/slof/fs/base.fs > +++ b/slof/fs/base.fs > @@ -59,14 +59,10 @@ CREATE $catpad 400 allot > r> dup $catpad + r> swap r@ move > r> + $catpad swap ; > > -\ WARNING: The following two ($cat-comm & $cat-space) are dirty in a sense > -\ that they add 1 or 2 characters to str1 before executing $cat > +\ WARNING: The following $cat-space is dirty in a sense that it adds one > +\ character to str1 before executing $cat. > \ The ASSUMPTION is that str1 buffer provides that extra space and it is > \ responsibility of the code owner to ensure that > -: $cat-comma ( str2 len2 str1 len1 -- "str1, str2" len1+len2+2 ) > - 2dup + s" , " rot swap move 2+ 2swap $cat > -; > - > : $cat-space ( str2 len2 str1 len1 -- "str1 str2" len1+len2+1 ) > 2dup + bl swap c! 1+ 2swap $cat > ; > @@ -143,10 +139,6 @@ CONSTANT <2constant> > 30 39 between > ; > > -: ishexdigit ( char -- true | false ) > - 30 39 between 41 46 between OR 61 66 between OR > -; > - > \ Variant of $number that defaults to decimal unless "0x" is > \ a prefix > : $dh-number ( addr len -- true | number false ) >
diff --git a/slof/fs/base.fs b/slof/fs/base.fs index 62cfb00..edd474e 100644 --- a/slof/fs/base.fs +++ b/slof/fs/base.fs @@ -59,14 +59,10 @@ CREATE $catpad 400 allot r> dup $catpad + r> swap r@ move r> + $catpad swap ; -\ WARNING: The following two ($cat-comm & $cat-space) are dirty in a sense -\ that they add 1 or 2 characters to str1 before executing $cat +\ WARNING: The following $cat-space is dirty in a sense that it adds one +\ character to str1 before executing $cat. \ The ASSUMPTION is that str1 buffer provides that extra space and it is \ responsibility of the code owner to ensure that -: $cat-comma ( str2 len2 str1 len1 -- "str1, str2" len1+len2+2 ) - 2dup + s" , " rot swap move 2+ 2swap $cat -; - : $cat-space ( str2 len2 str1 len1 -- "str1 str2" len1+len2+1 ) 2dup + bl swap c! 1+ 2swap $cat ; @@ -143,10 +139,6 @@ CONSTANT <2constant> 30 39 between ; -: ishexdigit ( char -- true | false ) - 30 39 between 41 46 between OR 61 66 between OR -; - \ Variant of $number that defaults to decimal unless "0x" is \ a prefix : $dh-number ( addr len -- true | number false )
They are completely unused, and ishexdigit seems even to be implemented in a wrong way, thus let's simply remove them. Signed-off-by: Thomas Huth <thuth@redhat.com> --- slof/fs/base.fs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)