summaryrefslogtreecommitdiff
path: root/utils/idna.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-03-17 21:55:12 +0000
committerVincent Sanders <vince@kyllikki.org>2016-03-17 22:00:54 +0000
commitd15ab96a51287469082e8d9068e2608a386f9e5f (patch)
tree346fb22044567be929d9f0dc47f62732f4633815 /utils/idna.c
parent232cda5317ae39d54852f741fbbd09c9618143cd (diff)
downloadnetsurf-d15ab96a51287469082e8d9068e2608a386f9e5f.tar.gz
netsurf-d15ab96a51287469082e8d9068e2608a386f9e5f.tar.bz2
Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows it is %Iu this is solved by adding and inttypes style PRI macro for size_t This also uses this macro everywhere size_t is formatted.
Diffstat (limited to 'utils/idna.c')
-rw-r--r--utils/idna.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/idna.c b/utils/idna.c
index 2d1bb4ccb..545eff90d 100644
--- a/utils/idna.c
+++ b/utils/idna.c
@@ -453,14 +453,14 @@ static bool idna__is_valid(int32_t *label, size_t len)
/* 4. Check characters not DISALLOWED by RFC5892 */
if (idna_prop == IDNA_P_DISALLOWED) {
- LOG("Check failed: character %zd (%x) is DISALLOWED", i, label[i]);
+ LOG("Check failed: character %" PRIsizet " (%x) is DISALLOWED", i, label[i]);
return false;
}
/* 5. Check CONTEXTJ characters conform to defined rules */
if (idna_prop == IDNA_P_CONTEXTJ) {
if (idna__contextj_rule(label, i, len) == false) {
- LOG("Check failed: character %zd (%x) does not conform to CONTEXTJ rule", i, label[i]);
+ LOG("Check failed: character %" PRIsizet " (%x) does not conform to CONTEXTJ rule", i, label[i]);
return false;
}
}
@@ -469,14 +469,14 @@ static bool idna__is_valid(int32_t *label, size_t len)
/** \todo optionally we can check conformance to this rule */
if (idna_prop == IDNA_P_CONTEXTO) {
if (idna__contexto_rule(label[i]) == false) {
- LOG("Check failed: character %zd (%x) has no CONTEXTO rule defined", i, label[i]);
+ LOG("Check failed: character %" PRIsizet " (%x) has no CONTEXTO rule defined", i, label[i]);
return false;
}
}
/* 7. Check characters are not UNASSIGNED */
if (idna_prop == IDNA_P_UNASSIGNED) {
- LOG("Check failed: character %zd (%x) is UNASSIGNED", i, label[i]);
+ LOG("Check failed: character %" PRIsizet " (%x) is UNASSIGNED", i, label[i]);
return false;
}