projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced with <unistd.h>.
[gnulib.git]
/
lib
/
striconveh.c
diff --git
a/lib/striconveh.c
b/lib/striconveh.c
index
c1ef0b1
..
56c0c04
100644
(file)
--- a/
lib/striconveh.c
+++ b/
lib/striconveh.c
@@
-28,12
+28,11
@@
#if HAVE_ICONV
# include <iconv.h>
#if HAVE_ICONV
# include <iconv.h>
-# include "utf8-ucs4
-safe
.h"
+# include "utf8-ucs4.h"
# include "ucs4-utf8.h"
# include "unistr.h"
#endif
# include "ucs4-utf8.h"
# include "unistr.h"
#endif
-#include "strdup.h"
#include "c-strcase.h"
#include "c-strcaseeq.h"
#include "c-strcase.h"
#include "c-strcaseeq.h"
@@
-201,7
+200,7
@@
mem_cd_iconveh_internal (const char *src, size_t srclen,
size_t length;
size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
size_t length;
size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
- if (*lengthp >= sizeof (tmpbuf))
+ if (*
resultp != NULL && *
lengthp >= sizeof (tmpbuf))
{
initial_result = *resultp;
allocated = *lengthp;
{
initial_result = *resultp;
allocated = *lengthp;
@@
-482,7
+481,7
@@
mem_cd_iconveh_internal (const char *src, size_t srclen,
int n;
int m;
int n;
int m;
- n = u8_mbtouc
_safe
(&uc, (const uint8_t *) in1ptr, in1size);
+ n = u8_mbtouc (&uc, (const uint8_t *) in1ptr, in1size);
if (uc == 0xfffd
&& !(n >= 3
&& (uint8_t)in1ptr[0] == 0xEF
if (uc == 0xfffd
&& !(n >= 3
&& (uint8_t)in1ptr[0] == 0xEF
@@
-644,8
+643,8
@@
mem_cd_iconveh_internal (const char *src, size_t srclen,
int n;
if (in2size == 0)
abort ();
int n;
if (in2size == 0)
abort ();
- n = u8_mbtouc (&uc, (const uint8_t *) in2ptr,
- in2size);
+ n = u8_mbtouc
_unsafe
(&uc, (const uint8_t *) in2ptr,
+
in2size);
in2ptr += n;
in2size -= n;
}
in2ptr += n;
in2size -= n;
}