Lines Matching refs:chbuf
26 * Many functions defined here use a "char" buffer chbuf[]. In the
27 * first attempt, there used to be only one chbuf defined as static
31 * This bug seemed to be caused by sharing of chbuf
34 * have each of these function its private instance of chbuf.
35 * The size of chbuf[] might be much bigger than necessary for some functions.
367 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
369 tstostr(chbuf, name_);
370 fd = creat((char *)chbuf, mode);
384 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
387 tstostr(chbuf, path_);
388 fd = open((char *)chbuf, flags, mode);
402 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
404 tstostr(chbuf, name_);
405 fd = mkstemp((char *)chbuf);
408 strtots(name_, chbuf);
422 unsigned char chbuf[BUFSIZ * MB_LEN_MAX]; /* General use buffer. */
447 * nchreq characters into chbuf.
455 p = s = chbuf;
468 * chbuf[]: b0 b1 ..... bN bN+1 bN+2 bN+2 ...
478 * chbuf[]: b0 b1 ..... bN bN+1 bN+2 bN+2 ... bX bX+1 bX+2...
487 assert(p + m < chbuf + sizeof (chbuf));
594 assert((q + 1) < (chbuf + sizeof (chbuf)));
638 nchread = read(d, (char *)chbuf, nchreq);
660 for (i = 0, t = buf, s = chbuf; i < nchread; ++i) {
679 unsigned char chbuf[BUFSIZ*MB_LEN_MAX]; /* General use buffer. */
690 assert(nch * MB_CUR_MAX < sizeof (chbuf));
693 pc = chbuf;
710 return (write(d, chbuf, pc - chbuf));
721 assert(nch <= sizeof (chbuf));
722 for (i = 0, t = buf, s = chbuf; i < nch; ++i) {
725 return (write(d, (char *)chbuf, nch));
729 #undef chbuf
740 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
742 tstostr(chbuf, path);
743 return (stat((char *)chbuf, buf));
749 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
751 tstostr(chbuf, path);
752 return (lstat((char *)chbuf, buf));
758 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
760 tstostr(chbuf, path);
761 return (chdir((char *)chbuf));
767 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
770 rc = (int)getwd((char *)chbuf);
774 return (strtots(path, chbuf));
781 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
783 tstostr(chbuf, path);
784 return (unlink((char *)chbuf));
790 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
795 dir = opendir(tstostr(chbuf, dirname));
816 char chbuf[BUFSIZ * MB_LEN_MAX]; /* General use buffer. */
819 if (gethostname((char *)chbuf, sizeof (chbuf)) != 0) {
822 if (mbstotcs(name, chbuf, namelen) < 0) {
831 char chbuf[MAXPATHLEN * MB_LEN_MAX]; /* General use buffer. */
836 i = readlink(chpath, (char *)chbuf, sizeof (chbuf));
840 chbuf[i] = (char)0; /* readlink() doesn't put NULL. */
841 i = mbstotcs(buf, chbuf, bufsiz);
853 char chbuf[BUFSIZ * MB_LEN_MAX]; /* General use buffer. */
854 char *c = chbuf;
856 (void) tstostr(chbuf, str);
868 char chbuf[BUFSIZ * MB_LEN_MAX]; /* General use buffer. */
870 tstostr(chbuf, str);
871 return (atoi((char *)chbuf));