aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/wcsmbsload.c10
-rw-r--r--wcsmbs/wmemset.c22
2 files changed, 21 insertions, 11 deletions
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
index 725652d..b16aa6c 100644
--- a/wcsmbs/wcsmbsload.c
+++ b/wcsmbs/wcsmbsload.c
@@ -46,6 +46,11 @@ static struct gconv_step to_wc =
fct: __gconv_transform_ascii_internal,
init_fct: NULL,
end_fct: NULL,
+ min_needed_from: 1,
+ max_needed_from: 1,
+ min_needed_to: 4,
+ max_needed_to: 4,
+ stateful: 0,
data: NULL
};
@@ -59,6 +64,11 @@ static struct gconv_step to_mb =
fct: __gconv_transform_internal_ascii,
init_fct: NULL,
end_fct: NULL,
+ min_needed_from: 4,
+ max_needed_from: 4,
+ min_needed_to: 1,
+ max_needed_to: 1,
+ stateful: 0,
data: NULL
};
diff --git a/wcsmbs/wmemset.c b/wcsmbs/wmemset.c
index 42ff55b..c0812cf 100644
--- a/wcsmbs/wmemset.c
+++ b/wcsmbs/wmemset.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Dreppere <drepper@gnu.ai.mit.edu>, 1996.
+ Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -40,16 +40,16 @@ wmemset (s, c, n)
if (n > 0)
{
- *wp++ = c;
- --n;
- }
- if (n > 0)
- {
- *wp++ = c;
- --n;
+ wp[0] = c;
+
+ if (n > 1)
+ {
+ wp[1] = c;
+
+ if (n > 2)
+ wp[2] = c;
+ }
}
- if (n > 0)
- *wp = c;
return s;
}