projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test-update-copyright.sh: avoid false-positive failure
[gnulib.git]
/
lib
/
uninorm
/
composition.c
diff --git
a/lib/uninorm/composition.c
b/lib/uninorm/composition.c
index
bed8df5
..
23868ba
100644
(file)
--- a/
lib/uninorm/composition.c
+++ b/
lib/uninorm/composition.c
@@
-1,5
+1,5
@@
/* Canonical composition of Unicode characters.
/* Canonical composition of Unicode characters.
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009
, 2011
Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
@@
-22,14
+22,14
@@
#include <string.h>
#include <string.h>
-struct composition_rule { char codes[
4]; unsigned shor
t combined; };
+struct composition_rule { char codes[
6]; unsigned in
t combined; };
#include "composition-table.h"
ucs4_t
uc_composition (ucs4_t uc1, ucs4_t uc2)
{
#include "composition-table.h"
ucs4_t
uc_composition (ucs4_t uc1, ucs4_t uc2)
{
- if (uc1 < 0x1
0000 && uc2 < 0x10
000)
+ if (uc1 < 0x1
2000 && uc2 < 0x12
000)
{
if (uc2 >= 0x1161 && uc2 < 0x1161 + 21
&& uc1 >= 0x1100 && uc1 < 0x1100 + 19)
{
if (uc2 >= 0x1161 && uc2 < 0x1161 + 21
&& uc1 >= 0x1100 && uc1 < 0x1100 + 19)
@@
-67,15
+67,17
@@
uc_composition (ucs4_t uc1, ucs4_t uc2)
}
}
#else
}
}
#else
- char codes[
4
];
+ char codes[
6
];
const struct composition_rule *rule;
const struct composition_rule *rule;
- codes[0] = (uc1 >> 8) & 0xff;
- codes[1] = uc1 & 0xff;
- codes[2] = (uc2 >> 8) & 0xff;
- codes[3] = uc2 & 0xff;
+ codes[0] = (uc1 >> 16) & 0xff;
+ codes[1] = (uc1 >> 8) & 0xff;
+ codes[2] = uc1 & 0xff;
+ codes[3] = (uc2 >> 16) & 0xff;
+ codes[4] = (uc2 >> 8) & 0xff;
+ codes[5] = uc2 & 0xff;
- rule = gl_uninorm_compose_lookup (codes,
4
);
+ rule = gl_uninorm_compose_lookup (codes,
6
);
if (rule != NULL)
return rule->combined;
#endif
if (rule != NULL)
return rule->combined;
#endif