Home
last modified time | relevance | path

Searched refs:mbs (Results 1 – 25 of 60) sorted by relevance

123

/illumos-gate/usr/src/test/libc-tests/tests/
H A Duchar.c92 bzero(&mbs, sizeof (mbs)); in mbrtoc32_ascii_mbstate()
105 bzero(&mbs, sizeof (mbs)); in mbrtoc32_badseq_utf8()
125 bzero(&mbs, sizeof (mbs)); in mbrtoc32_badseq_utf8()
151 bzero(&mbs, sizeof (mbs)); in mbrtoc32_roundtrip()
187 bzero(&mbs, sizeof (mbs)); in mbrtoc32_partial()
219 bzero(&mbs, sizeof (mbs)); in mbrtoc32_zero()
243 bzero(&mbs, sizeof (mbs)); in mbrtoc32_zero_len()
267 bzero(&mbs, sizeof (mbs)); in mbrtoc32_null()
326 bzero(&mbs, sizeof (mbs)); in mbrtoc16_ascii_mbstate()
338 bzero(&mbs, sizeof (mbs)); in mbrtoc16_null()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/wcsrtombs/
H A Dwcsrtombs_test.c103 (void) memset(mbs, 0, sizeof (mbs)); in test_wcsrtombs_1()
104 cnt = wcsrtombs(mbs, &wcs, sizeof (mbs), &ms); in test_wcsrtombs_1()
109 if (strcmp(mbs, test[i].mbs) != 0) { in test_wcsrtombs_1()
111 mbs, test[i].mbs); in test_wcsrtombs_1()
149 (void) memset(mbs, 0, sizeof (mbs)); in test_wcsrtombs_l()
155 if (strcmp(mbs, test[i].mbs) != 0) { in test_wcsrtombs_l()
184 (void) memset(mbs, 0, sizeof (mbs)); in test_wcsrtombs_thr_iter()
190 if (strcmp(mbs, test[i].mbs) != 0) { in test_wcsrtombs_thr_iter()
243 dst = mbs; in test_wcsrtombs_partial()
291 dst = mbs; in test_wcsrtombs_negative()
[all …]
/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/
H A Dinsnstr.c47 (insnstr)(mbs, n)
48 const char *mbs;
65 const char *mbs; variable
84 const char *mbs; variable
100 (insstr)(mbs)
101 const char *mbs;
115 (mvinsstr)(y, x, mbs)
117 const char *mbs; variable
135 const char *mbs; variable
150 (winsstr)(w, mbs)
[all …]
H A Dgetwin.c48 get_cc(w, mbs, fp) in get_cc() argument
50 char *mbs;
66 if (mvwaddstr(w, y, x, mbs) == ERR)
78 char *mbs; local
113 while (get_cc(w, mbs, fp))
119 free(mbs);
125 free(mbs);
133 put_cc(w, y, x, mbs, len, fp) in put_cc() argument
136 char *mbs;
174 char *mbs; local
[all …]
H A Dkey_name.c56 static char mbs[MB_LEN_MAX+1]; in key_name() local
66 if ((len = wcstombs(mbs, ws, MB_LEN_MAX)) == (size_t) -1) in key_name()
69 mbs[len] = '\0'; in key_name()
72 __m_trace("key_name returned %p = \"%s\".", mbs, mbs); in key_name()
74 return mbs; in key_name()
H A Dwinsnstr.c47 winsnstr(w, mbs, n) in winsnstr() argument
49 const char *mbs;
57 __m_trace("winsnstr(%p, %p, n)", w, mbs, n);
72 for ( ; *mbs != '\0' && 0 < n; n -= i, mbs += i) {
73 if ((i = __m_mbs_cc(mbs, w->_bg._at, w->_bg._co, &cc)) < 0
H A Dm_cc.c53 char *mbs; member
64 sp->mbs[sp->used++] = byte;
76 wistombs(mbs, wis, n) in wistombs() argument
77 char *mbs; in wistombs()
86 string.mbs = mbs;
208 __m_cc_mbs(cc, mbs, n) in __m_cc_mbs() argument
210 char *mbs;
226 string.mbs = mbs;
293 for (start = mbs, have_one = i = 0; *mbs != '\0'; mbs += nbytes, ++i) { in __m_mbs_cc()
306 if (iscntrl(*mbs)) in __m_mbs_cc()
[all …]
H A Dwinnstr.c47 winnstr(w, mbs, n) in winnstr() argument
49 char *mbs;
55 __m_trace("winnstr(%p, %p, %d)", w, mbs, n);
65 (void) __m_cc_mbs(&w->_line[y][x], mbs, n);
/illumos-gate/usr/src/common/smbsrv/
H A Dsmb_utf8.c66 if (mbs == NULL || *mbs == '\0') { in smb_mbstowcs()
80 mbslen = strlen(mbs); in smb_mbstowcs()
201 *mbs = '\0'; in smb_wcstombs()
209 if (mbs == NULL) { in smb_wcstombs()
245 while (*mbs) { in smb_wcequiv_strlen()
249 mbs += bytes; in smb_wcequiv_strlen()
275 while (*mbs) { in smb_sbequiv_strlen()
299 mbs += nbytes; in smb_sbequiv_strlen()
360 char *obuf = mbs; in smb_oemtombs()
394 mbs[rlen] = '\0'; in smb_oemtombs()
[all …]
H A Dsmb_msgbuf.c381 char *mbs; in msgbuf_get_oem_string() local
427 mbs = smb_msgbuf_malloc(mb, mbsmax + 1); in msgbuf_get_oem_string()
428 if (mbs == NULL) in msgbuf_get_oem_string()
435 mbs[rlen] = '\0'; in msgbuf_get_oem_string()
436 *strpp = mbs; in msgbuf_get_oem_string()
451 char *mbs; in msgbuf_get_unicode_string() local
503 mbs = smb_msgbuf_malloc(mb, mbsmax + 1); in msgbuf_get_unicode_string()
504 if (mbs == NULL) in msgbuf_get_unicode_string()
511 mbs[rlen] = '\0'; in msgbuf_get_unicode_string()
512 *strpp = mbs; in msgbuf_get_unicode_string()
[all …]
/illumos-gate/usr/src/lib/libmlrpc/common/
H A Dndr_wchar.c58 return (ndr__mbstowcs_x(wcs, mbs, nwchars, in ndr__mbstowcs()
68 return (ndr__mbstowcs_x(wcs, mbs, nwchars, in ndr__mbstowcs_le()
83 if (mbs == NULL || *mbs == '\0') { in ndr__mbstowcs_x()
100 mbslen = strlen(mbs); in ndr__mbstowcs_x()
102 err = uconv_u8tou16((const uchar_t *)mbs, &mbslen, in ndr__mbstowcs_x()
124 if (mbs != NULL && nbytes > 0) in ndr__wcstombs()
125 *mbs = '\0'; in ndr__wcstombs()
133 if (mbs == NULL) { in ndr__wcstombs()
136 mbs = junk_mbs; in ndr__wcstombs()
142 (uchar_t *)mbs, &mbslen, UCONV_IN_SYSTEM_ENDIAN); in ndr__wcstombs()
[all …]
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/
H A Dinsnstr.c52 insnstr(const char *mbs, int n) in insnstr() argument
56 code = winsnstr(stdscr, mbs, n); in insnstr()
69 code = winsnstr(stdscr, mbs, n); in mvinsnstr()
82 code = winsnstr(w, mbs, n); in mvwinsnstr()
90 insstr(const char *mbs) in insstr() argument
94 code = winsnstr(stdscr, mbs, -1); in insstr()
102 mvinsstr(int y, int x, const char *mbs) in mvinsstr() argument
107 code = winsnstr(stdscr, mbs, -1); in mvinsstr()
120 code = winsnstr(w, mbs, -1); in mvwinsstr()
128 winsstr(WINDOW *w, const char *mbs) in winsstr() argument
[all …]
H A Dgetwin.c54 get_cc(WINDOW *w, char *mbs, FILE *fp) in get_cc() argument
63 if (fscanf(fp, "%[^\n]%n ", mbs, &n) < 1) in get_cc()
69 if (mvwaddstr(w, y, x, mbs) == ERR) in get_cc()
80 char *mbs; in getwin() local
110 while (get_cc(w, mbs, fp)) in getwin()
116 free(mbs); in getwin()
122 free(mbs); in getwin()
131 char *mbs, int len, FILE *fp) in put_cc() argument
150 (void) __m_cc_mbs(&w->_line[y][i], mbs, 0); in put_cc()
165 char *mbs; in putwin() local
[all …]
H A Dslk.c337 char mbs[_LABEL_LENGTH_MALLOC]; in slk_wset() local
370 (void) strcpy(mbs, tmbs); in slk_wset()
374 (void) strcpy(mbs, tmbs); in slk_wset()
375 (void) strncat(mbs, spcs, (8 - width)); in slk_wset()
376 *(mbs + strlen(tmbs) + (8 - width)) = '\0'; in slk_wset()
380 (void) strncpy(mbs, spcs, left1); in slk_wset()
381 (void) strcpy(mbs + left1, tmbs); in slk_wset()
383 (void) strncat(mbs, spcs, left2); in slk_wset()
388 (void) strncpy(mbs, spcs, left1); in slk_wset()
389 (void) strcpy(mbs + left1, tmbs); in slk_wset()
[all …]
H A Dkey_name.c57 static char mbs[MB_LEN_MAX + 1]; in key_name() local
64 if ((len = wcstombs(mbs, ws, MB_LEN_MAX)) == (size_t) -1) in key_name()
67 mbs[len] = '\0'; in key_name()
69 return (mbs); in key_name()
H A Dwinsnstr.c52 winsnstr(WINDOW *w, const char *mbs, int n) in winsnstr() argument
71 for (; *mbs != '\0' && 0 < n; n -= i, mbs += i) { in winsnstr()
72 if ((i = __m_mbs_cc(mbs, w->_bg._at, w->_fg._co, &cc)) in winsnstr()
/illumos-gate/usr/src/cmd/iconv/
H A Dcharmap.c270 if (sym == NULL || mbs == NULL) { in add_charmap_impl()
369 add_charmap(char *sym, char *mbs) in add_charmap() argument
372 int mbs_len = *mbs++; in add_charmap()
374 add_charmap_impl(sym, mbs, mbs_len, 1); in add_charmap()
396 mbs_len = *mbs++; in add_charmap_range()
398 (void) memcpy(tmbs, mbs, mbs_len); in add_charmap_range()
432 char mbs[MB_LEN_MAX+1]; in add_charmap_char() local
434 mbs[0] = c; in add_charmap_char()
435 mbs[1] = '\0'; in add_charmap_char()
436 add_charmap_impl(name, mbs, 1, 0); in add_charmap_char()
[all …]
H A Dscanner.c311 char *mbs = &yylval.mbs[1]; in get_wide() local
315 mbs[mbi] = 0; in get_wide()
328 mbs[mbi++] = c; in get_wide()
329 mbs[mbi] = 0; in get_wide()
333 mbs[-1] = mbi; in get_wide()
461 yylval.mbs[0] = 1; /* length */ in consume_token()
462 yylval.mbs[1] = token[0]; in consume_token()
463 yylval.mbs[2] = '\0'; in consume_token()
512 yylval.mbs[2] = '\0'; in yylex()
530 yylval.mbs[1] = c; in yylex()
[all …]
/illumos-gate/usr/src/cmd/smbsrv/test-msgbuf/
H A Dtest_conv.c48 char mbs[8]; in conv_wctomb() local
51 len = smb_wctomb(mbs, U_FW_A); in conv_wctomb()
56 mbs[len] = '\0'; in conv_wctomb()
57 if (strcmp(mbs, fwA)) { in conv_wctomb()
59 hexdump((uchar_t *)mbs, len+1); in conv_wctomb()
63 len = smb_wctomb(mbs, U_POOP); in conv_wctomb()
68 mbs[len] = '\0'; in conv_wctomb()
69 if (strcmp(mbs, poop)) { in conv_wctomb()
71 hexdump((uchar_t *)mbs, len+1); in conv_wctomb()
76 len = smb_wctomb(mbs, 0); in conv_wctomb()
[all …]
/illumos-gate/usr/src/lib/libc/port/regex/
H A Dregexec.c63 xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy) in xmbrtowc() argument
68 nr = mbrtowc(&wc, s, n, mbs); in xmbrtowc()
74 (void) memset(mbs, 0, sizeof (*mbs)); in xmbrtowc()
83 xmbrtowc_dummy(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, in xmbrtowc_dummy() argument
87 _NOTE(ARGUNUSED(mbs)); in xmbrtowc_dummy()
119 #define ZAPSTATE(mbs) ((void)(mbs)) argument
174 #define ZAPSTATE(mbs) ((void)(mbs)) argument
185 #define ZAPSTATE(mbs) (void) memset((mbs), 0, sizeof (*(mbs))) argument
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dwcsftime.c65 mbstate_t mbs; in __wcsftime_xpg5() local
78 mbs = initial; in __wcsftime_xpg5()
80 sflen = wcsrtombs(NULL, &formatp, 0, &mbs); in __wcsftime_xpg5()
85 mbs = initial; in __wcsftime_xpg5()
86 (void) wcsrtombs(sformat, &formatp, sflen + 1, &mbs); in __wcsftime_xpg5()
104 mbs = initial; in __wcsftime_xpg5()
105 n = mbsrtowcs(wcs, &dstp, maxsize, &mbs); in __wcsftime_xpg5()
H A Dmbftowc.c41 mbstate_t mbs; in _mbftowc() local
55 (void) memset(&mbs, 0, sizeof (mbs)); in _mbftowc()
56 cons = mbrtowc(wc, start, s - start, &mbs); in _mbftowc()
H A Dmbrtowc.c39 static mbstate_t mbs; in mbrtowc_l() local
42 ps = &mbs; in mbrtowc_l()
57 static mbstate_t mbs; in mbrtowc_nz_l() local
60 ps = &mbs; in mbrtowc_nz_l()
/illumos-gate/usr/src/cmd/make/bin/
H A Dmacro.cc116 char *mbs, *tmp_mbs_buffer = NULL; in setvar_envvar() local
129 mbs = tmp_mbs_buffer = getmem((length + 1) * MB_LEN_MAX); in setvar_envvar()
130 (void) wcstombs(mbs, in setvar_envvar()
134 mbs = mbs_buffer; in setvar_envvar()
135 WCSTOMBS(mbs, value.buffer.start); in setvar_envvar()
137 length = 2 + strlen(p->name->string_mb) + strlen(mbs); in setvar_envvar()
146 mbs); in setvar_envvar()
/illumos-gate/usr/src/test/libc-tests/tests/stdio/
H A Dtest_mbrtowc.c25 static mbstate_t mbs; variable
34 sz = mbrtowc(&wc, in, insz, &mbs); in onetest()
40 if (mbsinit(&mbs) == (insz && outsz == (size_t)-2)) in onetest()
45 memset(&mbs, 0, sizeof (mbs)); in onetest()

123