summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2021-01-25 22:15:22 +0100
committerpgen <p.gen.progs@gmail.com>2021-01-25 22:24:07 +0100
commiteb8bdf67ce2db9b530b747efaa625396ad3cb500 (patch)
tree99e4c2103aa04aa9f3e4f41a04544053aecc58e6 /utf8.c
parent50bd576a0e4b297c19fd366cfc5e1c69092aa29c (diff)
Typoes
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/utf8.c b/utf8.c
index 6193bde..d33e9ab 100644
--- a/utf8.c
+++ b/utf8.c
@@ -66,14 +66,14 @@ cptoutf8(char * utf8_str, uint32_t c)
}
/* ======================================================================= */
-/* Unicode (UTF-8) ascii representation interpreter. */
+/* Unicode (UTF-8) ASCII representation interpreter. */
/* The string passed will be altered but its address will not change. */
/* All hexadecimal sequences of \uxx, \uxxxx, \uxxxxxx and \uxxxxxxxx will */
/* be replaced by the corresponding UTF-8 character when possible. */
/* All hexadecimal sequences of \Uxxxxxx will be replaced with the UTF-8 */
/* sequence corresponding to the given UCS-4 codepoint. */
/* When not possible the substitution character is substituted in place. */
-/* Returns 0 if the conversion has faild else 1. */
+/* Returns 0 if the conversion has failed else 1. */
/* ======================================================================= */
int
utf8_interpret(char * s, langinfo_t * langinfo, char substitute)
@@ -104,7 +104,7 @@ utf8_interpret(char * s, langinfo_t * langinfo, char substitute)
int len;
int n;
uint32_t cp;
- int subst; /* 0, the \U sequance is valid, else 1. */
+ int subst; /* 0, the \U sequence is valid, else 1. */
utf8_to_eos_len = strlen(utf8_str);
utf8_str_len = 0;
@@ -170,8 +170,8 @@ utf8_interpret(char * s, langinfo_t * langinfo, char substitute)
unsigned byte;
char * utf8_seq_offset = utf8_str + 2;
- /* Get the first 2 utf8 bytes. */
- /* """"""""""""""""""""""""""" */
+ /* Get the first 2 UTF-8 bytes. */
+ /* """""""""""""""""""""""""""" */
*tmp = *utf8_seq_offset;
*(tmp + 1) = *(utf8_seq_offset + 1);
*(tmp + 2) = '\0';