diff options
author | Vencislav Atanasov <user890104@freemyipod.org> | 2024-12-12 20:45:10 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-12-15 21:16:12 -0500 |
commit | 1468649258f29102f494b31429edadc137f87d3a (patch) | |
tree | 85810514b1be269d0d1e20cbcb6c1c95698b00b2 | |
parent | 5d7c8a0df190524e08067567b5cdbb8d1da18fbc (diff) | |
download | rockbox-1468649258.tar.gz rockbox-1468649258.zip |
Convert non-ASCII characters to UTF-8 or C-string literals
Comments are converted to UTF-8.
Strings which are part of executable code are converted using C-string hex literals. A comment with the intended UTF-8 character is appended to such lines.
The "c"-looking character in mpa.c was actually a small cyrillic "s" (i.e. "с").
Change-Id: If3a889080ef60b8bf756ad9ada38baede93ce35b
-rw-r--r-- | apps/plugins/sdl/progs/duke3d/Engine/src/mmulti.c | 6 | ||||
-rw-r--r-- | apps/plugins/sdl/progs/duke3d/Game/src/audiolib/myprint.c | 32 | ||||
-rw-r--r-- | lib/rbcodec/codecs/mpa.c | 2 | ||||
-rw-r--r-- | tools/creative.c | 6 | ||||
-rw-r--r-- | tools/mkzenboot.c | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/apps/plugins/sdl/progs/duke3d/Engine/src/mmulti.c b/apps/plugins/sdl/progs/duke3d/Engine/src/mmulti.c index 9d2afe9d33..d4f46848dd 100644 --- a/apps/plugins/sdl/progs/duke3d/Engine/src/mmulti.c +++ b/apps/plugins/sdl/progs/duke3d/Engine/src/mmulti.c @@ -458,7 +458,7 @@ short unstable_getpacket (short *other, char *bufptr) { /* GOOD! Take second half of double packet */ #if (PRINTERRORS) - printf("\n%ld-%ld . ",gcom->buffer[0],(gcom->buffer[0]+1)&255); + printf("\n%ld-%ld .\xFB ",gcom->buffer[0],(gcom->buffer[0]+1)&255); /* √ */ #endif messleng = ((long)gcom->buffer[3]) + (((long)gcom->buffer[4])<<8); lastpacketleng = gcom->numbytes-7-messleng; @@ -478,7 +478,7 @@ short unstable_getpacket (short *other, char *bufptr) if ((gcom->buffer[1]&128) == 0) /* Single packet */ { #if (PRINTERRORS) - printf("\n%ld ",gcom->buffer[0]); + printf("\n%ld \xFB ",gcom->buffer[0]); /* √ */ #endif messleng = gcom->numbytes-5; @@ -491,7 +491,7 @@ short unstable_getpacket (short *other, char *bufptr) /* Double packet */ #if (PRINTERRORS) - printf("\n%ld-%ld ",gcom->buffer[0],(gcom->buffer[0]+1)&255); + printf("\n%ld-%ld \xFB\xFB ",gcom->buffer[0],(gcom->buffer[0]+1)&255); /* √√ */ #endif messleng = ((long)gcom->buffer[3]) + (((long)gcom->buffer[4])<<8); diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/myprint.c b/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/myprint.c index e8b2c45f60..277f243812 100644 --- a/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/myprint.c +++ b/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/myprint.c @@ -102,36 +102,36 @@ void TextFrame } if ( type == SINGLE_FRAME ) { - DrawText( x1, y1, '', foreground, background ); - DrawText( x2, y1, '', foreground, background ); - DrawText( x1, y2, '', foreground, background ); - DrawText( x2, y2, '', foreground, background ); + DrawText( x1, y1, '\xDA', foreground, background ); /* ┌ */ + DrawText( x2, y1, '\xBF', foreground, background ); /* ┐ */ + DrawText( x1, y2, '\xC0', foreground, background ); /* └ */ + DrawText( x2, y2, '\xD9', foreground, background ); /* ┘ */ for( x = x1 + 1; x < x2; x++ ) { - DrawText( x, y1, '', foreground, background ); - DrawText( x, y2, '', foreground, background ); + DrawText( x, y1, '\xC4', foreground, background ); /* ─ */ + DrawText( x, y2, '\xC4', foreground, background ); /* ─ */ } for( y = y1 + 1; y < y2; y++ ) { - DrawText( x1, y, '', foreground, background ); - DrawText( x2, y, '', foreground, background ); + DrawText( x1, y, '\xB3', foreground, background ); /* │ */ + DrawText( x2, y, '\xB3', foreground, background ); /* │ */ } } if ( type == DOUBLE_FRAME ) { - DrawText( x1, y1, '', foreground, background ); - DrawText( x2, y1, '', foreground, background ); - DrawText( x1, y2, '', foreground, background ); - DrawText( x2, y2, '', foreground, background ); + DrawText( x1, y1, '\xC9', foreground, background ); /* ╔ */ + DrawText( x2, y1, '\xBB', foreground, background ); /* ╗ */ + DrawText( x1, y2, '\xC8', foreground, background ); /* ╚ */ + DrawText( x2, y2, '\xBC', foreground, background ); /* ╝ */ for( x = x1 + 1; x < x2; x++ ) { - DrawText( x, y1, '', foreground, background ); - DrawText( x, y2, '', foreground, background ); + DrawText( x, y1, '\xCD', foreground, background ); /* ═ */ + DrawText( x, y2, '\xCD', foreground, background ); /* ═ */ } for( y = y1 + 1; y < y2; y++ ) { - DrawText( x1, y, '', foreground, background ); - DrawText( x2, y, '', foreground, background ); + DrawText( x1, y, '\xBA', foreground, background ); /* ║ */ + DrawText( x2, y, '\xBA', foreground, background ); /* ║ */ } } } diff --git a/lib/rbcodec/codecs/mpa.c b/lib/rbcodec/codecs/mpa.c index 2c651d11b0..32afe7a90f 100644 --- a/lib/rbcodec/codecs/mpa.c +++ b/lib/rbcodec/codecs/mpa.c @@ -207,7 +207,7 @@ static int get_file_pos(int newtime) if (pos == -1 || (skipms_from_curpos >= 0 && pos > curpos) || (skipms_from_curpos < 0 && pos < curpos)) { pos = curpos - skipms_from_curpos * (id3->filesize / id3->length); - //LOGF("сurpos relative seek: %d, curpos: %d, newtime: %d", pos, curpos, newtime); + //LOGF("curpos relative seek: %d, curpos: %d, newtime: %d", pos, curpos, newtime); } } else if (id3->bitrate) { pos = newtime * (id3->bitrate / 8); diff --git a/tools/creative.c b/tools/creative.c index faecafac6e..be717bf213 100644 --- a/tools/creative.c +++ b/tools/creative.c @@ -133,9 +133,9 @@ static const struct device_info devices[] = {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0e\0n\0 \0V\0i\0s\0i\0o\0n\0:\0M", 42, null_key_v2}, /* Creative Zen Vision:M Go! */ {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0e\0n\0 \0V\0i\0s\0i\0o\0n\0:\0M\0 \0G\0o\0!", 50, null_key_v2}, - /* Creative Zen Vision TL */ - /* The "" should be ANSI encoded or the device won't accept the firmware package. */ - {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0e\0n\0 \0V\0i\0s\0i\0o\0n\0 \0\0T\0L", 46, null_key_v2}, + /* Creative Zen Vision © TL */ + /* The "©" should be ANSI encoded or the device won't accept the firmware package. */ + {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0e\0n\0 \0V\0i\0s\0i\0o\0n\0 \0\xA9\0T\0L", 46, null_key_v2}, /* Creative ZEN V */ {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N\0 \0V", 42, null_key_v4}, /* Creative ZEN */ diff --git a/tools/mkzenboot.c b/tools/mkzenboot.c index e31bbd513c..cd324e1f06 100644 --- a/tools/mkzenboot.c +++ b/tools/mkzenboot.c @@ -998,7 +998,7 @@ int mkboot(const char* infile, const char* bootfile, const char* outfile, struct log_message("[INFO] Locating encoded block... "); i = 8; - while(memcmp(&out_buffer[i], " LT", 4) != 0 && i < ciff_size) + while(memcmp(&out_buffer[i], " LT\xA9", 4) != 0 && i < ciff_size) /* " LT©" */ { if(memcmp(&out_buffer[i], "FNIC", 4) == 0) i += 4+4+96; @@ -1017,7 +1017,7 @@ int mkboot(const char* infile, const char* bootfile, const char* outfile, struct } } - if(i > ciff_size || memcmp(&out_buffer[i], " LT", 4) != 0) + if(i > ciff_size || memcmp(&out_buffer[i], " LT\xA9", 4) != 0) /* " LT©" */ { log_message("Fail!\n[ERR] Couldn't find encoded block\n"); fclose(bootfd); |