From 741804eda6a604f9603de7472df46f6d24407fa3 Mon Sep 17 00:00:00 2001 From: zerico <71151164+ZERICO2005@users.noreply.github.com> Date: Mon, 2 Feb 2026 21:40:01 -0700 Subject: [PATCH] fixed libc whitespace --- .../fontlibc/example/src/fonts/fonts.c | 2 +- .../graphx/text_custom/src/main.c | 256 +++++++++--------- .../srldrvce/srl_echo/src/main.c | 24 +- src/ce/include/ti/flags.h | 2 +- src/ce/include/ti/getcsc.h | 4 +- src/ce/include/ti/screen.h | 2 +- src/fileioc/fileioc.h | 2 +- src/fontlibc/fontlibc.h | 2 +- src/graphx/graphx.h | 2 +- src/keypadc/keypadc.h | 2 +- src/libc/acosl.c | 16 +- src/libc/asinf.c | 4 +- src/libc/asinl.c | 4 +- src/libc/expf.c | 6 +- src/libc/expl.c | 8 +- src/libc/frexpl.c | 6 +- src/libc/hypot3f.c | 2 +- src/libc/lgammal.c | 2 +- src/libc/logf.c | 2 +- src/libc/logl.c | 2 +- src/libc/powf.c | 8 +- src/libc/powl.c | 8 +- src/libc/sinhl.c | 12 +- src/libc/sqrtf.c | 8 +- src/libc/sscanf.c | 8 +- src/libc/tanhf.c | 2 +- src/libc/tanl.c | 18 +- src/softfloat/include/softfloat.h | 2 +- src/softfloat/s_mulAddF64.c | 2 +- .../float64_arithmetic/src/main.cpp | 18 +- test/fontlibc/glyph_width/src/fonts/fonts.c | 2 +- test/regression/bug0000/src/main.c | 14 +- 32 files changed, 226 insertions(+), 226 deletions(-) diff --git a/examples/library_examples/fontlibc/example/src/fonts/fonts.c b/examples/library_examples/fontlibc/example/src/fonts/fonts.c index f2a2532e2..ad9e259fa 100644 --- a/examples/library_examples/fontlibc/example/src/fonts/fonts.c +++ b/examples/library_examples/fontlibc/example/src/fonts/fonts.c @@ -3,7 +3,7 @@ /* This contains the raw data for the font. */ static const unsigned char test_font_data[] = { - #include "testfont.inc" + #include "testfont.inc" }; /* However, C89 does not allow us to typecast a byte array into a diff --git a/examples/library_examples/graphx/text_custom/src/main.c b/examples/library_examples/graphx/text_custom/src/main.c index d8a4445ad..d7f4c0bc4 100644 --- a/examples/library_examples/graphx/text_custom/src/main.c +++ b/examples/library_examples/graphx/text_custom/src/main.c @@ -83,132 +83,132 @@ static unsigned char font8x8_spacing[128] = static unsigned char font8x8[128 * 8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 000 (.) - 0x20, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, // Char 001 (.) - 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, // Char 002 (.) - 0x7e, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, // Char 003 (.) - 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, // Char 004 (.) - 0x00, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x7c, 0x38, // Char 005 (.) - 0x7c, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, // Char 006 (.) - 0x7c, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, // Char 007 (.) - 0x00, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, // Char 008 (.) - 0xff, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, // Char 009 (.) - 0x00, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, // Char 010 (.) - 0xff, 0x0f, 0x07, 0x0f, 0x7d, 0xcc, 0xcc, 0xcc, // Char 011 (.) - 0x78, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, // Char 012 (.) - 0x18, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x70, 0xf0, // Char 013 (.) - 0xe0, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x67, 0xe6, // Char 014 (.) - 0xc0, 0x99, 0x5a, 0x3c, 0xe7, 0xe7, 0x3c, 0x5a, // Char 015 (.) - 0x99, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, // Char 016 (.) - 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, // Char 017 (.) - 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x7e, 0x3c, // Char 018 (.) - 0x18, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, // Char 019 (.) - 0x00, 0x7f, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, // Char 020 (.) - 0x00, 0x3e, 0x63, 0x38, 0x6c, 0x6c, 0x38, 0xcc, // Char 021 (.) - 0x78, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, // Char 022 (.) - 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x7e, 0x3c, 0x18, // Char 023 (.) - 0xff, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, // Char 024 (.) - 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, // Char 025 (.) - 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, // Char 026 (.) - 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, // Char 027 (.) - 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, // Char 028 (.) - 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, // Char 029 (.) - 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, // Char 030 (.) - 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, // Char 031 (.) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 032 ( ) - 0x00, 0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, // Char 033 (!) - 0x00, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, // Char 034 (") - 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, // Char 035 (#) - 0x00, 0x30, 0x7c, 0xc0, 0x78, 0x0c, 0xf8, 0x30, // Char 036 ($) - 0x00, 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, // Char 037 (%) - 0x00, 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, // Char 038 (&) - 0x00, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, // Char 039 (') - 0x00, 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, // Char 040 (() - 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, // Char 041 ()) - 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, // Char 042 (*) - 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, // Char 043 (+) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, // Char 044 (,) - 0x60, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // Char 045 (-) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, // Char 046 (.) - 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, // Char 047 (/) - 0x00, 0xfe, 0x86, 0x8e, 0xd2, 0xe2, 0xc2, 0xfe, // Char 048 (0) - 0x00, 0x10, 0x10, 0x10, 0x30, 0x30, 0x30, 0x30, // Char 049 (1) - 0x00, 0x3c, 0x46, 0x06, 0x0c, 0x30, 0x60, 0x7e, // Char 050 (2) - 0x00, 0x3c, 0x46, 0x06, 0x1c, 0x02, 0x62, 0x7c, // Char 051 (3) - 0x00, 0x4c, 0x4c, 0x44, 0x44, 0x7c, 0x0c, 0x0c, // Char 052 (4) - 0x00, 0x7e, 0x40, 0x7c, 0x02, 0x02, 0x62, 0x7c, // Char 053 (5) - 0x00, 0x3c, 0x66, 0x40, 0x7c, 0x62, 0x62, 0x3c, // Char 054 (6) - 0x00, 0x7c, 0x0c, 0x04, 0x04, 0x0c, 0x0c, 0x0c, // Char 055 (7) - 0x00, 0x3c, 0x46, 0x46, 0x3c, 0x62, 0x62, 0x3c, // Char 056 (8) - 0x00, 0x3c, 0x46, 0x46, 0x3e, 0x02, 0x62, 0x3c, // Char 057 (9) - 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, // Char 058 (:) - 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, // Char 059 (;) - 0x60, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, // Char 060 (<) - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0x00, // Char 061 (=) - 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, // Char 062 (>) - 0x00, 0x78, 0xcc, 0x0c, 0x18, 0x30, 0x00, 0x30, // Char 063 (?) - 0x00, 0x7c, 0xc6, 0xde, 0xde, 0xde, 0xc0, 0x78, // Char 064 (@) - 0x00, 0x7e, 0x46, 0x42, 0x42, 0x7e, 0x62, 0x62, // Char 065 (A) - 0x00, 0x7c, 0x4c, 0x44, 0x7e, 0x62, 0x62, 0x7e, // Char 066 (B) - 0x00, 0x7e, 0x46, 0x40, 0x60, 0x60, 0x62, 0x7e, // Char 067 (C) - 0x00, 0x7c, 0x46, 0x46, 0x42, 0x62, 0x62, 0x7c, // Char 068 (D) - 0x00, 0x7e, 0x46, 0x40, 0x78, 0x60, 0x62, 0x7e, // Char 069 (E) - 0x00, 0x7e, 0x46, 0x40, 0x78, 0x60, 0x60, 0x60, // Char 070 (F) - 0x00, 0x7e, 0x46, 0x40, 0x4e, 0x62, 0x62, 0x7e, // Char 071 (G) - 0x00, 0x4c, 0x4c, 0x44, 0x7c, 0x64, 0x64, 0x64, // Char 072 (H) - 0x00, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, // Char 073 (I) - 0x00, 0x06, 0x06, 0x02, 0x02, 0x62, 0x62, 0x7e, // Char 074 (J) - 0x00, 0x46, 0x46, 0x4c, 0x78, 0x64, 0x62, 0x62, // Char 075 (K) - 0x00, 0x40, 0x40, 0x40, 0x60, 0x60, 0x60, 0x7e, // Char 076 (L) - 0x00, 0xc6, 0xee, 0xbe, 0x92, 0xd2, 0xc2, 0xc2, // Char 077 (M) - 0x00, 0x46, 0x46, 0x62, 0x52, 0x6a, 0x66, 0x62, // Char 078 (N) - 0x00, 0x7e, 0x46, 0x46, 0x62, 0x62, 0x62, 0x7e, // Char 079 (O) - 0x00, 0x7e, 0x46, 0x46, 0x7e, 0x60, 0x60, 0x60, // Char 080 (P) - 0x00, 0x7e, 0x46, 0x46, 0x62, 0x62, 0x7e, 0x1c, // Char 081 (Q) - 0x04, 0x7e, 0x46, 0x46, 0x7c, 0x68, 0x64, 0x62, // Char 082 (R) - 0x00, 0x7e, 0x46, 0x60, 0x18, 0x06, 0x62, 0x7e, // Char 083 (S) - 0x00, 0x7e, 0x16, 0x10, 0x18, 0x18, 0x18, 0x18, // Char 084 (T) - 0x00, 0x46, 0x46, 0x42, 0x62, 0x62, 0x62, 0x7e, // Char 085 (U) - 0x00, 0x46, 0x46, 0x46, 0x42, 0x64, 0x38, 0x10, // Char 086 (V) - 0x00, 0x86, 0x86, 0x82, 0xd2, 0xfa, 0xee, 0xc6, // Char 087 (W) - 0x00, 0x86, 0x86, 0x4c, 0x30, 0x68, 0xe4, 0xc2, // Char 088 (X) - 0x00, 0x46, 0x46, 0x42, 0x3c, 0x18, 0x18, 0x18, // Char 089 (Y) - 0x00, 0xfe, 0x06, 0x08, 0x10, 0x20, 0xc0, 0xfe, // Char 090 (Z) - 0x00, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, // Char 091 ([) - 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, // Char 092 (\) - 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, // Char 093 (]) - 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, // Char 094 (^) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 095 (_) - 0xff, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, // Char 096 (`) - 0x00, 0x00, 0x00, 0x7e, 0x06, 0x7e, 0x62, 0x7e, // Char 097 (a) - 0x00, 0x40, 0x40, 0x40, 0x7e, 0x62, 0x62, 0x7e, // Char 098 (b) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x60, 0x60, 0x7e, // Char 099 (c) - 0x00, 0x06, 0x06, 0x02, 0x7e, 0x62, 0x62, 0x7e, // Char 100 (d) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x7e, 0x60, 0x7e, // Char 101 (e) - 0x00, 0x0c, 0x1c, 0x20, 0x78, 0x60, 0x60, 0x60, // Char 102 (f) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x06, // Char 103 (g) - 0x78, 0x40, 0x40, 0x40, 0x7e, 0x62, 0x62, 0x62, // Char 104 (h) - 0x00, 0x10, 0x00, 0x10, 0x10, 0x18, 0x18, 0x18, // Char 105 (i) - 0x00, 0x0c, 0x00, 0x0c, 0x04, 0x04, 0x64, 0x64, // Char 106 (j) - 0x7c, 0x40, 0x40, 0x46, 0x4c, 0x78, 0x64, 0x62, // Char 107 (k) - 0x00, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, // Char 108 (l) - 0x00, 0x00, 0x00, 0xfe, 0x96, 0x96, 0xd2, 0xd2, // Char 109 (m) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x62, 0x62, 0x62, // Char 110 (n) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x62, 0x62, 0x7e, // Char 111 (o) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x60, // Char 112 (p) - 0x60, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x02, // Char 113 (q) - 0x00, 0x00, 0x00, 0x7e, 0x46, 0x60, 0x60, 0x60, // Char 114 (r) - 0x00, 0x00, 0x00, 0x7c, 0x40, 0x7c, 0x04, 0x7c, // Char 115 (s) - 0x00, 0x10, 0x10, 0x3c, 0x10, 0x10, 0x18, 0x1c, // Char 116 (t) - 0x00, 0x00, 0x00, 0x46, 0x46, 0x62, 0x62, 0x7e, // Char 117 (u) - 0x00, 0x00, 0x00, 0x46, 0x46, 0x66, 0x34, 0x18, // Char 118 (v) - 0x00, 0x00, 0x00, 0x86, 0x96, 0xd2, 0xfe, 0x6c, // Char 119 (w) - 0x00, 0x00, 0x00, 0x46, 0x2c, 0x18, 0x34, 0x62, // Char 120 (x) - 0x00, 0x00, 0x00, 0x46, 0x46, 0x62, 0x7e, 0x02, // Char 121 (y) - 0x7c, 0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, // Char 122 (z) - 0x00, 0x1c, 0x30, 0x30, 0xe0, 0x30, 0x30, 0x1c, // Char 123 ({) - 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, // Char 124 (|) - 0x00, 0xe0, 0x30, 0x30, 0x1c, 0x30, 0x30, 0xe0, // Char 125 (}) - 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 126 (~) - 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, // Char 127 (.) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 000 (.) + 0x20, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, // Char 001 (.) + 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, // Char 002 (.) + 0x7e, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, // Char 003 (.) + 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, // Char 004 (.) + 0x00, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x7c, 0x38, // Char 005 (.) + 0x7c, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, // Char 006 (.) + 0x7c, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, // Char 007 (.) + 0x00, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, // Char 008 (.) + 0xff, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, // Char 009 (.) + 0x00, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, // Char 010 (.) + 0xff, 0x0f, 0x07, 0x0f, 0x7d, 0xcc, 0xcc, 0xcc, // Char 011 (.) + 0x78, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, // Char 012 (.) + 0x18, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x70, 0xf0, // Char 013 (.) + 0xe0, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x67, 0xe6, // Char 014 (.) + 0xc0, 0x99, 0x5a, 0x3c, 0xe7, 0xe7, 0x3c, 0x5a, // Char 015 (.) + 0x99, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, // Char 016 (.) + 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, // Char 017 (.) + 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x7e, 0x3c, // Char 018 (.) + 0x18, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, // Char 019 (.) + 0x00, 0x7f, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, // Char 020 (.) + 0x00, 0x3e, 0x63, 0x38, 0x6c, 0x6c, 0x38, 0xcc, // Char 021 (.) + 0x78, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, // Char 022 (.) + 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x7e, 0x3c, 0x18, // Char 023 (.) + 0xff, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, // Char 024 (.) + 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, // Char 025 (.) + 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, // Char 026 (.) + 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, // Char 027 (.) + 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, // Char 028 (.) + 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, // Char 029 (.) + 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, // Char 030 (.) + 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, // Char 031 (.) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 032 ( ) + 0x00, 0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, // Char 033 (!) + 0x00, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, // Char 034 (") + 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, // Char 035 (#) + 0x00, 0x30, 0x7c, 0xc0, 0x78, 0x0c, 0xf8, 0x30, // Char 036 ($) + 0x00, 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, // Char 037 (%) + 0x00, 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, // Char 038 (&) + 0x00, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, // Char 039 (') + 0x00, 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, // Char 040 (() + 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, // Char 041 ()) + 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, // Char 042 (*) + 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, // Char 043 (+) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, // Char 044 (,) + 0x60, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // Char 045 (-) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, // Char 046 (.) + 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, // Char 047 (/) + 0x00, 0xfe, 0x86, 0x8e, 0xd2, 0xe2, 0xc2, 0xfe, // Char 048 (0) + 0x00, 0x10, 0x10, 0x10, 0x30, 0x30, 0x30, 0x30, // Char 049 (1) + 0x00, 0x3c, 0x46, 0x06, 0x0c, 0x30, 0x60, 0x7e, // Char 050 (2) + 0x00, 0x3c, 0x46, 0x06, 0x1c, 0x02, 0x62, 0x7c, // Char 051 (3) + 0x00, 0x4c, 0x4c, 0x44, 0x44, 0x7c, 0x0c, 0x0c, // Char 052 (4) + 0x00, 0x7e, 0x40, 0x7c, 0x02, 0x02, 0x62, 0x7c, // Char 053 (5) + 0x00, 0x3c, 0x66, 0x40, 0x7c, 0x62, 0x62, 0x3c, // Char 054 (6) + 0x00, 0x7c, 0x0c, 0x04, 0x04, 0x0c, 0x0c, 0x0c, // Char 055 (7) + 0x00, 0x3c, 0x46, 0x46, 0x3c, 0x62, 0x62, 0x3c, // Char 056 (8) + 0x00, 0x3c, 0x46, 0x46, 0x3e, 0x02, 0x62, 0x3c, // Char 057 (9) + 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, // Char 058 (:) + 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, // Char 059 (;) + 0x60, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, // Char 060 (<) + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0x00, // Char 061 (=) + 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, // Char 062 (>) + 0x00, 0x78, 0xcc, 0x0c, 0x18, 0x30, 0x00, 0x30, // Char 063 (?) + 0x00, 0x7c, 0xc6, 0xde, 0xde, 0xde, 0xc0, 0x78, // Char 064 (@) + 0x00, 0x7e, 0x46, 0x42, 0x42, 0x7e, 0x62, 0x62, // Char 065 (A) + 0x00, 0x7c, 0x4c, 0x44, 0x7e, 0x62, 0x62, 0x7e, // Char 066 (B) + 0x00, 0x7e, 0x46, 0x40, 0x60, 0x60, 0x62, 0x7e, // Char 067 (C) + 0x00, 0x7c, 0x46, 0x46, 0x42, 0x62, 0x62, 0x7c, // Char 068 (D) + 0x00, 0x7e, 0x46, 0x40, 0x78, 0x60, 0x62, 0x7e, // Char 069 (E) + 0x00, 0x7e, 0x46, 0x40, 0x78, 0x60, 0x60, 0x60, // Char 070 (F) + 0x00, 0x7e, 0x46, 0x40, 0x4e, 0x62, 0x62, 0x7e, // Char 071 (G) + 0x00, 0x4c, 0x4c, 0x44, 0x7c, 0x64, 0x64, 0x64, // Char 072 (H) + 0x00, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, // Char 073 (I) + 0x00, 0x06, 0x06, 0x02, 0x02, 0x62, 0x62, 0x7e, // Char 074 (J) + 0x00, 0x46, 0x46, 0x4c, 0x78, 0x64, 0x62, 0x62, // Char 075 (K) + 0x00, 0x40, 0x40, 0x40, 0x60, 0x60, 0x60, 0x7e, // Char 076 (L) + 0x00, 0xc6, 0xee, 0xbe, 0x92, 0xd2, 0xc2, 0xc2, // Char 077 (M) + 0x00, 0x46, 0x46, 0x62, 0x52, 0x6a, 0x66, 0x62, // Char 078 (N) + 0x00, 0x7e, 0x46, 0x46, 0x62, 0x62, 0x62, 0x7e, // Char 079 (O) + 0x00, 0x7e, 0x46, 0x46, 0x7e, 0x60, 0x60, 0x60, // Char 080 (P) + 0x00, 0x7e, 0x46, 0x46, 0x62, 0x62, 0x7e, 0x1c, // Char 081 (Q) + 0x04, 0x7e, 0x46, 0x46, 0x7c, 0x68, 0x64, 0x62, // Char 082 (R) + 0x00, 0x7e, 0x46, 0x60, 0x18, 0x06, 0x62, 0x7e, // Char 083 (S) + 0x00, 0x7e, 0x16, 0x10, 0x18, 0x18, 0x18, 0x18, // Char 084 (T) + 0x00, 0x46, 0x46, 0x42, 0x62, 0x62, 0x62, 0x7e, // Char 085 (U) + 0x00, 0x46, 0x46, 0x46, 0x42, 0x64, 0x38, 0x10, // Char 086 (V) + 0x00, 0x86, 0x86, 0x82, 0xd2, 0xfa, 0xee, 0xc6, // Char 087 (W) + 0x00, 0x86, 0x86, 0x4c, 0x30, 0x68, 0xe4, 0xc2, // Char 088 (X) + 0x00, 0x46, 0x46, 0x42, 0x3c, 0x18, 0x18, 0x18, // Char 089 (Y) + 0x00, 0xfe, 0x06, 0x08, 0x10, 0x20, 0xc0, 0xfe, // Char 090 (Z) + 0x00, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, // Char 091 ([) + 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, // Char 092 (\) + 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, // Char 093 (]) + 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, // Char 094 (^) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 095 (_) + 0xff, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, // Char 096 (`) + 0x00, 0x00, 0x00, 0x7e, 0x06, 0x7e, 0x62, 0x7e, // Char 097 (a) + 0x00, 0x40, 0x40, 0x40, 0x7e, 0x62, 0x62, 0x7e, // Char 098 (b) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x60, 0x60, 0x7e, // Char 099 (c) + 0x00, 0x06, 0x06, 0x02, 0x7e, 0x62, 0x62, 0x7e, // Char 100 (d) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x7e, 0x60, 0x7e, // Char 101 (e) + 0x00, 0x0c, 0x1c, 0x20, 0x78, 0x60, 0x60, 0x60, // Char 102 (f) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x06, // Char 103 (g) + 0x78, 0x40, 0x40, 0x40, 0x7e, 0x62, 0x62, 0x62, // Char 104 (h) + 0x00, 0x10, 0x00, 0x10, 0x10, 0x18, 0x18, 0x18, // Char 105 (i) + 0x00, 0x0c, 0x00, 0x0c, 0x04, 0x04, 0x64, 0x64, // Char 106 (j) + 0x7c, 0x40, 0x40, 0x46, 0x4c, 0x78, 0x64, 0x62, // Char 107 (k) + 0x00, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, // Char 108 (l) + 0x00, 0x00, 0x00, 0xfe, 0x96, 0x96, 0xd2, 0xd2, // Char 109 (m) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x62, 0x62, 0x62, // Char 110 (n) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x62, 0x62, 0x7e, // Char 111 (o) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x60, // Char 112 (p) + 0x60, 0x00, 0x00, 0x7e, 0x46, 0x42, 0x7e, 0x02, // Char 113 (q) + 0x00, 0x00, 0x00, 0x7e, 0x46, 0x60, 0x60, 0x60, // Char 114 (r) + 0x00, 0x00, 0x00, 0x7c, 0x40, 0x7c, 0x04, 0x7c, // Char 115 (s) + 0x00, 0x10, 0x10, 0x3c, 0x10, 0x10, 0x18, 0x1c, // Char 116 (t) + 0x00, 0x00, 0x00, 0x46, 0x46, 0x62, 0x62, 0x7e, // Char 117 (u) + 0x00, 0x00, 0x00, 0x46, 0x46, 0x66, 0x34, 0x18, // Char 118 (v) + 0x00, 0x00, 0x00, 0x86, 0x96, 0xd2, 0xfe, 0x6c, // Char 119 (w) + 0x00, 0x00, 0x00, 0x46, 0x2c, 0x18, 0x34, 0x62, // Char 120 (x) + 0x00, 0x00, 0x00, 0x46, 0x46, 0x62, 0x7e, 0x02, // Char 121 (y) + 0x7c, 0x00, 0x00, 0x7e, 0x0c, 0x18, 0x30, 0x7e, // Char 122 (z) + 0x00, 0x1c, 0x30, 0x30, 0xe0, 0x30, 0x30, 0x1c, // Char 123 ({) + 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, // Char 124 (|) + 0x00, 0xe0, 0x30, 0x30, 0x1c, 0x30, 0x30, 0xe0, // Char 125 (}) + 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, // Char 126 (~) + 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, // Char 127 (.) }; diff --git a/examples/library_examples/srldrvce/srl_echo/src/main.c b/examples/library_examples/srldrvce/srl_echo/src/main.c index 09d904e6e..2f986fbea 100644 --- a/examples/library_examples/srldrvce/srl_echo/src/main.c +++ b/examples/library_examples/srldrvce/srl_echo/src/main.c @@ -28,23 +28,23 @@ static usb_error_t handle_usb_event(usb_event_t event, void *event_data, if ((err = srl_UsbEventCallback(event, event_data, callback_data)) != USB_SUCCESS) return err; /* Enable newly connected devices */ - if(event == USB_DEVICE_CONNECTED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE)) { + if (event == USB_DEVICE_CONNECTED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE)) { usb_device_t device = event_data; printf("device connected\n"); usb_ResetDevice(device); } /* Call srl_Open on newly enabled device, if there is not currently a serial device in use */ - if(event == USB_HOST_CONFIGURE_EVENT || (event == USB_DEVICE_ENABLED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE))) { + if (event == USB_HOST_CONFIGURE_EVENT || (event == USB_DEVICE_ENABLED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE))) { /* If we already have a serial device, ignore the new one */ - if(has_srl_device) return USB_SUCCESS; + if (has_srl_device) return USB_SUCCESS; usb_device_t device; - if(event == USB_HOST_CONFIGURE_EVENT) { + if (event == USB_HOST_CONFIGURE_EVENT) { /* Use the device representing the USB host. */ device = usb_FindDevice(NULL, NULL, USB_SKIP_HUBS); - if(device == NULL) return USB_SUCCESS; + if (device == NULL) return USB_SUCCESS; } else { /* Use the newly enabled device */ device = event_data; @@ -52,7 +52,7 @@ static usb_error_t handle_usb_event(usb_event_t event, void *event_data, /* Initialize the serial library with the newly attached device */ srl_error_t error = srl_Open(&srl, device, srl_buf, sizeof srl_buf, SRL_INTERFACE_ANY, 9600); - if(error) { + if (error) { /* Print the error code to the homescreen */ printf("Error %d initting serial\n", error); return USB_SUCCESS; @@ -63,9 +63,9 @@ static usb_error_t handle_usb_event(usb_event_t event, void *event_data, has_srl_device = true; } - if(event == USB_DEVICE_DISCONNECTED_EVENT) { + if (event == USB_DEVICE_DISCONNECTED_EVENT) { usb_device_t device = event_data; - if(device == srl.dev) { + if (device == srl.dev) { printf("device disconnected\n"); srl_Close(&srl); has_srl_device = false; @@ -80,7 +80,7 @@ int main(void) { const usb_standard_descriptors_t *desc = srl_GetCDCStandardDescriptors(); /* Initialize the USB driver with our event handler and the serial device descriptors */ usb_error_t usb_error = usb_Init(handle_usb_event, NULL, desc, USB_DEFAULT_INIT_FLAGS); - if(usb_error) { + if (usb_error) { usb_Cleanup(); printf("usb init error %u\n", usb_error); do kb_Scan(); while(!kb_IsDown(kb_KeyClear)); @@ -92,17 +92,17 @@ int main(void) { usb_HandleEvents(); - if(has_srl_device) { + if (has_srl_device) { char in_buf[64]; /* Read up to 64 bytes from the serial buffer */ size_t bytes_read = srl_Read(&srl, in_buf, sizeof in_buf); /* Check for an error (e.g. device disconneced) */ - if(bytes_read < 0) { + if (bytes_read < 0) { printf("error %d on srl_Read\n", bytes_read); has_srl_device = false; - } else if(bytes_read > 0) { + } else if (bytes_read > 0) { /* Write the data back to serial */ srl_Write(&srl, in_buf, bytes_read); } diff --git a/src/ce/include/ti/flags.h b/src/ce/include/ti/flags.h index b0728e12d..2b2d76157 100644 --- a/src/ce/include/ti/flags.h +++ b/src/ce/include/ti/flags.h @@ -242,7 +242,7 @@ bool os_TestFlagBitsFast(uint16_t offset_pattern); #define OS_FLAGS_ASM1 0x21 /**< GROUP: Intentionally unused by TI, available for programs! */ #define OS_FLAGS_ASM2 0x22 /**< GROUP: Intentionally unused by TI, available for programs! */ #define OS_FLAGS_ARCHIVE 0x24 /**< GROUP: Archive stuff */ -#define OS_FLAGS_ARCHIVE_CHECKBATTERY 0 /**< 1 = check battery levels in Arc_Unarc first and throw error if low */ +#define OS_FLAGS_ARCHIVE_CHECKBATTERY 0 /**< 1 = check battery levels in Arc_Unarc first and throw error if low */ #define OS_FLAGS_GETSEND 0x24 /**< FLAGS */ #define OS_FLAGS_GETSEND_COMFAILED 1 /**< 1 = Get/Send Communication Failed */ #define OS_FLAGS_SELFTEST 0x24 /**< GROUP: Self-test screen */ diff --git a/src/ce/include/ti/getcsc.h b/src/ce/include/ti/getcsc.h index 4d2e12164..0f884a7de 100644 --- a/src/ce/include/ti/getcsc.h +++ b/src/ce/include/ti/getcsc.h @@ -43,8 +43,8 @@ bool boot_CheckOnPressed(void); * uint8_t key, i = 0; * char buffer[50]; * - * while((key = os_GetCSC()) != sk_Enter) { - * if(chars[key]) { + * while ((key = os_GetCSC()) != sk_Enter) { + * if (chars[key]) { * buffer[i++] = chars[key]; * } * } diff --git a/src/ce/include/ti/screen.h b/src/ce/include/ti/screen.h index 0f8710460..67a5aeb4a 100644 --- a/src/ce/include/ti/screen.h +++ b/src/ce/include/ti/screen.h @@ -304,7 +304,7 @@ uint24_t os_GetDrawBGColor(void); #define os_PenCol (*(uint24_t*)0xD008D2) /** `uint8_t`: Small font row position */ #define os_PenRow (*(uint8_t*)0xD008D5) - /** `uint16_t`: Small font background 565 BGR color */ +/** `uint16_t`: Small font background 565 BGR color */ #define os_DrawBGColor (*(uint16_t*)0xD026AA) /** `uint16_t`: Small font foreground 565 BGR color */ #define os_DrawFGColor (*(uint16_t*)0xD026AC) diff --git a/src/fileioc/fileioc.h b/src/fileioc/fileioc.h index cd9c92a0a..be2300593 100644 --- a/src/fileioc/fileioc.h +++ b/src/fileioc/fileioc.h @@ -630,7 +630,7 @@ void ti_SetGCBehavior(void (*before)(void), void (*after)(void)); #define ti_K _Pragma("GCC warning \"'ti_K' is deprecated, use 'OS_VAR_K' instead\"") OS_VAR_K #define ti_L _Pragma("GCC warning \"'ti_L' is deprecated, use 'OS_VAR_L' instead\"") OS_VAR_L #define ti_M _Pragma("GCC warning \"'ti_M' is deprecated, use 'OS_VAR_M' instead\"") OS_VAR_M -#define ti_N _Pragma("GCC warning \"'ti_N' is deprecated, use 'OS_VAR_N' instead\"") OS_VAR_N +#define ti_N _Pragma("GCC warning \"'ti_N' is deprecated, use 'OS_VAR_N' instead\"") OS_VAR_N #define ti_O _Pragma("GCC warning \"'ti_O' is deprecated, use 'OS_VAR_O' instead\"") OS_VAR_O #define ti_P _Pragma("GCC warning \"'ti_P' is deprecated, use 'OS_VAR_P' instead\"") OS_VAR_P #define ti_Q _Pragma("GCC warning \"'ti_Q' is deprecated, use 'OS_VAR_Q' instead\"") OS_VAR_Q diff --git a/src/fontlibc/fontlibc.h b/src/fontlibc/fontlibc.h index 2d7d42926..d921fc7d5 100644 --- a/src/fontlibc/fontlibc.h +++ b/src/fontlibc/fontlibc.h @@ -800,7 +800,7 @@ fontlib_font_t *fontlib_GetFontByIndex(const char *font_pack_name, uint8_t index * FONTLIB_MONOSPACE to REJECT monospaced fonts. * @return Direct pointer to font, or NULL if no matching font is found */ - fontlib_font_t *fontlib_GetFontByStyleRaw(const fontlib_font_pack_t *font_pack, uint8_t size_min, uint8_t size_max, uint8_t weight_min, uint8_t weight_max, uint8_t style_bits_set, uint8_t style_bits_reset); +fontlib_font_t *fontlib_GetFontByStyleRaw(const fontlib_font_pack_t *font_pack, uint8_t size_min, uint8_t size_max, uint8_t weight_min, uint8_t weight_max, uint8_t style_bits_set, uint8_t style_bits_reset); /** * Gets a pointer to a font, suitable for passing to SetFont(), given a font diff --git a/src/graphx/graphx.h b/src/graphx/graphx.h index 71568bb08..bd46e82cb 100644 --- a/src/graphx/graphx.h +++ b/src/graphx/graphx.h @@ -481,7 +481,7 @@ gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64) * @param[in] angle 256 position angular integer. * @see gfx_RotatedScaledTransparentSprite. */ - #define gfx_RotatedTransparentSprite(sprite, x, y, angle) \ +#define gfx_RotatedTransparentSprite(sprite, x, y, angle) \ gfx_RotatedScaledTransparentSprite(sprite, x, y, angle, 64) /** diff --git a/src/keypadc/keypadc.h b/src/keypadc/keypadc.h index 849b64150..41a531a71 100644 --- a/src/keypadc/keypadc.h +++ b/src/keypadc/keypadc.h @@ -134,7 +134,7 @@ typedef enum { * * Likewise, you can test keys with the following general format: * @code{.cpp} - * if (kb_Data[group] & kb_Name){ + * if (kb_Data[group] & kb_Name) { * ... * } * @endcode diff --git a/src/libc/acosl.c b/src/libc/acosl.c index 4c6163fa9..410a4e16f 100644 --- a/src/libc/acosl.c +++ b/src/libc/acosl.c @@ -10,12 +10,12 @@ * ulp of -13337 at +0x1.ffffffe84b398p-1 assuming ideal atanl */ long double acosl(long double x) { - if (x < 0.5L) { - return F64_PI2 - asinl(x); - } - if (x <= 1.0L) { - return atanl((sqrtl(1.0L - x) * sqrtl(1.0L + x)) / x); - } - errno = EDOM; - return __builtin_nanl(""); + if (x < 0.5L) { + return F64_PI2 - asinl(x); + } + if (x <= 1.0L) { + return atanl((sqrtl(1.0L - x) * sqrtl(1.0L + x)) / x); + } + errno = EDOM; + return __builtin_nanl(""); } diff --git a/src/libc/asinf.c b/src/libc/asinf.c index a9946bb4e..0d63ba47d 100644 --- a/src/libc/asinf.c +++ b/src/libc/asinf.c @@ -33,13 +33,13 @@ float asinf(float arg) { arg_sign = signbit(arg); arg = fabsf(arg); - if(arg > 1.0f) { + if (arg > 1.0f) { errno = EDOM; return 0.0f; } temp = sqrtf(1.0f - arg*arg); - if(arg > 0.7f) { + if (arg > 0.7f) { temp = (float)M_PI_2 - atanf(temp/arg); } else { temp = atanf(arg/temp); diff --git a/src/libc/asinl.c b/src/libc/asinl.c index d8e9e707d..d79d5dfa4 100644 --- a/src/libc/asinl.c +++ b/src/libc/asinl.c @@ -20,13 +20,13 @@ long double asinl(long double arg) { arg_sign = signbit(arg); arg = fabsl(arg); - if(arg > 1.0L) { + if (arg > 1.0L) { errno = EDOM; return 0.0L; } temp = sqrtl(1.0L - arg * arg); - if(arg > 0.7L) { + if (arg > 0.7L) { temp = F64_PI2 - atanl(temp / arg); } else { temp = atanl(arg / temp); diff --git a/src/libc/expf.c b/src/libc/expf.c index d3aa38528..7c96a8e18 100644 --- a/src/libc/expf.c +++ b/src/libc/expf.c @@ -60,13 +60,13 @@ float expf(float arg) { float temp1, temp2, xsq; float ent; - if ( arg == 0.0f){ + if ( arg == 0.0f) { return 1.0f; } - if ( arg < exp_min_arg ){ + if ( arg < exp_min_arg ) { return 0.0f; } - if ( arg > exp_max_arg ){ + if ( arg > exp_max_arg ) { errno = ERANGE; return HUGE_VALF; } diff --git a/src/libc/expl.c b/src/libc/expl.c index db5803e12..8f869dd17 100644 --- a/src/libc/expl.c +++ b/src/libc/expl.c @@ -22,7 +22,7 @@ #define q2 0.17492876890931e4L #if 0 -#define exp_max_arg 709.79L +#define exp_max_arg 709.79L #define exp_min_arg -744.45L #else /* mantissa is zero for these constants */ @@ -43,13 +43,13 @@ long double expl(long double arg) { long double temp1, temp2, xsq; long double ent; - if ( arg == 0.0L ){ + if ( arg == 0.0L ) { return 1.0L; } - if ( arg < exp_min_arg ){ + if ( arg < exp_min_arg ) { return 0.0L; } - if ( arg > exp_max_arg ){ + if ( arg > exp_max_arg ) { errno = ERANGE; return HUGE_VALL; } diff --git a/src/libc/frexpl.c b/src/libc/frexpl.c index 34aa716cf..9bd4038b5 100644 --- a/src/libc/frexpl.c +++ b/src/libc/frexpl.c @@ -41,7 +41,7 @@ static long double _frexpl_c_positive(long double x, int *expon) { return val.flt; } /* isnormal(x) */ - x_exp -= Float64_exp_bias; + x_exp -= Float64_exp_bias; // frexp is ilogb(x) + 1 x_exp++; *expon = x_exp; @@ -51,8 +51,8 @@ static long double _frexpl_c_positive(long double x, int *expon) { val.reg.BC |= 0x3FE0; return val.flt; } - /* iszero(x) */ - if (val.bin == 0) { + /* iszero(x) */ + if (val.bin == 0) { // return unmodified *expon = 0; return val.flt; diff --git a/src/libc/hypot3f.c b/src/libc/hypot3f.c index 4302435ed..425dfc37c 100644 --- a/src/libc/hypot3f.c +++ b/src/libc/hypot3f.c @@ -10,7 +10,7 @@ float __hypot3f(float arg_x, float arg_y, float arg_z) { F32_pun x, y, z; x.flt = fabsf(arg_x); y.flt = fabsf(arg_y); - z.flt = fabsf(arg_z); + z.flt = fabsf(arg_z); if (y.bin < z.bin) { float temp = y.flt; y.flt = z.flt; diff --git a/src/libc/lgammal.c b/src/libc/lgammal.c index 6d0f3032a..1777948af 100644 --- a/src/libc/lgammal.c +++ b/src/libc/lgammal.c @@ -33,7 +33,7 @@ long double lgammal(long double x) { /* the natural logarithm of the Gamma funct long double v, w; v = 1.0L; - // this will overflow when x < 173.0L + // this will overflow when x < 173.0L const int maximum_iter = 173 + N; for (int iter = 0; iter < maximum_iter; iter++) { if (!(x < (long double)N)) { diff --git a/src/libc/logf.c b/src/libc/logf.c index 74e866294..1319c3493 100644 --- a/src/libc/logf.c +++ b/src/libc/logf.c @@ -44,7 +44,7 @@ float logf(float arg) return -HUGE_VALF; } x = frexpf(arg, & expon); - if ( x < F32_INV_SQRT2 ){ + if ( x < F32_INV_SQRT2 ) { x *= 2.0f; expon--; } diff --git a/src/libc/logl.c b/src/libc/logl.c index b61b049db..4585600ad 100644 --- a/src/libc/logl.c +++ b/src/libc/logl.c @@ -41,7 +41,7 @@ long double logl(long double arg) return -HUGE_VALL; } x = frexpl(arg, & expon); - if ( x < F64_INV_SQRT2 ){ + if ( x < F64_INV_SQRT2 ) { x *= 2.0L; expon--; } diff --git a/src/libc/powf.c b/src/libc/powf.c index dd44ca529..ddf2b049e 100644 --- a/src/libc/powf.c +++ b/src/libc/powf.c @@ -28,18 +28,18 @@ float powf(float arg1, float arg2) { float result; long temp; - if ( arg1 > 0.0 ){ + if ( arg1 > 0.0 ) { return expf( arg2 * logf( arg1 ) ); } - if ( arg1 < 0.0 ){ + if ( arg1 < 0.0 ) { temp = (long)arg2; - if ( (float)temp == arg2 ){ + if ( (float)temp == arg2 ) { result = expf( arg2 * logf( -arg1 ) ); return temp & 1 ? -result : result; } errno = EDOM; } - if ( arg2 <= 0.0 ){ + if ( arg2 <= 0.0 ) { errno = EDOM; } return 0.0; diff --git a/src/libc/powl.c b/src/libc/powl.c index 89d9baff0..4ed0e2b87 100644 --- a/src/libc/powl.c +++ b/src/libc/powl.c @@ -14,18 +14,18 @@ long double powl(long double x, long double y) { long double result; long temp; - if ( x > 0.0L ){ + if ( x > 0.0L ) { return expl( y * logl( x ) ); } - if ( x < 0.0L ){ + if ( x < 0.0L ) { temp = (long)y; - if ( (long double)temp == y ){ + if ( (long double)temp == y ) { result = expl( y * logl( -x ) ); return temp & 1 ? -result : result; } errno = EDOM; } - if ( y <= 0.0L ){ + if ( y <= 0.0L ) { errno = EDOM; } return 0.0L; diff --git a/src/libc/sinhl.c b/src/libc/sinhl.c index 59f27f70d..424f64d91 100644 --- a/src/libc/sinhl.c +++ b/src/libc/sinhl.c @@ -39,14 +39,14 @@ long double sinhl(long double arg) { long double temp, argsq, x; x = fabsl(arg); - if (x < 0.5L) { + if (x < 0.5L) { argsq = x * x; temp = (((p3*argsq+p2)*argsq+p1)*argsq+p0) * x; temp /= (((argsq+q2)*argsq+q1)*argsq+q0); - } else if (x < 709.0L) { - temp = (expl(x) - expl(-x)) / 2.0L; - } else { - temp = expl(x - F64_LN2); - } + } else if (x < 709.0L) { + temp = (expl(x) - expl(-x)) / 2.0L; + } else { + temp = expl(x - F64_LN2); + } return copysignl(temp, arg); } diff --git a/src/libc/sqrtf.c b/src/libc/sqrtf.c index ceb91e678..0aa9b45b0 100644 --- a/src/libc/sqrtf.c +++ b/src/libc/sqrtf.c @@ -20,10 +20,10 @@ asm ; only works for normalized values ; CC: 9F + 12R + 9W + 1 | 8 bytes __f32_fast_div4: - pop bc, hl, de - dec e ; subtracts 2 from the exponent - push de, hl, bc - ret + pop bc, hl, de + dec e ; subtracts 2 from the exponent + push de, hl, bc + ret */ float _f32_fast_div4(float x); diff --git a/src/libc/sscanf.c b/src/libc/sscanf.c index d08bc7567..f4064c834 100644 --- a/src/libc/sscanf.c +++ b/src/libc/sscanf.c @@ -20,19 +20,19 @@ /** * define to `restrict`, `__restrict`, `__restrict__`, or leave blank. */ - #define NS_restrict __restrict +#define NS_restrict __restrict /** * define to 0 or 1 (default = 1) * Enables support for `[` set matching (such as "%3[^]^123abc]"). */ - #define NS_ENABLE_SET_MATCHING 1 +#define NS_ENABLE_SET_MATCHING 1 /** * define to 0 or 1 (default = 0) * Adds support for C23 `%b` format specifiers. */ - #define NS_ENABLE_BINARY_CONVERSION_FORMAT 1 +#define NS_ENABLE_BINARY_CONVERSION_FORMAT 1 /** * Maximum characters (including null terminator) to scan for set matching. @@ -76,7 +76,7 @@ * define to 0 or 1 (default = 0). * Inlines isspace */ - #define NS_INLINE_ISSPACE 0 +#define NS_INLINE_ISSPACE 0 /*============================================================================*/ /* Validate macros */ diff --git a/src/libc/tanhf.c b/src/libc/tanhf.c index 0f1831316..d55e0f21c 100644 --- a/src/libc/tanhf.c +++ b/src/libc/tanhf.c @@ -40,7 +40,7 @@ float tanhf(float arg) { float x = fabsf(arg); // result rounds to 1.0f - if(x > 10.0f) { + if (x > 10.0f) { x = 1.0f; } else { x = sinhf(x) / coshf(x); diff --git a/src/libc/tanl.c b/src/libc/tanl.c index a419dfc98..fef07b487 100644 --- a/src/libc/tanl.c +++ b/src/libc/tanl.c @@ -1,10 +1,10 @@ /************************************************************************/ -/* */ -/* Copyright (C)1987-2008 by */ -/* Zilog, Inc. */ -/* */ -/* San Jose, California */ -/* */ +/* */ +/* Copyright (C)1987-2008 by */ +/* Zilog, Inc. */ +/* */ +/* San Jose, California */ +/* */ /************************************************************************/ /* floating point tangent @@ -45,9 +45,9 @@ long double tanl(long double arg) sign = signbit(arg); x = fabsl(arg); - if (x < 0x1.0p-26L) { - return arg; - } + if (x < 0x1.0p-26L) { + return arg; + } x *= four_mul_invpi; /*overflow?*/ x = modfl(x, &e); diff --git a/src/softfloat/include/softfloat.h b/src/softfloat/include/softfloat.h index e524a0e54..8c26ac474 100644 --- a/src/softfloat/include/softfloat.h +++ b/src/softfloat/include/softfloat.h @@ -65,7 +65,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if 0 extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess; #else - #define softfloat_detectTininess softfloat_tininess_afterRounding + #define softfloat_detectTininess softfloat_tininess_afterRounding #endif enum { softfloat_tininess_beforeRounding = 0, diff --git a/src/softfloat/s_mulAddF64.c b/src/softfloat/s_mulAddF64.c index 41f9f3ee8..85f1f8f61 100644 --- a/src/softfloat/s_mulAddF64.c +++ b/src/softfloat/s_mulAddF64.c @@ -261,7 +261,7 @@ f64_param A, f64_param B, uint_fast64_t uiC /*, uint_fast8_t op */ input_mulAddF64 * const input #endif ) { - #define op 0 + #define op 0 // bool signA; int_fast16_t expA; uint64_t sigA; diff --git a/test/floating_point/float64_arithmetic/src/main.cpp b/test/floating_point/float64_arithmetic/src/main.cpp index 0bfeb2148..4bc4e6dfe 100644 --- a/test/floating_point/float64_arithmetic/src/main.cpp +++ b/test/floating_point/float64_arithmetic/src/main.cpp @@ -25,15 +25,15 @@ #define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) static long double arithmetic_test(long double arg) { - long double x = arg; - x += std::numbers::pi_v; - x *= std::numbers::e_v; - long double y = ++x; - x = std::fma(x, std::numbers::egamma_v, y); - y /= std::numbers::ln2_v - x; - y = std::copysign(y, x--); - x -= std::fabs(x) + y; - return x; + long double x = arg; + x += std::numbers::pi_v; + x *= std::numbers::e_v; + long double y = ++x; + x = std::fma(x, std::numbers::egamma_v, y); + y /= std::numbers::ln2_v - x; + y = std::copysign(y, x--); + x -= std::fabs(x) + y; + return x; } static int64_t calc_ULP(long double guess, long double truth) { diff --git a/test/fontlibc/glyph_width/src/fonts/fonts.c b/test/fontlibc/glyph_width/src/fonts/fonts.c index 420289603..161d89777 100644 --- a/test/fontlibc/glyph_width/src/fonts/fonts.c +++ b/test/fontlibc/glyph_width/src/fonts/fonts.c @@ -2,7 +2,7 @@ static unsigned char test_font_data[] = { - #include "testfont.inc" + #include "testfont.inc" }; fontlib_font_t *test_font = (fontlib_font_t *)test_font_data; diff --git a/test/regression/bug0000/src/main.c b/test/regression/bug0000/src/main.c index b643bb954..b108e2e35 100644 --- a/test/regression/bug0000/src/main.c +++ b/test/regression/bug0000/src/main.c @@ -30,7 +30,7 @@ uint8_t popcount64(uint64_t b) uint64_t ors(const struct s *s) { return (s->b0 | s->b1 | s->b2 | s->b3 | s->b4 | s->b5) | - (s->w0 | s->w1 | s->w2 | s->w3 | s->w4 | s->w5); + (s->w0 | s->w1 | s->w2 | s->w3 | s->w4 | s->w5); } int main(void) @@ -48,14 +48,14 @@ int main(void) os_ClrHome(); printf("m: %llx\nf: %llx\n", - __builtin_bswap64(((s.b0 | s.b1 | s.b2 | s.b3 | s.b4 | s.b5) | - (s.w0 | s.w1 | s.w2 | s.w3 | s.w4 | s.w5))), - __builtin_bswap64(ors(&s))); + __builtin_bswap64(((s.b0 | s.b1 | s.b2 | s.b3 | s.b4 | s.b5) | + (s.w0 | s.w1 | s.w2 | s.w3 | s.w4 | s.w5))), + __builtin_bswap64(ors(&s))); printf("m: %u\nf: %u\n", - popcount64(__builtin_bswap64(((s.b0 | s.b1 | s.b2 | s.b3 | s.b4 | s.b5) | - (s.w0 | s.w1 | s.w2 | s.w3 | s.w4 | s.w5)))), - popcount64(__builtin_bswap64(ors(&s)))); + popcount64(__builtin_bswap64(((s.b0 | s.b1 | s.b2 | s.b3 | s.b4 | s.b5) | + (s.w0 | s.w1 | s.w2 | s.w3 | s.w4 | s.w5)))), + popcount64(__builtin_bswap64(ors(&s)))); os_GetKey();