Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
85ad847c
Commit
85ad847c
authored
5 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Address more GCC warnings unicode_to_cp437():
enumeration value '...' not handled in switch
parent
de4e3abd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/unicode.c
+18
-5
18 additions, 5 deletions
src/xpdev/unicode.c
with
18 additions
and
5 deletions
src/xpdev/unicode.c
+
18
−
5
View file @
85ad847c
...
...
@@ -348,6 +348,18 @@ char unicode_to_cp437(enum unicode_codepoint codepoint)
case
UNICODE_BROKEN_BAR
:
return
'|'
;
case
UNICODE_CENT_SIGN
:
return
CP437_CHAR_CENT_SIGN
;
case
UNICODE_POUND_SIGN
:
return
CP437_CHAR_POUND_SIGN
;
case
UNICODE_YEN_SIGN
:
return
CP437_CHAR_YEN_SIGN
;
case
UNICODE_SECTION_SIGN
:
return
CP437_CHAR_SECTION_SIGN
;
case
UNICODE_DEGREE_SIGN
:
return
CP437_CHAR_DEGREE_SIGN
;
case
UNICODE_PLUS_MINUS_SIGN
:
return
CP437_CHAR_PLUS_MINUS_SIGN
;
case
UNICODE_SUPERSCRIPT_TWO
:
return
CP437_CHAR_SUPERSCRIPT_TWO
;
case
UNICODE_PILCROW_SIGN
:
return
CP437_CHAR_PILCROW_SIGN
;
case
UNICODE_INVERTED_QUESTION_MARK
:
return
CP437_CHAR_INVERTED_QUESTION_MARK
;
case
UNICODE_INVERTED_EXCLAMATION_MARK
:
return
CP437_CHAR_INVERTED_EXCLAMATION_MARK
;
case
UNICODE_DOUBLE_EXCLAMATION_MARK
:
return
CP437_CHAR_DOUBLE_EXCLAMATION_MARK
;
// Perform Upper -> Lower case mapping where an upper case equivalent doesn't exist in CP437:
case
UNICODE_LATIN_CAPITAL_LETTER_A_WITH_GRAVE
:
return
CP437_CHAR_LATIN_SMALL_LETTER_A_WITH_GRAVE
;
case
UNICODE_LATIN_CAPITAL_LETTER_A_WITH_ACUTE
:
return
CP437_CHAR_LATIN_SMALL_LETTER_A_WITH_ACUTE
;
...
...
@@ -626,12 +638,13 @@ char unicode_to_cp437(enum unicode_codepoint codepoint)
case
0x2594
:
// Upper One Eighth Block
return
'\xDF'
;
}
// Look for a 1:1 match in the CP437 -> Unicode table
for
(
int
i
=
1
;
i
<
0x100
;
i
++
)
{
if
(
cp437_unicode_tbl
[
i
]
==
codepoint
)
return
i
;
default:
// Look for a 1:1 match in the CP437 -> Unicode table
for
(
int
i
=
1
;
i
<
0x100
;
i
++
)
{
if
(
cp437_unicode_tbl
[
i
]
==
codepoint
)
return
i
;
}
break
;
}
return
'\0'
;
// Not-mapped
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment