Searched refs:len (Results 1 - 25 of 147) sorted by relevance

123456

/ast/src/lib/libast/comp/
H A Dgetgroups.c48 ast_getgroups(int len, gid_t* set)
61 if (!len) return(NGROUPS_MAX);
62 if (len < 0 || !set)
68 len = getgroups(len > NGROUPS_MAX ? NGROUPS_MAX : len, big);
69 for (i = 0; i < len; i++)
71 return(len);
H A Dmktemp.c49 size_t len; local
51 len = strlen(buf);
67 if (!pathtemp(buf, len, d, s, fdp))
/ast/src/lib/libast/tm/
H A Dtmfmt.c33 * 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/path/
H A Dpathtmp.c37 size_t len; local
39 len = !buf ? 0 : !dir ? L_tmpnam : (strlen(dir) + 14);
40 return pathtemp(buf, len, dir, pfx, fdp);
/ast/src/lib/libast/sfio/
H A Dsfecvt.c34 int len; local
37 return _sfcvt(&dval,buf,sizeof(buf),n_digit,decpt,sign,&len,SFFMT_EFORMAT);
H A Dsffcvt.c34 int len; local
37 return _sfcvt(&dval,buf,sizeof(buf),n_digit,decpt,sign,&len,0);
/ast/src/lib/libdll/
H A Ddllopen.c48 int len;
61 len = ++base - dir;
66 len = 2;
69 path = sfprints("%-.*s%s%c%s=%-.*s%s%s", len, dir, base, 0, info->env, len, dir, olibpath ? ":" : "", olibpath ? olibpath : "");
/ast/src/lib/libz/
H A Dcrc32.c219 unsigned long ZEXPORT crc32(crc, buf, len)
222 unsigned len;
237 return crc32_little(crc, buf, len);
239 return crc32_big(crc, buf, len);
243 while (len >= 8) {
245 len -= 8;
247 if (len) do {
249 } while (--len);
262 local unsigned long crc32_little(crc, buf, len)
265 unsigned len;
[all...]
H A Dinftrees.c46 unsigned len; /* a code's length in bits */ local
113 for (len = 0; len <= MAXBITS; len++)
114 count[len] = 0;
138 for (len = 1; len <= MAXBITS; len++) {
140 left -= count[len];
148 for (len
[all...]
H A Dinffast.c94 unsigned len; /* match length, unused bytes */ local
141 len = (unsigned)(this.val);
148 len += (unsigned)hold & ((1U << op) - 1);
152 Tracevv((stderr, "inflate: length %u\n", len));
198 if (op < len) { /* some from window */
199 len -= op;
209 if (op < len) { /* some from end of window */
210 len -= op;
215 if (write < len) { /* some from start of window */
217 len
[all...]
H A Dminigzip.c103 int len; local
113 len = (int)fread(buf, 1, sizeof(buf), in);
118 if (len == 0) break;
120 if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
135 int len; local
152 len = gzwrite(out, (char *)buf, (unsigned)buf_len);
154 if (len != (int)buf_len) error(gzerror(out, &err));
171 int len; local
175 len
230 uInt len = (uInt)strlen(file); local
[all...]
H A Dadler32.c57 uLong ZEXPORT adler32(adler, buf, len)
60 uInt len;
70 if (len == 1) {
80 /* initial Adler-32 value (deferred check for len == 1 speed) */
85 if (len < 16) {
86 while (len--) {
97 while (len >= NMAX) {
98 len -= NMAX;
109 if (len) { /* avoid modulos if none remaining */
110 while (len >
[all...]
H A Dzutil.c149 void zmemcpy(dest, source, len)
152 uInt len;
154 if (len == 0) return;
157 } while (--len != 0);
160 int zmemcmp(s1, s2, len)
163 uInt len;
167 for (j = 0; j < len; j++) {
173 void zmemzero(dest, len)
175 uInt len;
177 if (len
[all...]
/ast/src/cmd/builtin/
H A Dlook.c71 extract(register const char* cp, char* buff, int len) argument
74 register char* ep = bp + len;
101 int len; local
116 len = strlen(prefix);
124 if ((n = strlen(maxprefix)) < len)
125 n = len;
128 n = len;
132 n = len = strlen(prefix);
143 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);
[all...]
/ast/src/cmd/ksh93/tests/
H A Dpointtype.sh34 len() function
45 [[ $(p.len) == 1 ]] || err_exit '$(p.len) != 1'
46 [[ ${p.len} == 1 ]] || err_exit '${p.len} != 1'
47 (( p.len == 1 )) || err_exit '((p.len != 1))'
50 (( (q.len - sqrt(5)) < 10e-10 )) || err_exit 'q.len != sqrt(5)'
51 q.len()
86 len() function
[all...]
H A Dcubetype.sh41 len() function
46 typeset -fh 'distance from the origin' len
59 exp=5 got=$(( b.len ))
60 (( got == exp )) || err_exit "b.len incorrect for iteration $i -- expected $exp, got '$got = sqrt(${b.x}*${b.x}+${b.y}*${b.y})'"
61 exp=5 got=${b.len}
62 [[ "$got" == "$exp" ]] || err_exit "\${b.len} incorrect for iteration $i -- expected $exp, got '$got = sqrt(${b.x}*${b.x}+${b.y}*${b.y})'"
106 len() function
123 (( b.len == 5 )) || err_exit "b.len incorrect for box2 -- expected 5, got '$(( b.len ))'"
[all...]
/ast/src/cmd/tksh/
H A Duinit.c31 int len = strlen(av[0]); local
55 if ((len >= 4) && (strcmp(end-4, "tksh") == 0))
58 else if ((len >= 6) && (strcmp(end-6, "tclksh") == 0))
68 if ((len >= 6) && (strcmp(end-6, "tclksh") == 0))
/ast/src/lib/libpz/
H A Dsfdczip.c58 int len; local
65 len = part - meth;
67 len = strlen(meth);
69 switch ((len<<8)|meth[0])
72 if (strneq(meth, "bzip", len))
76 if (strneq(meth, "gzip", len))
80 if (strneq(meth, "lzw", len))
84 if (strneq(meth, "pzip", len))
89 if (strneq(meth, "qzip", len))
/ast/src/cmd/sortlib/glean/
H A Dglean.c71 size_t len; member in struct:Data_s
115 save(Vmalloc_t* vm, register Data_t* p, void* data, size_t len) argument
117 if (p->size < len)
119 p->size = roundof(len, 256);
126 p->len = len;
128 memcpy(p->data, data, len);
138 message((-4, "gleancmp a:%d:%-.*s: b:%d:%-.*s:", x->key.len, x->key.len, x->key.data, y->key.len,
[all...]
/ast/src/lib/libast/regex/
H A Dregrexec.c36 regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t* match, regflags_t flags, int sep, void* handle, regrecord_t record) argument
63 end = buf + len;
64 mid = (len < e->re.bm.right) ? 0 : (len - e->re.bm.right);
85 if ((index += fail[n + 1]) < len)
90 l = r = buf + len;
126 if ((index = (r - buf) + leftlen) >= len)
128 n = (inv && (++r - buf) < len) ? (*record)(handle, (char*)r, (buf + len) - r): 0;
161 regrexec(const regex_t* p, const char* s, size_t len, size_ argument
[all...]
/ast/src/cmd/3d/features/
H A Dpeek.c49 pk.ctlbuf.len = 0;
53 pk.databuf.len = 0;
54 if (ioctl(fds[0], I_PEEK, &pk) > 0 && pk.databuf.len == sizeof(msg))
/ast/src/cmd/cs/vcs_src/
H A Dvcs_rscs.c101 register int len; local
129 len = sfsprintf(s, rsize, "I <");
130 s += len;
131 rsize -= len;
134 len = sfsprintf(s, rsize, "%s ", list->tag->version);
135 s += len;
136 rsize -= len;
139 len = s - ret;
140 ret[len-1] = '>';
141 ret[len]
[all...]
H A Difs_func.c32 int len; member in struct:DataEntry
63 SecurityDataAccess( pos, data, len )
66 int len;
82 if( write( FileNum, data, len ) != len )
87 if( read( FileNum, data, len ) != len )
97 DataEntryInsert( fpath, key, data, len )
101 int len;
120 ent->data = (void*)SecurityDataAccess( 0, data, len );
219 int fs, fd, len; local
[all...]
H A Difs_network.c133 int len; local
141 if( (len = nFile->size) > 0 ) {
142 if( len > bufsize )
143 len = bufsize;
144 memcpy( buf, nFile->netbuf + nFile->head, len );
145 nFile->head += len;
146 nFile->size -= len;
147 readlen += len;
148 if( len >= bufsize )
150 buf += len;
193 int fd, writelen, len; local
[all...]
/ast/src/lib/libast/misc/
H A Dgetcwd.c47 getcwd(char* buf, size_t len)
54 return SYSGETCWD(buf, len) < 0 ? 0 : buf;
63 if ((r = strlen(buf) + len + 1) != n && !(buf = newof(buf, char, r, 0)))
146 * return value is placed in buf of len chars
148 * len extra chars after the path name
153 getcwd(char* buf, size_t len)
186 if (buf && !len) ERROR(EINVAL);
194 if (len < namlen) ERROR(ERANGE);
196 else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
218 extra = len;
[all...]

Completed in 599 milliseconds

123456