Searched refs:buf (Results 1 - 25 of 72) sorted by relevance

123

/sendmail/include/sm/
H A Dsetjmp.h31 # define sm_setjmp_sig(buf) sigsetjmp(buf, 1)
32 # define sm_setjmp_nosig(buf) sigsetjmp(buf, 0)
33 # define sm_longjmp_sig(buf, val) siglongjmp(buf, val)
34 # define sm_longjmp_nosig(buf, val) siglongjmp(buf, val)
39 # define sm_setjmp_sig(buf) setjmp(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...]
/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/libsm/
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-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 Dstrerror.c50 static char buf[64]; local
56 (void) sm_snprintf(buf, sizeof(buf), "Error %d", err);
57 return buf;
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-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 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 Dstrexit.c33 static char buf[64]; local
38 (void) sm_snprintf(buf, sizeof buf, "Unknown exit status %d",
40 msg = buf;
H A Dsyslogio.c67 ** buf -- buffer to place the data read
75 sm_syslogread(fp, buf, n)
77 char *buf;
92 ** buf -- buffer that the write data comes from
104 sm_syslogwrite(fp, buf, n)
106 char const *buf;
109 syslog(fp->f_ival, "%s", buf);
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 Dfwrite.c29 ** buf -- location of data to be written
39 sm_io_write(fp, timeout, buf, size)
42 const void *buf;
56 iov.iov_base = (void *) buf;
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 Dsetvbuf.c32 ** If 'buf' is == NULL then space will be allocated at 'size'.
37 ** buf -- buffer to use
39 ** size -- size of 'buf'
47 sm_io_setvbuf(fp, timeout, buf, mode, size)
50 char *buf;
64 ** particular implementation. Note, buf and size are ignored
108 buf = NULL; /* force local allocation */
113 if (buf == NULL)
115 if ((buf = sm_malloc(size)) == NULL)
126 buf
[all...]
H A Dfget.c32 ** buf -- buffer to place read string in
33 ** n -- size of 'buf'
45 sm_io_fgets(fp, timeout, buf, n)
48 char *buf;
59 s = buf;
76 if (s == buf)
H A Dmemstat.c259 char buf[80];
269 if (l >= sizeof(buf))
271 while (fgets(buf, sizeof(buf), fp) != NULL)
273 if (strncmp(buf, resource, l) == 0 && buf[l] == ':')
275 r = sscanf(buf + l + 1, "%ld", pvalue);
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;
/sendmail/sendmail/
H A Dsavemail.c67 char buf[MAXLINE + 1]; local
196 expand("\201n", buf, sizeof(buf), e);
198 "\r\nMessage from %s...\r\n", buf);
207 buf, sizeof(buf)) >= 0 &&
211 buf);
308 expand(DoubleBounceAddr, buf, sizeof(buf), e);
315 if (*buf
516 char buf[MAXNAME + 1]; local
769 char buf[MAXLINE]; local
[all...]
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 Dmime.c124 char buf[MAXLINE]; local
163 cataddr(pvp, NULL, buf, sizeof(buf), '\0', false);
164 cte = sm_rpool_strdup_x(e->e_rpool, buf);
242 (void) sm_snprintf(buf, sizeof(buf), "%.100s/%.100s", type, subtype);
243 if (wordinclass(buf, 'n') || (cte != NULL && !wordinclass(cte, 'e')))
247 if (wordinclass(buf, 'b') || wordinclass(type, 'b'))
250 if (wordinclass(buf, 'q') || wordinclass(type, 'q'))
326 while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
755 static unsigned char buf[128]; /* need not be a full line */ local
1042 char buf[MAXLINE]; local
[all...]
H A Dmacro.c136 char buf[5]; local
140 buf[0] = m->metaval;
141 buf[1] = '\0';
142 macdefine(&e->e_macro, A_TEMP, m->metaname, buf);
144 buf[0] = MATCHREPL;
145 buf[2] = '\0';
148 buf[1] = c;
149 macdefine(&e->e_macro, A_TEMP, c, buf);
169 ** buf -- the place to put the expansion.
184 doexpand(s, buf, bufsiz
349 xputs(sm_debug_file(), buf); local
637 char buf[2]; local
641 xputs(sm_debug_file(), buf); local
[all...]
H A Derr.c54 static char buf[256]; local
63 sm_strio_init(&f, buf, sizeof(buf));
78 syserr("!%s", buf);
321 char buf[MAXLINE]; local
323 (void) sm_snprintf(buf, sizeof(buf),
325 (int) sizeof(buf) - 22, errtxt);
327 sm_rpool_strdup_x(CurEnv->e_rpool, buf);
408 char buf[MAXLIN local
982 static char buf[MAXLINE]; local
[all...]
/sendmail/libmilter/
H A Dsmfi.c48 char *buf; local
60 buf = malloc(len);
61 if (buf == NULL)
67 (void) memcpy(&(buf[0]), (void *) &v, MILTER_LEN_BYTES);
70 (void) memcpy(buf + offset, headerf, l1);
71 (void) memcpy(buf + offset + l1, headerv, l2);
72 r = mi_wr_cmd(ctx->ctx_sd, &timeout, cmd, buf, len);
73 free(buf);
181 char *buf, *arg, **argvl;
198 buf
246 char *buf; local
490 char *buf; local
571 char *buf; local
649 char *buf, *txt; local
[all...]
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...]

Completed in 56 milliseconds

123