Searched defs:buf (Results 1 - 25 of 57) sorted by relevance

123

/sendmail/libsm/
H A Dstrerror.c50 static char buf[64]; local
56 (void) sm_snprintf(buf, sizeof(buf), "Error %d", err);
57 return buf;
H A Derrstring.c277 static char buf[30]; local
279 (void) sm_snprintf(buf, sizeof buf, "Error %d", errnum);
280 return buf;
H A Dt-strio.c21 char buf[20]; local
26 (void) memset(buf, '.', 20);
27 sm_strio_init(&f, buf, 10);
31 SM_TEST(strcmp(buf, r) == 0);
H A Dstrexit.c33 static char buf[64]; local
38 (void) sm_snprintf(buf, sizeof buf, "Unknown exit status %d",
40 msg = buf;
H A Dt-float.c26 char buf[128]; local
37 sm_snprintf(buf, sizeof(buf), "%d %.3f %d", 0, d, 1);
39 if (!SM_TEST(strcmp(buf, r) == 0))
41 "got %s instead\n", buf);
44 sm_snprintf(buf, sizeof(buf), "%.3f", d);
46 if (!SM_TEST(strcmp(buf, r) == 0))
48 "got %s instead\n", buf);
50 sm_io_sscanf(buf, "
[all...]
H A Dt-scanf.c25 char buf[128]; local
37 sm_snprintf(buf, sizeof(buf), "%d", d);
39 if (!SM_TEST(strcmp(buf, r) == 0))
41 "got %s instead\n", buf);
43 i = sm_io_sscanf(buf, "%d", &h);
48 sm_snprintf(buf, sizeof(buf), "%d\n", d);
50 if (!SM_TEST(strcmp(buf, r) == 0))
52 "got %s instead\n", buf);
[all...]
H A Dt-smstdio.c24 char buf[128]; local
56 n = sm_io_read(fp, SM_TIME_DEFAULT, buf, sizeof(buf));
59 buf[n] = '\0';
60 SM_TEST(strcmp(buf, testmsg) == 0);
H A Dt-string.c24 char buf[4096]; local
36 sm_snprintf(buf, 4096, "+%*x+", 2000, 0xCAFE);
37 SM_TEST(strcmp(s, buf) == 0);
H A Dt-types.c27 char buf[128]; local
66 sm_snprintf(buf, sizeof(buf), "%llx", ll);
68 if (!SM_TEST(buf[0] == '8')
69 || !SM_TEST(strspn(&buf[1], r) == sizeof(ll) * 2 - 1))
72 "oops: LLONG_MIN=%s\n", buf);
78 sm_snprintf(buf, sizeof(buf), "%llx", ll);
80 if (!SM_TEST(buf[0] == '7')
81 || !SM_TEST(strspn(&buf[
[all...]
H A Dcf.c46 char buf[2048]; local
57 while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
59 p = strchr(buf, '\n');
63 if (buf[0] != 'O' || buf[1] != ' ')
66 id = &buf[2];
H A Dt-fget.c22 char buf[256]; local
41 n = sizeof(buf);
42 r = sm_io_fgets(rfp, SM_TIME_DEFAULT, buf, n);
52 fprintf(stderr, "buf='%s', in='%s', r=%d, l=%d\n",
53 buf, msg, r, l);
55 SM_TEST(memcmp(buf, msg, l) == 0);
H A Dsem.c230 struct semid_ds *buf; member in union:semun
235 arg.buf = &semidds;
H A Dutil.c42 static char *buf = NULL; local
66 if (buf != NULL)
67 sm_free(buf);
69 buf = nbuf;
71 for (h = buf; *s != '\0' && l > 0; s++, l--)
114 buf[len - 1] = '\0';
115 return buf;
H A Dvfscanf.c129 char buf[BUF]; /* buffer for numeric conversions */ local
498 if (width == 0 || width > sizeof(buf) - 1)
499 width = sizeof(buf) - 1;
502 if (--width > sizeof(buf) - 2)
503 width = sizeof(buf) - 2;
507 for (p = buf; width > 0; width--)
582 if (flags & PFXOK && p == buf + 1)
615 if (p > buf)
631 res = (*ccfn)(buf, (char **)NULL, base);
645 nread += p - buf;
[all...]
/sendmail/libsmutil/
H A Dsnprintf.c38 static char buf[MAXSHORTSTR + 1]; local
49 (void) sm_strlcpy(buf, s, m + 1);
50 return buf;
52 (void) sm_strlcpy(buf, s, m - 2);
53 (void) sm_strlcat(buf, "...", sizeof buf);
54 return buf;
57 (void) sm_strlcpy(buf, s, m + 1);
58 (void) sm_strlcat2(buf, "...", s + l - m, sizeof buf);
[all...]
H A Dsafefile.c491 char buf[MAXPATHLEN]; local
494 memset(buf, '\0', sizeof buf);
495 linklen = readlink(s, buf, sizeof buf);
501 if (linklen >= sizeof buf)
509 if (*buf == '/')
511 target = buf;
514 while (s[offset] == buf[offset] &&
518 if (s[offset] == '\0' && buf[offse
[all...]
/sendmail/test/
H A Dt_snprintf.c26 char buf[5]; local
28 r = snprintf(buf, sizeof buf, "%s", TEST_STRING);
30 if (buf[sizeof buf - 1] != '\0' ||
/sendmail/include/sm/
H A Dsem.h31 struct semid_ds *buf; member in union:semun
/sendmail/libmilter/
H A Dsm_gethost.c104 static char buf[1000]; local
107 h = _switch_gethostbyname_r(name, &hp, buf, sizeof(buf), &h_errno);
H A Dcomm.c72 char *buf; local
141 buf = malloc(expl + 1);
143 buf = malloc(expl);
145 if (buf == NULL)
167 free(buf);
170 len = MI_SOCK_READ(sd, buf + i, expl - i);
182 free(buf);
188 free(buf);
196 buf[expl] = '\0';
198 return buf;
[all...]
/sendmail/sendmail/
H A Dconvtime.c127 static char buf[256]; local
156 p = buf;
161 (void) sm_snprintf(p, SPACELEFT(buf, p), "%d+", dy);
164 (void) sm_snprintf(p, SPACELEFT(buf, p), "%02d:%02d:%02d",
166 return buf;
172 (void) sm_snprintf(p, SPACELEFT(buf, p), ", %d week%s", wk,
178 (void) sm_snprintf(p, SPACELEFT(buf, p), ", %d day%s", dy,
184 (void) sm_snprintf(p, SPACELEFT(buf, p), ", %d hour%s", hr,
190 (void) sm_snprintf(p, SPACELEFT(buf, p), ", %d minute%s", mi,
196 (void) sm_snprintf(p, SPACELEFT(buf,
[all...]
H A Dtimers.c35 char buf[MAXLINE]; local
43 (void) sm_vsnprintf(buf, sizeof(buf), msg, ap);
46 buf, (unsigned long) &CurEnv->e_timers);
224 static char buf[40]; local
226 (void) sm_snprintf(buf, sizeof(buf), "%ld.%06ldr/%ld.%06ldc",
229 return buf;
/sendmail/contrib/
H A Dbitdomain.c88 char buf[1024], *node, *hostname, *p; local
90 while (fgets(buf, sizeof(buf), infile)) {
91 for (p = buf; *p && isspace(*p); p++);
125 entry(node, hostname, sizeof(buf)-(hostname - buf));
/sendmail/mailstats/
H A Dmailstats.c66 char buf[MAXLINE]; local
137 while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
143 b = strchr(buf, '#');
145 b = strchr(buf, '\n');
147 b = &buf[strlen(buf)];
152 b = buf;
/sendmail/praliases/
H A Dpraliases.c68 char buf[MAXLINE]; local
125 while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
129 b = strchr(buf, '\n');
133 b = buf;

Completed in 5607 milliseconds

123