Searched defs:buf (Results 76 - 100 of 115) sorted by last modified time

12345

/system/core/sh/
H A Darith_lex.c522 #define YY_INPUT(buf,result,max) \
523 result = (*buf = *arith_buf++) ? 1 : YY_NULL;
586 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
590 #define YY_INPUT(buf,result,max_size) \
597 buf[n] = (char) c; \
599 buf[n++] = (char) c; \
607 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1668 char *buf; local
1674 buf = (char *) yyalloc(n );
1675 if ( ! buf )
[all...]
H A Derror.c133 if (output.nextc != output.buf && output.nextc[-1] == '\n')
358 static char buf[12]; local
364 fmtstr(buf, sizeof buf, "error %d", e);
365 return buf;
H A Deval.h45 char *buf; /* buffer */ member in struct:backcmd
H A Dexpand.c413 char buf[128]; local
438 p = in.buf;
444 while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR);
448 p = buf;
466 if (in.buf)
467 ckfree(in.buf);
1518 cvtnum(int num, char *buf) argument
1534 STPUTC(*p++, buf);
1535 return buf;
[all...]
H A Dinit.c918 char *buf; /* input buffer */ member in struct:parsefile
960 basepf.nextc = basepf.buf = basebuf;
1016 if (memout.buf != NULL) {
1017 ckfree(memout.buf);
1018 memout.buf = NULL;
H A Dinput.c95 char *buf; /* input buffer */ member in struct:parsefile
124 basepf.nextc = basepf.buf = basebuf;
186 char *buf = parsefile->buf; local
187 parsenextc = buf;
203 memcpy(buf, rl_cp, nr);
238 memcpy(buf, rl_cp, nr);
252 nr = read(parsefile->fd, buf, BUFSIZ - 8);
298 if (parsenleft == EOF_NLEFT || parsefile->buf == NULL)
464 parsefile->buf
[all...]
H A Doutput.c94 if (memout.buf != NULL) {
95 ckfree(memout.buf);
96 memout.buf = NULL;
155 } else if (dest->buf == NULL) {
157 dest->buf = ckmalloc(dest->bufsize);
158 dest->nextc = dest->buf;
165 dest->buf = ckrealloc(dest->buf, dest->bufsize);
167 dest->nextc = dest->buf + offset;
188 if (dest->buf
479 xwrite(int fd, char *buf, int nbytes) argument
[all...]
H A Doutput.h44 char *buf; member in struct:output
/system/core/toolbox/
H A Dcat.c153 static char *buf; local
162 if (buf == NULL) {
166 buf = malloc(bsize);
168 if (buf == NULL) {
169 buf = fb_buf;
173 while ((nr = read(rfd, buf, bsize)) > 0)
175 if ((nw = write(wfd, buf + off, (size_t)nr)) < 0)
H A Ddate.c82 char buf[2000]; local
H A Ddd.c566 bwrite(int fd, const void *buf, size_t len) argument
573 rv = write(fd, buf, len);
961 char buf[100]; local
973 (void)snprintf(buf, sizeof(buf),
977 (void)write(STDERR_FILENO, buf, strlen(buf));
979 (void)snprintf(buf, sizeof(buf), "%llu odd length swab %s\n",
982 (void)write(STDERR_FILENO, buf, strle
[all...]
H A Dhd.c14 unsigned char buf[4096]; local
67 read_len = sizeof(buf);
70 res = read(fd, &buf, read_len);
77 lsum += buf[i];
78 sum += buf[i];
79 printf("%02x ", buf[i]);
H A Diftop.c102 char buf[PAGE_SIZE]; local
112 ret = read(fd, buf, sizeof(buf) - 1);
120 buf[ret] = '\0';
123 p = strchr(buf, '\n');
H A Dmd5.c37 char buf[4096]; local
39 rlen = read(fd, buf, sizeof(buf));
47 MD5_Update(&md5_ctx, buf, rlen);
H A Dnandread.c12 static int test_empty(const char *buf, size_t size) argument
15 if (*buf++ != 0xff)
H A Dnetstat.c77 static void addr2str(int af, const void *addr, unsigned port, char *buf) argument
79 if (inet_ntop(af, addr, buf, ADDR_LEN) == NULL) {
80 *buf = '\0';
83 size_t len = strlen(buf);
85 snprintf(buf+len, ADDR_LEN-len, ":%d", port);
87 strncat(buf+len, ":*", ADDR_LEN-len-1);
96 char buf[BUFSIZ]; local
97 fgets(buf, BUFSIZ, fp);
98 while (fgets(buf, BUFSIZ, fp)){
103 int n = sscanf(buf, "
123 char buf[BUFSIZ]; local
[all...]
H A Dnewfs_msdos.c257 char buf[MAXPATHLEN]; local
368 snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
369 if (!(fname = strdup(buf)))
501 snprintf(buf, sizeof(buf), "/boot/%s", bname);
502 if (!(bname = strdup(buf)))
680 sprintf(buf, "FAT%u", fat);
681 setstr(bsx->type, buf, sizeof(bsx->type));
H A Dnotify.c27 char *buf; local
82 buf = malloc(width + 2);
116 read_len = read(ffd, buf, buflen);
118 if(read_len < buflen && buf[read_len-1] != '\n') {
119 buf[read_len] = '\n';
123 buf[--read_len] = '\0';
124 buf[--read_len] = '\n';
125 buf[--read_len] = '.';
126 buf[--read_len] = '.';
127 buf[
[all...]
H A Dreadtty.c60 char buf[1]; local
119 res = read(STDIN_FILENO, buf, 1);
138 if(accept && strchr(accept, buf[0]) == NULL) {
148 //if(!isprint(buf[0])) {
149 // fprintf(stderr, "got unprintable character 0x%x\n", buf[0]);
151 if(buf[0] == '\0') {
159 if(current_char && buf[0] != last_char_in) {
171 last_char_in = buf[0];
177 write(STDOUT_FILENO, buf, 1);
H A Dstart.c10 char buf[1024]; local
H A Dstop.c8 char buf[1024]; local
H A Dtop.c326 char buf[MAX_LINE], *open_paren, *close_paren; local
331 fgets(buf, MAX_LINE, file);
335 open_paren = strchr(buf, '(');
336 close_paren = strrchr(buf, ')');
/system/core/toolbox/cp/
H A Dutils.c114 static char buf[MAXBSIZE]; local
260 while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) {
261 wcount = write(to_fd, buf, (size_t)rcount);
/system/extras/ext4_utils/
H A Dext4_utils.c256 u8 *buf = calloc(info.block_size, 1); local
257 memcpy(buf + 1024, (u8*)aux_info.sb, 1024);
258 sparse_file_add_data(info.sparse_file, buf, info.block_size, 0);
403 struct stat buf; local
408 ret = fstat(fd, &buf);
415 if (S_ISREG(buf.st_mode))
416 computed_size = buf.st_size - reserve_len;
417 else if (S_ISBLK(buf.st_mode))
H A Dsetup_fs.c14 char buf[256], path[128]; local
32 snprintf(buf, sizeof(buf), "/sys/fs/ext4/%s", blockdev);
33 if (access(buf, F_OK) == 0) {
37 snprintf(buf, sizeof(buf), "/dev/block/%s", blockdev);
39 if (!partition_wiped(buf)) {
52 execl(mkfs, mkfs, buf, NULL);

Completed in 2328 milliseconds

12345