Searched refs:buf (Results 126 - 150 of 4412) sorted by relevance

1234567891011>>

/illumos-gate/usr/src/lib/libast/common/string/
H A Dfmtbase.c39 char* buf; local
42 buf = fmtbuf(z = 72);
44 sfsprintf(buf, z, "%I*d", sizeof(n), n);
46 sfsprintf(buf, z, p ? "%#..*I*u" : "%..*I*u", b, sizeof(n), n);
47 return buf;
H A Dfmtelapsed.c35 char* buf; local
42 buf = fmtbuf(z = 8);
45 sfsprintf(buf, z, "%lu.%02lus", t, (u * 100 / n) % 100);
47 sfsprintf(buf, z, "%lum%02lus", t / 60, t - (t / 60) * 60);
49 sfsprintf(buf, z, "%luh%02lum", t / (60*60), (t - (t / (60*60)) * (60*60)) / 60);
51 sfsprintf(buf, z, "%lud%02luh", t / (24*60*60), (t - (t / (24*60*60)) * (24*60*60)) / (60*60));
53 sfsprintf(buf, z, "%luw%02lud", t / (7*24*60*60), (t - (t / (7*24*60*60)) * (7*24*60*60)) / (24*60*60));
55 sfsprintf(buf, z, "%luM%02lud", (t * 12) / (365*24*60*60), ((t * 12) - ((t * 12) / (365*24*60*60)) * (365*24*60*60)) / (12*24*60*60));
57 sfsprintf(buf, z, "%luY%02luM", t / (365*24*60*60), ((t - (t / (365*24*60*60)) * (365*24*60*60)) * 5) / (152 * 24 * 60 * 60));
59 sfsprintf(buf,
[all...]
/illumos-gate/usr/src/lib/libast/common/vec/
H A Dvecload.c34 * load a string vector from lines in buf
35 * buf may be modified on return
37 * each line in buf is treated as a new vector element
47 vecload(char* buf) argument
55 n = (*buf == '#') ? -1 : 0;
56 for (s = buf;; s++)
60 if (s > buf && *(s - 1) == '\\') *(s - 1) = *s = ' ';
80 *p++ = s = buf;
/illumos-gate/usr/src/cmd/lp/lib/lp/
H A Dsop.c53 char buf[BUFSIZ]; local
62 while (fdgets(buf, BUFSIZ, fd)) {
63 if (endsop && STRNEQU(endsop, buf, lenendsop))
65 add_size = strlen(buf);
74 strcpy (str + size, buf);
/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_stdlib.c43 fptos(const char *p, char *buf, size_t buflen, int decpt, int sign, char expchr) argument
45 char *q = buf;
55 buf[buflen - 1] = '\0';
56 return (buf);
76 return (buf);
82 * same formatting conventions as sprintf(buf, "%+.*e", precision, d). The
89 static char buf[DECIMAL_STRING_LENGTH]; local
95 return (fptos(p, buf, sizeof (buf), decpt, sign, expchr));
104 static char buf[DECIMAL_STRING_LENGT local
[all...]
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dt-scanf.c27 char buf[128]; local
39 sm_snprintf(buf, sizeof(buf), "%d", d);
41 if (!SM_TEST(strcmp(buf, r) == 0))
43 "got %s instead\n", buf);
45 i = sm_io_sscanf(buf, "%d", &h);
50 sm_snprintf(buf, sizeof(buf), "%d\n", d);
52 if (!SM_TEST(strcmp(buf, r) == 0))
54 "got %s instead\n", buf);
[all...]
/illumos-gate/usr/src/ucblib/libucb/port/gen/
H A Dsetbuffer.c52 Uchar *buf = (Uchar *)abuf; local
60 if (buf == 0) {
64 buf = (fno == 0) ? _sibuf : _sobuf;
67 buf = _smbuf[fno];
69 } else if ((buf = (Uchar *)malloc(_SMBFSZ * sizeof (Uchar))) !=
78 if (buf == 0)
80 temp = buf + PUSHBACK;
94 char *buf; local
98 buf = (char *)malloc(128);
99 if (buf !
[all...]
/illumos-gate/usr/src/cmd/lp/filter/postscript/common/
H A Drequest.c128 char buf[100]; /* line buffer for reading *file */ local
143 while ( fgets(buf, sizeof(buf), fp_in) != NULL )
144 if ( buf[0] == '@' && strncmp(want, &buf[1], strlen(want)) == 0 )
145 while ( fgets(buf, sizeof(buf), fp_in) != NULL )
146 if ( buf[0] == '#' || buf[0] == '%' )
148 else if ( buf[
[all...]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dpsiginfo.c52 char buf[256]; local
61 (void) snprintf(buf, sizeof (buf),
72 (void) snprintf(buf, sizeof (buf),
78 (void) snprintf(buf, sizeof (buf),
84 (void) snprintf(buf, sizeof (buf),
88 (void) write(2, buf, strle
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/asn.1/
H A Dasn1_make.h52 (asn1buf *buf,
57 /* requires *buf is allocated, in_len is the length of an ASN.1 encoding
58 which has just been inserted in *buf
59 modifies *buf, *retlen
61 length = in_len into *buf.
66 (asn1buf *buf, const asn1_class asn1class,
71 /* requires *buf is allocated, in_len is the length of an ASN.1 encoding
72 which has just been inserted in *buf
73 modifies *buf, *retlen
76 id# = tag and length = in_len into *buf
[all...]
/illumos-gate/usr/src/lib/libpp/common/
H A Dpptrace.c42 static char buf[8]; local
67 if (iscntrl(c) || !isprint(c)) sfsprintf(buf, sizeof(buf), "`%03o'", c);
69 else sfsprintf(buf, sizeof(buf), "%c", c);
70 return(buf);
87 static char buf[128]; local
100 sfsprintf(buf, sizeof(buf), "%s=%s", ppinmap[i].nam, p->symbol->name);
101 return(buf);
120 static char buf[64]; local
151 static char buf[128]; local
[all...]
/illumos-gate/usr/src/lib/libc/port/fp/
H A Dfconvert.c35 fconvert(double arg, int ndigits, int *decpt, int *sign, char *buf) argument
62 buf[i] = dr.ds[i];
69 buf[i++] = '0';
71 buf[i] = 0;
75 buf[0] = '0';
77 buf[i] = '0';
78 buf[i] = 0;
82 __infnanstring(dr.fpclass, ndigits, buf);
85 return (buf);
89 sfconvert(single *arg, int ndigits, int *decpt, int *sign, char *buf) argument
143 qfconvert(quadruple *arg, int ndigits, int *decpt, int *sign, char *buf) argument
[all...]
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.daytimed/
H A Din.daytimed.c50 static char buf[TIMEBUF_SIZE]; local
53 (void) strlcpy(buf, ctime(&clock), sizeof (buf));
59 buf[TIMEBUF_SIZE - 2] = '\r';
60 buf[TIMEBUF_SIZE - 1] = '\n';
62 return (buf);
67 daytime_dg(int s, const struct sockaddr *sap, int sa_size, const void *buf, argument
/illumos-gate/usr/src/uts/common/sys/
H A Dcopyops.h34 #include <sys/buf.h>
89 int (*cp_physio)(int (*)(struct buf *), struct buf *, dev_t,
90 int, void (*)(struct buf *), struct uio *);
93 extern int default_physio(int (*)(struct buf *), struct buf *,
94 dev_t, int, void (*)(struct buf *), struct uio *);
/illumos-gate/usr/src/lib/libast/common/misc/
H A Dsystrace.c39 char buf[PATH_MAX]; local
49 out = buf;
50 out += sfsprintf(out, sizeof(buf), "%s/.%s/%s", s, trace[0], id);
51 if (access(buf, F_OK))
55 av[3] = buf;
61 sfsprintf(out, &buf[sizeof(buf)] - out, ".%d", getpid());
/illumos-gate/usr/src/lib/libcurses/screen/
H A Dmbtranslate.c68 static char *buf; local
78 if (buf)
79 free(buf);
81 if ((buf = malloc(bufsize * sizeof (char))) == NULL)
86 if (!byte && !buf)
90 bufp = byte ? byte : buf;
98 return (byte ? byte : buf);
111 static wchar_t *buf; local
119 if (buf)
120 free((char *)buf);
[all...]
H A Dkeyname.sh63 static char buf[16];
74 (void) sprintf(buf, "KEY_F(%d)", key - 0410);
78 (void) sprintf(buf, "KEY_%s", keystrings[i]);
88 (void) sprintf(buf, "%c", key);
90 (void) sprintf(buf, "M-%s", unctrl(key & 0177));
95 (void) sprintf(buf, "%d", key);
97 return (buf);
/illumos-gate/usr/src/lib/libast/common/path/
H A Dpathpath.c43 char buf[PATH_MAX]; local
48 path = buf;
63 getcwd(buf, sizeof(buf));
64 s = buf + strlen(buf);
65 sfsprintf(s, sizeof(buf) - (s - buf), "/%s", p);
66 if (path != buf)
67 strcpy(path, buf);
[all...]
/illumos-gate/usr/src/tools/btxld/
H A Dversion.c56 char *buf; local
74 buf = malloc(buf_size);
75 if (buf == NULL) {
85 ret = read(fd, buf, sb.st_size);
88 free(buf);
94 if (find_multiboot(buf, MBOOT_SCAN_SIZE, &mboot_off)
97 free(buf);
101 mboot = (multiboot_header_t *)(buf + mboot_off);
106 hs.src_buf = (unsigned char *)buf;
114 memset(buf
[all...]
/illumos-gate/usr/src/boot/sys/boot/i386/libi386/
H A Dbiosacpi.c55 char buf[24]; local
63 sprintf(buf, "0x%08x", (unsigned int)VTOP(rsdp));
64 setenv("acpi.rsdp", buf, 1);
68 sprintf(buf, "%d", revision);
69 setenv("acpi.revision", buf, 1);
70 strncpy(buf, rsdp->OemId, sizeof(rsdp->OemId));
71 buf[sizeof(rsdp->OemId)] = '\0';
72 setenv("acpi.oem", buf, 1);
73 sprintf(buf, "0x%08x", rsdp->RsdtPhysicalAddress);
74 setenv("acpi.rsdt", buf,
[all...]
/illumos-gate/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/
H A DProgram.java176 StringBuilder buf = new StringBuilder();
181 buf.append((char)i);
185 String s = buf.toString();
201 StringBuilder buf = new StringBuilder();
202 buf.append(Program.class.getName());
203 buf.append("[contents = ");
204 buf.append(contents);
205 buf.append(", info = ");
206 buf.append(info);
207 buf
[all...]
/illumos-gate/usr/src/lib/libbc/libc/gen/common/
H A Deconvert.c34 econvert(arg, ndigits, decpt, sign, buf)
37 char *buf;
56 buf[i] = dr.ds[i];
57 buf[ndigits] = 0;
62 buf[i] = '0';
63 buf[ndigits] = 0;
80 buf[i] = pc[i];
81 buf[nc] = 0;
84 return buf; /* For compatibility with ecvt. */
88 fconvert(arg, ndigits, decpt, sign, buf)
[all...]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_socks.c36 static void put_socks5_addr(char *cp, const unsigned char *buf, int fraglen);
46 unsigned char *buf = (unsigned char *)line; local
54 switch (buf[0]) {
56 n = buf[1];
61 (void) memcpy(&ipaddr, &buf[4],
67 (buf[2] << 8) | buf[3]);
75 if (buf[i] == '\0')
77 *cp++ = buf[i];
93 n = buf[
258 unsigned char *buf = (unsigned char *)line; local
365 put_socks5_addr(char *cp, const unsigned char *buf, int fraglen) argument
[all...]
/illumos-gate/usr/src/lib/libresolv2/common/nameser/
H A Dns_print.c52 char **buf, size_t *buflen);
55 char **buf, size_t *buflen);
56 static void addlen(size_t len, char **buf, size_t *buflen);
58 char **buf, size_t *buflen);
60 char **buf, size_t *buflen);
79 *\li Number of characters written to buf, or -1 (check errno).
84 char *buf, size_t buflen)
91 name_ctx, origin, buf, buflen);
99 *\li Number of characters written to buf, or -1 (check errno).
106 char *buf, size_
82 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
102 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
158 addlen(strlen(buf), &buf, &buflen); local
328 addlen(strlen(buf), &buf, &buflen); local
419 addlen(strlen(buf), &buf, &buflen); local
658 addlen(strlen(buf), &buf, &buflen); local
681 addlen(strlen(buf), &buf, &buflen); local
951 addlen(strlen(buf), &buf, &buflen); local
956 addlen(strlen(buf), &buf, &buflen); local
1125 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument
1159 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument
1203 addlen(size_t len, char **buf, size_t *buflen) argument
1210 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument
1222 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument
[all...]
/illumos-gate/usr/src/cmd/sgs/libconv/common/
H A Dc_literal.c57 * buf - Buffer of characters to be processed
58 * n # of characters in buf to be processed
69 conv_str_to_c_literal(const char *buf, size_t n, argument
77 switch (*buf) {
117 buf++;
119 } else if (isprint(*buf)) {
124 const char *start = buf;
127 for (start = buf; (n > 0) && isprint(*buf); buf
[all...]

Completed in 2057 milliseconds

1234567891011>>