1 /* Inline functions. */
4 alloc_xbuf(xbuf *xb, size_t sz)
6 if (!(xb->buf = new_array(char, sz)))
7 out_of_memory("alloc_xbuf");
13 realloc_xbuf(xbuf *xb, size_t sz)
15 char *bf = realloc_array(xb->buf, char, sz);
17 out_of_memory("realloc_xbuf");
23 to_wire_mode(mode_t mode)
26 #if _S_IFLNK != 0120000
28 return (mode & ~(_S_IFMT)) | 0120000;
35 from_wire_mode(int mode)
37 #if _S_IFLNK != 0120000
38 if ((mode & (_S_IFMT)) == 0120000)
39 return (mode & ~(_S_IFMT)) | _S_IFLNK;
45 isDigit(const char *ptr)
47 return isdigit(*(unsigned char *)ptr);
51 isPrint(const char *ptr)
53 return isprint(*(unsigned char *)ptr);
57 isSpace(const char *ptr)
59 return isspace(*(unsigned char *)ptr);
63 isLower(const char *ptr)
65 return islower(*(unsigned char *)ptr);
69 isUpper(const char *ptr)
71 return isupper(*(unsigned char *)ptr);
75 toLower(const char *ptr)
77 return tolower(*(unsigned char *)ptr);
81 toUpper(const char *ptr)
83 return toupper(*(unsigned char *)ptr);