utf32 test

John Howard echosoft.llc at gmail.com
Sun Apr 7 00:04:26 UTC 2024


---

testsuites/samples/utf32/init.c | 43 +-

1 file changed, 43 insertions(+), 0 deletion(-)

create mode 100644 testsuites/samples/utf32/init.c



diff --git a/testsuites/samples/utf32/init.c b/testsuites/samples/utf32/init.c

index 83f6342ab3..5ebcdc9ef2 100644

--- /dev/null

+++ b/testsuites/samples/utf32/init.c

@@ -0,0 +1,43 @@

+/*

+ Author: John Howard

+ Date: April 5, 2024

+ Subject: How to compile and execute this test?

+  $ gcc init.c

+  $ mv a.out utf32

+  $ ./utf32

+*/

+

+#include <stdio.h>

+#include “utf32.h”

+

+int main (void)

+{

+ utf32 v;

+ unsigned i;

+

+ printf (“Author: John Howard\n”);

+ v=0xDEADBEEF; printf (“%s %X\n”, “v=0xDEADBEEF; =>”, v);

+ i=v; i=CODEPOINT_(i); printf (“%s %X\n”, “i=v; i=CODEPOINT_(i); =>”, i);

+ v=CONVERT_(v); printf (“%s %X\n”, “v=CONVERT_(v); =>”, v);

+ i=TESTBIT_(v, 0); printf (“%s %X\n”, “i=TESTBIT_(v, 0); =>”, i);

+ v=SETBIT_(v, 0); printf (“%s %X\n”, “v=SETBIT_(v, 0); =>”, v);

+ v=UNSETBIT_(v, 0); printf (“%s %X\n”, “v=UNSETBIT_(v, 0); =>”, v);

+ i=TESTBIT_(v, 31); printf (“%s %X\n”, “i=TESTBIT_(v, 31); =>”, i);

+ v=UNSETBIT_(v, 31); printf (“%s %X\n”, “v=UNSETBIT_(v, 31); =>”, v);

+ v=SETBIT_(v, 31); printf (“%s %X\n”, “v=SETBIT_(v, 31); =>”, v);

+ i=v; i=CODEPOINT_(i); printf (“%s %X\n”, “i=v; i=CODEPOINT_(i); =>”, i);

+ v=CONVERT_(v); printf (“%s %X\n”, “v=CONVERT_(v); =>”, v);

+ i=TESTBIT_(v, 0); printf (“%s %X\n”, “i=TESTBIT_(v, 0); =>”, i);

+ v=UNSETBIT_(v, 0); printf (“%s %X\n”, “v=UNSETBIT_(v, 0); =>”, v);

+ v=SETBIT_(v, 0); printf (“%s %X\n”, “v=SETBIT_(v, 0); =>”, v);

+ i=TESTBIT_(v, 31); printf (“%s %X\n”, “i=TESTBIT_(v, 31); =>”, i);

+ v=UNSETBIT_(v, 31); printf (“%s %X\n”, “v=UNSETBIT_(v, 31); =>”, v);

+ v=SETBIT_(v, 31); printf (“%s %X\n”, “v=SETBIT_(v, 31); =>”, v);

+ i=CODEPOINT_(v); printf (“%s %X\n”, “i=CODEPOINT_(v); =>”, i);

+ printf (“%s %X\n”, “side effect where v is  =>”, v);

+ v=SETMODEL_(v, 0); printf (“%s %X\n”, “v=SETMODEL_(v, 0); VGA 256 color =>”, v);

+ v=SETTEXTURE_(v, 0); printf (“%s %X\n”, “v=SETTEXTURE_(v, 0); =>”, v);

+ v=SETTEXTURE_(v, 255); printf (“%s %X\n”, “v=SETTEXTURE_(v, 255); =>”, v);

+ v=SETMODEL_(v, 7); printf (“%s %X\n”, “v=SETMODEL_(v, 7); CUBITS Fiery =>”, v);

+ v=UNSETBIT_(v, 23); v=UNSETBIT_(v, 22); v=UNSETBIT_(v, 21); v=SETMODEL_(v, 1); printf (“%s %X\n”, “v=SETMODEL_(v, 1); CGA 16 color Blink =>”, v);

+}

-- 

2.42.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240406/9e15a81a/attachment.htm>


More information about the devel mailing list