Symbol: w
bin/mined/mined1.c
574
int w;
bin/mined/mined1.c
600
w = wait(&status);
bin/mined/mined1.c
601
} while (w != -1 && w != pid);
bin/ps/print.c
63
static void put64(u_int64_t n, int w, int type);
bin/ps/print.c
784
put64(u_int64_t n, int w, int type)
bin/ps/print.c
792
snprintf(b, sizeof(b), "%*jd", w, (uintmax_t)n);
bin/ps/print.c
794
if (len <= (size_t)w) {
bin/ps/print.c
833
if (w > 4 && n / d >= u) {
bin/ps/print.c
835
w - 4,
bin/ps/print.c
841
w - 1, (uintmax_t)n / d, type);
crypto/libressl/apps/openssl/s_cb.c
332
int w;
crypto/libressl/apps/openssl/s_cb.c
334
w = where & ~SSL_ST_MASK;
crypto/libressl/apps/openssl/s_cb.c
336
if (w & SSL_ST_CONNECT)
crypto/libressl/apps/openssl/s_cb.c
338
else if (w & SSL_ST_ACCEPT)
crypto/libressl/crypto/asn1/a_bitstr.c
117
int w, v, iv;
crypto/libressl/crypto/asn1/a_bitstr.c
120
w = n/8;
crypto/libressl/crypto/asn1/a_bitstr.c
131
if ((a->length < (w + 1)) || (a->data == NULL)) {
crypto/libressl/crypto/asn1/a_bitstr.c
134
if ((c = recallocarray(a->data, a->length, w + 1, 1)) == NULL) {
crypto/libressl/crypto/asn1/a_bitstr.c
139
a->length = w + 1;
crypto/libressl/crypto/asn1/a_bitstr.c
141
a->data[w] = ((a->data[w]) & iv) | v;
crypto/libressl/crypto/asn1/a_bitstr.c
151
int w, v;
crypto/libressl/crypto/asn1/a_bitstr.c
153
w = n / 8;
crypto/libressl/crypto/asn1/a_bitstr.c
155
if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
crypto/libressl/crypto/asn1/a_bitstr.c
157
return ((a->data[w] & v) != 0);
crypto/libressl/crypto/bn/bn_asm.c
104
bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
crypto/libressl/crypto/bn/bn_asm.c
114
mul(rp[0], ap[0], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
115
mul(rp[1], ap[1], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
116
mul(rp[2], ap[2], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
117
mul(rp[3], ap[3], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
124
mul(rp[0], ap[0], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
161
bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
crypto/libressl/crypto/bn/bn_asm.c
170
bl = LBITS(w);
crypto/libressl/crypto/bn/bn_asm.c
171
bh = HBITS(w);
crypto/libressl/crypto/bn/bn_asm.c
194
bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
crypto/libressl/crypto/bn/bn_asm.c
203
bl = LBITS(w);
crypto/libressl/crypto/bn/bn_asm.c
204
bh = HBITS(w);
crypto/libressl/crypto/bn/bn_asm.c
74
bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
crypto/libressl/crypto/bn/bn_asm.c
84
mul_add(rp[0], ap[0], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
85
mul_add(rp[1], ap[1], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
86
mul_add(rp[2], ap[2], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
87
mul_add(rp[3], ap[3], w, c1);
crypto/libressl/crypto/bn/bn_asm.c
94
mul_add(rp[0], ap[0], w, c1);
crypto/libressl/crypto/bn/bn_exp.c
1004
w = next_w;
crypto/libressl/crypto/bn/bn_exp.c
1012
next_w = w * a;
crypto/libressl/crypto/bn/bn_exp.c
1013
if ((next_w / a) != w) /* overflow */
crypto/libressl/crypto/bn/bn_exp.c
1016
if (!BN_TO_MONTGOMERY_WORD(r, w, mont))
crypto/libressl/crypto/bn/bn_exp.c
1020
if (!BN_MOD_MUL_WORD(r, w, m))
crypto/libressl/crypto/bn/bn_exp.c
1025
w = next_w;
crypto/libressl/crypto/bn/bn_exp.c
1030
if (w != 1) {
crypto/libressl/crypto/bn/bn_exp.c
1032
if (!BN_TO_MONTGOMERY_WORD(r, w, mont))
crypto/libressl/crypto/bn/bn_exp.c
1036
if (!BN_MOD_MUL_WORD(r, w, m))
crypto/libressl/crypto/bn/bn_exp.c
915
BN_ULONG w, next_w;
crypto/libressl/crypto/bn/bn_exp.c
919
#define BN_MOD_MUL_WORD(r, w, m) \
crypto/libressl/crypto/bn/bn_exp.c
920
(BN_mul_word(r, (w)) && \
crypto/libressl/crypto/bn/bn_exp.c
931
#define BN_TO_MONTGOMERY_WORD(r, w, mont) \
crypto/libressl/crypto/bn/bn_exp.c
932
(BN_set_word(r, (w)) && BN_to_montgomery(r, r, (mont), ctx))
crypto/libressl/crypto/bn/bn_exp.c
988
w = a; /* bit 'bits-1' of 'p' is always set */
crypto/libressl/crypto/bn/bn_exp.c
991
next_w = w * w;
crypto/libressl/crypto/bn/bn_exp.c
992
if ((next_w / w) != w) /* overflow */
crypto/libressl/crypto/bn/bn_exp.c
995
if (!BN_TO_MONTGOMERY_WORD(r, w, mont))
crypto/libressl/crypto/bn/bn_exp.c
999
if (!BN_MOD_MUL_WORD(r, w, m))
crypto/libressl/crypto/bn/bn_gf2m.c
110
#define SQR1(w) \
crypto/libressl/crypto/bn/bn_gf2m.c
111
SQR_tb[(w) >> 60 & 0xF] << 56 | SQR_tb[(w) >> 56 & 0xF] << 48 | \
crypto/libressl/crypto/bn/bn_gf2m.c
112
SQR_tb[(w) >> 52 & 0xF] << 40 | SQR_tb[(w) >> 48 & 0xF] << 32 | \
crypto/libressl/crypto/bn/bn_gf2m.c
113
SQR_tb[(w) >> 44 & 0xF] << 24 | SQR_tb[(w) >> 40 & 0xF] << 16 | \
crypto/libressl/crypto/bn/bn_gf2m.c
1136
BIGNUM *a, *z, *rho, *w, *w2, *tmp;
crypto/libressl/crypto/bn/bn_gf2m.c
114
SQR_tb[(w) >> 36 & 0xF] << 8 | SQR_tb[(w) >> 32 & 0xF]
crypto/libressl/crypto/bn/bn_gf2m.c
115
#define SQR0(w) \
crypto/libressl/crypto/bn/bn_gf2m.c
1151
if ((w = BN_CTX_get(ctx)) == NULL)
crypto/libressl/crypto/bn/bn_gf2m.c
116
SQR_tb[(w) >> 28 & 0xF] << 56 | SQR_tb[(w) >> 24 & 0xF] << 48 | \
crypto/libressl/crypto/bn/bn_gf2m.c
117
SQR_tb[(w) >> 20 & 0xF] << 40 | SQR_tb[(w) >> 16 & 0xF] << 32 | \
crypto/libressl/crypto/bn/bn_gf2m.c
118
SQR_tb[(w) >> 12 & 0xF] << 24 | SQR_tb[(w) >> 8 & 0xF] << 16 | \
crypto/libressl/crypto/bn/bn_gf2m.c
119
SQR_tb[(w) >> 4 & 0xF] << 8 | SQR_tb[(w) & 0xF]
crypto/libressl/crypto/bn/bn_gf2m.c
1192
if (!BN_copy(w, rho))
crypto/libressl/crypto/bn/bn_gf2m.c
1197
if (!BN_GF2m_mod_sqr_arr(w2, w, p, ctx))
crypto/libressl/crypto/bn/bn_gf2m.c
1203
if (!BN_GF2m_add(w, w2, rho))
crypto/libressl/crypto/bn/bn_gf2m.c
1207
} while (BN_is_zero(w) && (count < MAX_ITERATIONS));
crypto/libressl/crypto/bn/bn_gf2m.c
1208
if (BN_is_zero(w)) {
crypto/libressl/crypto/bn/bn_gf2m.c
121
#define SQR1(w) \
crypto/libressl/crypto/bn/bn_gf2m.c
1214
if (!BN_GF2m_mod_sqr_arr(w, z, p, ctx))
crypto/libressl/crypto/bn/bn_gf2m.c
1216
if (!BN_GF2m_add(w, z, w))
crypto/libressl/crypto/bn/bn_gf2m.c
1218
if (BN_GF2m_cmp(w, a)) {
crypto/libressl/crypto/bn/bn_gf2m.c
122
SQR_tb[(w) >> 28 & 0xF] << 24 | SQR_tb[(w) >> 24 & 0xF] << 16 | \
crypto/libressl/crypto/bn/bn_gf2m.c
123
SQR_tb[(w) >> 20 & 0xF] << 8 | SQR_tb[(w) >> 16 & 0xF]
crypto/libressl/crypto/bn/bn_gf2m.c
124
#define SQR0(w) \
crypto/libressl/crypto/bn/bn_gf2m.c
125
SQR_tb[(w) >> 12 & 0xF] << 24 | SQR_tb[(w) >> 8 & 0xF] << 16 | \
crypto/libressl/crypto/bn/bn_gf2m.c
126
SQR_tb[(w) >> 4 & 0xF] << 8 | SQR_tb[(w) & 0xF]
crypto/libressl/crypto/bn/bn_lcl.h
343
#define mul_add(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
345
t=(BN_ULLONG)w * (a) + (r) + (c); \
crypto/libressl/crypto/bn/bn_lcl.h
350
#define mul(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
352
t=(BN_ULLONG)w * (a) + (c); \
crypto/libressl/crypto/bn/bn_lcl.h
365
#define mul_add(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
368
BN_UMULT_LOHI(low,high,w,tmp); \
crypto/libressl/crypto/bn/bn_lcl.h
377
#define mul(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
379
BN_UMULT_LOHI(low,high,w,ta); \
crypto/libressl/crypto/bn/bn_lcl.h
392
#define mul_add(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
395
high= BN_UMULT_HIGH(w,tmp); \
crypto/libressl/crypto/bn/bn_lcl.h
397
low = (w) * tmp; \
crypto/libressl/crypto/bn/bn_lcl.h
405
#define mul(r,a,w,c) { \
crypto/libressl/crypto/bn/bn_lcl.h
407
low = (w) * ta; \
crypto/libressl/crypto/bn/bn_lcl.h
408
high= BN_UMULT_HIGH(w,ta); \
crypto/libressl/crypto/bn/bn_lcl.h
625
BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);
crypto/libressl/crypto/bn/bn_lcl.h
626
BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);
crypto/libressl/crypto/bn/bn_lib.c
1073
BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
crypto/libressl/crypto/bn/bn_lib.c
1075
return (a->top == 1 && a->d[0] == w) || (w == 0 && a->top == 0);
crypto/libressl/crypto/bn/bn_lib.c
1091
BN_is_word(const BIGNUM *a, const BN_ULONG w)
crypto/libressl/crypto/bn/bn_lib.c
1093
return BN_abs_is_word(a, w) && (w == 0 || !a->neg);
crypto/libressl/crypto/bn/bn_lib.c
555
BN_set_word(BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_lib.c
561
a->d[0] = w;
crypto/libressl/crypto/bn/bn_lib.c
562
a->top = (w ? 1 : 0);
crypto/libressl/crypto/bn/bn_lib.c
880
int b, w;
crypto/libressl/crypto/bn/bn_lib.c
886
w = n / BN_BITS2;
crypto/libressl/crypto/bn/bn_lib.c
888
if (w >= a->top)
crypto/libressl/crypto/bn/bn_lib.c
891
a->top = w;
crypto/libressl/crypto/bn/bn_lib.c
893
a->top = w + 1;
crypto/libressl/crypto/bn/bn_lib.c
894
a->d[w] &= ~(BN_MASK2 << b);
crypto/libressl/crypto/bn/bn_prime.c
132
static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
crypto/libressl/crypto/bn/bn_prime.c
383
witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1, const BIGNUM *a1_odd,
crypto/libressl/crypto/bn/bn_prime.c
386
if (!BN_mod_exp_mont_ct(w, w, a1_odd, a, ctx, mont))
crypto/libressl/crypto/bn/bn_prime.c
389
if (BN_is_one(w))
crypto/libressl/crypto/bn/bn_prime.c
391
if (BN_cmp(w, a1) == 0)
crypto/libressl/crypto/bn/bn_prime.c
394
if (!BN_mod_mul(w, w, w, a, ctx)) /* w := w^2 mod a */
crypto/libressl/crypto/bn/bn_prime.c
396
if (BN_is_one(w))
crypto/libressl/crypto/bn/bn_prime.c
399
if (BN_cmp(w, a1) == 0)
crypto/libressl/crypto/bn/bn_prime.c
404
bn_check_top(w);
crypto/libressl/crypto/bn/bn_word.c
106
BN_div_word(BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_word.c
112
w &= BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
114
if (!w)
crypto/libressl/crypto/bn/bn_word.c
121
j = BN_BITS2 - BN_num_bits_word(w);
crypto/libressl/crypto/bn/bn_word.c
122
w <<= j;
crypto/libressl/crypto/bn/bn_word.c
130
d = bn_div_words(ret, l, w);
crypto/libressl/crypto/bn/bn_word.c
131
ret = (l - ((d*w)&BN_MASK2))&BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
142
BN_add_word(BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_word.c
148
w &= BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
151
if (!w)
crypto/libressl/crypto/bn/bn_word.c
155
return BN_set_word(a, w);
crypto/libressl/crypto/bn/bn_word.c
159
i = BN_sub_word(a, w);
crypto/libressl/crypto/bn/bn_word.c
164
for (i = 0; w != 0 && i < a->top; i++) {
crypto/libressl/crypto/bn/bn_word.c
165
a->d[i] = l = (a->d[i] + w) & BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
166
w = (w > l) ? 1 : 0;
crypto/libressl/crypto/bn/bn_word.c
168
if (w && i == a->top) {
crypto/libressl/crypto/bn/bn_word.c
172
a->d[i] = w;
crypto/libressl/crypto/bn/bn_word.c
179
BN_sub_word(BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_word.c
184
w &= BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
187
if (!w)
crypto/libressl/crypto/bn/bn_word.c
191
i = BN_set_word(a, w);
crypto/libressl/crypto/bn/bn_word.c
199
i = BN_add_word(a, w);
crypto/libressl/crypto/bn/bn_word.c
204
if ((a->top == 1) && (a->d[0] < w)) {
crypto/libressl/crypto/bn/bn_word.c
205
a->d[0] = w - a->d[0];
crypto/libressl/crypto/bn/bn_word.c
211
if (a->d[i] >= w) {
crypto/libressl/crypto/bn/bn_word.c
212
a->d[i] -= w;
crypto/libressl/crypto/bn/bn_word.c
215
a->d[i] = (a->d[i] - w) & BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
217
w = 1;
crypto/libressl/crypto/bn/bn_word.c
227
BN_mul_word(BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_word.c
232
w &= BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
234
if (w == 0)
crypto/libressl/crypto/bn/bn_word.c
237
ll = bn_mul_words(a->d, a->d, a->top, w);
crypto/libressl/crypto/bn/bn_word.c
64
BN_mod_word(const BIGNUM *a, BN_ULONG w)
crypto/libressl/crypto/bn/bn_word.c
73
if (w == 0)
crypto/libressl/crypto/bn/bn_word.c
79
if (w > ((BN_ULONG)1 << BN_BITS4)) {
crypto/libressl/crypto/bn/bn_word.c
84
ret = BN_div_word(tmp, w);
crypto/libressl/crypto/bn/bn_word.c
91
w &= BN_MASK2;
crypto/libressl/crypto/bn/bn_word.c
95
BN_MASK2l)) % w;
crypto/libressl/crypto/bn/bn_word.c
96
ret = ((ret << BN_BITS4) | (a->d[i] & BN_MASK2l)) % w;
crypto/libressl/crypto/bn/bn_word.c
99
a->d[i]) % (BN_ULLONG)w);
crypto/libressl/crypto/cast/cast_lcl.h
177
CAST_LONG u,v,w; \
crypto/libressl/crypto/cast/cast_lcl.h
178
w=(key[n*2] OP1 R)&0xffffffffL; \
crypto/libressl/crypto/cast/cast_lcl.h
180
w=ROTL(w,i); \
crypto/libressl/crypto/cast/cast_lcl.h
181
u=w>>C_2; \
crypto/libressl/crypto/cast/cast_lcl.h
182
v=w<<C_3; \
crypto/libressl/crypto/cast/cast_lcl.h
186
u=w>>C_0; \
crypto/libressl/crypto/cast/cast_lcl.h
188
v=w>>C_1; \
crypto/libressl/crypto/chacha/chacha-merged.c
66
#define XOR(v,w) ((v) ^ (w))
crypto/libressl/crypto/chacha/chacha-merged.c
67
#define PLUS(v,w) (U32V((v) + (w)))
crypto/libressl/crypto/ec/ec_mult.c
116
ret->w = 4; /* default */
crypto/libressl/crypto/ec/ec_mult.c
195
compute_wNAF(const BIGNUM * scalar, int w, size_t * ret_len)
crypto/libressl/crypto/ec/ec_mult.c
214
if (w <= 0 || w > 7) {
crypto/libressl/crypto/ec/ec_mult.c
220
bit = 1 << w; /* at most 128 */
crypto/libressl/crypto/ec/ec_mult.c
242
while ((window_val != 0) || (j + w + 1 < len)) {
crypto/libressl/crypto/ec/ec_mult.c
253
if (j + w + 1 >= len) {
crypto/libressl/crypto/ec/ec_mult.c
289
window_val += bit * BN_is_bit_set(scalar, j + w);
crypto/libressl/crypto/ec/ec_mult.c
411
pre_points_per_block = (size_t) 1 << (pre_comp->w - 1);
crypto/libressl/crypto/ec/ec_mult.c
483
wsize[num] = pre_comp->w;
crypto/libressl/crypto/ec/ec_mult.c
688
signed char **w;
crypto/libressl/crypto/ec/ec_mult.c
690
for (w = wNAF; *w != NULL; w++)
crypto/libressl/crypto/ec/ec_mult.c
691
free(*w);
crypto/libressl/crypto/ec/ec_mult.c
731
size_t i, bits, w, pre_points_per_block, blocksize, numblocks,
crypto/libressl/crypto/ec/ec_mult.c
773
w = 4;
crypto/libressl/crypto/ec/ec_mult.c
774
if (EC_window_bits_for_scalar_size(bits) > w) {
crypto/libressl/crypto/ec/ec_mult.c
776
w = EC_window_bits_for_scalar_size(bits);
crypto/libressl/crypto/ec/ec_mult.c
782
pre_points_per_block = (size_t) 1 << (w - 1);
crypto/libressl/crypto/ec/ec_mult.c
849
pre_comp->w = w;
crypto/libressl/crypto/ec/ec_mult.c
87
size_t w; /* window size */
crypto/libressl/crypto/ec/ecp_smpl.c
1481
#define EC_POINT_CSWAP(c, a, b, w, t) do { \
crypto/libressl/crypto/ec/ecp_smpl.c
1482
if (!BN_swap_ct(c, &(a)->X, &(b)->X, w) || \
crypto/libressl/crypto/ec/ecp_smpl.c
1483
!BN_swap_ct(c, &(a)->Y, &(b)->Y, w) || \
crypto/libressl/crypto/ec/ecp_smpl.c
1484
!BN_swap_ct(c, &(a)->Z, &(b)->Z, w)) \
crypto/libressl/crypto/gost/gostr341194.c
66
swap_bytes(unsigned char *w, unsigned char *k)
crypto/libressl/crypto/gost/gostr341194.c
72
k[i + 4 * j] = w[8 * i + j];
crypto/libressl/crypto/gost/gostr341194.c
77
circle_xor8(const unsigned char *w, unsigned char *k)
crypto/libressl/crypto/gost/gostr341194.c
82
memcpy(buf, w, 8);
crypto/libressl/crypto/gost/gostr341194.c
83
memmove(k, w + 8, 24);
crypto/libressl/crypto/pem/pem_lib.c
114
i = EVP_read_pw_string_min(buf, MIN_LENGTH, num, prompt, w);
crypto/libressl/crypto/pem/pem_lib.c
92
PEM_def_callback(char *buf, int num, int w, void *key)
crypto/libressl/crypto/ripemd/rmd_locl.h
126
#define RIP1(a,b,c,d,e,w,s) { \
crypto/libressl/crypto/ripemd/rmd_locl.h
127
a+=F1(b,c,d)+X(w); \
crypto/libressl/crypto/ripemd/rmd_locl.h
131
#define RIP2(a,b,c,d,e,w,s,K) { \
crypto/libressl/crypto/ripemd/rmd_locl.h
132
a+=F2(b,c,d)+X(w)+K; \
crypto/libressl/crypto/ripemd/rmd_locl.h
136
#define RIP3(a,b,c,d,e,w,s,K) { \
crypto/libressl/crypto/ripemd/rmd_locl.h
137
a+=F3(b,c,d)+X(w)+K; \
crypto/libressl/crypto/ripemd/rmd_locl.h
141
#define RIP4(a,b,c,d,e,w,s,K) { \
crypto/libressl/crypto/ripemd/rmd_locl.h
142
a+=F4(b,c,d)+X(w)+K; \
crypto/libressl/crypto/ripemd/rmd_locl.h
146
#define RIP5(a,b,c,d,e,w,s,K) { \
crypto/libressl/crypto/ripemd/rmd_locl.h
147
a+=F5(b,c,d)+X(w)+K; \
crypto/libressl/include/openssl/bn.h
338
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
crypto/libressl/include/openssl/bn.h
341
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
crypto/libressl/include/openssl/bn.h
414
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/bn.h
415
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/bn.h
416
int BN_mul_word(BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/bn.h
417
int BN_add_word(BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/bn.h
418
int BN_sub_word(BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/bn.h
419
int BN_set_word(BIGNUM *a, BN_ULONG w);
crypto/libressl/include/openssl/pem.h
412
int PEM_def_callback(char *buf, int num, int w, void *key);
crypto/openssh/bitmap.c
144
BITMAP_WTYPE w;
crypto/openssh/bitmap.c
152
w = b->d[b->top];
crypto/openssh/bitmap.c
154
while (!(w & ((BITMAP_WTYPE)1 << (BITMAP_BITS - 1)))) {
crypto/openssh/bitmap.c
155
w <<= 1;
crypto/openssh/chacha.c
41
#define XOR(v,w) ((v) ^ (w))
crypto/openssh/chacha.c
42
#define PLUS(v,w) (U32V((v) + (w)))
crypto/openssh/sntrup761.c
490
return int16_nonzero_mask(weight-w);
crypto/openssh/sntrup761.c
675
for (i = 0;i < w;++i) L[i] = in[i]&(uint32)-2;
crypto/openssh/sntrup761.c
676
for (i = w;i < p;++i) L[i] = (in[i]&(uint32)-3)|1;
crypto/openssh/sntrup761.c
777
for (i = 0;i < w;++i) r[i] = ((ev[i]^1)&~mask)^1;
crypto/openssh/sntrup761.c
778
for (i = w;i < p;++i) r[i] = ev[i]&~mask;
crypto/openssh/sntrup761.c
818
r[i] = -int16_negative_mask(Fq_freeze(Right(T[i])-aB[i]+4*w+1));
crypto/openssh/sshkey-xmss.c
108
state->w = 16;
crypto/openssh/sshkey-xmss.c
112
state->w = 16;
crypto/openssh/sshkey-xmss.c
116
state->w = 16;
crypto/openssh/sshkey-xmss.c
128
if (xmss_set_params(&state->params, state->n, state->h, state->w,
crypto/openssh/sshkey-xmss.c
57
u_int32_t n, w, h, k;
crypto/openssh/sshpty.c
155
struct winsize w;
crypto/openssh/sshpty.c
158
w.ws_row = row;
crypto/openssh/sshpty.c
159
w.ws_col = col;
crypto/openssh/sshpty.c
160
w.ws_xpixel = xpixel;
crypto/openssh/sshpty.c
161
w.ws_ypixel = ypixel;
crypto/openssh/sshpty.c
162
(void) ioctl(ptyfd, TIOCSWINSZ, &w);
crypto/openssh/xmss_fast.c
101
if (xmss_set_params(&xmss_par, n, (h/d), w, k)) {
crypto/openssh/xmss_fast.c
53
int xmss_set_params(xmss_params *params, int n, int h, int w, int k)
crypto/openssh/xmss_fast.c
63
wots_set_params(&wots_par, n, w);
crypto/openssh/xmss_fast.c
90
int xmssmt_set_params(xmssmt_params *params, int n, int h, int d, int w, int k)
crypto/openssh/xmss_fast.h
63
int xmss_set_params(xmss_params *params, int n, int h, int w, int k);
crypto/openssh/xmss_fast.h
70
int xmssmt_set_params(xmssmt_params *params, int n, int h, int d, int w, int k);
crypto/openssh/xmss_wots.c
103
output[out] = (total >> bits) & (params->w - 1);
crypto/openssh/xmss_wots.c
114
gen_chain(pk+i*params->n, pk+i*params->n, 0, params->w-1, params, pub_seed, addr);
crypto/openssh/xmss_wots.c
131
csum += params->w - 1 - basew[i];
crypto/openssh/xmss_wots.c
169
csum += params->w - 1 - basew[i];
crypto/openssh/xmss_wots.c
187
gen_chain(pk+i*params->n, sig+i*params->n, basew[i], params->w-1-basew[i], params, pub_seed, addr);
crypto/openssh/xmss_wots.c
38
wots_set_params(wots_params *params, int n, int w)
crypto/openssh/xmss_wots.c
41
params->w = w;
crypto/openssh/xmss_wots.c
42
params->log_w = wots_log2(params->w);
crypto/openssh/xmss_wots.c
44
params->len_2 = (wots_log2(params->len_1 * (w - 1)) / params->log_w) + 1;
crypto/openssh/xmss_wots.c
77
for (i = start; i < (start+steps) && i < params->w; i++) {
crypto/openssh/xmss_wots.h
27
uint32_t w;
crypto/openssh/xmss_wots.h
39
void wots_set_params(wots_params *params, int n, int w);
games/atc/graphics.c
215
draw_line(WINDOW *w, int x, int y, int lx, int ly, const char *s)
games/atc/graphics.c
222
wmove(w, y, x * 2);
games/atc/graphics.c
223
waddstr(w, s);
games/battlestar/parse.c
48
struct wlist *w;
games/battlestar/parse.c
50
for (w = wlist; w->string; w++)
games/battlestar/parse.c
51
install(w);
games/bcd/bcd.c
112
#define bit(w,i) ((w)&(1<<(i)))
games/boggle/boggle/bog.c
223
char *w;
games/boggle/boggle/bog.c
229
while ((w = nextword(fp)) != NULL) {
games/boggle/boggle/bog.c
236
if (checkword(w, -1, wordpath) != -1)
games/boggle/boggle/bog.c
237
return (w);
games/boggle/boggle/bog.c
464
char *q, *w;
games/boggle/boggle/bog.c
472
while ((w = nextword(dictfp)) != NULL) {
games/boggle/boggle/bog.c
475
if (*w != word[0]) /* end of words starting with word[0] */
games/boggle/boggle/bog.c
478
while ((ch = *w++) == *q++ && ch != '\0')
games/boggle/boggle/bog.c
480
if (*(w - 1) == '\0' && *(q - 1) == '\0')
games/boggle/boggle/bog.c
496
char **pw, *w;
games/boggle/boggle/bog.c
507
while ((w = nextword(dictfp)) != NULL) {
games/boggle/boggle/bog.c
510
if (*w != prevch) {
games/boggle/boggle/bog.c
517
i = (int) (*w - 'a');
games/boggle/boggle/bog.c
545
if (checkword(w, -1, wordpath) == -1)
games/boggle/boggle/bog.c
549
while (*pw != NULL && (st = strcmp(*pw, w)) < 0)
games/boggle/boggle/bog.c
570
memcpy(mwordsp, w, wordlen + 1);
games/boggle/boggle/mach.c
353
addword(char *w)
games/boggle/boggle/mach.c
366
if ((n = strlen(w)) > maxw)
games/quiz/quiz.c
323
score(u_int r, u_int w, u_int g)
games/quiz/quiz.c
325
printf("Rights %d, wrongs %d,", r, w);
games/quiz/quiz.c
328
printf(" score %d%%\n", (r + w + g) ? r * 100 / (r + w + g) : 0);
games/rogue/level.c
707
short h, w;
games/rogue/level.c
717
w = col2 - col1;
games/rogue/level.c
719
if ((w >= 5) || (h >= 5)) {
games/rogue/level.c
721
col_cut = ((w >= 2) ? 1 : 0);
games/rogue/machdep.c
506
int w;
games/rogue/machdep.c
519
waitpid(pid, &w, 0);
games/snake/snake/snake.c
590
int w, i, wt[8];
games/snake/snake/snake.c
594
w = 0;
games/snake/snake/snake.c
605
w = i;
games/snake/snake/snake.c
624
wt[i] = i == w ? loot / 10 : 1;
games/snake/snake/snake.c
628
for (w = i = 0; i < 8; i++)
games/snake/snake/snake.c
629
w += wt[i];
games/snake/snake/snake.c
630
vp = ((random() >> 6) & 01777) % w;
games/snake/snake/snake.c
642
oldw = w = i;
games/snake/snake/snake.c
643
point(np, sp->col + mx[w], sp->line + my[w]);
games/snake/snake/snake.c
647
spacewarp(int w)
games/snake/snake/snake.c
659
if (w) {
games/worms/worms.c
176
struct worm *w;
games/worms/worms.c
239
for (n = number, w = &worm[0]; --n >= 0; w++) {
games/worms/worms.c
240
w->orientation = w->head = 0;
games/worms/worms.c
243
w->xpos = ip;
games/worms/worms.c
248
w->ypos = ip;
games/worms/worms.c
278
for (n = 0, w = &worm[0]; n < number; n++, w++) {
games/worms/worms.c
279
if ((x = w->xpos[h = w->head]) < 0) {
games/worms/worms.c
280
mvaddch(y = w->ypos[h] = bottom,
games/worms/worms.c
281
x = w->xpos[h] = 0,
games/worms/worms.c
286
y = w->ypos[h];
games/worms/worms.c
289
if (w->xpos[w->head = h] >= 0) {
games/worms/worms.c
292
x1 = w->xpos[h];
games/worms/worms.c
293
y1 = w->ypos[h];
games/worms/worms.c
298
op = &(!x ? (!y ? upleft : (y == bottom ? lowleft : left)) : (x == last ? (!y ? upright : (y == bottom ? lowright : right)) : (!y ? upper : (y == bottom ? lower : normal))))[w->orientation];
games/worms/worms.c
305
w->orientation = op->opts[0];
games/worms/worms.c
308
w->orientation =
games/worms/worms.c
311
mvaddch(y += yinc[w->orientation],
games/worms/worms.c
312
x += xinc[w->orientation],
games/worms/worms.c
314
ref[w->ypos[h] = y][w->xpos[h] = x]++;
lib/libc/citrus/citrus_memstream.h
103
_citrus_memory_stream_seek(struct _citrus_memory_stream *ms, size_t pos, int w)
lib/libc/citrus/citrus_memstream.h
109
switch (w) {
lib/libc/net/getaddrinfo.c
314
#define MATCH_FAMILY(x, y, w) \
lib/libc/net/getaddrinfo.c
315
((x) == (y) || (/*CONSTCOND*/(w) && ((x) == PF_UNSPEC || (y) == PF_UNSPEC)))
lib/libc/net/getaddrinfo.c
316
#define MATCH(x, y, w) \
lib/libc/net/getaddrinfo.c
317
((x) == (y) || (/*CONSTCOND*/(w) && ((x) == ANY || (y) == ANY)))
lib/libc/stdio/fvwrite.c
119
w = fp->pub._w;
lib/libc/stdio/fvwrite.c
121
if (len < w)
lib/libc/stdio/fvwrite.c
122
w = len;
lib/libc/stdio/fvwrite.c
123
if (w > 0) {
lib/libc/stdio/fvwrite.c
124
COPY(w); /* copy MIN(fp->pub._w,len), */
lib/libc/stdio/fvwrite.c
125
fp->pub._w -= w;
lib/libc/stdio/fvwrite.c
126
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
128
w = len; /* but pretend copied all */
lib/libc/stdio/fvwrite.c
129
} else if (fp->pub._p > fp->_bf._base && len > w) {
lib/libc/stdio/fvwrite.c
131
COPY(w);
lib/libc/stdio/fvwrite.c
133
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
136
} else if (len >= (w = fp->_bf._size)) {
lib/libc/stdio/fvwrite.c
138
w = _swrite(fp, p, w);
lib/libc/stdio/fvwrite.c
139
if (w <= 0)
lib/libc/stdio/fvwrite.c
143
w = len;
lib/libc/stdio/fvwrite.c
144
COPY(w);
lib/libc/stdio/fvwrite.c
145
fp->pub._w -= w;
lib/libc/stdio/fvwrite.c
146
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
148
p += w;
lib/libc/stdio/fvwrite.c
149
len -= w;
lib/libc/stdio/fvwrite.c
150
} while ((uio->uio_resid -= w) != 0);
lib/libc/stdio/fvwrite.c
169
w = fp->pub._w + fp->_bf._size;
lib/libc/stdio/fvwrite.c
170
if (fp->pub._p > fp->_bf._base && s > w) {
lib/libc/stdio/fvwrite.c
171
COPY(w);
lib/libc/stdio/fvwrite.c
173
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
176
} else if (s >= (w = fp->_bf._size)) {
lib/libc/stdio/fvwrite.c
177
w = _swrite(fp, p, w);
lib/libc/stdio/fvwrite.c
178
if (w <= 0)
lib/libc/stdio/fvwrite.c
181
w = s;
lib/libc/stdio/fvwrite.c
182
COPY(w);
lib/libc/stdio/fvwrite.c
183
fp->pub._w -= w;
lib/libc/stdio/fvwrite.c
184
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
186
if ((nldist -= w) == 0) {
lib/libc/stdio/fvwrite.c
192
p += w;
lib/libc/stdio/fvwrite.c
193
len -= w;
lib/libc/stdio/fvwrite.c
194
} while ((uio->uio_resid -= w) != 0);
lib/libc/stdio/fvwrite.c
53
int w, s;
lib/libc/stdio/fvwrite.c
83
w = _swrite(fp, p, MIN(len, BUFSIZ));
lib/libc/stdio/fvwrite.c
84
if (w <= 0)
lib/libc/stdio/fvwrite.c
86
p += w;
lib/libc/stdio/fvwrite.c
87
len -= w;
lib/libc/stdio/fvwrite.c
88
} while ((uio->uio_resid -= w) != 0);
lib/libc/stdio/gets.c
51
static char w[] =
lib/libc/stdio/gets.c
57
_write(STDERR_FILENO, w, sizeof(w) - 1);
lib/libc/stdio/putw.c
44
putw(int w, FILE *fp)
lib/libc/stdio/putw.c
50
iov.iov_base = &w;
lib/libc/stdio/putw.c
51
iov.iov_len = uio.uio_resid = sizeof(w);
lib/libc/stdtime/strftime.c
362
int w;
lib/libc/stdtime/strftime.c
393
w = 1;
lib/libc/stdtime/strftime.c
397
w = 1 + ((yday - bot) /
lib/libc/stdtime/strftime.c
407
if ((w == 52 &&
lib/libc/stdtime/strftime.c
409
(w == 1 &&
lib/libc/stdtime/strftime.c
411
w = 53;
lib/libc/stdtime/strftime.c
414
pt = _conv(w, fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex],
lib/libc/upmap/ukp_clock.c
66
int w;
lib/libc/upmap/ukp_clock.c
79
w = *upticksp;
lib/libc/upmap/ukp_clock.c
81
*ts = ts_uptime[w & 1];
lib/libc/upmap/ukp_clock.c
83
w = *upticksp - w;
lib/libc/upmap/ukp_clock.c
84
} while (w > 1);
lib/libc/upmap/ukp_clock.c
90
w = *upticksp;
lib/libc/upmap/ukp_clock.c
92
*ts = ts_realtime[w & 1];
lib/libc/upmap/ukp_clock.c
94
w = *upticksp - w;
lib/libc/upmap/ukp_clock.c
95
} while (w > 1);
lib/libc/upmap/ukp_gettimeofday.c
67
int w;
lib/libc/upmap/ukp_gettimeofday.c
77
w = *upticksp;
lib/libc/upmap/ukp_gettimeofday.c
79
ts = ts_realtime[w & 1];
lib/libc/upmap/ukp_gettimeofday.c
81
w = *upticksp - w;
lib/libc/upmap/ukp_gettimeofday.c
82
} while (w > 1);
lib/libcrypt/crypt-sha256.c
101
#define CYCLIC(w, s) ((w >> s) | (w << (32 - s)))
lib/libcrypt/crypt-sha256.c
493
unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
lib/libcrypt/crypt-sha256.c
497
*cp++ = b64t[w & 0x3f]; \
lib/libcrypt/crypt-sha256.c
499
w >>= 6; \
lib/libcrypt/crypt-sha512.c
132
#define CYCLIC(w, s) ((w >> s) | (w << (64 - s)))
lib/libcrypt/crypt-sha512.c
524
unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
lib/libcrypt/crypt-sha512.c
528
*cp++ = b64t[w & 0x3f]; \
lib/libcrypt/crypt-sha512.c
530
w >>= 6; \
lib/libfetch/ftp.c
531
int w;
lib/libfetch/ftp.c
546
w = fetch_write(io->dconn, buf, len);
lib/libfetch/ftp.c
547
if (w >= 0)
lib/libfetch/ftp.c
548
return (w);
lib/libnvmm/libnvmm_x86.c
2414
} else if (instr->rexpref.present && instr->rexpref.w) {
lib/libnvmm/libnvmm_x86.c
2597
rexpref->w = ((byte & 0x8) != 0);
lib/libnvmm/libnvmm_x86.c
971
bool w:1;
lib/libtcplay/io.c
182
ssize_t r, w;
lib/libtcplay/io.c
225
if ((w = write(fd, buf, r)) < 0) {
lib/libtcplay/io.c
234
erased += (size_t)w;
lib/libtcplay/io.c
307
ssize_t w;
lib/libtcplay/io.c
348
if ((w = write(fd, (mem_buf != NULL) ? mem_buf : mem, bytes)) <= 0) {
lib/libtcplay/io.c
366
ssize_t w;
lib/libtcplay/io.c
373
if ((w = write(fd, mem, bytes)) < 0) {
lib/libusb/libusb01.c
287
uint16_t w;
lib/libusb/libusb01.c
300
w = (sp[1] << 8) | sp[0];
lib/libusb/libusb01.c
304
*((uint16_t *)dp) = w;
lib/libutil/sockaddr_snprintf.c
114
char *w = NULL;
lib/libutil/sockaddr_snprintf.c
157
if ((w = strchr(addr, ':')) != NULL) {
lib/libutil/sockaddr_snprintf.c
158
*w++ = '\0';
lib/libutil/sockaddr_snprintf.c
159
addr = w;
lib/libutil/trimdomain.c
100
w = strspn(disp, "0123456789");
lib/libutil/trimdomain.c
102
if (w > 0) {
lib/libutil/trimdomain.c
103
if (disp[w] == '\0')
lib/libutil/trimdomain.c
105
else if (disp[w] == '.') {
lib/libutil/trimdomain.c
106
disp += w + 1;
lib/libutil/trimdomain.c
107
w = strspn(disp, "0123456789");
lib/libutil/trimdomain.c
108
if (w > 0 && disp[w] == '\0')
lib/libutil/trimdomain.c
97
size_t w;
libexec/bootpd/rtmsg.c
221
#define NEXTADDR(w, s) \
libexec/bootpd/rtmsg.c
222
if (rtm->rtm_addrs & (w)) { \
libexec/ftpd/ftpcmd.y
1558
int i, j, w;
libexec/ftpd/ftpcmd.y
1575
w = strlen(c->name) + 1;
libexec/ftpd/ftpcmd.y
1576
while (w < width) {
libexec/ftpd/ftpcmd.y
1578
w++;
libexec/rbootd/rmp_var.h
134
#define WORDZE(w) \
libexec/rbootd/rmp_var.h
135
((w.val[_WORD_HIGHPART] == 0) && (w.val[_WORD_LOWPART] == 0))
libexec/rbootd/rmp_var.h
136
#define ZEROWORD(w) \
libexec/rbootd/rmp_var.h
137
(w).val[_WORD_HIGHPART] = (w).val[_WORD_LOWPART] = 0
libexec/rbootd/rmp_var.h
142
#define GETWORD(w, i) \
libexec/rbootd/rmp_var.h
143
(i) = (((u_int32_t)ntohs((w).val[_WORD_HIGHPART])) << 16) | ntohs((w).val[_WORD_LOWPART])
libexec/rbootd/rmp_var.h
144
#define PUTWORD(i, w) \
libexec/rbootd/rmp_var.h
145
{ (w).val[_WORD_HIGHPART] = htons((u_int16_t) ((i >> 16) & 0xffff)); \
libexec/rbootd/rmp_var.h
146
(w).val[_WORD_LOWPART] = htons((u_int16_t) (i & 0xffff)); \
sbin/disklabel32/disklabel.c
1061
#define NXTWORD(w,n) do { \
sbin/disklabel32/disklabel.c
1069
if (tmp) (w) = *tmp; \
sbin/hammer/cmd_mirror.c
1710
score_printf(size_t i, size_t w, const char *ctl, ...)
sbin/hammer/cmd_mirror.c
1720
assert(i + w < sizeof(ScoreBuf));
sbin/hammer/cmd_mirror.c
1732
vsnprintf(ScoreBuf + i, w - 1, ctl, va);
sbin/hammer/cmd_mirror.c
1735
while (n < w - 1) {
sbin/hammer/cmd_mirror.c
1740
if (SSize < i + w)
sbin/hammer/cmd_mirror.c
1741
SSize = i + w;
sbin/hammer/cmd_mirror.c
70
static void score_printf(size_t i, size_t w, const char *ctl, ...);
sbin/hammer2/cmd_stat.c
47
int w;
sbin/hammer2/cmd_stat.c
55
for (i = w = 0; i < ac; ++i) {
sbin/hammer2/cmd_stat.c
56
if (w < (int)strlen(av[i]))
sbin/hammer2/cmd_stat.c
57
w = (int)strlen(av[i]);
sbin/hammer2/cmd_stat.c
59
if (w < 16)
sbin/hammer2/cmd_stat.c
60
w = 16;
sbin/hammer2/cmd_stat.c
62
w, w, "PATH");
sbin/hammer2/cmd_stat.c
74
printf("%-*.*s ", w, w, av[i]);
sbin/hammer2/cmd_volume.c
44
int fd, i, j, n, w, all = 0, ecode = 0;
sbin/hammer2/cmd_volume.c
70
w = 0;
sbin/hammer2/cmd_volume.c
74
if (n > w)
sbin/hammer2/cmd_volume.c
75
w = n;
sbin/hammer2/cmd_volume.c
91
entry->id, w, w, entry->path,
sbin/hammer2/ondisk.c
482
int i, n, w = 0;
sbin/hammer2/ondisk.c
487
if (n > w)
sbin/hammer2/ondisk.c
488
w = n;
sbin/hammer2/ondisk.c
492
w, w, "", (intmax_t)0, (intmax_t)fsp->total_size);
sbin/hammer2/ondisk.c
497
vol->id, w, w, vol->path, (intmax_t)vol->offset,
sbin/hammer2/subs.c
421
int w;
sbin/hammer2/subs.c
440
for (i = w = 0; i < n; ++i) {
sbin/hammer2/subs.c
443
av[w++] = strdup(fs[i].f_mntonname);
sbin/hammer2/subs.c
445
*acp = w;
sbin/hammer2/zlib/hammer2_zlib_trees.c
176
#define put_short(s, w) { \
sbin/hammer2/zlib/hammer2_zlib_trees.c
177
put_byte(s, (uch)((w) & 0xff)); \
sbin/hammer2/zlib/hammer2_zlib_trees.c
178
put_byte(s, (uch)((ush)(w) >> 8)); \
sbin/ifconfig/ifieee80211.c
2769
u_int32_t w = LE_READ_4(sel);
sbin/ifconfig/ifieee80211.c
2771
switch (w) {
sbin/ifconfig/ifieee80211.c
2791
u_int32_t w = LE_READ_4(sel);
sbin/ifconfig/ifieee80211.c
2793
switch (w) {
sbin/ifconfig/ifieee80211.c
2854
u_int32_t w = LE_READ_4(sel);
sbin/ifconfig/ifieee80211.c
2856
switch (w) {
sbin/ifconfig/ifieee80211.c
2878
u_int32_t w = LE_READ_4(sel);
sbin/ifconfig/ifieee80211.c
2880
switch (w) {
sbin/iscontrol/config.c
148
#define _OPT_INT(w) strtol((char *)w, NULL, 0)
sbin/iscontrol/config.c
149
#define _OPT_STR(w) (char *)(w)
sbin/iscontrol/config.c
152
_OPT_BOOL(char *w)
sbin/iscontrol/config.c
154
if(isalpha(*w))
sbin/iscontrol/config.c
155
return strcasecmp(w, "TRUE") == 0;
sbin/iscontrol/config.c
157
return _OPT_INT(w);
sbin/newfs/mkfs.c
199
ssize_t w;
sbin/newfs/mkfs.c
208
w = write(fd, buf, l1);
sbin/newfs/mkfs.c
209
if (w < 0 || (u_long)w != l1)
sbin/ping/ping.c
1202
u_short *w;
sbin/ping/ping.c
1211
w = addr;
sbin/ping/ping.c
1219
sum += *w++;
sbin/ping/ping.c
1225
last.uc[0] = *(u_char *)w;
sbin/restore/interactive.c
629
int i, j, w, precision = 0, columns, lines;
sbin/restore/interactive.c
680
for (w = fp->len; w < width; w++)
sbin/route/route.c
1315
#define NEXTADDR(w, u) \
sbin/route/route.c
1316
if (rtm_addrs & (w)) {\
sbin/routed/table.c
678
} w;
sbin/routed/table.c
684
memset(&w, 0, sizeof(w));
sbin/routed/table.c
685
w.w_rtm.rtm_msglen = sizeof(w);
sbin/routed/table.c
686
w.w_rtm.rtm_version = RTM_VERSION;
sbin/routed/table.c
687
w.w_rtm.rtm_type = action;
sbin/routed/table.c
688
w.w_rtm.rtm_flags = flags;
sbin/routed/table.c
689
w.w_rtm.rtm_seq = ++rt_sock_seqno;
sbin/routed/table.c
690
w.w_rtm.rtm_addrs = RTA_DST|RTA_GATEWAY;
sbin/routed/table.c
692
w.w_rtm.rtm_rmx.rmx_hopcount = metric;
sbin/routed/table.c
693
w.w_rtm.rtm_inits |= RTV_HOPCOUNT;
sbin/routed/table.c
695
w.w_dst.sin_family = AF_INET;
sbin/routed/table.c
696
w.w_dst.sin_addr.s_addr = dst;
sbin/routed/table.c
697
w.w_gate.sin_family = AF_INET;
sbin/routed/table.c
698
w.w_gate.sin_addr.s_addr = gate;
sbin/routed/table.c
699
w.w_dst.sin_len = sizeof(w.w_dst);
sbin/routed/table.c
700
w.w_gate.sin_len = sizeof(w.w_gate);
sbin/routed/table.c
702
w.w_rtm.rtm_flags |= RTF_HOST;
sbin/routed/table.c
703
w.w_rtm.rtm_msglen -= sizeof(w.w_mask);
sbin/routed/table.c
705
w.w_rtm.rtm_addrs |= RTA_NETMASK;
sbin/routed/table.c
706
w.w_mask.sin_addr.s_addr = htonl(mask);
sbin/routed/table.c
707
masktrim(&w.w_mask);
sbin/routed/table.c
708
if (w.w_mask.sin_len == 0)
sbin/routed/table.c
709
w.w_mask.sin_len = sizeof(long);
sbin/routed/table.c
710
w.w_rtm.rtm_msglen -= (sizeof(w.w_mask) - w.w_mask.sin_len);
sbin/routed/table.c
714
cc = write(rt_sock, &w, w.w_rtm.rtm_msglen);
sbin/routed/table.c
727
} else if (cc != w.w_rtm.rtm_msglen) {
sbin/routed/table.c
729
cc, w.w_rtm.rtm_msglen, ARGS);
sbin/routed/trace.c
799
walk_trace(struct radix_node *rn, void *w __unused)
sbin/udevd/udevd_monitor.c
423
WildCaseCmp(const char *w, const char *s)
sbin/udevd/udevd_monitor.c
430
for (i = c = 0; w[i]; ++i) {
sbin/udevd/udevd_monitor.c
431
if (w[i] == '*')
sbin/udevd/udevd_monitor.c
440
i = wildCaseCmp(mary, 0, w, s);
sbin/udevd/udevd_monitor.c
451
wildCaseCmp(const char **mary, int d, const char *w, const char *s)
sbin/udevd/udevd_monitor.c
459
switch(*w) {
sbin/udevd/udevd_monitor.c
464
if (w[1] == 0)
sbin/udevd/udevd_monitor.c
466
if (w[1] != '?' && w[1] != '*') {
sbin/udevd/udevd_monitor.c
471
if (s[i] == w[1] && wildCaseCmp(mary, d + 1, w + 1, s + i) == 0)
sbin/udevd/udevd_monitor.c
479
if (wildCaseCmp(mary, d + 1, w + 1, s + i) == 0)
sbin/udevd/udevd_monitor.c
488
++w;
sbin/udevd/udevd_monitor.c
492
if (*w != *s) {
sbin/udevd/udevd_monitor.c
493
if (tolower(*w) != tolower(*s))
sbin/udevd/udevd_monitor.c
496
if (*w == 0) /* terminator */
sbin/udevd/udevd_monitor.c
498
++w;
sbin/udevd/udevd_monitor.c
70
static int WildCaseCmp(const char *w, const char *s);
sbin/udevd/udevd_monitor.c
71
static int wildCaseCmp(const char **mary, int d, const char *w, const char *s);
sbin/vinum/vinumparser.c
154
flagkeypair(w)
stand/boot/common/rel_open.c
109
p = b = w = s = base;
stand/boot/common/rel_open.c
113
w = p;
stand/boot/common/rel_open.c
121
*w = *s;
stand/boot/common/rel_open.c
122
++w;
stand/boot/common/rel_open.c
126
w = p;
stand/boot/common/rel_open.c
127
while (w > base && w[-1] == '/')
stand/boot/common/rel_open.c
128
--w;
stand/boot/common/rel_open.c
129
*w++ = '/';
stand/boot/common/rel_open.c
130
*w = 0;
stand/boot/common/rel_open.c
86
char *w;
stand/lib/uuid_to_string.c
101
tohex(&w, 2, u->clock_seq_hi_and_reserved);
stand/lib/uuid_to_string.c
102
tohex(&w, 2, u->clock_seq_low);
stand/lib/uuid_to_string.c
103
*w++ = '-';
stand/lib/uuid_to_string.c
104
tohex(&w, 2, u->node[0]);
stand/lib/uuid_to_string.c
105
tohex(&w, 2, u->node[1]);
stand/lib/uuid_to_string.c
106
tohex(&w, 2, u->node[2]);
stand/lib/uuid_to_string.c
107
tohex(&w, 2, u->node[3]);
stand/lib/uuid_to_string.c
108
tohex(&w, 2, u->node[4]);
stand/lib/uuid_to_string.c
109
tohex(&w, 2, u->node[5]);
stand/lib/uuid_to_string.c
110
*w++ = '\0';
stand/lib/uuid_to_string.c
77
char *w;
stand/lib/uuid_to_string.c
83
w = *s = malloc(37);
stand/lib/uuid_to_string.c
94
tohex(&w, 8, u->time_low);
stand/lib/uuid_to_string.c
95
*w++ = '-';
stand/lib/uuid_to_string.c
96
tohex(&w, 4, u->time_mid);
stand/lib/uuid_to_string.c
97
*w++ = '-';
stand/lib/uuid_to_string.c
98
tohex(&w, 4, u->time_hi_and_version);
stand/lib/uuid_to_string.c
99
*w++ = '-';
sys/bus/firewire/fwohci.c
2093
int w=0, ldesc;
sys/bus/firewire/fwohci.c
2124
w++;
sys/bus/firewire/fwohci.c
2127
if (w)
sys/bus/firewire/fwohci.c
2139
int w=0, ldesc;
sys/bus/firewire/fwohci.c
2179
w++;
sys/bus/firewire/fwohci.c
2182
if (w) {
sys/bus/pci/pci.c
3073
#define REG(n, w) PCIB_READ_CONFIG(pcib, busno, s, f, n, w)
sys/bus/pci/pci.c
510
#define REG(n, w) PCIB_READ_CONFIG(pcib, b, s, f, n, w)
sys/bus/pci/pci.c
533
#define REG(n, w) PCIB_READ_CONFIG(pcib, b, s, f, n, w)
sys/bus/pci/pci.c
639
#define REG(n, w) \
sys/bus/pci/pci.c
640
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
673
#define REG(n, w) \
sys/bus/pci/pci.c
674
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
716
#define REG(n, w) \
sys/bus/pci/pci.c
717
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
731
#define REG(n, w) \
sys/bus/pci/pci.c
732
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
763
#define REG(n, w) \
sys/bus/pci/pci.c
764
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
823
#define REG(n, w) \
sys/bus/pci/pci.c
824
PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
850
#define REG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/bus/pci/pci.c
851
#define WREG(n, v, w) PCIB_WRITE_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, v, w)
sys/bus/u4b/usb_endian.h
101
#define USETW4(w,b3,b2,b1,b0) do { \
sys/bus/u4b/usb_endian.h
102
(w)[0] = (uint8_t)(b0); \
sys/bus/u4b/usb_endian.h
103
(w)[1] = (uint8_t)(b1); \
sys/bus/u4b/usb_endian.h
104
(w)[2] = (uint8_t)(b2); \
sys/bus/u4b/usb_endian.h
105
(w)[3] = (uint8_t)(b3); \
sys/bus/u4b/usb_endian.h
108
#define USETW8(w,b7,b6,b5,b4,b3,b2,b1,b0) do { \
sys/bus/u4b/usb_endian.h
109
(w)[0] = (uint8_t)(b0); \
sys/bus/u4b/usb_endian.h
110
(w)[1] = (uint8_t)(b1); \
sys/bus/u4b/usb_endian.h
111
(w)[2] = (uint8_t)(b2); \
sys/bus/u4b/usb_endian.h
112
(w)[3] = (uint8_t)(b3); \
sys/bus/u4b/usb_endian.h
113
(w)[4] = (uint8_t)(b4); \
sys/bus/u4b/usb_endian.h
114
(w)[5] = (uint8_t)(b5); \
sys/bus/u4b/usb_endian.h
115
(w)[6] = (uint8_t)(b6); \
sys/bus/u4b/usb_endian.h
116
(w)[7] = (uint8_t)(b7); \
sys/bus/u4b/usb_endian.h
46
#define UGETB(w) \
sys/bus/u4b/usb_endian.h
47
((w)[0])
sys/bus/u4b/usb_endian.h
49
#define UGETW(w) \
sys/bus/u4b/usb_endian.h
50
((w)[0] | \
sys/bus/u4b/usb_endian.h
51
(((uint16_t)((w)[1])) << 8))
sys/bus/u4b/usb_endian.h
53
#define UGETDW(w) \
sys/bus/u4b/usb_endian.h
54
((w)[0] | \
sys/bus/u4b/usb_endian.h
55
(((uint16_t)((w)[1])) << 8) | \
sys/bus/u4b/usb_endian.h
56
(((uint32_t)((w)[2])) << 16) | \
sys/bus/u4b/usb_endian.h
57
(((uint32_t)((w)[3])) << 24))
sys/bus/u4b/usb_endian.h
59
#define UGETQW(w) \
sys/bus/u4b/usb_endian.h
60
((w)[0] | \
sys/bus/u4b/usb_endian.h
61
(((uint16_t)((w)[1])) << 8) | \
sys/bus/u4b/usb_endian.h
62
(((uint32_t)((w)[2])) << 16) | \
sys/bus/u4b/usb_endian.h
63
(((uint32_t)((w)[3])) << 24) | \
sys/bus/u4b/usb_endian.h
64
(((uint64_t)((w)[4])) << 32) | \
sys/bus/u4b/usb_endian.h
65
(((uint64_t)((w)[5])) << 40) | \
sys/bus/u4b/usb_endian.h
66
(((uint64_t)((w)[6])) << 48) | \
sys/bus/u4b/usb_endian.h
67
(((uint64_t)((w)[7])) << 56))
sys/bus/u4b/usb_endian.h
69
#define USETB(w,v) do { \
sys/bus/u4b/usb_endian.h
70
(w)[0] = (uint8_t)(v); \
sys/bus/u4b/usb_endian.h
73
#define USETW(w,v) do { \
sys/bus/u4b/usb_endian.h
74
(w)[0] = (uint8_t)(v); \
sys/bus/u4b/usb_endian.h
75
(w)[1] = (uint8_t)((v) >> 8); \
sys/bus/u4b/usb_endian.h
78
#define USETDW(w,v) do { \
sys/bus/u4b/usb_endian.h
79
(w)[0] = (uint8_t)(v); \
sys/bus/u4b/usb_endian.h
80
(w)[1] = (uint8_t)((v) >> 8); \
sys/bus/u4b/usb_endian.h
81
(w)[2] = (uint8_t)((v) >> 16); \
sys/bus/u4b/usb_endian.h
82
(w)[3] = (uint8_t)((v) >> 24); \
sys/bus/u4b/usb_endian.h
85
#define USETQW(w,v) do { \
sys/bus/u4b/usb_endian.h
86
(w)[0] = (uint8_t)(v); \
sys/bus/u4b/usb_endian.h
87
(w)[1] = (uint8_t)((v) >> 8); \
sys/bus/u4b/usb_endian.h
88
(w)[2] = (uint8_t)((v) >> 16); \
sys/bus/u4b/usb_endian.h
89
(w)[3] = (uint8_t)((v) >> 24); \
sys/bus/u4b/usb_endian.h
90
(w)[4] = (uint8_t)((v) >> 32); \
sys/bus/u4b/usb_endian.h
91
(w)[5] = (uint8_t)((v) >> 40); \
sys/bus/u4b/usb_endian.h
92
(w)[6] = (uint8_t)((v) >> 48); \
sys/bus/u4b/usb_endian.h
93
(w)[7] = (uint8_t)((v) >> 56); \
sys/bus/u4b/usb_endian.h
96
#define USETW2(w,b1,b0) do { \
sys/bus/u4b/usb_endian.h
97
(w)[0] = (uint8_t)(b0); \
sys/bus/u4b/usb_endian.h
98
(w)[1] = (uint8_t)(b1); \
sys/bus/u4b/uvc/uvc_drv.c
614
uint16_t rw, rh, w, h;
sys/bus/u4b/uvc/uvc_drv.c
649
w = fmt->frm[i].width;
sys/bus/u4b/uvc/uvc_drv.c
652
d = min(w, rw) * min(h, rh);
sys/bus/u4b/uvc/uvc_drv.c
653
d = w * h + rw * rh - 2 * d;
sys/crypto/chacha20/chacha.c
42
#define XOR(v,w) ((v) ^ (w))
sys/crypto/chacha20/chacha.c
43
#define PLUS(v,w) (U32V((v) + (w)))
sys/crypto/sha2/sha2.c
147
#define REVERSE32(w,x) { \
sys/crypto/sha2/sha2.c
148
sha2_word32 tmp = (w); \
sys/crypto/sha2/sha2.c
152
#define REVERSE64(w,x) { \
sys/crypto/sha2/sha2.c
153
sha2_word64 tmp = (w); \
sys/crypto/sha2/sha2.c
167
#define ADDINC128(w,n) { \
sys/crypto/sha2/sha2.c
168
(w)[0] += (sha2_word64)(n); \
sys/crypto/sha2/sha2.c
169
if ((w)[0] < (n)) { \
sys/crypto/sha2/sha2.c
170
(w)[1]++; \
sys/dev/disk/sbp/sbp.c
368
char w[SBP_NUM_TARGETS];
sys/dev/disk/sbp/sbp.c
370
bzero(w, sizeof(w));
sys/dev/disk/sbp/sbp.c
377
w[wired[i].target] = 1;
sys/dev/disk/sbp/sbp.c
394
if (sbp->targets[i].fwdev == NULL && w[i] == 0) {
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
421
int w;
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
445
if (common_modes[i].w > 1024 ||
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
450
if (common_modes[i].w > native_mode->hdisplay ||
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
452
(common_modes[i].w == native_mode->hdisplay &&
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
456
if (common_modes[i].w < 320 || common_modes[i].h < 200)
sys/dev/drm/amd/amdgpu/amdgpu_connectors.c
459
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
sys/dev/drm/amd/amdgpu/dce_virtual.c
294
int w;
sys/dev/drm/amd/amdgpu/dce_virtual.c
317
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3837
int w;
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3859
if (common_modes[i].w > native_mode->hdisplay ||
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3861
(common_modes[i].w == native_mode->hdisplay &&
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3866
if (common_modes[i].w == curmode->hdisplay &&
sys/dev/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3877
common_modes[i].name, common_modes[i].w,
sys/dev/drm/drm_edid.c
2218
int w, h;
sys/dev/drm/drm_edid.c
2233
if ((mode->hdisplay == cea_interlaced[i].w) &&
sys/dev/drm/drm_edid.c
2496
newmode = drm_gtf_mode(dev, m->w, m->h, m->r, 0, 0);
sys/dev/drm/drm_edid.c
2525
newmode = drm_cvt_mode(dev, m->w, m->h, m->r, rb, 0, 0);
sys/dev/drm/drm_edid.c
2610
est3_modes[m].w,
sys/dev/drm/drm_edid.c
5107
u16 w, h;
sys/dev/drm/drm_edid.c
5112
w = tile->tile_size[0] | tile->tile_size[1] << 8;
sys/dev/drm/drm_edid.c
5128
connector->tile_h_size = w + 1;
sys/dev/drm/drm_edid.c
5132
DRM_DEBUG_KMS("tile_size %d x %d\n", w + 1, h + 1);
sys/dev/drm/drm_edid.c
656
short w;
sys/dev/drm/drm_framebuffer.c
410
static void drm_mode_rmfb_work_fn(struct work_struct *w)
sys/dev/drm/drm_framebuffer.c
412
struct drm_mode_rmfb_work *arg = container_of(w, typeof(*arg), work);
sys/dev/drm/i915/i915_drv.h
3663
__raw_read(16, w)
sys/dev/drm/i915/i915_drv.h
3668
__raw_write(16, w)
sys/dev/drm/i915/i915_gpu_error.c
1185
struct intel_wait *w = rb_entry(rb, typeof(*w), node);
sys/dev/drm/i915/i915_gpu_error.c
1187
strcpy(waiter->comm, w->tsk->comm);
sys/dev/drm/i915/i915_gpu_error.c
1188
waiter->pid = w->tsk->pid;
sys/dev/drm/i915/i915_gpu_error.c
1189
waiter->seqno = w->seqno;
sys/dev/drm/i915/i915_irq.c
2936
struct wedge_me *w = container_of(work, typeof(*w), work.work);
sys/dev/drm/i915/i915_irq.c
2938
dev_err(w->i915->drm.dev,
sys/dev/drm/i915/i915_irq.c
2940
w->name);
sys/dev/drm/i915/i915_irq.c
2941
i915_gem_set_wedged(w->i915);
sys/dev/drm/i915/i915_irq.c
2944
static void __init_wedge(struct wedge_me *w,
sys/dev/drm/i915/i915_irq.c
2949
w->i915 = i915;
sys/dev/drm/i915/i915_irq.c
2950
w->name = name;
sys/dev/drm/i915/i915_irq.c
2952
INIT_DELAYED_WORK_ONSTACK(&w->work, wedge_me);
sys/dev/drm/i915/i915_irq.c
2953
schedule_delayed_work(&w->work, timeout);
sys/dev/drm/i915/i915_irq.c
2956
static void __fini_wedge(struct wedge_me *w)
sys/dev/drm/i915/i915_irq.c
2958
cancel_delayed_work_sync(&w->work);
sys/dev/drm/i915/i915_irq.c
2959
destroy_delayed_work_on_stack(&w->work);
sys/dev/drm/i915/i915_irq.c
2960
w->i915 = NULL;
sys/dev/drm/i915/i915_irq.c
3172
struct wedge_me w;
sys/dev/drm/i915/i915_irq.c
3180
i915_wedge_on_timeout(&w, dev_priv, 5*HZ) {
sys/dev/drm/i915/i915_reg.h
9787
#define CGM_PIPE_DEGAMMA(pipe, i, w) _MMIO(_PIPE(pipe, _CGM_PIPE_A_DEGAMMA, _CGM_PIPE_B_DEGAMMA) + (i) * 8 + (w) * 4)
sys/dev/drm/i915/i915_reg.h
9788
#define CGM_PIPE_GAMMA(pipe, i, w) _MMIO(_PIPE(pipe, _CGM_PIPE_A_GAMMA, _CGM_PIPE_B_GAMMA) + (i) * 8 + (w) * 4)
sys/dev/drm/i915/intel_display.c
3031
int w = drm_rect_width(&plane_state->base.src) >> 16;
sys/dev/drm/i915/intel_display.c
3037
if (w > max_width || h > max_height) {
sys/dev/drm/i915/intel_display.c
3039
w, h, max_width, max_height);
sys/dev/drm/i915/intel_display.c
3065
while ((x + w) * cpp > plane_state->color_plane[0].stride) {
sys/dev/drm/i915/intel_display.c
3132
int w = drm_rect_width(&plane_state->base.src) >> 17;
sys/dev/drm/i915/intel_display.c
3140
if (w > max_width || h > max_height) {
sys/dev/drm/i915/intel_display.c
3142
w, h, max_width, max_height);
sys/dev/drm/i915/intel_engine_cs.c
1563
struct intel_wait *w = rb_entry(rb, typeof(*w), node);
sys/dev/drm/i915/intel_engine_cs.c
1566
w->tsk->comm, w->tsk->pid, w->seqno);
sys/dev/drm/i915/intel_guc_ct.c
50
static void ct_incoming_request_worker_func(struct work_struct *w);
sys/dev/drm/i915/intel_guc_ct.c
762
static void ct_incoming_request_worker_func(struct work_struct *w)
sys/dev/drm/i915/intel_guc_ct.c
764
struct intel_guc_ct *ct = container_of(w, struct intel_guc_ct, worker);
sys/dev/drm/i915/intel_tv.c
1297
int w, h;
sys/dev/drm/i915/intel_tv.c
1337
unsigned int hactive_s = input->w;
sys/dev/drm/i915/intel_tv.c
1340
if (tv_mode->max_srcw && input->w > tv_mode->max_srcw)
sys/dev/drm/i915/intel_tv.c
1343
if (input->w > 1024 && (!tv_mode->progressive
sys/dev/drm/i915/intel_workarounds.c
1003
static void chv_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1007
static void gen9_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1010
whitelist_reg(w, GEN9_CTX_PREEMPT_REG);
sys/dev/drm/i915/intel_workarounds.c
1013
whitelist_reg(w, GEN8_CS_CHICKEN1);
sys/dev/drm/i915/intel_workarounds.c
1016
whitelist_reg(w, GEN8_HDC_CHICKEN1);
sys/dev/drm/i915/intel_workarounds.c
1019
static void skl_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1021
gen9_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1024
whitelist_reg(w, GEN8_L3SQCREG4);
sys/dev/drm/i915/intel_workarounds.c
1027
static void bxt_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1029
gen9_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1032
static void kbl_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1034
gen9_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1037
whitelist_reg(w, GEN8_L3SQCREG4);
sys/dev/drm/i915/intel_workarounds.c
1040
static void glk_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1042
gen9_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1045
whitelist_reg(w, GEN9_SLICE_COMMON_ECO_CHICKEN1);
sys/dev/drm/i915/intel_workarounds.c
1048
static void cfl_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1050
gen9_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1053
static void cnl_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1056
whitelist_reg(w, GEN8_CS_CHICKEN1);
sys/dev/drm/i915/intel_workarounds.c
1059
static void icl_whitelist_build(struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1064
struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1070
w->count = 0;
sys/dev/drm/i915/intel_workarounds.c
1071
w->nopid = i915_mmio_reg_offset(RING_NOPID(engine->mmio_base));
sys/dev/drm/i915/intel_workarounds.c
1076
bdw_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1078
chv_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1080
skl_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1082
bxt_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1084
kbl_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1086
glk_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1088
cfl_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1090
cnl_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1092
icl_whitelist_build(w);
sys/dev/drm/i915/intel_workarounds.c
1096
return w;
sys/dev/drm/i915/intel_workarounds.c
1100
const struct whitelist *w)
sys/dev/drm/i915/intel_workarounds.c
1106
if (!w)
sys/dev/drm/i915/intel_workarounds.c
1111
for (i = 0; i < w->count; i++)
sys/dev/drm/i915/intel_workarounds.c
1113
i915_mmio_reg_offset(w->reg[i]));
sys/dev/drm/i915/intel_workarounds.c
1117
I915_WRITE_FW(RING_FORCE_TO_NONPRIV(base, i), w->nopid);
sys/dev/drm/i915/intel_workarounds.c
1124
struct whitelist w;
sys/dev/drm/i915/intel_workarounds.c
1126
whitelist_apply(engine, whitelist_build(engine, &w));
sys/dev/drm/i915/intel_workarounds.c
566
struct i915_workarounds *w = &rq->i915->workarounds;
sys/dev/drm/i915/intel_workarounds.c
570
if (w->count == 0)
sys/dev/drm/i915/intel_workarounds.c
577
cs = intel_ring_begin(rq, (w->count * 2 + 2));
sys/dev/drm/i915/intel_workarounds.c
581
*cs++ = MI_LOAD_REGISTER_IMM(w->count);
sys/dev/drm/i915/intel_workarounds.c
582
for (i = 0; i < w->count; i++) {
sys/dev/drm/i915/intel_workarounds.c
583
*cs++ = w->reg[i].addr;
sys/dev/drm/i915/intel_workarounds.c
584
*cs++ = w->reg[i].value;
sys/dev/drm/i915/intel_workarounds.c
991
static void whitelist_reg(struct whitelist *w, i915_reg_t reg)
sys/dev/drm/i915/intel_workarounds.c
993
if (GEM_WARN_ON(w->count >= RING_MAX_NONPRIV_SLOTS))
sys/dev/drm/i915/intel_workarounds.c
996
w->reg[w->count++] = reg;
sys/dev/drm/i915/intel_workarounds.c
999
static void bdw_whitelist_build(struct whitelist *w)
sys/dev/drm/include/uapi/drm/i915_drm.h
165
unsigned int w;
sys/dev/drm/radeon/evergreen_cs.c
872
unsigned w, h, d;
sys/dev/drm/radeon/evergreen_cs.c
874
w = r600_mip_minify(width, i);
sys/dev/drm/radeon/evergreen_cs.c
877
surf.nbx = r600_fmt_get_nblocksx(surf.format, w);
sys/dev/drm/radeon/r100.c
2104
static int r100_track_compress_size(int compress_format, int w, int h)
sys/dev/drm/radeon/r100.c
2127
wblocks = (w + block_width - 1) / block_width;
sys/dev/drm/radeon/r100.c
2137
unsigned face, w, h;
sys/dev/drm/radeon/r100.c
2144
w = track->textures[idx].cube_info[face].width;
sys/dev/drm/radeon/r100.c
2148
size = r100_track_compress_size(compress_format, w, h);
sys/dev/drm/radeon/r100.c
2150
size = w * h;
sys/dev/drm/radeon/r100.c
2170
unsigned u, i, w, h, d;
sys/dev/drm/radeon/r100.c
2187
w = (track->textures[u].pitch / track->textures[u].cpp) / (1 << i);
sys/dev/drm/radeon/r100.c
2189
w = track->textures[u].pitch / (1 << i);
sys/dev/drm/radeon/r100.c
2191
w = track->textures[u].width;
sys/dev/drm/radeon/r100.c
2193
w |= track->textures[u].width_11;
sys/dev/drm/radeon/r100.c
2194
w = w / (1 << i);
sys/dev/drm/radeon/r100.c
2196
w = roundup_pow_of_two(w);
sys/dev/drm/radeon/r100.c
2213
size += r100_track_compress_size(track->textures[u].compress_format, w, h) * d;
sys/dev/drm/radeon/r100.c
2216
size += w * h * d;
sys/dev/drm/radeon/r600_cs.c
211
int r600_fmt_get_nblocksx(u32 format, u32 w)
sys/dev/drm/radeon/r600_cs.c
222
return (w + bw - 1) / bw;
sys/dev/drm/radeon/radeon.h
2914
int r600_fmt_get_nblocksx(u32 format, u32 w);
sys/dev/drm/radeon/radeon_connectors.c
511
int w;
sys/dev/drm/radeon/radeon_connectors.c
535
if (common_modes[i].w > 1024 ||
sys/dev/drm/radeon/radeon_connectors.c
540
if (common_modes[i].w > native_mode->hdisplay ||
sys/dev/drm/radeon/radeon_connectors.c
542
(common_modes[i].w == native_mode->hdisplay &&
sys/dev/drm/radeon/radeon_connectors.c
546
if (common_modes[i].w < 320 || common_modes[i].h < 200)
sys/dev/drm/radeon/radeon_connectors.c
549
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
sys/dev/drm/radeon/radeon_cursor.c
147
int w = radeon_crtc->cursor_width;
sys/dev/drm/radeon/radeon_cursor.c
190
cursor_end = x + w;
sys/dev/drm/radeon/radeon_cursor.c
193
w = w - (cursor_end - frame_end);
sys/dev/drm/radeon/radeon_cursor.c
195
w--;
sys/dev/drm/radeon/radeon_cursor.c
199
w--;
sys/dev/drm/radeon/radeon_cursor.c
201
if (w <= 0) {
sys/dev/drm/radeon/radeon_cursor.c
207
if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) ||
sys/dev/drm/radeon/radeon_cursor.c
219
((w - 1) << 16) | (radeon_crtc->cursor_height - 1));
sys/dev/drm/radeon/radeon_cursor.c
224
((w - 1) << 16) | (radeon_crtc->cursor_height - 1));
sys/dev/misc/ecc/e5_imc_var.h
52
#define UBOX_READ(dev, c, ofs, w) \
sys/dev/misc/ecc/e5_imc_var.h
54
(c)->ubox_slot, (c)->ubox_func, (ofs), (w))
sys/dev/misc/ecc/e5_imc_var.h
58
#define IMC_CPGC_READ(dev, c, ofs, w) \
sys/dev/misc/ecc/e5_imc_var.h
60
(c)->cpgc_slot, (c)->cpgc_func, (ofs), (w))
sys/dev/misc/ecc/e5_imc_var.h
64
#define IMC_CTAD_READ(dev, c, ofs, w) \
sys/dev/misc/ecc/e5_imc_var.h
66
(c)->ctad_slot, (c)->ctad_func, (ofs), (w))
sys/dev/misc/psm/psm.c
1777
evdev_push_abs(sc->evdev_a, ABS_TOOL_WIDTH, f->w);
sys/dev/misc/psm/psm.c
3270
int w, id, nfingers, palm, ewcode, extended_buttons, clickpad_pressed;
sys/dev/misc/psm/psm.c
332
int w;
sys/dev/misc/psm/psm.c
3356
w = ((pb->ipacket[0] & 0x30) >> 2) |
sys/dev/misc/psm/psm.c
3362
w = 4;
sys/dev/misc/psm/psm.c
3365
switch (w) {
sys/dev/misc/psm/psm.c
3415
.w = PSM_FINGER_DEFAULT_W,
sys/dev/misc/psm/psm.c
342
(f) = (finger_t) { .x = -1, .y = -1, .p = 0, .w = 0, .flags = 0 }; \
sys/dev/misc/psm/psm.c
3426
.w = (((pb->ipacket[5] & 0x01) << 2) |
sys/dev/misc/psm/psm.c
3447
nfingers = w + 2;
sys/dev/misc/psm/psm.c
3552
.w = (((pb->ipacket[2] & 0x01) << 2) |
sys/dev/misc/psm/psm.c
3566
.w = w,
sys/dev/misc/psm/psm.c
3766
(sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) ||
sys/dev/misc/psm/psm.c
3778
VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f->w));
sys/dev/misc/psm/psm.c
3856
x0, y0, f->p, f->w));
sys/dev/misc/psm/psm.c
392
.w = PSM_FINGER_DEFAULT_W, \
sys/dev/misc/psm/psm.c
4248
smoother_id, x0, y0, f->p, f->w));
sys/dev/misc/psm/psm.c
4495
f[0].w = ((pb->ipacket[0] & 0x30) >> 2) |
sys/dev/misc/psm/psm.c
4499
f[0].w = PSM_FINGER_DEFAULT_W;
sys/dev/misc/psm/psm.c
4536
.w = PSM_FINGER_DEFAULT_W,
sys/dev/misc/psm/psm.c
4562
fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
sys/dev/misc/psm/psm.c
4635
fn.w = (pb->ipacket[0] & 0xf0) >> 4;
sys/dev/misc/psm/psm.c
4757
f[id].x, f[id].y, f[id].p, f[id].w, f[id].flags));
sys/dev/misc/psm/psm.c
4776
f[id].w * sc->elanhw.dptracex);
sys/dev/misc/vkbd/vkbd.c
87
#define VKBD_LOCK_ASSERT(s, w) mtx_assert(&(s)->ks_lock, w)
sys/dev/misc/vkbd/vkbd.c
96
#define VKBD_LOCK_ASSERT(s, w)
sys/dev/netif/ath/ath/if_ath.c
2818
int w = 0;
sys/dev/netif/ath/ath/if_ath.c
2824
w = 1;
sys/dev/netif/ath/ath/if_ath.c
2828
w = 0;
sys/dev/netif/ath/ath/if_ath.c
2858
if (w == 0)
sys/dev/netif/ath/ath/if_ath.c
2863
return w;
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
298
u_int w, off, len;
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
329
for (w = 0; w < NW(struct ar9287_eeprom); w++) {
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
330
off = AR9287_EEP_START_LOC + w;
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
331
if (!ath_hal_eepromRead(ah, off, &eep_data[w])) {
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
344
for (w = 0; w < NW(HAL_EEPROM_9287); w++)
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
345
eep_data[w] = __bswap16(eep_data[w]);
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
370
for (w = 0; w < len; w++)
sys/dev/netif/ath/ath_hal/ah_eeprom_9287.c
371
sum ^= eep_data[w];
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
339
u_int w, off, len;
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
370
for (w = 0; w < NW(struct ar5416eeprom); w++) {
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
371
off = owl_eep_start_loc + w; /* NB: AP71 starts at 0 */
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
372
if (!ath_hal_eepromRead(ah, off, &eep_data[w])) {
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
382
for (w = 0; w < NW(struct ar5416eeprom); w++)
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
383
eep_data[w] = __bswap16(eep_data[w]);
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
408
for (w = 0; w < len; w++)
sys/dev/netif/ath/ath_hal/ah_eeprom_v14.c
409
sum ^= eep_data[w];
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
288
u_int w, off, len;
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
318
for (w = 0; w < NW(struct ar5416eeprom_4k); w++) {
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
319
off = owl_eep_start_loc + w; /* NB: AP71 starts at 0 */
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
320
if (!ath_hal_eepromRead(ah, off, &eep_data[w])) {
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
333
for (w = 0; w < NW(struct ar5416eeprom_4k); w++)
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
334
eep_data[w] = __bswap16(eep_data[w]);
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
359
for (w = 0; w < len; w++) {
sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c
360
sum ^= eep_data[w];
sys/dev/netif/iwi/if_iwi.c
2407
const uint16_t *w;
sys/dev/netif/iwi/if_iwi.c
2446
for (w = (const uint16_t *)uc; size > 0; w++, size -= 2)
sys/dev/netif/iwi/if_iwi.c
2447
MEM_WRITE_2(sc, 0x200010, htole16(*w));
sys/dev/netif/iwn/if_iwn.c
4272
uint16_t *w = &sc->sched[qid * IWN4965_SCHED_COUNT + idx];
sys/dev/netif/iwn/if_iwn.c
4276
*w = htole16(len + 8);
sys/dev/netif/iwn/if_iwn.c
4280
*(w + IWN_TX_RING_COUNT) = *w;
sys/dev/netif/iwn/if_iwn.c
4290
uint16_t *w = &sc->sched[qid * IWN5000_SCHED_COUNT + idx];
sys/dev/netif/iwn/if_iwn.c
4294
*w = htole16(id << 12 | (len + 8));
sys/dev/netif/iwn/if_iwn.c
4298
*(w + IWN_TX_RING_COUNT) = *w;
sys/dev/netif/iwn/if_iwn.c
4308
uint16_t *w = &sc->sched[qid * IWN5000_SCHED_COUNT + idx];
sys/dev/netif/iwn/if_iwn.c
4312
*w = (*w & htole16(0xf000)) | htole16(1);
sys/dev/netif/iwn/if_iwn.c
4316
*(w + IWN_TX_RING_COUNT) = *w;
sys/dev/netif/sn/if_sn.c
184
u_short w;
sys/dev/netif/sn/if_sn.c
186
w = (u_short)sc->arpcom.ac_enaddr[j * 2] |
sys/dev/netif/sn/if_sn.c
188
outw(BASE + IAR_ADDR0_REG_W + j * 2, w);
sys/dev/netif/ti/if_tireg.h
955
#define TI_DO_CMD_EXT(x, y, z, v, w) do { \
sys/dev/netif/ti/if_tireg.h
959
ti_cmd_ext(sc, &cmd, v, w); \
sys/dev/netif/xe/if_xevar.h
77
#define XE_OUTW(r, w) bus_space_write_2(scp->bst, scp->bsh, (r), (w))
sys/dev/raid/asr/dptalign.h
299
#define getL24bit1(w,x,y) ((unsigned DPT_4_BYTES)((unsigned char __FAR__ *)(&w->x))[0+(y)] \
sys/dev/raid/asr/dptalign.h
300
+ ((((unsigned DPT_4_BYTES)((unsigned char __FAR__ *)(&w->x))[1+(y)]) << 8) & 0xFF00) \
sys/dev/raid/asr/dptalign.h
301
+ ((((unsigned DPT_4_BYTES)((unsigned char __FAR__ *)(&w->x))[2+(y)]) << 16) & 0xFF0000))
sys/dev/raid/asr/dptalign.h
303
#define setL24bit1(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[0+(y)] = (z); \
sys/dev/raid/asr/dptalign.h
304
((unsigned char __FAR__ *)(&w->x))[1+(y)] = ((z) >> 8) & 0xFF; \
sys/dev/raid/asr/dptalign.h
305
((unsigned char __FAR__ *)(&w->x))[2+(y)] = ((z) >> 16) & 0xFF; \
sys/dev/raid/asr/dptalign.h
308
#define getL16bit(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&w->x))[0+(y)] \
sys/dev/raid/asr/dptalign.h
309
+ ((((unsigned short)((unsigned char __FAR__ *)(&w->x))[1+(y)]) << 8) & 0xFF00))
sys/dev/raid/asr/dptalign.h
311
#define setL16bit(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[0+(y)] = (z); \
sys/dev/raid/asr/dptalign.h
312
((unsigned char __FAR__ *)(&w->x))[1+(y)] = ((z) >> 8) & 0xFF; \
sys/dev/raid/asr/dptalign.h
315
#define getL16bit2(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&w->x))[2+(y)] \
sys/dev/raid/asr/dptalign.h
316
+ ((((unsigned short)((unsigned char __FAR__ *)(&w->x))[3+(y)]) << 8) & 0xFF00))
sys/dev/raid/asr/dptalign.h
318
#define setL16bit2(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[2+(y)] = (z); \
sys/dev/raid/asr/dptalign.h
319
((unsigned char __FAR__ *)(&w->x))[3+(y)] = ((z) >> 8) & 0xFF; \
sys/dev/raid/asr/dptalign.h
323
#define getL4bit(w,x,y) \
sys/dev/raid/asr/dptalign.h
324
((unsigned char)(((unsigned char __FAR__ *)(&w->x))[0+(y)] >> 4) & 0x0f)
sys/dev/raid/asr/dptalign.h
326
#define setL4bit(w,x,y,z) { \
sys/dev/raid/asr/dptalign.h
327
((unsigned char __FAR__ *)(&w->x))[0+(y)] &= 0xF0; \
sys/dev/raid/asr/dptalign.h
328
((unsigned char __FAR__ *)(&w->x))[0+(y)] |= ((z) << 4) & 0xF0; \
sys/dev/raid/asr/dptalign.h
331
#define getL1bit(w,x,y) \
sys/dev/raid/asr/dptalign.h
332
((unsigned char)(((unsigned char __FAR__ *)(&w->x))[0+(y)] ) & 0x01)
sys/dev/raid/asr/dptalign.h
334
#define setL1bit(w,x,y,z) { \
sys/dev/raid/asr/dptalign.h
335
((unsigned char __FAR__ *)(&w->x))[0+(y)] &= 0xFE; \
sys/dev/raid/asr/dptalign.h
336
((unsigned char __FAR__ *)(&w->x))[0+(y)] |= (z) & 0x01; \
sys/dev/raid/asr/dptalign.h
338
#define getL1bit1(w,x,y) \
sys/dev/raid/asr/dptalign.h
339
((unsigned char)(((unsigned char __FAR__ *)(&w->x))[0+(y)] >> 1) & 0x01)
sys/dev/raid/asr/dptalign.h
341
#define setL1bit1(w,x,y,z) { \
sys/dev/raid/asr/dptalign.h
342
((unsigned char __FAR__ *)(&w->x))[0+(y)] &= 0xFD; \
sys/dev/raid/asr/dptalign.h
343
((unsigned char __FAR__ *)(&w->x))[0+(y)] |= (z << 1) & 0x02; \
sys/dev/raid/asr/dptalign.h
349
#define getL12bit(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&w->x))[0+(y)] \
sys/dev/raid/asr/dptalign.h
350
+ ((((unsigned short)((unsigned char __FAR__ *)(&w->x))[1+(y)]) << 8) & 0xF00))
sys/dev/raid/asr/dptalign.h
352
#define setL12bit(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[0+(y)] = (z); \
sys/dev/raid/asr/dptalign.h
353
((unsigned char __FAR__ *)(&w->x))[1+(y)] &= 0xF0; \
sys/dev/raid/asr/dptalign.h
354
((unsigned char __FAR__ *)(&w->x))[1+(y)] |= ((z) >> 8) & 0xF; \
sys/dev/raid/asr/dptalign.h
357
#define getL12bit1(w,x,y) (((unsigned short)((unsigned char __FAR__ *)(&w->x))[1+(y)]) >> 4 \
sys/dev/raid/asr/dptalign.h
358
+ ((((unsigned short)((unsigned char __FAR__ *)(&w->x))[2+(y)]) << 4) ))
sys/dev/raid/asr/dptalign.h
360
#define setL12bit1(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[1+(y)] &= 0x0F; \
sys/dev/raid/asr/dptalign.h
361
((unsigned char __FAR__ *)(&w->x))[1+(y)] |= ((z) & 0xF) << 4; \
sys/dev/raid/asr/dptalign.h
362
((unsigned char __FAR__ *)(&w->x))[2+(y)] &= 0x00;\
sys/dev/raid/asr/dptalign.h
363
((unsigned char __FAR__ *)(&w->x))[2+(y)] |= ((z) >> 8) & 0xff;\
sys/dev/raid/asr/dptalign.h
367
#define getL12bit2(w,x,y) ((unsigned short)((unsigned char __FAR__ *)(&w->x))[2+(y)] \
sys/dev/raid/asr/dptalign.h
368
+ ((((unsigned short)((unsigned char __FAR__ *)(&w->x))[3+(y)]) << 8) & 0xF00))
sys/dev/raid/asr/dptalign.h
370
#define setL12bit2(w,x,y,z) { ((unsigned char __FAR__ *)(&w->x))[2+(y)] = (z); \
sys/dev/raid/asr/dptalign.h
371
((unsigned char __FAR__ *)(&w->x))[3+(y)] &= 0xF0; \
sys/dev/raid/asr/dptalign.h
372
((unsigned char __FAR__ *)(&w->x))[3+(y)] |= ((z) >> 8) & 0xF; \
sys/dev/raid/asr/dptalign.h
375
#define getL8bit(w,x,y) (\
sys/dev/raid/asr/dptalign.h
376
(*(((unsigned char __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/dptalign.h
379
#define setL8bit(w,x,y,z) {\
sys/dev/raid/asr/dptalign.h
380
(*(((unsigned char __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
176
# define _F_getTID(w,x,y) (*((U16 __FAR__ *)(&((w)->x))) & I2O_TID_MASK)
sys/dev/raid/asr/i2odep.h
177
# define _F_setTID(w,x,y,z) (*((U16 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
179
(*((U16 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
182
# define _F_getTID1(w,x,y) ((*(U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
185
# define _F_setTID1(w,x,y,z) ((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
187
((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
191
# define _F_getFunc(w,x,y) (*(((U8 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
193
# define _F_setFunc(w,x,y,z) (_F_getFunc(w,x,y) = (z))
sys/dev/raid/asr/i2odep.h
196
# define _F_getCount(w,x,y) (*((U32 __FAR__ *)(&((w)->x)))&I2O_SG_COUNT_MASK)
sys/dev/raid/asr/i2odep.h
205
# define _F_setCount(w,x,y,z) (*((U32 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
207
(*((U32 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
210
# define _F_getFlags(w,x,y) (*(((U8 __FAR__ *)(&((w)->x)))\
sys/dev/raid/asr/i2odep.h
212
# define _F_setFlags(w,x,y,z) (_F_getFlags(w,x,y) = (z))
sys/dev/raid/asr/i2odep.h
214
# define _F_get1bit(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
215
# define _F_set1bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
216
# define _F_get1bit1(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
217
# define _F_set1bit1(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
218
# define _F_get4bit4(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
219
# define _F_set4bit4(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
220
# define _F_get8bit(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
221
# define _F_set8bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
222
# define _F_get12bit(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
223
# define _F_set12bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
224
# define _F_get12bit4(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
225
# define _F_set12bit4(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
226
# define _F_get16bit(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
227
# define _F_set16bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
230
# define _F_getTID(w,x,y) getL12bit(w,x,0)
sys/dev/raid/asr/i2odep.h
231
# define _F_setTID(w,x,y,z) setL12bit(w,x,0,z)
sys/dev/raid/asr/i2odep.h
232
# define _F_getTID1(w,x,y) getL12bit1(w,x,0)
sys/dev/raid/asr/i2odep.h
233
# define _F_setTID1(w,x,y,z) setL12bit1(w,x,0,z)
sys/dev/raid/asr/i2odep.h
234
# define _F_getFunc(w,x,y) getL8bit(w,x,3)
sys/dev/raid/asr/i2odep.h
235
# define _F_setFunc(w,x,y,z) setL8bit(w,x,3,z)
sys/dev/raid/asr/i2odep.h
236
# define _F_getCount(w,x,y) getL24bit1(w,x,0)
sys/dev/raid/asr/i2odep.h
237
# define _F_setCount(w,x,y,z) setL24bit1(w,x,0,z)
sys/dev/raid/asr/i2odep.h
238
# define _F_getFlags(w,x,y) getL8bit(w,x,3)
sys/dev/raid/asr/i2odep.h
239
# define _F_setFlags(w,x,y,z) setL8bit(w,x,3,z)
sys/dev/raid/asr/i2odep.h
241
# define _F_get1bit(w,x,y,z) getL1bit(w,x,y)
sys/dev/raid/asr/i2odep.h
242
# define _F_set1bit(w,x,y,z,u) setL1bit(w,x,y,u)
sys/dev/raid/asr/i2odep.h
243
# define _F_get1bit1(w,x,y,z) getL1bit1(w,x,y)
sys/dev/raid/asr/i2odep.h
244
# define _F_set1bit1(w,x,y,z,u) setL1bit1(w,x,y,u)
sys/dev/raid/asr/i2odep.h
245
# define _F_get4bit4(w,x,y,z) getL4bit(w,x,y)
sys/dev/raid/asr/i2odep.h
246
# define _F_set4bit4(w,x,y,z,u) setL4bit(w,x,y,u)
sys/dev/raid/asr/i2odep.h
247
# define _F_get8bit(w,x,y,z) getL8bit(w,x,y)
sys/dev/raid/asr/i2odep.h
248
# define _F_set8bit(w,x,y,z,u) setL8bit(w,x,y,u)
sys/dev/raid/asr/i2odep.h
249
# define _F_get12bit(w,x,y,z) getL12bit(w,x,y)
sys/dev/raid/asr/i2odep.h
250
# define _F_set12bit(w,x,y,z,u) setL12bit(w,x,y,z)
sys/dev/raid/asr/i2odep.h
251
# define _F_get12bit4(w,x,y,z) getL12bit1(w,x,(y)-1)
sys/dev/raid/asr/i2odep.h
252
# define _F_set12bit4(w,x,y,z,u) setL12bit1(w,x,(y)-1,u)
sys/dev/raid/asr/i2odep.h
253
# define _F_get16bit(w,x,y,z) getL16bit(w,x,y)
sys/dev/raid/asr/i2odep.h
254
# define _F_set16bit(w,x,y,z,u) setL16bit(w,x,y,u)
sys/dev/raid/asr/i2odep.h
256
# define _F_getTID(w,x,y) ((U16)((w)->y))
sys/dev/raid/asr/i2odep.h
257
# define _F_setTID(w,x,y,z) ((w)->y = (z))
sys/dev/raid/asr/i2odep.h
258
# define _F_getTID1(w,x,y) ((U16)((w)->y))
sys/dev/raid/asr/i2odep.h
259
# define _F_setTID1(w,x,y,z) ((w)->y = (z))
sys/dev/raid/asr/i2odep.h
260
# define _F_getFunc(w,x,y) ((U8)((w)->y))
sys/dev/raid/asr/i2odep.h
261
# define _F_setFunc(w,x,y,z) ((w)->y = (z))
sys/dev/raid/asr/i2odep.h
262
# define _F_getCount(w,x,y) ((U32)((w)->y))
sys/dev/raid/asr/i2odep.h
263
# define _F_setCount(w,x,y,z) ((w)->y = (z))
sys/dev/raid/asr/i2odep.h
264
# define _F_getFlags(w,x,y) ((U8)((w)->y))
sys/dev/raid/asr/i2odep.h
265
# define _F_setFlags(w,x,y,z) ((w)->y = (z))
sys/dev/raid/asr/i2odep.h
266
# define _F_get1bit(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
267
# define _F_set1bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
268
# define _F_get1bit1(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
269
# define _F_set1bit1(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
270
# define _F_get4bit4(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
271
# define _F_set4bit4(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
272
# define _F_get8bit(w,x,y,z) ((U8)((w)->z))
sys/dev/raid/asr/i2odep.h
273
# define _F_set8bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
274
# define _F_get12bit(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
275
# define _F_set12bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
276
# define _F_get12bit4(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
277
# define _F_set12bit4(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/asr/i2odep.h
278
# define _F_get16bit(w,x,y,z) ((U16)((w)->z))
sys/dev/raid/asr/i2odep.h
279
# define _F_set16bit(w,x,y,z,u) ((w)->z = (u))
sys/dev/raid/hptmv/hptproc.c
337
#define shortswap(w) ((WORD)((w)>>8 | ((w) & 0xFF)<<8))
sys/dev/raid/hptmv/osbsd.h
252
#define shortswap(w) ((WORD)((w)>>8 | ((w) & 0xFF)<<8))
sys/dev/raid/mfi/mfireg.h
1049
uint32_t w[24];
sys/dev/raid/mrsas/mrsas.c
614
prev_aen.word = sc->aen_cmd->frame->dcmd.mbox.w[1];
sys/dev/raid/mrsas/mrsas.c
672
dcmd->mbox.w[0] = seq_num;
sys/dev/raid/mrsas/mrsas.c
674
dcmd->mbox.w[1] = curr_aen.word;
sys/dev/raid/mrsas/mrsas.h
2026
u_int32_t w[3];
sys/dev/raid/mrsas/mrsas.h
2289
u_int32_t w[24];
sys/dev/raid/mrsas/mrsas_ioctl.c
88
device_printf(sc->mrsas_dev, "dcmd->mbox.w[0]: 0x%08x\n", dcmd->mbox.w[0]);
sys/dev/raid/mrsas/mrsas_ioctl.c
89
device_printf(sc->mrsas_dev, "dcmd->mbox.w[1]: 0x%08x\n", dcmd->mbox.w[1]);
sys/dev/raid/mrsas/mrsas_ioctl.c
90
device_printf(sc->mrsas_dev, "dcmd->mbox.w[2]: 0x%08x\n", dcmd->mbox.w[2]);
sys/dev/serial/ic_layer/esp.h
75
#define HIBYTE(w) (((w) >> 8) & 0xff)
sys/dev/serial/ic_layer/esp.h
76
#define LOBYTE(w) ((w) & 0xff)
sys/dev/sound/pci/emu10k1.c
1442
emu_addefxop(struct sc_info *sc, int op, int z, int w, int x, int y,
sys/dev/sound/pci/emu10k1.c
1446
emu_wrefx(sc, (*pc) * 2 + 1, (op << 20) | (z << 10) | w);
sys/dev/sound/pci/emu10k1.c
1451
audigy_addefxop(struct sc_info *sc, int op, int z, int w, int x, int y,
sys/dev/sound/pci/emu10k1.c
1455
emu_wrefx(sc, (*pc) * 2 + 1, (op << 24) | (z << 12) | w);
sys/dev/sound/pci/emu10kx.c
1525
emu_addefxop(struct emu_sc_info *sc, unsigned int op, unsigned int z, unsigned int w, unsigned int x, unsigned int y, uint32_t * pc)
sys/dev/sound/pci/emu10kx.c
1532
emu_wrefx(sc, (*pc) * 2 + 1, (op << sc->opcode_shift) | (z << sc->high_operand_shift) | w);
sys/dev/sound/pci/emu10kx.c
411
static void emu_addefxop(struct emu_sc_info *sc, unsigned int op, unsigned int z, unsigned int w, unsigned int x, unsigned int y, uint32_t * pc);
sys/dev/sound/pci/hda/hdaa.c
1006
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1008
w->nid, orig, config);
sys/dev/sound/pci/hda/hdaa.c
1010
w->wclass.pin.newconf = w->wclass.pin.config = config;
sys/dev/sound/pci/hda/hdaa.c
1069
hdaa_dump_pin_sb(struct sbuf *sb, struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
1073
pincap = w->wclass.pin.cap;
sys/dev/sound/pci/hda/hdaa.c
1113
conf = w->wclass.pin.config;
sys/dev/sound/pci/hda/hdaa.c
1125
sbuf_printf(sb, " Pin control: 0x%08x", w->wclass.pin.ctrl);
sys/dev/sound/pci/hda/hdaa.c
1126
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
1128
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
1130
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
1132
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
1133
if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
1136
else if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
1140
if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
1169
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
1174
w = (struct hdaa_widget *)oidp->oid_arg1;
sys/dev/sound/pci/hda/hdaa.c
1175
devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
1178
sbuf_printf(&sb, "%s%s\n", w->name,
sys/dev/sound/pci/hda/hdaa.c
1179
(w->enable == 0) ? " [DISABLED]" : "");
sys/dev/sound/pci/hda/hdaa.c
1181
w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
1182
if (w->param.widget_cap & 0x0ee1) {
sys/dev/sound/pci/hda/hdaa.c
1183
if (HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1185
if (HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1187
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1189
if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1191
if (HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1193
if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
1195
1 << (fls(w->wclass.conv.stripecap) - 1));
sys/dev/sound/pci/hda/hdaa.c
1196
j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
1203
if (w->bindas != -1) {
sys/dev/sound/pci/hda/hdaa.c
1205
w->bindas, w->bindseqmask);
sys/dev/sound/pci/hda/hdaa.c
1207
if (w->ossmask != 0 || w->ossdev >= 0) {
sys/dev/sound/pci/hda/hdaa.c
1209
hdaa_audio_ctl_ossmixer_mask2allname(w->ossmask, buf, sizeof(buf)));
sys/dev/sound/pci/hda/hdaa.c
1210
if (w->ossdev >= 0)
sys/dev/sound/pci/hda/hdaa.c
1211
sbuf_printf(&sb, " (%s)", ossnames[w->ossdev]);
sys/dev/sound/pci/hda/hdaa.c
1214
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
sys/dev/sound/pci/hda/hdaa.c
1215
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
sys/dev/sound/pci/hda/hdaa.c
1217
w->param.supp_stream_formats,
sys/dev/sound/pci/hda/hdaa.c
1218
w->param.supp_pcm_size_rate);
sys/dev/sound/pci/hda/hdaa.c
1219
} else if (w->type ==
sys/dev/sound/pci/hda/hdaa.c
1220
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX || w->waspin)
sys/dev/sound/pci/hda/hdaa.c
1221
hdaa_dump_pin_sb(&sb, w);
sys/dev/sound/pci/hda/hdaa.c
1222
if (w->param.eapdbtl != HDA_INVALID) {
sys/dev/sound/pci/hda/hdaa.c
1224
w->param.eapdbtl,
sys/dev/sound/pci/hda/hdaa.c
1225
(w->param.eapdbtl & HDA_CMD_SET_EAPD_BTL_ENABLE_LR_SWAP) ?
sys/dev/sound/pci/hda/hdaa.c
1227
(w->param.eapdbtl & HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD) ?
sys/dev/sound/pci/hda/hdaa.c
1229
(w->param.eapdbtl & HDA_CMD_SET_EAPD_BTL_ENABLE_BTL) ?
sys/dev/sound/pci/hda/hdaa.c
1232
if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(w->param.widget_cap) &&
sys/dev/sound/pci/hda/hdaa.c
1233
w->param.outamp_cap != 0)
sys/dev/sound/pci/hda/hdaa.c
1234
hdaa_dump_amp_sb(&sb, w->param.outamp_cap, "Output");
sys/dev/sound/pci/hda/hdaa.c
1235
if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(w->param.widget_cap) &&
sys/dev/sound/pci/hda/hdaa.c
1236
w->param.inamp_cap != 0)
sys/dev/sound/pci/hda/hdaa.c
1237
hdaa_dump_amp_sb(&sb, w->param.inamp_cap, " Input");
sys/dev/sound/pci/hda/hdaa.c
1238
if (w->nconns > 0)
sys/dev/sound/pci/hda/hdaa.c
1239
sbuf_printf(&sb, " Connections: %d\n", w->nconns);
sys/dev/sound/pci/hda/hdaa.c
1240
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
1241
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
1243
(w->connsenable[j] == 0)?"[DISABLED] ":"",
sys/dev/sound/pci/hda/hdaa.c
1244
w->conns[j], (cw == NULL) ? "GHOST!" : cw->name);
sys/dev/sound/pci/hda/hdaa.c
1249
if (w->nconns > 1 && w->selconn == j && w->type !=
sys/dev/sound/pci/hda/hdaa.c
1358
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
1364
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
1365
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
1367
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
1368
hdaa_local_patch_pin(w);
sys/dev/sound/pci/hda/hdaa.c
1415
hdaa_widget_connection_parse(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
1419
nid_t nid = w->nid;
sys/dev/sound/pci/hda/hdaa.c
1422
w->nconns = 0;
sys/dev/sound/pci/hda/hdaa.c
1424
res = hda_command(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1433
max = (sizeof(w->conns) / sizeof(w->conns[0])) - 1;
sys/dev/sound/pci/hda/hdaa.c
1443
res = hda_command(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1448
if (w->nconns < ents)
sys/dev/sound/pci/hda/hdaa.c
1449
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1454
ents, w->nconns, res);
sys/dev/sound/pci/hda/hdaa.c
1458
if (cnid < w->devinfo->startnode ||
sys/dev/sound/pci/hda/hdaa.c
1459
cnid >= w->devinfo->endnode) {
sys/dev/sound/pci/hda/hdaa.c
1461
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1471
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1481
if (w->nconns > max) {
sys/dev/sound/pci/hda/hdaa.c
1482
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1488
w->connsenable[w->nconns] = 1;
sys/dev/sound/pci/hda/hdaa.c
1489
w->conns[w->nconns++] = addcnid++;
sys/dev/sound/pci/hda/hdaa.c
1500
hdaa_widget_parse(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
1502
device_t dev = w->devinfo->dev;
sys/dev/sound/pci/hda/hdaa.c
1504
nid_t nid = w->nid;
sys/dev/sound/pci/hda/hdaa.c
1507
w->param.widget_cap = wcap = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1509
w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(wcap);
sys/dev/sound/pci/hda/hdaa.c
1511
hdaa_widget_connection_parse(w);
sys/dev/sound/pci/hda/hdaa.c
1515
w->param.outamp_cap =
sys/dev/sound/pci/hda/hdaa.c
1520
w->param.outamp_cap =
sys/dev/sound/pci/hda/hdaa.c
1521
w->devinfo->outamp_cap;
sys/dev/sound/pci/hda/hdaa.c
1523
w->param.outamp_cap = 0;
sys/dev/sound/pci/hda/hdaa.c
1527
w->param.inamp_cap =
sys/dev/sound/pci/hda/hdaa.c
1532
w->param.inamp_cap =
sys/dev/sound/pci/hda/hdaa.c
1533
w->devinfo->inamp_cap;
sys/dev/sound/pci/hda/hdaa.c
1535
w->param.inamp_cap = 0;
sys/dev/sound/pci/hda/hdaa.c
1537
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
sys/dev/sound/pci/hda/hdaa.c
1538
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
sys/dev/sound/pci/hda/hdaa.c
1543
w->param.supp_stream_formats = (cap != 0) ? cap :
sys/dev/sound/pci/hda/hdaa.c
1544
w->devinfo->supp_stream_formats;
sys/dev/sound/pci/hda/hdaa.c
1548
w->param.supp_pcm_size_rate = (cap != 0) ? cap :
sys/dev/sound/pci/hda/hdaa.c
1549
w->devinfo->supp_pcm_size_rate;
sys/dev/sound/pci/hda/hdaa.c
1551
w->param.supp_stream_formats =
sys/dev/sound/pci/hda/hdaa.c
1552
w->devinfo->supp_stream_formats;
sys/dev/sound/pci/hda/hdaa.c
1553
w->param.supp_pcm_size_rate =
sys/dev/sound/pci/hda/hdaa.c
1554
w->devinfo->supp_pcm_size_rate;
sys/dev/sound/pci/hda/hdaa.c
1556
if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
1557
w->wclass.conv.stripecap = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1558
HDA_CMD_GET_STRIPE_CONTROL(0, w->nid)) >> 20;
sys/dev/sound/pci/hda/hdaa.c
1560
w->wclass.conv.stripecap = 1;
sys/dev/sound/pci/hda/hdaa.c
1562
w->param.supp_stream_formats = 0;
sys/dev/sound/pci/hda/hdaa.c
1563
w->param.supp_pcm_size_rate = 0;
sys/dev/sound/pci/hda/hdaa.c
1566
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
sys/dev/sound/pci/hda/hdaa.c
1567
w->wclass.pin.original = w->wclass.pin.newconf =
sys/dev/sound/pci/hda/hdaa.c
1568
w->wclass.pin.config = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1569
HDA_CMD_GET_CONFIGURATION_DEFAULT(0, w->nid));
sys/dev/sound/pci/hda/hdaa.c
1570
w->wclass.pin.cap = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1571
HDA_CMD_GET_PARAMETER(0, w->nid, HDA_PARAM_PIN_CAP));
sys/dev/sound/pci/hda/hdaa.c
1572
w->wclass.pin.ctrl = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1574
w->wclass.pin.connected = 2;
sys/dev/sound/pci/hda/hdaa.c
1575
if (HDA_PARAM_PIN_CAP_EAPD_CAP(w->wclass.pin.cap)) {
sys/dev/sound/pci/hda/hdaa.c
1576
w->param.eapdbtl = hda_command(dev,
sys/dev/sound/pci/hda/hdaa.c
1578
w->param.eapdbtl &= 0x7;
sys/dev/sound/pci/hda/hdaa.c
1579
w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
sys/dev/sound/pci/hda/hdaa.c
1581
w->param.eapdbtl = HDA_INVALID;
sys/dev/sound/pci/hda/hdaa.c
1583
w->unsol = -1;
sys/dev/sound/pci/hda/hdaa.c
1585
hdaa_unlock(w->devinfo);
sys/dev/sound/pci/hda/hdaa.c
1586
ksnprintf(buf, sizeof(buf), "nid%d", w->nid);
sys/dev/sound/pci/hda/hdaa.c
1590
w, sizeof(w), hdaa_sysctl_caps, "A", "Node capabilities");
sys/dev/sound/pci/hda/hdaa.c
1591
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
sys/dev/sound/pci/hda/hdaa.c
1592
ksnprintf(buf, sizeof(buf), "nid%d_config", w->nid);
sys/dev/sound/pci/hda/hdaa.c
1596
&w->wclass.pin.newconf, sizeof(&w->wclass.pin.newconf),
sys/dev/sound/pci/hda/hdaa.c
1598
ksnprintf(buf, sizeof(buf), "nid%d_original", w->nid);
sys/dev/sound/pci/hda/hdaa.c
1602
&w->wclass.pin.original, sizeof(&w->wclass.pin.original),
sys/dev/sound/pci/hda/hdaa.c
1605
hdaa_lock(w->devinfo);
sys/dev/sound/pci/hda/hdaa.c
1609
hdaa_widget_postprocess(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
1613
w->type = HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
1614
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
1646
strlcpy(w->name, typestr, sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1648
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
sys/dev/sound/pci/hda/hdaa.c
1653
config = w->wclass.pin.config;
sys/dev/sound/pci/hda/hdaa.c
1660
strlcat(w->name, ": ", sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1661
strlcat(w->name, devstr, sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1662
strlcat(w->name, " (", sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1664
strlcat(w->name, HDA_COLORS[color], sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1665
strlcat(w->name, " ", sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1667
strlcat(w->name, HDA_CONNS[conn], sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1668
strlcat(w->name, ")", sizeof(w->name));
sys/dev/sound/pci/hda/hdaa.c
1746
hdaa_widget_connection_select(struct hdaa_widget *w, uint8_t index)
sys/dev/sound/pci/hda/hdaa.c
1748
if (w == NULL || w->nconns < 1 || index > (w->nconns - 1))
sys/dev/sound/pci/hda/hdaa.c
1751
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1752
"Setting selector nid=%d index=%d\n", w->nid, index);
sys/dev/sound/pci/hda/hdaa.c
1754
hda_command(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa.c
1755
HDA_CMD_SET_CONNECTION_SELECT_CONTROL(0, w->nid, index));
sys/dev/sound/pci/hda/hdaa.c
1756
w->selconn = index;
sys/dev/sound/pci/hda/hdaa.c
180
static void hdaa_dump_pin_config(struct hdaa_widget *w, uint32_t conf);
sys/dev/sound/pci/hda/hdaa.c
1877
struct hdaa_widget *w, *wp;
sys/dev/sound/pci/hda/hdaa.c
1922
w = hdaa_widget_get(ch->devinfo, ch->io[i]);
sys/dev/sound/pci/hda/hdaa.c
1923
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
1943
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
1949
if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
1951
HDA_CMD_SET_STRIPE_CONTROL(0, w->nid, ch->stripectl));
sys/dev/sound/pci/hda/hdaa.c
1953
cchn = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
2017
if (w->eld != NULL && w->eld_len >= 6 &&
sys/dev/sound/pci/hda/hdaa.c
2018
((w->eld[5] >> 2) & 0x3) == 1) { /* DisplayPort */
sys/dev/sound/pci/hda/hdaa.c
2136
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
2145
w = hdaa_widget_get(ch->devinfo, ch->io[i]);
sys/dev/sound/pci/hda/hdaa.c
2146
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
2148
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
2258
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
2276
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
2277
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2279
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
sys/dev/sound/pci/hda/hdaa.c
2280
w->param.eapdbtl == HDA_INVALID ||
sys/dev/sound/pci/hda/hdaa.c
2281
w->bindas != pdevinfo->playas)
sys/dev/sound/pci/hda/hdaa.c
2320
w = hdaa_widget_get(devinfo,
sys/dev/sound/pci/hda/hdaa.c
2322
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2324
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
2325
if (w->connsenable[j] == 0)
sys/dev/sound/pci/hda/hdaa.c
2327
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
2388
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
2395
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
2396
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2401
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
2402
if (!w->connsenable[j])
sys/dev/sound/pci/hda/hdaa.c
2411
w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)) {
sys/dev/sound/pci/hda/hdaa.c
2412
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_IN,
sys/dev/sound/pci/hda/hdaa.c
2420
if (w->ossdev >= 0 && depth > 0)
sys/dev/sound/pci/hda/hdaa.c
2424
if ((w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT ||
sys/dev/sound/pci/hda/hdaa.c
2425
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) &&
sys/dev/sound/pci/hda/hdaa.c
2434
(w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER ||
sys/dev/sound/pci/hda/hdaa.c
2435
w->selconn != index))
sys/dev/sound/pci/hda/hdaa.c
2438
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_OUT, -1, 1);
sys/dev/sound/pci/hda/hdaa.c
2465
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
2472
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
2473
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2493
if ((consumers == 2 && (w->bindas < 0 ||
sys/dev/sound/pci/hda/hdaa.c
2494
as[w->bindas].hpredir < 0 || as[w->bindas].fakeredir ||
sys/dev/sound/pci/hda/hdaa.c
2495
(w->bindseqmask & (1 << 15)) == 0)) ||
sys/dev/sound/pci/hda/hdaa.c
2500
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
2507
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
2511
for (i = 0; i < w->nconns; i++) {
sys/dev/sound/pci/hda/hdaa.c
2512
if (w->connsenable[i] == 0)
sys/dev/sound/pci/hda/hdaa.c
2518
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
2522
hdaa_audio_ctl_dest_volume(pdevinfo, ossdev, w->conns[i], -1,
sys/dev/sound/pci/hda/hdaa.c
2534
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
2553
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
2554
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2556
if (w->bindas < 0) {
sys/dev/sound/pci/hda/hdaa.c
2560
if (w->bindas != pdevinfo->playas &&
sys/dev/sound/pci/hda/hdaa.c
2561
w->bindas != pdevinfo->recas)
sys/dev/sound/pci/hda/hdaa.c
2565
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
sys/dev/sound/pci/hda/hdaa.c
2567
w->nid, -1, mute, lvol, rvol, 0);
sys/dev/sound/pci/hda/hdaa.c
2571
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
2572
devinfo->as[w->bindas].dir == HDAA_CTL_OUT) {
sys/dev/sound/pci/hda/hdaa.c
2574
w->nid, -1, mute, lvol, rvol, 0);
sys/dev/sound/pci/hda/hdaa.c
2578
w->pflags & HDAA_ADC_MONITOR) {
sys/dev/sound/pci/hda/hdaa.c
2579
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
2580
if (!w->connsenable[j])
sys/dev/sound/pci/hda/hdaa.c
2582
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
2591
w->nid, j, mute, lvol, rvol, 0);
sys/dev/sound/pci/hda/hdaa.c
2595
if (w->ossdev != dev)
sys/dev/sound/pci/hda/hdaa.c
2598
w->nid, -1, mute, lvol, rvol, 0);
sys/dev/sound/pci/hda/hdaa.c
2599
if (dev == SOUND_MIXER_IMIX && (w->pflags & HDAA_IMIX_AS_DST))
sys/dev/sound/pci/hda/hdaa.c
2601
w->nid, -1, mute, lvol, rvol, 0);
sys/dev/sound/pci/hda/hdaa.c
2614
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
2626
w = NULL;
sys/dev/sound/pci/hda/hdaa.c
2628
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
2629
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2631
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
sys/dev/sound/pci/hda/hdaa.c
2632
w->param.eapdbtl == HDA_INVALID)
sys/dev/sound/pci/hda/hdaa.c
2640
orig = w->param.eapdbtl;
sys/dev/sound/pci/hda/hdaa.c
2642
w->param.eapdbtl &= ~HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
sys/dev/sound/pci/hda/hdaa.c
2644
w->param.eapdbtl |= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD;
sys/dev/sound/pci/hda/hdaa.c
2645
if (orig != w->param.eapdbtl) {
sys/dev/sound/pci/hda/hdaa.c
2648
val = w->param.eapdbtl;
sys/dev/sound/pci/hda/hdaa.c
2652
HDA_CMD_SET_EAPD_BTL_ENABLE(0, w->nid, val));
sys/dev/sound/pci/hda/hdaa.c
269
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
2715
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
2724
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
2725
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
2728
for (i = 0; i < w->nconns; i++) {
sys/dev/sound/pci/hda/hdaa.c
2729
if (w->connsenable[i] == 0)
sys/dev/sound/pci/hda/hdaa.c
2731
cw = hdaa_widget_get(devinfo, w->conns[i]);
sys/dev/sound/pci/hda/hdaa.c
2738
w->conns[i], depth + 1);
sys/dev/sound/pci/hda/hdaa.c
2744
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) {
sys/dev/sound/pci/hda/hdaa.c
2746
w->nid, HDAA_CTL_IN, i, 1);
sys/dev/sound/pci/hda/hdaa.c
2766
if (w->nconns == 1)
sys/dev/sound/pci/hda/hdaa.c
2771
hdaa_widget_connection_select(w, i);
sys/dev/sound/pci/hda/hdaa.c
279
w = hdaa_widget_get(devinfo, as->pins[i]);
sys/dev/sound/pci/hda/hdaa.c
2790
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
280
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
2814
w = hdaa_widget_get(devinfo, ch->io[i]);
sys/dev/sound/pci/hda/hdaa.c
2815
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
282
if (w->wclass.pin.connected == 1)
sys/dev/sound/pci/hda/hdaa.c
284
else if (w->wclass.pin.connected != 0)
sys/dev/sound/pci/hda/hdaa.c
286
if (w->eld != NULL && w->eld_len >= 8)
sys/dev/sound/pci/hda/hdaa.c
287
eld = w->eld;
sys/dev/sound/pci/hda/hdaa.c
2956
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
2998
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
2999
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
3002
w->devinfo = devinfo;
sys/dev/sound/pci/hda/hdaa.c
3003
w->nid = i;
sys/dev/sound/pci/hda/hdaa.c
3004
w->enable = 1;
sys/dev/sound/pci/hda/hdaa.c
3005
w->selconn = -1;
sys/dev/sound/pci/hda/hdaa.c
3006
w->pflags = 0;
sys/dev/sound/pci/hda/hdaa.c
3007
w->ossdev = -1;
sys/dev/sound/pci/hda/hdaa.c
3008
w->bindas = -1;
sys/dev/sound/pci/hda/hdaa.c
3009
w->param.eapdbtl = HDA_INVALID;
sys/dev/sound/pci/hda/hdaa.c
3010
hdaa_widget_parse(w);
sys/dev/sound/pci/hda/hdaa.c
3018
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
3022
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3023
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
3025
hdaa_widget_postprocess(w);
sys/dev/sound/pci/hda/hdaa.c
3033
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
3040
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3041
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3043
if (w->param.outamp_cap != 0)
sys/dev/sound/pci/hda/hdaa.c
3045
if (w->param.inamp_cap != 0) {
sys/dev/sound/pci/hda/hdaa.c
3046
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
3049
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
3051
w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
3080
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3081
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3083
ocap = w->param.outamp_cap;
sys/dev/sound/pci/hda/hdaa.c
3084
icap = w->param.inamp_cap;
sys/dev/sound/pci/hda/hdaa.c
3100
ctls[cnt].widget = w;
sys/dev/sound/pci/hda/hdaa.c
3107
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
sys/dev/sound/pci/hda/hdaa.c
3108
w->waspin)
sys/dev/sound/pci/hda/hdaa.c
3129
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
3132
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
3140
w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
3144
ctls[cnt].widget = w;
sys/dev/sound/pci/hda/hdaa.c
3165
ctls[cnt].widget = w;
sys/dev/sound/pci/hda/hdaa.c
3172
if (w->type ==
sys/dev/sound/pci/hda/hdaa.c
3190
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
3197
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3198
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3200
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
3202
if (HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config)
sys/dev/sound/pci/hda/hdaa.c
3239
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3240
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3242
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
3244
assoc = HDA_CONFIG_DEFAULTCONF_ASSOCIATION(w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
3245
seq = HDA_CONFIG_DEFAULTCONF_SEQUENCE(w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
3252
type = w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa.c
3275
__func__, seq, w->nid, j);
sys/dev/sound/pci/hda/hdaa.c
3282
__func__, w->nid, j);
sys/dev/sound/pci/hda/hdaa.c
3285
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
3287
if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
sys/dev/sound/pci/hda/hdaa.c
3289
if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))
sys/dev/sound/pci/hda/hdaa.c
3294
HDA_CONFIG_DEFAULTCONF_LOCATION(w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
3296
HDA_CONFIG_DEFAULTCONF_LOCATION(w->wclass.pin.config)) {
sys/dev/sound/pci/hda/hdaa.c
3303
as[cnt].pins[seq] = w->nid;
sys/dev/sound/pci/hda/hdaa.c
3348
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
3354
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
3355
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3361
depth + 1, "", w->nid);
sys/dev/sound/pci/hda/hdaa.c
3365
if (w->bindas >= 0 && w->bindas != as) {
sys/dev/sound/pci/hda/hdaa.c
3370
depth + 1, "", w->nid, w->bindas);
sys/dev/sound/pci/hda/hdaa.c
3376
if (w->bindseqmask != 0) {
sys/dev/sound/pci/hda/hdaa.c
3381
depth + 1, "", w->nid, w->bindseqmask);
sys/dev/sound/pci/hda/hdaa.c
3388
if (w->bindseqmask != 0 &&
sys/dev/sound/pci/hda/hdaa.c
3389
(w->bindseqmask & (1 << dupseq)) == 0) {
sys/dev/sound/pci/hda/hdaa.c
3393
depth + 1, "", w->nid, w->bindseqmask);
sys/dev/sound/pci/hda/hdaa.c
3399
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
3406
if ((only == 0 || only == w->nid) &&
sys/dev/sound/pci/hda/hdaa.c
3407
(w->nid >= min) && (dupseq < 0 || w->nid ==
sys/dev/sound/pci/hda/hdaa.c
3409
m = w->nid;
sys/dev/sound/pci/hda/hdaa.c
3417
for (i = 0; i < w->nconns; i++) {
sys/dev/sound/pci/hda/hdaa.c
3418
if (w->connsenable[i] == 0)
sys/dev/sound/pci/hda/hdaa.c
3420
if (w->selconn != -1 && w->selconn != i)
sys/dev/sound/pci/hda/hdaa.c
3423
w->conns[i], dupseq, min, only, depth + 1)) != 0) {
sys/dev/sound/pci/hda/hdaa.c
3432
if (im >= 0 && only && ((w->nconns > 1 &&
sys/dev/sound/pci/hda/hdaa.c
3433
w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) ||
sys/dev/sound/pci/hda/hdaa.c
3434
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR))
sys/dev/sound/pci/hda/hdaa.c
3435
w->selconn = im;
sys/dev/sound/pci/hda/hdaa.c
3439
w->bindas = as;
sys/dev/sound/pci/hda/hdaa.c
3440
w->bindseqmask |= (1 << seq);
sys/dev/sound/pci/hda/hdaa.c
3446
depth + 1, "", w->nid, m);
sys/dev/sound/pci/hda/hdaa.c
3459
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
3465
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
3466
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3471
depth + 1, "", w->nid);
sys/dev/sound/pci/hda/hdaa.c
3474
if (w->bindas >= 0 && w->bindas != as) {
sys/dev/sound/pci/hda/hdaa.c
3478
depth + 1, "", w->nid, w->bindas);
sys/dev/sound/pci/hda/hdaa.c
3482
if (!mixed && w->bindseqmask != 0) {
sys/dev/sound/pci/hda/hdaa.c
3486
depth + 1, "", w->nid, w->bindseqmask);
sys/dev/sound/pci/hda/hdaa.c
3490
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
3492
if ((only == 0 || only == w->nid) && (w->nid >= min) &&
sys/dev/sound/pci/hda/hdaa.c
3494
m = w->nid;
sys/dev/sound/pci/hda/hdaa.c
3536
w->bindas = as;
sys/dev/sound/pci/hda/hdaa.c
3537
w->bindseqmask |= (1 << seq);
sys/dev/sound/pci/hda/hdaa.c
3542
depth + 1, "", w->nid, m);
sys/dev/sound/pci/hda/hdaa.c
3553
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
3557
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
3558
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3560
if (w->bindas == as) {
sys/dev/sound/pci/hda/hdaa.c
3562
w->bindseqmask &= ~(1 << seq);
sys/dev/sound/pci/hda/hdaa.c
3563
if (w->bindseqmask == 0) {
sys/dev/sound/pci/hda/hdaa.c
3564
w->bindas = -1;
sys/dev/sound/pci/hda/hdaa.c
3565
w->selconn = -1;
sys/dev/sound/pci/hda/hdaa.c
3568
w->bindas = -1;
sys/dev/sound/pci/hda/hdaa.c
3569
w->bindseqmask = 0;
sys/dev/sound/pci/hda/hdaa.c
3570
w->selconn = -1;
sys/dev/sound/pci/hda/hdaa.c
379
hdaa_hpredir_handler(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
3806
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
381
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
3810
w = hdaa_widget_get(devinfo, j);
sys/dev/sound/pci/hda/hdaa.c
3811
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3813
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
sys/dev/sound/pci/hda/hdaa.c
3815
if (w->bindas >= 0 && w->bindas != as)
sys/dev/sound/pci/hda/hdaa.c
382
struct hdaa_audio_as *as = &devinfo->as[w->bindas];
sys/dev/sound/pci/hda/hdaa.c
386
int j, connected = w->wclass.pin.connected;
sys/dev/sound/pci/hda/hdaa.c
388
if (w->senseredir) {
sys/dev/sound/pci/hda/hdaa.c
389
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
390
if (w->conns[j] == w->senseredir && connected)
sys/dev/sound/pci/hda/hdaa.c
392
else if (w->conns[j] != w->senseredir && !connected)
sys/dev/sound/pci/hda/hdaa.c
3920
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
3926
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
3927
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
3932
depth + 1, "", w->nid);
sys/dev/sound/pci/hda/hdaa.c
3935
if (depth > 0 && w->bindas != -1) {
sys/dev/sound/pci/hda/hdaa.c
3936
if (w->bindas < 0 || ases[w->bindas].dir == HDAA_CTL_OUT) {
sys/dev/sound/pci/hda/hdaa.c
3940
depth + 1, "", w->nid, w->bindas);
sys/dev/sound/pci/hda/hdaa.c
3942
if (w->bindas >= 0)
sys/dev/sound/pci/hda/hdaa.c
3943
w->pflags |= HDAA_ADC_MONITOR;
sys/dev/sound/pci/hda/hdaa.c
3949
depth + 1, "", w->nid, w->bindas);
sys/dev/sound/pci/hda/hdaa.c
395
if (j != w->nconns)
sys/dev/sound/pci/hda/hdaa.c
3955
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
396
hdaa_widget_connection_select(w, j);
sys/dev/sound/pci/hda/hdaa.c
3986
if (res && w->bindas == -1)
sys/dev/sound/pci/hda/hdaa.c
3987
w->bindas = -2;
sys/dev/sound/pci/hda/hdaa.c
3992
depth + 1, "", w->nid, res);
sys/dev/sound/pci/hda/hdaa.c
4004
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
4015
w = hdaa_widget_get(devinfo, j);
sys/dev/sound/pci/hda/hdaa.c
4016
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4018
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
4020
if (w->bindas < 0 || as[w->bindas].dir != HDAA_CTL_IN)
sys/dev/sound/pci/hda/hdaa.c
4027
if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
sys/dev/sound/pci/hda/hdaa.c
4031
w->nid);
sys/dev/sound/pci/hda/hdaa.c
4033
w->ossdev = SOUND_MIXER_IMIX;
sys/dev/sound/pci/hda/hdaa.c
4045
w = hdaa_widget_get(devinfo, j);
sys/dev/sound/pci/hda/hdaa.c
4046
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4048
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
4050
if (w->bindas < 0 || as[w->bindas].dir != HDAA_CTL_IN)
sys/dev/sound/pci/hda/hdaa.c
4057
if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
sys/dev/sound/pci/hda/hdaa.c
4061
w->nid);
sys/dev/sound/pci/hda/hdaa.c
407
w->nid, HDAA_CTL_IN, -1, 1);
sys/dev/sound/pci/hda/hdaa.c
4072
w = hdaa_widget_get(devinfo, j);
sys/dev/sound/pci/hda/hdaa.c
4073
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4075
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET)
sys/dev/sound/pci/hda/hdaa.c
4082
if (hdaa_audio_trace_to_out(devinfo, w->nid, 0)) {
sys/dev/sound/pci/hda/hdaa.c
4089
w->bindas = -2;
sys/dev/sound/pci/hda/hdaa.c
4156
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
4161
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4162
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4164
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET ||
sys/dev/sound/pci/hda/hdaa.c
4165
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET) {
sys/dev/sound/pci/hda/hdaa.c
4166
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4171
w->nid);
sys/dev/sound/pci/hda/hdaa.c
4180
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
4186
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4187
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4189
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
sys/dev/sound/pci/hda/hdaa.c
4190
if ((w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa.c
4193
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4198
w->nid);
sys/dev/sound/pci/hda/hdaa.c
420
val = w->wclass.pin.ctrl |
sys/dev/sound/pci/hda/hdaa.c
4200
} else if ((w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa.c
4202
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4207
w->nid);
sys/dev/sound/pci/hda/hdaa.c
423
val = w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
4242
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4243
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4246
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4247
if (w->connsenable[j]) {
sys/dev/sound/pci/hda/hdaa.c
4248
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
425
if (val != w->wclass.pin.ctrl) {
sys/dev/sound/pci/hda/hdaa.c
4250
w->connsenable[j] = 0;
sys/dev/sound/pci/hda/hdaa.c
426
w->wclass.pin.ctrl = val;
sys/dev/sound/pci/hda/hdaa.c
4260
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
sys/dev/sound/pci/hda/hdaa.c
4261
w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
4265
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4266
if (w->connsenable[j]) {
sys/dev/sound/pci/hda/hdaa.c
4272
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4277
" inputs disabled.\n", w->nid);
sys/dev/sound/pci/hda/hdaa.c
4281
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR &&
sys/dev/sound/pci/hda/hdaa.c
4282
w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
429
w->nid, w->wclass.pin.ctrl));
sys/dev/sound/pci/hda/hdaa.c
4297
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4302
" consumers disabled.\n", w->nid);
sys/dev/sound/pci/hda/hdaa.c
4314
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
4320
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4321
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4323
if (w->bindas == -1) {
sys/dev/sound/pci/hda/hdaa.c
4324
w->enable = 0;
sys/dev/sound/pci/hda/hdaa.c
4328
w->nid);
sys/dev/sound/pci/hda/hdaa.c
4335
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4336
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4338
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
4340
if (w->bindas < 0)
sys/dev/sound/pci/hda/hdaa.c
4342
if (as[w->bindas].dir == HDAA_CTL_IN) {
sys/dev/sound/pci/hda/hdaa.c
4343
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4344
if (w->connsenable[j] == 0)
sys/dev/sound/pci/hda/hdaa.c
4346
w->connsenable[j] = 0;
sys/dev/sound/pci/hda/hdaa.c
4354
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
4364
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
437
if (w == w1)
sys/dev/sound/pci/hda/hdaa.c
4409
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
4414
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4415
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4417
if (w->nconns <= 1)
sys/dev/sound/pci/hda/hdaa.c
4419
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
4421
if (w->bindas < 0 || as[w->bindas].dir == HDAA_CTL_IN)
sys/dev/sound/pci/hda/hdaa.c
4423
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4424
if (w->connsenable[j] == 0)
sys/dev/sound/pci/hda/hdaa.c
4426
if (w->selconn < 0 || w->selconn == j)
sys/dev/sound/pci/hda/hdaa.c
4428
w->connsenable[j] = 0;
sys/dev/sound/pci/hda/hdaa.c
4443
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
445
if (w->senseredir && w1) {
sys/dev/sound/pci/hda/hdaa.c
4450
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4451
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4453
if (w->nconns <= 1)
sys/dev/sound/pci/hda/hdaa.c
4455
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
4458
if (w->bindas == -2)
sys/dev/sound/pci/hda/hdaa.c
4460
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4461
if (w->connsenable[j] == 0)
sys/dev/sound/pci/hda/hdaa.c
4463
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
4464
if (cw == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4467
if (cw->bindas == -2 && w->bindas >= 0 &&
sys/dev/sound/pci/hda/hdaa.c
4468
ases[w->bindas].dir == HDAA_CTL_OUT)
sys/dev/sound/pci/hda/hdaa.c
4471
if (cw->bindas == -2 && w->bindas >= 0 &&
sys/dev/sound/pci/hda/hdaa.c
4472
ases[w->bindas].mixed)
sys/dev/sound/pci/hda/hdaa.c
4475
if ((w->pflags & HDAA_ADC_MONITOR) &&
sys/dev/sound/pci/hda/hdaa.c
4480
if (w->bindas == cw->bindas &&
sys/dev/sound/pci/hda/hdaa.c
4481
(w->bindseqmask & cw->bindseqmask) != 0)
sys/dev/sound/pci/hda/hdaa.c
4483
w->connsenable[j] = 0;
sys/dev/sound/pci/hda/hdaa.c
449
if (w1->conns[k] == w->senseredir && connected)
sys/dev/sound/pci/hda/hdaa.c
451
else if (w1->conns[k] != w->senseredir && !connected)
sys/dev/sound/pci/hda/hdaa.c
4545
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
4552
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
4553
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4558
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
4559
if (!w->connsenable[j])
sys/dev/sound/pci/hda/hdaa.c
4568
w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)) {
sys/dev/sound/pci/hda/hdaa.c
4569
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_IN,
sys/dev/sound/pci/hda/hdaa.c
4583
if (w->ossdev >= 0 && depth > 0)
sys/dev/sound/pci/hda/hdaa.c
4587
if ((w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT ||
sys/dev/sound/pci/hda/hdaa.c
4588
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) &&
sys/dev/sound/pci/hda/hdaa.c
4593
w->ossmask |= (1 << ossdev);
sys/dev/sound/pci/hda/hdaa.c
4600
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER)
sys/dev/sound/pci/hda/hdaa.c
4604
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_OUT, -1, 1);
sys/dev/sound/pci/hda/hdaa.c
4652
struct hdaa_widget *w, *wc;
sys/dev/sound/pci/hda/hdaa.c
4659
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
4660
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4680
if ((consumers == 2 && (w->bindas < 0 ||
sys/dev/sound/pci/hda/hdaa.c
4681
as[w->bindas].hpredir < 0 || as[w->bindas].fakeredir ||
sys/dev/sound/pci/hda/hdaa.c
4682
(w->bindseqmask & (1 << 15)) == 0)) ||
sys/dev/sound/pci/hda/hdaa.c
4687
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
4700
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
4705
for (i = 0; i < w->nconns; i++) {
sys/dev/sound/pci/hda/hdaa.c
4706
if (w->connsenable[i] == 0)
sys/dev/sound/pci/hda/hdaa.c
4711
ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid,
sys/dev/sound/pci/hda/hdaa.c
4721
found += hdaa_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev,
sys/dev/sound/pci/hda/hdaa.c
4745
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
4766
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4767
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4769
if (w->bindas == -1)
sys/dev/sound/pci/hda/hdaa.c
4772
switch (w->type) {
sys/dev/sound/pci/hda/hdaa.c
4774
if (as[w->bindas].dir == HDAA_CTL_OUT)
sys/dev/sound/pci/hda/hdaa.c
4777
switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
sys/dev/sound/pci/hda/hdaa.c
4782
if ((w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK)
sys/dev/sound/pci/hda/hdaa.c
4818
w->ossdev = use;
sys/dev/sound/pci/hda/hdaa.c
4824
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4825
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4827
if (w->ossdev >= 0)
sys/dev/sound/pci/hda/hdaa.c
4829
if (w->bindas == -1)
sys/dev/sound/pci/hda/hdaa.c
4831
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
4833
if (as[w->bindas].dir == HDAA_CTL_OUT)
sys/dev/sound/pci/hda/hdaa.c
4836
switch (w->wclass.pin.config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) {
sys/dev/sound/pci/hda/hdaa.c
4859
w->ossdev = types[type][j];
sys/dev/sound/pci/hda/hdaa.c
4865
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4866
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4868
if (w->ossdev >= 0)
sys/dev/sound/pci/hda/hdaa.c
4870
if (w->bindas == -1)
sys/dev/sound/pci/hda/hdaa.c
4872
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
4874
if (as[w->bindas].dir == HDAA_CTL_OUT)
sys/dev/sound/pci/hda/hdaa.c
4882
w->ossdev = types[6][j];
sys/dev/sound/pci/hda/hdaa.c
493
hdaa_autorecsrc_handler(struct hdaa_audio_as *as, struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
4948
hdaa_adjust_amp(struct hdaa_widget *w, int ossdev,
sys/dev/sound/pci/hda/hdaa.c
4951
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
4954
if (w->bindas >= 0)
sys/dev/sound/pci/hda/hdaa.c
4955
pdevinfo = devinfo->as[w->bindas].pdevinfo;
sys/dev/sound/pci/hda/hdaa.c
4979
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
4984
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
4985
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
4988
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
sys/dev/sound/pci/hda/hdaa.c
4989
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET ||
sys/dev/sound/pci/hda/hdaa.c
4990
(w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
4991
as[w->bindas].dir == HDAA_CTL_IN)) {
sys/dev/sound/pci/hda/hdaa.c
4992
if (w->ossdev < 0)
sys/dev/sound/pci/hda/hdaa.c
4994
found = hdaa_audio_ctl_source_amp(devinfo, w->nid, -1,
sys/dev/sound/pci/hda/hdaa.c
4995
w->ossdev, 1, 0, &minamp, &maxamp);
sys/dev/sound/pci/hda/hdaa.c
4996
hdaa_adjust_amp(w, w->ossdev, found, minamp, maxamp);
sys/dev/sound/pci/hda/hdaa.c
4997
} else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
sys/dev/sound/pci/hda/hdaa.c
4998
found = hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
sys/dev/sound/pci/hda/hdaa.c
5000
hdaa_adjust_amp(w, SOUND_MIXER_RECLEV, found, minamp, maxamp);
sys/dev/sound/pci/hda/hdaa.c
5001
} else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
5002
as[w->bindas].dir == HDAA_CTL_OUT) {
sys/dev/sound/pci/hda/hdaa.c
5003
found = hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
sys/dev/sound/pci/hda/hdaa.c
5005
hdaa_adjust_amp(w, SOUND_MIXER_VOLUME, found, minamp, maxamp);
sys/dev/sound/pci/hda/hdaa.c
5007
if (w->ossdev == SOUND_MIXER_IMIX) {
sys/dev/sound/pci/hda/hdaa.c
5009
found = hdaa_audio_ctl_source_amp(devinfo, w->nid, -1,
sys/dev/sound/pci/hda/hdaa.c
5010
w->ossdev, 1, 0, &minamp, &maxamp);
sys/dev/sound/pci/hda/hdaa.c
5014
found += hdaa_audio_ctl_dest_amp(devinfo, w->nid, -1,
sys/dev/sound/pci/hda/hdaa.c
5015
w->ossdev, 0, &minamp, &maxamp);
sys/dev/sound/pci/hda/hdaa.c
5016
w->pflags |= HDAA_IMIX_AS_DST;
sys/dev/sound/pci/hda/hdaa.c
5018
hdaa_adjust_amp(w, w->ossdev, found, minamp, maxamp);
sys/dev/sound/pci/hda/hdaa.c
5020
if (w->pflags & HDAA_ADC_MONITOR) {
sys/dev/sound/pci/hda/hdaa.c
5021
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
5022
if (!w->connsenable[j])
sys/dev/sound/pci/hda/hdaa.c
5024
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
5034
w->nid, j, SOUND_MIXER_IGAIN, 0,
sys/dev/sound/pci/hda/hdaa.c
5036
hdaa_adjust_amp(w, SOUND_MIXER_IGAIN,
sys/dev/sound/pci/hda/hdaa.c
5047
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
505
(pdevinfo->autorecsrc == 1 && w != NULL))
sys/dev/sound/pci/hda/hdaa.c
5052
w = &devinfo->widget[i];
sys/dev/sound/pci/hda/hdaa.c
5053
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
5055
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX &&
sys/dev/sound/pci/hda/hdaa.c
5056
w->waspin == 0)
sys/dev/sound/pci/hda/hdaa.c
5059
pincap = w->wclass.pin.cap;
sys/dev/sound/pci/hda/hdaa.c
5062
w->wclass.pin.ctrl &= ~(
sys/dev/sound/pci/hda/hdaa.c
5068
if (w->enable == 0) {
sys/dev/sound/pci/hda/hdaa.c
5071
} else if (w->waspin) {
sys/dev/sound/pci/hda/hdaa.c
5073
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5075
} else if (w->bindas < 0 || as[w->bindas].enable == 0) {
sys/dev/sound/pci/hda/hdaa.c
5078
} else if (as[w->bindas].dir == HDAA_CTL_IN) {
sys/dev/sound/pci/hda/hdaa.c
5081
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5086
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5091
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5096
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5102
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5106
(w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa.c
5109
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5114
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5119
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5124
w->wclass.pin.ctrl |=
sys/dev/sound/pci/hda/hdaa.c
5236
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
5244
w = &devinfo->widget[i];
sys/dev/sound/pci/hda/hdaa.c
5245
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
5247
if (w->selconn == -1)
sys/dev/sound/pci/hda/hdaa.c
5248
w->selconn = 0;
sys/dev/sound/pci/hda/hdaa.c
5249
if (w->nconns > 0)
sys/dev/sound/pci/hda/hdaa.c
5250
hdaa_widget_connection_select(w, w->selconn);
sys/dev/sound/pci/hda/hdaa.c
5251
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX ||
sys/dev/sound/pci/hda/hdaa.c
5252
w->waspin) {
sys/dev/sound/pci/hda/hdaa.c
5254
HDA_CMD_SET_PIN_WIDGET_CTRL(0, w->nid,
sys/dev/sound/pci/hda/hdaa.c
5255
w->wclass.pin.ctrl));
sys/dev/sound/pci/hda/hdaa.c
5257
if (w->param.eapdbtl != HDA_INVALID) {
sys/dev/sound/pci/hda/hdaa.c
5260
val = w->param.eapdbtl;
sys/dev/sound/pci/hda/hdaa.c
5265
HDA_CMD_SET_EAPD_BTL_ENABLE(0, w->nid,
sys/dev/sound/pci/hda/hdaa.c
5297
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
5332
w = hdaa_widget_get(devinfo, as[ch->as].dacs[ch->asindex][i]);
sys/dev/sound/pci/hda/hdaa.c
5333
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
5335
cap = w->param.supp_stream_formats;
sys/dev/sound/pci/hda/hdaa.c
5341
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5345
pcmcap = w->param.supp_pcm_size_rate;
sys/dev/sound/pci/hda/hdaa.c
5348
pcmcap &= w->param.supp_pcm_size_rate;
sys/dev/sound/pci/hda/hdaa.c
5351
ch->stripecap &= w->wclass.conv.stripecap;
sys/dev/sound/pci/hda/hdaa.c
5355
channels += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1;
sys/dev/sound/pci/hda/hdaa.c
5356
if (HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) != 1)
sys/dev/sound/pci/hda/hdaa.c
537
if (w != NULL && (mask & (1 << w->ossdev)))
sys/dev/sound/pci/hda/hdaa.c
538
mask = (1 << w->ossdev);
sys/dev/sound/pci/hda/hdaa.c
564
hdaa_presence_handler(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
566
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
5703
hdaa_dump_pin(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
5707
pincap = w->wclass.pin.cap;
sys/dev/sound/pci/hda/hdaa.c
5709
device_printf(w->devinfo->dev, " Pin cap: 0x%08x", pincap);
sys/dev/sound/pci/hda/hdaa.c
571
if (w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
5747
device_printf(w->devinfo->dev, " Pin config: 0x%08x\n",
sys/dev/sound/pci/hda/hdaa.c
5748
w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
5749
device_printf(w->devinfo->dev, " Pin control: 0x%08x", w->wclass.pin.ctrl);
sys/dev/sound/pci/hda/hdaa.c
575
if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
sys/dev/sound/pci/hda/hdaa.c
5750
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
5752
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
5754
if (w->wclass.pin.ctrl & HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE)
sys/dev/sound/pci/hda/hdaa.c
5756
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
5757
if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
576
(HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
sys/dev/sound/pci/hda/hdaa.c
5760
else if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
5764
if ((w->wclass.pin.ctrl &
sys/dev/sound/pci/hda/hdaa.c
5772
hdaa_dump_pin_config(struct hdaa_widget *w, uint32_t conf)
sys/dev/sound/pci/hda/hdaa.c
5775
device_printf(w->devinfo->dev, "%2d %08x %-2d %-2d "
sys/dev/sound/pci/hda/hdaa.c
5777
w->nid, conf,
sys/dev/sound/pci/hda/hdaa.c
5786
(w->enable == 0)?" DISA":"");
sys/dev/sound/pci/hda/hdaa.c
579
res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid));
sys/dev/sound/pci/hda/hdaa.c
5792
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
5798
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
5799
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
5801
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
5803
hdaa_dump_pin_config(w, w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
5827
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
583
old = w->wclass.pin.connected;
sys/dev/sound/pci/hda/hdaa.c
5839
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
5840
if (w == NULL) {
sys/dev/sound/pci/hda/hdaa.c
5845
device_printf(devinfo->dev, " nid: %d%s\n", w->nid,
sys/dev/sound/pci/hda/hdaa.c
5846
(w->enable == 0) ? " [DISABLED]" : "");
sys/dev/sound/pci/hda/hdaa.c
5847
device_printf(devinfo->dev, " Name: %s\n", w->name);
sys/dev/sound/pci/hda/hdaa.c
5849
w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
5850
if (w->param.widget_cap & 0x0ee1) {
sys/dev/sound/pci/hda/hdaa.c
5851
if (HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5853
if (HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5855
if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5857
if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5859
if (HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
586
w->wclass.pin.connected = connected;
sys/dev/sound/pci/hda/hdaa.c
5861
if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap))
sys/dev/sound/pci/hda/hdaa.c
5863
1 << (fls(w->wclass.conv.stripecap) - 1));
sys/dev/sound/pci/hda/hdaa.c
5864
j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa.c
5871
if (w->bindas != -1) {
sys/dev/sound/pci/hda/hdaa.c
5873
w->bindas, w->bindseqmask);
sys/dev/sound/pci/hda/hdaa.c
5875
if (w->ossmask != 0 || w->ossdev >= 0) {
sys/dev/sound/pci/hda/hdaa.c
5877
hdaa_audio_ctl_ossmixer_mask2allname(w->ossmask, buf, sizeof(buf)));
sys/dev/sound/pci/hda/hdaa.c
5878
if (w->ossdev >= 0)
sys/dev/sound/pci/hda/hdaa.c
5879
kprintf(" (%s)", ossnames[w->ossdev]);
sys/dev/sound/pci/hda/hdaa.c
5882
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT ||
sys/dev/sound/pci/hda/hdaa.c
5883
w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) {
sys/dev/sound/pci/hda/hdaa.c
5885
w->param.supp_stream_formats,
sys/dev/sound/pci/hda/hdaa.c
5886
w->param.supp_pcm_size_rate);
sys/dev/sound/pci/hda/hdaa.c
5887
} else if (w->type ==
sys/dev/sound/pci/hda/hdaa.c
5888
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX || w->waspin)
sys/dev/sound/pci/hda/hdaa.c
5889
hdaa_dump_pin(w);
sys/dev/sound/pci/hda/hdaa.c
5890
if (w->param.eapdbtl != HDA_INVALID)
sys/dev/sound/pci/hda/hdaa.c
5892
w->param.eapdbtl);
sys/dev/sound/pci/hda/hdaa.c
5893
if (HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(w->param.widget_cap) &&
sys/dev/sound/pci/hda/hdaa.c
5894
w->param.outamp_cap != 0)
sys/dev/sound/pci/hda/hdaa.c
5895
hdaa_dump_amp(devinfo->dev, w->param.outamp_cap, "Output");
sys/dev/sound/pci/hda/hdaa.c
5896
if (HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(w->param.widget_cap) &&
sys/dev/sound/pci/hda/hdaa.c
5897
w->param.inamp_cap != 0)
sys/dev/sound/pci/hda/hdaa.c
5898
hdaa_dump_amp(devinfo->dev, w->param.inamp_cap, " Input");
sys/dev/sound/pci/hda/hdaa.c
5899
if (w->nconns > 0)
sys/dev/sound/pci/hda/hdaa.c
5900
device_printf(devinfo->dev, " Connections: %d\n", w->nconns);
sys/dev/sound/pci/hda/hdaa.c
5901
for (j = 0; j < w->nconns; j++) {
sys/dev/sound/pci/hda/hdaa.c
5902
cw = hdaa_widget_get(devinfo, w->conns[j]);
sys/dev/sound/pci/hda/hdaa.c
5904
(w->connsenable[j] == 0)?"[DISABLED] ":"",
sys/dev/sound/pci/hda/hdaa.c
5905
w->conns[j], (cw == NULL) ? "GHOST!" : cw->name);
sys/dev/sound/pci/hda/hdaa.c
591
w->nid, res, !connected ? "dis" : "");
sys/dev/sound/pci/hda/hdaa.c
5910
if (w->nconns > 1 && w->selconn == j && w->type !=
sys/dev/sound/pci/hda/hdaa.c
5923
struct hdaa_widget *w, *cw;
sys/dev/sound/pci/hda/hdaa.c
5930
w = hdaa_widget_get(devinfo, nid);
sys/dev/sound/pci/hda/hdaa.c
5931
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
5938
kprintf("nid=%d [%s]", w->nid, w->name);
sys/dev/sound/pci/hda/hdaa.c
5941
if (w->ossmask == 0) {
sys/dev/sound/pci/hda/hdaa.c
5947
w->ossmask, buf, sizeof(buf)));
sys/dev/sound/pci/hda/hdaa.c
5948
if (w->ossdev >= 0) {
sys/dev/sound/pci/hda/hdaa.c
595
as = &devinfo->as[w->bindas];
sys/dev/sound/pci/hda/hdaa.c
5955
for (i = 0; i < w->nconns; i++) {
sys/dev/sound/pci/hda/hdaa.c
5956
if (w->connsenable[i] == 0)
sys/dev/sound/pci/hda/hdaa.c
5958
cw = hdaa_widget_get(devinfo, w->conns[i]);
sys/dev/sound/pci/hda/hdaa.c
596
if (w->senseredir)
sys/dev/sound/pci/hda/hdaa.c
5961
hdaa_dump_dst_nid(pdevinfo, w->conns[i], depth + 1);
sys/dev/sound/pci/hda/hdaa.c
597
hdaa_hpredir_handler(w);
sys/dev/sound/pci/hda/hdaa.c
5971
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
598
else if (as->hpredir >= 0 && as->pins[15] == w->nid)
sys/dev/sound/pci/hda/hdaa.c
599
hdaa_hpredir_handler(w);
sys/dev/sound/pci/hda/hdaa.c
5996
w = hdaa_widget_get(devinfo, as->pins[i]);
sys/dev/sound/pci/hda/hdaa.c
5997
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
6009
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
602
hdaa_autorecsrc_handler(as, w);
sys/dev/sound/pci/hda/hdaa.c
6031
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
6032
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
6034
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT)
sys/dev/sound/pci/hda/hdaa.c
6036
if (w->bindas != pdevinfo->recas)
sys/dev/sound/pci/hda/hdaa.c
6048
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
6053
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
6054
if (w == NULL || w->enable == 0)
sys/dev/sound/pci/hda/hdaa.c
6056
if (w->ossdev != SOUND_MIXER_IMIX)
sys/dev/sound/pci/hda/hdaa.c
6058
if (w->bindas != pdevinfo->recas)
sys/dev/sound/pci/hda/hdaa.c
6075
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
6083
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
6084
if (w == NULL || w->type !=
sys/dev/sound/pci/hda/hdaa.c
6087
hdaa_dump_pin_config(w, w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
6088
pincap = w->wclass.pin.cap;
sys/dev/sound/pci/hda/hdaa.c
6100
HDA_CMD_SET_PIN_SENSE(0, w->nid, 0));
sys/dev/sound/pci/hda/hdaa.c
6103
HDA_CMD_GET_PIN_SENSE(0, w->nid));
sys/dev/sound/pci/hda/hdaa.c
6111
w->nid));
sys/dev/sound/pci/hda/hdaa.c
6116
(HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap) &&
sys/dev/sound/pci/hda/hdaa.c
614
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
625
w = hdaa_widget_get(devinfo, devinfo->as[i].pins[15]);
sys/dev/sound/pci/hda/hdaa.c
626
if (w == NULL || w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
6288
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
629
hdaa_presence_handler(w);
sys/dev/sound/pci/hda/hdaa.c
6309
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
6310
if (w == NULL)
sys/dev/sound/pci/hda/hdaa.c
6312
w->enable = 1;
sys/dev/sound/pci/hda/hdaa.c
6313
w->selconn = -1;
sys/dev/sound/pci/hda/hdaa.c
6314
w->pflags = 0;
sys/dev/sound/pci/hda/hdaa.c
6315
w->bindas = -1;
sys/dev/sound/pci/hda/hdaa.c
6316
w->bindseqmask = 0;
sys/dev/sound/pci/hda/hdaa.c
6317
w->ossdev = -1;
sys/dev/sound/pci/hda/hdaa.c
6318
w->ossmask = 0;
sys/dev/sound/pci/hda/hdaa.c
6319
for (j = 0; j < w->nconns; j++)
sys/dev/sound/pci/hda/hdaa.c
6320
w->connsenable[j] = 1;
sys/dev/sound/pci/hda/hdaa.c
6321
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa.c
6322
w->wclass.pin.config = w->wclass.pin.newconf;
sys/dev/sound/pci/hda/hdaa.c
6323
if (w->eld != NULL) {
sys/dev/sound/pci/hda/hdaa.c
6324
w->eld_len = 0;
sys/dev/sound/pci/hda/hdaa.c
6325
kfree(w->eld, M_HDAA);
sys/dev/sound/pci/hda/hdaa.c
6326
w->eld = NULL;
sys/dev/sound/pci/hda/hdaa.c
637
hdaa_eld_dump(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
639
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
644
if (w->eld == NULL || w->eld_len < 4)
sys/dev/sound/pci/hda/hdaa.c
648
w->nid, w->eld[0] >> 3, w->eld[2]);
sys/dev/sound/pci/hda/hdaa.c
649
if ((w->eld[0] >> 3) != 0x02)
sys/dev/sound/pci/hda/hdaa.c
651
len = min(w->eld_len, (u_int)w->eld[2] * 4);
sys/dev/sound/pci/hda/hdaa.c
652
mnl = w->eld[4] & 0x1f;
sys/dev/sound/pci/hda/hdaa.c
655
w->nid, w->eld[4] >> 5, mnl);
sys/dev/sound/pci/hda/hdaa.c
656
sadc = w->eld[5] >> 4;
sys/dev/sound/pci/hda/hdaa.c
659
w->nid, sadc, (w->eld[5] >> 2) & 0x3,
sys/dev/sound/pci/hda/hdaa.c
660
(w->eld[5] >> 1) & 0x1, w->eld[5] & 0x1);
sys/dev/sound/pci/hda/hdaa.c
663
w->nid, w->eld[6] * 2);
sys/dev/sound/pci/hda/hdaa.c
665
"ELD nid=%d: Channels=0x%pb%i\n", w->nid,
sys/dev/sound/pci/hda/hdaa.c
666
"\020\07RLRC\06FLRC\05RC\04RLR\03FC\02LFE\01FLR", w->eld[7]);
sys/dev/sound/pci/hda/hdaa.c
669
w->nid, w->eld[8], w->eld[9], w->eld[10], w->eld[11],
sys/dev/sound/pci/hda/hdaa.c
670
w->eld[12], w->eld[13], w->eld[14], w->eld[15]);
sys/dev/sound/pci/hda/hdaa.c
673
w->nid, w->eld[16], w->eld[17]);
sys/dev/sound/pci/hda/hdaa.c
676
w->nid, w->eld[18], w->eld[19]);
sys/dev/sound/pci/hda/hdaa.c
679
w->nid, mnl, &w->eld[20]);
sys/dev/sound/pci/hda/hdaa.c
681
sad = &w->eld[20 + mnl + i * 3];
sys/dev/sound/pci/hda/hdaa.c
6826
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
6834
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
6835
if (w == NULL || w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
6838
if (w->unsol != tag)
sys/dev/sound/pci/hda/hdaa.c
6840
if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap) ||
sys/dev/sound/pci/hda/hdaa.c
6841
HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
sys/dev/sound/pci/hda/hdaa.c
6846
hdaa_presence_handler(w);
sys/dev/sound/pci/hda/hdaa.c
6848
hdaa_eld_handler(w);
sys/dev/sound/pci/hda/hdaa.c
6912
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
6917
w = hdaa_widget_get(devinfo, as->pins[i]);
sys/dev/sound/pci/hda/hdaa.c
6918
if (w == NULL || w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
692
w->nid, HDA_HDMI_CODING_TYPES[fmt], (sad[0] & 0x07) + 1,
sys/dev/sound/pci/hda/hdaa.c
6921
t1 = HDA_CONFIG_DEFAULTCONF_DEVICE(w->wclass.pin.config);
sys/dev/sound/pci/hda/hdaa.c
717
hdaa_eld_handler(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
719
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa.c
723
if (w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
727
if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
sys/dev/sound/pci/hda/hdaa.c
728
(HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
sys/dev/sound/pci/hda/hdaa.c
731
res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid));
sys/dev/sound/pci/hda/hdaa.c
732
if ((w->eld != 0) == ((res & HDA_CMD_GET_PIN_SENSE_ELD_VALID) != 0))
sys/dev/sound/pci/hda/hdaa.c
734
if (w->eld != NULL) {
sys/dev/sound/pci/hda/hdaa.c
735
w->eld_len = 0;
sys/dev/sound/pci/hda/hdaa.c
736
kfree(w->eld, M_HDAA);
sys/dev/sound/pci/hda/hdaa.c
737
w->eld = NULL;
sys/dev/sound/pci/hda/hdaa.c
743
w->nid, res,
sys/dev/sound/pci/hda/hdaa.c
751
HDA_CMD_GET_HDMI_DIP_SIZE(0, w->nid, 0x08));
sys/dev/sound/pci/hda/hdaa.c
754
w->eld_len = res & 0xff;
sys/dev/sound/pci/hda/hdaa.c
755
if (w->eld_len != 0)
sys/dev/sound/pci/hda/hdaa.c
756
w->eld = kmalloc(w->eld_len, M_HDAA, M_ZERO | M_WAITOK);
sys/dev/sound/pci/hda/hdaa.c
757
if (w->eld == NULL) {
sys/dev/sound/pci/hda/hdaa.c
758
w->eld_len = 0;
sys/dev/sound/pci/hda/hdaa.c
762
for (i = 0; i < w->eld_len; i++) {
sys/dev/sound/pci/hda/hdaa.c
764
HDA_CMD_GET_HDMI_ELDD(0, w->nid, i));
sys/dev/sound/pci/hda/hdaa.c
766
w->eld[i] = res & 0xff;
sys/dev/sound/pci/hda/hdaa.c
769
hdaa_eld_dump(w);
sys/dev/sound/pci/hda/hdaa.c
771
hdaa_channels_handler(&devinfo->as[w->bindas]);
sys/dev/sound/pci/hda/hdaa.c
781
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
785
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
786
if (w == NULL || w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
789
if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap)) {
sys/dev/sound/pci/hda/hdaa.c
790
if (w->unsol < 0)
sys/dev/sound/pci/hda/hdaa.c
791
w->unsol = HDAC_UNSOL_ALLOC(
sys/dev/sound/pci/hda/hdaa.c
793
devinfo->dev, w->nid);
sys/dev/sound/pci/hda/hdaa.c
795
HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid,
sys/dev/sound/pci/hda/hdaa.c
796
HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE | w->unsol));
sys/dev/sound/pci/hda/hdaa.c
798
as = &devinfo->as[w->bindas];
sys/dev/sound/pci/hda/hdaa.c
799
if (as->hpredir >= 0 && as->pins[15] == w->nid) {
sys/dev/sound/pci/hda/hdaa.c
800
if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
sys/dev/sound/pci/hda/hdaa.c
801
(HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) {
sys/dev/sound/pci/hda/hdaa.c
804
w->nid);
sys/dev/sound/pci/hda/hdaa.c
806
if (w->unsol < 0)
sys/dev/sound/pci/hda/hdaa.c
812
w->bindas, w->nid,
sys/dev/sound/pci/hda/hdaa.c
813
(w->unsol < 0) ? "polling" :
sys/dev/sound/pci/hda/hdaa.c
818
hdaa_presence_handler(w);
sys/dev/sound/pci/hda/hdaa.c
819
if (!HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap) &&
sys/dev/sound/pci/hda/hdaa.c
820
!HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap))
sys/dev/sound/pci/hda/hdaa.c
822
hdaa_eld_handler(w);
sys/dev/sound/pci/hda/hdaa.c
833
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa.c
838
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa.c
839
if (w == NULL || w->enable == 0 || w->type !=
sys/dev/sound/pci/hda/hdaa.c
842
if (w->unsol < 0)
sys/dev/sound/pci/hda/hdaa.c
845
HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid, 0));
sys/dev/sound/pci/hda/hdaa.c
848
w->unsol);
sys/dev/sound/pci/hda/hdaa.c
849
w->unsol = -1;
sys/dev/sound/pci/hda/hdaa.c
975
hdaa_local_patch_pin(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa.c
977
device_t dev = w->devinfo->dev;
sys/dev/sound/pci/hda/hdaa.c
982
config = orig = w->wclass.pin.config;
sys/dev/sound/pci/hda/hdaa.c
984
hda_get_codec_id(dev), w->nid);
sys/dev/sound/pci/hda/hdaa.c
995
ksnprintf(buf, sizeof(buf), "nid%u.config", w->nid);
sys/dev/sound/pci/hda/hdaa_patches.c
148
hdac_pin_patch(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa_patches.c
152
nid_t nid = w->nid;
sys/dev/sound/pci/hda/hdaa_patches.c
154
config = orig = w->wclass.pin.config;
sys/dev/sound/pci/hda/hdaa_patches.c
155
id = hdaa_codec_id(w->devinfo);
sys/dev/sound/pci/hda/hdaa_patches.c
156
subid = hdaa_card_id(w->devinfo);
sys/dev/sound/pci/hda/hdaa_patches.c
430
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa_patches.c
434
w->wclass.pin.config = config;
sys/dev/sound/pci/hda/hdaa_patches.c
438
hdaa_widget_patch(struct hdaa_widget *w)
sys/dev/sound/pci/hda/hdaa_patches.c
440
struct hdaa_devinfo *devinfo = w->devinfo;
sys/dev/sound/pci/hda/hdaa_patches.c
448
orig = w->param.widget_cap;
sys/dev/sound/pci/hda/hdaa_patches.c
471
if (w->nid == beeper) {
sys/dev/sound/pci/hda/hdaa_patches.c
472
w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK;
sys/dev/sound/pci/hda/hdaa_patches.c
473
w->param.widget_cap |= HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET <<
sys/dev/sound/pci/hda/hdaa_patches.c
475
w->waspin = 1;
sys/dev/sound/pci/hda/hdaa_patches.c
482
w->nid == 23)
sys/dev/sound/pci/hda/hdaa_patches.c
483
w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK;
sys/dev/sound/pci/hda/hdaa_patches.c
485
if (w->param.widget_cap != orig) {
sys/dev/sound/pci/hda/hdaa_patches.c
486
device_printf(w->devinfo->dev,
sys/dev/sound/pci/hda/hdaa_patches.c
488
w->nid, orig, w->param.widget_cap);
sys/dev/sound/pci/hda/hdaa_patches.c
503
if (w->nid == 33)
sys/dev/sound/pci/hda/hdaa_patches.c
504
w->senseredir = 12;
sys/dev/sound/pci/hda/hdaa_patches.c
505
if (w->nid == 11)
sys/dev/sound/pci/hda/hdaa_patches.c
506
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
510
if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
sys/dev/sound/pci/hda/hdaa_patches.c
511
hdac_pin_patch(w);
sys/dev/sound/pci/hda/hdaa_patches.c
517
struct hdaa_widget *w;
sys/dev/sound/pci/hda/hdaa_patches.c
541
w = hdaa_widget_get(devinfo, i);
sys/dev/sound/pci/hda/hdaa_patches.c
542
if (w == NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
544
hdaa_widget_patch(w);
sys/dev/sound/pci/hda/hdaa_patches.c
554
w = hdaa_widget_get(devinfo, 5);
sys/dev/sound/pci/hda/hdaa_patches.c
555
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
556
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
557
w = hdaa_widget_get(devinfo, 6);
sys/dev/sound/pci/hda/hdaa_patches.c
558
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
559
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
560
w = hdaa_widget_get(devinfo, 11);
sys/dev/sound/pci/hda/hdaa_patches.c
561
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
562
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
564
w = hdaa_widget_get(devinfo, 12);
sys/dev/sound/pci/hda/hdaa_patches.c
565
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
566
w->connsenable[1] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
567
w = hdaa_widget_get(devinfo, 13);
sys/dev/sound/pci/hda/hdaa_patches.c
568
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
569
w->connsenable[1] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
571
w = hdaa_widget_get(devinfo, 20);
sys/dev/sound/pci/hda/hdaa_patches.c
572
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
573
w->connsenable[3] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
581
w = hdaa_widget_get(devinfo, 43);
sys/dev/sound/pci/hda/hdaa_patches.c
582
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
583
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
585
w = hdaa_widget_get(devinfo, 39);
sys/dev/sound/pci/hda/hdaa_patches.c
586
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
587
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
588
w = hdaa_widget_get(devinfo, 40);
sys/dev/sound/pci/hda/hdaa_patches.c
589
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
590
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
591
w = hdaa_widget_get(devinfo, 41);
sys/dev/sound/pci/hda/hdaa_patches.c
592
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
593
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
594
w = hdaa_widget_get(devinfo, 42);
sys/dev/sound/pci/hda/hdaa_patches.c
595
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
596
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
598
w = hdaa_widget_get(devinfo, 15);
sys/dev/sound/pci/hda/hdaa_patches.c
599
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
600
w->connsenable[3] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
602
w = hdaa_widget_get(devinfo, 31);
sys/dev/sound/pci/hda/hdaa_patches.c
603
if (w != NULL) {
sys/dev/sound/pci/hda/hdaa_patches.c
604
if ((w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa_patches.c
607
w = hdaa_widget_get(devinfo, 16);
sys/dev/sound/pci/hda/hdaa_patches.c
608
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
609
w->connsenable[2] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
611
w = hdaa_widget_get(devinfo, 15);
sys/dev/sound/pci/hda/hdaa_patches.c
612
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
613
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
616
w = hdaa_widget_get(devinfo, 32);
sys/dev/sound/pci/hda/hdaa_patches.c
617
if (w != NULL) {
sys/dev/sound/pci/hda/hdaa_patches.c
618
if ((w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa_patches.c
621
w = hdaa_widget_get(devinfo, 16);
sys/dev/sound/pci/hda/hdaa_patches.c
622
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
623
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
625
w = hdaa_widget_get(devinfo, 15);
sys/dev/sound/pci/hda/hdaa_patches.c
626
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
627
w->connsenable[1] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
637
w = hdaa_widget_get(devinfo, 26);
sys/dev/sound/pci/hda/hdaa_patches.c
638
if (w != NULL && w->type ==
sys/dev/sound/pci/hda/hdaa_patches.c
640
(w->wclass.pin.config &
sys/dev/sound/pci/hda/hdaa_patches.c
653
w = hdaa_widget_get(devinfo, 21);
sys/dev/sound/pci/hda/hdaa_patches.c
654
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
655
w->connsenable[3] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
657
w = hdaa_widget_get(devinfo, 31);
sys/dev/sound/pci/hda/hdaa_patches.c
658
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
659
w->enable = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
661
w = hdaa_widget_get(devinfo, 5);
sys/dev/sound/pci/hda/hdaa_patches.c
662
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
663
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
664
w = hdaa_widget_get(devinfo, 6);
sys/dev/sound/pci/hda/hdaa_patches.c
665
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
666
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
667
w = hdaa_widget_get(devinfo, 9);
sys/dev/sound/pci/hda/hdaa_patches.c
668
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
669
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
670
w = hdaa_widget_get(devinfo, 24);
sys/dev/sound/pci/hda/hdaa_patches.c
671
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
672
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
688
w = hdaa_widget_get(devinfo, 15);
sys/dev/sound/pci/hda/hdaa_patches.c
689
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
690
w->param.inamp_cap = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
702
w = hdaa_widget_get(devinfo, 20);
sys/dev/sound/pci/hda/hdaa_patches.c
703
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
704
w->connsenable[1] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
705
w = hdaa_widget_get(devinfo, 21);
sys/dev/sound/pci/hda/hdaa_patches.c
706
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
707
w->connsenable[1] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
708
w = hdaa_widget_get(devinfo, 22);
sys/dev/sound/pci/hda/hdaa_patches.c
709
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
710
w->connsenable[0] = 0;
sys/dev/sound/pci/hda/hdaa_patches.c
723
w = hdaa_widget_get(devinfo, 26);
sys/dev/sound/pci/hda/hdaa_patches.c
724
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
725
w->param.inamp_cap =
sys/dev/sound/pci/hda/hdaa_patches.c
729
w = hdaa_widget_get(devinfo, 30);
sys/dev/sound/pci/hda/hdaa_patches.c
730
if (w != NULL)
sys/dev/sound/pci/hda/hdaa_patches.c
731
w->param.inamp_cap =
sys/dev/sound/pcm/channel.h
181
#define CHN_FOREACH_SAFE(w, x, y, z) \
sys/dev/sound/pcm/channel.h
182
SLIST_FOREACH_MUTABLE(w, CHN_HEAD(x, z), CHN_LINK(z), y)
sys/dev/sound/pcm/channel.h
203
#define CHN_INSERT_AFTER_SAFE(w, x, y, z) do { \
sys/dev/sound/pcm/channel.h
205
CHN_FOREACH(t, w, z) { \
sys/dev/sound/pcm/channel.h
223
#define CHN_INSERT_SORT(w, x, y, z) do { \
sys/dev/sound/pcm/channel.h
226
if ((y)->unit w t->unit) \
sys/dev/sound/pcm/feeder_eq.c
149
intpcm64_t w; \
sys/dev/sound/pcm/feeder_eq.c
181
w = (intpcm64_t)v * treble->b0; \
sys/dev/sound/pcm/feeder_eq.c
182
w += (intpcm64_t)info->treble.i1[i] * treble->b1; \
sys/dev/sound/pcm/feeder_eq.c
183
w += (intpcm64_t)info->treble.i2[i] * treble->b2; \
sys/dev/sound/pcm/feeder_eq.c
184
w -= (intpcm64_t)info->treble.o1[i] * treble->a1; \
sys/dev/sound/pcm/feeder_eq.c
185
w -= (intpcm64_t)info->treble.o2[i] * treble->a2; \
sys/dev/sound/pcm/feeder_eq.c
189
w >>= FEEDEQ_COEFF_SHIFT; \
sys/dev/sound/pcm/feeder_eq.c
190
FEEDEQ_ERR_CLIP_CHECK(treble, w); \
sys/dev/sound/pcm/feeder_eq.c
191
v = FEEDEQ_CLAMP(w); \
sys/dev/sound/pcm/feeder_eq.c
194
w = (intpcm64_t)v * bass->b0; \
sys/dev/sound/pcm/feeder_eq.c
195
w += (intpcm64_t)info->bass.i1[i] * bass->b1; \
sys/dev/sound/pcm/feeder_eq.c
196
w += (intpcm64_t)info->bass.i2[i] * bass->b2; \
sys/dev/sound/pcm/feeder_eq.c
197
w -= (intpcm64_t)info->bass.o1[i] * bass->a1; \
sys/dev/sound/pcm/feeder_eq.c
198
w -= (intpcm64_t)info->bass.o2[i] * bass->a2; \
sys/dev/sound/pcm/feeder_eq.c
202
w >>= FEEDEQ_COEFF_SHIFT; \
sys/dev/sound/pcm/feeder_eq.c
203
FEEDEQ_ERR_CLIP_CHECK(bass, w); \
sys/dev/sound/pcm/feeder_eq.c
204
v = FEEDEQ_CLAMP(w); \
sys/dev/sound/pcm/feeder_rate.c
374
int32_t w;
sys/dev/sound/pcm/feeder_rate.c
377
w = x % y;
sys/dev/sound/pcm/feeder_rate.c
379
y = w;
sys/dev/virtual/virtio/net/if_vtnet.c
2662
uint32_t w;
sys/dev/virtual/virtio/net/if_vtnet.c
2674
w = sc->vtnet_vlan_shadow[i];
sys/dev/virtual/virtio/net/if_vtnet.c
2675
while ((bit = ffs(w) - 1) != -1) {
sys/dev/virtual/virtio/net/if_vtnet.c
2676
w &= ~(1 << bit);
sys/dev/virtual/virtio/net/if_vtnet.c
2677
tag = sizeof(w) * CHAR_BIT * i + bit;
sys/kern/kern_clock.c
779
int w;
sys/kern/kern_clock.c
781
w = (kpmap->upticks + 1) & 1;
sys/kern/kern_clock.c
782
getnanouptime(&kpmap->ts_uptime[w]);
sys/kern/kern_clock.c
783
getnanotime(&kpmap->ts_realtime[w]);
sys/kern/subr_unit.c
162
u_int x, y, z, w;
sys/kern/subr_unit.c
174
w = 0;
sys/kern/subr_unit.c
177
w++;
sys/kern/subr_unit.c
178
KASSERT (w == ub->busy,
sys/kern/subr_unit.c
180
ub->busy, w, line));
sys/kern/subr_unit.c
181
y += w;
sys/libiconv/iconv_ucs.c
413
size_t i, w = 0;
sys/libiconv/iconv_ucs.c
425
w = 1;
sys/libiconv/iconv_ucs.c
434
w = 2;
sys/libiconv/iconv_ucs.c
443
w = 3;
sys/libiconv/iconv_ucs.c
452
w = 4;
sys/libiconv/iconv_ucs.c
460
if (srclen < w)
sys/libiconv/iconv_ucs.c
466
for (i = 1 ; i < w ; i++) {
sys/libiconv/iconv_ucs.c
476
*utf8width = w;
sys/libiconv/iconv_ucs.c
484
size_t i, w;
sys/libiconv/iconv_ucs.c
490
w = 1;
sys/libiconv/iconv_ucs.c
493
w = 2;
sys/libiconv/iconv_ucs.c
496
w = 3;
sys/libiconv/iconv_ucs.c
499
w = 4;
sys/libiconv/iconv_ucs.c
505
if (dstlen < w)
sys/libiconv/iconv_ucs.c
512
for (i = w - 1 ; i >= 1 ; i--) {
sys/libiconv/iconv_ucs.c
519
*utf8width = w;
sys/net/altq/altq_red.c
167
int w, i;
sys/net/altq/altq_red.c
212
w = rp->red_weight;
sys/net/altq/altq_red.c
213
for (i = 0; w > 1; i++)
sys/net/altq/altq_red.c
214
w = w >> 1;
sys/net/altq/altq_red.c
216
w = 1 << rp->red_wshift;
sys/net/altq/altq_red.c
217
if (w != rp->red_weight) {
sys/net/altq/altq_red.c
219
rp->red_weight, w);
sys/net/altq/altq_red.c
220
rp->red_weight = w;
sys/net/altq/altq_red.c
540
struct wtab *w;
sys/net/altq/altq_red.c
543
SLIST_FOREACH(w, &wtab_list, w_link) {
sys/net/altq/altq_red.c
544
if (w->w_weight == weight) {
sys/net/altq/altq_red.c
545
w->w_refcount++;
sys/net/altq/altq_red.c
546
return (w);
sys/net/altq/altq_red.c
550
w = kmalloc(sizeof(*w), M_ALTQ, M_WAITOK | M_ZERO);
sys/net/altq/altq_red.c
551
w->w_weight = weight;
sys/net/altq/altq_red.c
552
w->w_refcount = 1;
sys/net/altq/altq_red.c
553
SLIST_INSERT_HEAD(&wtab_list, w, w_link);
sys/net/altq/altq_red.c
556
w->w_tab[0] = ((weight - 1) << FP_SHIFT) / weight;
sys/net/altq/altq_red.c
558
w->w_tab[i] = (w->w_tab[i-1] * w->w_tab[i-1]) >> FP_SHIFT;
sys/net/altq/altq_red.c
559
if (w->w_tab[i] == 0 && w->w_param_max == 0)
sys/net/altq/altq_red.c
560
w->w_param_max = 1 << i;
sys/net/altq/altq_red.c
563
return (w);
sys/net/altq/altq_red.c
567
wtab_destroy(struct wtab *w)
sys/net/altq/altq_red.c
569
if (--w->w_refcount > 0)
sys/net/altq/altq_red.c
572
SLIST_REMOVE(&wtab_list, w, wtab, w_link);
sys/net/altq/altq_red.c
573
kfree(w, M_ALTQ);
sys/net/altq/altq_red.c
579
pow_w(struct wtab *w, int n)
sys/net/altq/altq_red.c
584
if (n >= w->w_param_max)
sys/net/altq/altq_red.c
595
val = (val * w->w_tab[i]) >> FP_SHIFT;
sys/net/altq/altq_rio.c
161
int w, i;
sys/net/altq/altq_rio.c
191
w = rp->rio_weight;
sys/net/altq/altq_rio.c
192
for (i = 0; w > 1; i++)
sys/net/altq/altq_rio.c
193
w = w >> 1;
sys/net/altq/altq_rio.c
195
w = 1 << rp->rio_wshift;
sys/net/altq/altq_rio.c
196
if (w != rp->rio_weight) {
sys/net/altq/altq_rio.c
198
rp->rio_weight, w);
sys/net/altq/altq_rio.c
199
rp->rio_weight = w;
sys/net/gre/if_gre.c
816
u_short w;
sys/net/gre/if_gre.c
821
sum += u.w;
sys/net/pf/pf_table.c
1032
struct pfr_walktree *w = arg;
sys/net/pf/pf_table.c
1034
int flags = w->pfrw_flags;
sys/net/pf/pf_table.c
1036
switch (w->pfrw_op) {
sys/net/pf/pf_table.c
1045
SLIST_INSERT_HEAD(w->pfrw_workq, ke, pfrke_workq);
sys/net/pf/pf_table.c
1046
w->pfrw_cnt++;
sys/net/pf/pf_table.c
1049
if (w->pfrw_free-- > 0) {
sys/net/pf/pf_table.c
1053
if (copyout(&ad, w->pfrw_addr, sizeof(ad)))
sys/net/pf/pf_table.c
1055
w->pfrw_addr++;
sys/net/pf/pf_table.c
1059
if (w->pfrw_free-- > 0) {
sys/net/pf/pf_table.c
1078
if (COPYOUT(&as, w->pfrw_astats, sizeof(as), flags))
sys/net/pf/pf_table.c
1080
w->pfrw_astats++;
sys/net/pf/pf_table.c
1086
if (!w->pfrw_cnt--) {
sys/net/pf/pf_table.c
1087
w->pfrw_kentry = ke;
sys/net/pf/pf_table.c
1093
if (w->pfrw_dyn->pfid_acnt4++ > 0)
sys/net/pf/pf_table.c
1096
w->pfrw_dyn->pfid_addr4 = *SUNION2PF(
sys/net/pf/pf_table.c
1098
w->pfrw_dyn->pfid_mask4 = *SUNION2PF(
sys/net/pf/pf_table.c
1101
if (w->pfrw_dyn->pfid_acnt6++ > 0)
sys/net/pf/pf_table.c
1104
w->pfrw_dyn->pfid_addr6 = *SUNION2PF(
sys/net/pf/pf_table.c
1106
w->pfrw_dyn->pfid_mask6 = *SUNION2PF(
sys/net/pf/pf_table.c
2210
struct pfr_walktree w;
sys/net/pf/pf_table.c
2212
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
2213
w.pfrw_op = PFRW_POOL_GET;
sys/net/pf/pf_table.c
2214
w.pfrw_cnt = idx;
sys/net/pf/pf_table.c
2219
kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
sys/net/pf/pf_table.c
2220
return (w.pfrw_kentry);
sys/net/pf/pf_table.c
2224
kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
sys/net/pf/pf_table.c
2225
return (w.pfrw_kentry);
sys/net/pf/pf_table.c
2235
struct pfr_walktree w;
sys/net/pf/pf_table.c
2237
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
2238
w.pfrw_op = PFRW_DYNADDR_UPDATE;
sys/net/pf/pf_table.c
2239
w.pfrw_dyn = dyn;
sys/net/pf/pf_table.c
2245
kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
sys/net/pf/pf_table.c
2247
kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
sys/net/pf/pf_table.c
561
struct pfr_walktree w;
sys/net/pf/pf_table.c
575
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
576
w.pfrw_op = PFRW_GET_ADDRS;
sys/net/pf/pf_table.c
577
w.pfrw_addr = addr;
sys/net/pf/pf_table.c
578
w.pfrw_free = kt->pfrkt_cnt;
sys/net/pf/pf_table.c
579
w.pfrw_flags = flags;
sys/net/pf/pf_table.c
580
rv = kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
sys/net/pf/pf_table.c
582
rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
sys/net/pf/pf_table.c
586
if (w.pfrw_free) {
sys/net/pf/pf_table.c
588
w.pfrw_free);
sys/net/pf/pf_table.c
600
struct pfr_walktree w;
sys/net/pf/pf_table.c
617
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
618
w.pfrw_op = PFRW_GET_ASTATS;
sys/net/pf/pf_table.c
619
w.pfrw_astats = addr;
sys/net/pf/pf_table.c
620
w.pfrw_free = kt->pfrkt_cnt;
sys/net/pf/pf_table.c
621
w.pfrw_flags = flags;
sys/net/pf/pf_table.c
624
rv = kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
sys/net/pf/pf_table.c
626
rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
sys/net/pf/pf_table.c
636
if (w.pfrw_free) {
sys/net/pf/pf_table.c
638
w.pfrw_free);
sys/net/pf/pf_table.c
735
struct pfr_walktree w;
sys/net/pf/pf_table.c
738
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
739
w.pfrw_op = sweep ? PFRW_SWEEP : PFRW_ENQUEUE;
sys/net/pf/pf_table.c
740
w.pfrw_workq = workq;
sys/net/pf/pf_table.c
742
if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w))
sys/net/pf/pf_table.c
745
if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w))
sys/net/pf/pf_table.c
748
*naddr = w.pfrw_cnt;
sys/net/pf/pf_table.c
754
struct pfr_walktree w;
sys/net/pf/pf_table.c
756
bzero(&w, sizeof(w));
sys/net/pf/pf_table.c
757
w.pfrw_op = PFRW_MARK;
sys/net/pf/pf_table.c
758
if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w))
sys/net/pf/pf_table.c
760
if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w))
sys/net/radix.c
1077
const void *_mask, walktree_f_t *f, void *w)
sys/net/radix.c
1151
if (!(rn->rn_flags & RNF_ROOT) && (error = (*f)(rn, w)))
sys/net/radix.c
1167
walktree_f_t *f, void *w)
sys/net/radix.c
1202
if (!(rn->rn_flags & RNF_ROOT) && (error = (*f)(rn, w)))
sys/net/radix.c
1213
rn_walktree(struct radix_node_head *h, walktree_f_t *f, void *w)
sys/net/radix.c
1215
return rn_walktree_at(h, NULL, NULL, f, w);
sys/net/radix.h
143
(struct radix_node_head *head, walktree_f_t *f, void *w);
sys/net/radix.h
148
const void *mask, walktree_f_t *f, void *w);
sys/net/radix.h
182
const void *mask, walktree_f_t *f, void *w);
sys/net/rtsock.c
141
struct rttable_walkarg *w;
sys/net/rtsock.c
1495
resizewalkarg(struct walkarg *w, int len)
sys/net/rtsock.c
1502
if (w->w_tmem != NULL)
sys/net/rtsock.c
1503
kfree(w->w_tmem, M_RTABLE);
sys/net/rtsock.c
1504
w->w_tmem = newptr;
sys/net/rtsock.c
1505
w->w_tmemsize = len;
sys/net/rtsock.c
1541
sysctl_iflist(int af, struct walkarg *w)
sys/net/rtsock.c
1556
if (w->w_arg && w->w_arg != ifp->if_index)
sys/net/rtsock.c
1569
if (w->w_tmemsize < msglen && resizewalkarg(w, msglen) != 0) {
sys/net/rtsock.c
1573
rt_msg_buffer(RTM_IFINFO, &rtinfo, w->w_tmem, msglen);
sys/net/rtsock.c
1575
if (w->w_req != NULL && w->w_tmem != NULL) {
sys/net/rtsock.c
1576
struct if_msghdr *ifm = w->w_tmem;
sys/net/rtsock.c
1583
error = SYSCTL_OUT(w->w_req, ifm, msglen);
sys/net/rtsock.c
159
static int sysctl_iflist (int af, struct walkarg *w);
sys/net/rtsock.c
1621
if (w->w_tmemsize < msglen &&
sys/net/rtsock.c
1622
resizewalkarg(w, msglen) != 0) {
sys/net/rtsock.c
1628
rt_msg_buffer(RTM_NEWADDR, &rtinfo, w->w_tmem, msglen);
sys/net/rtsock.c
1629
if (w->w_req != NULL) {
sys/net/rtsock.c
1630
struct ifa_msghdr *ifam = w->w_tmem;
sys/net/rtsock.c
1637
error = SYSCTL_OUT(w->w_req, w->w_tmem, msglen);
sys/net/rtsock.c
1657
rttable_walkarg_create(struct rttable_walkarg *w, int op, int arg)
sys/net/rtsock.c
1663
memset(w, 0, sizeof(*w));
sys/net/rtsock.c
1664
w->w_op = op;
sys/net/rtsock.c
1665
w->w_arg = arg;
sys/net/rtsock.c
1675
w->w_bufsz = msglen * RTTABLE_DUMP_MSGCNT_MAX;
sys/net/rtsock.c
1676
w->w_buf = kmalloc(w->w_bufsz, M_TEMP, M_WAITOK | M_NULLOK);
sys/net/rtsock.c
1677
if (w->w_buf == NULL)
sys/net/rtsock.c
1683
rttable_walkarg_destroy(struct rttable_walkarg *w)
sys/net/rtsock.c
1685
kfree(w->w_buf, M_TEMP);
sys/net/rtsock.c
1710
struct rttable_walkarg *w = xw;
sys/net/rtsock.c
1721
w_bufleft = w->w_bufsz - w->w_buflen;
sys/net/rtsock.c
1745
if (total_msglen > w->w_bufsz) {
sys/net/rtsock.c
1767
KASSERT(msglen <= w->w_bufsz, ("msg too long %d", msglen));
sys/net/rtsock.c
1769
KASSERT(rtinfo.rti_dst->sa_len <= sizeof(w->w_key0),
sys/net/rtsock.c
1771
memset(&w->w_key0, 0, sizeof(w->w_key0));
sys/net/rtsock.c
1772
memcpy(&w->w_key0, rtinfo.rti_dst, rtinfo.rti_dst->sa_len);
sys/net/rtsock.c
1773
w->w_key = (const char *)&w->w_key0;
sys/net/rtsock.c
1777
rtinfo.rti_netmask->sa_len <= sizeof(w->w_mask0),
sys/net/rtsock.c
1779
memset(&w->w_mask0, 0, sizeof(w->w_mask0));
sys/net/rtsock.c
1780
memcpy(&w->w_mask0, rtinfo.rti_netmask,
sys/net/rtsock.c
1782
w->w_mask = (const char *)&w->w_mask0;
sys/net/rtsock.c
1784
w->w_mask = NULL;
sys/net/rtsock.c
1789
if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg))
sys/net/rtsock.c
1792
ptr = ((uint8_t *)w->w_buf) + w->w_buflen;
sys/net/rtsock.c
1803
w->w_buflen += msglen;
sys/net/rtsock.c
1813
struct rttable_walkarg *w = nmsg->w;
sys/net/rtsock.c
1816
error = rnh->rnh_walktree_at(rnh, w->w_key, w->w_mask,
sys/net/rtsock.c
1817
rttable_walk_entry, w);
sys/net/rtsock.c
1824
struct rttable_walkarg w;
sys/net/rtsock.c
1827
error = rttable_walkarg_create(&w, op, arg);
sys/net/rtsock.c
1834
w.w_key = NULL;
sys/net/rtsock.c
1835
w.w_mask = NULL;
sys/net/rtsock.c
1843
nmsg.w = &w;
sys/net/rtsock.c
1845
w.w_buflen = 0;
sys/net/rtsock.c
1852
if (req != NULL && w.w_buflen > 0) {
sys/net/rtsock.c
1855
error1 = SYSCTL_OUT(req, w.w_buf,
sys/net/rtsock.c
1856
w.w_buflen);
sys/net/rtsock.c
1868
rttable_walkarg_destroy(&w);
sys/net/rtsock.c
1880
struct walkarg w;
sys/net/rtsock.c
1889
bzero(&w, sizeof w);
sys/net/rtsock.c
1890
w.w_op = name[1];
sys/net/rtsock.c
1891
w.w_arg = name[2];
sys/net/rtsock.c
1892
w.w_req = req;
sys/net/rtsock.c
1912
switch (w.w_op) {
sys/net/rtsock.c
1915
error = sysctl_rttable(af, w.w_req, w.w_op, w.w_arg);
sys/net/rtsock.c
1918
error = sysctl_iflist(af, &w);
sys/net/rtsock.c
1921
if (w.w_tmem != NULL)
sys/net/rtsock.c
1922
kfree(w.w_tmem, M_RTABLE);
sys/net/zlib.c
1999
#define put_short(s, w) { \
sys/net/zlib.c
2000
put_byte(s, (uch)((w) & 0xff)); \
sys/net/zlib.c
2001
put_byte(s, (uch)((ush)(w) >> 8)); \
sys/net/zlib.c
3036
uInt w)); /* window size */
sys/net/zlib.c
3143
inflateInit2_(z_streamp z, int w, const char *version, int stream_size)
sys/net/zlib.c
3168
if (w < 0)
sys/net/zlib.c
3170
w = - w;
sys/net/zlib.c
3175
if (w < 8 || w > 15)
sys/net/zlib.c
3180
z->state->wbits = (uInt)w;
sys/net/zlib.c
3184
inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))
sys/net/zlib.c
3384
uLong r, w; /* temporaries to save total_in and total_out */
sys/net/zlib.c
3420
r = z->total_in; w = z->total_out;
sys/net/zlib.c
3422
z->total_in = r; z->total_out = w;
sys/net/zlib.c
3714
inflate_blocks_new(z_streamp z, check_func c, uInt w)
sys/net/zlib.c
3721
if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
sys/net/zlib.c
3726
s->end = s->window + w;
sys/net/zlib.c
4235
int w; /* bits before this table == (l * h) */
sys/net/zlib.c
4307
w = -l; /* bits decoded == (l * h) */
sys/net/zlib.c
4320
while (k > w + l)
sys/net/zlib.c
4323
w += l; /* previous table always l bits */
sys/net/zlib.c
4326
z = g - w;
sys/net/zlib.c
4328
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
sys/net/zlib.c
4364
j = i >> (w - l); /* (get around Turbo C bug) */
sys/net/zlib.c
4370
r.bits = (Byte)(k - w);
sys/net/zlib.c
4385
f = 1 << (k - w);
sys/net/zlib.c
4386
for (j = i >> w; j < z; j += f)
sys/net/zlib.c
4395
while ((i & ((1 << w) - 1)) != x[h])
sys/net/zlib.c
4398
w -= l;
sys/netinet6/in6_cksum.c
127
w = (u_int16_t *)&ip6->ip6_src;
sys/netinet6/in6_cksum.c
132
sum += w[0];
sys/netinet6/in6_cksum.c
134
sum += w[1];
sys/netinet6/in6_cksum.c
135
sum += w[2]; sum += w[3]; sum += w[4]; sum += w[5];
sys/netinet6/in6_cksum.c
136
sum += w[6]; sum += w[7];
sys/netinet6/in6_cksum.c
138
sum += w[8];
sys/netinet6/in6_cksum.c
140
sum += w[9];
sys/netinet6/in6_cksum.c
141
sum += w[10]; sum += w[11]; sum += w[12]; sum += w[13];
sys/netinet6/in6_cksum.c
142
sum += w[14]; sum += w[15];
sys/netinet6/in6_cksum.c
157
w = (u_int16_t *)(mtod(m, u_char *) + off);
sys/netinet6/in6_cksum.c
165
if ((1 & (long) w) && (mlen > 0)) {
sys/netinet6/in6_cksum.c
168
s_util.c[0] = *(u_char *)w;
sys/netinet6/in6_cksum.c
169
w = (u_int16_t *)((char *)w + 1);
sys/netinet6/in6_cksum.c
178
sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
sys/netinet6/in6_cksum.c
179
sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7];
sys/netinet6/in6_cksum.c
180
sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11];
sys/netinet6/in6_cksum.c
181
sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15];
sys/netinet6/in6_cksum.c
182
w += 16;
sys/netinet6/in6_cksum.c
186
sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
sys/netinet6/in6_cksum.c
187
w += 4;
sys/netinet6/in6_cksum.c
194
sum += *w++;
sys/netinet6/in6_cksum.c
201
s_util.c[1] = *(char *)w;
sys/netinet6/in6_cksum.c
207
s_util.c[0] = *(char *)w;
sys/netinet6/in6_cksum.c
218
w = mtod(m, u_int16_t *);
sys/netinet6/in6_cksum.c
228
s_util.c[1] = *(char *)w;
sys/netinet6/in6_cksum.c
230
w = (u_int16_t *)((char *)w + 1);
sys/netinet6/in6_cksum.c
241
if ((1 & (long) w) && (mlen > 0)) {
sys/netinet6/in6_cksum.c
244
s_util.c[0] = *(u_char *)w;
sys/netinet6/in6_cksum.c
245
w = (u_int16_t *)((char *)w + 1);
sys/netinet6/in6_cksum.c
254
sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
sys/netinet6/in6_cksum.c
255
sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7];
sys/netinet6/in6_cksum.c
256
sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11];
sys/netinet6/in6_cksum.c
257
sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15];
sys/netinet6/in6_cksum.c
258
w += 16;
sys/netinet6/in6_cksum.c
262
sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
sys/netinet6/in6_cksum.c
263
w += 4;
sys/netinet6/in6_cksum.c
270
sum += *w++;
sys/netinet6/in6_cksum.c
277
s_util.c[1] = *(char *)w;
sys/netinet6/in6_cksum.c
283
s_util.c[0] = *(char *)w;
sys/netinet6/in6_cksum.c
93
u_int16_t *w;
sys/netinet6/in6_src.c
671
struct walkarg w;
sys/netinet6/in6_src.c
676
bzero(&w, sizeof(w));
sys/netinet6/in6_src.c
677
w.w_req = req;
sys/netinet6/in6_src.c
679
return (walk_addrsel_policy(dump_addrsel_policyent, &w));
sys/netinet6/in6_src.c
786
walk_addrsel_policy(int(*callback)(struct in6_addrpolicy *, void *), void *w)
sys/netinet6/in6_src.c
793
if ((error = (*callback)(&pol->ape_policy, w)) != 0)
sys/netinet6/in6_src.c
804
struct walkarg *w = arg;
sys/netinet6/in6_src.c
806
error = SYSCTL_OUT(w->w_req, pol, sizeof(*pol));
sys/netproto/802_11/wlan/ieee80211_hostap.c
1180
uint32_t w = le32dec(sel);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1182
switch (w) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1210
uint32_t w = le32dec(sel);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1212
switch (w) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1235
uint32_t w;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1257
w = le16dec(frm);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1258
if (w != WPA_VERSION) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1261
wh, "WPA", "bad version %u", w);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1282
w = 0;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1284
w |= 1<<wpa_cipher(frm, &rsn->rsn_ucastkeylen);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1287
if (w & (1<<IEEE80211_CIPHER_TKIP))
sys/netproto/802_11/wlan/ieee80211_hostap.c
1302
w = 0;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1304
w |= wpa_keymgmt(frm);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1307
if (w & WPA_ASE_8021X_UNSPEC)
sys/netproto/802_11/wlan/ieee80211_hostap.c
1327
uint32_t w = le32dec(sel);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1329
switch (w) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1359
uint32_t w = le32dec(sel);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1361
switch (w) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1383
uint32_t w;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1404
w = le16dec(frm);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1405
if (w != RSN_VERSION) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
1408
wh, "RSN", "bad version %u", w);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1429
w = 0;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1431
w |= 1<<rsn_cipher(frm, &rsn->rsn_ucastkeylen);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1434
if (w & (1<<IEEE80211_CIPHER_TKIP))
sys/netproto/802_11/wlan/ieee80211_hostap.c
1449
w = 0;
sys/netproto/802_11/wlan/ieee80211_hostap.c
1451
w |= rsn_keymgmt(frm);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1454
if (w & RSN_ASE_8021X_UNSPEC)
sys/netproto/802_11/wlan/ieee80211_ht.c
1441
uint16_t w;
sys/netproto/802_11/wlan/ieee80211_ht.c
1445
w = le16dec(&htinfo->hi_byte2);
sys/netproto/802_11/wlan/ieee80211_ht.c
1446
ni->ni_htopmode = SM(w, IEEE80211_HTINFO_OPMODE);
sys/netproto/802_11/wlan/ieee80211_ht.c
1447
w = le16dec(&htinfo->hi_byte45);
sys/netproto/802_11/wlan/ieee80211_ht.c
1448
ni->ni_htstbc = SM(w, IEEE80211_HTINFO_BASIC_STBCMCS);
sys/sys/devfs.h
451
int devfs_WildCmp(const char *w, const char *s);
sys/sys/devfs.h
452
int devfs_WildCaseCmp(const char *w, const char *s);
sys/vfs/devfs/devfs_core.c
2814
wildCmp(const char **mary, int d, const char *w, const char *s)
sys/vfs/devfs/devfs_core.c
2822
switch(*w) {
sys/vfs/devfs/devfs_core.c
2827
if (w[1] == 0)
sys/vfs/devfs/devfs_core.c
2829
if (w[1] != '?' && w[1] != '*') {
sys/vfs/devfs/devfs_core.c
2834
if (s[i] == w[1] && wildCmp(mary, d + 1, w + 1, s + i) == 0)
sys/vfs/devfs/devfs_core.c
2842
if (wildCmp(mary, d + 1, w + 1, s + i) == 0)
sys/vfs/devfs/devfs_core.c
2851
++w;
sys/vfs/devfs/devfs_core.c
2855
if (*w != *s)
sys/vfs/devfs/devfs_core.c
2857
if (*w == 0) /* terminator */
sys/vfs/devfs/devfs_core.c
2859
++w;
sys/vfs/devfs/devfs_core.c
2875
wildCaseCmp(const char **mary, int d, const char *w, const char *s)
sys/vfs/devfs/devfs_core.c
2883
switch(*w) {
sys/vfs/devfs/devfs_core.c
2888
if (w[1] == 0)
sys/vfs/devfs/devfs_core.c
2890
if (w[1] != '?' && w[1] != '*') {
sys/vfs/devfs/devfs_core.c
2895
if (s[i] == w[1] && wildCaseCmp(mary, d + 1, w + 1, s + i) == 0)
sys/vfs/devfs/devfs_core.c
2903
if (wildCaseCmp(mary, d + 1, w + 1, s + i) == 0)
sys/vfs/devfs/devfs_core.c
2912
++w;
sys/vfs/devfs/devfs_core.c
2916
if (*w != *s) {
sys/vfs/devfs/devfs_core.c
2918
if (tolower(*w) != tolower(*s))
sys/vfs/devfs/devfs_core.c
2921
if (*w == 0) /* terminator */
sys/vfs/devfs/devfs_core.c
2923
++w;
sys/vfs/devfs/devfs_core.c
3008
devfs_WildCmp(const char *w, const char *s)
sys/vfs/devfs/devfs_core.c
3015
for (i = c = 0; w[i]; ++i) {
sys/vfs/devfs/devfs_core.c
3016
if (w[i] == '*')
sys/vfs/devfs/devfs_core.c
3022
i = wildCmp(mary, 0, w, s);
sys/vfs/devfs/devfs_core.c
3028
devfs_WildCaseCmp(const char *w, const char *s)
sys/vfs/devfs/devfs_core.c
3035
for (i = c = 0; w[i]; ++i) {
sys/vfs/devfs/devfs_core.c
3036
if (w[i] == '*')
sys/vfs/devfs/devfs_core.c
3042
i = wildCaseCmp(mary, 0, w, s);
sys/vfs/hammer/hammer_recover.c
1394
hammer_recover_debug_dump(int w, char *buf, int bytes)
sys/vfs/hammer/hammer_recover.c
1400
kprintf("\n%*.*s", w, w, "");
sys/vfs/hammer/hammer_recover.c
175
static void hammer_recover_debug_dump(int w, char *buf, int bytes);
sys/vfs/hammer2/zlib/hammer2_zlib_trees.c
176
#define put_short(s, w) { \
sys/vfs/hammer2/zlib/hammer2_zlib_trees.c
177
put_byte(s, (uch)((w) & 0xff)); \
sys/vfs/hammer2/zlib/hammer2_zlib_trees.c
178
put_byte(s, (uch)((ush)(w) >> 8)); \
tools/regression/lib/libc-regex/testregex.c
580
int w;
tools/regression/lib/libc-regex/testregex.c
633
if ((w = mblen(s, (char*)e - s)) > 1)
tools/regression/lib/libc-regex/testregex.c
635
u += w - 1;
tools/regression/lib/libc-regex/testregex.c
636
fwrite(s, 1, w, stdout);
tools/tools/ath/athstats/statfoo.c
160
int i, w, width;
tools/tools/ath/athstats/statfoo.c
164
w = strlen(sf->stats[i].name);
tools/tools/ath/athstats/statfoo.c
165
if (w > width)
tools/tools/ath/athstats/statfoo.c
166
width = w;
tools/tools/net80211/stumbler/stumbler.c
120
char* wep2str(int w) {
tools/tools/net80211/stumbler/stumbler.c
124
switch (w) {
tools/tools/net80211/w00t/assoc/assoc.c
196
struct ieee80211_frame w;
tools/tools/net80211/w00t/assoc/assoc.c
205
wh = (struct ieee80211_frame*) &u.w;
tools/tools/net80211/wlaninject/wlaninject.c
533
struct ieee80211_frame w;
tools/tools/net80211/wlaninject/wlaninject.c
539
struct ieee80211_frame *wh = &u.w;
tools/tools/net80211/wlanstats/statfoo.c
169
int i, w, width;
tools/tools/net80211/wlanstats/statfoo.c
173
w = strlen(sf->stats[i].name);
tools/tools/net80211/wlanstats/statfoo.c
174
if (w > width)
tools/tools/net80211/wlanstats/statfoo.c
175
width = w;
usr.bin/calendar/moon.c
163
sum_c += arg1->v * pow(E, arg1->w) * sin_deg(
usr.bin/calendar/moon.c
251
int w;
usr.bin/calendar/moon.c
339
arg->w * D +
usr.bin/calendar/moon.c
360
int w;
usr.bin/calendar/moon.c
449
arg->w * D +
usr.bin/calendar/moon.c
472
int w;
usr.bin/calendar/moon.c
559
arg->w * D +
usr.bin/calendar/moon.c
68
int w;
usr.bin/colcrt/colcrt.c
149
if ((w = wcwidth(c)) <= 0)
usr.bin/colcrt/colcrt.c
150
w = 1; /* XXX */
usr.bin/colcrt/colcrt.c
151
if (outcol + w > 132) {
usr.bin/colcrt/colcrt.c
152
outcol += w;
usr.bin/colcrt/colcrt.c
156
outcol += w;
usr.bin/colcrt/colcrt.c
164
for (i = 0; i < w; i++)
usr.bin/colcrt/colcrt.c
166
dp = cp - (outcol - w);
usr.bin/colcrt/colcrt.c
173
for (i = 1; i < w; i++)
usr.bin/colcrt/colcrt.c
177
for (i = 0; i < w; i++)
usr.bin/colcrt/colcrt.c
213
int l, w;
usr.bin/colcrt/colcrt.c
233
if ((w = wcwidth(*cp)) > 0) {
usr.bin/colcrt/colcrt.c
235
cp += w;
usr.bin/colcrt/colcrt.c
74
int ch, i, w;
usr.bin/column/column.c
309
int w, cw;
usr.bin/column/column.c
311
for (w = 0; *wcs != L'\0'; wcs++)
usr.bin/column/column.c
313
w += cw;
usr.bin/column/column.c
314
return (w);
usr.bin/compress/zopen.c
127
} w; /* Write paramenters */
usr.bin/compress/zopen.c
159
#define fcode zs->u.w.zs_fcode
usr.bin/compress/zopen.c
160
#define hsize_reg zs->u.w.zs_hsize_reg
usr.bin/compress/zopen.c
161
#define ent zs->u.w.zs_ent
usr.bin/compress/zopen.c
162
#define hshift zs->u.w.zs_hshift
usr.bin/diff/diffreg.c
797
struct line *ai, *aim, w;
usr.bin/diff/diffreg.c
815
w.value = ai[0].value;
usr.bin/diff/diffreg.c
817
aim->value = w.value;
usr.bin/diff/diffreg.c
818
w.serial = ai[0].serial;
usr.bin/diff/diffreg.c
820
aim->serial = w.serial;
usr.bin/dsynth/ncurses.c
201
int w;
usr.bin/dsynth/ncurses.c
217
w = COLS;
usr.bin/dsynth/ncurses.c
219
w = n;
usr.bin/dsynth/ncurses.c
220
c = ptr[w];
usr.bin/dsynth/ncurses.c
221
ptr[w] = 0;
usr.bin/dsynth/ncurses.c
240
ptr[w] = c;
usr.bin/evtranalyze/evtranalyze.c
542
double x, w, y, height;
usr.bin/evtranalyze/evtranalyze.c
543
w = (ev->ts - c->ts) * ctx->xscale;
usr.bin/evtranalyze/evtranalyze.c
546
svg_rect_draw(ctx->svg, ctx->thread_rect, x - w,
usr.bin/evtranalyze/evtranalyze.c
547
y + ctx->thread_rows_yoff, w, height);
usr.bin/evtranalyze/evtranalyze.c
556
double x, w, fs, y, height;
usr.bin/evtranalyze/evtranalyze.c
563
w = (ev->ts - c->ts) * ctx->xscale;
usr.bin/evtranalyze/evtranalyze.c
565
if ((x - w) < 0) {
usr.bin/evtranalyze/evtranalyze.c
576
svg_rect_draw(ctx->svg, ctx->cpu_sw_rect, x - w, y, w, height);
usr.bin/evtranalyze/evtranalyze.c
582
textrot.tx = x - w;
usr.bin/evtranalyze/evtranalyze.c
597
fs = fontsize_for_rect(height, w, textlen);
usr.bin/evtranalyze/svg.c
138
xml_attribute_init(&rect->w, "width", NULL);
usr.bin/evtranalyze/svg.c
139
xml_elem_set_attribute(&rect->el, &rect->w);
usr.bin/evtranalyze/svg.c
167
double y, double w, double h)
usr.bin/evtranalyze/svg.c
173
snprintf(&rect->w_val[0], sizeof(rect->w_val), "%.20lf", w);
usr.bin/evtranalyze/svg.c
174
xml_attribute_set_value(&rect->w, &rect->w_val[0]);
usr.bin/evtranalyze/svg.c
47
struct xml_attribute x, y, w, h, cl;
usr.bin/finger/lprint.c
164
for (w = pn->whead, maxlen = -1; w != NULL; w = w->next)
usr.bin/finger/lprint.c
165
if ((len = strlen(w->tty)) > maxlen)
usr.bin/finger/lprint.c
168
for (w = pn->whead; w != NULL; w = w->next) {
usr.bin/finger/lprint.c
169
if (w->info == LOGGEDIN) {
usr.bin/finger/lprint.c
170
tp = localtime(&w->loginat);
usr.bin/finger/lprint.c
174
cpr = printf("On since %s on %s", t, w->tty);
usr.bin/finger/lprint.c
180
delta = gmtime(&w->idletime);
usr.bin/finger/lprint.c
183
maxlen - (int)strlen(w->tty) + 1, ",");
usr.bin/finger/lprint.c
191
if (*w->host) {
usr.bin/finger/lprint.c
196
if (!w->writable)
usr.bin/finger/lprint.c
198
} else if (w->loginat == 0) {
usr.bin/finger/lprint.c
201
tp = localtime(&w->loginat);
usr.bin/finger/lprint.c
202
if (now - w->loginat > 86400 * 365 / 2) {
usr.bin/finger/lprint.c
213
cpr = printf("Last login %s on %s", t, w->tty);
usr.bin/finger/lprint.c
215
if (*w->host) {
usr.bin/finger/lprint.c
216
if (LINE_LEN < (cpr + 6 + strlen(w->host)))
usr.bin/finger/lprint.c
218
(void)printf(" from %s", w->host);
usr.bin/finger/lprint.c
96
WHERE *w;
usr.bin/finger/sprint.c
101
if (!w->loginat) {
usr.bin/finger/sprint.c
105
(void)putchar(w->info == LOGGEDIN && !w->writable ?
usr.bin/finger/sprint.c
107
if (*w->tty)
usr.bin/finger/sprint.c
109
(strncmp(w->tty, "tty", 3)
usr.bin/finger/sprint.c
110
&& strncmp(w->tty, "cua", 3))
usr.bin/finger/sprint.c
111
? w->tty : w->tty + 3);
usr.bin/finger/sprint.c
114
if (w->info == LOGGEDIN) {
usr.bin/finger/sprint.c
115
stimeprint(w);
usr.bin/finger/sprint.c
119
lc = localtime(&w->loginat);
usr.bin/finger/sprint.c
123
if (now - w->loginat < SECSPERDAY * (DAYSPERWEEK - 1)) {
usr.bin/finger/sprint.c
130
if (now - w->loginat >= SECSPERDAY * DAYSPERNYEAR / 2) {
usr.bin/finger/sprint.c
148
(void)printf(" %.*s", MAXHOSTNAME, w->host);
usr.bin/finger/sprint.c
156
stimeprint(WHERE *w)
usr.bin/finger/sprint.c
160
delta = gmtime(&w->idletime);
usr.bin/finger/sprint.c
53
WHERE *w;
usr.bin/finger/sprint.c
94
for (w = pn->whead; w != NULL; w = w->next) {
usr.bin/finger/sprint.c
96
if (w->info == LOGGEDIN && !w->writable)
usr.bin/finger/util.c
102
WHERE *w;
usr.bin/finger/util.c
108
if ((w = pn->whead) == NULL)
usr.bin/finger/util.c
112
for (; !doit && w != NULL; w = w->next)
usr.bin/finger/util.c
113
if (w->info == LOGGEDIN &&
usr.bin/finger/util.c
114
w->loginat < ll.ll_tv.tv_sec)
usr.bin/finger/util.c
121
for (w = pn->whead; doit && w != NULL; w = w->next)
usr.bin/finger/util.c
122
if (w->info == LOGGEDIN &&
usr.bin/finger/util.c
123
strcmp(w->tty, ll.ll_line) == 0)
usr.bin/finger/util.c
127
w = walloc(pn);
usr.bin/finger/util.c
128
w->info = LASTLOG;
usr.bin/finger/util.c
129
strlcpy(w->tty, ll.ll_line, sizeof(w->tty));
usr.bin/finger/util.c
130
strlcpy(w->host, ll.ll_host, sizeof(w->host));
usr.bin/finger/util.c
131
w->host[_UTX_HOSTSIZE] = '\0';
usr.bin/finger/util.c
132
w->loginat = ll.ll_tv.tv_sec;
usr.bin/finger/util.c
139
WHERE *w;
usr.bin/finger/util.c
141
w = walloc(pn);
usr.bin/finger/util.c
142
w->info = LOGGEDIN;
usr.bin/finger/util.c
143
strlcpy(w->tty, ep->line, sizeof(w->tty));
usr.bin/finger/util.c
144
strlcpy(w->host, ep->host, sizeof(w->host));
usr.bin/finger/util.c
145
w->loginat = (time_t)ep->tv.tv_sec;
usr.bin/finger/util.c
146
find_idle_and_ttywrite(w);
usr.bin/finger/util.c
220
WHERE *w;
usr.bin/finger/util.c
222
if ((w = malloc(sizeof(WHERE))) == NULL)
usr.bin/finger/util.c
224
bzero(w, sizeof(WHERE));
usr.bin/finger/util.c
226
pn->whead = pn->wtail = w;
usr.bin/finger/util.c
228
pn->wtail->next = w;
usr.bin/finger/util.c
229
pn->wtail = w;
usr.bin/finger/util.c
231
w->next = NULL;
usr.bin/finger/util.c
232
return(w);
usr.bin/finger/util.c
285
find_idle_and_ttywrite(WHERE *w)
usr.bin/finger/util.c
290
(void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_DEV, w->tty);
usr.bin/finger/util.c
296
if (touched < w->loginat) {
usr.bin/finger/util.c
298
touched = w->loginat;
usr.bin/finger/util.c
300
w->idletime = now < touched ? 0 : now - touched;
usr.bin/finger/util.c
303
w->writable = ((sb.st_mode & TALKABLE) == TALKABLE);
usr.bin/fold/fold.c
200
int w;
usr.bin/fold/fold.c
218
if ((w = wcwidth(ch)) > 0)
usr.bin/fold/fold.c
219
col += w;
usr.bin/gzip/gzip.c
1552
ssize_t w;
usr.bin/gzip/gzip.c
1555
w = write(STDOUT_FILENO, prepend, count);
usr.bin/gzip/gzip.c
1556
if (w == -1 || (size_t)w != count) {
usr.bin/gzip/gzip.c
613
ssize_t w;
usr.bin/gzip/gzip.c
624
w = write(out, outbufp, len);
usr.bin/gzip/gzip.c
625
if (w == -1 || (size_t)w != len) {
usr.bin/gzip/zuncompress.c
117
} w; /* Write paramenters */
usr.bin/indent/io.c
233
int w;
usr.bin/indent/io.c
236
if ((w = count_spaces(t, s_code) - opt.max_col) > 0
usr.bin/indent/io.c
238
t -= w + 1;
usr.bin/localedef/collate.c
1026
weight_t *w;
usr.bin/localedef/collate.c
1041
if ((w = calloc(1, sizeof (*w))) == NULL) {
usr.bin/localedef/collate.c
1045
w->pri = srch.pri;
usr.bin/localedef/collate.c
1046
RB_INSERT(weights, &weights[pass], w);
usr.bin/localedef/collate.c
1062
weight_t *w;
usr.bin/localedef/collate.c
1073
if ((w = RB_FIND(weights, &weights[pass], &srch)) == NULL) {
usr.bin/localedef/collate.c
1077
return (w->opt);
usr.bin/localedef/collate.c
1152
weight_t *w;
usr.bin/localedef/collate.c
1153
RB_FOREACH(w, weights, &weights[i]) {
usr.bin/localedef/collate.c
1154
w->opt = nweight[i];
usr.bin/localedef/parser.y
198
wchar_t *w = get_wcs();
usr.bin/localedef/parser.y
199
set_wide_encoding(to_mb_string(w));
usr.bin/localedef/parser.y
200
free(w);
usr.bin/localedef/parser.y
214
wchar_t *w = get_wcs();
usr.bin/localedef/parser.y
215
copy_category(to_mb_string(w));
usr.bin/localedef/parser.y
216
free(w);
usr.bin/mail/send.c
498
puthead(struct header *hp, FILE *fo, int w)
usr.bin/mail/send.c
503
if (hp->h_to != NULL && w & GTO)
usr.bin/mail/send.c
504
fmt("To:", hp->h_to, fo, w&GCOMMA), gotcha++;
usr.bin/mail/send.c
505
if (hp->h_subject != NULL && w & GSUBJECT)
usr.bin/mail/send.c
507
if (hp->h_cc != NULL && w & GCC)
usr.bin/mail/send.c
508
fmt("Cc:", hp->h_cc, fo, w&GCOMMA), gotcha++;
usr.bin/mail/send.c
509
if (hp->h_bcc != NULL && w & GBCC)
usr.bin/mail/send.c
510
fmt("Bcc:", hp->h_bcc, fo, w&GCOMMA), gotcha++;
usr.bin/mail/send.c
511
if (hp->h_replyto != NULL && w & GREPLYTO)
usr.bin/mail/send.c
513
if (hp->h_inreplyto != NULL && w & GINREPLYTO)
usr.bin/mail/send.c
515
if (gotcha && w & GNL)
usr.bin/ncal/ncal.c
1061
center(char *s, char *t, int w)
usr.bin/ncal/ncal.c
1066
sprintf(s, "%.*s%s", (int)(w - strlen(t)) / 2, blanks, t);
usr.bin/ncal/ncal.c
1072
wcenter(wchar_t *s, wchar_t *t, int w)
usr.bin/ncal/ncal.c
1077
swprintf(s, MAX_WIDTH, L"%.*s%ls", (int)(w - wcslen(t)) / 2, blanks, t);
usr.bin/ncal/ncal.c
166
static char *center(char *s, char *t, int w);
usr.bin/ncal/ncal.c
167
static wchar_t *wcenter(wchar_t *s, wchar_t *t, int w);
usr.bin/rwho/rwho.c
116
if (down(w,now)) {
usr.bin/rwho/rwho.c
121
we = w->wd_we;
usr.bin/rwho/rwho.c
130
strcpy(mp->myhost, w->wd_hostname);
usr.bin/rwho/rwho.c
63
#define down(w,now) ((now) - (w)->wd_recvtime > 11 * 60)
usr.bin/rwho/rwho.c
72
struct whod *w = &wd;
usr.bin/systat/altqs.c
161
closealtqs(WINDOW *w)
usr.bin/systat/altqs.c
183
if (w != NULL) {
usr.bin/systat/altqs.c
184
wclear(w);
usr.bin/systat/altqs.c
185
wrefresh(w);
usr.bin/systat/altqs.c
186
delwin(w);
usr.bin/systat/icmp.c
87
closeicmp(WINDOW *w)
usr.bin/systat/icmp.c
89
if (w == NULL)
usr.bin/systat/icmp.c
91
wclear(w);
usr.bin/systat/icmp.c
92
wrefresh(w);
usr.bin/systat/icmp.c
93
delwin(w);
usr.bin/systat/icmp6.c
84
closeicmp6(WINDOW *w)
usr.bin/systat/icmp6.c
86
if (w == NULL)
usr.bin/systat/icmp6.c
88
wclear(w);
usr.bin/systat/icmp6.c
89
wrefresh(w);
usr.bin/systat/icmp6.c
90
delwin(w);
usr.bin/systat/ifstat.c
183
closeifstat(WINDOW *w)
usr.bin/systat/ifstat.c
193
if (w != NULL) {
usr.bin/systat/ifstat.c
194
wclear(w);
usr.bin/systat/ifstat.c
195
wrefresh(w);
usr.bin/systat/ifstat.c
196
delwin(w);
usr.bin/systat/iostat.c
91
closeiostat(WINDOW *w)
usr.bin/systat/iostat.c
93
if (w == NULL)
usr.bin/systat/iostat.c
95
wclear(w);
usr.bin/systat/iostat.c
96
wrefresh(w);
usr.bin/systat/iostat.c
97
delwin(w);
usr.bin/systat/ip.c
93
closeip(WINDOW *w)
usr.bin/systat/ip.c
95
if (w == NULL)
usr.bin/systat/ip.c
97
wclear(w);
usr.bin/systat/ip.c
98
wrefresh(w);
usr.bin/systat/ip.c
99
delwin(w);
usr.bin/systat/ip6.c
88
closeip6(WINDOW *w)
usr.bin/systat/ip6.c
90
if (w == NULL)
usr.bin/systat/ip6.c
92
wclear(w);
usr.bin/systat/ip6.c
93
wrefresh(w);
usr.bin/systat/ip6.c
94
delwin(w);
usr.bin/systat/mbufs.c
70
closembufs(WINDOW *w)
usr.bin/systat/mbufs.c
72
if (w == NULL)
usr.bin/systat/mbufs.c
74
wclear(w);
usr.bin/systat/mbufs.c
75
wrefresh(w);
usr.bin/systat/mbufs.c
76
delwin(w);
usr.bin/systat/netbw.c
190
closenetbw(WINDOW *w)
usr.bin/systat/netbw.c
199
if (w != NULL) {
usr.bin/systat/netbw.c
200
wclear(w);
usr.bin/systat/netbw.c
201
wrefresh(w);
usr.bin/systat/netbw.c
202
delwin(w);
usr.bin/systat/netstat.c
117
closenetstat(WINDOW *w)
usr.bin/systat/netstat.c
130
if (w != NULL) {
usr.bin/systat/netstat.c
131
wclear(w);
usr.bin/systat/netstat.c
132
wrefresh(w);
usr.bin/systat/netstat.c
133
delwin(w);
usr.bin/systat/netstat.c
81
#define YMAX(w) ((w)->_maxy-1)
usr.bin/systat/pftop.c
210
closepftop(WINDOW *w)
usr.bin/systat/pftop.c
219
if (w != NULL) {
usr.bin/systat/pftop.c
220
wclear(w);
usr.bin/systat/pftop.c
221
wrefresh(w);
usr.bin/systat/pftop.c
222
delwin(w);
usr.bin/systat/pigs.c
70
closepigs(WINDOW *w)
usr.bin/systat/pigs.c
72
if (w == NULL)
usr.bin/systat/pigs.c
74
wclear(w);
usr.bin/systat/pigs.c
75
wrefresh(w);
usr.bin/systat/pigs.c
76
delwin(w);
usr.bin/systat/sensors.c
64
closesensors(WINDOW *w)
usr.bin/systat/sensors.c
66
if (w == NULL)
usr.bin/systat/sensors.c
68
wclear(w);
usr.bin/systat/sensors.c
69
wrefresh(w);
usr.bin/systat/sensors.c
70
delwin(w);
usr.bin/systat/swap.c
65
closeswap(WINDOW *w)
usr.bin/systat/swap.c
67
if (w == NULL)
usr.bin/systat/swap.c
69
wclear(w);
usr.bin/systat/swap.c
70
wrefresh(w);
usr.bin/systat/swap.c
71
delwin(w);
usr.bin/systat/tcp.c
90
closetcp(WINDOW *w)
usr.bin/systat/tcp.c
92
if (w == NULL)
usr.bin/systat/tcp.c
94
wclear(w);
usr.bin/systat/tcp.c
95
wrefresh(w);
usr.bin/systat/tcp.c
96
delwin(w);
usr.bin/systat/vmmeter.c
24
#define DRAW_ROW(n, y, w, fmt, args...) \
usr.bin/systat/vmmeter.c
26
mvprintw(y, n, fmt, w - 1, args); \
usr.bin/systat/vmmeter.c
27
n += w; \
usr.bin/systat/vmmeter.c
30
#define DRAW_ROW2(n, y, w, fmt, args...) \
usr.bin/systat/vmmeter.c
312
closevmm(WINDOW *w)
usr.bin/systat/vmmeter.c
32
mvprintw(y, n, fmt, w - 1, w - 1, args);\
usr.bin/systat/vmmeter.c
326
if (w == NULL)
usr.bin/systat/vmmeter.c
328
wclear(w);
usr.bin/systat/vmmeter.c
329
wrefresh(w);
usr.bin/systat/vmmeter.c
33
n += w; \
usr.bin/systat/vmmeter.c
36
#define DRAW_ROWX(n, y, w, fmt, args...) \
usr.bin/systat/vmmeter.c
39
n += w; \
usr.bin/systat/vmstat.c
132
closekre(WINDOW *w)
usr.bin/systat/vmstat.c
135
if (w == NULL)
usr.bin/systat/vmstat.c
137
wclear(w);
usr.bin/systat/vmstat.c
138
wrefresh(w);
usr.bin/systat/vmstat.c
426
#define PUTRATE(fld, l, c, w) \
usr.bin/systat/vmstat.c
428
put64((int64_t)((float)s.fld/etime + 0.5), l, c, w, 'D')
usr.bin/systat/vmstat.c
429
#define PUTRATE_PGTOB(fld, l, c, w) \
usr.bin/systat/vmstat.c
431
put64((int64_t)((float)s.fld/etime + 0.5) * PAGE_SIZE, l, c, w, 0)
usr.bin/systat/vmstat.c
734
put64(intmax_t n, int l, int lc, int w, int type)
usr.bin/systat/vmstat.c
744
while (w-- > 0)
usr.bin/systat/vmstat.c
749
snprintf(b, sizeof(b), "%*jd", w, n);
usr.bin/systat/vmstat.c
751
snprintf(b, sizeof(b), "%*jd%c", w - 1, n, type);
usr.bin/systat/vmstat.c
752
if (strlen(b) <= (size_t)w) {
usr.bin/systat/vmstat.c
792
i = w - isneg;
usr.bin/systat/vmstat.c
812
w -= strlen(b + 64);
usr.bin/systat/vmstat.c
816
--w;
usr.bin/systat/vmstat.c
818
while (w > 0) {
usr.bin/systat/vmstat.c
819
--w;
usr.bin/systat/vmstat.c
826
putfloat(double f, int l, int lc, int w, int d, int nz)
usr.bin/systat/vmstat.c
832
while (--w >= 0)
usr.bin/systat/vmstat.c
836
snprintf(b, sizeof(b), "%*.*f", w, d, f);
usr.bin/systat/vmstat.c
837
if (strlen(b) > (size_t)w)
usr.bin/systat/vmstat.c
838
snprintf(b, sizeof(b), "%*.0f", w, f);
usr.bin/systat/vmstat.c
839
if (strlen(b) > (size_t)w) {
usr.bin/systat/vmstat.c
840
while (--w >= 0)
usr.bin/systat/vmstat.c
848
putlongdouble(long double f, int l, int lc, int w, int d, int nz)
usr.bin/systat/vmstat.c
854
while (--w >= 0)
usr.bin/systat/vmstat.c
858
sprintf(b, "%*.*Lf", w, d, f);
usr.bin/systat/vmstat.c
859
if (strlen(b) > (size_t)w)
usr.bin/systat/vmstat.c
860
sprintf(b, "%*.0Lf", w, f);
usr.bin/systat/vmstat.c
861
if (strlen(b) > (size_t)w) {
usr.bin/systat/vmstat.c
862
while (--w >= 0)
usr.bin/systat/vmstat.c
870
putlongdoublez(long double f, int l, int lc, int w, int d, int nz)
usr.bin/systat/vmstat.c
876
sprintf(b, "%*.*s", w, w, "");
usr.bin/systat/vmstat.c
879
putlongdouble(f, l, lc, w, d, nz);
usr.bin/top/utils.c
139
itoa_w(int val, int w)
usr.bin/top/utils.c
149
if (w > 15)
usr.bin/top/utils.c
151
w = 15;
usr.bin/top/utils.c
164
while (ptr >= eptr - w)
usr.bin/ul/ul.c
162
int i, w;
usr.bin/ul/ul.c
231
w = obuf[col].c_width;
usr.bin/ul/ul.c
232
for (i = 0; i < w; i++)
usr.bin/ul/ul.c
257
if ((w = wcwidth(c)) <= 0) /* non printing */
usr.bin/ul/ul.c
261
for (i = 0; i < w; i++)
usr.bin/ul/ul.c
263
obuf[col].c_width = w;
usr.bin/ul/ul.c
264
for (i = 1; i < w; i++)
usr.bin/ul/ul.c
268
for (i = 0; i < w; i++)
usr.bin/ul/ul.c
270
obuf[col].c_width = w;
usr.bin/ul/ul.c
271
for (i = 1; i < w; i++)
usr.bin/ul/ul.c
274
for (i = 0; i < w; i++)
usr.bin/ul/ul.c
277
w = obuf[col].c_width;
usr.bin/ul/ul.c
278
for (i = 0; i < w; i++)
usr.bin/ul/ul.c
281
col += w;
usr.bin/window/cmd.c
108
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
109
closewin(w);
usr.bin/window/cmd.c
115
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
116
c_move(w);
usr.bin/window/cmd.c
119
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
120
movewin(w, w->ww_alt.t, w->ww_alt.l);
usr.bin/window/cmd.c
123
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
124
c_size(w);
usr.bin/window/cmd.c
127
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
128
sizewin(w, w->ww_alt.nr, w->ww_alt.nc);
usr.bin/window/cmd.c
220
struct ww *w = NULL;
usr.bin/window/cmd.c
228
w = cmdwin;
usr.bin/window/cmd.c
230
w = framewin;
usr.bin/window/cmd.c
232
w = boxwin;
usr.bin/window/cmd.c
234
w = window[c - '1'];
usr.bin/window/cmd.c
236
w = selwin;
usr.bin/window/cmd.c
238
w = lastselwin;
usr.bin/window/cmd.c
239
if (w == NULL)
usr.bin/window/cmd.c
243
return w;
usr.bin/window/cmd.c
247
checkproc(struct ww *w)
usr.bin/window/cmd.c
249
if (w->ww_state != WWS_HASPROC) {
usr.bin/window/cmd.c
294
setselwin(struct ww *w)
usr.bin/window/cmd.c
296
if (selwin == w)
usr.bin/window/cmd.c
300
if ((selwin = w) != NULL)
usr.bin/window/cmd.c
46
struct ww *w;
usr.bin/window/cmd.c
87
if ((w = window[c - '1']) == NULL) {
usr.bin/window/cmd.c
91
setselwin(w);
usr.bin/window/cmd.c
96
if ((w = getwin()) != NULL)
usr.bin/window/cmd.c
97
setselwin(w);
usr.bin/window/cmd2.c
104
struct ww *w;
usr.bin/window/cmd2.c
106
if ((w = openiwin(wwnrow - 3, "Help")) == NULL) {
usr.bin/window/cmd2.c
110
wwprintf(w, "The escape character is %c.\n", escapec);
usr.bin/window/cmd2.c
111
wwprintf(w, "(# represents one of the digits from 1 to 9.)\n\n");
usr.bin/window/cmd2.c
112
if (help_print(w, "Short commands", help_shortcmd) >= 0)
usr.bin/window/cmd2.c
113
(void) help_print(w, "Long commands", help_longcmd);
usr.bin/window/cmd2.c
114
closeiwin(w);
usr.bin/window/cmd2.c
118
help_print(struct ww *w, const char *name, const char **list)
usr.bin/window/cmd2.c
120
wwprintf(w, "%s:\n\n", name);
usr.bin/window/cmd2.c
122
switch (more(w, 0)) {
usr.bin/window/cmd2.c
124
wwputs(*list++, w);
usr.bin/window/cmd2.c
125
wwputc('\n', w);
usr.bin/window/cmd2.c
128
wwprintf(w, "%s: (continued)\n\n", name);
usr.bin/window/cmd2.c
133
return more(w, 1) == 2 ? -1 : 0;
usr.bin/window/cmd3.c
52
setlabel(struct ww *w, const char *label)
usr.bin/window/cmd3.c
54
if (w->ww_label != 0)
usr.bin/window/cmd3.c
55
str_free(w->ww_label);
usr.bin/window/cmd3.c
56
if ((w->ww_label = str_cpy(label)) == 0)
usr.bin/window/cmd5.c
45
c_move(struct ww *w)
usr.bin/window/cmd5.c
54
col = w->ww_w.l;
usr.bin/window/cmd5.c
55
row = w->ww_w.t;
usr.bin/window/cmd5.c
58
wwbox(boxwin, row - 1, col - 1, w->ww_w.nr + 2, w->ww_w.nc + 2);
usr.bin/window/cmd5.c
59
getminmax(row, w->ww_w.nr, 1, wwnrow,
usr.bin/window/cmd5.c
61
getminmax(col, w->ww_w.nc, 0, wwncol,
usr.bin/window/cmd5.c
85
movewin(w, row, col);
usr.bin/window/cmd5.c
89
movewin(struct ww *w, int row, int col)
usr.bin/window/cmd5.c
91
struct ww *back = w->ww_back;
usr.bin/window/cmd5.c
93
w->ww_alt.t = w->ww_w.t;
usr.bin/window/cmd5.c
94
w->ww_alt.l = w->ww_w.l;
usr.bin/window/cmd5.c
95
wwdelete(w);
usr.bin/window/cmd5.c
96
wwmove(w, row, col);
usr.bin/window/cmd5.c
97
wwadd(w, back);
usr.bin/window/cmd6.c
101
waitnl(w);
usr.bin/window/cmd6.c
103
closeiwin(w);
usr.bin/window/cmd6.c
49
struct ww *w;
usr.bin/window/cmd6.c
73
if ((w = getwin()) != NULL)
usr.bin/window/cmd6.c
74
wwdumpnvis(w);
usr.bin/window/cmd6.c
77
if ((w = getwin()) != NULL)
usr.bin/window/cmd6.c
78
wwdumpwin(w);
usr.bin/window/cmd6.c
89
struct ww *w;
usr.bin/window/cmd6.c
92
if ((w = openiwin(wwnrow - 3, "Allocated Strings")) == NULL) {
usr.bin/window/cmd6.c
97
if (more(w, 0) == 2)
usr.bin/window/cmd6.c
99
wwprintf(w, "(%p)\t\"%s\"\n", s->s_data, s->s_data);
usr.bin/window/cmd7.c
102
struct ww *w = selwin;
usr.bin/window/cmd7.c
109
wwcursor(w, 0);
usr.bin/window/cmd7.c
110
row1 = w->ww_cur.r;
usr.bin/window/cmd7.c
111
col1 = w->ww_cur.c;
usr.bin/window/cmd7.c
116
switch (getpos(&row1, &col1, w->ww_i.t, w->ww_i.l,
usr.bin/window/cmd7.c
117
w->ww_i.b - 1, w->ww_i.r - 1)) {
usr.bin/window/cmd7.c
138
switch (getpos(&row2, &col2, w->ww_i.t, w->ww_i.l,
usr.bin/window/cmd7.c
139
w->ww_i.b - 1, w->ww_i.r - 1)) {
usr.bin/window/cmd7.c
164
yank_line(r, c, w->ww_b.r);
usr.bin/window/cmd7.c
165
c = w->ww_b.l;
usr.bin/window/cmd7.c
172
wwcursor(w, 1);
usr.bin/window/cmd7.c
178
struct ww *w = selwin;
usr.bin/window/cmd7.c
193
yank_highlight_line(r, c, w->ww_b.r);
usr.bin/window/cmd7.c
194
c = w->ww_b.l;
usr.bin/window/cmd7.c
202
struct ww *w = selwin;
usr.bin/window/cmd7.c
205
if (r < w->ww_i.t || r >= w->ww_i.b)
usr.bin/window/cmd7.c
207
if (c < w->ww_i.l)
usr.bin/window/cmd7.c
208
c = w->ww_i.l;
usr.bin/window/cmd7.c
209
if (cend >= w->ww_i.r)
usr.bin/window/cmd7.c
210
cend = w->ww_i.r;
usr.bin/window/cmd7.c
211
for (win = w->ww_win[r] + c; c < cend; c++, win++) {
usr.bin/window/cmd7.c
213
if (wwsmap[r][c] == w->ww_index) {
usr.bin/window/cmd7.c
215
w->ww_nvis[r]++;
usr.bin/window/cmd7.c
217
w->ww_nvis[r]--;
usr.bin/window/cmd7.c
50
c_size(struct ww *w)
usr.bin/window/cmd7.c
56
col = MIN(w->ww_w.r, wwncol) - 1;
usr.bin/window/cmd7.c
57
row = MIN(w->ww_w.b, wwnrow) - 1;
usr.bin/window/cmd7.c
60
wwbox(boxwin, w->ww_w.t - 1, w->ww_w.l - 1,
usr.bin/window/cmd7.c
61
row - w->ww_w.t + 3, col - w->ww_w.l + 3);
usr.bin/window/cmd7.c
65
switch (getpos(&row, &col, w->ww_w.t, w->ww_w.l,
usr.bin/window/cmd7.c
85
sizewin(w, row - w->ww_w.t + 1, col - w->ww_w.l + 1);
usr.bin/window/defs.h
57
#define isfg(w) ((w)->ww_order <= fgwin->ww_order)
usr.bin/window/error.c
56
struct ww *w;
usr.bin/window/error.c
71
if ((w = x->x_errwin) == NULL) {
usr.bin/window/error.c
76
if ((w = x->x_errwin = openiwin(ERRLINES, buf)) == NULL) {
usr.bin/window/error.c
82
if (more(w, 0) == 2) {
usr.bin/window/error.c
86
wwprintf(w, "line %d: ", x->x_lineno);
usr.bin/window/error.c
87
wwvprintf(w, fmt, ap);
usr.bin/window/error.c
88
wwputc('\n', w);
usr.bin/window/lcmd1.c
109
if ((w = openwin(id, row, col, nrow, ncol, nline, label,
usr.bin/window/lcmd1.c
114
SET(w->ww_wflags, WWW_MAPNL);
usr.bin/window/lcmd1.c
116
CLR(w->ww_wflags, WWW_MAPNL);
usr.bin/window/lcmd1.c
118
SET(w->ww_uflags, WWU_KEEPOPEN);
usr.bin/window/lcmd1.c
120
CLR(w->ww_uflags, WWU_KEEPOPEN);
usr.bin/window/lcmd1.c
122
SET(w->ww_wflags, WWW_NOUPDATE);
usr.bin/window/lcmd1.c
124
CLR(w->ww_wflags, WWW_NOUPDATE);
usr.bin/window/lcmd1.c
152
struct ww *w;
usr.bin/window/lcmd1.c
156
if ((w = vtowin(a++, selwin)) == NULL)
usr.bin/window/lcmd1.c
158
v->v_num = ISSET(w->ww_wflags, WWW_NOUPDATE) == 0;
usr.bin/window/lcmd1.c
160
SET(w->ww_wflags, WWW_NOUPDATE);
usr.bin/window/lcmd1.c
162
CLR(w->ww_wflags, WWW_NOUPDATE);
usr.bin/window/lcmd1.c
186
struct ww *w;
usr.bin/window/lcmd1.c
192
if ((w = vtowin(a, (struct ww *)0)) == NULL)
usr.bin/window/lcmd1.c
194
setselwin(w);
usr.bin/window/lcmd1.c
240
struct ww *w;
usr.bin/window/lcmd1.c
242
if ((w = vtowin(a, selwin)) == NULL)
usr.bin/window/lcmd1.c
244
if ((++a)->v_type != V_ERR && setlabel(w, a->v_str) < 0)
usr.bin/window/lcmd1.c
258
struct ww *w;
usr.bin/window/lcmd1.c
261
if ((w = vtowin(a, selwin)) == NULL)
usr.bin/window/lcmd1.c
264
v->v_num = isfg(w);
usr.bin/window/lcmd1.c
268
deletewin(w);
usr.bin/window/lcmd1.c
269
addwin(w, flag);
usr.bin/window/lcmd1.c
312
struct ww *w;
usr.bin/window/lcmd1.c
314
if ((w = vtowin(a++, selwin)) == NULL)
usr.bin/window/lcmd1.c
319
(void) write(w->ww_pty, buf, strlen(buf));
usr.bin/window/lcmd1.c
321
(void) write(w->ww_pty, a->v_str, strlen(a->v_str));
usr.bin/window/lcmd1.c
323
(void) write(w->ww_pty, " ", 1);
usr.bin/window/lcmd1.c
335
struct ww *w;
usr.bin/window/lcmd1.c
341
if ((w = vtowin(a, (struct ww *)0)) != NULL)
usr.bin/window/lcmd1.c
342
closewin(w);
usr.bin/window/lcmd1.c
386
vtowin(struct value *v, struct ww *w)
usr.bin/window/lcmd1.c
390
if (w != NULL)
usr.bin/window/lcmd1.c
391
return w;
usr.bin/window/lcmd1.c
399
|| (w = window[v->v_num - 1]) == NULL) {
usr.bin/window/lcmd1.c
403
return w;
usr.bin/window/lcmd1.c
64
struct ww *w;
usr.bin/window/lcmd2.c
105
struct ww *w;
usr.bin/window/lcmd2.c
109
if ((w = openiwin(8, "Timing and Resource Usage")) == NULL) {
usr.bin/window/lcmd2.c
120
wwprintf(w, "%-15s %-15s %-15s\n",
usr.bin/window/lcmd2.c
122
wwprintf(w, "%-15s ", strtime(&timeval));
usr.bin/window/lcmd2.c
123
wwprintf(w, "%-15s ", strtime(&rusage.ru_utime));
usr.bin/window/lcmd2.c
124
wwprintf(w, "%-15s\n", strtime(&rusage.ru_stime));
usr.bin/window/lcmd2.c
125
wwprintf(w, "%-15s %-15s %-15s %-15s\n",
usr.bin/window/lcmd2.c
127
wwprintf(w, "%-15ld %-15ld %-15ld %-15ld\n",
usr.bin/window/lcmd2.c
130
wwprintf(w, "%-7s %-7s %-7s %-7s %-7s %-7s %-7s %-7s %-7s %-7s\n",
usr.bin/window/lcmd2.c
133
wwprintf(w, "%-7ld %-7ld %-7ld %-7ld %-7ld %-7ld %-7ld %-7ld %-7ld %-7ld\n",
usr.bin/window/lcmd2.c
139
waitnl(w);
usr.bin/window/lcmd2.c
140
closeiwin(w);
usr.bin/window/lcmd2.c
175
struct ww *w, *wp;
usr.bin/window/lcmd2.c
186
if ((w = openiwin(n + 2, "Windows")) == NULL) {
usr.bin/window/lcmd2.c
193
wwprintf(w, "%c %c %-13s %-.*s\n",
usr.bin/window/lcmd2.c
200
waitnl(w);
usr.bin/window/lcmd2.c
201
closeiwin(w);
usr.bin/window/lcmd2.c
207
struct ww *w;
usr.bin/window/lcmd2.c
209
if ((w = openiwin(wwnrow - 3, "Variables")) == NULL) {
usr.bin/window/lcmd2.c
213
if (var_walk(printvar, (void *)w) >= 0)
usr.bin/window/lcmd2.c
214
waitnl(w);
usr.bin/window/lcmd2.c
215
closeiwin(w);
usr.bin/window/lcmd2.c
221
struct ww *w = vw;
usr.bin/window/lcmd2.c
222
if (more(w, 0) == 2)
usr.bin/window/lcmd2.c
224
wwprintf(w, "%16s ", r->r_name);
usr.bin/window/lcmd2.c
227
wwprintf(w, "%s\n", r->r_val.v_str);
usr.bin/window/lcmd2.c
230
wwprintf(w, "%d\n", r->r_val.v_num);
usr.bin/window/lcmd2.c
233
wwprintf(w, "ERROR\n");
usr.bin/window/lcmd2.c
290
struct ww *w;
usr.bin/window/lcmd2.c
292
if ((w = openiwin(wwnrow - 3, "Aliases")) == NULL) {
usr.bin/window/lcmd2.c
296
if (alias_walk(printalias, (void *)w) >= 0)
usr.bin/window/lcmd2.c
297
waitnl(w);
usr.bin/window/lcmd2.c
298
closeiwin(w);
usr.bin/window/lcmd2.c
340
struct ww *w = vw;
usr.bin/window/lcmd2.c
341
if (more(w, 0) == 2)
usr.bin/window/lcmd2.c
343
wwprintf(w, "%16s %s\n", a->a_name, a->a_buf);
usr.bin/window/lcmd2.c
370
struct ww *w;
usr.bin/window/lcmd2.c
372
if ((w = vtowin(a++, selwin)) == NULL)
usr.bin/window/lcmd2.c
377
(void) wwwrite(w, buf, strlen(buf));
usr.bin/window/lcmd2.c
379
(void) wwwrite(w, a->v_str, strlen(a->v_str));
usr.bin/window/lcmd2.c
381
(void) wwwrite(w, " ", 1);
usr.bin/window/lcmd2.c
383
(void) wwwrite(w, "\r\n", 2);
usr.bin/window/lcmd2.c
53
struct ww *w;
usr.bin/window/lcmd2.c
55
if ((w = openiwin(16, "IO Statistics")) == NULL) {
usr.bin/window/lcmd2.c
59
wwprintf(w, "ttflush\twrite\terror\tzero\tchar\n");
usr.bin/window/lcmd2.c
60
wwprintf(w, "%d\t%d\t%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
62
wwprintf(w, "token\tuse\tbad\tsaving\ttotal\tbaud\n");
usr.bin/window/lcmd2.c
63
wwprintf(w, "%d\t%d\t%d\t%d\t%d\t%d/%d (%.1f/%.1f)\n",
usr.bin/window/lcmd2.c
75
wwprintf(w, "wwwrite\tattempt\tchar\n");
usr.bin/window/lcmd2.c
76
wwprintf(w, "%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
78
wwprintf(w, "wwupdat\tline\tmiss\tscan\tclreol\tclreos\tmiss\tline\n");
usr.bin/window/lcmd2.c
79
wwprintf(w, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
82
wwprintf(w, "select\terror\tzero\n");
usr.bin/window/lcmd2.c
83
wwprintf(w, "%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
85
wwprintf(w, "read\terror\tzero\tchar\tack\tnack\tstat\terrorc\n");
usr.bin/window/lcmd2.c
86
wwprintf(w, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
89
wwprintf(w, "ptyread\terror\tzero\tcontrol\tdata\tchar\n");
usr.bin/window/lcmd2.c
90
wwprintf(w, "%d\t%d\t%d\t%d\t%d\t%d\n",
usr.bin/window/lcmd2.c
93
waitnl(w);
usr.bin/window/lcmd2.c
94
closeiwin(w);
usr.bin/window/mloop.c
54
struct ww *w = wwcurwin;
usr.bin/window/mloop.c
66
if (w->ww_type != WWT_PTY &&
usr.bin/window/mloop.c
67
ISSET(w->ww_pflags, WWP_STOPPED))
usr.bin/window/mloop.c
68
startwin(w);
usr.bin/window/mloop.c
72
(void) write(w->ww_pty, wwibp++, 1);
usr.bin/window/mloop.c
74
(void) write(w->ww_pty, wwibp, n);
usr.bin/window/startup.c
63
struct ww *w;
usr.bin/window/startup.c
70
if ((w = openwin(0, 1, 0, r, wwncol, default_nline,
usr.bin/window/startup.c
74
wwprintf(w, "Escape character is %s.\r\n", unctrl(escapec));
usr.bin/window/win.c
118
struct ww *w, *s = NULL;
usr.bin/window/win.c
122
if ((w = window[i]) != NULL && w != selwin &&
usr.bin/window/win.c
124
(!isfg(w) && (w->ww_order < s->ww_order || isfg(s)))))
usr.bin/window/win.c
125
s = w;
usr.bin/window/win.c
133
closewin(struct ww *w)
usr.bin/window/win.c
138
if (w != NULL) {
usr.bin/window/win.c
139
closewin1(w);
usr.bin/window/win.c
143
if ((w = window[i]) == NULL)
usr.bin/window/win.c
145
closewin1(w);
usr.bin/window/win.c
153
} else if ((w = findselwin()))
usr.bin/window/win.c
154
setselwin(w);
usr.bin/window/win.c
157
if ((w = findselwin()))
usr.bin/window/win.c
158
lastselwin = w;
usr.bin/window/win.c
169
struct ww *w;
usr.bin/window/win.c
171
if ((w = wwopen(WWT_INTERNAL, 0, nrow, wwncol, 2, 0, 0)) == NULL)
usr.bin/window/win.c
173
SET(w->ww_wflags, WWW_MAPNL | WWW_NOINTR | WWW_NOUPDATE | WWW_UNCTRL);
usr.bin/window/win.c
174
SET(w->ww_uflags, WWU_HASFRAME | WWU_CENTER);
usr.bin/window/win.c
175
w->ww_id = -1;
usr.bin/window/win.c
176
(void) setlabel(w, label);
usr.bin/window/win.c
177
addwin(w, 1);
usr.bin/window/win.c
179
return w;
usr.bin/window/win.c
186
closeiwin(struct ww *w)
usr.bin/window/win.c
188
closewin1(w);
usr.bin/window/win.c
193
closewin1(struct ww *w)
usr.bin/window/win.c
195
if (w == selwin)
usr.bin/window/win.c
197
if (w == lastselwin)
usr.bin/window/win.c
199
if (w->ww_id >= 0 && w->ww_id < NWINDOW)
usr.bin/window/win.c
200
window[w->ww_id] = 0;
usr.bin/window/win.c
201
if (w->ww_label)
usr.bin/window/win.c
202
str_free(w->ww_label);
usr.bin/window/win.c
203
deletewin(w);
usr.bin/window/win.c
204
wwclose(w);
usr.bin/window/win.c
215
front(struct ww *w, char doreframe)
usr.bin/window/win.c
217
if (w->ww_back != (isfg(w) ? framewin : fgwin) && !wwvisible(w)) {
usr.bin/window/win.c
218
deletewin(w);
usr.bin/window/win.c
219
addwin(w, isfg(w));
usr.bin/window/win.c
231
addwin(struct ww *w, char fg)
usr.bin/window/win.c
234
wwadd(w, framewin);
usr.bin/window/win.c
236
fgwin = w;
usr.bin/window/win.c
238
wwadd(w, selwin != 0 && selwin != w && !isfg(selwin)
usr.bin/window/win.c
246
deletewin(struct ww *w)
usr.bin/window/win.c
248
if (fgwin == w)
usr.bin/window/win.c
249
fgwin = w->ww_back;
usr.bin/window/win.c
250
wwdelete(w);
usr.bin/window/win.c
256
struct ww *w;
usr.bin/window/win.c
259
for (w = wwhead.ww_back; w != &wwhead; w = w->ww_back)
usr.bin/window/win.c
260
if (ISSET(w->ww_uflags, WWU_HASFRAME)) {
usr.bin/window/win.c
261
wwframe(w, framewin);
usr.bin/window/win.c
262
labelwin(w);
usr.bin/window/win.c
267
labelwin(struct ww *w)
usr.bin/window/win.c
269
int mode = w == selwin ? WWM_REV : 0;
usr.bin/window/win.c
271
if (!ISSET(w->ww_uflags, WWU_HASFRAME))
usr.bin/window/win.c
273
if (w->ww_id >= 0) {
usr.bin/window/win.c
276
buf[0] = w->ww_id + '1';
usr.bin/window/win.c
278
wwlabel(w, framewin, 1, buf, mode);
usr.bin/window/win.c
280
if (w->ww_label) {
usr.bin/window/win.c
283
if (ISSET(w->ww_uflags, WWU_CENTER)) {
usr.bin/window/win.c
284
col = (w->ww_w.nc - strlen(w->ww_label)) / 2;
usr.bin/window/win.c
288
wwlabel(w, framewin, col, w->ww_label, mode);
usr.bin/window/win.c
293
stopwin(struct ww *w)
usr.bin/window/win.c
295
if (w->ww_pty >= 0 && w->ww_type == WWT_PTY && wwstoptty(w->ww_pty) < 0)
usr.bin/window/win.c
298
SET(w->ww_pflags, WWP_STOPPED);
usr.bin/window/win.c
302
startwin(struct ww *w)
usr.bin/window/win.c
304
if (w->ww_pty >= 0 && w->ww_type == WWT_PTY &&
usr.bin/window/win.c
305
wwstarttty(w->ww_pty) < 0)
usr.bin/window/win.c
308
CLR(w->ww_pflags, WWP_STOPPED);
usr.bin/window/win.c
312
sizewin(struct ww *w, int nrow, int ncol)
usr.bin/window/win.c
314
struct ww *back = w->ww_back;
usr.bin/window/win.c
316
w->ww_alt.nr = w->ww_w.nr;
usr.bin/window/win.c
317
w->ww_alt.nc = w->ww_w.nc;
usr.bin/window/win.c
318
wwdelete(w);
usr.bin/window/win.c
319
if (wwsize(w, nrow, ncol) < 0)
usr.bin/window/win.c
321
wwadd(w, back);
usr.bin/window/win.c
326
waitnl(struct ww *w)
usr.bin/window/win.c
328
(void) waitnl1(w, "[Type any key to continue]");
usr.bin/window/win.c
332
more(struct ww *w, char always)
usr.bin/window/win.c
335
int uc = ISSET(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/win.c
337
if (!always && w->ww_cur.r < w->ww_w.b - 2)
usr.bin/window/win.c
339
c = waitnl1(w, "[Type escape to abort, any other key to continue]");
usr.bin/window/win.c
340
CLR(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/win.c
341
wwputs("\033E", w);
usr.bin/window/win.c
342
SET(w->ww_wflags, uc);
usr.bin/window/win.c
347
waitnl1(struct ww *w, const char *prompt)
usr.bin/window/win.c
349
int uc = ISSET(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/win.c
351
CLR(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/win.c
352
front(w, 0);
usr.bin/window/win.c
353
wwprintf(w, "\033Y%c%c\033sA%s\033rA ",
usr.bin/window/win.c
354
w->ww_w.nr - 1 + ' ', ' ', prompt); /* print on last line */
usr.bin/window/win.c
355
wwcurtowin(w);
usr.bin/window/win.c
358
SET(w->ww_wflags, uc);
usr.bin/window/win.c
63
struct ww *w;
usr.bin/window/win.c
72
w = wwopen(type, 0, nrow, ncol, row, col, nline);
usr.bin/window/win.c
73
if (w == NULL) {
usr.bin/window/win.c
77
w->ww_id = id;
usr.bin/window/win.c
78
window[id] = w;
usr.bin/window/win.c
79
CLR(w->ww_uflags, WWU_ALLFLAGS);
usr.bin/window/win.c
80
SET(w->ww_uflags, uflags);
usr.bin/window/win.c
81
w->ww_alt = w->ww_w;
usr.bin/window/win.c
82
if (label != NULL && setlabel(w, label) < 0)
usr.bin/window/win.c
84
wwcursor(w, 1);
usr.bin/window/win.c
91
addwin(w, 0);
usr.bin/window/win.c
92
setselwin(w);
usr.bin/window/win.c
93
if (wwspawn(w, shf, sh) < 0) {
usr.bin/window/win.c
95
closewin(w);
usr.bin/window/win.c
98
return w;
usr.bin/window/ww.h
262
#define wwcurtowin(w) wwsetcursor((w)->ww_cur.r, (w)->ww_cur.c)
usr.bin/window/ww.h
263
#define wwunbox(w) wwunframe(w)
usr.bin/window/ww.h
264
#define wwclreol(w,r,c) wwclreol1((w), (r), (c), 0)
usr.bin/window/ww.h
265
#define wwredrawwin(w) wwredrawwin1((w), (w)->ww_i.t, (w)->ww_i.b, 0)
usr.bin/window/wwadd.c
45
struct ww *w;
usr.bin/window/wwadd.c
53
for (w = w1->ww_forw; w != &wwhead; w = w->ww_forw)
usr.bin/window/wwadd.c
54
w->ww_order++;
usr.bin/window/wwadd.c
65
w = wwindex[smap[j]];
usr.bin/window/wwadd.c
66
if (w1->ww_order > w->ww_order)
usr.bin/window/wwadd.c
70
if (w != &wwnobody && w->ww_win[i][j] == 0)
usr.bin/window/wwadd.c
71
w->ww_nvis[i]--;
usr.bin/window/wwbox.c
40
wwbox(struct ww *w, int r, int c, int nr, int nc)
usr.bin/window/wwbox.c
47
wwframec(w, r, c, WWF_D|WWF_R);
usr.bin/window/wwbox.c
49
wwframec(w, r, i, WWF_L|WWF_R);
usr.bin/window/wwbox.c
50
wwframec(w, r, i, WWF_L|WWF_D);
usr.bin/window/wwbox.c
52
wwframec(w, i, c1, WWF_U|WWF_D);
usr.bin/window/wwbox.c
53
wwframec(w, i, c1, WWF_U|WWF_L);
usr.bin/window/wwbox.c
55
wwframec(w, r1, i, WWF_R|WWF_L);
usr.bin/window/wwbox.c
56
wwframec(w, r1, i, WWF_R|WWF_U);
usr.bin/window/wwbox.c
58
wwframec(w, i, c, WWF_D|WWF_U);
usr.bin/window/wwclose.c
41
wwclose(struct ww *w)
usr.bin/window/wwclose.c
43
wwindex[w->ww_index] = 0;
usr.bin/window/wwclose.c
44
if (w->ww_pty >= 0)
usr.bin/window/wwclose.c
45
(void) close(w->ww_pty);
usr.bin/window/wwclose.c
46
if (w->ww_socket >= 0)
usr.bin/window/wwclose.c
47
(void) close(w->ww_socket);
usr.bin/window/wwclose.c
48
wwfree((char **)w->ww_win, w->ww_w.t);
usr.bin/window/wwclose.c
49
wwfree((char **)w->ww_buf, w->ww_b.t);
usr.bin/window/wwclose.c
50
if (w->ww_fmap != 0)
usr.bin/window/wwclose.c
51
wwfree((char **)w->ww_fmap, w->ww_w.t);
usr.bin/window/wwclose.c
52
free((char *)(w->ww_nvis + w->ww_w.t));
usr.bin/window/wwclose.c
53
if (w->ww_ob != 0)
usr.bin/window/wwclose.c
54
free(w->ww_ob);
usr.bin/window/wwclose.c
55
free((char *)w);
usr.bin/window/wwclreol.c
44
wwclreol1(struct ww *w, int row, int col, char cleared)
usr.bin/window/wwclreol.c
54
buf = &w->ww_buf[row][col];
usr.bin/window/wwclreol.c
55
for (i = w->ww_b.r - col; --i >= 0;)
usr.bin/window/wwclreol.c
62
if (row < w->ww_i.t || row >= w->ww_i.b
usr.bin/window/wwclreol.c
63
|| w->ww_i.r <= 0 || w->ww_i.r <= col)
usr.bin/window/wwclreol.c
66
if (col < w->ww_i.l)
usr.bin/window/wwclreol.c
67
col = w->ww_i.l;
usr.bin/window/wwclreol.c
80
win = &w->ww_win[row][i];
usr.bin/window/wwclreol.c
81
for (i = w->ww_i.r - i; --i >= 0;)
usr.bin/window/wwclreol.c
82
if (*smap++ == w->ww_index)
usr.bin/window/wwclreos.c
40
wwclreos(struct ww *w, int row, int col)
usr.bin/window/wwclreos.c
44
wwclreol(w, row, col);
usr.bin/window/wwclreos.c
45
for (i = row + 1; i < w->ww_b.b; i++)
usr.bin/window/wwclreos.c
46
wwclreol(w, i, w->ww_b.l);
usr.bin/window/wwclreos.c
48
if (!ISSET(w->ww_wflags, WWW_NOUPDATE))
usr.bin/window/wwclreos.c
49
wwupdate1(w->ww_i.t, w->ww_i.b);
usr.bin/window/wwcursor.c
39
wwcursor(struct ww *w, int on)
usr.bin/window/wwcursor.c
44
if (ISSET(w->ww_wflags, WWW_HASCURSOR))
usr.bin/window/wwcursor.c
46
SET(w->ww_wflags, WWW_HASCURSOR);
usr.bin/window/wwcursor.c
48
if (!ISSET(w->ww_wflags, WWW_HASCURSOR))
usr.bin/window/wwcursor.c
50
CLR(w->ww_wflags, WWW_HASCURSOR);
usr.bin/window/wwcursor.c
53
win = &w->ww_win[w->ww_cur.r][w->ww_cur.c];
usr.bin/window/wwcursor.c
55
if (w->ww_cur.r < w->ww_i.t || w->ww_cur.r >= w->ww_i.b
usr.bin/window/wwcursor.c
56
|| w->ww_cur.c < w->ww_i.l || w->ww_cur.c >= w->ww_i.r)
usr.bin/window/wwcursor.c
58
if (wwsmap[w->ww_cur.r][w->ww_cur.c] == w->ww_index) {
usr.bin/window/wwcursor.c
60
w->ww_nvis[w->ww_cur.r]++;
usr.bin/window/wwcursor.c
62
w->ww_nvis[w->ww_cur.r]--;
usr.bin/window/wwcursor.c
63
wwns[w->ww_cur.r][w->ww_cur.c].c_m ^= wwcursormodes;
usr.bin/window/wwcursor.c
64
wwtouched[w->ww_cur.r] |= WWU_TOUCHED;
usr.bin/window/wwcursor.c
73
struct ww *w;
usr.bin/window/wwcursor.c
81
ISSET((w = wwindex[i])->ww_wflags, WWW_HASCURSOR)) {
usr.bin/window/wwcursor.c
82
wwcursor(w, 0);
usr.bin/window/wwcursor.c
84
wwcursor(w, 1);
usr.bin/window/wwdelchar.c
41
wwdelchar(struct ww *w, int row, int col)
usr.bin/window/wwdelchar.c
52
p = &w->ww_buf[row][col];
usr.bin/window/wwdelchar.c
54
for (i = w->ww_b.r - col; --i > 0;)
usr.bin/window/wwdelchar.c
62
if (row < w->ww_i.t || row >= w->ww_i.b
usr.bin/window/wwdelchar.c
63
|| w->ww_i.r <= 0 || w->ww_i.r <= col)
usr.bin/window/wwdelchar.c
66
if (col < w->ww_i.l)
usr.bin/window/wwdelchar.c
67
col = w->ww_i.l;
usr.bin/window/wwdelchar.c
81
for (i = col; i < w->ww_i.r && *smap++ != w->ww_index; i++)
usr.bin/window/wwdelchar.c
83
if (i >= w->ww_i.r)
usr.bin/window/wwdelchar.c
86
buf = w->ww_buf[row];
usr.bin/window/wwdelchar.c
87
win = w->ww_win[row];
usr.bin/window/wwdelchar.c
91
for (; i < w->ww_i.r; i++) {
usr.bin/window/wwdelchar.c
92
if (*smap++ != w->ww_index)
usr.bin/window/wwdelete.c
100
char *win = w->ww_win[i];
usr.bin/window/wwdelete.c
101
union ww_char *buf = w->ww_buf[i];
usr.bin/window/wwdelete.c
102
int nvis = w->ww_nvis[i];
usr.bin/window/wwdelete.c
112
smap[j] = w->ww_index;
usr.bin/window/wwdelete.c
120
w->ww_nvis[i] = nvis;
usr.bin/window/wwdelete.c
122
if ((w = w->ww_forw) == &wwhead)
usr.bin/window/wwdelete.c
127
wwdelete1(w, t, tt, l, r);
usr.bin/window/wwdelete.c
129
wwdelete1(w, bb, b, l, r);
usr.bin/window/wwdelete.c
131
wwdelete1(w, tt, bb, l, ll);
usr.bin/window/wwdelete.c
133
wwdelete1(w, tt, bb, rr, r);
usr.bin/window/wwdelete.c
42
wwdelete(struct ww *w)
usr.bin/window/wwdelete.c
46
for (i = w->ww_i.t; i < w->ww_i.b; i++) {
usr.bin/window/wwdelete.c
52
for (j = w->ww_i.l; j < w->ww_i.r; j++)
usr.bin/window/wwdelete.c
53
if (smap[j] == w->ww_index) {
usr.bin/window/wwdelete.c
65
for (wp = w->ww_forw; wp != &wwhead; wp = wp->ww_forw)
usr.bin/window/wwdelete.c
69
if (w->ww_forw != &wwhead)
usr.bin/window/wwdelete.c
70
wwdelete1(w->ww_forw,
usr.bin/window/wwdelete.c
71
w->ww_i.t, w->ww_i.b, w->ww_i.l, w->ww_i.r);
usr.bin/window/wwdelete.c
73
w->ww_back->ww_forw = w->ww_forw;
usr.bin/window/wwdelete.c
74
w->ww_forw->ww_back = w->ww_back;
usr.bin/window/wwdelete.c
75
w->ww_forw = w->ww_back = 0;
usr.bin/window/wwdelete.c
79
wwdelete1(struct ww *w, int t, int b, int l, int r)
usr.bin/window/wwdelete.c
87
tt = MAX(t, w->ww_i.t);
usr.bin/window/wwdelete.c
88
bb = MIN(b, w->ww_i.b);
usr.bin/window/wwdelete.c
89
ll = MAX(l, w->ww_i.l);
usr.bin/window/wwdelete.c
90
rr = MIN(r, w->ww_i.r);
usr.bin/window/wwdelete.c
92
if ((w = w->ww_forw) == &wwhead)
usr.bin/window/wwdelline.c
39
wwdelline(struct ww *w, int row)
usr.bin/window/wwdelline.c
51
if ((row1 = row) < w->ww_i.t) {
usr.bin/window/wwdelline.c
52
row1 = w->ww_i.t;
usr.bin/window/wwdelline.c
54
if ((row2 = w->ww_b.b) > w->ww_i.b) {
usr.bin/window/wwdelline.c
55
row2 = w->ww_i.b;
usr.bin/window/wwdelline.c
59
deleted = wwscroll1(w, row1, row2, 1, visible);
usr.bin/window/wwdelline.c
65
cpp = &w->ww_buf[row];
usr.bin/window/wwdelline.c
68
for (i = w->ww_b.b - row; --i > 0;)
usr.bin/window/wwdelline.c
76
wwclreol1(w, w->ww_b.b - 1, w->ww_b.l, deleted);
usr.bin/window/wwdelline.c
78
cp += w->ww_b.l;
usr.bin/window/wwdelline.c
79
for (i = w->ww_b.nc; --i >= 0;)
usr.bin/window/wwdump.c
44
wwdumpwin(struct ww *w)
usr.bin/window/wwdump.c
50
for (i = w->ww_i.t; i < w->ww_i.b; i++) {
usr.bin/window/wwdump.c
51
(*tt.tt_move)(i, w->ww_i.l);
usr.bin/window/wwdump.c
52
for (j = w->ww_i.l; j < w->ww_i.r; j++)
usr.bin/window/wwdump.c
53
(*tt.tt_putc)(w->ww_win[i][j] & WWM_GLS ? 'G' : ' ');
usr.bin/window/wwdump.c
58
wwdumpnvis(struct ww *w)
usr.bin/window/wwdump.c
65
for (i = w->ww_i.t; i < w->ww_i.b; i++) {
usr.bin/window/wwdump.c
66
(*tt.tt_move)(i, w->ww_i.l);
usr.bin/window/wwdump.c
67
(void) sprintf(buf, "%d", w->ww_nvis[i]);
usr.bin/window/wwframe.c
119
if (w->ww_w.l > 0) {
usr.bin/window/wwframe.c
120
r = w->ww_i.t - 1;
usr.bin/window/wwframe.c
121
c = w->ww_w.l - 1;
usr.bin/window/wwframe.c
125
b2 = r < 0 || frameok(w, r, c);
usr.bin/window/wwframe.c
127
for (; r < w->ww_i.b; r++) {
usr.bin/window/wwframe.c
132
a3 = w->ww_index == wwsmap[r + 1][c + 1];
usr.bin/window/wwframe.c
133
b3 = frameok(w, r + 1, c);
usr.bin/window/wwframe.c
153
if (w->ww_w.r < wwncol) {
usr.bin/window/wwframe.c
154
r = w->ww_i.t - 1;
usr.bin/window/wwframe.c
155
c = w->ww_w.r;
usr.bin/window/wwframe.c
159
b2 = r < 0 || frameok(w, r, c);
usr.bin/window/wwframe.c
161
for (; r < w->ww_i.b; r++) {
usr.bin/window/wwframe.c
166
a3 = w->ww_index == wwsmap[r + 1][c - 1];
usr.bin/window/wwframe.c
167
b3 = frameok(w, r + 1, c);
usr.bin/window/wwframe.c
200
struct ww *w;
usr.bin/window/wwframe.c
202
w = wwindex[*smap];
usr.bin/window/wwframe.c
203
if (w->ww_order > f->ww_order) {
usr.bin/window/wwframe.c
204
if (w != &wwnobody && w->ww_win[r][c] == 0)
usr.bin/window/wwframe.c
205
w->ww_nvis[r]--;
usr.bin/window/wwframe.c
39
#define frameok(w, r, c) (w1 = wwindex[wwsmap[r][c]], \
usr.bin/window/wwframe.c
40
w1->ww_fmap || w1->ww_order > (w)->ww_order)
usr.bin/window/wwframe.c
43
wwframe(struct ww *w, struct ww *wframe)
usr.bin/window/wwframe.c
51
if (w->ww_w.t > 0) {
usr.bin/window/wwframe.c
52
r = w->ww_w.t - 1;
usr.bin/window/wwframe.c
53
c = w->ww_i.l - 1;
usr.bin/window/wwframe.c
57
b2 = c < 0 || frameok(w, r, c);
usr.bin/window/wwframe.c
59
for (; c < w->ww_i.r; c++) {
usr.bin/window/wwframe.c
64
a3 = w->ww_index == wwsmap[r + 1][c + 1];
usr.bin/window/wwframe.c
65
b3 = frameok(w, r, c + 1);
usr.bin/window/wwframe.c
85
if (w->ww_w.b < wwnrow) {
usr.bin/window/wwframe.c
86
r = w->ww_w.b;
usr.bin/window/wwframe.c
87
c = w->ww_i.l - 1;
usr.bin/window/wwframe.c
91
b2 = c < 0 || frameok(w, r, c);
usr.bin/window/wwframe.c
93
for (; c < w->ww_i.r; c++) {
usr.bin/window/wwframe.c
98
a3 = w->ww_index == wwsmap[r - 1][c + 1];
usr.bin/window/wwframe.c
99
b3 = frameok(w, r, c + 1);
usr.bin/window/wwgets.c
102
(void) wwwrite(w, "\b \b", 3);
usr.bin/window/wwgets.c
43
wwgets(char *buf, int n, struct ww *w)
usr.bin/window/wwgets.c
47
int uc = ISSET(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/wwgets.c
49
CLR(w->ww_wflags, WWW_UNCTRL);
usr.bin/window/wwgets.c
51
wwcurtowin(w);
usr.bin/window/wwgets.c
61
rub(*--p, w);
usr.bin/window/wwgets.c
70
rub(*--p, w);
usr.bin/window/wwgets.c
79
rub(*p, w);
usr.bin/window/wwgets.c
81
rub(*p--, w);
usr.bin/window/wwgets.c
87
wwputc(ctrl('g'), w);
usr.bin/window/wwgets.c
89
wwputs(unctrl(*p++ = c), w);
usr.bin/window/wwgets.c
93
SET(w->ww_wflags, uc);
usr.bin/window/wwgets.c
97
rub(int c, struct ww *w)
usr.bin/window/wwinschar.c
41
wwinschar(struct ww *w, int row, int col, char c, char m)
usr.bin/window/wwinschar.c
53
p = &w->ww_buf[row][w->ww_b.r];
usr.bin/window/wwinschar.c
55
for (i = w->ww_b.r - col; --i > 0;)
usr.bin/window/wwinschar.c
63
if (row < w->ww_i.t || row >= w->ww_i.b
usr.bin/window/wwinschar.c
64
|| w->ww_i.r <= 0 || w->ww_i.r <= col)
usr.bin/window/wwinschar.c
67
if (col < w->ww_i.l)
usr.bin/window/wwinschar.c
68
col = w->ww_i.l;
usr.bin/window/wwinschar.c
82
for (i = col; i < w->ww_i.r && *smap++ != w->ww_index; i++)
usr.bin/window/wwinschar.c
84
if (i >= w->ww_i.r)
usr.bin/window/wwinschar.c
87
buf = w->ww_buf[row];
usr.bin/window/wwinschar.c
88
win = w->ww_win[row];
usr.bin/window/wwinschar.c
92
for (; i < w->ww_i.r; i++) {
usr.bin/window/wwinschar.c
93
if (*smap++ != w->ww_index)
usr.bin/window/wwinsline.c
39
wwinsline(struct ww *w, int row)
usr.bin/window/wwinsline.c
51
if ((row1 = row) < w->ww_i.t) {
usr.bin/window/wwinsline.c
52
row1 = w->ww_i.t;
usr.bin/window/wwinsline.c
56
if ((row2 = w->ww_b.b) > w->ww_i.b) {
usr.bin/window/wwinsline.c
57
row2 = w->ww_i.b;
usr.bin/window/wwinsline.c
59
deleted = wwscroll1(w, row1, row2, -1, visible);
usr.bin/window/wwinsline.c
65
cpp = &w->ww_buf[w->ww_b.b];
usr.bin/window/wwinsline.c
68
for (i = w->ww_b.b - row; --i > 0;)
usr.bin/window/wwinsline.c
76
wwclreol1(w, row, w->ww_b.l, deleted);
usr.bin/window/wwinsline.c
78
cp += w->ww_b.l;
usr.bin/window/wwinsline.c
79
for (i = w->ww_b.nc; --i >= 0;)
usr.bin/window/wwiomux.c
104
for (w = wwhead.ww_forw; w != &wwhead; w = w->ww_forw) {
usr.bin/window/wwiomux.c
105
if (w->ww_pty < 0)
usr.bin/window/wwiomux.c
107
if (w->ww_obq < w->ww_obe) {
usr.bin/window/wwiomux.c
108
pfd[nfd].fd = w->ww_pty;
usr.bin/window/wwiomux.c
111
if (w->ww_obq > w->ww_obp &&
usr.bin/window/wwiomux.c
112
!ISSET(w->ww_pflags, WWP_STOPPED))
usr.bin/window/wwiomux.c
154
for (w = wwhead.ww_forw; w != &wwhead; w = w->ww_forw) {
usr.bin/window/wwiomux.c
157
if (w->ww_pty < 0)
usr.bin/window/wwiomux.c
159
if (w->ww_pty != pfd[nfd].fd)
usr.bin/window/wwiomux.c
164
p = w->ww_obq;
usr.bin/window/wwiomux.c
165
if (w->ww_type == WWT_PTY) {
usr.bin/window/wwiomux.c
166
if (p == w->ww_ob) {
usr.bin/window/wwiomux.c
167
w->ww_obp++;
usr.bin/window/wwiomux.c
168
w->ww_obq++;
usr.bin/window/wwiomux.c
173
n = read(w->ww_pty, p, w->ww_obe - p);
usr.bin/window/wwiomux.c
176
(void) close(w->ww_pty);
usr.bin/window/wwiomux.c
177
w->ww_pty = -1;
usr.bin/window/wwiomux.c
180
(void) close(w->ww_pty);
usr.bin/window/wwiomux.c
181
w->ww_pty = -1;
usr.bin/window/wwiomux.c
182
} else if (w->ww_type != WWT_PTY) {
usr.bin/window/wwiomux.c
185
w->ww_obq += n;
usr.bin/window/wwiomux.c
190
w->ww_obq += n;
usr.bin/window/wwiomux.c
194
SET(w->ww_pflags, WWP_STOPPED);
usr.bin/window/wwiomux.c
196
CLR(w->ww_pflags, WWP_STOPPED);
usr.bin/window/wwiomux.c
198
CLR(w->ww_pflags, WWP_STOPPED);
usr.bin/window/wwiomux.c
199
w->ww_obq = w->ww_obp =
usr.bin/window/wwiomux.c
200
w->ww_ob;
usr.bin/window/wwiomux.c
203
if (w->ww_type == WWT_PTY)
usr.bin/window/wwiomux.c
215
if ((w = wwcurwin) != NULL && w->ww_pty >= 0 &&
usr.bin/window/wwiomux.c
216
w->ww_obq > w->ww_obp &&
usr.bin/window/wwiomux.c
217
!ISSET(w->ww_pflags, WWP_STOPPED)) {
usr.bin/window/wwiomux.c
218
int n = wwwrite(w, w->ww_obp, w->ww_obq - w->ww_obp);
usr.bin/window/wwiomux.c
219
if ((w->ww_obp += n) == w->ww_obq)
usr.bin/window/wwiomux.c
220
w->ww_obq = w->ww_obp = w->ww_ob;
usr.bin/window/wwiomux.c
224
for (w = wwhead.ww_forw; w != &wwhead; w = w->ww_forw)
usr.bin/window/wwiomux.c
225
if (w->ww_pty >= 0 && w->ww_obq > w->ww_obp &&
usr.bin/window/wwiomux.c
226
!ISSET(w->ww_pflags, WWP_STOPPED)) {
usr.bin/window/wwiomux.c
227
int n = wwwrite(w, w->ww_obp,
usr.bin/window/wwiomux.c
228
w->ww_obq - w->ww_obp);
usr.bin/window/wwiomux.c
229
if ((w->ww_obp += n) == w->ww_obq)
usr.bin/window/wwiomux.c
230
w->ww_obq = w->ww_obp = w->ww_ob;
usr.bin/window/wwiomux.c
61
struct ww *w;
usr.bin/window/wwiomux.c
81
for (w = wwhead.ww_forw; w != &wwhead; w = w->ww_forw) {
usr.bin/window/wwiomux.c
82
if (w->ww_pty < 0 || w->ww_obq >= w->ww_obe)
usr.bin/window/wwlabel.c
45
wwlabel(struct ww *w, struct ww *f, int where, char *l, int mode)
usr.bin/window/wwlabel.c
61
row = w->ww_w.t - 1;
usr.bin/window/wwlabel.c
72
jj = MIN(w->ww_i.r, f->ww_i.r);
usr.bin/window/wwlabel.c
73
j = w->ww_i.l + where;
usr.bin/window/wwmisc.c
44
wwvisible(struct ww *w)
usr.bin/window/wwmisc.c
49
for (i = w->ww_i.t; i < w->ww_i.b; i++)
usr.bin/window/wwmisc.c
50
nvis += w->ww_nvis[i];
usr.bin/window/wwmisc.c
51
if (ISSET(w->ww_wflags, WWW_HASCURSOR)
usr.bin/window/wwmisc.c
52
&& w->ww_cur.r >= w->ww_i.t && w->ww_cur.r < w->ww_i.b
usr.bin/window/wwmisc.c
53
&& w->ww_cur.c >= w->ww_i.l && w->ww_cur.c < w->ww_i.r
usr.bin/window/wwmisc.c
54
&& wwsmap[w->ww_cur.r][w->ww_cur.c] == w->ww_index)
usr.bin/window/wwmisc.c
56
return nvis == w->ww_i.nr * w->ww_i.nc;
usr.bin/window/wwmove.c
42
wwmove(struct ww *w, int row, int col)
usr.bin/window/wwmove.c
47
dr = row - w->ww_w.t;
usr.bin/window/wwmove.c
48
dc = col - w->ww_w.l;
usr.bin/window/wwmove.c
50
w->ww_w.t += dr;
usr.bin/window/wwmove.c
51
w->ww_w.b += dr;
usr.bin/window/wwmove.c
52
w->ww_w.l += dc;
usr.bin/window/wwmove.c
53
w->ww_w.r += dc;
usr.bin/window/wwmove.c
55
w->ww_b.t += dr;
usr.bin/window/wwmove.c
56
w->ww_b.b += dr;
usr.bin/window/wwmove.c
57
w->ww_b.l += dc;
usr.bin/window/wwmove.c
58
w->ww_b.r += dc;
usr.bin/window/wwmove.c
60
w->ww_i.t = MAX(w->ww_w.t, 0);
usr.bin/window/wwmove.c
61
w->ww_i.b = MIN(w->ww_w.b, wwnrow);
usr.bin/window/wwmove.c
62
w->ww_i.nr = w->ww_i.b - w->ww_i.t;
usr.bin/window/wwmove.c
63
w->ww_i.l = MAX(w->ww_w.l, 0);
usr.bin/window/wwmove.c
64
w->ww_i.r = MIN(w->ww_w.r, wwncol);
usr.bin/window/wwmove.c
65
w->ww_i.nc = w->ww_i.r - w->ww_i.l;
usr.bin/window/wwmove.c
67
w->ww_cur.r += dr;
usr.bin/window/wwmove.c
68
w->ww_cur.c += dc;
usr.bin/window/wwmove.c
70
w->ww_win -= dr;
usr.bin/window/wwmove.c
71
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwmove.c
72
w->ww_win[i] -= dc;
usr.bin/window/wwmove.c
73
if (w->ww_fmap != 0) {
usr.bin/window/wwmove.c
74
w->ww_fmap -= dr;
usr.bin/window/wwmove.c
75
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwmove.c
76
w->ww_fmap[i] -= dc;
usr.bin/window/wwmove.c
78
w->ww_nvis -= dr;
usr.bin/window/wwmove.c
79
for (i = w->ww_i.t; i < w->ww_i.b; i++) {
usr.bin/window/wwmove.c
80
int j = w->ww_i.l;
usr.bin/window/wwmove.c
81
char *win = &w->ww_win[i][j];
usr.bin/window/wwmove.c
85
for (; j < w->ww_i.r; j++, win++, smap++)
usr.bin/window/wwmove.c
86
if (*win == 0 && *smap == w->ww_index)
usr.bin/window/wwmove.c
88
w->ww_nvis[i] = nvis;
usr.bin/window/wwmove.c
90
w->ww_buf -= dr;
usr.bin/window/wwmove.c
91
for (i = w->ww_b.t; i < w->ww_b.b; i++)
usr.bin/window/wwmove.c
92
w->ww_buf[i] -= dc;
usr.bin/window/wwopen.c
109
w->ww_pty = d[0];
usr.bin/window/wwopen.c
110
w->ww_socket = d[1];
usr.bin/window/wwopen.c
115
if ((w->ww_ob = malloc(512)) == 0) {
usr.bin/window/wwopen.c
119
w->ww_obe = w->ww_ob + 512;
usr.bin/window/wwopen.c
120
w->ww_obp = w->ww_obq = w->ww_ob;
usr.bin/window/wwopen.c
121
if (w->ww_pty >= wwdtablesize)
usr.bin/window/wwopen.c
122
wwdtablesize = w->ww_pty + 1;
usr.bin/window/wwopen.c
125
w->ww_win = wwalloc(w->ww_w.t, w->ww_w.l,
usr.bin/window/wwopen.c
126
w->ww_w.nr, w->ww_w.nc, sizeof (char));
usr.bin/window/wwopen.c
127
if (w->ww_win == 0)
usr.bin/window/wwopen.c
137
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwopen.c
138
for (j = w->ww_w.l; j < w->ww_w.r; j++)
usr.bin/window/wwopen.c
139
w->ww_win[i][j] = m;
usr.bin/window/wwopen.c
142
w->ww_fmap = wwalloc(w->ww_w.t, w->ww_w.l,
usr.bin/window/wwopen.c
143
w->ww_w.nr, w->ww_w.nc, sizeof (char));
usr.bin/window/wwopen.c
144
if (w->ww_fmap == 0)
usr.bin/window/wwopen.c
146
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwopen.c
147
for (j = w->ww_w.l; j < w->ww_w.r; j++)
usr.bin/window/wwopen.c
148
w->ww_fmap[i][j] = 0;
usr.bin/window/wwopen.c
151
w->ww_buf = (union ww_char **)
usr.bin/window/wwopen.c
152
wwalloc(w->ww_b.t, w->ww_b.l,
usr.bin/window/wwopen.c
153
w->ww_b.nr, w->ww_b.nc, sizeof (union ww_char));
usr.bin/window/wwopen.c
154
if (w->ww_buf == 0)
usr.bin/window/wwopen.c
156
for (i = w->ww_b.t; i < w->ww_b.b; i++)
usr.bin/window/wwopen.c
157
for (j = w->ww_b.l; j < w->ww_b.r; j++)
usr.bin/window/wwopen.c
158
w->ww_buf[i][j].c_w = ' ';
usr.bin/window/wwopen.c
160
w->ww_nvis = (short *)malloc((unsigned) w->ww_w.nr * sizeof (short));
usr.bin/window/wwopen.c
161
if (w->ww_nvis == 0) {
usr.bin/window/wwopen.c
165
w->ww_nvis -= w->ww_w.t;
usr.bin/window/wwopen.c
166
nvis = m ? 0 : w->ww_w.nc;
usr.bin/window/wwopen.c
167
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwopen.c
168
w->ww_nvis[i] = nvis;
usr.bin/window/wwopen.c
170
w->ww_state = WWS_INITIAL;
usr.bin/window/wwopen.c
171
CLR(w->ww_oflags, WWO_ALLFLAGS);
usr.bin/window/wwopen.c
172
SET(w->ww_oflags, oflags);
usr.bin/window/wwopen.c
173
return wwindex[w->ww_index] = w;
usr.bin/window/wwopen.c
175
if (w != NULL) {
usr.bin/window/wwopen.c
176
if (w->ww_win != 0)
usr.bin/window/wwopen.c
177
wwfree(w->ww_win, w->ww_w.t);
usr.bin/window/wwopen.c
178
if (w->ww_fmap != 0)
usr.bin/window/wwopen.c
179
wwfree(w->ww_fmap, w->ww_w.t);
usr.bin/window/wwopen.c
180
if (w->ww_buf != 0)
usr.bin/window/wwopen.c
181
wwfree((char **)w->ww_buf, w->ww_b.t);
usr.bin/window/wwopen.c
182
if (w->ww_nvis != 0)
usr.bin/window/wwopen.c
183
free((char *)(w->ww_nvis + w->ww_w.t));
usr.bin/window/wwopen.c
184
if (w->ww_ob != 0)
usr.bin/window/wwopen.c
185
free(w->ww_ob);
usr.bin/window/wwopen.c
186
if (w->ww_pty >= 0)
usr.bin/window/wwopen.c
187
(void) close(w->ww_pty);
usr.bin/window/wwopen.c
188
if (w->ww_socket >= 0)
usr.bin/window/wwopen.c
189
(void) close(w->ww_socket);
usr.bin/window/wwopen.c
190
free((char *)w);
usr.bin/window/wwopen.c
46
struct ww *w;
usr.bin/window/wwopen.c
51
w = (struct ww *)calloc(1, sizeof (struct ww));
usr.bin/window/wwopen.c
52
if (w == NULL) {
usr.bin/window/wwopen.c
56
w->ww_pty = -1;
usr.bin/window/wwopen.c
57
w->ww_socket = -1;
usr.bin/window/wwopen.c
65
w->ww_index = i;
usr.bin/window/wwopen.c
70
w->ww_w.t = row;
usr.bin/window/wwopen.c
71
w->ww_w.b = row + nrow;
usr.bin/window/wwopen.c
72
w->ww_w.l = col;
usr.bin/window/wwopen.c
73
w->ww_w.r = col + ncol;
usr.bin/window/wwopen.c
74
w->ww_w.nr = nrow;
usr.bin/window/wwopen.c
75
w->ww_w.nc = ncol;
usr.bin/window/wwopen.c
77
w->ww_b.t = row;
usr.bin/window/wwopen.c
78
w->ww_b.b = row + nline;
usr.bin/window/wwopen.c
79
w->ww_b.l = col;
usr.bin/window/wwopen.c
80
w->ww_b.r = col + ncol;
usr.bin/window/wwopen.c
81
w->ww_b.nr = nline;
usr.bin/window/wwopen.c
82
w->ww_b.nc = ncol;
usr.bin/window/wwopen.c
84
w->ww_i.t = MAX(w->ww_w.t, 0);
usr.bin/window/wwopen.c
85
w->ww_i.b = MIN(w->ww_w.b, wwnrow);
usr.bin/window/wwopen.c
86
w->ww_i.l = MAX(w->ww_w.l, 0);
usr.bin/window/wwopen.c
87
w->ww_i.r = MIN(w->ww_w.r, wwncol);
usr.bin/window/wwopen.c
88
w->ww_i.nr = w->ww_i.b - w->ww_i.t;
usr.bin/window/wwopen.c
89
w->ww_i.nc = w->ww_i.r - w->ww_i.l;
usr.bin/window/wwopen.c
91
w->ww_cur.r = w->ww_w.t;
usr.bin/window/wwopen.c
92
w->ww_cur.c = w->ww_w.l;
usr.bin/window/wwopen.c
94
w->ww_type = type;
usr.bin/window/wwopen.c
97
if (wwgetpty(w) < 0)
usr.bin/window/wwprintf.c
39
wwprintf(struct ww *w, const char *fmt, ...)
usr.bin/window/wwprintf.c
44
(void) wwvprintf(w, fmt, ap);
usr.bin/window/wwprintf.c
49
wwvprintf(struct ww *w, const char *fmt, va_list ap)
usr.bin/window/wwprintf.c
53
(void) wwwrite(w, buf, vsnprintf(buf, sizeof(buf), fmt, ap));
usr.bin/window/wwpty.c
44
wwgetpty(struct ww *w)
usr.bin/window/wwpty.c
49
result = openpty(&w->ww_pty, &tty, w->ww_ttyname, NULL, NULL);
usr.bin/window/wwpty.c
51
w->ww_pty = -1;
usr.bin/window/wwpty.c
55
(void) ioctl(w->ww_pty, TIOCPKT, (char *)&on);
usr.bin/window/wwpty.c
56
(void) fcntl(w->ww_pty, F_SETFD, 1);
usr.bin/window/wwputc.c
39
wwputc(char c, struct ww *w)
usr.bin/window/wwputc.c
41
(void) wwwrite(w, &c, sizeof c);
usr.bin/window/wwputs.c
39
wwputs(const char *s, struct ww *w)
usr.bin/window/wwputs.c
45
(void) wwwrite(w, s, p - s - 1);
usr.bin/window/wwredrawwin.c
39
wwredrawwin1(struct ww *w, int row1, int row2, int offset)
usr.bin/window/wwredrawwin.c
51
col = w->ww_i.l;
usr.bin/window/wwredrawwin.c
54
buf = w->ww_buf[row + offset];
usr.bin/window/wwredrawwin.c
55
win = w->ww_win[row];
usr.bin/window/wwredrawwin.c
57
for (; col < w->ww_i.r; col++)
usr.bin/window/wwredrawwin.c
58
if (*smap++ == w->ww_index &&
usr.bin/window/wwscroll.c
107
nvis += w->ww_nvis[i];
usr.bin/window/wwscroll.c
182
wwredrawwin1(w, row1, row1x, dir);
usr.bin/window/wwscroll.c
183
wwredrawwin1(w, row2x - 1, row2 - leaveit, dir);
usr.bin/window/wwscroll.c
211
wwredrawwin1(w, row1 + leaveit, row1x + 1, dir);
usr.bin/window/wwscroll.c
212
wwredrawwin1(w, row2x, row2, dir);
usr.bin/window/wwscroll.c
224
wwredrawwin1(w, row1, row2 - leaveit, dir);
usr.bin/window/wwscroll.c
226
wwredrawwin1(w, row1 + leaveit, row2, dir);
usr.bin/window/wwscroll.c
43
wwscroll(struct ww *w, int n)
usr.bin/window/wwscroll.c
51
top = w->ww_b.t - n;
usr.bin/window/wwscroll.c
52
if (top > w->ww_w.t)
usr.bin/window/wwscroll.c
53
top = w->ww_w.t;
usr.bin/window/wwscroll.c
54
else if (top + w->ww_b.nr < w->ww_w.b)
usr.bin/window/wwscroll.c
55
top = w->ww_w.b - w->ww_b.nr;
usr.bin/window/wwscroll.c
56
n = abs(top - w->ww_b.t);
usr.bin/window/wwscroll.c
57
if (n < w->ww_i.nr) {
usr.bin/window/wwscroll.c
59
(void) wwscroll1(w, w->ww_i.t, w->ww_i.b, dir, 0);
usr.bin/window/wwscroll.c
60
w->ww_buf += dir;
usr.bin/window/wwscroll.c
61
w->ww_b.t -= dir;
usr.bin/window/wwscroll.c
62
w->ww_b.b -= dir;
usr.bin/window/wwscroll.c
65
w->ww_buf -= top - w->ww_b.t;
usr.bin/window/wwscroll.c
66
w->ww_b.t = top;
usr.bin/window/wwscroll.c
67
w->ww_b.b = top + w->ww_b.nr;
usr.bin/window/wwscroll.c
68
wwredrawwin(w);
usr.bin/window/wwscroll.c
78
wwscroll1(struct ww *w, int row1, int row2, int dir, int leaveit)
usr.bin/window/wwscroll.c
90
for (i = row1; i < row2 && w->ww_nvis[i] == 0; i++)
usr.bin/window/wwscroll.c
95
for (i = row2 - 1; i >= row1 && w->ww_nvis[i] == 0; i--)
usr.bin/window/wwsize.c
103
wwfree((char **)w->ww_win, w->ww_w.t);
usr.bin/window/wwsize.c
104
w->ww_win = win;
usr.bin/window/wwsize.c
106
wwfree((char **)w->ww_buf, w->ww_b.t);
usr.bin/window/wwsize.c
107
w->ww_buf = buf;
usr.bin/window/wwsize.c
109
if (w->ww_fmap != 0) {
usr.bin/window/wwsize.c
110
wwfree((char **)w->ww_fmap, w->ww_w.t);
usr.bin/window/wwsize.c
111
w->ww_fmap = fmap;
usr.bin/window/wwsize.c
113
free((char *)(w->ww_nvis + w->ww_w.t));
usr.bin/window/wwsize.c
114
w->ww_nvis = nvis;
usr.bin/window/wwsize.c
119
w->ww_w.b = w->ww_w.t + nrow;
usr.bin/window/wwsize.c
120
w->ww_w.r = w->ww_w.l + ncol;
usr.bin/window/wwsize.c
121
w->ww_w.nr = nrow;
usr.bin/window/wwsize.c
122
w->ww_w.nc = ncol;
usr.bin/window/wwsize.c
125
w->ww_b.b = w->ww_b.t + nline;
usr.bin/window/wwsize.c
126
w->ww_b.r = w->ww_b.l + ncol;
usr.bin/window/wwsize.c
127
w->ww_b.nr = nline;
usr.bin/window/wwsize.c
128
w->ww_b.nc = ncol;
usr.bin/window/wwsize.c
131
if ((i = w->ww_b.b - w->ww_w.b) < 0 ||
usr.bin/window/wwsize.c
132
(i = w->ww_cur.r - w->ww_w.b + 1) > 0) {
usr.bin/window/wwsize.c
133
w->ww_buf += i;
usr.bin/window/wwsize.c
134
w->ww_b.t -= i;
usr.bin/window/wwsize.c
135
w->ww_b.b -= i;
usr.bin/window/wwsize.c
136
w->ww_cur.r -= i;
usr.bin/window/wwsize.c
139
w->ww_i.b = MIN(w->ww_w.b, wwnrow);
usr.bin/window/wwsize.c
140
w->ww_i.r = MIN(w->ww_w.r, wwncol);
usr.bin/window/wwsize.c
141
w->ww_i.nr = w->ww_i.b - w->ww_i.t;
usr.bin/window/wwsize.c
142
w->ww_i.nc = w->ww_i.r - w->ww_i.l;
usr.bin/window/wwsize.c
148
if (w->ww_oflags & WWO_GLASS)
usr.bin/window/wwsize.c
150
if (w->ww_oflags & WWO_REVERSE)
usr.bin/window/wwsize.c
152
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwsize.c
153
for (j = w->ww_w.l; j < w->ww_w.r; j++)
usr.bin/window/wwsize.c
154
w->ww_win[i][j] = m;
usr.bin/window/wwsize.c
157
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwsize.c
158
for (j = w->ww_w.l; j < w->ww_w.r; j++)
usr.bin/window/wwsize.c
159
w->ww_fmap[i][j] = 0;
usr.bin/window/wwsize.c
161
j = m ? 0 : w->ww_w.nc;
usr.bin/window/wwsize.c
162
for (i = w->ww_w.t; i < w->ww_w.b; i++)
usr.bin/window/wwsize.c
163
w->ww_nvis[i] = j;
usr.bin/window/wwsize.c
167
if (ISSET(w->ww_wflags, WWW_HASCURSOR)) {
usr.bin/window/wwsize.c
168
CLR(w->ww_wflags, WWW_HASCURSOR);
usr.bin/window/wwsize.c
169
wwcursor(w, 1);
usr.bin/window/wwsize.c
174
if (w->ww_type == WWT_PTY && w->ww_pty >= 0)
usr.bin/window/wwsize.c
175
(void) wwsetttysize(w->ww_pty, nrow, ncol);
usr.bin/window/wwsize.c
179
wwfree(win, w->ww_w.t);
usr.bin/window/wwsize.c
181
wwfree(fmap, w->ww_w.t);
usr.bin/window/wwsize.c
183
wwfree((char **)buf, w->ww_b.t);
usr.bin/window/wwsize.c
43
wwsize(struct ww *w, int nrow, int ncol)
usr.bin/window/wwsize.c
56
win = wwalloc(w->ww_w.t, w->ww_w.l, nrow, ncol, sizeof (char));
usr.bin/window/wwsize.c
59
if (w->ww_fmap != 0) {
usr.bin/window/wwsize.c
60
fmap = wwalloc(w->ww_w.t, w->ww_w.l, nrow, ncol, sizeof (char));
usr.bin/window/wwsize.c
64
if (nrow > w->ww_b.nr || ncol > w->ww_b.nc) {
usr.bin/window/wwsize.c
65
nline = MAX(w->ww_b.nr, nrow);
usr.bin/window/wwsize.c
66
buf = (union ww_char **) wwalloc(w->ww_b.t, w->ww_b.l,
usr.bin/window/wwsize.c
76
nvis -= w->ww_w.t;
usr.bin/window/wwsize.c
83
b = w->ww_b.t + nline;
usr.bin/window/wwsize.c
84
r = w->ww_b.l + ncol;
usr.bin/window/wwsize.c
85
if (ncol < w->ww_b.nc)
usr.bin/window/wwsize.c
86
for (i = w->ww_b.t; i < w->ww_b.b; i++)
usr.bin/window/wwsize.c
87
for (j = w->ww_b.l; j < r; j++)
usr.bin/window/wwsize.c
88
buf[i][j] = w->ww_buf[i][j];
usr.bin/window/wwsize.c
90
for (i = w->ww_b.t; i < w->ww_b.b; i++) {
usr.bin/window/wwsize.c
91
for (j = w->ww_b.l; j < w->ww_b.r; j++)
usr.bin/window/wwsize.c
92
buf[i][j] = w->ww_buf[i][j];
usr.bin/window/wwsize.c
97
for (j = w->ww_b.l; j < r; j++)
usr.bin/window/wwunframe.c
39
wwunframe(struct ww *w)
usr.bin/window/wwunframe.c
43
for (i = w->ww_i.t; i < w->ww_i.b; i++) {
usr.bin/window/wwunframe.c
45
char *win = w->ww_win[i];
usr.bin/window/wwunframe.c
46
char *fmap = w->ww_fmap ? w->ww_fmap[i] : 0;
usr.bin/window/wwunframe.c
51
for (j = w->ww_i.l; j < w->ww_i.r; j++) {
usr.bin/window/wwunframe.c
57
if (smap[j] == w->ww_index) {
usr.bin/window/wwunframe.c
65
w->ww_nvis[i] = 0;
usr.bin/window/wwunframe.c
68
if (w->ww_forw != &wwhead)
usr.bin/window/wwunframe.c
69
wwdelete1(w->ww_forw,
usr.bin/window/wwunframe.c
70
w->ww_i.t, w->ww_i.b, w->ww_i.l, w->ww_i.r);
usr.bin/window/wwwrite.c
101
bp = &w->ww_buf[w->ww_cur.r][w->ww_cur.c];
usr.bin/window/wwwrite.c
102
i = w->ww_cur.c;
usr.bin/window/wwwrite.c
103
while (i < w->ww_w.r && p < q)
usr.bin/window/wwwrite.c
109
int tmp = 8 - ((i - w->ww_w.l) & 7);
usr.bin/window/wwwrite.c
115
| w->ww_modes << WWC_MSHIFT;
usr.bin/window/wwwrite.c
117
} else if (ISSET(w->ww_wflags, WWW_UNCTRL) &&
usr.bin/window/wwwrite.c
125
col = MAX(w->ww_cur.c, w->ww_i.l);
usr.bin/window/wwwrite.c
126
col1 = MIN(i, w->ww_i.r);
usr.bin/window/wwwrite.c
127
w->ww_cur.c = i;
usr.bin/window/wwwrite.c
128
if (w->ww_cur.r >= w->ww_i.t
usr.bin/window/wwwrite.c
129
&& w->ww_cur.r < w->ww_i.b) {
usr.bin/window/wwwrite.c
130
union ww_char *ns = wwns[w->ww_cur.r];
usr.bin/window/wwwrite.c
132
&wwsmap[w->ww_cur.r][col];
usr.bin/window/wwwrite.c
133
char *win = w->ww_win[w->ww_cur.r];
usr.bin/window/wwwrite.c
136
bp = w->ww_buf[w->ww_cur.r];
usr.bin/window/wwwrite.c
138
if (*smap++ == w->ww_index) {
usr.bin/window/wwwrite.c
144
wwtouched[w->ww_cur.r] |= WWU_TOUCHED;
usr.bin/window/wwwrite.c
147
if (w->ww_cur.c >= w->ww_w.r)
usr.bin/window/wwwrite.c
149
} else switch (w->ww_wstate) {
usr.bin/window/wwwrite.c
153
if (ISSET(w->ww_wflags, WWW_MAPNL))
usr.bin/window/wwwrite.c
155
w->ww_cur.c = w->ww_w.l;
usr.bin/window/wwwrite.c
158
if (++w->ww_cur.r >= w->ww_w.b) {
usr.bin/window/wwwrite.c
159
w->ww_cur.r = w->ww_w.b - 1;
usr.bin/window/wwwrite.c
160
if (w->ww_w.b < w->ww_b.b) {
usr.bin/window/wwwrite.c
161
(void) wwscroll1(w, w->ww_i.t,
usr.bin/window/wwwrite.c
162
w->ww_i.b, 1, 0);
usr.bin/window/wwwrite.c
163
w->ww_buf++;
usr.bin/window/wwwrite.c
164
w->ww_b.t--;
usr.bin/window/wwwrite.c
165
w->ww_b.b--;
usr.bin/window/wwwrite.c
167
wwdelline(w, w->ww_b.t);
usr.bin/window/wwwrite.c
171
if (--w->ww_cur.c < w->ww_w.l) {
usr.bin/window/wwwrite.c
172
w->ww_cur.c = w->ww_w.r - 1;
usr.bin/window/wwwrite.c
177
w->ww_cur.c = w->ww_w.l;
usr.bin/window/wwwrite.c
183
w->ww_wstate = 1;
usr.bin/window/wwwrite.c
188
w->ww_wstate = 0;
usr.bin/window/wwwrite.c
191
SET(w->ww_wflags, WWW_INSERT);
usr.bin/window/wwwrite.c
196
if (--w->ww_cur.r < w->ww_w.t) {
usr.bin/window/wwwrite.c
197
w->ww_cur.r = w->ww_w.t;
usr.bin/window/wwwrite.c
198
if (w->ww_w.t > w->ww_b.t) {
usr.bin/window/wwwrite.c
199
(void) wwscroll1(w, w->ww_i.t,
usr.bin/window/wwwrite.c
200
w->ww_i.b, -1, 0);
usr.bin/window/wwwrite.c
201
w->ww_buf--;
usr.bin/window/wwwrite.c
202
w->ww_b.t++;
usr.bin/window/wwwrite.c
203
w->ww_b.b++;
usr.bin/window/wwwrite.c
205
wwinsline(w, w->ww_b.t);
usr.bin/window/wwwrite.c
212
w->ww_cur.c++;
usr.bin/window/wwwrite.c
215
w->ww_buf -= w->ww_w.t - w->ww_b.t;
usr.bin/window/wwwrite.c
216
w->ww_b.t = w->ww_w.t;
usr.bin/window/wwwrite.c
217
w->ww_b.b = w->ww_b.t + w->ww_b.nr;
usr.bin/window/wwwrite.c
218
w->ww_cur.r = w->ww_w.t;
usr.bin/window/wwwrite.c
219
w->ww_cur.c = w->ww_w.l;
usr.bin/window/wwwrite.c
220
wwclreos(w, w->ww_w.t, w->ww_w.l);
usr.bin/window/wwwrite.c
224
w->ww_cur.r = w->ww_w.t;
usr.bin/window/wwwrite.c
225
w->ww_cur.c = w->ww_w.l;
usr.bin/window/wwwrite.c
228
wwclreos(w, w->ww_cur.r, w->ww_cur.c);
usr.bin/window/wwwrite.c
231
wwclreol(w, w->ww_cur.r, w->ww_cur.c);
usr.bin/window/wwwrite.c
235
wwinsline(w, w->ww_cur.r);
usr.bin/window/wwwrite.c
238
wwdelline(w, w->ww_cur.r);
usr.bin/window/wwwrite.c
241
wwdelchar(w, w->ww_cur.r, w->ww_cur.c);
usr.bin/window/wwwrite.c
244
CLR(w->ww_wflags, WWW_INSERT);
usr.bin/window/wwwrite.c
247
wwinschar(w, w->ww_cur.r, w->ww_cur.c, ' ', 0);
usr.bin/window/wwwrite.c
254
w->ww_wstate = 2;
usr.bin/window/wwwrite.c
261
w->ww_wstate = 4;
usr.bin/window/wwwrite.c
264
w->ww_wstate = 5;
usr.bin/window/wwwrite.c
269
w->ww_cur.r = w->ww_w.t +
usr.bin/window/wwwrite.c
270
(unsigned)(*p++ - ' ') % w->ww_w.nr;
usr.bin/window/wwwrite.c
271
w->ww_wstate = 3;
usr.bin/window/wwwrite.c
274
w->ww_cur.c = w->ww_w.l +
usr.bin/window/wwwrite.c
275
(unsigned)(*p++ - ' ') % w->ww_w.nc;
usr.bin/window/wwwrite.c
276
w->ww_wstate = 0;
usr.bin/window/wwwrite.c
279
w->ww_modes |= *p++ & wwavailmodes;
usr.bin/window/wwwrite.c
280
w->ww_wstate = 0;
usr.bin/window/wwwrite.c
283
w->ww_modes &= ~*p++;
usr.bin/window/wwwrite.c
284
w->ww_wstate = 0;
usr.bin/window/wwwrite.c
289
wwcursor(w, 1);
usr.bin/window/wwwrite.c
42
if (!ISSET(w->ww_wflags, WWW_NOUPDATE) && w->ww_cur.r >= 0 && \
usr.bin/window/wwwrite.c
43
w->ww_cur.r < wwnrow && wwtouched[w->ww_cur.r]) \
usr.bin/window/wwwrite.c
44
wwupdate1(w->ww_cur.r, w->ww_cur.r + 1)
usr.bin/window/wwwrite.c
56
wwwrite(struct ww *w, const char *p, int n)
usr.bin/window/wwwrite.c
64
hascursor = ISSET(w->ww_wflags, WWW_HASCURSOR);
usr.bin/window/wwwrite.c
66
wwcursor(w, 0);
usr.bin/window/wwwrite.c
67
while (p < q && !ISSET(w->ww_pflags, WWP_STOPPED) &&
usr.bin/window/wwwrite.c
68
(!wwinterrupt() || ISSET(w->ww_wflags, WWW_NOINTR))) {
usr.bin/window/wwwrite.c
75
if (w->ww_wstate == 0 &&
usr.bin/window/wwwrite.c
77
(ISSET(w->ww_wflags, WWW_UNCTRL) && isunctrl(*p)))) {
usr.bin/window/wwwrite.c
82
if (ISSET(w->ww_wflags, WWW_INSERT)) {
usr.bin/window/wwwrite.c
86
w->ww_cur.c += 8 -
usr.bin/window/wwwrite.c
87
((w->ww_cur.c - w->ww_w.l) & 7);
usr.bin/window/wwwrite.c
96
wwinschar(w, w->ww_cur.r, w->ww_cur.c,
usr.bin/window/wwwrite.c
97
*p++, w->ww_modes);
usr.sbin/arp/arp.c
657
#define NEXTADDR(w, s) \
usr.sbin/arp/arp.c
658
if (rtm->rtm_addrs & (w)) { \
usr.sbin/installer/dfuife_curses/curses_form.c
1032
if (c != NULL && ((w != NULL && w != cf->widget_focus) ||
usr.sbin/installer/dfuife_curses/curses_form.c
1038
notify_field_changed(c, cf, w);
usr.sbin/installer/dfuife_curses/curses_form.c
1057
cb_click_close_form(struct curses_widget *w __unused)
usr.sbin/installer/dfuife_curses/curses_form.c
110
struct curses_widget *w, *t;
usr.sbin/installer/dfuife_curses/curses_form.c
112
w = cf->widget_head;
usr.sbin/installer/dfuife_curses/curses_form.c
113
while (w != NULL) {
usr.sbin/installer/dfuife_curses/curses_form.c
114
t = w->next;
usr.sbin/installer/dfuife_curses/curses_form.c
115
curses_widget_free(w);
usr.sbin/installer/dfuife_curses/curses_form.c
116
w = t;
usr.sbin/installer/dfuife_curses/curses_form.c
142
curses_form_widget_prepare(struct curses_form *cf, struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
147
w->form = cf;
usr.sbin/installer/dfuife_curses/curses_form.c
153
if (w->flags & CURSES_WIDGET_CENTER)
usr.sbin/installer/dfuife_curses/curses_form.c
154
w->x = (cf->width - w->width) / 2;
usr.sbin/installer/dfuife_curses/curses_form.c
161
w->x, w->width, cf->width);
usr.sbin/installer/dfuife_curses/curses_form.c
162
if ((w->x + w->width + 1) > cf->width)
usr.sbin/installer/dfuife_curses/curses_form.c
163
cf->width = w->x + w->width + 1;
usr.sbin/installer/dfuife_curses/curses_form.c
180
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
182
w = curses_widget_new(x, y, width, type, text, size, flags);
usr.sbin/installer/dfuife_curses/curses_form.c
183
curses_form_widget_prepare(cf, w);
usr.sbin/installer/dfuife_curses/curses_form.c
186
cf->widget_head = w;
usr.sbin/installer/dfuife_curses/curses_form.c
188
cf->widget_tail->next = w;
usr.sbin/installer/dfuife_curses/curses_form.c
189
w->prev = cf->widget_tail;
usr.sbin/installer/dfuife_curses/curses_form.c
191
cf->widget_tail = w;
usr.sbin/installer/dfuife_curses/curses_form.c
193
return(w);
usr.sbin/installer/dfuife_curses/curses_form.c
207
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
209
w = curses_widget_new(x, y, width, type, text, size, flags);
usr.sbin/installer/dfuife_curses/curses_form.c
210
curses_form_widget_prepare(cw->form, w);
usr.sbin/installer/dfuife_curses/curses_form.c
212
w->prev = cw;
usr.sbin/installer/dfuife_curses/curses_form.c
213
w->next = cw->next;
usr.sbin/installer/dfuife_curses/curses_form.c
215
cw->form->widget_tail = w;
usr.sbin/installer/dfuife_curses/curses_form.c
217
cw->next->prev = w;
usr.sbin/installer/dfuife_curses/curses_form.c
218
cw->next = w;
usr.sbin/installer/dfuife_curses/curses_form.c
220
return(w);
usr.sbin/installer/dfuife_curses/curses_form.c
227
curses_form_widget_remove(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
229
if (w->prev == NULL)
usr.sbin/installer/dfuife_curses/curses_form.c
230
w->form->widget_head = w->next;
usr.sbin/installer/dfuife_curses/curses_form.c
232
w->prev->next = w->next;
usr.sbin/installer/dfuife_curses/curses_form.c
234
if (w->next == NULL)
usr.sbin/installer/dfuife_curses/curses_form.c
235
w->form->widget_tail = w->prev;
usr.sbin/installer/dfuife_curses/curses_form.c
237
w->next->prev = w->prev;
usr.sbin/installer/dfuife_curses/curses_form.c
239
w->next = NULL;
usr.sbin/installer/dfuife_curses/curses_form.c
240
w->prev = NULL;
usr.sbin/installer/dfuife_curses/curses_form.c
241
w->form = NULL;
usr.sbin/installer/dfuife_curses/curses_form.c
319
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
390
for (w = cf->widget_head; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
391
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_form.c
440
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
442
w = cf->widget_focus;
usr.sbin/installer/dfuife_curses/curses_form.c
449
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_form.c
461
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
463
w = cf->widget_focus;
usr.sbin/installer/dfuife_curses/curses_form.c
470
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_form.c
486
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
488
for (w = cf->widget_head; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
489
if (y == w->y && x >= w->x && x <= (w->x + w->width))
usr.sbin/installer/dfuife_curses/curses_form.c
490
return(w);
usr.sbin/installer/dfuife_curses/curses_form.c
503
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
505
for (w = cf->widget_head; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
506
if (curses_widget_can_take_focus(w))
usr.sbin/installer/dfuife_curses/curses_form.c
507
return(w->y);
usr.sbin/installer/dfuife_curses/curses_form.c
520
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
523
for (w = cf->widget_head; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
524
if (curses_widget_can_take_focus(w) && w->y > best_y) {
usr.sbin/installer/dfuife_curses/curses_form.c
525
best_y = w->y;
usr.sbin/installer/dfuife_curses/curses_form.c
538
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
540
for (w = cf->widget_head; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
541
if (curses_widget_can_take_focus(w) && y == w->y)
usr.sbin/installer/dfuife_curses/curses_form.c
542
return(w);
usr.sbin/installer/dfuife_curses/curses_form.c
555
struct curses_widget *w, *best = NULL;
usr.sbin/installer/dfuife_curses/curses_form.c
558
w = curses_form_widget_first_on_row(cf, y);
usr.sbin/installer/dfuife_curses/curses_form.c
559
if (w == NULL)
usr.sbin/installer/dfuife_curses/curses_form.c
562
for (best = w; w != NULL && w->y == y; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_form.c
563
if (!curses_widget_can_take_focus(w))
usr.sbin/installer/dfuife_curses/curses_form.c
565
dist = (w->x + w->width / 2) - x;
usr.sbin/installer/dfuife_curses/curses_form.c
569
best = w;
usr.sbin/installer/dfuife_curses/curses_form.c
582
struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
588
if (curses_widget_can_take_focus(lw) && lw->y < w->y)
usr.sbin/installer/dfuife_curses/curses_form.c
601
struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
607
if (curses_widget_can_take_focus(lw) && lw->y > w->y)
usr.sbin/installer/dfuife_curses/curses_form.c
621
struct curses_widget *w, *c;
usr.sbin/installer/dfuife_curses/curses_form.c
624
w = cf->widget_focus;
usr.sbin/installer/dfuife_curses/curses_form.c
625
if (curses_form_widget_count_below(cf, w) > 0) {
usr.sbin/installer/dfuife_curses/curses_form.c
638
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_form.c
651
struct curses_widget *w, *c;
usr.sbin/installer/dfuife_curses/curses_form.c
654
w = cf->widget_focus;
usr.sbin/installer/dfuife_curses/curses_form.c
655
if (curses_form_widget_count_above(cf, w) > 0) {
usr.sbin/installer/dfuife_curses/curses_form.c
668
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_form.c
709
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
711
w = curses_form_widget_closest_on_row(cf,
usr.sbin/installer/dfuife_curses/curses_form.c
714
if (w != NULL) {
usr.sbin/installer/dfuife_curses/curses_form.c
715
cf->widget_focus = w;
usr.sbin/installer/dfuife_curses/curses_form.c
716
cf->want_x = w->x + w->width / 2;
usr.sbin/installer/dfuife_curses/curses_form.c
717
cf->want_y = w->y;
usr.sbin/installer/dfuife_curses/curses_form.c
722
curses_form_widget_is_visible(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
726
wy = w->y + 1 - w->form->y_offset;
usr.sbin/installer/dfuife_curses/curses_form.c
728
if (wy < 1 || wy > w->form->height)
usr.sbin/installer/dfuife_curses/curses_form.c
735
curses_form_widget_ensure_visible(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
744
if (w->type == CURSES_TEXTBOX) {
usr.sbin/installer/dfuife_curses/curses_form.c
745
if (w->curpos - w->offset >= w->width - 2)
usr.sbin/installer/dfuife_curses/curses_form.c
746
w->offset = w->curpos - (w->width - 3);
usr.sbin/installer/dfuife_curses/curses_form.c
747
if (w->offset > w->curpos)
usr.sbin/installer/dfuife_curses/curses_form.c
748
w->offset = w->curpos;
usr.sbin/installer/dfuife_curses/curses_form.c
751
if (curses_form_widget_is_visible(w))
usr.sbin/installer/dfuife_curses/curses_form.c
754
wy = w->y + 1 - w->form->y_offset;
usr.sbin/installer/dfuife_curses/curses_form.c
758
else if (wy > w->form->height)
usr.sbin/installer/dfuife_curses/curses_form.c
759
dy = (wy - w->form->height);
usr.sbin/installer/dfuife_curses/curses_form.c
761
curses_form_scroll_delta(w->form, dx, dy);
usr.sbin/installer/dfuife_curses/curses_form.c
762
curses_form_draw(w->form);
usr.sbin/installer/dfuife_curses/curses_form.c
763
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_form.c
770
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
776
w = curses_form_widget_add(cf, 0, cf->height++, 0,
usr.sbin/installer/dfuife_curses/curses_form.c
778
curses_widget_set_click_cb(w, cb_click_close_form);
usr.sbin/installer/dfuife_curses/curses_form.c
793
struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_form.c
802
if (c == NULL || w == NULL)
usr.sbin/installer/dfuife_curses/curses_form.c
804
if (w->type != CURSES_TEXTBOX && w->type != CURSES_CHECKBOX)
usr.sbin/installer/dfuife_curses/curses_form.c
807
field = w->userdata;
usr.sbin/installer/dfuife_curses/curses_form.c
814
dfui_encode_string(buf, curses_widget_xlat_value(w));
usr.sbin/installer/dfuife_curses/curses_form.c
845
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_form.c
850
w = cf->widget_focus;
usr.sbin/installer/dfuife_curses/curses_util.c
149
curses_colors_set(WINDOW *w, int a)
usr.sbin/installer/dfuife_curses/curses_util.c
152
wattrset(w, COLOR_PAIR(colors_tab[a].pair_no));
usr.sbin/installer/dfuife_curses/curses_util.c
154
wattron(w, A_BOLD);
usr.sbin/installer/dfuife_curses/curses_util.c
156
wattroff(w, A_BOLD);
usr.sbin/installer/dfuife_curses/curses_util.c
160
curses_window_blank(WINDOW *w)
usr.sbin/installer/dfuife_curses/curses_util.c
165
wmove(w, i, 0);
usr.sbin/installer/dfuife_curses/curses_util.c
166
whline(w, ' ', xmax);
usr.sbin/installer/dfuife_curses/curses_util.c
169
wrefresh(w);
usr.sbin/installer/dfuife_curses/curses_util.c
198
curses_load_backdrop(WINDOW *w, const char *filename)
usr.sbin/installer/dfuife_curses/curses_util.c
205
getmaxyx(w, my, mx);
usr.sbin/installer/dfuife_curses/curses_util.c
206
wclear(w);
usr.sbin/installer/dfuife_curses/curses_util.c
207
curses_colors_set(w, CURSES_COLORS_BACKDROP);
usr.sbin/installer/dfuife_curses/curses_util.c
208
curses_window_blank(w);
usr.sbin/installer/dfuife_curses/curses_util.c
216
mvwaddnstr(w, row++, 0, line, mx);
usr.sbin/installer/dfuife_curses/curses_widget.c
100
w->text = aura_malloc(size, "w->text");
usr.sbin/installer/dfuife_curses/curses_widget.c
101
strcpy(w->text, text);
usr.sbin/installer/dfuife_curses/curses_widget.c
103
w->text = aura_strdup(text);
usr.sbin/installer/dfuife_curses/curses_widget.c
104
w->size = strlen(text) + 1;
usr.sbin/installer/dfuife_curses/curses_widget.c
108
w->curpos = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
109
w->editable = 1;
usr.sbin/installer/dfuife_curses/curses_widget.c
110
w->obscured = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
111
w->offset = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
112
w->amount = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
113
w->spin = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
114
w->tooltip = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
115
w->user_id = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
116
w->userdata = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
118
w->click_cb = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
120
return(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
128
curses_widget_free(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
130
if (w->tooltip != NULL)
usr.sbin/installer/dfuife_curses/curses_widget.c
131
free(w->tooltip);
usr.sbin/installer/dfuife_curses/curses_widget.c
132
free(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
133
AURA_FREE(w, curses_widget);
usr.sbin/installer/dfuife_curses/curses_widget.c
137
curses_widget_tooltip_set(struct curses_widget *w, const char *tooltip)
usr.sbin/installer/dfuife_curses/curses_widget.c
139
if (w->tooltip != NULL)
usr.sbin/installer/dfuife_curses/curses_widget.c
140
free(w->tooltip);
usr.sbin/installer/dfuife_curses/curses_widget.c
141
w->tooltip = aura_strdup(tooltip);
usr.sbin/installer/dfuife_curses/curses_widget.c
149
curses_widget_draw(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
154
struct curses_form *cf = w->form;
usr.sbin/installer/dfuife_curses/curses_widget.c
156
wx = w->x + 1 - cf->x_offset;
usr.sbin/installer/dfuife_curses/curses_widget.c
157
wy = w->y + 1 - cf->y_offset;
usr.sbin/installer/dfuife_curses/curses_widget.c
163
if (!curses_form_widget_is_visible(w))
usr.sbin/installer/dfuife_curses/curses_widget.c
168
curses_colors_set(cf->win, w == cf->widget_focus ?
usr.sbin/installer/dfuife_curses/curses_widget.c
171
switch (w->type) {
usr.sbin/installer/dfuife_curses/curses_widget.c
174
waddnstr(cf->win, w->text, w->width);
usr.sbin/installer/dfuife_curses/curses_widget.c
180
charpos = w->offset;
usr.sbin/installer/dfuife_curses/curses_widget.c
181
len = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
182
for (x = 0; x < w->width - 2; x++) {
usr.sbin/installer/dfuife_curses/curses_widget.c
184
waddch(cf->win, w->obscured ?
usr.sbin/installer/dfuife_curses/curses_widget.c
185
'*' : w->text[charpos]);
usr.sbin/installer/dfuife_curses/curses_widget.c
191
curses_colors_set(cf->win, w == cf->widget_focus ?
usr.sbin/installer/dfuife_curses/curses_widget.c
197
if (w->curpos - w->offset < w->width - 2) {
usr.sbin/installer/dfuife_curses/curses_widget.c
198
wmove(cf->win, w->y + 1 - cf->y_offset,
usr.sbin/installer/dfuife_curses/curses_widget.c
199
w->x + 2 - cf->x_offset + w->curpos - w->offset);
usr.sbin/installer/dfuife_curses/curses_widget.c
201
wmove(cf->win, w->y + 1 - cf->y_offset,
usr.sbin/installer/dfuife_curses/curses_widget.c
202
w->x + 2 - cf->x_offset + w->width - 2);
usr.sbin/installer/dfuife_curses/curses_widget.c
208
waddnstr(cf->win, w->text, w->width - 4);
usr.sbin/installer/dfuife_curses/curses_widget.c
210
if (isprint(w->accel)) {
usr.sbin/installer/dfuife_curses/curses_widget.c
211
for (i = 0; w->text[i] != '\0'; i++) {
usr.sbin/installer/dfuife_curses/curses_widget.c
212
if (toupper(w->text[i]) == w->accel) {
usr.sbin/installer/dfuife_curses/curses_widget.c
214
curses_colors_set(cf->win, w == cf->widget_focus ?
usr.sbin/installer/dfuife_curses/curses_widget.c
216
waddch(cf->win, w->text[i]);
usr.sbin/installer/dfuife_curses/curses_widget.c
225
snprintf(p, 5, "%3d%%", w->amount);
usr.sbin/installer/dfuife_curses/curses_widget.c
226
cutoff = (w->amount * (w->width - 2)) / 100;
usr.sbin/installer/dfuife_curses/curses_widget.c
227
fchpos = ((w->width - 2) / 2) - 2;
usr.sbin/installer/dfuife_curses/curses_widget.c
228
for (x = 0; x < w->width - 2; x++) {
usr.sbin/installer/dfuife_curses/curses_widget.c
247
waddstr(cf->win, w->amount ? "X" : " ");
usr.sbin/installer/dfuife_curses/curses_widget.c
255
curses_widget_draw_tooltip(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
257
if (w->tooltip != NULL)
usr.sbin/installer/dfuife_curses/curses_widget.c
258
curses_bar_set_text(statusbar, w->tooltip);
usr.sbin/installer/dfuife_curses/curses_widget.c
266
curses_widget_can_take_focus(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
268
if (w->type == CURSES_LABEL || w->type == CURSES_PROGRESS)
usr.sbin/installer/dfuife_curses/curses_widget.c
274
curses_widget_set_click_cb(struct curses_widget *w,
usr.sbin/installer/dfuife_curses/curses_widget.c
277
w->click_cb = callback;
usr.sbin/installer/dfuife_curses/curses_widget.c
288
curses_widget_click(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
290
if ((w->type != CURSES_BUTTON && w->type != CURSES_TEXTBOX) ||
usr.sbin/installer/dfuife_curses/curses_widget.c
291
w->click_cb == NULL)
usr.sbin/installer/dfuife_curses/curses_widget.c
294
return(w->click_cb(w));
usr.sbin/installer/dfuife_curses/curses_widget.c
300
curses_textbox_advance_char(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
302
if (w->text[w->curpos] != '\0') {
usr.sbin/installer/dfuife_curses/curses_widget.c
303
w->curpos++;
usr.sbin/installer/dfuife_curses/curses_widget.c
304
if ((w->curpos - w->offset) >= (w->width - 2))
usr.sbin/installer/dfuife_curses/curses_widget.c
305
w->offset++;
usr.sbin/installer/dfuife_curses/curses_widget.c
306
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
307
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
315
curses_textbox_retreat_char(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
317
if (w->curpos > 0) {
usr.sbin/installer/dfuife_curses/curses_widget.c
318
w->curpos--;
usr.sbin/installer/dfuife_curses/curses_widget.c
319
if (w->curpos < w->offset)
usr.sbin/installer/dfuife_curses/curses_widget.c
320
w->offset--;
usr.sbin/installer/dfuife_curses/curses_widget.c
321
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
322
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
330
curses_textbox_home(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
332
w->curpos = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
333
w->offset = 0;
usr.sbin/installer/dfuife_curses/curses_widget.c
334
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
335
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
340
curses_textbox_end(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
342
w->curpos = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
343
while ((w->curpos - w->offset) >= (w->width - 2)) {
usr.sbin/installer/dfuife_curses/curses_widget.c
344
w->offset++;
usr.sbin/installer/dfuife_curses/curses_widget.c
346
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
347
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
352
curses_textbox_insert_char(struct curses_widget *w, char key)
usr.sbin/installer/dfuife_curses/curses_widget.c
356
if (!w->editable)
usr.sbin/installer/dfuife_curses/curses_widget.c
359
len = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
360
if (len == (w->size - 1))
usr.sbin/installer/dfuife_curses/curses_widget.c
363
w->text[len + 1] = '\0';
usr.sbin/installer/dfuife_curses/curses_widget.c
364
for (i = len; i > w->curpos; i--)
usr.sbin/installer/dfuife_curses/curses_widget.c
365
w->text[i] = w->text[i - 1];
usr.sbin/installer/dfuife_curses/curses_widget.c
366
w->text[w->curpos++] = key;
usr.sbin/installer/dfuife_curses/curses_widget.c
367
if ((w->curpos - w->offset) >= (w->width - 2))
usr.sbin/installer/dfuife_curses/curses_widget.c
368
w->offset++;
usr.sbin/installer/dfuife_curses/curses_widget.c
369
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
370
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
375
curses_textbox_backspace_char(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
379
if (!w->editable)
usr.sbin/installer/dfuife_curses/curses_widget.c
382
len = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
383
if (w->curpos == 0)
usr.sbin/installer/dfuife_curses/curses_widget.c
386
for (i = w->curpos; i <= len; i++)
usr.sbin/installer/dfuife_curses/curses_widget.c
387
w->text[i - 1] = w->text[i];
usr.sbin/installer/dfuife_curses/curses_widget.c
388
w->curpos--;
usr.sbin/installer/dfuife_curses/curses_widget.c
389
if (w->curpos < w->offset)
usr.sbin/installer/dfuife_curses/curses_widget.c
390
w->offset--;
usr.sbin/installer/dfuife_curses/curses_widget.c
391
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
392
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
397
curses_textbox_delete_char(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
401
if (!w->editable)
usr.sbin/installer/dfuife_curses/curses_widget.c
404
len = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
405
if (w->curpos == len)
usr.sbin/installer/dfuife_curses/curses_widget.c
408
for (i = w->curpos + 1; i <= len; i++)
usr.sbin/installer/dfuife_curses/curses_widget.c
409
w->text[i - 1] = w->text[i];
usr.sbin/installer/dfuife_curses/curses_widget.c
410
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
411
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
416
curses_textbox_set_text(struct curses_widget *w, const char *text)
usr.sbin/installer/dfuife_curses/curses_widget.c
418
strlcpy(w->text, text, w->size);
usr.sbin/installer/dfuife_curses/curses_widget.c
419
w->curpos = strlen(w->text);
usr.sbin/installer/dfuife_curses/curses_widget.c
420
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
421
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
428
curses_checkbox_toggle(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
430
if (!w->editable)
usr.sbin/installer/dfuife_curses/curses_widget.c
432
w->amount = !w->amount;
usr.sbin/installer/dfuife_curses/curses_widget.c
433
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
434
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
439
curses_checkbox_set(struct curses_widget *w, const char *value)
usr.sbin/installer/dfuife_curses/curses_widget.c
443
w->amount = (value[0] == 'Y' ? 1 : 0);
usr.sbin/installer/dfuife_curses/curses_widget.c
444
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/curses_widget.c
445
curses_form_refresh(w->form);
usr.sbin/installer/dfuife_curses/curses_widget.c
454
curses_progress_spin(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_widget.c
456
struct curses_form *cf = w->form;
usr.sbin/installer/dfuife_curses/curses_widget.c
459
if (w->type != CURSES_PROGRESS)
usr.sbin/installer/dfuife_curses/curses_widget.c
462
wx = w->x + 1 - cf->x_offset;
usr.sbin/installer/dfuife_curses/curses_widget.c
463
wy = w->y + 1 - cf->y_offset;
usr.sbin/installer/dfuife_curses/curses_widget.c
465
w->spin = (w->spin + 1) % 4;
usr.sbin/installer/dfuife_curses/curses_widget.c
467
mvwaddch(cf->win, wy, wx + 1, spinny[w->spin]);
usr.sbin/installer/dfuife_curses/curses_widget.c
69
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_widget.c
71
AURA_MALLOC(w, curses_widget);
usr.sbin/installer/dfuife_curses/curses_widget.c
73
w->form = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
89
w->x = x;
usr.sbin/installer/dfuife_curses/curses_widget.c
90
w->y = y;
usr.sbin/installer/dfuife_curses/curses_widget.c
91
w->width = width;
usr.sbin/installer/dfuife_curses/curses_widget.c
92
w->type = type;
usr.sbin/installer/dfuife_curses/curses_widget.c
93
w->next = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
94
w->prev = NULL;
usr.sbin/installer/dfuife_curses/curses_widget.c
95
w->flags = flags;
usr.sbin/installer/dfuife_curses/curses_widget.c
96
w->accel = '\0';
usr.sbin/installer/dfuife_curses/curses_widget.c
98
if (w->type == CURSES_TEXTBOX) {
usr.sbin/installer/dfuife_curses/curses_widget.c
99
w->size = size;
usr.sbin/installer/dfuife_curses/curses_xlat.c
141
cb_click_select_option(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_xlat.c
143
struct dfui_field *fi = w->userdata;
usr.sbin/installer/dfuife_curses/curses_xlat.c
164
curses_textbox_set_text(w, cw->text);
usr.sbin/installer/dfuife_curses/curses_xlat.c
196
cb_click_insert_row(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_xlat.c
198
struct curses_form *cf = w->form;
usr.sbin/installer/dfuife_curses/curses_xlat.c
200
int id = w->user_id;
usr.sbin/installer/dfuife_curses/curses_xlat.c
201
int top = w->y;
usr.sbin/installer/dfuife_curses/curses_xlat.c
209
for (lw = w; lw != NULL; lw = lw->prev) {
usr.sbin/installer/dfuife_curses/curses_xlat.c
397
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_xlat.c
407
for (w = row_start; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_xlat.c
408
row_width += w->width + 2;
usr.sbin/installer/dfuife_curses/curses_xlat.c
416
for (w = row_start; w != NULL; w = w->next) {
usr.sbin/installer/dfuife_curses/curses_xlat.c
417
w->x += row_offset;
usr.sbin/installer/dfuife_curses/curses_xlat.c
437
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_xlat.c
465
w = curses_form_widget_add(cf, left_acc,
usr.sbin/installer/dfuife_curses/curses_xlat.c
467
curses_widget_tooltip_set(w,
usr.sbin/installer/dfuife_curses/curses_xlat.c
473
w->accel = '\e';
usr.sbin/installer/dfuife_curses/curses_xlat.c
475
w->accel = toupper(accel[0]);
usr.sbin/installer/dfuife_curses/curses_xlat.c
479
left_acc += (w->width + 2);
usr.sbin/installer/dfuife_curses/curses_xlat.c
480
w->user_id = -1;
usr.sbin/installer/dfuife_curses/curses_xlat.c
481
w->userdata = a;
usr.sbin/installer/dfuife_curses/curses_xlat.c
482
curses_widget_set_click_cb(w, cb_click_close_form);
usr.sbin/installer/dfuife_curses/curses_xlat.c
484
row_start = w;
usr.sbin/installer/dfuife_curses/curses_xlat.c
69
cb_click_remove_row(struct curses_widget *w)
usr.sbin/installer/dfuife_curses/curses_xlat.c
71
struct curses_form *cf = w->form;
usr.sbin/installer/dfuife_curses/curses_xlat.c
73
int id = w->user_id;
usr.sbin/installer/dfuife_curses/curses_xlat.c
869
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/curses_xlat.c
891
w = curses_form_widget_add(pbar->form, 0, ++last_y, 58,
usr.sbin/installer/dfuife_curses/curses_xlat.c
893
strcpy_max(w->text, dfui_progress_get_msg_line(pr), 58);
usr.sbin/installer/dfuife_curses/curses_xlat.c
897
curses_form_widget_ensure_visible(w);
usr.sbin/installer/dfuife_curses/curses_xlat.c
898
curses_widget_draw(w);
usr.sbin/installer/dfuife_curses/main.c
141
struct curses_widget *w;
usr.sbin/installer/dfuife_curses/main.c
293
w = curses_form_widget_add(pf, 0, pf->int_height, 0,
usr.sbin/installer/dfuife_curses/main.c
297
curses_widget_set_click_cb(w, cb_click_close_form);
usr.sbin/installer/dfuife_curses/main.c
298
pf->widget_focus = w;
usr.sbin/installer/dfuife_curses/main.c
299
curses_form_widget_ensure_visible(w);
usr.sbin/installer/dfuife_curses/main.c
300
curses_widget_draw(w);
usr.sbin/lpr/lpc/lpc.c
288
int i, j, w;
usr.sbin/lpr/lpc/lpc.c
312
w = strlen(c->c_name);
usr.sbin/lpr/lpc/lpc.c
313
while (w < width) {
usr.sbin/lpr/lpc/lpc.c
314
w = (w + 8) &~ 7;
usr.sbin/makefs/cd9660/cd9660_conversion.c
56
cd9660_721(uint16_t w, unsigned char *twochar)
usr.sbin/makefs/cd9660/cd9660_conversion.c
59
w = bswap16(w);
usr.sbin/makefs/cd9660/cd9660_conversion.c
61
memcpy(twochar,&w,2);
usr.sbin/makefs/cd9660/cd9660_conversion.c
65
cd9660_731(uint32_t w, unsigned char *fourchar)
usr.sbin/makefs/cd9660/cd9660_conversion.c
68
w = bswap32(w);
usr.sbin/makefs/cd9660/cd9660_conversion.c
70
memcpy(fourchar,&w,4);
usr.sbin/makefs/cd9660/cd9660_conversion.c
75
cd9660_722(uint16_t w, unsigned char *twochar)
usr.sbin/makefs/cd9660/cd9660_conversion.c
78
w = bswap16(w);
usr.sbin/makefs/cd9660/cd9660_conversion.c
80
memcpy(twochar,&w,2);
usr.sbin/makefs/cd9660/cd9660_conversion.c
84
cd9660_732(uint32_t w, unsigned char *fourchar)
usr.sbin/makefs/cd9660/cd9660_conversion.c
87
w = bswap32(w);
usr.sbin/makefs/cd9660/cd9660_conversion.c
89
memcpy(fourchar,&w,4);
usr.sbin/makefs/hammer2/zlib/hammer2_zlib_trees.c
176
#define put_short(s, w) { \
usr.sbin/makefs/hammer2/zlib/hammer2_zlib_trees.c
177
put_byte(s, (uch)((w) & 0xff)); \
usr.sbin/makefs/hammer2/zlib/hammer2_zlib_trees.c
178
put_byte(s, (uch)((ush)(w) >> 8)); \
usr.sbin/ndp/ndp.c
879
#define NEXTADDR(w, s) \
usr.sbin/ndp/ndp.c
880
if (rtm->rtm_addrs & (w)) { \
usr.sbin/pfctl/parse.y
1029
$$.b2 = $$.w = 0;
usr.sbin/pfctl/parse.y
221
u_int16_t w;
usr.sbin/pfctl/parse.y
2350
filter_opts.flags.w |= $1.w;
usr.sbin/pfctl/parse.y
2461
action : PASS { $$.b1 = PF_PASS; $$.b2 = $$.w = 0; }
usr.sbin/pfctl/parse.y
2467
$$.w = returnicmpdefault;
usr.sbin/pfctl/parse.y
2472
$$.w = 0;
usr.sbin/pfctl/parse.y
2477
$$.w = 0;
usr.sbin/pfctl/parse.y
2486
$$.w = $4;
usr.sbin/pfctl/parse.y
2491
$$.w = returnicmpdefault;
usr.sbin/pfctl/parse.y
2496
$$.w = returnicmpdefault;
usr.sbin/pfctl/parse.y
2501
$$.w = $3;
usr.sbin/pfctl/parse.y
2506
$$.w = returnicmpdefault;
usr.sbin/pfctl/parse.y
2511
$$.w = $3;
usr.sbin/pfctl/parse.y
2516
$$.w = returnicmpdefault;
usr.sbin/pfctl/parse.y
364
u_int16_t w;
usr.sbin/pfctl/parse.y
3886
$$.w = $3.b2;
usr.sbin/pfctl/parse.y
3899
$$.w = $3.b2;
usr.sbin/pfctl/parse.y
6068
parseicmpspec(char *w, sa_family_t af)
usr.sbin/pfctl/parse.y
6079
if (atoul(w, &ulval) == -1) {
usr.sbin/pfctl/parse.y
6080
if ((p = geticmpcodebyname(icmptype, w, af)) == NULL) {
usr.sbin/pfctl/parse.y
6081
yyerror("unknown icmp code %s", w);
usr.sbin/pfctl/pfctl_parser.c
226
geticmptypebyname(char *w, sa_family_t af)
usr.sbin/pfctl/pfctl_parser.c
232
if (!strcmp(w, icmp_type[i].name))
usr.sbin/pfctl/pfctl_parser.c
237
if (!strcmp(w, icmp6_type[i].name))
usr.sbin/pfctl/pfctl_parser.c
266
geticmpcodebyname(u_long type, char *w, sa_family_t af)
usr.sbin/pfctl/pfctl_parser.c
273
!strcmp(w, icmp_code[i].name))
usr.sbin/pfctl/pfctl_parser.c
279
!strcmp(w, icmp6_code[i].name))
usr.sbin/ppp/bundle.c
451
bundle_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
usr.sbin/ppp/bundle.c
493
result += descriptor_UpdateSet(&bundle->radius.desc, r, w, e, n);
usr.sbin/ppp/bundle.c
498
result += descriptor_UpdateSet(&dl->desc, r, w, e, n);
usr.sbin/ppp/bundle.c
505
result += descriptor_UpdateSet(&bundle->ncp.mp.server.desc, r, w, e, n);
usr.sbin/ppp/chap.c
396
chap_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w __unused,
usr.sbin/ppp/chat.c
141
chat_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
usr.sbin/ppp/chat.c
269
return chat_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/chat.c
304
return chat_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/chat.c
321
return physical_doUpdateSet(&c->physical->desc, NULL, w, e, n, 1);
usr.sbin/ppp/datalink.c
250
datalink_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
usr.sbin/ppp/datalink.c
294
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
339
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
347
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
358
result = descriptor_UpdateSet(&dl->chat.desc, r, w, e, n);
usr.sbin/ppp/datalink.c
368
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
374
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
378
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
395
return datalink_UpdateSet(d, r, w, e, n);
usr.sbin/ppp/datalink.c
406
result = descriptor_UpdateSet(&dl->chap.desc, r, w, e, n) +
usr.sbin/ppp/datalink.c
407
descriptor_UpdateSet(&dl->physical->desc, r, w, e, n);
usr.sbin/ppp/datalink.c
414
datalink_RemoveFromSet(struct datalink *dl, fd_set *r, fd_set *w, fd_set *e)
usr.sbin/ppp/datalink.c
416
return physical_RemoveFromSet(dl->physical, r, w, e);
usr.sbin/ppp/descriptor.h
51
#define descriptor_UpdateSet(d, r, w, e, n) ((*(d)->UpdateSet)(d, r, w, e, n))
usr.sbin/ppp/ether.c
144
ether_RemoveFromSet(struct physical *p, fd_set *r, fd_set *w, fd_set *e)
usr.sbin/ppp/ether.c
159
result += physical_RemoveFromSet(p, r, w, e);
usr.sbin/ppp/ether.c
383
ether_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
usr.sbin/ppp/ether.c
396
result += physical_doUpdateSet(d, r, w, e, n, 0);
usr.sbin/ppp/mp.c
1041
mpserver_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
usr.sbin/ppp/mp.c
1053
result -= datalink_RemoveFromSet(s->send.dl, r, w, e);
usr.sbin/ppp/netgraph.c
256
ng_RemoveFromSet(struct physical *p, fd_set *r, fd_set *w, fd_set *e)
usr.sbin/ppp/netgraph.c
271
result += physical_RemoveFromSet(p, r, w, e);
usr.sbin/ppp/netgraph.c
360
ng_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
usr.sbin/ppp/netgraph.c
378
result = physical_doUpdateSet(d, r, w, e, n, 0);
usr.sbin/ppp/physical.c
137
physical_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
usr.sbin/ppp/physical.c
140
return physical_doUpdateSet(d, r, w, e, n, 0);
usr.sbin/ppp/physical.c
823
physical_doUpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e,
usr.sbin/ppp/physical.c
841
if (w && (force || link_QueueLen(&p->link) || p->out)) {
usr.sbin/ppp/physical.c
842
FD_SET(p->fd, w);
usr.sbin/ppp/physical.c
854
physical_RemoveFromSet(struct physical *p, fd_set *r, fd_set *w, fd_set *e)
usr.sbin/ppp/physical.c
857
return (*p->handler->removefromset)(p, r, w, e);
usr.sbin/ppp/physical.c
873
if (w && FD_ISSET(p->fd, w)) {
usr.sbin/ppp/physical.c
874
FD_CLR(p->fd, w);
usr.sbin/ppp/prompt.c
133
prompt_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w __unused, fd_set *e, int *n)
usr.sbin/ppp/radius.c
571
radius_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w __unused, fd_set *e __unused, int *n)
usr.sbin/ppp/server.c
52
server_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
usr.sbin/ppp/server.c
68
sets += descriptor_UpdateSet(&p->desc, r, w, e, n);
usr.sbin/rwhod/rwhod.c
690
const struct whod *w = (const struct whod *)buf;
usr.sbin/rwhod/rwhod.c
700
printf("hostname %s %s\n", w->wd_hostname,
usr.sbin/rwhod/rwhod.c
701
interval(ntohl(w->wd_sendtime) - ntohl(w->wd_boottime), " up"));
usr.sbin/rwhod/rwhod.c
703
ntohl(w->wd_loadav[0]) / 100.0, ntohl(w->wd_loadav[1]) / 100.0,
usr.sbin/rwhod/rwhod.c
704
ntohl(w->wd_loadav[2]) / 100.0);
usr.sbin/rwhod/rwhod.c
706
for (we = w->wd_we, cc /= sizeof(struct whoent); cc > 0; cc--, we++) {
usr.sbin/rwhod/rwhod.c
711
w->wd_hostname, we->we_utmp.out_line,
usr.sbin/traceroute/traceroute.c
1114
u_short *w = addr, answer;
usr.sbin/traceroute/traceroute.c
1124
sum += *w++;
usr.sbin/traceroute/traceroute.c
1130
sum += *(u_char *)w;
usr.sbin/vidcontrol/vidcontrol.c
356
int h, i, size, w;
usr.sbin/vidcontrol/vidcontrol.c
366
int w;
usr.sbin/vidcontrol/vidcontrol.c
392
if (sscanf(type, "%dx%d", &w, &h) == 2) {
usr.sbin/vidcontrol/vidcontrol.c
393
for (i = 0; sizes[i].w != 0; i++) {
usr.sbin/vidcontrol/vidcontrol.c
394
if (sizes[i].w == w && sizes[i].h == h) {
usr.sbin/vidcontrol/vidcontrol.c
420
for (i = 0; sizes[i].w != 0; i++) {
usr.sbin/vidcontrol/vidcontrol.c
50
#define DATASIZE(x) ((x).w * (x).h * 256 / 8)