diff options
author | espie <> | 2005-08-08 08:05:37 +0000 |
---|---|---|
committer | espie <> | 2005-08-08 08:05:37 +0000 |
commit | d7398a270c9cd1b7b4d545ed70ea24384781a86c (patch) | |
tree | 5271cd28bf0b2aae56d5048737464cda4d24f702 /src/lib/libc/stdlib/multibyte.c | |
parent | 63dd09a8c91fcf1f022506ffd9fcf02dcb61818b (diff) | |
download | openbsd-d7398a270c9cd1b7b4d545ed70ea24384781a86c.tar.gz openbsd-d7398a270c9cd1b7b4d545ed70ea24384781a86c.tar.bz2 openbsd-d7398a270c9cd1b7b4d545ed70ea24384781a86c.zip |
zap remaining rcsid.
Kill old files that are no longer compiled.
okay theo
Diffstat (limited to 'src/lib/libc/stdlib/multibyte.c')
-rw-r--r-- | src/lib/libc/stdlib/multibyte.c | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/lib/libc/stdlib/multibyte.c b/src/lib/libc/stdlib/multibyte.c deleted file mode 100644 index ba878b8fdc..0000000000 --- a/src/lib/libc/stdlib/multibyte.c +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 1991 The Regents of the University of California. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * 1. Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * 2. Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * 3. Neither the name of the University nor the names of its contributors | ||
14 | * may be used to endorse or promote products derived from this software | ||
15 | * without specific prior written permission. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
27 | * SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | #if defined(LIBC_SCCS) && !defined(lint) | ||
31 | static char *rcsid = "$OpenBSD: multibyte.c,v 1.4 2003/06/02 20:18:38 millert Exp $"; | ||
32 | #endif /* LIBC_SCCS and not lint */ | ||
33 | |||
34 | #include <stdlib.h> | ||
35 | |||
36 | /* | ||
37 | * Stub multibyte character functions. | ||
38 | * This cheezy implementation is fixed to the native single-byte | ||
39 | * character set. | ||
40 | */ | ||
41 | |||
42 | int | ||
43 | mblen(s, n) | ||
44 | const char *s; | ||
45 | size_t n; | ||
46 | { | ||
47 | if (s == NULL || *s == '\0') | ||
48 | return 0; | ||
49 | if (n == 0) | ||
50 | return -1; | ||
51 | return 1; | ||
52 | } | ||
53 | |||
54 | /*ARGSUSED*/ | ||
55 | int | ||
56 | mbtowc(pwc, s, n) | ||
57 | wchar_t *pwc; | ||
58 | const char *s; | ||
59 | size_t n; | ||
60 | { | ||
61 | if (s == NULL) | ||
62 | return 0; | ||
63 | if (n == 0) | ||
64 | return -1; | ||
65 | if (pwc) | ||
66 | *pwc = (wchar_t) *s; | ||
67 | return (*s != '\0'); | ||
68 | } | ||
69 | |||
70 | /*ARGSUSED*/ | ||
71 | int | ||
72 | wctomb(char *s, wchar_t wchar) | ||
73 | { | ||
74 | if (s == NULL) | ||
75 | return 0; | ||
76 | |||
77 | *s = (char) wchar; | ||
78 | return 1; | ||
79 | } | ||
80 | |||
81 | /*ARGSUSED*/ | ||
82 | size_t | ||
83 | mbstowcs(pwcs, s, n) | ||
84 | wchar_t *pwcs; | ||
85 | const char *s; | ||
86 | size_t n; | ||
87 | { | ||
88 | int count = 0; | ||
89 | |||
90 | if (n != 0) { | ||
91 | do { | ||
92 | if ((*pwcs++ = (wchar_t) *s++) == 0) | ||
93 | break; | ||
94 | count++; | ||
95 | } while (--n != 0); | ||
96 | } | ||
97 | |||
98 | return count; | ||
99 | } | ||
100 | |||
101 | /*ARGSUSED*/ | ||
102 | size_t | ||
103 | wcstombs(s, pwcs, n) | ||
104 | char *s; | ||
105 | const wchar_t *pwcs; | ||
106 | size_t n; | ||
107 | { | ||
108 | int count = 0; | ||
109 | |||
110 | if (n != 0) { | ||
111 | do { | ||
112 | if ((*s++ = (char) *pwcs++) == 0) | ||
113 | break; | ||
114 | count++; | ||
115 | } while (--n != 0); | ||
116 | } | ||
117 | |||
118 | return count; | ||
119 | } | ||
120 | |||