From a1ad3385b99a3cdb7a470814c86bcc4653c310e0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 2 Aug 2018 08:03:45 -0400 Subject: [PATCH] factor: more char: --- basis/windows/registry/registry.factor | 2 +- extra/gap-buffer/gap-buffer-tests.factor | 12 ++++++------ .../parser-combinators/parser-combinators.html | 4 ++-- extra/text-to-pdf/text-to-pdf.pdf | 18 +++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/basis/windows/registry/registry.factor b/basis/windows/registry/registry.factor index 4fd46f23be..848565c3f8 100644 --- a/basis/windows/registry/registry.factor +++ b/basis/windows/registry/registry.factor @@ -217,7 +217,7 @@ TUPLE: registry-enum-key ; string-type? [ type DWORD deref REG_MULTI_SZ = [ "\0" join 2 - ] [ 1 ] if [ CHAR: \0 suffix ] times utf16n encode + ] [ 1 ] if [ char: \0 suffix ] times utf16n encode ] when [ hkey value-name type DWORD deref ] dip dup length set-reg-key diff --git a/extra/gap-buffer/gap-buffer-tests.factor b/extra/gap-buffer/gap-buffer-tests.factor index fbf2364cc6..6839ad8024 100644 --- a/extra/gap-buffer/gap-buffer-tests.factor +++ b/extra/gap-buffer/gap-buffer-tests.factor @@ -48,11 +48,11 @@ USING: kernel sequences tools.test gap-buffer strings math ; ! test changing buffer contents { "factory" } -[ "factor" CHAR: y 6 pick insert* >string ] unit-test +[ "factor" char: y 6 pick insert* >string ] unit-test ! test inserting multiple elements in different places. buffer should grow { "refractory" } -[ "factor" CHAR: y 6 pick insert* "re" 0 pick insert* CHAR: r 3 pick insert* >string ] unit-test +[ "factor" char: y 6 pick insert* "re" 0 pick insert* char: r 3 pick insert* >string ] unit-test ! test deleting elements. buffer should shrink { "for" } @@ -60,19 +60,19 @@ USING: kernel sequences tools.test gap-buffer strings math ; ! more testing of nth and set-nth { "raptor" } -[ "factor" CHAR: p 2 pick set-nth 5 over nth 0 pick set-nth >string ] unit-test +[ "factor" char: p 2 pick set-nth 5 over nth 0 pick set-nth >string ] unit-test ! test stack/queue operations { "slaughter" } -[ "laughter" CHAR: s over push-start >string ] unit-test +[ "laughter" char: s over push-start >string ] unit-test { "pantonio" } [ "pant" "onio" over push-end >string ] unit-test -{ CHAR: f "actor" } +{ char: f "actor" } [ "factor" dup pop-start swap >string ] unit-test -{ CHAR: s "pant" } +{ char: s "pant" } [ "pants" dup pop-end swap >string ] unit-test { "end this is the " } diff --git a/extra/parser-combinators/parser-combinators.html b/extra/parser-combinators/parser-combinators.html index 6d449130d0..b1f0448365 100644 --- a/extra/parser-combinators/parser-combinators.html +++ b/extra/parser-combinators/parser-combinators.html @@ -42,8 +42,8 @@ general parsers work and the 'list of sucesses' that are returned as a result.

   (1) : char-a ( inp -- result )
-        0 over string-nth CHAR: a = [
-          1 swap string-tail CHAR: a cons unit delay lunit
+        0 over string-nth char: a = [
+          1 swap string-tail char: a cons unit delay lunit
         ] [
           drop lnil
         ] ifte ;
diff --git a/extra/text-to-pdf/text-to-pdf.pdf b/extra/text-to-pdf/text-to-pdf.pdf
index d5b74e870a..84c05f120d 100644
--- a/extra/text-to-pdf/text-to-pdf.pdf
+++ b/extra/text-to-pdf/text-to-pdf.pdf
@@ -58,14 +58,14 @@ BT
 ( )'
 (: pdf-string \( str -- str' \))'
 (    H{)'
-(        { HEX: 08    "\\\\b"  })'
-(        { HEX: 0c    "\\\\f"  })'
-(        { CHAR: \\n   "\\\\n"  })'
-(        { CHAR: \\r   "\\\\r"  })'
-(        { CHAR: \\t   "\\\\t"  })'
-(        { CHAR: \\\\   "\\\\\\\\" })'
-(        { CHAR: \(    "\\\\\("  })'
-(        { CHAR: \)    "\\\\\)"  })'
+(        { hex: 08    "\\\\b"  })'
+(        { hex: 0c    "\\\\f"  })'
+(        { char: \\n   "\\\\n"  })'
+(        { char: \\r   "\\\\r"  })'
+(        { char: \\t   "\\\\t"  })'
+(        { char: \\\\   "\\\\\\\\" })'
+(        { char: \(    "\\\\\("  })'
+(        { char: \)    "\\\\\)"  })'
 (    } escape-string-by "\(" "\)" surround ;)'
 ( )'
 (: pdf-object \( str n -- str' \))'
@@ -251,4 +251,4 @@ trailer
 >>
 startxref
 4845
-%%EOF
\ No newline at end of file
+%%EOF