Commit | Line | Data |
---|---|---|
0d6c69be DS |
1 | /* |
2 | * Copyright (c) 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | */ | |
7 | ||
8 | #if defined(LIBC_SCCS) && !defined(lint) | |
9 | static char sccsid[] = "@(#)multibyte.c 5.1 (Berkeley) %G%"; | |
10 | #endif /* LIBC_SCCS and not lint */ | |
11 | ||
12 | #include <stdlib.h> | |
13 | ||
14 | /* | |
15 | * Stub multibyte character functions. | |
16 | * These ignore the current fixed ("C") locale and | |
17 | * always indicate that no multibyte characters are supported. | |
18 | */ | |
19 | ||
20 | int | |
21 | mblen(s, n) | |
22 | const char *s; | |
23 | size_t n; | |
24 | { | |
25 | if (s && n && *s) | |
26 | return -1; | |
27 | return 0; | |
28 | } | |
29 | ||
30 | /*ARGSUSED*/ | |
31 | int | |
32 | mbtowc(pwc, s, n) | |
33 | wchar_t *pwc; | |
34 | const char *s; | |
35 | size_t n; | |
36 | { | |
37 | if (s && n && *s) | |
38 | return -1; | |
39 | return 0; | |
40 | } | |
41 | ||
42 | /*ARGSUSED*/ | |
43 | int | |
44 | #ifdef __STDC__ | |
45 | wctomb(char *s, wchar_t wchar) | |
46 | #else | |
47 | wctomb(s, wchar) | |
48 | char *s; | |
49 | wchar_t wchar; | |
50 | #endif | |
51 | { | |
52 | if (s) | |
53 | return -1; | |
54 | return 0; | |
55 | } | |
56 | ||
57 | /*ARGSUSED*/ | |
58 | size_t | |
59 | mbstowcs(pwcs, s, n) | |
60 | wchar_t *pwcs; | |
61 | const char *s; | |
62 | size_t n; | |
63 | { | |
64 | if (s && n && *s) | |
65 | return -1; | |
66 | return 0; | |
67 | } | |
68 | ||
69 | /*ARGSUSED*/ | |
70 | size_t | |
71 | wcstombs(s, pwcs, n) | |
72 | char *s; | |
73 | const wchar_t *pwcs; | |
74 | size_t n; | |
75 | { | |
76 | if (pwcs && n && *pwcs) | |
77 | return -1; | |
78 | return 0; | |
79 | } |