/ast/src/lib/libcs/ |
H A D | msgname.c | 33 static char buf[12]; local 37 sfsprintf(buf, sizeof(buf), "user_%d", n); 38 return (const char*)buf; 45 sfsprintf(buf, sizeof(buf), "f%s", msg_info.name[n]); 46 return (const char*)buf; 50 sfsprintf(buf, sizeof(buf), "ipc%s", msg_info.name[n]); 51 return (const char*)buf; [all...] |
H A D | msgbuf.c | 29 * get encoded unsigned long from buf 33 msggetu(char** buf, char* end) argument 41 s = (unsigned char*)*buf; 49 *buf = (char*)s; 54 * encode unsigned long into buf 58 msgputu(char** buf, char* end, register unsigned long v) argument 70 if ((s = *buf) + n >= end) 83 *buf = s; 88 * copy <data,size> from buf 92 msggetz(char** buf, cha argument 111 msgputz(char** buf, char* end, void* data, size_t size) argument [all...] |
H A D | cswrite.c | 31 cswrite(register Cs_t* state, int fd, const void* buf, register size_t n) argument 33 register char* p = (char*)buf; 38 messagef((state->id, NiL, -9, "write(%d,%d) `%-.*s'", fd, n, n - 1, (n > 0 && *((char*)buf + n - 1) == '\n') ? (char*)buf : "...")); 42 if (i && p == (char*)buf) 49 return p - (char*)buf; 53 _cs_write(int fd, const void* buf, size_t n) argument 55 return cswrite(&cs, fd, buf, n);
|
/ast/src/lib/libast/string/ |
H A D | fmttime.c | 35 char* buf; local 38 buf = fmtbuf(z = 80); 39 tmfmt(buf, z, format, &clock); 40 return buf;
|
H A D | fmtsignal.c | 37 char* buf; local 43 buf = sig_info.text[sig]; 46 buf = fmtbuf(z = 20); 47 sfsprintf(buf, z, "Signal %d", sig); 54 buf = sig_info.name[sig]; 57 buf = fmtbuf(z = 20); 58 sfsprintf(buf, z, "%d", sig); 61 return buf;
|
H A D | fmtdev.c | 37 char* buf; local 46 buf = fmtbuf(z = 17); 53 buf[0] = ma; 54 buf[1] = mi; 55 buf[2] = 0; 58 sfsprintf(buf, z, "%03d,%03d", ma, mi); 59 return buf;
|
H A D | fmtip4.c | 34 char* buf; local 38 buf = fmtbuf(z = 20); 39 i = sfsprintf(buf, z, "%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8)&0xff, (addr)&0xff); 41 sfsprintf(buf + i, z - i, "/%d", bits); 42 return buf;
|
H A D | fmtbuf.c | 30 * only one concurrent buffer with size > sizeof(buf) 33 static char buf[16 * 1024]; variable 34 static char* nxt = buf; 47 if (n > (&buf[elementsof(buf)] - nxt)) 49 if (n > elementsof(buf)) 63 nxt = buf;
|
/ast/src/cmd/tests/sfio/ |
H A D | tresize.c | 25 char buf[8*1024]; local 34 for(i = 0; i < sizeof(buf); ++i) 35 buf[i] = '1'; 38 if(sfwrite(f, buf, sizeof(buf)) != sizeof(buf) ) 45 if(sfsize(f) != (s = 1024*sizeof(buf)) ) 48 if(sfresize(f, s + sizeof(buf)) < 0) 50 if(sfsize(f) != s+sizeof(buf)) 54 if(sfread(f,buf,sizeo [all...] |
H A D | tsetbuf.c | 31 char *s, buf[1024]; local 34 buf[0] = 0; 35 sfsetbuf(sfstdout,buf,sizeof(buf)); 41 if(strcmp(buf,"123456789") != 0) 49 if(write(fd,buf,sizeof(buf)) != sizeof(buf)) 54 if(!(f = sfnew((Sfio_t*)0,buf,sizeof(buf),f [all...] |
/ast/src/lib/libast/path/ |
H A D | pathnative.c | 27 * convert path to native fs representation in <buf,siz> 29 * if return length >= siz then buf is indeterminate, but another call 31 * if buf==0 then required size is returned 41 pathnative(const char* path, char* buf, size_t siz) argument 43 return uwin_path(path, buf, siz); 53 pathnative(const char* path, char* buf, size_t siz) argument 57 if (!buf || siz < PATH_MAX) 62 if ((n = strlen(tmp)) < siz && buf) 63 memcpy(buf, tmp, n + 1); 66 cygwin_conv_to_win32_path(path, buf); 75 pathnative(const char* path, char* buf, size_t siz) argument 98 pathnative(const char* path, char* buf, size_t siz) argument 111 pathnative(const char* path, char* buf, size_t siz) argument [all...] |
H A D | pathposix.c | 27 * convert native path to posix fs representation in <buf,siz> 29 * if return length >= siz then buf is indeterminate, but another call 31 * if buf==0 then required size is returned 41 pathposix(const char* path, char* buf, size_t siz) argument 43 return uwin_unpath(path, buf, siz); 53 pathposix(const char* path, char* buf, size_t siz) argument 57 if (!buf || siz < PATH_MAX) 62 if ((n = strlen(tmp)) < siz && buf) 63 memcpy(buf, tmp, n + 1); 66 cygwin_conv_to_posix_path(path, buf); 75 pathposix(const char* path, char* buf, size_t siz) argument 98 pathposix(const char* path, char *buf, size_t siz) argument 113 pathposix(const char* path, char* buf, size_t siz) argument [all...] |
/ast/src/lib/libast/comp/ |
H A D | mktemp.c | 44 temp(char* buf, int* fdp) argument 51 len = strlen(buf); 52 if (s = strrchr(buf, '/')) 55 d = buf; 59 s = buf; 63 *buf = 0; 67 if (!pathtemp(buf, len, d, s, fdp)) 68 *buf = 0; 70 return buf; 74 mktemp(char* buf) argument 80 mkstemp(char* buf) argument [all...] |
/ast/src/cmd/pax/ |
H A D | pax-vczip.c | 29 vczip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument 31 if (size < 4 || buf[0] != 0326 || buf[1] != 0303 || buf[2] != 0304 || buf[3] && buf[3] != 0330)
|
/ast/src/lib/libast/stdio/ |
H A D | _stdvbuf.c | 29 _stdsetvbuf(Sfio_t* f, char* buf, int type, size_t size) argument 31 return setvbuf(f, buf, type, size);
|
/ast/src/lib/libast/tm/ |
H A D | tmform.c | 37 * end of buf is returned 41 tmform(char* buf, const char* format, time_t* clock) argument 43 return tmfmt(buf, 256, format, clock);
|
H A D | tmfmt.c | 33 * format date given clock into buf of length len 38 tmfmt(char* buf, size_t len, const char* format, time_t* clock) argument 40 return tmxfmt(buf, len, format, tmxclock(clock));
|
/ast/src/lib/libast/vec/ |
H A D | vecstring.c | 40 register char* buf; local 43 if (!str || !*str || !(buf = strdup(str))) vec = 0; 44 else if (!(vec = vecload(buf))) free(buf);
|
H A D | vecfile.c | 42 register char* buf; local 50 if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1, 0))) 52 if (read(fd, buf, n) == n) 54 buf[n] = 0; 55 vec = vecload(buf); 57 if (!vec) free(buf);
|
/ast/src/lib/libast/astsa/ |
H A D | ast.c | 49 static char* buf; local 52 if (!buf) 55 if (!(buf = newof(0, char, siz, 0))) 59 return *buf ? buf : (char*)0; 60 s = buf; 67 if (!(buf = newof(buf, char, siz, 0))) 69 s = buf + (siz - CHUNK); 84 return buf; [all...] |
/ast/src/lib/libast/regex/ |
H A D | regfatal.c | 35 char buf[128]; local 37 regerror(code, p, buf, sizeof(buf)); 40 error(level, "regular expression: %s: %s", pat, buf); 42 error(level, "regular expression: %s", buf);
|
/ast/src/lib/libcodex/ |
H A D | codexpass.c | 25 * return password buf 27 * return >= n : n-1 in buf 33 codexpass(void* buf, size_t n, Codexdisc_t* disc, Codexmeth_t* meth) argument 38 return strncopy((char*)buf, disc->passphrase, n) - (char*)buf; 40 return (*disc->passf)(buf, n, disc, meth); 42 return codexgetpass(prompt, buf, n);
|
/ast/src/lib/libdll/ |
H A D | dlllook.c | 38 char buf[256]; local 40 if (!(addr = dlsym(dll, name)) && strlen(name) < (sizeof(buf) - 2)) 42 buf[0] = '_'; 43 strcpy(buf + 1, name); 44 name = (const char*)buf;
|
/ast/src/cmd/cs/vcs_src/ |
H A D | mnt_mount.c | 33 char* checkfs(data, buf, size) 35 char* buf; 44 strcpy(buf, data); 45 return(buf); 53 sfsprintf( buf, size, "%s%s%s", data, pass, s+1 ); 55 return( buf ); 72 char buf[1024 * 2]; local 81 memset(buf, 0, sizeof(buf)); 125 if ((mfs = checkfs(argv[1], buf, sizeo 183 char buf[1024]; local [all...] |
H A D | mnt_vcs.c | 22 int vcs_write(buf) 23 char* buf; 32 if ((ret = write(istate.fd, buf, strlen(buf))) < 0) 41 int vcs_read(buf, bufsize) 42 char* buf; 61 ret = read(istate.fd, buf, bufsize); 69 buf[ret] = '\0'; 97 char buf[2048]; local 103 memset(buf, [all...] |