summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-15 14:26:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-16 11:12:31 +0200
commit87c90cec38c43efbbd9cbfad1f0f607f428043d4 (patch)
treeb65b6ccc78a4a922c027f98e4d8ab5251fdf33bb /i18npool
parent9b34dc20b6946698ae6ce2d5d859885bfb444633 (diff)
fix some *printf which are using "%l" ie. long specifiers
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx6
-rw-r--r--i18npool/source/textconversion/genconv_dict.cxx10
2 files changed, 8 insertions, 8 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index e5123969644c..da2acce25ba4 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -156,9 +156,9 @@ OUString LocaleNode::writeParameterCheckLen( const OFileWriter &of,
if (nLen < nMinLen)
{
++nError;
- fprintf( stderr, "Error: less than %ld character%s (%ld) in %s '%s'.\n",
- sal::static_int_cast< long >(nMinLen), (nMinLen > 1 ? "s" : ""),
- sal::static_int_cast< long >(nLen),
+ fprintf( stderr, "Error: less than %" SAL_PRIdINT32 " character%s (%" SAL_PRIdINT32 ") in %s '%s'.\n",
+ nMinLen, (nMinLen > 1 ? "s" : ""),
+ nLen,
(pNode ? OSTR( pNode->getName()) : ""),
OSTR( aVal));
}
diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx
index 5cfd458090f6..66d9c5d62d73 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -357,7 +357,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
OUString Ostr(Cstr, strlen(Cstr) - 1, RTL_TEXTENCODING_UTF8);
sal_Int32 len = Ostr.getLength();
if (char_total + len + 1 > 0xFFFF) {
- fprintf(stderr, "Word Dictionary stc_word.dic is too big (line %ld)", sal::static_int_cast< long >(line));
+ fprintf(stderr, "Word Dictionary stc_word.dic is too big (line %" SAL_PRIdINT32 ")", line);
return;
}
sal_Int32 sep=-1, eq=-1, gt=-1, lt=-1;
@@ -379,7 +379,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
STC_WordData[char_total++] = (i == sep) ? 0 : Ostr[i];
STC_WordData[char_total++] = 0;
} else {
- fprintf(stderr, "Invalid entry in stc_word.dic (line %ld)", sal::static_int_cast< long >(line));
+ fprintf(stderr, "Invalid entry in stc_word.dic (line %" SAL_PRIdINT64 ")", sal_Int64(line));
return;
}
line++;
@@ -393,7 +393,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
}
fprintf(cfp, "\n};\n");
- fprintf(cfp, "\nstatic sal_Int32 STC_WordData_Count = %ld;\n", sal::static_int_cast< long >(char_total));
+ fprintf(cfp, "\nstatic sal_Int32 STC_WordData_Count = %" SAL_PRIdINT32 ";\n", sal_Int32(char_total));
// create function to return arrays
fprintf (cfp, "\tconst sal_Unicode* getSTC_WordData(sal_Int32& count) { count = STC_WordData_Count; return STC_WordData; }\n");
@@ -428,7 +428,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
}
fprintf(cfp, "\n};\n");
- fprintf(cfp, "\nstatic sal_Int32 STC_WordIndex_S2T_Count = %ld;\n", sal::static_int_cast< long >(length));
+ fprintf(cfp, "\nstatic sal_Int32 STC_WordIndex_S2T_Count = %" SAL_PRIdINT64 ";\n", sal_Int64(length));
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordEntry_S2T() { return STC_WordEntry_S2T; }\n");
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordIndex_S2T(sal_Int32& count) { count = STC_WordIndex_S2T_Count; return STC_WordIndex_S2T; }\n");
} else {
@@ -461,7 +461,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
}
fprintf(cfp, "\n};\n");
- fprintf(cfp, "\nstatic sal_Int32 STC_WordIndex_T2S_Count = %ld;\n\n", sal::static_int_cast< long >(length));
+ fprintf(cfp, "\nstatic sal_Int32 STC_WordIndex_T2S_Count = %" SAL_PRIdINT64 ";\n\n", sal_Int64(length));
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordEntry_T2S() { return STC_WordEntry_T2S; }\n");
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordIndex_T2S(sal_Int32& count) { count = STC_WordIndex_T2S_Count; return STC_WordIndex_T2S; }\n");
} else {