bin/chio/chio.c
486
int i, chet, schet, echet, c;
bin/chio/chio.c
492
while ((c = getopt(argc, argv, "SsvVa")) != -1) {
bin/chio/chio.c
493
switch (c) {
bin/chio/parse.y
190
int c, next;
bin/chio/parse.y
195
c = (unsigned char)parsebuf[parseindex++];
bin/chio/parse.y
196
if (c != '\0')
bin/chio/parse.y
197
return (c);
bin/chio/parse.y
207
if ((c = getc(file->stream)) == EOF) {
bin/chio/parse.y
214
return (c);
bin/chio/parse.y
217
while ((c = getc(file->stream)) == '\\') {
bin/chio/parse.y
220
c = next;
bin/chio/parse.y
227
while (c == EOF) {
bin/chio/parse.y
230
c = getc(file->stream);
bin/chio/parse.y
232
return (c);
bin/chio/parse.y
236
lungetc(int c)
bin/chio/parse.y
238
if (c == EOF)
bin/chio/parse.y
243
return (c);
bin/chio/parse.y
247
pushback_buffer[pushback_index++] = c;
bin/chio/parse.y
248
return (c);
bin/chio/parse.y
254
int c;
bin/chio/parse.y
261
c = lgetc(0);
bin/chio/parse.y
262
if (c == '\n') {
bin/chio/parse.y
266
if (c == EOF)
bin/chio/parse.y
277
int quotec, next, c;
bin/chio/parse.y
281
while ((c = lgetc(0)) == ' ' || c == '\t')
bin/chio/parse.y
285
if (c == '#')
bin/chio/parse.y
286
while ((c = lgetc(0)) != '\n' && c != EOF)
bin/chio/parse.y
289
switch (c) {
bin/chio/parse.y
292
quotec = c;
bin/chio/parse.y
294
if ((c = lgetc(quotec)) == EOF)
bin/chio/parse.y
296
if (c == '\n') {
bin/chio/parse.y
299
} else if (c == '\\') {
bin/chio/parse.y
302
if (next == quotec || c == ' ' || c == '\t')
bin/chio/parse.y
303
c = next;
bin/chio/parse.y
308
} else if (c == quotec) {
bin/chio/parse.y
311
} else if (c == '\0') {
bin/chio/parse.y
319
*p++ = c;
bin/chio/parse.y
330
if (c == '-' || isdigit(c)) {
bin/chio/parse.y
332
*p++ = c;
bin/chio/parse.y
337
} while ((c = lgetc(0)) != EOF && isdigit(c));
bin/chio/parse.y
338
lungetc(c);
bin/chio/parse.y
341
if (c == EOF || allowed_to_end_number(c)) {
bin/chio/parse.y
357
c = (unsigned char)*--p;
bin/chio/parse.y
358
if (c == '-')
bin/chio/parse.y
359
return (c);
bin/chio/parse.y
369
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
bin/chio/parse.y
371
*p++ = c;
bin/chio/parse.y
376
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
bin/chio/parse.y
377
lungetc(c);
bin/chio/parse.y
384
if (c == '\n') {
bin/chio/parse.y
388
if (c == EOF)
bin/chio/parse.y
390
return (c);
bin/csh/alloc.c
55
xreallocarray(void * p, size_t c, size_t n)
bin/csh/alloc.c
59
if ((ptr = reallocarray(p, c, n)) == NULL) {
bin/csh/char.h
55
#define cmap(c, bits) \
bin/csh/char.h
56
(((c) & QUOTE) ? 0 : (_cmap[(unsigned char)(c)] & (bits)))
bin/csh/char.h
58
#define isglob(c) cmap(c, _GLOB)
bin/csh/char.h
59
#define letter(c) (((c) & QUOTE) ? 0 : \
bin/csh/char.h
60
(isalpha((unsigned char) (c)) || (c) == '_'))
bin/csh/char.h
61
#define alnum(c) (((c) & QUOTE) ? 0 : \
bin/csh/char.h
62
(isalnum((unsigned char) (c)) || (c) == '_'))
bin/csh/char.h
63
#define Isspace(c) (((c) & QUOTE) ? 0 : isspace((unsigned char) (c)))
bin/csh/char.h
64
#define Isdigit(c) (((c) & QUOTE) ? 0 : isdigit((unsigned char) (c)))
bin/csh/char.h
65
#define Isalpha(c) (((c) & QUOTE) ? 0 : isalpha((unsigned char) (c)))
bin/csh/char.h
66
#define Islower(c) (((c) & QUOTE) ? 0 : islower((unsigned char) (c)))
bin/csh/char.h
67
#define Isupper(c) (((c) & QUOTE) ? 0 : isupper((unsigned char) (c)))
bin/csh/char.h
68
#define Tolower(c) (((c) & QUOTE) ? 0 : tolower((unsigned char) (c)))
bin/csh/char.h
69
#define Toupper(c) (((c) & QUOTE) ? 0 : toupper((unsigned char) (c)))
bin/csh/char.h
70
#define Isxdigit(c) (((c) & QUOTE) ? 0 : isxdigit((unsigned char) (c)))
bin/csh/char.h
71
#define Isalnum(c) (((c) & QUOTE) ? 0 : isalnum((unsigned char) (c)))
bin/csh/char.h
72
#define Iscntrl(c) (((c) & QUOTE) ? 0 : iscntrl((unsigned char) (c)))
bin/csh/char.h
73
#define Isprint(c) (((c) & QUOTE) ? 0 : isprint((unsigned char) (c)))
bin/csh/csh.c
646
int c;
bin/csh/csh.c
660
if ((c = *dp) == ':' || c == 0) {
bin/csh/csh.c
663
if (c) {
bin/csh/dir.c
258
#define ISDOT(c) (UC(c)[0] == '.' && ((UC(c)[1] == '\0') || (UC(c)[1] == '/')))
bin/csh/dir.c
259
#define ISDOTDOT(c) (UC(c)[0] == '.' && ISDOT(&((c)[1])))
bin/csh/dir.c
406
struct varent *c;
bin/csh/dir.c
427
&& (c = adrof(STRcdpath))) {
bin/csh/dir.c
432
for (cdp = c->vec; *cdp; cdp++) {
bin/csh/dol.c
161
int c;
bin/csh/dol.c
165
c = DgetC(DODOL);
bin/csh/dol.c
166
if (c == '\\') {
bin/csh/dol.c
167
c = DgetC(0);
bin/csh/dol.c
168
if (c == DEOF) {
bin/csh/dol.c
169
unDredc(c);
bin/csh/dol.c
174
if (c == '\n')
bin/csh/dol.c
175
c = ' ';
bin/csh/dol.c
177
c |= QUOTE;
bin/csh/dol.c
179
if (c == DEOF) {
bin/csh/dol.c
180
unDredc(c);
bin/csh/dol.c
185
if (cmap(c, _SP | _NL | _QF | _QB)) { /* sp \t\n'"` */
bin/csh/dol.c
186
unDgetC(c);
bin/csh/dol.c
187
if (cmap(c, QUOTES))
bin/csh/dol.c
195
*wp++ = c;
bin/csh/dol.c
208
int c, c1;
bin/csh/dol.c
217
c = DgetC(DODOL);
bin/csh/dol.c
218
switch (c) {
bin/csh/dol.c
224
unDredc(c);
bin/csh/dol.c
239
*wp++ = c, --i;
bin/csh/dol.c
246
c1 = c;
bin/csh/dol.c
249
c = DgetC(dolflg);
bin/csh/dol.c
250
if (c == c1)
bin/csh/dol.c
252
if (c == '\n' || c == DEOF)
bin/csh/dol.c
254
if ((c & (QUOTE | TRIM)) == ('\n' | QUOTE))
bin/csh/dol.c
265
*wp++ = c == '`' ? '`' : c | QUOTE;
bin/csh/dol.c
270
*wp++ = c | QUOTE;
bin/csh/dol.c
275
*wp++ = c;
bin/csh/dol.c
294
c = DgetC(0); /* No $ subst! */
bin/csh/dol.c
295
if (c == '\n' || c == DEOF) {
bin/csh/dol.c
299
c |= QUOTE;
bin/csh/dol.c
306
unDgetC(c);
bin/csh/dol.c
329
int c;
bin/csh/dol.c
332
if ((c = Dpeekc) != '\0') {
bin/csh/dol.c
334
return (c);
bin/csh/dol.c
337
c = *lap++ & (QUOTE | TRIM);
bin/csh/dol.c
338
if (c == 0) {
bin/csh/dol.c
343
if (cmap(c, QUOTES))
bin/csh/dol.c
344
return (c | QUOTE);
bin/csh/dol.c
345
return (c);
bin/csh/dol.c
348
if ((c = *dolp++ & (QUOTE | TRIM)) != '\0')
bin/csh/dol.c
362
c = Dredc();
bin/csh/dol.c
363
if (c == '$' && flag) {
bin/csh/dol.c
367
return (c);
bin/csh/dol.c
390
int c, sc;
bin/csh/dol.c
398
c = sc = DgetC(0);
bin/csh/dol.c
399
if (c == '{')
bin/csh/dol.c
400
c = DgetC(0); /* sc is { to take } later */
bin/csh/dol.c
401
if ((c & TRIM) == '#')
bin/csh/dol.c
402
dimen++, c = DgetC(0); /* $# takes dimension */
bin/csh/dol.c
403
else if (c == '?')
bin/csh/dol.c
404
bitset++, c = DgetC(0); /* $? tests existence */
bin/csh/dol.c
405
switch (c) {
bin/csh/dol.c
461
if (Isdigit(c)) {
bin/csh/dol.c
466
subscr = subscr * 10 + c - '0';
bin/csh/dol.c
467
c = DgetC(0);
bin/csh/dol.c
468
} while (Isdigit(c));
bin/csh/dol.c
469
unDredc(c);
bin/csh/dol.c
492
if (!alnum(c))
bin/csh/dol.c
495
*np++ = c;
bin/csh/dol.c
496
c = DgetC(0);
bin/csh/dol.c
497
if (!alnum(c))
bin/csh/dol.c
503
unDredc(c);
bin/csh/dol.c
520
c = DgetC(0);
bin/csh/dol.c
522
if (dimen == 0 && subscr == 0 && c == '[') {
bin/csh/dol.c
525
c = DgetC(DODOL); /* Allow $ expand within [ ] */
bin/csh/dol.c
526
if (c == ']')
bin/csh/dol.c
528
if (c == '\n' || c == DEOF)
bin/csh/dol.c
532
*np++ = c;
bin/csh/dol.c
58
#define unDgetC(c) Dpeekc = c
bin/csh/dol.c
591
unDredc(c);
bin/csh/dol.c
607
c = Dredc();
bin/csh/dol.c
608
if (c != '}')
bin/csh/dol.c
616
int c;
bin/csh/dol.c
618
c = DgetC(0);
bin/csh/dol.c
619
if (c == ':') {
bin/csh/dol.c
621
c = DgetC(0), dolmcnt = 1, dolwcnt = 1;
bin/csh/dol.c
622
if (c == 'g' || c == 'a') {
bin/csh/dol.c
623
if (c == 'g')
bin/csh/dol.c
627
c = DgetC(0);
bin/csh/dol.c
629
if ((c == 'g' && dolmcnt != 10000) ||
bin/csh/dol.c
630
(c == 'a' && dolwcnt != 10000)) {
bin/csh/dol.c
631
if (c == 'g')
bin/csh/dol.c
635
c = DgetC(0);
bin/csh/dol.c
638
if (c == 's') { /* [eichin:19910926.0755EST] */
bin/csh/dol.c
641
dolmod[dolnmod++] = c;
bin/csh/dol.c
649
while ((c = DgetC(0)) != (-1)) {
bin/csh/dol.c
650
dolmod[dolnmod++] = c;
bin/csh/dol.c
651
if(c == delim) delimcnt--;
bin/csh/dol.c
660
if (!any("htrqxes", c))
bin/csh/dol.c
661
stderror(ERR_BADMOD, c);
bin/csh/dol.c
662
dolmod[dolnmod++] = c;
bin/csh/dol.c
663
if (c == 'q')
bin/csh/dol.c
666
while ((c = DgetC(0)) == ':');
bin/csh/dol.c
667
unDredc(c);
bin/csh/dol.c
670
unDredc(c);
bin/csh/dol.c
774
unDredc(int c)
bin/csh/dol.c
777
Dpeekrd = c;
bin/csh/dol.c
783
int c;
bin/csh/dol.c
785
if ((c = Dpeekrd) != '\0') {
bin/csh/dol.c
787
return (c);
bin/csh/dol.c
789
if (Dcp && (c = *Dcp++))
bin/csh/dol.c
790
return (c & (QUOTE | TRIM));
bin/csh/dol.c
800
Dtestq(int c)
bin/csh/dol.c
803
if (cmap(c, QUOTES))
bin/csh/dol.c
815
int c;
bin/csh/dol.c
842
c = readc(1); /* 1 -> Want EOF returns */
bin/csh/dol.c
843
if (c < 0 || c == '\n')
bin/csh/dol.c
845
if ((c &= TRIM) != '\0') {
bin/csh/dol.c
846
*lbp++ = c;
bin/csh/dol.c
858
if (c < 0 || eq(lbuf, term)) {
bin/csh/dol.c
871
for (lbp = lbuf; (c = *lbp++) != '\0';) {
bin/csh/dol.c
872
*obp++ = c;
bin/csh/dol.c
891
c = DgetC(DODOL);
bin/csh/dol.c
892
if (c == DEOF)
bin/csh/dol.c
894
if ((c &= TRIM) == 0)
bin/csh/dol.c
897
if (c == '\\') {
bin/csh/dol.c
898
c = DgetC(0);
bin/csh/dol.c
899
if (!any("$\\`", c))
bin/csh/dol.c
900
unDgetC(c | QUOTE), c = '\\';
bin/csh/dol.c
902
c |= QUOTE;
bin/csh/dol.c
904
*mbp++ = c;
bin/csh/exec.c
262
unsigned char c;
bin/csh/exec.c
281
if (read(fd, (char *) &c, 1) == 1) {
bin/csh/exec.c
282
if (!Isprint(c) && (c != '\n' && c != '\t')) {
bin/csh/exec.c
291
c = '#';
bin/csh/exec.c
304
if (fd != -1 && c != '#')
bin/csh/exec.c
584
dowhich(Char **v, struct command *c)
bin/csh/file.c
131
int c;
bin/csh/file.c
144
c = cl->buf[--cl->cursor];
bin/csh/file.c
145
if (c == '\t')
bin/csh/file.c
147
else if (iscntrl(c))
bin/csh/file.c
164
unsigned char c;
bin/csh/file.c
167
n = read(cl->fdin, &c, 1);
bin/csh/file.c
176
return c & 0x7F;
bin/csh/file.c
202
cl_putc(struct cmdline *cl, int c)
bin/csh/file.c
204
unsigned char cc = c;
bin/csh/file.c
210
cl_visc(struct cmdline *cl, int c)
bin/csh/file.c
215
if (c == '\t') {
bin/csh/file.c
218
} else if (c != '\n' && iscntrl(c)) {
bin/csh/file.c
220
cl_putc(cl, UNCNTRL(c));
bin/csh/file.c
222
cl_putc(cl, c);
bin/csh/file.c
227
cl_abort(struct cmdline *cl, int c)
bin/csh/file.c
229
cl_visc(cl, c);
bin/csh/file.c
246
cl_erasec(struct cmdline *cl, int c)
bin/csh/file.c
255
cl_erasew(struct cmdline *cl, int c)
bin/csh/file.c
281
cl_insert(struct cmdline *cl, int c)
bin/csh/file.c
286
cl->buf[cl->len++] = c;
bin/csh/file.c
288
if (c == '\n')
bin/csh/file.c
295
cl_kill(struct cmdline *cl, int c)
bin/csh/file.c
303
cl_list(struct cmdline *cl, int c)
bin/csh/file.c
309
cl_visc(cl, c);
bin/csh/file.c
326
cl_literal(struct cmdline *cl, int c)
bin/csh/file.c
339
cl_recognize(struct cmdline *cl, int c)
bin/csh/file.c
362
cl_reprint(struct cmdline *cl, int c)
bin/csh/file.c
364
cl_visc(cl, c);
bin/csh/file.c
372
cl_status(struct cmdline *cl, int c)
bin/csh/file.c
476
int i, rows, r, c, maxwidth = 0, columns;
bin/csh/file.c
488
for (c = 0; c < columns; c++) {
bin/csh/file.c
489
i = c * rows + r;
bin/csh/file.c
495
if (c < columns - 1) { /* last column? */
bin/csh/file.c
737
Char *c, *t;
bin/csh/file.c
739
for (c = check; *c++;)
bin/csh/file.c
746
if (c == check || *--t != *--c)
bin/csh/file.c
773
int c, ret;
bin/csh/file.c
796
if ((c = cl_getc(&cl)) == 0)
bin/csh/file.c
800
if (cl.istty && CCEQ(tio->c_cc[keys[i].idx], c))
bin/csh/file.c
802
ret = keys[i].fn(&cl, c);
bin/csh/func.c
662
int c, d;
bin/csh/func.c
666
c = readc(1);
bin/csh/func.c
669
while (c == ' ' || c == '\t')
bin/csh/func.c
670
c = readc(1);
bin/csh/func.c
671
if (c == '#')
bin/csh/func.c
673
c = readc(1);
bin/csh/func.c
674
while (c >= 0 && c != '\n');
bin/csh/func.c
675
if (c < 0)
bin/csh/func.c
677
if (c == '\n') {
bin/csh/func.c
682
unreadc(c);
bin/csh/func.c
685
c = readc(1);
bin/csh/func.c
686
if (c == '\\' && (c = readc(1)) == '\n')
bin/csh/func.c
687
c = ' ';
bin/csh/func.c
688
if (c == '\'' || c == '"') {
bin/csh/func.c
690
d = c;
bin/csh/func.c
691
else if (d == c)
bin/csh/func.c
694
if (c < 0)
bin/csh/func.c
697
*wp++ = c;
bin/csh/func.c
700
} while ((d || (!(kwd = keyword(owp)) && c != ' '
bin/csh/func.c
701
&& c != '\t')) && c != '\n');
bin/csh/func.c
709
unreadc(c);
bin/csh/func.c
855
int c;
bin/csh/func.c
857
while ((c = *cp++) != '\0')
bin/csh/func.c
858
(void) vis_fputc(c | QUOTE, cshout);
bin/csh/glob.c
536
Char *p, c;
bin/csh/glob.c
544
while ((c = *p++) != '\0') {
bin/csh/glob.c
548
if (c == '`') {
bin/csh/glob.c
562
else if (c == '{')
bin/csh/glob.c
564
else if (isglob(c))
bin/csh/glob.c
616
int icnt, c;
bin/csh/glob.c
695
c = 0;
bin/csh/glob.c
709
c = -1;
bin/csh/glob.c
718
c = (*ip++ & TRIM);
bin/csh/glob.c
719
if (c == 0)
bin/csh/glob.c
721
if (c == '\n') {
bin/csh/glob.c
729
if (!quoted && (c == ' ' || c == '\t'))
bin/csh/glob.c
732
psave(c | quoted);
bin/csh/glob.c
740
if (c != -1 && (cnt || literal))
bin/csh/glob.c
743
} while (c >= 0);
bin/csh/glob.c
750
psave(int c)
bin/csh/glob.c
754
*pargcp++ = c;
bin/csh/lex.c
1000
int c = getC(0);
bin/csh/lex.c
1004
switch (c) {
bin/csh/lex.c
1020
unreadc(c);
bin/csh/lex.c
1048
if (Isdigit(c)) {
bin/csh/lex.c
1050
while (Isdigit(c)) {
bin/csh/lex.c
1051
i = i * 10 + c - '0';
bin/csh/lex.c
1052
c = getC(0);
bin/csh/lex.c
1064
unreadc(c);
bin/csh/lex.c
1068
c = getC(0);
bin/csh/lex.c
1069
unreadc(c);
bin/csh/lex.c
1070
if (any("-$*", c))
bin/csh/lex.c
1086
int c;
bin/csh/lex.c
1090
c = sc == HISTSUB ? HIST : getC(0);
bin/csh/lex.c
1091
if (c == HIST) {
bin/csh/lex.c
1097
switch (c) {
bin/csh/lex.c
1104
ungetC(c);
bin/csh/lex.c
1121
c = getC(0);
bin/csh/lex.c
1125
if (any("(=~", c)) {
bin/csh/lex.c
1126
unreadc(c);
bin/csh/lex.c
1132
while (!cmap(c, _ESC | _META | _QF | _QB) && !any("${}:", c)) {
bin/csh/lex.c
1133
if (event != -1 && Isdigit(c))
bin/csh/lex.c
1134
event = event * 10 + c - '0';
bin/csh/lex.c
1138
*np++ = c;
bin/csh/lex.c
1139
c = getC(0);
bin/csh/lex.c
1141
unreadc(c);
bin/csh/lex.c
1163
c = getC(0);
bin/csh/lex.c
1164
if (c == '\n') {
bin/csh/lex.c
1165
unreadc(c);
bin/csh/lex.c
1168
if (c == '?')
bin/csh/lex.c
1171
*np++ = c;
bin/csh/lex.c
1257
unreadc(int c)
bin/csh/lex.c
1259
peekread = c;
bin/csh/lex.c
1265
int c;
bin/csh/lex.c
1269
if ((c = peekread) != '\0') {
bin/csh/lex.c
1271
return (c);
bin/csh/lex.c
1277
if ((c = *alvecp++) != '\0')
bin/csh/lex.c
1278
return (c);
bin/csh/lex.c
129
#define ungetC(c) peekc = c
bin/csh/lex.c
1299
if ((c = *evalp++) != '\0')
bin/csh/lex.c
130
#define ungetD(c) peekd = c
bin/csh/lex.c
1300
return (c);
bin/csh/lex.c
1327
if ((c = *arginp++) == 0) {
bin/csh/lex.c
1331
return (c);
bin/csh/lex.c
1334
c = bgetc();
bin/csh/lex.c
1335
if (c < 0) {
bin/csh/lex.c
136
int c;
bin/csh/lex.c
1370
if (c == '\n' && onelflg)
bin/csh/lex.c
1372
} while (c == 0);
bin/csh/lex.c
1373
return (c);
bin/csh/lex.c
1379
int buf, off, c;
bin/csh/lex.c
1395
c = read(SHIN, tbuf, BUFSIZ);
bin/csh/lex.c
1396
while (c < 0 && errno == EINTR);
bin/csh/lex.c
1397
if (c <= 0)
bin/csh/lex.c
1399
for (i = 0; i < c; i++)
bin/csh/lex.c
1401
feobp += c;
bin/csh/lex.c
1403
c = fbuf[0][fseekp - fbobp];
bin/csh/lex.c
1405
return (c);
bin/csh/lex.c
143
c = readc(0);
bin/csh/lex.c
1430
c = numleft ? numleft : tenex(ttyline, BUFSIZ);
bin/csh/lex.c
1431
if (c > roomleft) {
bin/csh/lex.c
1434
numleft = c;
bin/csh/lex.c
1437
if (c > 0)
bin/csh/lex.c
1438
memcpy(fbuf[buf] + off, ttyline, c * sizeof(Char));
bin/csh/lex.c
144
while (c == ' ' || c == '\t');
bin/csh/lex.c
1442
c = read(SHIN, tbuf, roomleft);
bin/csh/lex.c
1443
if (c > 0) {
bin/csh/lex.c
1447
for (i = 0; i < c; i++)
bin/csh/lex.c
145
if (c == HISTSUB && intty)
bin/csh/lex.c
1451
if (c >= 0)
bin/csh/lex.c
1462
if (c <= 0)
bin/csh/lex.c
1464
feobp += c;
bin/csh/lex.c
1468
c = fbuf[buf][(int) fseekp % BUFSIZ];
bin/csh/lex.c
147
getexcl(c);
bin/csh/lex.c
1470
return (c);
bin/csh/lex.c
149
unreadc(c);
bin/csh/lex.c
223
Char c, c1;
bin/csh/lex.c
232
while ((c = getC(DOALL)) == ' ' || c == '\t')
bin/csh/lex.c
234
if (cmap(c, _META | _ESC))
bin/csh/lex.c
235
switch (c) {
bin/csh/lex.c
240
*wp++ = c;
bin/csh/lex.c
242
if (c1 == c)
bin/csh/lex.c
251
c = 0;
bin/csh/lex.c
253
c1 = c;
bin/csh/lex.c
254
c = getC(0);
bin/csh/lex.c
255
} while (c != '\n');
bin/csh/lex.c
264
*wp++ = c;
bin/csh/lex.c
268
c = getC(0);
bin/csh/lex.c
269
if (c == '\n') {
bin/csh/lex.c
274
if (c != HIST)
bin/csh/lex.c
276
c |= QUOTE;
bin/csh/lex.c
282
if (c == c1) {
bin/csh/lex.c
286
else if (c == '\\') {
bin/csh/lex.c
287
c = getC(0);
bin/csh/lex.c
288
if (c == HIST)
bin/csh/lex.c
289
c |= QUOTE;
bin/csh/lex.c
291
if (c == '\n')
bin/csh/lex.c
295
c |= QUOTE;
bin/csh/lex.c
296
ungetC(c);
bin/csh/lex.c
297
c = '\\';
bin/csh/lex.c
300
else if (c == '\n') {
bin/csh/lex.c
302
ungetC(c);
bin/csh/lex.c
306
else if (cmap(c, _META | _QF | _QB | _ESC)) {
bin/csh/lex.c
307
if (c == '\\') {
bin/csh/lex.c
308
c = getC(0);
bin/csh/lex.c
309
if (c == '\n') {
bin/csh/lex.c
314
if (c != HIST)
bin/csh/lex.c
316
c |= QUOTE;
bin/csh/lex.c
318
else if (cmap(c, _QF | _QB)) { /* '"` */
bin/csh/lex.c
319
c1 = c;
bin/csh/lex.c
320
dolflg = c == '"' ? DOALL : DOEXCL;
bin/csh/lex.c
322
else if (c != '#' || !intty) {
bin/csh/lex.c
323
ungetC(c);
bin/csh/lex.c
328
*wp++ = c;
bin/csh/lex.c
329
c = getC(dolflg);
bin/csh/lex.c
345
Char c;
bin/csh/lex.c
348
if ((c = peekc) != '\0') {
bin/csh/lex.c
350
return (c);
bin/csh/lex.c
353
if ((c = *lap++) == 0)
bin/csh/lex.c
356
if (cmap(c, _META | _QF | _QB))
bin/csh/lex.c
357
c |= QUOTE;
bin/csh/lex.c
358
return (c);
bin/csh/lex.c
361
if ((c = peekd) != '\0') {
bin/csh/lex.c
363
return (c);
bin/csh/lex.c
366
if ((c = *exclp++) != '\0')
bin/csh/lex.c
367
return (c);
bin/csh/lex.c
384
c = readc(0);
bin/csh/lex.c
385
if (c == '$' && (flag & DODOL)) {
bin/csh/lex.c
389
if (c == HIST && (flag & DOEXCL)) {
bin/csh/lex.c
395
return (c);
bin/csh/lex.c
403
int c;
bin/csh/lex.c
408
c = sc = getC(DOEXCL);
bin/csh/lex.c
409
if (any("\t \n", c)) {
bin/csh/lex.c
410
ungetD(c);
bin/csh/lex.c
414
if (c == '{')
bin/csh/lex.c
415
*np++ = c, c = getC(DOEXCL);
bin/csh/lex.c
416
if (c == '#' || c == '?')
bin/csh/lex.c
417
special++, *np++ = c, c = getC(DOEXCL);
bin/csh/lex.c
418
*np++ = c;
bin/csh/lex.c
419
switch (c) {
bin/csh/lex.c
431
ungetD(c);
bin/csh/lex.c
447
if (Isdigit(c)) {
bin/csh/lex.c
450
while ((c = getC(DOEXCL)) != '\0'){
bin/csh/lex.c
451
if (!Isdigit(c))
bin/csh/lex.c
454
*np++ = c;
bin/csh/lex.c
459
else if (letter(c)) {
bin/csh/lex.c
463
while ((c = getC(DOEXCL)) != '\0') {
bin/csh/lex.c
465
if (!letter(c) && !Isdigit(c))
bin/csh/lex.c
468
*np++ = c;
bin/csh/lex.c
487
if (c == '[') {
bin/csh/lex.c
488
*np++ = c;
bin/csh/lex.c
498
c = getC(DOEXCL | DODOL);
bin/csh/lex.c
499
if (c == '\n') {
bin/csh/lex.c
500
ungetD(c);
bin/csh/lex.c
508
*np++ = c;
bin/csh/lex.c
509
} while (c != ']');
bin/csh/lex.c
516
c = getC(DOEXCL);
bin/csh/lex.c
521
if (c == ':') {
bin/csh/lex.c
530
*np++ = c, c = getC(DOEXCL);
bin/csh/lex.c
531
if (c == 'g' || c == 'a') {
bin/csh/lex.c
532
if (c == 'g')
bin/csh/lex.c
536
*np++ = c; c = getC(DOEXCL);
bin/csh/lex.c
538
if ((c == 'g' && !gmodflag) || (c == 'a' && !amodflag)) {
bin/csh/lex.c
539
if (c == 'g')
bin/csh/lex.c
543
*np++ = c; c = getC(DOEXCL);
bin/csh/lex.c
545
*np++ = c;
bin/csh/lex.c
547
if (c == 's') {
bin/csh/lex.c
557
while ((c = getC(0)) != (-1)) {
bin/csh/lex.c
558
*np++ = c;
bin/csh/lex.c
559
if(c == delim) delimcnt--;
bin/csh/lex.c
566
c = 's';
bin/csh/lex.c
568
if (!any("htrqxes", c)) {
bin/csh/lex.c
569
if ((amodflag || gmodflag) && c == '\n')
bin/csh/lex.c
571
seterror(ERR_VARMOD, c);
bin/csh/lex.c
577
while ((c = getC(DOEXCL)) == ':');
bin/csh/lex.c
578
ungetD(c);
bin/csh/lex.c
581
ungetD(c);
bin/csh/lex.c
583
c = getC(DOEXCL);
bin/csh/lex.c
584
if (c != '}') {
bin/csh/lex.c
585
ungetD(c);
bin/csh/lex.c
591
*np++ = c;
bin/csh/lex.c
626
int c;
bin/csh/lex.c
650
ungetC('s'), unreadc(HISTSUB), c = ':';
bin/csh/lex.c
653
c = getC(0);
bin/csh/lex.c
654
if (!any(":^$*-%", c))
bin/csh/lex.c
657
if (c == ':') {
bin/csh/lex.c
658
c = getC(0);
bin/csh/lex.c
659
unreadc(c);
bin/csh/lex.c
660
if (letter(c) || c == '&') {
bin/csh/lex.c
661
c = ':';
bin/csh/lex.c
667
ungetC(c);
bin/csh/lex.c
670
c = getC(0);
bin/csh/lex.c
671
if (c == '*')
bin/csh/lex.c
672
ungetC(c), c = '-';
bin/csh/lex.c
673
if (c == '-') {
bin/csh/lex.c
676
c = getC(0);
bin/csh/lex.c
682
if (sc == HISTSUB || c == ':') {
bin/csh/lex.c
685
c = getC(0);
bin/csh/lex.c
686
} while (c == ':');
bin/csh/lex.c
688
unreadc(c);
bin/csh/lex.c
690
c = getC(0);
bin/csh/lex.c
691
if (c != '}')
bin/csh/lex.c
702
int c;
bin/csh/lex.c
710
sc = c = getC(0);
bin/csh/lex.c
711
if (c == 'g' || c == 'a') {
bin/csh/lex.c
712
global |= (c == 'g') ? 1 : 2;
bin/csh/lex.c
713
sc = c = getC(0);
bin/csh/lex.c
715
if (((c =='g') && !(global & 1)) || ((c == 'a') && !(global & 2))) {
bin/csh/lex.c
716
global |= (c == 'g') ? 1 : 2;
bin/csh/lex.c
717
sc = c = getC(0);
bin/csh/lex.c
720
switch (c) {
bin/csh/lex.c
755
c = getC(0);
bin/csh/lex.c
756
if (c == '\n') {
bin/csh/lex.c
757
unreadc(c);
bin/csh/lex.c
760
if (c == delim)
bin/csh/lex.c
767
if (c == '\\') {
bin/csh/lex.c
768
c = getC(0);
bin/csh/lex.c
769
if (c != delim && c != '\\')
bin/csh/lex.c
772
*cp++ = c;
bin/csh/lex.c
783
c = getC(0);
bin/csh/lex.c
784
if (c == '\n') {
bin/csh/lex.c
785
unreadc(c);
bin/csh/lex.c
788
if (c == delim)
bin/csh/lex.c
794
if (c == '\\') {
bin/csh/lex.c
795
c = getC(0);
bin/csh/lex.c
796
if (c != delim /* && c != '~' */ )
bin/csh/lex.c
799
*cp++ = c;
bin/csh/lex.c
805
if (c == '\n')
bin/csh/lex.c
806
unreadc(c);
bin/csh/lex.c
807
seterror(ERR_BADBANGMOD, c);
bin/csh/lex.c
814
while ((c = getC(0)) == ':');
bin/csh/lex.c
815
unreadc(c);
bin/csh/lex.c
946
int c;
bin/csh/lex.c
953
for (xp = wp; (c = *xp) != '\0'; xp++)
bin/csh/lex.c
954
if ((c != ' ' && c != '\t') || type == 'q')
bin/csh/misc.c
264
lshift(Char **v, int c)
bin/csh/misc.c
268
for (u = v; *u && --c >= 0; u++)
bin/csh/misc.c
45
any(char *s, int c)
bin/csh/misc.c
50
if (*s++ == c)
bin/csh/parse.c
468
int n, c;
bin/csh/parse.c
542
c = p->word[0];
bin/csh/parse.c
543
switch (c) {
bin/csh/set.c
203
Char *vp, c, op;
bin/csh/set.c
239
c = '=';
bin/csh/set.c
243
c = *p++;
bin/csh/set.c
244
if (any("+-", c)) {
bin/csh/set.c
245
if (c != op || *p)
bin/csh/set.c
251
if (c != op)
bin/csh/set.c
253
c = *p++;
bin/csh/set.c
256
if (c != '=')
bin/csh/set.c
278
if (c != '=')
bin/csh/set.c
433
struct varent *c;
bin/csh/set.c
437
while ((c = p->v_link[f]) != NULL) {
bin/csh/set.c
438
if ((f = *name - *c->v_name) == 0 &&
bin/csh/set.c
439
(f = Strcmp(name, c->v_name)) == 0) {
bin/csh/set.c
440
blkfree(c->vec);
bin/csh/set.c
443
p = c;
bin/csh/set.c
446
p->v_link[f] = c = (struct varent *) xmalloc((size_t) sizeof(struct varent));
bin/csh/set.c
447
c->v_name = Strsave(name);
bin/csh/set.c
448
c->v_bal = 0;
bin/csh/set.c
449
c->v_left = c->v_right = 0;
bin/csh/set.c
450
c->v_parent = p;
bin/csh/set.c
453
trim(c->vec = vec);
bin/csh/set.c
498
struct varent *c, *pp;
bin/csh/set.c
512
c = p->v_left;
bin/csh/set.c
514
c = p->v_right;
bin/csh/set.c
516
for (c = p->v_left; c->v_right; c = c->v_right)
bin/csh/set.c
518
p->v_name = c->v_name;
bin/csh/set.c
519
p->vec = c->vec;
bin/csh/set.c
520
p = c;
bin/csh/set.c
521
c = p->v_left;
bin/csh/set.c
528
if ((pp->v_link[f] = c) != NULL)
bin/csh/set.c
529
c->v_parent = pp;
bin/csh/set.c
695
struct varent *c;
bin/csh/set.c
724
c = p;
bin/csh/set.c
726
} while (p->v_right == c);
bin/ed/io.c
122
int c;
bin/ed/io.c
125
while (((c = getc(fp)) != EOF || (!feof(fp) &&
bin/ed/io.c
126
!ferror(fp))) && c != '\n') {
bin/ed/io.c
128
if (!(sbuf[i++] = c))
bin/ed/io.c
132
if (c == '\n')
bin/ed/io.c
133
sbuf[i++] = c;
bin/ed/io.c
260
int c;
bin/ed/io.c
265
switch (c = getchar()) {
bin/ed/io.c
269
if (!(ibuf[i++] = c)) isbinary = 1;
bin/ed/io.c
270
if (c != '\n')
bin/ed/main.c
127
int c, n;
bin/ed/main.c
136
while ((c = getopt(argc, argv, "p:sx")) != -1)
bin/ed/main.c
137
switch (c) {
bin/ed/main.c
336
int c;
bin/ed/main.c
340
switch ((c = (unsigned char)*ibufp)) {
bin/ed/main.c
350
addr += (c == '-' || c == '^') ? -n : n;
bin/ed/main.c
351
} else if (!isspace(c))
bin/ed/main.c
352
addr += (c == '-' || c == '^') ? -1 : 1;
bin/ed/main.c
364
addr = (c == '.') ? current_addr : addr_last;
bin/ed/main.c
370
get_compiled_pattern(), c == '/')) < 0)
bin/ed/main.c
372
else if (c == *ibufp)
bin/ed/main.c
387
second_addr = (c == ';') ? current_addr : 1;
bin/ed/main.c
485
int c;
bin/ed/main.c
488
switch ((c = (unsigned char)*ibufp++)) {
bin/ed/main.c
566
else if (build_active_list(c == 'g' || c == 'G') < 0)
bin/ed/main.c
568
else if ((n = (c == 'G' || c == 'V')))
bin/ed/main.c
610
c = (unsigned char)*ibufp++;
bin/ed/main.c
616
if (mark_line_node(get_addressed_line_node(second_addr), c) < 0)
bin/ed/main.c
671
gflag = (modified && !scripted && c == 'q') ? EMOD : EOF;
bin/ed/main.c
814
if ((addr = write_file(fnp, (c == 'W') ? "a" : "w",
bin/ed/re.c
126
int c, d;
bin/ed/re.c
134
for (s++, c = *++s; *s != ']' || c != d; s++)
bin/ed/re.c
135
if ((c = *s) == '\n')
bin/ed/sub.c
84
char c;
bin/ed/sub.c
95
if ((c = rhbuf[i++] = *ibufp++) == '\n' && *ibufp == '\0') {
bin/ed/sub.c
98
} else if (c != '\\')
bin/ksh/c_ksh.c
309
int c;
bin/ksh/c_ksh.c
311
while ((c = *s++) != '\0') {
bin/ksh/c_ksh.c
313
if ((flags & PO_EXPAND) && c == '\\') {
bin/ksh/c_ksh.c
316
switch ((c = *s++)) {
bin/ksh/c_ksh.c
321
case 'a': c = '\007'; break;
bin/ksh/c_ksh.c
322
case 'b': c = '\b'; break;
bin/ksh/c_ksh.c
325
case 'f': c = '\f'; break;
bin/ksh/c_ksh.c
326
case 'n': c = '\n'; break;
bin/ksh/c_ksh.c
327
case 'r': c = '\r'; break;
bin/ksh/c_ksh.c
328
case 't': c = '\t'; break;
bin/ksh/c_ksh.c
329
case 'v': c = 0x0B; break;
bin/ksh/c_ksh.c
335
c = 0;
bin/ksh/c_ksh.c
338
c = c*8 + *s++ - '0';
bin/ksh/c_ksh.c
343
case '\0': s--; c = '\\'; break;
bin/ksh/c_ksh.c
349
Xput(xs, xp, c);
bin/ksh/c_sh.c
252
int c = 0;
bin/ksh/c_sh.c
329
if (c == '\n' || c == EOF)
bin/ksh/c_sh.c
332
c = shf_getc(shf);
bin/ksh/c_sh.c
333
if (c == '\0')
bin/ksh/c_sh.c
335
if (c == EOF && shf_error(shf) &&
bin/ksh/c_sh.c
353
Xput(xs, xp, c);
bin/ksh/c_sh.c
358
if (c == '\n') {
bin/ksh/c_sh.c
359
c = 0;
bin/ksh/c_sh.c
367
} else if (c != EOF)
bin/ksh/c_sh.c
368
Xput(cs, cp, c);
bin/ksh/c_sh.c
371
if (expand && c == '\\') {
bin/ksh/c_sh.c
375
if (c == '\n' || c == EOF)
bin/ksh/c_sh.c
377
if (ctype(c, C_IFS)) {
bin/ksh/c_sh.c
378
if (Xlength(cs, cp) == 0 && ctype(c, C_IFSWS))
bin/ksh/c_sh.c
383
Xput(cs, cp, c);
bin/ksh/c_sh.c
417
if (c == EOF && !ecode)
bin/ksh/c_sh.c
420
return ecode ? ecode : c == EOF;
bin/ksh/edit.c
126
char c;
bin/ksh/edit.c
129
while ((n = blocking_read(STDIN_FILENO, &c, 1)) < 0 && errno == EINTR)
bin/ksh/edit.c
137
return (int) (unsigned char) c;
bin/ksh/edit.c
147
x_putc(int c)
bin/ksh/edit.c
149
return shf_putc(c, shl_out);
bin/ksh/edit.c
802
#define IS_WORDC(c) !( ctype(c, C_LEX1) || (c) == '\'' || (c) == '"' || \
bin/ksh/edit.c
803
(c) == '`' || (c) == '=' || (c) == ':' )
bin/ksh/emacs.c
1001
x_mv_begin(int c)
bin/ksh/emacs.c
1008
x_draw_line(int c)
bin/ksh/emacs.c
1015
x_clear_screen(int c)
bin/ksh/emacs.c
1101
x_transpose(int c)
bin/ksh/emacs.c
1153
x_literal(int c)
bin/ksh/emacs.c
1160
x_kill(int c)
bin/ksh/emacs.c
1191
x_yank(int c)
bin/ksh/emacs.c
1209
x_meta_yank(int c)
bin/ksh/emacs.c
1233
x_abort(int c)
bin/ksh/emacs.c
1243
x_error(int c)
bin/ksh/emacs.c
1606
x_set_mark(int c)
bin/ksh/emacs.c
1613
x_kill_region(int c)
bin/ksh/emacs.c
1636
x_xchg_point_mark(int c)
bin/ksh/emacs.c
1651
x_noop(int c)
bin/ksh/emacs.c
1661
x_comp_comm(int c)
bin/ksh/emacs.c
1667
x_list_comm(int c)
bin/ksh/emacs.c
1673
x_complete(int c)
bin/ksh/emacs.c
1679
x_enumerate(int c)
bin/ksh/emacs.c
1685
x_comp_file(int c)
bin/ksh/emacs.c
1691
x_list_file(int c)
bin/ksh/emacs.c
1697
x_comp_list(int c)
bin/ksh/emacs.c
1703
x_expand(int c)
bin/ksh/emacs.c
1819
x_e_ungetc(int c)
bin/ksh/emacs.c
1821
unget_char = c;
bin/ksh/emacs.c
1827
int c;
bin/ksh/emacs.c
1830
c = unget_char;
bin/ksh/emacs.c
1833
c = *macro_args++;
bin/ksh/emacs.c
1834
if (!c) {
bin/ksh/emacs.c
1836
c = x_getc();
bin/ksh/emacs.c
1839
c = x_getc();
bin/ksh/emacs.c
1841
return c;
bin/ksh/emacs.c
1847
int c, cc, len;
bin/ksh/emacs.c
1849
c = x_e_getc();
bin/ksh/emacs.c
1850
if (c == -1)
bin/ksh/emacs.c
1852
buf[off++] = c;
bin/ksh/emacs.c
1860
if ((c & 0xf8) == 0xf0 && c < 0xf5) /* beyond Unicode */
bin/ksh/emacs.c
1862
else if ((c & 0xf0) == 0xe0)
bin/ksh/emacs.c
1864
else if ((c & 0xe0) == 0xc0 && c > 0xc1) /* use single byte */
bin/ksh/emacs.c
1874
(c == 0xe0 && len == 3 && cc < 0xa0) || /* use 2 bytes */
bin/ksh/emacs.c
1875
(c == 0xed && len == 3 && cc > 0x9f) || /* surrogates */
bin/ksh/emacs.c
1876
(c == 0xf0 && len == 4 && cc < 0x90) || /* use 3 bytes */
bin/ksh/emacs.c
1877
(c == 0xf4 && len == 4 && cc > 0x8f)) { /* beyond Uni. */
bin/ksh/emacs.c
1889
x_e_putc(int c)
bin/ksh/emacs.c
1891
if (c == '\r' || c == '\n')
bin/ksh/emacs.c
1894
x_putc(c);
bin/ksh/emacs.c
1895
switch (c) {
bin/ksh/emacs.c
1905
if (!isu8cont(c))
bin/ksh/emacs.c
1916
x_debug_info(int c)
bin/ksh/emacs.c
1952
x_set_arg(int c)
bin/ksh/emacs.c
1957
for (; c >= 0 && isdigit(c); c = x_e_getc(), first = 0)
bin/ksh/emacs.c
1958
n = n * 10 + (c - '0');
bin/ksh/emacs.c
1959
if (c < 0 || first) {
bin/ksh/emacs.c
1964
x_e_ungetc(c);
bin/ksh/emacs.c
1975
x_comment(int c)
bin/ksh/emacs.c
2011
x_prev_histword(int c)
bin/ksh/emacs.c
2047
c = *rcp;
bin/ksh/emacs.c
2050
*rcp = c;
bin/ksh/emacs.c
2057
x_fold_upper(int c)
bin/ksh/emacs.c
2064
x_fold_lower(int c)
bin/ksh/emacs.c
2071
x_fold_capitalize(int c)
bin/ksh/emacs.c
2088
x_fold_case(int c)
bin/ksh/emacs.c
2107
if (c == 'L') { /* lowercase */
bin/ksh/emacs.c
2120
if (c == 'U') { /* uppercase */
bin/ksh/emacs.c
269
isu8cont(unsigned char c)
bin/ksh/emacs.c
271
return (c & (0x80 | 0x40)) == 0x80;
bin/ksh/emacs.c
404
x_insert(int c)
bin/ksh/emacs.c
411
if (c == 0) {
bin/ksh/emacs.c
415
str[0] = c;
bin/ksh/emacs.c
423
x_ins_string(int c)
bin/ksh/emacs.c
425
return x_insert(c);
bin/ksh/emacs.c
470
x_del_back(int c)
bin/ksh/emacs.c
488
x_del_char(int c)
bin/ksh/emacs.c
53
#define is_cfs(c) (c == ' ' || c == '\t' || c == '"' || c == '\'')
bin/ksh/emacs.c
56
#define is_mfs(c) (!(isalnum((unsigned char)c) || \
bin/ksh/emacs.c
561
x_del_bword(int c)
bin/ksh/emacs.c
568
x_mv_bword(int c)
bin/ksh/emacs.c
57
c == '_' || c == '$' || c & 0x80))
bin/ksh/emacs.c
575
x_mv_fword(int c)
bin/ksh/emacs.c
582
x_del_fword(int c)
bin/ksh/emacs.c
652
x_bs(int c)
bin/ksh/emacs.c
656
i = x_size(c);
bin/ksh/emacs.c
671
x_size(int c)
bin/ksh/emacs.c
673
if (c=='\t')
bin/ksh/emacs.c
675
if (iscntrl(c)) /* control char */
bin/ksh/emacs.c
677
if (isu8cont(c))
bin/ksh/emacs.c
698
x_zotc(int c)
bin/ksh/emacs.c
700
if (c == '\t') {
bin/ksh/emacs.c
703
} else if (iscntrl(c)) {
bin/ksh/emacs.c
705
x_e_putc(UNCTRL(c));
bin/ksh/emacs.c
707
x_e_putc(c);
bin/ksh/emacs.c
711
x_mv_back(int c)
bin/ksh/emacs.c
728
x_mv_forw(int c)
bin/ksh/emacs.c
745
x_search_char_forw(int c)
bin/ksh/emacs.c
750
c = x_e_getc();
bin/ksh/emacs.c
752
if (c < 0 ||
bin/ksh/emacs.c
753
((cp = (cp == xep) ? NULL : strchr(cp + 1, c)) == NULL &&
bin/ksh/emacs.c
754
(cp = strchr(xbuf, c)) == NULL)) {
bin/ksh/emacs.c
764
x_search_char_back(int c)
bin/ksh/emacs.c
768
c = x_e_getc();
bin/ksh/emacs.c
773
if (c < 0 || p == cp) {
bin/ksh/emacs.c
777
if (*p == c)
bin/ksh/emacs.c
785
x_newline(int c)
bin/ksh/emacs.c
795
x_end_of_text(int c)
bin/ksh/emacs.c
804
static int x_beg_hist(int c) { x_load_hist(history); return KSTD;}
bin/ksh/emacs.c
806
static int x_end_hist(int c) { x_load_hist(histptr); return KSTD;}
bin/ksh/emacs.c
808
static int x_prev_com(int c) { x_load_hist(x_histp - x_arg); return KSTD;}
bin/ksh/emacs.c
810
static int x_next_com(int c) { x_load_hist(x_histp + x_arg); return KSTD;}
bin/ksh/emacs.c
817
x_goto_hist(int c)
bin/ksh/emacs.c
847
x_nl_next_com(int c)
bin/ksh/emacs.c
850
return (x_newline(c));
bin/ksh/emacs.c
854
x_eot_del(int c)
bin/ksh/emacs.c
857
return (x_end_of_text(c));
bin/ksh/emacs.c
859
return (x_del_char(c));
bin/ksh/emacs.c
863
kb_find_hist_func(char c)
bin/ksh/emacs.c
868
line[0] = c;
bin/ksh/emacs.c
879
x_search_hist(int c)
bin/ksh/emacs.c
893
if ((c = x_e_getc()) < 0)
bin/ksh/emacs.c
895
f = kb_find_hist_func(c);
bin/ksh/emacs.c
896
if (c == CTRL('[') || c == CTRL('@')) {
bin/ksh/emacs.c
897
x_e_ungetc(c);
bin/ksh/emacs.c
920
*p++ = c, *p = '\0';
bin/ksh/emacs.c
932
x_e_ungetc(c);
bin/ksh/emacs.c
976
x_del_line(int c)
bin/ksh/emacs.c
994
x_mv_end(int c)
bin/ksh/eval.c
161
int c = 0;
bin/ksh/eval.c
210
c = *sp++;
bin/ksh/eval.c
211
switch (c) {
bin/ksh/eval.c
213
c = 0;
bin/ksh/eval.c
216
c = *sp++;
bin/ksh/eval.c
220
c = *sp++;
bin/ksh/eval.c
474
c = *sp++ + 0x80;
bin/ksh/eval.c
479
c = '|';
bin/ksh/eval.c
484
c = /*(*/ ')';
bin/ksh/eval.c
504
if ((c = *x.str++) == 0) {
bin/ksh/eval.c
516
if ((c = *x.str++) == '\0') {
bin/ksh/eval.c
529
c = ifs0;
bin/ksh/eval.c
530
if (c == 0) {
bin/ksh/eval.c
536
c = ' ';
bin/ksh/eval.c
550
c = EOF;
bin/ksh/eval.c
552
c = '\n';
bin/ksh/eval.c
555
while ((c = shf_getc(x.u.shf)) == 0 || c == '\n')
bin/ksh/eval.c
556
if (c == '\n')
bin/ksh/eval.c
558
if (newlines && c != EOF) {
bin/ksh/eval.c
559
shf_ungetc(c, x.u.shf);
bin/ksh/eval.c
560
c = '\n';
bin/ksh/eval.c
564
if (c == EOF) {
bin/ksh/eval.c
581
if (c == 0 || (!quote && (f & DOBLANK) && doblank &&
bin/ksh/eval.c
582
!make_magic && ctype(c, C_IFS))) {
bin/ksh/eval.c
593
if ((word == IFS_WORD) || (word == IFS_QUOTE) || (c &&
bin/ksh/eval.c
595
!ctype(c, C_IFSWS))) {
bin/ksh/eval.c
614
if (c != 0)
bin/ksh/eval.c
617
if (c == 0)
bin/ksh/eval.c
620
word = ctype(c, C_IFSWS) ? IFS_WS : IFS_NWS;
bin/ksh/eval.c
639
switch (c) {
bin/ksh/eval.c
650
if (c == '[')
bin/ksh/eval.c
665
if ((f & DOBRACE_) && (c == OBRACE ||
bin/ksh/eval.c
715
} else if (ISMAGIC(c)) {
bin/ksh/eval.c
719
*dp++ = c; /* save output char */
bin/ksh/eval.c
741
int c;
bin/ksh/eval.c
755
if (sp[0] == '#' && (c = sp[1]) != '\0') {
bin/ksh/eval.c
770
c = n; /* ksh88/ksh93 go for number, not max index */
bin/ksh/eval.c
771
} else if (c == '*' || c == '@')
bin/ksh/eval.c
772
c = genv->loc->argc;
bin/ksh/eval.c
776
c = strlen(p);
bin/ksh/eval.c
778
if (Flag(FNOUNSET) && c == 0 && !zero_ok)
bin/ksh/eval.c
781
xp->str = str_save(u64ton((uint64_t)c, 10), ATEMP);
bin/ksh/eval.c
787
c = word[slen = 0] == CHAR ? word[1] : 0;
bin/ksh/eval.c
788
if (c == ':') {
bin/ksh/eval.c
791
c = word[slen + 0] == CHAR ? word[slen + 1] : 0;
bin/ksh/eval.c
793
if (ctype(c, C_SUBOP1)) {
bin/ksh/eval.c
795
stype |= c;
bin/ksh/eval.c
796
} else if (ctype(c, C_SUBOP2)) { /* Note: ksh88 allows :%, :%%, etc */
bin/ksh/eval.c
798
stype = c;
bin/ksh/eval.c
799
if (word[slen + 0] == CHAR && c == word[slen + 1]) {
bin/ksh/eval.c
810
c = sp[0];
bin/ksh/eval.c
811
if (c == '*' || c == '@') {
bin/ksh/eval.c
821
state = c == '@' ? XNULLSUB : XSUB;
bin/ksh/eval.c
825
xp->split = c == '@'; /* $@ */
bin/ksh/eval.c
869
c = stype&0x7f;
bin/ksh/eval.c
871
if (ctype(c, C_SUBOP2) ||
bin/ksh/eval.c
873
c == '=' || c == '-' || c == '?' : c == '+'))
bin/ksh/eval.c
876
(ctype(c, C_SUBOP2) || (state != XBASE && c != '+')))
bin/ksh/eval.c
942
char *p, c;
bin/ksh/eval.c
947
c = *p; *p = '\0';
bin/ksh/eval.c
949
*p = c;
bin/ksh/eval.c
952
*p = c;
bin/ksh/eval.c
957
c = *p; *p = '\0';
bin/ksh/eval.c
959
*p = c;
bin/ksh/eval.c
962
*p = c;
bin/ksh/expand.h
14
while ((c = generate()) {
bin/ksh/expand.h
16
Xput(xs, xp, c); /* add character */
bin/ksh/expand.h
45
#define Xput(xs, xp, c) (*xp++ = (c))
bin/ksh/expr.c
468
int c;
bin/ksh/expr.c
472
for (cp = es->tokp; (c = *cp), isspace((unsigned char)c); cp++)
bin/ksh/expr.c
476
if (c == '\0')
bin/ksh/expr.c
478
else if (letter(c)) {
bin/ksh/expr.c
479
for (; letnum(c); c = *cp)
bin/ksh/expr.c
481
if (c == '[') {
bin/ksh/expr.c
488
} else if (c == '(' /*)*/ ) {
bin/ksh/expr.c
504
} else if (digit(c)) {
bin/ksh/expr.c
505
for (; c != '_' && (letnum(c) || c == '#'); c = *cp++)
bin/ksh/expr.c
520
if (c == n0 &&
bin/ksh/history.c
656
char *c, *cp;
bin/ksh/history.c
661
c = str_save(cmd, APERM);
bin/ksh/history.c
662
if ((cp = strrchr(c, '\n')) != NULL)
bin/ksh/history.c
669
if (ignoredups && histptr >= history && strcmp(*histptr, c) == 0) {
bin/ksh/history.c
670
afree(c, APERM);
bin/ksh/history.c
697
*histptr = c;
bin/ksh/history.c
705
stravis(&encoded, c, VIS_SAFE | VIS_NL) != -1) {
bin/ksh/io.c
206
char c = '\t';
bin/ksh/io.c
209
shf_fprintf(kshdebug_shf, "%c%02x", c,
bin/ksh/io.c
211
c = ' ';
bin/ksh/lex.c
1038
c = getsc__();
bin/ksh/lex.c
1039
if (c) {
bin/ksh/lex.c
1041
s->ugbuf[0] = c; s->ugbuf[1] = '\0';
bin/ksh/lex.c
1070
return c;
bin/ksh/lex.c
1214
int len, c, n, totlen = 0, indelimit = 0, counting = 1, delimitthis;
bin/ksh/lex.c
140
int c, state;
bin/ksh/lex.c
1465
c = *cp++;
bin/ksh/lex.c
1467
c = *cp++;
bin/ksh/lex.c
1490
shf_putc(c, shl_out);
bin/ksh/lex.c
1525
char c;
bin/ksh/lex.c
1529
c = getsc();
bin/ksh/lex.c
1533
if (c == '#') {
bin/ksh/lex.c
1539
if (letter(c))
bin/ksh/lex.c
1541
else if (digit(c))
bin/ksh/lex.c
1543
else if (ctype(c, C_VAR1))
bin/ksh/lex.c
1549
if (!letnum(c)) {
bin/ksh/lex.c
1551
if (c == '[') {
bin/ksh/lex.c
1556
*wp++ = c;
bin/ksh/lex.c
1562
c = getsc(); /* the ] */
bin/ksh/lex.c
1567
if (!digit(c))
bin/ksh/lex.c
1578
ungetsc(c);
bin/ksh/lex.c
1582
*wp++ = c;
bin/ksh/lex.c
1597
char c;
bin/ksh/lex.c
1603
c = getsc();
bin/ksh/lex.c
1605
*wp++ = c;
bin/ksh/lex.c
1606
if (c == '[')
bin/ksh/lex.c
1608
else if (c == ']')
bin/ksh/lex.c
1610
} while (depth > 0 && c && c != '\n');
bin/ksh/lex.c
1620
ungetsc(int c)
bin/ksh/lex.c
1625
if (source->str == null && c == '\0')
bin/ksh/lex.c
1633
s->ugbuf[0] = c; s->ugbuf[1] = '\0';
bin/ksh/lex.c
1646
int c, c2;
bin/ksh/lex.c
1659
c = getsc_();
bin/ksh/lex.c
1660
if (c == '\\') {
bin/ksh/lex.c
1667
return c;
bin/ksh/lex.c
167
while ((c = getsc()) == ' ' || c == '\t')
bin/ksh/lex.c
169
if (c == '#') {
bin/ksh/lex.c
171
while ((c = getsc()) != '\0' && c != '\n')
bin/ksh/lex.c
175
ungetsc(c);
bin/ksh/lex.c
190
while (!((c = getsc()) == 0 ||
bin/ksh/lex.c
191
((state == SBASE || state == SHEREDELIM) && ctype(c, C_LEX1)))) {
bin/ksh/lex.c
196
c == '!') {
bin/ksh/lex.c
261
if (c == '[' && (cf & (VARASN|ARRAYVAR))) {
bin/ksh/lex.c
268
*wp++ = c;
bin/ksh/lex.c
288
*wp++ = c;
bin/ksh/lex.c
293
if (c == '*' || c == '@' || c == '+' || c == '?' ||
bin/ksh/lex.c
294
c == '!') {
bin/ksh/lex.c
298
*wp++ = c;
bin/ksh/lex.c
306
switch (c) {
bin/ksh/lex.c
308
c = getsc();
bin/ksh/lex.c
309
if (c) /* trailing \ is lost */
bin/ksh/lex.c
310
*wp++ = QCHAR, *wp++ = c;
bin/ksh/lex.c
314
*wp++ = CHAR, *wp++ = c;
bin/ksh/lex.c
331
switch (c) {
bin/ksh/lex.c
333
c = getsc();
bin/ksh/lex.c
334
switch (c) {
bin/ksh/lex.c
337
*wp++ = QCHAR, *wp++ = c;
bin/ksh/lex.c
341
*wp++ = QCHAR, *wp++ = c;
bin/ksh/lex.c
347
*wp++ = QCHAR, *wp++ = c;
bin/ksh/lex.c
351
if (c) { /* trailing \ is lost */
bin/ksh/lex.c
353
*wp++ = CHAR, *wp++ = c;
bin/ksh/lex.c
359
c = getsc();
bin/ksh/lex.c
360
if (c == '(') /*)*/ {
bin/ksh/lex.c
361
c = getsc();
bin/ksh/lex.c
362
if (c == '(') /*)*/ {
bin/ksh/lex.c
369
ungetsc(c);
bin/ksh/lex.c
375
} else if (c == '{') /*}*/ {
bin/ksh/lex.c
379
c = getsc();
bin/ksh/lex.c
381
if (c == ':') {
bin/ksh/lex.c
382
*wp++ = CHAR, *wp++ = c;
bin/ksh/lex.c
383
c = getsc();
bin/ksh/lex.c
388
if (c == '#' || c == '%') {
bin/ksh/lex.c
389
ungetsc(c);
bin/ksh/lex.c
392
ungetsc(c);
bin/ksh/lex.c
399
} else if (ctype(c, C_ALPHA)) {
bin/ksh/lex.c
404
*wp++ = c;
bin/ksh/lex.c
405
c = getsc();
bin/ksh/lex.c
406
} while (ctype(c, C_ALPHA) || digit(c));
bin/ksh/lex.c
410
ungetsc(c);
bin/ksh/lex.c
411
} else if (ctype(c, C_VAR1) || digit(c)) {
bin/ksh/lex.c
415
*wp++ = c;
bin/ksh/lex.c
421
ungetsc(c);
bin/ksh/lex.c
449
*wp++ = CHAR, *wp++ = c;
bin/ksh/lex.c
454
if (c == '\'') {
bin/ksh/lex.c
457
*wp++ = CHAR, *wp++ = c;
bin/ksh/lex.c
463
*wp++ = QCHAR, *wp++ = c;
bin/ksh/lex.c
467
if (c == '"') {
bin/ksh/lex.c
482
switch (c) {
bin/ksh/lex.c
508
if (c == '"')
bin/ksh/lex.c
510
else if (c == '\\')
bin/ksh/lex.c
515
if (c == '\'') {
bin/ksh/lex.c
525
*wp++ = c;
bin/ksh/lex.c
532
if (c == '(')
bin/ksh/lex.c
534
else if (c == ')') {
bin/ksh/lex.c
563
*wp++ = c;
bin/ksh/lex.c
568
if (c == '}') {
bin/ksh/lex.c
578
if (c == '}') {
bin/ksh/lex.c
589
if (c == '}') {
bin/ksh/lex.c
593
} else if (c == '|') {
bin/ksh/lex.c
595
} else if (c == '(') {
bin/ksh/lex.c
604
if (c == '`') {
bin/ksh/lex.c
607
} else if (c == '\\') {
bin/ksh/lex.c
608
switch (c = getsc()) {
bin/ksh/lex.c
611
*wp++ = c;
bin/ksh/lex.c
615
*wp++ = c;
bin/ksh/lex.c
620
if (c) { /* trailing \ is lost */
bin/ksh/lex.c
622
*wp++ = c;
bin/ksh/lex.c
627
*wp++ = c;
bin/ksh/lex.c
635
if (c == ')') {
bin/ksh/lex.c
640
c = 0;
bin/ksh/lex.c
645
} else if (c == '(')
bin/ksh/lex.c
662
if (c == '\\') {
bin/ksh/lex.c
663
c = getsc();
bin/ksh/lex.c
664
if (c) { /* trailing \ is lost */
bin/ksh/lex.c
666
*wp++ = c;
bin/ksh/lex.c
668
} else if (c == '\'') {
bin/ksh/lex.c
672
} else if (c == '"') {
bin/ksh/lex.c
677
*wp++ = c;
bin/ksh/lex.c
682
if (c == '"') {
bin/ksh/lex.c
686
if (c == '\\') {
bin/ksh/lex.c
687
switch (c = getsc()) {
bin/ksh/lex.c
692
if (c) { /* trailing \ lost */
bin/ksh/lex.c
700
*wp++ = c;
bin/ksh/lex.c
705
if ( /*(*/ c == ')') {
bin/ksh/lex.c
708
} else if (c == '|') {
bin/ksh/lex.c
710
} else if (c == '(') {
bin/ksh/lex.c
730
if ((c == '<' || c == '>') && state == SBASE &&
bin/ksh/lex.c
738
iop->unit = c == '>'; /* 0 for <, 1 for > */
bin/ksh/lex.c
742
if (c == c2 || (c == '<' && c2 == '>')) {
bin/ksh/lex.c
743
iop->flag = c == c2 ?
bin/ksh/lex.c
744
(c == '>' ? IOCAT : IOHERE) : IORDWR;
bin/ksh/lex.c
752
iop->flag = IODUP | (c == '<' ? IORDUP : 0);
bin/ksh/lex.c
754
iop->flag = c == '>' ? IOWRITE : IOREAD;
bin/ksh/lex.c
755
if (c == '>' && c2 == '|')
bin/ksh/lex.c
772
switch (c) {
bin/ksh/lex.c
774
return c;
bin/ksh/lex.c
779
if ((c2 = getsc()) == c)
bin/ksh/lex.c
780
c = (c == ';') ? BREAK :
bin/ksh/lex.c
781
(c == '|') ? LOGOR :
bin/ksh/lex.c
782
(c == '&') ? LOGAND :
bin/ksh/lex.c
784
else if (c == '|' && c2 == '&')
bin/ksh/lex.c
785
c = COPROC;
bin/ksh/lex.c
788
return c;
bin/ksh/lex.c
794
return c;
bin/ksh/lex.c
800
c = MDPAREN;
bin/ksh/lex.c
804
return c;
bin/ksh/lex.c
807
return c;
bin/ksh/lex.c
815
ungetsc(c); /* unget terminator */
bin/ksh/lex.c
818
for (sp = yylval.cp, dp = ident; dp < ident+IDENT && (c = *sp++) == CHAR; )
bin/ksh/lex.c
822
if (c != EOS)
bin/ksh/lex.c
873
int c;
bin/ksh/lex.c
892
while ((c = getsc()) != 0) {
bin/ksh/lex.c
894
if (c == '\t')
bin/ksh/lex.c
898
if (c != *eofp)
bin/ksh/lex.c
901
Xput(xs, xp, c);
bin/ksh/lex.c
907
if (*eofp == '\0' && (c == 0 || c == '\n')) {
bin/ksh/lex.c
911
ungetsc(c);
bin/ksh/lex.c
912
while ((c = getsc()) != '\n') {
bin/ksh/lex.c
913
if (c == 0)
bin/ksh/lex.c
916
Xput(xs, xp, c);
bin/ksh/lex.c
919
Xput(xs, xp, c);
bin/ksh/lex.c
977
int c;
bin/ksh/lex.c
979
while ((c = *s->str++) == 0) {
bin/ksh/misc.c
1013
int r, c;
bin/ksh/misc.c
1042
for (c = 0; c < cols; c++) {
bin/ksh/misc.c
1043
i = c * rows + r;
bin/ksh/misc.c
1048
if (c + 1 < cols)
bin/ksh/misc.c
255
if (sh_options[ele].c && Flag(ele))
bin/ksh/misc.c
256
*cp++ = sh_options[ele].c;
bin/ksh/misc.c
344
if (sh_options[ele].c) {
bin/ksh/misc.c
346
*p++ = sh_options[ele].c;
bin/ksh/misc.c
348
*q++ = sh_options[ele].c;
bin/ksh/misc.c
411
if (optc == sh_options[ele].c &&
bin/ksh/misc.c
45
int c;
bin/ksh/misc.c
47
for (c = 'a'; c <= 'z'; c++)
bin/ksh/misc.c
48
ctypes[c] |= C_ALPHA;
bin/ksh/misc.c
49
for (c = 'A'; c <= 'Z'; c++)
bin/ksh/misc.c
50
ctypes[c] |= C_ALPHA;
bin/ksh/misc.c
538
int c;
bin/ksh/misc.c
546
if ((c = *++p) == '*' || c == '?')
bin/ksh/misc.c
548
else if (c == '[') {
bin/ksh/misc.c
558
} else if (c == ']') {
bin/ksh/misc.c
564
} else if ((c & 0x80) && strchr("*+?@! ", c & 0x7f)) {
bin/ksh/misc.c
570
} else if (c == '|') {
bin/ksh/misc.c
573
} else if (c == /*(*/ ')') {
bin/ksh/misc.c
744
int c, d, rv, not, found = 0;
bin/ksh/misc.c
768
c = *p++;
bin/ksh/misc.c
769
if (ISMAGIC(c)) {
bin/ksh/misc.c
770
c = *p++;
bin/ksh/misc.c
771
if ((c & 0x80) && !ISMAGIC(c)) {
bin/ksh/misc.c
772
c &= 0x7f;/* extended pattern matching: *+?@! */
bin/ksh/misc.c
774
if (c == ' ') /* simile for @: plain (..) */
bin/ksh/misc.c
775
c = '(' /*)*/;
bin/ksh/misc.c
778
if (c == '\0')
bin/ksh/misc.c
791
if (c > d)
bin/ksh/misc.c
794
d = c;
bin/ksh/misc.c
795
if (c == sub || (c <= sub && sub <= d))
bin/ksh/misc.c
877
char c;
bin/ksh/misc.c
880
if (go->p == 0 || (c = argv[go->optind - 1][go->p]) == '\0') {
bin/ksh/misc.c
893
(c = arg[1]) == '\0') {
bin/ksh/misc.c
902
if (c == '?' || c == ':' || c == ';' || c == ',' || c == '#' ||
bin/ksh/misc.c
903
!(o = strchr(options, c))) {
bin/ksh/misc.c
905
go->buf[0] = c;
bin/ksh/misc.c
910
(go->flags & GF_NONAME) ? "" : ": ", c);
bin/ksh/misc.c
930
go->buf[0] = c;
bin/ksh/misc.c
936
(go->flags & GF_NONAME) ? "" : ": ", c);
bin/ksh/misc.c
967
return c;
bin/ksh/path.c
58
char c = file[1];
bin/ksh/path.c
60
if (c == '.')
bin/ksh/path.c
61
c = file[2];
bin/ksh/path.c
62
if (c == '/' || c == '\0')
bin/ksh/sh.h
126
char c; /* character flag (if any) */
bin/ksh/sh.h
285
#define ctype(c, t) !!(ctypes[(unsigned char)(c)]&(t))
bin/ksh/sh.h
286
#define letter(c) ctype(c, C_ALPHA)
bin/ksh/sh.h
287
#define digit(c) isdigit((unsigned char)(c))
bin/ksh/sh.h
288
#define letnum(c) (ctype(c, C_ALPHA) || isdigit((unsigned char)(c)))
bin/ksh/sh.h
35
#define ISMAGIC(c) ((unsigned char)(c) == MAGIC)
bin/ksh/shf.c
1001
shf_putc(c, shf);
bin/ksh/shf.c
531
shf_ungetc(int c, struct shf *shf)
bin/ksh/shf.c
536
if ((shf->flags & SHF_ERROR) || c == EOF ||
bin/ksh/shf.c
549
if (shf->rp[-1] != c)
bin/ksh/shf.c
554
return c;
bin/ksh/shf.c
557
*--(shf->rp) = c;
bin/ksh/shf.c
559
return c;
bin/ksh/shf.c
566
shf_putchar(int c, struct shf *shf)
bin/ksh/shf.c
571
if (c == EOF)
bin/ksh/shf.c
575
char cc = c;
bin/ksh/shf.c
598
*shf->wp++ = c;
bin/ksh/shf.c
601
return c;
bin/ksh/shf.c
737
char c, *s;
bin/ksh/shf.c
751
while ((c = *fmt++)) {
bin/ksh/shf.c
752
if (c != '%') {
bin/ksh/shf.c
753
shf_putc(c, shf);
bin/ksh/shf.c
765
for ( ; (c = *fmt++) ; ) {
bin/ksh/shf.c
766
switch (c) {
bin/ksh/shf.c
815
if (digit(c)) {
bin/ksh/shf.c
816
tmp = c - '0';
bin/ksh/shf.c
817
while (c = *fmt++, digit(c))
bin/ksh/shf.c
818
tmp = tmp * 10 + c - '0';
bin/ksh/shf.c
834
if (!c) /* nasty format */
bin/ksh/shf.c
837
if (c >= 'A' && c <= 'Z') {
bin/ksh/shf.c
839
c = c - 'A' + 'a';
bin/ksh/shf.c
842
switch (c) {
bin/ksh/shf.c
857
if (c == 'd' || c == 'i')
bin/ksh/shf.c
862
if (c == 'd' || c == 'i')
bin/ksh/shf.c
867
switch (c) {
bin/ksh/shf.c
882
if (c != 'u') {
bin/ksh/shf.c
944
numbuf[0] = c;
bin/ksh/shf.c
980
c = '0';
bin/ksh/shf.c
982
c = flags & FL_ZERO ? '0' : ' ';
bin/ksh/shf.c
986
shf_putc(c, shf);
bin/ksh/shf.c
989
c = ' ';
bin/ksh/shf.h
14
#define shf_putc(c, shf) ((shf)->wnleft == 0 ? shf_putchar((c), (shf)) : \
bin/ksh/shf.h
15
((shf)->wnleft--, *(shf)->wp++ = (c)))
bin/ksh/syn.c
100
while ((c = token(0)) == LOGAND || c == LOGOR) {
bin/ksh/syn.c
103
t = block(c == LOGAND? TAND: TOR, t, p, NULL);
bin/ksh/syn.c
114
int c;
bin/ksh/syn.c
122
c = token(0);
bin/ksh/syn.c
124
if (c == '\n' && (multi || inalias(source))) {
bin/ksh/syn.c
129
else if (c == '&' || c == COPROC)
bin/ksh/syn.c
130
p = block(c == '&' ? TASYNC : TCOPROC,
bin/ksh/syn.c
132
else if (c != ';')
bin/ksh/syn.c
172
musthave(int c, int cf)
bin/ksh/syn.c
174
if ((token(cf)) != c)
bin/ksh/syn.c
195
int c, iopn = 0, syniocf;
bin/ksh/syn.c
206
switch (c = token(cf|KEYWORD|ALIAS|VARASN)) {
bin/ksh/syn.c
317
t = newtp((c == FOR) ? TFOR : TSELECT);
bin/ksh/syn.c
321
c == FOR ? "for" : "select");
bin/ksh/syn.c
323
nesting_push(&old_nesting, c);
bin/ksh/syn.c
331
nesting_push(&old_nesting, c);
bin/ksh/syn.c
332
t = newtp((c == WHILE) ? TWHILE : TUNTIL);
bin/ksh/syn.c
344
nesting_push(&old_nesting, c);
bin/ksh/syn.c
350
nesting_push(&old_nesting, c);
bin/ksh/syn.c
419
int c;
bin/ksh/syn.c
422
c = token(CONTIN|KEYWORD|ALIAS);
bin/ksh/syn.c
428
if (c == DO)
bin/ksh/syn.c
429
c = DONE;
bin/ksh/syn.c
430
else if (c == '{')
bin/ksh/syn.c
431
c = '}';
bin/ksh/syn.c
435
musthave(c, KEYWORD|ALIAS);
bin/ksh/syn.c
480
int c;
bin/ksh/syn.c
482
c = token(CONTIN|KEYWORD|ALIAS);
bin/ksh/syn.c
484
if (c == IN)
bin/ksh/syn.c
485
c = ESAC;
bin/ksh/syn.c
486
else if (c == '{')
bin/ksh/syn.c
487
c = '}';
bin/ksh/syn.c
491
while ((tpeek(CONTIN|KEYWORD|ESACONLY)) != c) { /* no ALIAS here */
bin/ksh/syn.c
492
struct op *tc = casepart(c);
bin/ksh/syn.c
498
musthave(c, KEYWORD|ALIAS);
bin/ksh/syn.c
506
int c;
bin/ksh/syn.c
511
c = token(CONTIN|KEYWORD); /* no ALIAS here */
bin/ksh/syn.c
512
if (c != '(')
bin/ksh/syn.c
517
} while ((c = token(0)) == '|');
bin/ksh/syn.c
593
int c;
bin/ksh/syn.c
598
if ((c = token(CONTIN|KEYWORD|ALIAS)) != IN) {
bin/ksh/syn.c
599
if (c != ';') /* non-POSIX, but at&t ksh accepts a ; here */
bin/ksh/syn.c
60
int c;
bin/ksh/syn.c
603
while ((c = token(0)) == LWORD)
bin/ksh/syn.c
605
if (c != '\n' && c != ';')
bin/ksh/syn.c
65
c = tpeek(0);
bin/ksh/syn.c
66
if (c == 0 && !outtree)
bin/ksh/syn.c
68
else if (c != '\n' && c != 0)
bin/ksh/syn.c
687
int c;
bin/ksh/syn.c
692
c = token(0);
bin/ksh/syn.c
694
switch (c) {
bin/ksh/syn.c
697
c = nesting.start_token;
bin/ksh/syn.c
716
if (tt->val == c)
bin/ksh/syn.c
721
if (c > 0 && c < 256) {
bin/ksh/syn.c
722
redir[0] = c;
bin/ksh/syn.c
726
"?%d", c);
bin/ksh/syn.c
830
int c = tpeek(ARRAYVAR | (meta == TM_BINOP ? 0 : CONTIN));
bin/ksh/syn.c
836
uqword = c == LWORD && *ident;
bin/ksh/syn.c
839
ret = c == LOGOR;
bin/ksh/syn.c
841
ret = c == LOGAND;
bin/ksh/syn.c
845
ret = c == '(' /*)*/;
bin/ksh/syn.c
847
ret = c == /*(*/ ')';
bin/ksh/syn.c
849
if (meta == TM_BINOP && c == REDIR &&
bin/ksh/syn.c
872
int c = tpeek(ARRAYVAR);
bin/ksh/syn.c
874
if (c != LWORD)
bin/ksh/syn.c
96
int c;
bin/ksh/tree.c
13
#define tputc(c, shf) shf_putchar(c, shf);
bin/ksh/tree.c
249
tputC(int c, struct shf *shf)
bin/ksh/tree.c
251
if ((c&0x60) == 0) { /* C0|C1 */
bin/ksh/tree.c
252
tputc((c&0x80) ? '$' : '^', shf);
bin/ksh/tree.c
253
tputc(((c&0x7F)|0x40), shf);
bin/ksh/tree.c
254
} else if ((c&0x7F) == 0x7F) { /* DEL */
bin/ksh/tree.c
255
tputc((c&0x80) ? '$' : '^', shf);
bin/ksh/tree.c
258
tputc(c, shf);
bin/ksh/tree.c
264
int c, quoted=0;
bin/ksh/tree.c
274
switch ((c = *wp++)) {
bin/ksh/tree.c
281
c = *wp++;
bin/ksh/tree.c
282
if (!quoted || (c == '"' || c == '`' || c == '$'))
bin/ksh/tree.c
284
tputC(c, shf);
bin/ksh/tree.c
316
while ((c = *wp++) != 0)
bin/ksh/tree.c
317
tputC(c, shf);
bin/ksh/tree.c
364
int c;
bin/ksh/tree.c
366
while ((c = *fmt++)) {
bin/ksh/tree.c
367
if (c == '%') {
bin/ksh/tree.c
372
switch ((c = *fmt++)) {
bin/ksh/tree.c
405
if (c == ';')
bin/ksh/tree.c
422
tputc(c, shf);
bin/ksh/tree.c
426
tputc(c, shf);
bin/ksh/tree.c
492
wdscan(const char *wp, int c)
bin/ksh/tree.c
519
if (c == CSUBST && nest == 0)
bin/ksh/tree.c
529
if (c == wp[-1] && nest == 0)
bin/ksh/tree.c
549
int c;
bin/ksh/tree.c
559
switch ((c = *wp++)) {
bin/ksh/tree.c
590
while ((c = *wp++) != 0)
bin/ksh/tree.c
591
shf_putchar(c, &shf);
bin/ksh/var.c
1178
int c;
bin/ksh/var.c
1181
while ((c = *s++) && (c != ']' || --depth))
bin/ksh/var.c
1182
if (c == '[')
bin/ksh/var.c
1184
if (!c)
bin/ksh/var.c
174
int c;
bin/ksh/var.c
182
c = (unsigned char)n[0];
bin/ksh/var.c
183
if (!letter(c)) {
bin/ksh/var.c
190
*vp->name = c;
bin/ksh/var.c
191
if (digit(c)) {
bin/ksh/var.c
204
switch (c) {
bin/ksh/var.c
426
int c;
bin/ksh/var.c
458
for (c = (unsigned char)*s++; c ; c = (unsigned char)*s++) {
bin/ksh/var.c
459
if (c == '-') {
bin/ksh/var.c
461
} else if (c == '#') {
bin/ksh/var.c
467
} else if (letnum(c)) {
bin/ksh/var.c
468
if (isdigit(c))
bin/ksh/var.c
469
c -= '0';
bin/ksh/var.c
470
else if (islower(c))
bin/ksh/var.c
471
c -= 'a' - 10; /* todo: assumes ascii */
bin/ksh/var.c
472
else if (isupper(c))
bin/ksh/var.c
473
c -= 'A' - 10; /* todo: assumes ascii */
bin/ksh/var.c
475
c = -1; /* _: force error */
bin/ksh/var.c
476
if (c < 0 || c >= base)
bin/ksh/var.c
478
num = num * base + c;
bin/ksh/var.c
804
char c;
bin/ksh/var.c
810
c = p[1];
bin/ksh/var.c
812
if (c == '[')
bin/ksh/var.c
814
else if (c == ']' && --depth == 0) {
bin/ksh/vi.c
1064
#define issp(c) (isspace((unsigned char)(c)) || (c) == '\n')
bin/ksh/vi.c
1113
unsigned char c;
bin/ksh/vi.c
1120
c = (unsigned char)*p;
bin/ksh/vi.c
1121
if (islower(c)) {
bin/ksh/vi.c
1123
*p = toupper(c);
bin/ksh/vi.c
1124
} else if (isupper(c)) {
bin/ksh/vi.c
1126
*p = tolower(c);
bin/ksh/vi.c
201
int c;
bin/ksh/vi.c
208
c = (unsigned char)*macro.p++;
bin/ksh/vi.c
210
if (!c) {
bin/ksh/vi.c
216
c = x_getc();
bin/ksh/vi.c
219
c = x_getc();
bin/ksh/vi.c
221
if (c == -1)
bin/ksh/vi.c
224
if (c == edchars.intr || c == edchars.quit) {
bin/ksh/vi.c
2251
char_len(int c)
bin/ksh/vi.c
2255
if ((c & 0x80) && Flag(FVISHOW8)) {
bin/ksh/vi.c
2257
c &= 0x7f;
bin/ksh/vi.c
2259
if (c < ' ' || c == 0x7f)
bin/ksh/vi.c
226
x_vi_zotc(c);
bin/ksh/vi.c
2266
x_vi_zotc(int c)
bin/ksh/vi.c
2268
if (Flag(FVISHOW8) && (c & 0x80)) {
bin/ksh/vi.c
2270
c &= 0x7f;
bin/ksh/vi.c
2272
if (c < ' ' || c == 0x7f) {
bin/ksh/vi.c
2274
c ^= '@';
bin/ksh/vi.c
2276
x_putc(c);
bin/ksh/vi.c
228
trapsig(c == edchars.intr ? SIGINT : SIGQUIT);
bin/ksh/vi.c
2304
isu8cont(unsigned char c)
bin/ksh/vi.c
2306
return !Flag(FVISHOW8) && (c & (0x80 | 0x40)) == 0x80;
bin/ksh/vi.c
231
} else if (c == edchars.eof) {
bin/ksh/vi.c
234
c = -1;
bin/ksh/vi.c
240
if (vi_hook(c))
bin/ksh/vi.c
247
if (c == -1 || len <= (size_t)es->linelen)
bin/ksh/vi.c
88
#define is_bad(c) (classify[(c)&0x7f]&B_)
bin/ksh/vi.c
89
#define is_cmd(c) (classify[(c)&0x7f]&(M_|E_|C_|U_))
bin/ksh/vi.c
90
#define is_move(c) (classify[(c)&0x7f]&M_)
bin/ksh/vi.c
91
#define is_extend(c) (classify[(c)&0x7f]&E_)
bin/ksh/vi.c
92
#define is_long(c) (classify[(c)&0x7f]&X_)
bin/ksh/vi.c
93
#define is_undoable(c) (!(classify[(c)&0x7f]&U_))
bin/ksh/vi.c
94
#define is_srch(c) (classify[(c)&0x7f]&S_)
bin/ksh/vi.c
95
#define is_zerocount(c) (classify[(c)&0x7f]&Z_)
bin/mt/mt.c
295
char c;
bin/mt/mt.c
311
for (; (c = *bits) > 32; bits++)
bin/mt/mt.c
312
putchar(c);
bin/mt/mtrmt.c
155
int c;
bin/mt/mtrmt.c
158
c = (unsigned char)*cp;
bin/mt/mtrmt.c
159
if (!isascii(c) || !(isalnum(c) || c == '_' || c == '-')) {
bin/mt/mtrmt.c
261
char c;
bin/mt/mtrmt.c
263
if (read(rmtape, &c, 1) != 1)
bin/mt/mtrmt.c
265
return (c);
bin/pax/getoldopt.c
26
char c;
bin/pax/getoldopt.c
44
c = *key++;
bin/pax/getoldopt.c
45
if (c == '\0') {
bin/pax/getoldopt.c
49
place = strchr(optstring, c);
bin/pax/getoldopt.c
51
if (place == NULL || c == ':') {
bin/pax/getoldopt.c
52
fprintf(stderr, "%s: unknown option %c\n", argv[0], c);
bin/pax/getoldopt.c
63
argv[0], c);
bin/pax/getoldopt.c
68
return (c);
bin/pax/options.c
1184
int c, list_only = 0;
bin/pax/options.c
1197
while ((c=getopt(argc,argv,"abcdfijklmoprstuvzABC:E:F:H:I:LO:SZ6")) != -1)
bin/pax/options.c
1198
switch (c) {
bin/pax/options.c
305
int c;
bin/pax/options.c
315
while ((c=getopt(argc,argv,"ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HLOPT:U:XYZ0"))
bin/pax/options.c
317
switch (c) {
bin/pax/options.c
727
int c;
bin/pax/options.c
746
while ((c = getoldopt(argc, argv,
bin/pax/options.c
748
switch (c) {
bin/pax/pat_rep.c
1059
char c;
bin/pax/pat_rep.c
1067
while ((dpt < destend) && ((c = *spt++) != '\0')) {
bin/pax/pat_rep.c
1072
if (c == '&') {
bin/pax/pat_rep.c
1074
} else if ((c == '\\') && (*spt >= '0') && (*spt <= '9')) {
bin/pax/pat_rep.c
1085
if ((c == '\\') && (*spt != '\0'))
bin/pax/pat_rep.c
1086
c = *spt++;
bin/pax/pat_rep.c
1087
*dpt++ = c;
bin/pax/pat_rep.c
495
char c;
bin/pax/pat_rep.c
500
switch (c = *pattern++) {
bin/pax/pat_rep.c
525
c = *pattern;
bin/pax/pat_rep.c
529
while (c == '*')
bin/pax/pat_rep.c
530
c = *++pattern;
bin/pax/pat_rep.c
535
if (c == '\0')
bin/pax/pat_rep.c
556
if ((c = *pattern++) == '\0')
bin/pax/pat_rep.c
560
if (c != *string++)
bin/pax/pat_rep.c
571
char c;
bin/pax/pat_rep.c
579
while ((c = *pattern++) != ']') {
bin/pax/pat_rep.c
583
if (c == '\0')
bin/pax/pat_rep.c
588
if ((c <= test) && (test <= c2))
bin/pax/pat_rep.c
591
} else if (c == test)
bin/stty/print.c
234
ccval(const struct cchar *p, int c)
bin/stty/print.c
240
(void)snprintf(buf, sizeof(buf), "%d", c);
bin/stty/print.c
243
if (c == _POSIX_VDISABLE)
bin/stty/print.c
246
if (c & 0200) {
bin/stty/print.c
249
c &= 0177;
bin/stty/print.c
251
if (c == 0177) {
bin/stty/print.c
255
else if (c < 040) {
bin/stty/print.c
257
*bp++ = c + '@';
bin/stty/print.c
260
*bp++ = c;
bin/test/test.c
345
int c, sig1, sig2;
bin/test/test.c
351
c = sig1;
bin/test/test.c
353
c = (len1 < len2) ? -sig1 : sig1;
bin/test/test.c
355
c = strncmp(p1, p2, len1) * sig1;
bin/test/test.c
357
return c;
distrib/special/more/curses.h
176
#define mvinsch(y, x, c) mvwinsch(stdscr, y, x, c)
distrib/special/more/curses.h
193
#define mvwinsch(w, y, x, c) \
distrib/special/more/curses.h
194
(wmove(w, y, x) == ERR ? ERR : winsch(w, c))
distrib/special/more/curses.h
70
#define unctrl(c) __unctrl[(c) & 0xff]
distrib/special/more/more.c
1621
char c;
distrib/special/more/more.c
1627
while ((c = *instr++) != '\0') {
distrib/special/more/more.c
1628
switch (c) {
distrib/special/more/more.c
1638
*outstr++ = c;
distrib/special/more/more.c
1656
*outstr++ = c;
distrib/special/more/more.c
799
char c; /* next output character */
distrib/special/more/more.c
813
c = (*s == '_')? s[2] : *s ;
distrib/special/more/more.c
817
c = *s++;
distrib/special/more/more.c
819
if (c == ' ' && state == 0 && ulglitch &&
distrib/special/more/more.c
825
if (c != ' ' || pstate == 0 || state != 0 ||
distrib/special/more/more.c
827
putchar(c);
distrib/special/more/more.c
88
#define Ungetc(c, f) (--file_pos, ungetc(c, f))
distrib/special/more/tgoto.c
195
*dp++ = c;
distrib/special/more/tgoto.c
36
#define CTRL(c) ((c) & 037)
distrib/special/more/tgoto.c
74
int c;
distrib/special/more/tgoto.c
86
while ((c = *cp++) != '\0') {
distrib/special/more/tgoto.c
87
if (c != '%') {
distrib/special/more/tgoto.c
90
*dp++ = c;
distrib/special/more/tgoto.c
93
switch (c = *cp++) {
games/adventure/hdr.h
166
#define DECR(a,b,c,d,e) decr(*#a-'+',*#b-'-',*#c-'#',*#d-'&',*#e-'%')
games/adventure/hdr.h
66
#define FLUSHLINE do { int c; while ((c = getchar()) != EOF && c != '\n'); } while (0)
games/adventure/init.c
113
cage = vocab(DECR(c,a,g,e,\0),1, 0);
games/adventure/init.c
123
clam = vocab(DECR(c,l,a,m,\0),1, 0);
games/adventure/init.c
137
chasm = vocab(DECR(c,h,a,s,m), 1, 0);
games/adventure/init.c
146
coins = vocab(DECR(c,o,i,n,s), 1, 0);
games/adventure/init.c
147
chest = vocab(DECR(c,h,e,s,t), 1, 0);
games/adventure/init.c
155
chain = vocab(DECR(c,h,a,i,n), 1, 0);
games/adventure/init.c
157
back = vocab(DECR(b,a,c,k,\0),0, 0);
games/adventure/init.c
159
cave = vocab(DECR(c,a,v,e,\0),0, 0);
games/adventure/init.c
167
lock = vocab(DECR(l,o,c,k,\0),2, 0);
games/adventure/init.c
65
decr(char a, char b, char c, char d, char e)
games/adventure/init.c
71
buf[2] = c + '#';
games/adventure/setup.c
100
switch (c) {
games/adventure/setup.c
110
printf("0x%02x,", (unsigned int)(c ^ random()) & 0xFF);
games/adventure/setup.c
65
int c, count, linestart;
games/adventure/setup.c
91
while ((c = getc(infile)) != EOF) {
games/adventure/setup.c
94
if (linestart && c == ' ') { /* Convert first spaces to tab */
games/adventure/setup.c
96
while ((c = getc(infile)) == ' ' && c != EOF);
games/adventure/vocab.c
194
char *c;
games/adventure/vocab.c
208
for (l = 0, c = h->atab; l < 5; l++)
games/adventure/vocab.c
209
if ((*c ^ '='))
games/adventure/vocab.c
210
putchar(*c++ ^ '=');
games/adventure/wizard.c
101
char *c;
games/adventure/wizard.c
105
for (c = fname; c - fname < sizeof(fname); c++) {
games/adventure/wizard.c
108
*c = ch;
games/adventure/wizard.c
110
if (c - fname == sizeof(fname)) {
games/adventure/wizard.c
111
c--;
games/adventure/wizard.c
114
*c = '\0';
games/atc/graphics.c
284
int c, y, x;
games/atc/graphics.c
294
c = getchar();
games/atc/graphics.c
295
if (c == EOF || c == 'y') {
games/atc/graphics.c
355
int c;
games/atc/graphics.c
372
while ((c = getchar()) != EOF && c != ' ')
games/atc/graphics.c
66
int c;
games/atc/graphics.c
68
if ((c = getchar()) == EOF && feof(stdin))
games/atc/graphics.c
70
return (c);
games/atc/input.c
226
int c, i, done;
games/atc/input.c
233
c = gettoken();
games/atc/input.c
234
if (c == tty_new.c_cc[VERASE]) {
games/atc/input.c
237
} else if (c == tty_new.c_cc[VKILL]) {
games/atc/input.c
243
if (st[T_STATE].rule[i].token == c ||
games/atc/input.c
245
push(i, (c >= ALPHATOKEN) ? tval : c);
games/atc/input.c
307
setplane(char c)
games/atc/input.c
311
pp = findplane(number(c));
games/atc/input.c
320
turn(char c)
games/atc/input.c
328
circle(char c)
games/atc/input.c
337
left(char c)
games/atc/input.c
347
right(char c)
games/atc/input.c
357
Left(char c)
games/atc/input.c
366
Right(char c)
games/atc/input.c
375
delayb(char c)
games/atc/input.c
379
c -= '0';
games/atc/input.c
381
if (c >= sp->num_beacons)
games/atc/input.c
383
xdiff = sp->beacon[(int)c].x - p.xpos;
games/atc/input.c
385
ydiff = sp->beacon[(int)c].y - p.ypos;
games/atc/input.c
390
if (abs(sp->beacon[(int)c].x - p.xpos) !=
games/atc/input.c
391
abs(sp->beacon[(int)c].y - p.ypos))
games/atc/input.c
394
p.delayd_no = c;
games/atc/input.c
399
xdiff = sp->beacon[dest_no].x - sp->beacon[(int)c].x;
games/atc/input.c
400
ydiff = sp->beacon[dest_no].y - sp->beacon[(int)c].y;
games/atc/input.c
403
xdiff = sp->exit[dest_no].x - sp->beacon[(int)c].x;
games/atc/input.c
404
ydiff = sp->exit[dest_no].y - sp->beacon[(int)c].y;
games/atc/input.c
407
xdiff = sp->airport[dest_no].x - sp->beacon[(int)c].x;
games/atc/input.c
408
ydiff = sp->airport[dest_no].y - sp->beacon[(int)c].y;
games/atc/input.c
424
beacon(char c)
games/atc/input.c
431
ex_it(char c)
games/atc/input.c
438
airport(char c)
games/atc/input.c
445
climb(char c)
games/atc/input.c
452
descend(char c)
games/atc/input.c
459
setalt(char c)
games/atc/input.c
461
if ((p.altitude == c - '0') && (p.new_altitude == p.altitude))
games/atc/input.c
463
if (p.new_altitude == c - '0')
games/atc/input.c
465
p.new_altitude = c - '0';
games/atc/input.c
470
setrelalt(char c)
games/atc/input.c
474
if (c == 0)
games/atc/input.c
479
new_altitude = p.altitude + c - '0';
games/atc/input.c
482
new_altitude = p.altitude - (c - '0');
games/atc/input.c
500
benum(char c)
games/atc/input.c
502
dest_no = c -= '0';
games/atc/input.c
506
if (c >= sp->num_beacons)
games/atc/input.c
508
p.new_dir = DIR_FROM_DXDY(sp->beacon[(int)c].x - p.xpos,
games/atc/input.c
509
sp->beacon[(int)c].y - p.ypos);
games/atc/input.c
512
if (c >= sp->num_exits)
games/atc/input.c
514
p.new_dir = DIR_FROM_DXDY(sp->exit[(int)c].x - p.xpos,
games/atc/input.c
515
sp->exit[(int)c].y - p.ypos);
games/atc/input.c
518
if (c >= sp->num_airports)
games/atc/input.c
520
p.new_dir = DIR_FROM_DXDY(sp->airport[(int)c].x - p.xpos,
games/atc/input.c
521
sp->airport[(int)c].y - p.ypos);
games/atc/input.c
531
to_dir(char c)
games/atc/input.c
533
p.new_dir = dir_no(c);
games/atc/input.c
538
rel_dir(char c)
games/atc/input.c
542
angle = dir_no(c);
games/atc/input.c
562
mark(char c)
games/atc/input.c
573
unmark(char c)
games/atc/input.c
584
ignore(char c)
games/backgammon/backgammon/extra.c
195
int c, l, ct;
games/backgammon/backgammon/extra.c
201
c = abs(i - l);
games/backgammon/backgammon/extra.c
203
for (j = c; j < 13; j++)
games/backgammon/backgammon/main.c
136
c = readc();
games/backgammon/backgammon/main.c
137
switch (c) {
games/backgammon/backgammon/main.c
269
c = readc();
games/backgammon/backgammon/main.c
272
switch (c) {
games/backgammon/backgammon/main.c
86
char c; /* non-descript character storage */
games/backgammon/common_source/check.c
37
int i, c;
games/backgammon/common_source/check.c
39
c = 0;
games/backgammon/common_source/check.c
41
i = checkmove(c);
games/backgammon/common_source/check.c
75
c = -1;
games/backgammon/common_source/fancy.c
177
int i, r, c;
games/backgammon/common_source/fancy.c
179
getyx(stdscr, r, c);
games/backgammon/common_source/fancy.c
218
move(r, c); /* return to saved position */
games/backgammon/common_source/fancy.c
224
fixpos(int old, int new, int r, int c, int inc)
games/backgammon/common_source/fancy.c
239
nc = c + 2;
games/backgammon/common_source/fancy.c
241
nc = c < 54 ? c : c + 1;
games/backgammon/common_source/fancy.c
243
nc = c < 54 ? c + 1 : c;
games/backgammon/common_source/fancy.c
250
if (c < 54) {
games/backgammon/common_source/fancy.c
253
fixcol(r, c, abs(nv - 5), col, inc);
games/backgammon/common_source/fancy.c
255
fixcol(r+inc*ov, c+1, abs(ov-5), col, inc);
games/backgammon/common_source/fancy.c
257
fixcol(r, c, abs(ov - 5), ' ', inc);
games/backgammon/common_source/fancy.c
259
fixcol(r+inc*nv, c+1, abs(nv-5), ' ', inc);
games/backgammon/common_source/fancy.c
265
fixcol(r+inc*(ov-5), c, abs(ov-10), col, inc);
games/backgammon/common_source/fancy.c
266
fixcol(r, c + 2, abs(nv - 10), col, inc);
games/backgammon/common_source/fancy.c
269
fixcol(r+inc*(nv-5), c, abs(nv-10), ' ', inc);
games/backgammon/common_source/fancy.c
270
fixcol(r, c + 2, abs(ov - 10), ' ', inc);
games/backgammon/common_source/fancy.c
275
fixcol(r+inc*(ov%5), c+o, abs(5*n-ov), col, inc);
games/backgammon/common_source/fancy.c
277
fixcol(r, c+n, abs(5*n-nv), col, inc);
games/backgammon/common_source/fancy.c
279
fixcol(r+inc*(nv%5), c+n, abs(5*n-nv), ' ', inc);
games/backgammon/common_source/fancy.c
281
fixcol(r, c+o, abs(5*o-ov), ' ', inc);
games/backgammon/common_source/fancy.c
287
fixcol(r, c + 1, nv, new > 0 ? 'r' : 'w', inc);
games/backgammon/common_source/fancy.c
290
fixcol(r + inc * new, c + 1, abs(old + new), ' ', inc);
games/backgammon/common_source/fancy.c
294
fixcol(int r, int c, int l, int ch, int inc)
games/backgammon/common_source/fancy.c
298
mvaddch(r, c, ch);
games/backgammon/common_source/fancy.c
301
mvaddch(r, c, ch);
games/backgammon/common_source/odds.c
71
canhit(int i, int c)
games/backgammon/common_source/odds.c
76
if (c == 0)
games/backgammon/common_source/save.c
158
const char *c;
games/backgammon/common_source/save.c
161
c = s;
games/backgammon/common_source/save.c
162
while (*c != '\0')
games/backgammon/common_source/save.c
163
addch(*c++);
games/backgammon/common_source/save.c
54
int r, c, i;
games/backgammon/common_source/save.c
71
getyx(stdscr, r, c);
games/backgammon/common_source/save.c
72
move(r, c - 1);
games/backgammon/common_source/subs.c
118
move(r, c);
games/backgammon/common_source/subs.c
142
char c;
games/backgammon/common_source/subs.c
146
while ((c = readc()) != 'Y' && c != 'N') {
games/backgammon/common_source/subs.c
147
if (special && c == special)
games/backgammon/common_source/subs.c
158
if (c == 'Y')
games/backgammon/common_source/subs.c
163
return(c == 'Y');
games/backgammon/common_source/subs.c
175
int c;
games/backgammon/common_source/subs.c
178
c = cturn / abs(cturn);
games/backgammon/common_source/subs.c
181
offptr += c;
games/backgammon/common_source/subs.c
182
offopp -= c;
games/backgammon/common_source/subs.c
183
inptr += c;
games/backgammon/common_source/subs.c
184
inopp -= c;
games/backgammon/common_source/subs.c
185
Colorptr += c;
games/backgammon/common_source/subs.c
186
colorptr += c;
games/backgammon/common_source/subs.c
286
char c;
games/backgammon/common_source/subs.c
293
c = readc();
games/backgammon/common_source/subs.c
294
if (c != '\n') {
games/backgammon/common_source/subs.c
295
while (c < '1' || c > '6')
games/backgammon/common_source/subs.c
296
c = readc();
games/backgammon/common_source/subs.c
297
D0 = c - '0';
games/backgammon/common_source/subs.c
298
printw(" %c", c);
games/backgammon/common_source/subs.c
299
c = readc();
games/backgammon/common_source/subs.c
300
while (c < '1' || c > '6')
games/backgammon/common_source/subs.c
301
c = readc();
games/backgammon/common_source/subs.c
302
D1 = c - '0';
games/backgammon/common_source/subs.c
303
printw(" %c", c);
games/backgammon/common_source/subs.c
54
int c;
games/backgammon/common_source/subs.c
58
c = getch();
games/backgammon/common_source/subs.c
59
if (c == '\004' || c == ERR) /* ^D or failure */
games/backgammon/common_source/subs.c
61
if (c == '\033' || c == '\015')
games/backgammon/common_source/subs.c
64
return(c);
games/backgammon/common_source/subs.c
65
if (c == '\014')
games/backgammon/common_source/subs.c
67
if (c >= 'a' && c <= 'z')
games/backgammon/common_source/subs.c
68
return(c & 0137); /* upper case */
games/backgammon/common_source/subs.c
69
return(c);
games/backgammon/common_source/subs.c
88
int r, c;
games/backgammon/common_source/subs.c
90
getyx(stdscr, r, c);
games/backgammon/common_source/table.c
112
} else if (c == KEY_DL && ncin > 0) {
games/backgammon/common_source/table.c
120
if (!isascii(c) || (ncin >= CIN_SIZE - 1)) {
games/backgammon/common_source/table.c
124
n = dotable(c, ist);
games/backgammon/common_source/table.c
126
cin[ncin++] = c;
games/backgammon/common_source/table.c
128
if (c != '\n')
games/backgammon/common_source/table.c
129
addch(c);
games/backgammon/common_source/table.c
156
dotable(char c, int i)
games/backgammon/common_source/table.c
161
test = (c == 'R');
games/backgammon/common_source/table.c
164
if (a == c || (test && a == '\n')) {
games/backgammon/common_source/table.c
175
p[mvl] = c - '0';
games/backgammon/common_source/table.c
177
p[mvl] = p[mvl] * 10 + c - '0';
games/backgammon/common_source/table.c
186
g[mvl] = p[mvl] + cturn * (c - '0');
games/backgammon/common_source/table.c
195
g[mvl] = c - '0';
games/backgammon/common_source/table.c
197
g[mvl] = g[mvl] * 10 + c - '0';
games/backgammon/common_source/table.c
77
int c;
games/backgammon/common_source/table.c
88
c = readc();
games/backgammon/common_source/table.c
90
if (c == 'S') {
games/backgammon/common_source/table.c
97
if ((c == KEY_BACKSPACE || c == 0177) && ncin > 0) {
games/backgammon/teachgammon/ttext2.c
122
const char *c;
games/backgammon/teachgammon/ttext2.c
129
c = a;
games/backgammon/teachgammon/ttext2.c
130
for (i = 0; *(c++) != '\0'; i--);
games/backgammon/teachgammon/tutor.c
138
int r, c, j;
games/backgammon/teachgammon/tutor.c
140
getyx(stdscr, r, c);
games/backgammon/teachgammon/tutor.c
145
move(r, c);
games/battlestar/fly.c
184
int r, c, n;
games/battlestar/fly.c
191
c = rnd(COLS);
games/battlestar/fly.c
192
mvaddch(r, c, '.');
games/battlestar/room.c
42
int c;
games/battlestar/room.c
47
for (p = location[position].desc; (c = *p++) != 0;)
games/battlestar/room.c
48
if (c != '-' && c != '*' && c != '+') {
games/battlestar/room.c
49
if (c == '=')
games/battlestar/room.c
52
putchar(c);
games/battlestar/room.c
54
if (c != '*')
games/battlestar/room.c
55
printf("%s", truedirec(compass, c));
games/boggle/boggle/bog.h
59
#define SEVENBIT(c) ((c) & 0x7f)
games/boggle/boggle/bog.h
60
#define HISET(c) ((c) & 0x80)
games/boggle/boggle/bog.h
61
#define SETHI(c) ((c) | 0x80)
games/boggle/boggle/mach.c
419
doword(int pause, int r, int c)
games/boggle/boggle/mach.c
440
move(r, c);
games/boggle/boggle/mach.c
458
int c, found, i, r;
games/boggle/boggle/mach.c
464
getyx(stdscr, r, c);
games/boggle/boggle/mach.c
485
move(r, c);
games/boggle/boggle/mach.c
490
move(r, c);
games/boggle/boggle/mach.c
497
doword(1, r, c);
games/boggle/boggle/mach.c
499
doword(0, r, c);
games/boggle/boggle/mach.c
501
move(r, c);
games/boggle/boggle/prtable.c
67
int c, j;
games/boggle/boggle/prtable.c
82
b = c = z = loc = 0;
games/boggle/boggle/prtable.c
84
c++;
games/boggle/boggle/prtable.c
85
if (c >= a + b)
games/boggle/boggle/prtable.c
94
c++;
games/boggle/boggle/prtable.c
95
if (c >= a + b)
games/bs/bs.c
111
#define IS_SHIP(c) isupper(c)
games/bs/bs.c
1277
do_options(int c, char *op[])
games/bs/bs.c
1281
while ((ch = getopt(c, op, "bchs")) != -1) {
games/bs/bs.c
475
int c;
games/bs/bs.c
487
c = getcoord(PLAYER);
games/bs/bs.c
489
(!strchr(docked, c));
games/bs/bs.c
491
if (c == 'R')
games/bs/bs.c
497
if (ss->symbol == c)
games/bs/bs.c
504
c = getch();
games/bs/bs.c
505
switch (c) {
games/bs/bs.c
535
switch(c)
games/bs/bs.c
581
int ny, nx, c;
games/bs/bs.c
601
switch(c = getch())
games/bs/bs.c
665
return(c);
games/cribbage/cards.c
117
CARD c;
games/cribbage/cards.c
123
c = *h;
games/cribbage/cards.c
125
*cp = c;
games/cribbage/cards.c
61
CARD c;
games/cribbage/cards.c
65
c = d[j - 1]; /* exchange (j - 1) and k */
games/cribbage/cards.c
67
d[k] = c;
games/cribbage/deck.h
69
#define VAL(c) ( (c) < 9 ? (c)+1 : 10 ) /* val of rank */
games/cribbage/io.c
104
printcard(WINDOW *win, int cardno, CARD c, bool blank)
games/cribbage/io.c
106
prcard(win, cardno * 2, cardno, c, blank);
games/cribbage/io.c
114
prcard(WINDOW *win, int y, int x, CARD c, bool blank)
games/cribbage/io.c
116
if (c.rank == EMPTY)
games/cribbage/io.c
125
mvwaddch(win, y + 1, x + 1, rankchar[c.rank][0]);
games/cribbage/io.c
126
waddch(win, suitchar[c.suit][0]);
games/cribbage/io.c
127
mvwaddch(win, y + 3, x + 4, rankchar[c.rank][0]);
games/cribbage/io.c
128
waddch(win, suitchar[c.suit][0]);
games/cribbage/io.c
286
int c;
games/cribbage/io.c
288
c = readchar();
games/cribbage/io.c
289
if (islower(c))
games/cribbage/io.c
290
c = toupper(c);
games/cribbage/io.c
291
waddch(Msgwin, c);
games/cribbage/io.c
292
return (c);
games/cribbage/io.c
461
char c;
games/cribbage/io.c
464
while ((c = readchar()) != '\n')
games/cribbage/io.c
479
char c;
games/cribbage/io.c
483
while (read(STDIN_FILENO, &c, sizeof(char)) <= 0)
games/cribbage/io.c
488
if (c == CTRL('L')) {
games/cribbage/io.c
492
if (c == '\r')
games/cribbage/io.c
495
return (c);
games/cribbage/io.c
507
int c, oy, ox;
games/cribbage/io.c
512
for (pos = 0; (c = readchar()) != '\n'; wclrtoeol(Msgwin),
games/cribbage/io.c
514
if (c == -1)
games/cribbage/io.c
516
if (c == ' ' && (pos == 0 || linebuf[pos - 1] == ' '))
games/cribbage/io.c
518
if (c == erasechar()) {
games/cribbage/io.c
527
if (c == killchar()) {
games/cribbage/io.c
532
if (pos >= LINESIZE - 1 || !(isalnum(c) || c == ' ')) {
games/cribbage/io.c
536
if (islower(c))
games/cribbage/io.c
537
c = toupper(c);
games/cribbage/io.c
538
linebuf[pos++] = c;
games/cribbage/io.c
539
waddstr(Msgwin, unctrl(c));
games/cribbage/io.c
69
msgcard(CARD c, bool brief)
games/cribbage/io.c
72
return (msgcrd(c, TRUE, NULL, TRUE));
games/cribbage/io.c
74
return (msgcrd(c, FALSE, " of ", FALSE));
games/cribbage/io.c
82
msgcrd(CARD c, bool brfrank, char *mid, bool brfsuit)
games/cribbage/io.c
84
if (c.rank == EMPTY || c.suit == EMPTY)
games/cribbage/io.c
87
addmsg("%1.1s", rankchar[c.rank]);
games/cribbage/io.c
89
addmsg("%s", rankname[c.rank]);
games/cribbage/io.c
93
addmsg("%1.1s", suitchar[c.suit]);
games/cribbage/io.c
95
addmsg("%s", suitname[c.suit]);
games/fortune/strfile/strfile.c
360
unctrl(char c)
games/fortune/strfile/strfile.c
364
if (isprint((unsigned char)c)) {
games/fortune/strfile/strfile.c
365
buf[0] = c;
games/fortune/strfile/strfile.c
367
} else if (c == 0177) {
games/fortune/strfile/strfile.c
372
buf[1] = c + 'A' - 1;
games/gomoku/bdinit.c
187
s = 5 + sp1->s_fval[BLACK][r].c.b;
games/gomoku/bdisp.c
152
int i, j, c;
games/gomoku/bdisp.c
161
c = '+';
games/gomoku/bdisp.c
163
c = '-';
games/gomoku/bdisp.c
165
c = '.';
games/gomoku/bdisp.c
167
c = pcolor[sp->s_occ];
games/gomoku/bdisp.c
168
addch(c);
games/gomoku/bdisp.c
180
int i, j, c;
games/gomoku/bdisp.c
193
c = '+';
games/gomoku/bdisp.c
195
c = '-';
games/gomoku/bdisp.c
197
c = '.';
games/gomoku/bdisp.c
199
c = pcolor[sp->s_occ];
games/gomoku/bdisp.c
200
putc(c, fp);
games/gomoku/bdisp.c
251
int c = EOF;
games/gomoku/bdisp.c
256
while (cp < end && (c = getchar()) != EOF && c != '\n' && c != '\r') {
games/gomoku/bdisp.c
257
*cp++ = c;
games/gomoku/bdisp.c
259
switch (c) {
games/gomoku/bdisp.c
280
c = ' ';
games/gomoku/bdisp.c
283
addch(c);
games/gomoku/bdisp.c
289
return(c != EOF);
games/gomoku/bdisp.c
300
int ny, nx, c;
games/gomoku/bdisp.c
310
switch(c = getch()) {
games/gomoku/gomoku.h
156
} c;
games/gomoku/main.c
328
int c;
games/gomoku/main.c
331
while ((c = getc(fp)) != EOF && c != '\n')
games/gomoku/main.c
332
*cp++ = c;
games/gomoku/makemove.c
104
val = weight[5 - cp->c.a - cp->c.b];
games/gomoku/makemove.c
109
val += weight[5 - cp->c.a - cp->c.b];
games/gomoku/makemove.c
143
cp->c.a = 4 - n;
games/gomoku/makemove.c
144
cp->c.b = 1;
games/gomoku/makemove.c
146
cp->c.a = 5 - n;
games/gomoku/makemove.c
147
cp->c.b = 0;
games/gomoku/makemove.c
185
if (cp->c.b) {
games/gomoku/makemove.c
186
cp->c.a += 1;
games/gomoku/makemove.c
187
cp->c.b = 0;
games/gomoku/makemove.c
190
if (cp->c.b) {
games/gomoku/makemove.c
191
cp->c.a += 1;
games/gomoku/makemove.c
192
cp->c.b = 0;
games/gomoku/pickmove.c
1066
fcnt = cb.c.a - 2;
games/gomoku/pickmove.c
1077
i = cb.c.b ? 2 : 0;
games/gomoku/pickmove.c
1116
if (cb.c.b &&
games/gomoku/pickmove.c
1166
if (cb.c.b &&
games/gomoku/pickmove.c
133
if (sp->s_combo[!us].c.a == 1 && !BIT_TEST(forcemap, m))
games/gomoku/pickmove.c
1397
if (s && ocbp->c_combo.c.a == 2) {
games/gomoku/pickmove.c
1432
s = ep->e_fval.c.b ? 6 : 5;
games/gomoku/pickmove.c
151
if (Tcp->c.a <= 1 && (Ocp->c.a > 1 ||
games/gomoku/pickmove.c
152
Tcp->c.a + Tcp->c.b < Ocp->c.a + Ocp->c.b))
games/gomoku/pickmove.c
236
for (i = 5 + cb.c.b; --i >= 0; sp += d) {
games/gomoku/pickmove.c
256
if (cp->c.b) {
games/gomoku/pickmove.c
261
cb.c.a = cp->c.a + 1;
games/gomoku/pickmove.c
262
cb.c.b = 0;
games/gomoku/pickmove.c
406
int f, r, d, c;
games/gomoku/pickmove.c
413
baseB = ocb.c.a + ocb.c.b - 1;
games/gomoku/pickmove.c
414
fcnt = ocb.c.a - 2;
games/gomoku/pickmove.c
415
emask = fcnt ? ((ocb.c.b ? 0x1E : 0x1F) & ~(1 << off)) : 0;
games/gomoku/pickmove.c
437
if (fcb.c.a >= MAXA)
games/gomoku/pickmove.c
445
if (f == 0 && (fcb.c.b || fcb.s == 0x101)) {
games/gomoku/pickmove.c
446
fcb.c.a++;
games/gomoku/pickmove.c
447
fcb.c.b = 0;
games/gomoku/pickmove.c
451
c = fcb.c.a + ocb.c.a - 3;
games/gomoku/pickmove.c
452
if (c > 4)
games/gomoku/pickmove.c
454
n = fcb.c.a + fcb.c.b - 1;
games/gomoku/pickmove.c
471
ncbp->c_combo.c.a = c;
games/gomoku/pickmove.c
472
ncbp->c_combo.c.b = n;
games/gomoku/pickmove.c
483
ncbp->c_flg = (ocb.c.b) ? C_OPEN_0 : 0;
games/gomoku/pickmove.c
484
if (fcb.c.b)
games/gomoku/pickmove.c
488
ncbp->c_framecnt[1] = fcb.c.a - 2;
games/gomoku/pickmove.c
490
((fcb.c.b ? 0x1E : 0x1F) & ~(1 << f)) : 0;
games/gomoku/pickmove.c
493
if (c == 1 && debug > 1) {
games/gomoku/pickmove.c
504
if (c > 1) {
games/gomoku/pickmove.c
516
if (c == 1 && debug > 1 || debug > 5) {
games/gomoku/pickmove.c
585
if (fcb.c.b) {
games/gomoku/pickmove.c
586
cb.c.a = fcb.c.a + 1;
games/gomoku/pickmove.c
587
cb.c.b = 0;
games/gomoku/pickmove.c
637
int n, c;
games/gomoku/pickmove.c
645
baseB = ocb.c.a + ocb.c.b - 1;
games/gomoku/pickmove.c
646
fcnt = ocb.c.a - 2;
games/gomoku/pickmove.c
647
emask = fcnt ? ((ocb.c.b ? 0x1E : 0x1F) & ~(1 << off)) : 0;
games/gomoku/pickmove.c
686
c = cbp->c_combo.c.a + ocb.c.a - verts - 3;
games/gomoku/pickmove.c
687
if (c > 4)
games/gomoku/pickmove.c
691
n = ep->e_fval.c.a + ep->e_fval.c.b - 1;
games/gomoku/pickmove.c
707
ncbp->c_combo.c.a = c;
games/gomoku/pickmove.c
708
ncbp->c_combo.c.b = n;
games/gomoku/pickmove.c
715
ncbp->c_flg = ocb.c.b ? C_OPEN_1 : 0;
games/gomoku/pickmove.c
742
if (c == 1 && debug > 1) {
games/gomoku/pickmove.c
753
if (c > 1) {
games/gomoku/pickmove.c
762
if (c == 1 && debug > 1 || debug > 4) {
games/gomoku/pickmove.c
858
if (s && ocbp->c_combo.c.a == 2) {
games/gomoku/pickmove.c
91
if (debug && (sp->s_combo[BLACK].c.a == 1 ||
games/gomoku/pickmove.c
92
sp->s_combo[WHITE].c.a == 1)) {
games/gomoku/pickmove.c
948
cb.c.a = cbp->c_combo.c.a;
games/gomoku/pickmove.c
956
cb.c.b = cbp->c_combo.c.b;
games/gomoku/stoc.c
92
lton(int c)
games/gomoku/stoc.c
96
if (islower(c))
games/gomoku/stoc.c
97
c = toupper(c);
games/gomoku/stoc.c
98
for (i = 1; i <= BSZ && letters[i] != c; i++)
games/hack/hack.c
448
char c;
games/hack/hack.c
451
while(!strchr("ynaq ", (c = readchar())))
games/hack/hack.c
453
if(c == 'q') return;
games/hack/hack.c
454
if(c == 'n') continue;
games/hack/hack.c
455
if(c == 'a') all = 1;
games/hack/hack.do_name.c
354
visctrl(char c)
games/hack/hack.do_name.c
357
if(c < 040) {
games/hack/hack.do_name.c
359
ccc[1] = c + 0100;
games/hack/hack.do_name.c
362
ccc[0] = c;
games/hack/hack.do_name.c
77
int cx,cy,i,c;
games/hack/hack.do_name.c
86
while((c = readchar()) != '.'){
games/hack/hack.do_name.c
87
for(i=0; i<8; i++) if(sdir[i] == c){
games/hack/hack.do_name.c
94
if(c == '?'){
games/hack/hack.do_name.c
99
visctrl(c),
games/hack/hack.end.c
601
charcat(char *s, char c)
games/hack/hack.end.c
604
*s++ = c;
games/hack/hack.invent.c
709
char c, ilet;
games/hack/hack.invent.c
739
c = readchar();
games/hack/hack.invent.c
740
if(strchr(quitchars,c)) return(0);
games/hack/hack.invent.c
742
c = stuff[0];
games/hack/hack.invent.c
744
if(c == '$')
games/hack/hack.invent.c
747
if(c == 'x' || c == 'X') {
games/hack/hack.invent.c
755
if((c == 'u' || c == 'U') && !unpd) {
games/hack/hack.invent.c
764
if (c == otmp -> olet || (c == 'u' && otmp -> unpaid))
games/hack/hack.main.c
470
int c,ct;
games/hack/hack.main.c
475
while((c = getchar()) != '\n'){
games/hack/hack.main.c
476
if(c == EOF) error("End of input\n");
games/hack/hack.main.c
478
if(c == '\010') {
games/hack/hack.main.c
482
if(c != '-')
games/hack/hack.main.c
483
if(c < 'A' || (c > 'Z' && c < 'a') || c > 'z') c = '_';
games/hack/hack.main.c
484
if(ct < sizeof(plname)-1) plname[ct++] = c;
games/hack/hack.mkobj.c
179
letter(int c)
games/hack/hack.mkobj.c
181
return(('@' <= c && c <= 'Z') || ('a' <= c && c <= 'z'));
games/hack/hack.pager.c
352
char c;
games/hack/hack.pager.c
355
while (((c = readchar ()) != 'l') && (c != 's') && !strchr(quitchars,c))
games/hack/hack.pager.c
357
if (!strchr(quitchars, c))
games/hack/hack.pager.c
358
(void) page_file((c == 'l') ? HELP : SHELP, FALSE);
games/hack/hack.termcap.c
238
xputc(int c)
games/hack/hack.termcap.c
240
return fputc(c, stdout);
games/hack/hack.topl.c
263
putsym(char c)
games/hack/hack.topl.c
265
switch(c) {
games/hack/hack.topl.c
280
(void) putchar(c);
games/hack/hack.tty.c
206
int c;
games/hack/hack.tty.c
211
if((c = getchar()) == EOF) {
games/hack/hack.tty.c
215
if(c == '\033') {
games/hack/hack.tty.c
216
*obufp = c;
games/hack/hack.tty.c
220
if(c == erase_char || c == '\b') {
games/hack/hack.tty.c
225
} else if(c == '\n') {
games/hack/hack.tty.c
228
} else if(' ' <= c && c < '\177') {
games/hack/hack.tty.c
231
*bufp = c;
games/hack/hack.tty.c
236
} else if(c == kill_char || c == '\177') { /* Robert Viduya */
games/hack/hack.tty.c
273
int c;
games/hack/hack.tty.c
277
while((c = readchar()) != '\n') {
games/hack/hack.tty.c
279
if(c == ' ') break;
games/hack/hack.tty.c
280
if(s && strchr(s,c)) {
games/hack/hack.tty.c
281
morc = c;
games/hunt/hunt/display.c
37
display_put_ch(char c)
games/hunt/hunt/display.c
39
addch(c);
games/hunt/hunt/display.c
78
char c;
games/hunt/hunt/display.c
81
c = mvwinch(stdscr, y, x) & 0x7f;
games/hunt/hunt/display.c
83
return (c);
games/hunt/hunt/hunt.c
265
int c;
games/hunt/hunt/hunt.c
281
c = getchar();
games/hunt/hunt/hunt.c
282
if (c == '\r' || c == '\n' || c == ' ') {
games/hunt/hunt/hunt.c
284
c = 'a';
games/hunt/hunt/hunt.c
286
c = 'a' + last_driver;
games/hunt/hunt/hunt.c
288
if (c < 'a' || c >= numdrivers + 'a') {
games/hunt/hunt/hunt.c
292
driver = &drivers[c - 'a'];
games/hunt/hunt/hunt.c
87
int c;
games/hunt/hunt/hunt.c
93
while ((c = getopt(ac, av, "Sbcfh:l:mn:op:qst:w:")) != -1) {
games/hunt/hunt/hunt.c
94
switch (c) {
games/hunt/hunt/otto.c
192
stop_look(struct item *itemp, char c, int dist, int side)
games/hunt/hunt/otto.c
194
switch (c) {
games/hunt/hunt/otto.c
207
itemp->what = c;
games/hunt/hunt/otto.c
224
itemp->what = c;
games/hunt/hunt/otto.c
238
itemp->what = c;
games/hunt/hunt/otto.c
252
itemp->what = c;
games/hunt/hunt/otto.c
261
int r, c;
games/hunt/hunt/otto.c
275
for (c = col - 1; c < col + 2; c++) {
games/hunt/hunt/otto.c
276
ch = SCREEN(r, c);
games/hunt/hunt/otto.c
277
if (stop_look(itemp, ch, row - r, c - col))
games/hunt/hunt/otto.c
279
if (c == col && !been_there[r][c])
games/hunt/hunt/otto.c
296
for (c = col - 1; c < col + 2; c++) {
games/hunt/hunt/otto.c
297
ch = SCREEN(r, c);
games/hunt/hunt/otto.c
298
if (stop_look(itemp, ch, r - row, col - c))
games/hunt/hunt/otto.c
300
if (c == col && !been_there[r][c])
games/hunt/hunt/otto.c
316
for (c = col - 1; c >= 0; c--)
games/hunt/hunt/otto.c
318
ch = SCREEN(r, c);
games/hunt/hunt/otto.c
319
if (stop_look(itemp, ch, col - c, row - r))
games/hunt/hunt/otto.c
321
if (r == row && !been_there[r][c])
games/hunt/hunt/otto.c
328
for (c = col - 1; c > col - itemp->distance; c--)
games/hunt/hunt/otto.c
329
been_there[row][c] = ALLDIRS;
games/hunt/hunt/otto.c
336
for (c = col + 1; c < WIDTH; c++)
games/hunt/hunt/otto.c
338
ch = SCREEN(r, c);
games/hunt/hunt/otto.c
339
if (stop_look(itemp, ch, c - col, r - row))
games/hunt/hunt/otto.c
341
if (r == row && !been_there[r][c])
games/hunt/hunt/otto.c
348
for (c = col + 1; c < col + itemp->distance; c++)
games/hunt/hunt/otto.c
349
been_there[row][c] = ALLDIRS;
games/hunt/hunt/playit.c
308
char *cp, c;
games/hunt/hunt/playit.c
311
c = ch; /* save how we got here */
games/hunt/hunt/playit.c
353
return (c == 'w') ? old_status : Q_MESSAGE;
games/hunt/huntd/driver.c
84
int c;
games/hunt/huntd/driver.c
95
while ((c = getopt(ac, av, "bsp:a:D:")) != -1) {
games/hunt/huntd/driver.c
96
switch (c) {
games/hunt/huntd/expl.c
113
char c;
games/hunt/huntd/expl.c
121
c = Maze[y][x];
games/hunt/huntd/expl.c
123
c = SPACE;
games/hunt/huntd/expl.c
126
pp->p_maze[y][x] = c;
games/hunt/huntd/expl.c
128
outch(pp, c);
games/hunt/huntd/hunt.h
109
# define is_player(c) (c == LEFTS || c == RIGHT ||\
games/hunt/huntd/hunt.h
110
c == ABOVE || c == BELOW || c == FLYER)
games/mille/mille.h
181
#define CTRL(c) ((c) & 0x1f)
games/mille/misc.c
102
return c;
games/mille/misc.c
162
char c;
games/mille/misc.c
170
switch (c = readch()) {
games/mille/misc.c
190
addstr(unctrl(c));
games/mille/misc.c
234
static char c;
games/mille/misc.c
236
for (cnt = 0; read(STDIN_FILENO, &c, 1) <= 0; cnt++)
games/mille/misc.c
239
return c;
games/mille/misc.c
62
int c, c1;
games/mille/misc.c
65
while ((c = readch()) == '\n' || c == '\r' || c == ' ')
games/mille/misc.c
67
if (islower(c))
games/mille/misc.c
68
c = toupper(c);
games/mille/misc.c
69
if (c == killchar() || c == erasechar())
games/mille/misc.c
71
addstr(unctrl(c));
games/mille/misc.c
73
switch (c) {
games/mille/misc.c
76
c -= '0';
games/mille/misc.c
79
c = 0;
games/mille/misc.c
84
if (!isprint(c))
games/mille/misc.c
86
c = -1;
games/mille/misc.c
90
if (c >= 0) {
games/mille/move.c
330
char c;
games/mille/move.c
347
while ((c = readch()) == killchar() || c == erasechar())
games/mille/move.c
349
if (islower((unsigned char)c))
games/mille/move.c
350
c = toupper((unsigned char)c);
games/mille/move.c
351
if (isprint((unsigned char)c) && !isspace((unsigned char)c)) {
games/mille/move.c
352
addch(c);
games/mille/move.c
355
switch (c) {
games/mille/move.c
363
Movetype = (c == 'U' ? M_PLAY : M_DISCARD);
games/mille/move.c
407
error("%c: command not implemented", c);
games/mille/move.c
452
error("unknown command: %s", unctrl(c));
games/mille/print.c
100
if (c == *lc)
games/mille/print.c
103
mvprintw(y, x, C_fmt, C_name[c]);
games/mille/print.c
104
*lc = c;
games/mille/print.c
98
show_card(int y, int x, CARD c, CARD *lc)
games/monop/cards.c
219
char c;
games/monop/cards.c
223
while ((c = getc(deckf)) != '\0')
games/monop/cards.c
224
putchar(c);
games/monop/getinp.c
101
char *sp, *tsp, c;
games/monop/getinp.c
105
c = isupper((unsigned char)*tsp) ?
games/monop/getinp.c
108
if (c != *sp++)
games/monop/houses.c
318
int i, c;
games/monop/houses.c
321
c = 0;
games/monop/houses.c
326
c += sqp->desc->houses;
games/monop/houses.c
329
return(N_HOUSE - c);
games/monop/houses.c
335
int i, c;
games/monop/houses.c
338
c = 0;
games/monop/houses.c
343
c++;
games/monop/houses.c
346
return(N_HOTEL - c);
games/monop/initdeck.c
155
int c;
games/monop/initdeck.c
159
while ((c=getc(inf)) != EOF)
games/monop/initdeck.c
160
if (newline && c == '%') {
games/monop/initdeck.c
167
newline = (c == '\n');
games/monop/initdeck.c
178
int c;
games/monop/initdeck.c
187
for (num = 0; (c=getc(inf)) != '\n'; )
games/monop/initdeck.c
188
num = num * 10 + (c - '0');
games/monop/initdeck.c
192
while ((c=getc(inf)) != EOF)
games/monop/initdeck.c
193
if (newline && c == '%') {
games/monop/initdeck.c
201
if ((c=getc(inf)) == EOF)
games/monop/initdeck.c
203
putc(c, outf);
games/monop/initdeck.c
204
putc(c = getc(inf), outf);
games/monop/initdeck.c
205
for (num = 0; (c=getc(inf)) != EOF && c != '\n'; )
games/monop/initdeck.c
206
num = num * 10 + (c - '0');
games/monop/initdeck.c
211
putc(c, outf);
games/monop/initdeck.c
212
newline = (c == '\n');
games/monop/misc.c
100
*sp = c;
games/monop/misc.c
106
*sp = c;
games/monop/misc.c
88
int c, i;
games/monop/misc.c
95
for (sp = buf; (c = getchar()) != '\n';) {
games/monop/misc.c
96
if (c == EOF) {
games/morse/morse.c
106
char *c;
games/morse/morse.c
209
morse(int c)
games/morse/morse.c
213
if (isalpha(c))
games/morse/morse.c
214
show(alph[c - (isupper(c) ? 'A' : 'a')]);
games/morse/morse.c
215
else if (isdigit(c))
games/morse/morse.c
216
show(digit[c - '0']);
games/morse/morse.c
217
else if (isspace(c))
games/morse/morse.c
221
while (other[i].c) {
games/morse/morse.c
222
if (other[i].c == c) {
games/morse/morse.c
248
while (other[i].c) {
games/morse/morse.c
250
putchar(other[i].c);
games/morse/morse.c
256
while (ps[i].c) {
games/morse/morse.c
259
printf(" %s ", ps[i].c);
games/morse/morse.c
82
char c;
games/phantasia/gamesupport.c
212
c = getanswer(" ", TRUE);
games/phantasia/gamesupport.c
216
c = getanswer("!BA", FALSE);
games/phantasia/gamesupport.c
218
switch (c) {
games/phantasia/gamesupport.c
231
if (c == 'A')
games/phantasia/gamesupport.c
483
c = getanswer("\nTF", TRUE);
games/phantasia/gamesupport.c
484
if (c == 'T')
games/phantasia/gamesupport.c
487
if (c == 'F')
games/phantasia/gamesupport.c
70
int c; /* input */
games/ppt/ppt.c
100
putchar(c);
games/ppt/ppt.c
103
vis(vbuf, c, VIS_NOSLASH, 0);
games/ppt/ppt.c
106
seenl = (c == '\n');
games/ppt/ppt.c
121
else while ((c = getchar()) != EOF)
games/ppt/ppt.c
122
putppt(c);
games/ppt/ppt.c
129
putppt(int c)
games/ppt/ppt.c
137
if ((c&(1<<i)) != 0)
games/ppt/ppt.c
149
int c;
games/ppt/ppt.c
158
c = 0;
games/ppt/ppt.c
160
c |= 0200;
games/ppt/ppt.c
162
c |= 0100;
games/ppt/ppt.c
164
c |= 0040;
games/ppt/ppt.c
166
c |= 0020;
games/ppt/ppt.c
168
c |= 0010;
games/ppt/ppt.c
170
c |= 0004;
games/ppt/ppt.c
172
c |= 0002;
games/ppt/ppt.c
174
c |= 0001;
games/ppt/ppt.c
176
return (c);
games/ppt/ppt.c
60
int c, start, seenl, dflag, bflag;
games/ppt/ppt.c
66
while ((c = getopt(argc, argv, "bdh")) != -1)
games/ppt/ppt.c
67
switch(c) {
games/ppt/ppt.c
89
c = getppt(buf);
games/ppt/ppt.c
90
if (c == -2)
games/ppt/ppt.c
92
if (c == -1) {
games/robots/move.c
103
c = getchar();
games/robots/move.c
105
c = ' ';
games/robots/move.c
107
c = getchar();
games/robots/move.c
111
if (isdigit(c)) {
games/robots/move.c
112
Count = (c - '0');
games/robots/move.c
113
while (isdigit(c = getchar()))
games/robots/move.c
114
Count = Count * 10 + (c - '0');
games/robots/move.c
115
if (c == ESC)
games/robots/move.c
117
Cnt_move = c;
games/robots/move.c
124
switch (c) {
games/robots/move.c
166
if (c == '>')
games/robots/move.c
169
Run_ch = tolower(c);
games/robots/move.c
50
int c;
games/robots/move.c
76
c = Run_ch;
games/robots/move.c
78
c = Cnt_move;
games/robots/move.c
81
c = '>';
games/robots/move.c
88
c = *Next_move;
games/robots/move.c
89
mvaddch(0, 0, c);
games/robots/move.c
90
if (c == lastmove)
games/robots/query.c
42
int c, retval;
games/robots/query.c
50
retval = ((c = getchar()) == 'y' || c == 'Y');
games/sail/extern.h
76
#define cleangrapple(a, b, c) Cleansnag(a, b, c, 1)
games/sail/extern.h
77
#define cleanfoul(a, b, c) Cleansnag(a, b, c, 2)
games/sail/extern.h
78
#define cleansnag(a, b, c) Cleansnag(a, b, c, 3)
games/sail/pl_4.c
85
char c;
games/sail/pl_4.c
89
c = *countryname[sp->nationality];
games/sail/pl_4.c
90
if ((c == *buf || tolower((unsigned char)c) == *buf || colours(sp) == *buf)
games/sail/pl_5.c
152
char c;
games/sail/pl_5.c
180
c = sgetch("How many more to board the $$? ",
games/sail/pl_5.c
182
parties(crew, sp, 0, c);
games/sail/pl_5.c
184
c = sgetch("Crew sections to board the $$ (3 max) ?", sp, 1);
games/sail/pl_5.c
185
parties(crew, sp, 0, c);
games/sail/pl_5.c
189
c = sgetch("How many sections to repel boarders? ",
games/sail/pl_5.c
191
parties(crew, ms, 1, c);
games/sail/pl_6.c
147
char c;
games/sail/pl_6.c
157
c = sgetch("Load which broadside (left or right)? ",
games/sail/pl_6.c
159
if (c == 'r')
games/sail/pl_6.c
165
c = sgetch("Reload with (round, double, chain, grape)? ",
games/sail/pl_6.c
167
switch (c) {
games/sail/pl_6.c
42
char c;
games/sail/pl_6.c
54
c = sgetch("Repair (hull, guns, rigging)? ", (struct ship *)0, 1);
games/sail/pl_6.c
55
switch (c) {
games/sail/pl_6.c
71
switch (c) {
games/sail/pl_7.c
222
int c;
games/sail/pl_7.c
228
while ((c = wgetch(scroll_w)) == EOF)
games/sail/pl_7.c
230
if (flag && c >= ' ' && c < 0x7f)
games/sail/pl_7.c
231
(void) waddch(scroll_w, c);
games/sail/pl_7.c
233
return c;
games/sail/pl_7.c
239
int c;
games/sail/pl_7.c
249
while ((c = wgetch(scroll_w)) == EOF)
games/sail/pl_7.c
251
switch (c) {
games/sail/pl_7.c
263
if (c >= ' ' && c < 0x7f && p < buf + n - 1) {
games/sail/pl_7.c
264
*p++ = c;
games/sail/pl_7.c
265
(void) waddch(scroll_w, c);
games/sail/sync.c
173
Write(int type, struct ship *ship, long a, long b, long c, long d)
games/sail/sync.c
177
type, ship->file->index, a, b, c, d);
games/sail/sync.c
183
(void) sync_update(type, ship, NULL, a, b, c, d);
games/sail/sync.c
207
long a, b, c, d;
games/sail/sync.c
268
a = b = c = d = 0;
games/sail/sync.c
270
if (fscanf(sync_fp, "%ld%ld%ld%ld", &a, &b, &c, &d) != 4)
games/sail/sync.c
274
if (sync_update(type, SHIP(shipnum), astr, a, b, c, d) < 0)
games/sail/sync.c
302
long c, long d)
games/sail/sync.c
308
p->toship = SHIP(c);
games/sail/sync.c
315
p->toship = SHIP(c);
games/sail/sync.c
375
s->crew3 = c;
games/sail/sync.c
433
s->rig3 = c;
games/snake/snake.c
246
int c, lastc = 0;
games/snake/snake.c
259
if (((c = getch()) <= '9') && (c >= '0')) {
games/snake/snake.c
260
repeat = c - '0';
games/snake/snake.c
261
while (((c = getch()) <= '9') && (c >= '0'))
games/snake/snake.c
262
repeat = 10 * repeat + (c - '0');
games/snake/snake.c
264
if (c != '.')
games/snake/snake.c
267
if (c == '.')
games/snake/snake.c
268
c = lastc;
games/snake/snake.c
271
lastc = c;
games/snake/snake.c
273
switch (c) {
games/snake/snake.c
300
c = 'h';
games/snake/snake.c
305
c = 'h';
games/snake/snake.c
309
c = 'k';
games/snake/snake.c
314
c = 'k';
games/snake/snake.c
318
c = 'l';
games/snake/snake.c
323
c = 'l';
games/snake/snake.c
327
c = 'j';
games/snake/snake.c
332
c = 'j';
games/snake/snake.c
337
switch (c) {
games/snake/snake.c
77
#define pchar(point, c) mvaddch((point)->line + 1, (point)->col + 1, (c))
games/tetris/input.c
106
char c;
games/tetris/input.c
111
if (rwait(&ts) && read(STDIN_FILENO, &c, 1) != 1)
games/tetris/input.c
122
char c;
games/tetris/input.c
140
if (read(STDIN_FILENO, &c, 1) != 1)
games/tetris/input.c
142
return ((int)(unsigned char)c);
games/tetris/scores.c
330
int i, n, c;
games/tetris/scores.c
370
while ((c = getchar()) != '\n')
games/tetris/scores.c
371
if (c == EOF)
games/tetris/screen.c
126
put(int c)
games/tetris/screen.c
129
return (putchar(c));
games/tetris/screen.c
138
#define moveto(r, c) putpad(tgoto(CMstr, c, r))
games/tetris/screen.c
392
static int r=5, c=2;
games/tetris/screen.c
399
moveto(r-1, c-1); putstr(" ");
games/tetris/screen.c
400
moveto(r, c-1); putstr(" ");
games/tetris/screen.c
401
moveto(r+1, c-1); putstr(" ");
games/tetris/screen.c
402
moveto(r+2, c-1); putstr(" ");
games/tetris/screen.c
404
moveto(r-3, c-2);
games/tetris/screen.c
410
moveto(r, 2 * c);
games/tetris/screen.c
413
t = c + r * B_COLS;
games/tetris/tetris.c
153
int pos, c;
games/tetris/tetris.c
256
c = tgetchar();
games/tetris/tetris.c
257
if (c < 0) {
games/tetris/tetris.c
289
if (c == keys[5]) {
games/tetris/tetris.c
293
if (c == keys[4]) {
games/tetris/tetris.c
309
if (c == keys[0]) {
games/tetris/tetris.c
315
if (c == keys[1]) {
games/tetris/tetris.c
324
if (c == keys[2]) {
games/tetris/tetris.c
330
if (c == keys[3]) {
games/tetris/tetris.c
338
if (c == '\f') {
games/trek/getpar.c
121
int c;
games/trek/getpar.c
133
if ((c = scanf("%99[^ \t;\n]", input)) < 0)
games/trek/getpar.c
135
if (c == 0)
games/trek/getpar.c
142
c = 4;
games/trek/getpar.c
148
if (--c > 0)
games/trek/getpar.c
150
c = 4;
games/trek/getpar.c
153
if (c != 4)
games/trek/getpar.c
223
int c;
games/trek/getpar.c
225
while ((c = getchar()) != '\n')
games/trek/getpar.c
226
if ((c >= '0' && c <= '9') || c == '.' || c == '!' ||
games/trek/getpar.c
227
(c >= 'A' && c <= 'Z') ||
games/trek/getpar.c
228
(c >= 'a' && c <= 'z') || c == '-' || c == EOF)
games/trek/getpar.c
230
ungetc(c, stdin);
games/trek/getpar.c
233
ungetc(c, stdin);
games/trek/getpar.c
243
skiptonl(int c)
games/trek/getpar.c
245
while (c != '\n')
games/trek/getpar.c
246
if (!(c = getchar()))
games/trek/getpar.c
260
int c;
games/trek/getpar.c
262
if (!(c = getchar()))
games/trek/getpar.c
264
if (c == '.')
games/trek/getpar.c
266
if (c == '\n' || c == ';')
games/trek/getpar.c
267
ungetc(c, stdin);
games/trek/getpar.c
283
int c;
games/trek/getpar.c
285
while ((c = getchar()))
games/trek/getpar.c
287
if (c == d)
games/trek/getpar.c
289
if (c == ' ')
games/trek/getpar.c
291
ungetc(c, stdin);
games/trek/ram.c
53
char c;
games/trek/ram.c
56
c = Sect[ix][iy];
games/trek/ram.c
57
switch (c)
games/trek/warp.c
59
int c;
games/trek/warp.c
62
if (getcodi(&c, &d))
games/trek/warp.c
64
warp(fl, c, d);
games/trek/warp.c
68
warp(int fl, int c, double d)
games/trek/warp.c
85
course = c;
games/wump/wump.c
136
int c;
games/wump/wump.c
142
while ((c = getopt(argc, argv, "a:b:hop:r:t:d")) != -1)
games/wump/wump.c
144
while ((c = getopt(argc, argv, "a:b:hop:r:t:")) != -1)
games/wump/wump.c
146
switch (c) {
include/rpc/auth.h
80
char c[8];
include/stdio.h
306
#define putchar_unlocked(c) putc_unlocked(c, stdout)
include/tgmath.h
95
__tg_impl_full(x, x, x, fn, fn##f, fn##l, c##fn, c##fn##f, c##fn##l, x)
lib/libc/arch/sparc64/fpu/fpu_q.c
35
long double c;
lib/libc/arch/sparc64/fpu/fpu_q.c
37
_Qp_mul(&c, &a, &b);
lib/libc/arch/sparc64/fpu/fpu_q.c
38
return (c);
lib/libc/arch/sparc64/fpu/fpu_q.c
44
long double c;
lib/libc/arch/sparc64/fpu/fpu_q.c
46
_Qp_div(&c, &a, &b);
lib/libc/arch/sparc64/fpu/fpu_q.c
47
return (c);
lib/libc/arch/sparc64/fpu/fpu_q.c
53
long double c;
lib/libc/arch/sparc64/fpu/fpu_q.c
55
_Qp_sub(&c, &a, &b);
lib/libc/arch/sparc64/fpu/fpu_q.c
56
return (c);
lib/libc/arch/sparc64/fpu/fpu_q.c
62
long double c;
lib/libc/arch/sparc64/fpu/fpu_q.c
64
_Qp_add(&c, &a, &b);
lib/libc/arch/sparc64/fpu/fpu_q.c
65
return (c);
lib/libc/arch/sparc64/fpu/fpu_qp.c
103
fe.fe_f1.fp_sign = c[0] >> 31; \
lib/libc/arch/sparc64/fpu/fpu_qp.c
105
fe.fe_f1.fp_class = __fpu_qtof(&fe.fe_f1, c[0], c[1], c[2], c[3]); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
112
type _Qp_qto ## qname(u_int *c); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
115
_Qp_qto ## qname(u_int *c) \
lib/libc/arch/sparc64/fpu/fpu_qp.c
122
fe.fe_f1.fp_sign = c[0] >> 31; \
lib/libc/arch/sparc64/fpu/fpu_qp.c
124
fe.fe_f1.fp_class = __fpu_qtof(&fe.fe_f1, c[0], c[1], c[2], c[3]); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
159
void _Qp_sqrt(u_int *c, u_int *a);
lib/libc/arch/sparc64/fpu/fpu_qp.c
162
_Qp_sqrt(u_int *c, u_int *a)
lib/libc/arch/sparc64/fpu/fpu_qp.c
171
c[0] = __fpu_ftoq(&fe, r, c);
lib/libc/arch/sparc64/fpu/fpu_qp.c
36
__dso_hidden void _Qp_ ## op(u_int *c, u_int *a, u_int *b); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
39
_Qp_ ## op(u_int *c, u_int *a, u_int *b) \
lib/libc/arch/sparc64/fpu/fpu_qp.c
51
c[0] = __fpu_ftoq(&fe, r, c); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
57
void _Qp_ ## qname ## toq(u_int *c, ntype n); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
60
_Qp_ ## qname ## toq(u_int *c, ntype n) \
lib/libc/arch/sparc64/fpu/fpu_qp.c
69
c[0] = __fpu_ftoq(&fe, &fe.fe_f1, c); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
74
type _Qp_qto ## qname(u_int *c); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
77
_Qp_qto ## qname(u_int *c) \
lib/libc/arch/sparc64/fpu/fpu_qp.c
84
fe.fe_f1.fp_sign = c[0] >> 31; \
lib/libc/arch/sparc64/fpu/fpu_qp.c
86
fe.fe_f1.fp_class = __fpu_qtof(&fe.fe_f1, c[0], c[1], c[2], c[3]); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
93
type _Qp_qto ## qname(u_int *c); \
lib/libc/arch/sparc64/fpu/fpu_qp.c
96
_Qp_qto ## qname(u_int *c) \
lib/libc/asr/asr.c
864
unsigned char c;
lib/libc/asr/asr.c
886
c = *dname++;
lib/libc/asr/asr.c
888
if ( c == '\\') {
lib/libc/asr/asr.c
892
} else if (c > 0x20 && c < 0x7f) {
lib/libc/asr/asr.c
893
*buf++ = c;
lib/libc/asr/asr.c
897
*buf++ = '0' + ((c / 100) % 10);
lib/libc/asr/asr.c
898
*buf++ = '0' + ((c / 10) % 10);
lib/libc/asr/asr.c
899
*buf++ = '0' + (c % 10);
lib/libc/asr/asr_utils.c
399
struct asr_dns_header c;
lib/libc/asr/asr_utils.c
401
c.id = h->id;
lib/libc/asr/asr_utils.c
402
c.flags = htons(h->flags);
lib/libc/asr/asr_utils.c
403
c.qdcount = htons(h->qdcount);
lib/libc/asr/asr_utils.c
404
c.ancount = htons(h->ancount);
lib/libc/asr/asr_utils.c
405
c.nscount = htons(h->nscount);
lib/libc/asr/asr_utils.c
406
c.arcount = htons(h->arcount);
lib/libc/asr/asr_utils.c
408
return (pack_data(p, &c, HFIXEDSZ));
lib/libc/asr/getaddrinfo_async.c
600
char *tokens[MAXTOKEN], *c, buf[BUFSIZ + 1];
lib/libc/asr/getaddrinfo_async.c
624
c = tokens[1];
lib/libc/asr/getaddrinfo_async.c
626
c = NULL;
lib/libc/asr/getaddrinfo_async.c
628
if (addrinfo_add(as, &u.sa, c))
lib/libc/asr/getaddrinfo_async.c
647
char buf[MAXDNAME], *c;
lib/libc/asr/getaddrinfo_async.c
684
c = buf;
lib/libc/asr/getaddrinfo_async.c
686
c = as->as.ai.hostname;
lib/libc/asr/getaddrinfo_async.c
688
c = as->as.ai.fqdn;
lib/libc/asr/getaddrinfo_async.c
690
c = NULL;
lib/libc/asr/getaddrinfo_async.c
692
if (addrinfo_add(as, &u.sa, c))
lib/libc/asr/gethostnamadr_async.c
153
char name[MAXDNAME], *data, addr[16], *c;
lib/libc/asr/gethostnamadr_async.c
187
for (c = as->as.hostnamadr.name; *c; c++)
lib/libc/asr/gethostnamadr_async.c
188
if (!isdigit((unsigned char)*c) &&
lib/libc/asr/gethostnamadr_async.c
189
*c != '.' && *c != ':')
lib/libc/asr/gethostnamadr_async.c
191
if (*c == 0 &&
lib/libc/asr/res_search_async.c
250
const char *c;
lib/libc/asr/res_search_async.c
280
for (c = name; *c; c++)
lib/libc/asr/res_search_async.c
281
dots += (*c == '.');
lib/libc/crypt/bcrypt.c
294
#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)])
lib/libc/crypt/blowfish.c
109
Blowfish_initstate(blf_ctx *c)
lib/libc/crypt/blowfish.c
384
*c = initstate;
lib/libc/crypt/blowfish.c
411
Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
lib/libc/crypt/blowfish.c
424
c->P[i] = c->P[i] ^ temp;
lib/libc/crypt/blowfish.c
431
Blowfish_encipher(c, &datal, &datar);
lib/libc/crypt/blowfish.c
433
c->P[i] = datal;
lib/libc/crypt/blowfish.c
434
c->P[i + 1] = datar;
lib/libc/crypt/blowfish.c
439
Blowfish_encipher(c, &datal, &datar);
lib/libc/crypt/blowfish.c
441
c->S[i][k] = datal;
lib/libc/crypt/blowfish.c
442
c->S[i][k + 1] = datar;
lib/libc/crypt/blowfish.c
450
Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
lib/libc/crypt/blowfish.c
464
c->P[i] = c->P[i] ^ temp;
lib/libc/crypt/blowfish.c
473
Blowfish_encipher(c, &datal, &datar);
lib/libc/crypt/blowfish.c
475
c->P[i] = datal;
lib/libc/crypt/blowfish.c
476
c->P[i + 1] = datar;
lib/libc/crypt/blowfish.c
483
Blowfish_encipher(c, &datal, &datar);
lib/libc/crypt/blowfish.c
485
c->S[i][k] = datal;
lib/libc/crypt/blowfish.c
486
c->S[i][k + 1] = datar;
lib/libc/crypt/blowfish.c
494
blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
lib/libc/crypt/blowfish.c
497
Blowfish_initstate(c);
lib/libc/crypt/blowfish.c
500
Blowfish_expand0state(c, k, len);
lib/libc/crypt/blowfish.c
505
blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
lib/libc/crypt/blowfish.c
512
Blowfish_encipher(c, d, d + 1);
lib/libc/crypt/blowfish.c
519
blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
lib/libc/crypt/blowfish.c
526
Blowfish_decipher(c, d, d + 1);
lib/libc/crypt/blowfish.c
533
blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
lib/libc/crypt/blowfish.c
541
Blowfish_encipher(c, &l, &r);
lib/libc/crypt/blowfish.c
556
blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
lib/libc/crypt/blowfish.c
564
Blowfish_decipher(c, &l, &r);
lib/libc/crypt/blowfish.c
57
Blowfish_encipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
lib/libc/crypt/blowfish.c
579
blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
lib/libc/crypt/blowfish.c
589
Blowfish_encipher(c, &l, &r);
lib/libc/crypt/blowfish.c
605
blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
lib/libc/crypt/blowfish.c
61
u_int32_t *s = c->S[0];
lib/libc/crypt/blowfish.c
616
Blowfish_decipher(c, &l, &r);
lib/libc/crypt/blowfish.c
62
u_int32_t *p = c->P;
lib/libc/crypt/blowfish.c
632
Blowfish_decipher(c, &l, &r);
lib/libc/crypt/blowfish.c
659
blf_ctx c;
lib/libc/crypt/blowfish.c
673
blf_key(&c, (u_int8_t *) key, 5);
lib/libc/crypt/blowfish.c
674
blf_enc(&c, data, 5);
lib/libc/crypt/blowfish.c
675
blf_dec(&c, data, 1);
lib/libc/crypt/blowfish.c
676
blf_dec(&c, data + 2, 4);
lib/libc/crypt/blowfish.c
681
blf_key(&c, (u_int8_t *) key2, strlen(key2));
lib/libc/crypt/blowfish.c
682
blf_enc(&c, data2, 1);
lib/libc/crypt/blowfish.c
685
blf_dec(&c, data2, 1);
lib/libc/crypt/blowfish.c
83
Blowfish_decipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
lib/libc/crypt/blowfish.c
87
u_int32_t *s = c->S[0];
lib/libc/crypt/blowfish.c
88
u_int32_t *p = c->P;
lib/libc/crypt/chacha_private.h
120
ctarget = c;
lib/libc/crypt/chacha_private.h
121
c = tmp;
lib/libc/crypt/chacha_private.h
191
U32TO8_LITTLE(c + 0,x0);
lib/libc/crypt/chacha_private.h
192
U32TO8_LITTLE(c + 4,x1);
lib/libc/crypt/chacha_private.h
193
U32TO8_LITTLE(c + 8,x2);
lib/libc/crypt/chacha_private.h
194
U32TO8_LITTLE(c + 12,x3);
lib/libc/crypt/chacha_private.h
195
U32TO8_LITTLE(c + 16,x4);
lib/libc/crypt/chacha_private.h
196
U32TO8_LITTLE(c + 20,x5);
lib/libc/crypt/chacha_private.h
197
U32TO8_LITTLE(c + 24,x6);
lib/libc/crypt/chacha_private.h
198
U32TO8_LITTLE(c + 28,x7);
lib/libc/crypt/chacha_private.h
199
U32TO8_LITTLE(c + 32,x8);
lib/libc/crypt/chacha_private.h
200
U32TO8_LITTLE(c + 36,x9);
lib/libc/crypt/chacha_private.h
201
U32TO8_LITTLE(c + 40,x10);
lib/libc/crypt/chacha_private.h
202
U32TO8_LITTLE(c + 44,x11);
lib/libc/crypt/chacha_private.h
203
U32TO8_LITTLE(c + 48,x12);
lib/libc/crypt/chacha_private.h
204
U32TO8_LITTLE(c + 52,x13);
lib/libc/crypt/chacha_private.h
205
U32TO8_LITTLE(c + 56,x14);
lib/libc/crypt/chacha_private.h
206
U32TO8_LITTLE(c + 60,x15);
lib/libc/crypt/chacha_private.h
210
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
lib/libc/crypt/chacha_private.h
217
c += 64;
lib/libc/crypt/chacha_private.h
40
#define ROTATE(v,c) (ROTL32(v,c))
lib/libc/crypt/chacha_private.h
45
#define QUARTERROUND(a,b,c,d) \
lib/libc/crypt/chacha_private.h
47
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
lib/libc/crypt/chacha_private.h
49
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
lib/libc/crypt/chacha_private.h
89
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
lib/libc/db/btree/bt_delete.c
102
status = __bt_dleaf(t, NULL, h, c->pg.index);
lib/libc/db/btree/bt_delete.c
135
__bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c)
lib/libc/db/btree/bt_delete.c
152
if ((e = __bt_search(t, &c->key, &exact)) == NULL)
lib/libc/db/btree/bt_delete.c
157
if (h->pgno == c->pg.pgno)
lib/libc/db/btree/bt_delete.c
166
while (h->pgno != c->pg.pgno) {
lib/libc/db/btree/bt_delete.c
206
if (h->pgno == c->pg.pgno)
lib/libc/db/btree/bt_delete.c
211
if ((e = __bt_search(t, &c->key, &exact)) == NULL)
lib/libc/db/btree/bt_delete.c
221
while (h->pgno != c->pg.pgno) {
lib/libc/db/btree/bt_delete.c
264
return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL);
lib/libc/db/btree/bt_delete.c
521
CURSOR *c;
lib/libc/db/btree/bt_delete.c
530
c = &t->bt_cursor;
lib/libc/db/btree/bt_delete.c
531
F_CLR(c, CURS_AFTER | CURS_BEFORE | CURS_ACQUIRE);
lib/libc/db/btree/bt_delete.c
544
&c->key, &c->key, NULL, NULL, 1)) != RET_SUCCESS)
lib/libc/db/btree/bt_delete.c
547
key = &c->key;
lib/libc/db/btree/bt_delete.c
554
F_SET(c, CURS_BEFORE);
lib/libc/db/btree/bt_delete.c
563
F_SET(c, CURS_AFTER);
lib/libc/db/btree/bt_delete.c
574
F_SET(c, CURS_BEFORE);
lib/libc/db/btree/bt_delete.c
586
F_SET(c, CURS_AFTER);
lib/libc/db/btree/bt_delete.c
588
dup2: c->pg.pgno = e.page->pgno;
lib/libc/db/btree/bt_delete.c
589
c->pg.index = e.index;
lib/libc/db/btree/bt_delete.c
598
__bt_ret(t, &e, &c->key, &c->key, NULL, NULL, 1)) == RET_SUCCESS) {
lib/libc/db/btree/bt_delete.c
599
F_SET(c, CURS_ACQUIRE);
lib/libc/db/btree/bt_delete.c
60
CURSOR *c;
lib/libc/db/btree/bt_delete.c
87
c = &t->bt_cursor;
lib/libc/db/btree/bt_delete.c
88
if (F_ISSET(c, CURS_INIT)) {
lib/libc/db/btree/bt_delete.c
89
if (F_ISSET(c, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE))
lib/libc/db/btree/bt_delete.c
91
if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
lib/libc/db/btree/bt_seq.c
229
CURSOR *c;
lib/libc/db/btree/bt_seq.c
239
c = &t->bt_cursor;
lib/libc/db/btree/bt_seq.c
249
if (F_ISSET(c, CURS_ACQUIRE))
lib/libc/db/btree/bt_seq.c
250
return (__bt_first(t, &c->key, ep, &exact));
lib/libc/db/btree/bt_seq.c
253
if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
lib/libc/db/btree/bt_seq.c
267
if (F_ISSET(c, CURS_AFTER))
lib/libc/db/btree/bt_seq.c
269
idx = c->pg.index;
lib/libc/db/btree/bt_seq.c
286
if (F_ISSET(c, CURS_BEFORE)) {
lib/libc/db/btree/bt_seq.c
287
usecurrent: F_CLR(c, CURS_AFTER | CURS_BEFORE);
lib/libc/db/btree/bt_seq.c
289
ep->index = c->pg.index;
lib/libc/db/btree/bt_seq.c
292
idx = c->pg.index;
lib/libc/db/btree/bt_split.c
589
CURSOR *c;
lib/libc/db/btree/bt_split.c
680
c = &t->bt_cursor;
lib/libc/db/btree/bt_split.c
681
if (F_ISSET(c, CURS_INIT) && c->pg.pgno == h->pgno) {
lib/libc/db/btree/bt_split.c
682
if (c->pg.index >= skip)
lib/libc/db/btree/bt_split.c
683
++c->pg.index;
lib/libc/db/btree/bt_split.c
684
if (c->pg.index < nxt) /* Left page. */
lib/libc/db/btree/bt_split.c
685
c->pg.pgno = l->pgno;
lib/libc/db/btree/bt_split.c
687
c->pg.pgno = r->pgno;
lib/libc/db/btree/bt_split.c
688
c->pg.index -= nxt;
lib/libc/gdtoa/gdtoaimp.h
293
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
lib/libc/gdtoa/gdtoaimp.h
294
((unsigned short *)a)[0] = (unsigned short)c, a++)
lib/libc/gdtoa/gdtoaimp.h
296
#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
lib/libc/gdtoa/gdtoaimp.h
297
((unsigned short *)a)[1] = (unsigned short)c, a++)
lib/libc/gdtoa/hexnan.c
102
if (/*(*/ c == ')' && havedig) {
lib/libc/gdtoa/hexnan.c
108
if (/*(*/ c == ')') {
lib/libc/gdtoa/hexnan.c
112
} while((c = *++s));
lib/libc/gdtoa/hexnan.c
60
ULong c, h, *x, *x1, *xe;
lib/libc/gdtoa/hexnan.c
75
while((c = *(CONST unsigned char*)(s+1)) && c <= ' ')
lib/libc/gdtoa/hexnan.c
80
while((c = *(CONST unsigned char*)++s)) {
lib/libc/gdtoa/hexnan.c
81
if (!(h = hexdig[c])) {
lib/libc/gdtoa/hexnan.c
82
if (c <= ' ') {
lib/libc/gdtoa/misc.c
285
Bigint *c;
lib/libc/gdtoa/misc.c
299
c = a;
lib/libc/gdtoa/misc.c
301
b = c;
lib/libc/gdtoa/misc.c
309
c = Balloc(k);
lib/libc/gdtoa/misc.c
310
if (c == NULL)
lib/libc/gdtoa/misc.c
312
for(x = c->x, xa = x + wc; x < xa; x++)
lib/libc/gdtoa/misc.c
318
xc0 = c->x;
lib/libc/gdtoa/misc.c
384
for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
lib/libc/gdtoa/misc.c
385
c->wds = wc;
lib/libc/gdtoa/misc.c
386
return c;
lib/libc/gdtoa/misc.c
559
Bigint *c;
lib/libc/gdtoa/misc.c
573
c = Balloc(0);
lib/libc/gdtoa/misc.c
574
if (c == NULL)
lib/libc/gdtoa/misc.c
576
c->wds = 1;
lib/libc/gdtoa/misc.c
577
c->x[0] = 0;
lib/libc/gdtoa/misc.c
578
return c;
lib/libc/gdtoa/misc.c
581
c = a;
lib/libc/gdtoa/misc.c
583
b = c;
lib/libc/gdtoa/misc.c
588
c = Balloc(a->k);
lib/libc/gdtoa/misc.c
589
if (c == NULL)
lib/libc/gdtoa/misc.c
591
c->sign = i;
lib/libc/gdtoa/misc.c
598
xc = c->x;
lib/libc/gdtoa/misc.c
645
c->wds = wa;
lib/libc/gdtoa/misc.c
646
return c;
lib/libc/gdtoa/smisc.c
129
int c, d;
lib/libc/gdtoa/smisc.c
133
if ((c = *++s) >= 'A' && c <= 'Z')
lib/libc/gdtoa/smisc.c
134
c += 'a' - 'A';
lib/libc/gdtoa/smisc.c
135
if (c != d)
lib/libc/gdtoa/smisc.c
145
copybits(c, n, b) ULong *c; int n; Bigint *b;
lib/libc/gdtoa/smisc.c
147
copybits(ULong *c, int n, Bigint *b)
lib/libc/gdtoa/smisc.c
155
ce = c + ((n-1) >> kshift) + 1;
lib/libc/gdtoa/smisc.c
160
*c++ = *x++;
lib/libc/gdtoa/smisc.c
165
Storeinc(c, x[1], x[0]);
lib/libc/gdtoa/smisc.c
167
*c++ = *x;
lib/libc/gdtoa/smisc.c
169
while(c < ce)
lib/libc/gdtoa/smisc.c
170
*c++ = 0;
lib/libc/gdtoa/strtod.c
205
for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
lib/libc/gdtoa/strtod.c
207
y = 10*y + c - '0';
lib/libc/gdtoa/strtod.c
209
z = 10*z + c - '0';
lib/libc/gdtoa/strtod.c
212
if (c == *decimalpoint) {
lib/libc/gdtoa/strtod.c
217
c = *s;
lib/libc/gdtoa/strtod.c
219
if (c == '.') {
lib/libc/gdtoa/strtod.c
220
c = *++s;
lib/libc/gdtoa/strtod.c
224
for(; c == '0'; c = *++s)
lib/libc/gdtoa/strtod.c
226
if (c > '0' && c <= '9') {
lib/libc/gdtoa/strtod.c
234
for(; c >= '0' && c <= '9'; c = *++s) {
lib/libc/gdtoa/strtod.c
237
if (c -= '0') {
lib/libc/gdtoa/strtod.c
245
y = 10*y + c;
lib/libc/gdtoa/strtod.c
247
z = 10*z + c;
lib/libc/gdtoa/strtod.c
254
if (c == 'e' || c == 'E') {
lib/libc/gdtoa/strtod.c
260
switch(c = *++s) {
lib/libc/gdtoa/strtod.c
264
c = *++s;
lib/libc/gdtoa/strtod.c
266
if (c >= '0' && c <= '9') {
lib/libc/gdtoa/strtod.c
267
while(c == '0')
lib/libc/gdtoa/strtod.c
268
c = *++s;
lib/libc/gdtoa/strtod.c
269
if (c > '0' && c <= '9') {
lib/libc/gdtoa/strtod.c
270
L = c - '0';
lib/libc/gdtoa/strtod.c
272
while((c = *++s) >= '0' && c <= '9')
lib/libc/gdtoa/strtod.c
273
L = 10*L + c - '0';
lib/libc/gdtoa/strtod.c
298
switch(c) {
lib/libc/gdtoa/strtod.c
93
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, dsign,
lib/libc/gdtoa/strtodg.c
346
int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, denorm;
lib/libc/gdtoa/strtodg.c
427
for(decpt = nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
lib/libc/gdtoa/strtodg.c
429
y = 10*y + c - '0';
lib/libc/gdtoa/strtodg.c
431
z = 10*z + c - '0';
lib/libc/gdtoa/strtodg.c
434
if (c == *decimalpoint) {
lib/libc/gdtoa/strtodg.c
439
c = *s;
lib/libc/gdtoa/strtodg.c
441
if (c == '.') {
lib/libc/gdtoa/strtodg.c
442
c = *++s;
lib/libc/gdtoa/strtodg.c
446
for(; c == '0'; c = *++s)
lib/libc/gdtoa/strtodg.c
448
if (c > '0' && c <= '9') {
lib/libc/gdtoa/strtodg.c
456
for(; c >= '0' && c <= '9'; c = *++s) {
lib/libc/gdtoa/strtodg.c
459
if (c -= '0') {
lib/libc/gdtoa/strtodg.c
467
y = 10*y + c;
lib/libc/gdtoa/strtodg.c
469
z = 10*z + c;
lib/libc/gdtoa/strtodg.c
476
if (c == 'e' || c == 'E') {
lib/libc/gdtoa/strtodg.c
484
switch(c = *++s) {
lib/libc/gdtoa/strtodg.c
488
c = *++s;
lib/libc/gdtoa/strtodg.c
490
if (c >= '0' && c <= '9') {
lib/libc/gdtoa/strtodg.c
491
while(c == '0')
lib/libc/gdtoa/strtodg.c
492
c = *++s;
lib/libc/gdtoa/strtodg.c
493
if (c > '0' && c <= '9') {
lib/libc/gdtoa/strtodg.c
494
L = c - '0';
lib/libc/gdtoa/strtodg.c
496
while((c = *++s) >= '0' && c <= '9')
lib/libc/gdtoa/strtodg.c
497
L = 10*L + c - '0';
lib/libc/gdtoa/strtodg.c
519
switch(c) {
lib/libc/gdtoa/sum.c
101
return c;
lib/libc/gdtoa/sum.c
41
Bigint *c;
lib/libc/gdtoa/sum.c
48
c = b; b = a; a = c;
lib/libc/gdtoa/sum.c
50
c = Balloc(a->k);
lib/libc/gdtoa/sum.c
51
if (c == NULL)
lib/libc/gdtoa/sum.c
53
c->wds = a->wds;
lib/libc/gdtoa/sum.c
57
xc = c->x;
lib/libc/gdtoa/sum.c
91
if (c->wds == c->maxwds) {
lib/libc/gdtoa/sum.c
92
b = Balloc(c->k + 1);
lib/libc/gdtoa/sum.c
95
Bcopy(b, c);
lib/libc/gdtoa/sum.c
96
Bfree(c);
lib/libc/gdtoa/sum.c
97
c = b;
lib/libc/gdtoa/sum.c
99
c->x[c->wds++] = 1;
lib/libc/gen/getcap.c
293
int c;
lib/libc/gen/getcap.c
332
c = *bp++;
lib/libc/gen/getcap.c
333
if (c == '\n') {
lib/libc/gen/getcap.c
340
*rp++ = c;
lib/libc/gen/getcap.c
664
int c, serrno, status = -1;
lib/libc/gen/getcap.c
736
c = *bp++;
lib/libc/gen/getcap.c
737
if (c == '\n') {
lib/libc/gen/getcap.c
744
*rp++ = c;
lib/libc/gen/getttyent.c
121
while ((c = *++p) == ' ' || c == '\t')
lib/libc/gen/getttyent.c
142
int c, q;
lib/libc/gen/getttyent.c
144
for (q = 0, t = p; (c = *p) != '\0'; p++) {
lib/libc/gen/getttyent.c
145
if (c == '"') {
lib/libc/gen/getttyent.c
154
if (c == '#') {
lib/libc/gen/getttyent.c
155
zapchar = c;
lib/libc/gen/getttyent.c
159
if (c == '\t' || c == ' ' || c == '\n') {
lib/libc/gen/getttyent.c
160
zapchar = c;
lib/libc/gen/getttyent.c
162
while ((c = *p) == '\t' || c == ' ' || c == '\n')
lib/libc/gen/getttyent.c
59
int c;
lib/libc/gen/getttyent.c
71
while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
lib/libc/gen/glob.c
114
#define CHAR(c) ((Char)((c)&M_ASCII))
lib/libc/gen/glob.c
115
#define META(c) ((Char)((c)|M_QUOTE))
lib/libc/gen/glob.c
123
#define ismeta(c) (((c)&M_QUOTE) != 0)
lib/libc/gen/glob.c
171
int c;
lib/libc/gen/glob.c
197
while (bufnext < bufend && (c = *patnext++) != EOS)
lib/libc/gen/glob.c
198
*bufnext++ = c;
lib/libc/gen/glob.c
201
while (bufnext < bufend && (c = *patnext++) != EOS)
lib/libc/gen/glob.c
202
if (c == QUOTE) {
lib/libc/gen/glob.c
203
if ((c = *patnext++) == EOS) {
lib/libc/gen/glob.c
204
c = QUOTE;
lib/libc/gen/glob.c
207
*bufnext++ = c | M_PROTECT;
lib/libc/gen/glob.c
209
*bufnext++ = c;
lib/libc/gen/glob.c
464
int c, err;
lib/libc/gen/glob.c
473
while ((c = *qpatnext++) != EOS) {
lib/libc/gen/glob.c
474
switch (c) {
lib/libc/gen/glob.c
476
c = *qpatnext;
lib/libc/gen/glob.c
477
if (c == NOT)
lib/libc/gen/glob.c
482
if (c == NOT)
lib/libc/gen/glob.c
487
if (c == NOT)
lib/libc/gen/glob.c
489
c = *qpatnext++;
lib/libc/gen/glob.c
491
if (c == LBRACKET && *qpatnext == ':') {
lib/libc/gen/glob.c
497
c = *qpatnext++;
lib/libc/gen/glob.c
498
} while (c == LBRACKET && *qpatnext == ':');
lib/libc/gen/glob.c
502
if (c == RBRACKET)
lib/libc/gen/glob.c
505
*bufnext++ = CHAR(c);
lib/libc/gen/glob.c
507
(c = qpatnext[1]) != RBRACKET) {
lib/libc/gen/glob.c
509
*bufnext++ = CHAR(c);
lib/libc/gen/glob.c
512
} while ((c = *qpatnext++) != RBRACKET);
lib/libc/gen/glob.c
529
*bufnext++ = CHAR(c);
lib/libc/gen/glob.c
895
Char c, k;
lib/libc/gen/glob.c
901
c = *pat++;
lib/libc/gen/glob.c
902
switch (c & M_MASK) {
lib/libc/gen/glob.c
923
while (((c = *pat++) & M_MASK) != M_END) {
lib/libc/gen/glob.c
924
if ((c & M_MASK) == M_CLASS) {
lib/libc/gen/glob.c
932
if (c <= k && k <= pat[1])
lib/libc/gen/glob.c
935
} else if (c == k)
lib/libc/gen/glob.c
942
if (*name++ != c)
lib/libc/gen/isctype.c
101
isprint(int c)
lib/libc/gen/isctype.c
103
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] &
lib/libc/gen/isctype.c
110
ispunct(int c)
lib/libc/gen/isctype.c
112
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_P));
lib/libc/gen/isctype.c
118
isspace(int c)
lib/libc/gen/isctype.c
120
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_S));
lib/libc/gen/isctype.c
126
isupper(int c)
lib/libc/gen/isctype.c
128
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_U));
lib/libc/gen/isctype.c
134
isxdigit(int c)
lib/libc/gen/isctype.c
136
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] &
lib/libc/gen/isctype.c
143
isascii(int c)
lib/libc/gen/isctype.c
145
return ((unsigned int)c <= 0177);
lib/libc/gen/isctype.c
151
toascii(int c)
lib/libc/gen/isctype.c
153
return (c & 0177);
lib/libc/gen/isctype.c
158
_toupper(int c)
lib/libc/gen/isctype.c
160
return (c - 'a' + 'A');
lib/libc/gen/isctype.c
165
_tolower(int c)
lib/libc/gen/isctype.c
167
return (c - 'A' + 'a');
lib/libc/gen/isctype.c
42
isalnum(int c)
lib/libc/gen/isctype.c
44
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] &
lib/libc/gen/isctype.c
51
isalpha(int c)
lib/libc/gen/isctype.c
53
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] &
lib/libc/gen/isctype.c
60
isblank(int c)
lib/libc/gen/isctype.c
62
return (c == ' ' || c == '\t');
lib/libc/gen/isctype.c
68
iscntrl(int c)
lib/libc/gen/isctype.c
70
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_C));
lib/libc/gen/isctype.c
76
isdigit(int c)
lib/libc/gen/isctype.c
78
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_N));
lib/libc/gen/isctype.c
84
isgraph(int c)
lib/libc/gen/isctype.c
86
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] &
lib/libc/gen/isctype.c
93
islower(int c)
lib/libc/gen/isctype.c
95
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _CTYPE_L));
lib/libc/gen/psignal.c
46
const char *c;
lib/libc/gen/psignal.c
50
c = __strsignal(sig, buf);
lib/libc/gen/psignal.c
58
iov[niov].iov_base = (void *)c;
lib/libc/gen/psignal.c
59
iov[niov].iov_len = strlen(c);
lib/libc/gen/setmode.c
144
#define ADDCMD(a, b, c, d) \
lib/libc/gen/setmode.c
157
set = addcmd(set, (a), (b), (c), (d))
lib/libc/gen/tolower_.c
55
tolower(int c)
lib/libc/gen/tolower_.c
57
if ((unsigned int)c > 255)
lib/libc/gen/tolower_.c
58
return(c);
lib/libc/gen/tolower_.c
59
return((_tolower_tab_ + 1)[c]);
lib/libc/gen/toupper_.c
56
toupper(int c)
lib/libc/gen/toupper_.c
58
if ((unsigned int)c > 255)
lib/libc/gen/toupper_.c
59
return(c);
lib/libc/gen/toupper_.c
60
return((_toupper_tab_ + 1)[c]);
lib/libc/gen/unvis.c
150
if (c == '-')
lib/libc/gen/unvis.c
152
else if (c == '^')
lib/libc/gen/unvis.c
162
*cp |= c;
lib/libc/gen/unvis.c
166
if (c == '?')
lib/libc/gen/unvis.c
169
*cp |= c & 037;
lib/libc/gen/unvis.c
174
if (isoctal(c)) {
lib/libc/gen/unvis.c
178
*cp = (*cp << 3) + (c - '0');
lib/libc/gen/unvis.c
190
if (isoctal(c)) {
lib/libc/gen/unvis.c
191
*cp = (*cp << 3) + (c - '0');
lib/libc/gen/unvis.c
219
char c;
lib/libc/gen/unvis.c
223
while ((c = *src++)) {
lib/libc/gen/unvis.c
225
switch (unvis(dst, c, &state, 0)) {
lib/libc/gen/unvis.c
240
if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID)
lib/libc/gen/unvis.c
249
char c, p;
lib/libc/gen/unvis.c
255
while ((c = *src++)) {
lib/libc/gen/unvis.c
257
switch (unvis(&p, c, &state, 0)) {
lib/libc/gen/unvis.c
277
if (unvis(&p, c, &state, UNVIS_END) == UNVIS_VALID) {
lib/libc/gen/unvis.c
46
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
lib/libc/gen/unvis.c
52
unvis(char *cp, char c, int *astate, int flag)
lib/libc/gen/unvis.c
67
if (c == '\\') {
lib/libc/gen/unvis.c
71
*cp = c;
lib/libc/gen/unvis.c
75
switch(c) {
lib/libc/gen/unvis.c
82
*cp = c;
lib/libc/gen/unvis.c
87
*cp = (c - '0');
lib/libc/gen/vis.c
140
if (((c & 0177) == ' ') || vis_octal ||
lib/libc/gen/vis.c
141
(vis_glob && (c == '*' || c == '?' || c == '[' || c == '#'))) {
lib/libc/gen/vis.c
143
*dst++ = ((u_char)c >> 6 & 07) + '0';
lib/libc/gen/vis.c
144
*dst++ = ((u_char)c >> 3 & 07) + '0';
lib/libc/gen/vis.c
145
*dst++ = ((u_char)c & 07) + '0';
lib/libc/gen/vis.c
150
if (c & 0200) {
lib/libc/gen/vis.c
151
c &= 0177;
lib/libc/gen/vis.c
154
if (iscntrl((u_char)c)) {
lib/libc/gen/vis.c
156
if (c == 0177)
lib/libc/gen/vis.c
159
*dst++ = c + '@';
lib/libc/gen/vis.c
162
*dst++ = c;
lib/libc/gen/vis.c
186
char c;
lib/libc/gen/vis.c
189
for (start = dst; (c = *src);)
lib/libc/gen/vis.c
190
dst = vis(dst, c, flag, *++src);
lib/libc/gen/vis.c
203
int c, i;
lib/libc/gen/vis.c
206
for (start = dst, end = start + siz - 1; (c = *src) && dst < end; ) {
lib/libc/gen/vis.c
207
if (isvisible(c, flag)) {
lib/libc/gen/vis.c
208
if ((c == '"' && vis_dq) ||
lib/libc/gen/vis.c
209
(c == '\\' && !vis_noslash)) {
lib/libc/gen/vis.c
218
*dst++ = c;
lib/libc/gen/vis.c
221
i = vis(tbuf, c, flag, *++src) - tbuf;
lib/libc/gen/vis.c
235
while ((c = *src))
lib/libc/gen/vis.c
236
dst += vis(tbuf, c, flag, *++src) - tbuf;
lib/libc/gen/vis.c
263
char c;
lib/libc/gen/vis.c
267
c = *src;
lib/libc/gen/vis.c
268
dst = vis(dst, c, flag, *++src);
lib/libc/gen/vis.c
40
isoctal(int c)
lib/libc/gen/vis.c
42
u_char uc = c;
lib/libc/gen/vis.c
48
isvisible(int c, int flag)
lib/libc/gen/vis.c
56
u_char uc = c;
lib/libc/gen/vis.c
58
if (c == '\\' || !vis_all) {
lib/libc/gen/vis.c
59
if ((u_int)c <= UCHAR_MAX && isascii(uc) &&
lib/libc/gen/vis.c
60
((c != '*' && c != '?' && c != '[' && c != '#') || !vis_glob) &&
lib/libc/gen/vis.c
63
if (!vis_sp && c == ' ')
lib/libc/gen/vis.c
65
if (!vis_tab && c == '\t')
lib/libc/gen/vis.c
67
if (!vis_nl && c == '\n')
lib/libc/gen/vis.c
69
if (vis_safe && (c == '\b' || c == '\007' || c == '\r' || isgraph(uc)))
lib/libc/gen/vis.c
79
vis(char *dst, int c, int flag, int nextc)
lib/libc/gen/vis.c
87
if (isvisible(c, flag)) {
lib/libc/gen/vis.c
88
if ((c == '"' && vis_dq) ||
lib/libc/gen/vis.c
89
(c == '\\' && !vis_noslash))
lib/libc/gen/vis.c
91
*dst++ = c;
lib/libc/gen/vis.c
97
switch (c) {
lib/libc/hash/md5.c
163
u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
lib/libc/hash/md5.c
179
c = state[2];
lib/libc/hash/md5.c
182
MD5STEP(F1, a, b, c, d, in[ 0] + 0xd76aa478, 7);
lib/libc/hash/md5.c
183
MD5STEP(F1, d, a, b, c, in[ 1] + 0xe8c7b756, 12);
lib/libc/hash/md5.c
184
MD5STEP(F1, c, d, a, b, in[ 2] + 0x242070db, 17);
lib/libc/hash/md5.c
185
MD5STEP(F1, b, c, d, a, in[ 3] + 0xc1bdceee, 22);
lib/libc/hash/md5.c
186
MD5STEP(F1, a, b, c, d, in[ 4] + 0xf57c0faf, 7);
lib/libc/hash/md5.c
187
MD5STEP(F1, d, a, b, c, in[ 5] + 0x4787c62a, 12);
lib/libc/hash/md5.c
188
MD5STEP(F1, c, d, a, b, in[ 6] + 0xa8304613, 17);
lib/libc/hash/md5.c
189
MD5STEP(F1, b, c, d, a, in[ 7] + 0xfd469501, 22);
lib/libc/hash/md5.c
190
MD5STEP(F1, a, b, c, d, in[ 8] + 0x698098d8, 7);
lib/libc/hash/md5.c
191
MD5STEP(F1, d, a, b, c, in[ 9] + 0x8b44f7af, 12);
lib/libc/hash/md5.c
192
MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
lib/libc/hash/md5.c
193
MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
lib/libc/hash/md5.c
194
MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
lib/libc/hash/md5.c
195
MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
lib/libc/hash/md5.c
196
MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
lib/libc/hash/md5.c
197
MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
lib/libc/hash/md5.c
199
MD5STEP(F2, a, b, c, d, in[ 1] + 0xf61e2562, 5);
lib/libc/hash/md5.c
200
MD5STEP(F2, d, a, b, c, in[ 6] + 0xc040b340, 9);
lib/libc/hash/md5.c
201
MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
lib/libc/hash/md5.c
202
MD5STEP(F2, b, c, d, a, in[ 0] + 0xe9b6c7aa, 20);
lib/libc/hash/md5.c
203
MD5STEP(F2, a, b, c, d, in[ 5] + 0xd62f105d, 5);
lib/libc/hash/md5.c
204
MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
lib/libc/hash/md5.c
205
MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
lib/libc/hash/md5.c
206
MD5STEP(F2, b, c, d, a, in[ 4] + 0xe7d3fbc8, 20);
lib/libc/hash/md5.c
207
MD5STEP(F2, a, b, c, d, in[ 9] + 0x21e1cde6, 5);
lib/libc/hash/md5.c
208
MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
lib/libc/hash/md5.c
209
MD5STEP(F2, c, d, a, b, in[ 3] + 0xf4d50d87, 14);
lib/libc/hash/md5.c
210
MD5STEP(F2, b, c, d, a, in[ 8] + 0x455a14ed, 20);
lib/libc/hash/md5.c
211
MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
lib/libc/hash/md5.c
212
MD5STEP(F2, d, a, b, c, in[ 2] + 0xfcefa3f8, 9);
lib/libc/hash/md5.c
213
MD5STEP(F2, c, d, a, b, in[ 7] + 0x676f02d9, 14);
lib/libc/hash/md5.c
214
MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
lib/libc/hash/md5.c
216
MD5STEP(F3, a, b, c, d, in[ 5] + 0xfffa3942, 4);
lib/libc/hash/md5.c
217
MD5STEP(F3, d, a, b, c, in[ 8] + 0x8771f681, 11);
lib/libc/hash/md5.c
218
MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
lib/libc/hash/md5.c
219
MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
lib/libc/hash/md5.c
220
MD5STEP(F3, a, b, c, d, in[ 1] + 0xa4beea44, 4);
lib/libc/hash/md5.c
221
MD5STEP(F3, d, a, b, c, in[ 4] + 0x4bdecfa9, 11);
lib/libc/hash/md5.c
222
MD5STEP(F3, c, d, a, b, in[ 7] + 0xf6bb4b60, 16);
lib/libc/hash/md5.c
223
MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
lib/libc/hash/md5.c
224
MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
lib/libc/hash/md5.c
225
MD5STEP(F3, d, a, b, c, in[ 0] + 0xeaa127fa, 11);
lib/libc/hash/md5.c
226
MD5STEP(F3, c, d, a, b, in[ 3] + 0xd4ef3085, 16);
lib/libc/hash/md5.c
227
MD5STEP(F3, b, c, d, a, in[ 6] + 0x04881d05, 23);
lib/libc/hash/md5.c
228
MD5STEP(F3, a, b, c, d, in[ 9] + 0xd9d4d039, 4);
lib/libc/hash/md5.c
229
MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
lib/libc/hash/md5.c
230
MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
lib/libc/hash/md5.c
231
MD5STEP(F3, b, c, d, a, in[2 ] + 0xc4ac5665, 23);
lib/libc/hash/md5.c
233
MD5STEP(F4, a, b, c, d, in[ 0] + 0xf4292244, 6);
lib/libc/hash/md5.c
234
MD5STEP(F4, d, a, b, c, in[7 ] + 0x432aff97, 10);
lib/libc/hash/md5.c
235
MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
lib/libc/hash/md5.c
236
MD5STEP(F4, b, c, d, a, in[5 ] + 0xfc93a039, 21);
lib/libc/hash/md5.c
237
MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
lib/libc/hash/md5.c
238
MD5STEP(F4, d, a, b, c, in[3 ] + 0x8f0ccc92, 10);
lib/libc/hash/md5.c
239
MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
lib/libc/hash/md5.c
240
MD5STEP(F4, b, c, d, a, in[1 ] + 0x85845dd1, 21);
lib/libc/hash/md5.c
241
MD5STEP(F4, a, b, c, d, in[8 ] + 0x6fa87e4f, 6);
lib/libc/hash/md5.c
242
MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
lib/libc/hash/md5.c
243
MD5STEP(F4, c, d, a, b, in[6 ] + 0xa3014314, 15);
lib/libc/hash/md5.c
244
MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
lib/libc/hash/md5.c
245
MD5STEP(F4, a, b, c, d, in[4 ] + 0xf7537e82, 6);
lib/libc/hash/md5.c
246
MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
lib/libc/hash/md5.c
247
MD5STEP(F4, c, d, a, b, in[2 ] + 0x2ad7d2bb, 15);
lib/libc/hash/md5.c
248
MD5STEP(F4, b, c, d, a, in[9 ] + 0xeb86d391, 21);
lib/libc/hash/md5.c
252
state[2] += c;
lib/libc/hash/rmd160.c
170
u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
lib/libc/hash/rmd160.c
187
c = state[2];
lib/libc/hash/rmd160.c
192
R(a, b, c, d, e, F0, K0, 11, 0);
lib/libc/hash/rmd160.c
193
R(e, a, b, c, d, F0, K0, 14, 1);
lib/libc/hash/rmd160.c
194
R(d, e, a, b, c, F0, K0, 15, 2);
lib/libc/hash/rmd160.c
195
R(c, d, e, a, b, F0, K0, 12, 3);
lib/libc/hash/rmd160.c
196
R(b, c, d, e, a, F0, K0, 5, 4);
lib/libc/hash/rmd160.c
197
R(a, b, c, d, e, F0, K0, 8, 5);
lib/libc/hash/rmd160.c
198
R(e, a, b, c, d, F0, K0, 7, 6);
lib/libc/hash/rmd160.c
199
R(d, e, a, b, c, F0, K0, 9, 7);
lib/libc/hash/rmd160.c
200
R(c, d, e, a, b, F0, K0, 11, 8);
lib/libc/hash/rmd160.c
201
R(b, c, d, e, a, F0, K0, 13, 9);
lib/libc/hash/rmd160.c
202
R(a, b, c, d, e, F0, K0, 14, 10);
lib/libc/hash/rmd160.c
203
R(e, a, b, c, d, F0, K0, 15, 11);
lib/libc/hash/rmd160.c
204
R(d, e, a, b, c, F0, K0, 6, 12);
lib/libc/hash/rmd160.c
205
R(c, d, e, a, b, F0, K0, 7, 13);
lib/libc/hash/rmd160.c
206
R(b, c, d, e, a, F0, K0, 9, 14);
lib/libc/hash/rmd160.c
207
R(a, b, c, d, e, F0, K0, 8, 15); /* #15 */
lib/libc/hash/rmd160.c
209
R(e, a, b, c, d, F1, K1, 7, 7);
lib/libc/hash/rmd160.c
210
R(d, e, a, b, c, F1, K1, 6, 4);
lib/libc/hash/rmd160.c
211
R(c, d, e, a, b, F1, K1, 8, 13);
lib/libc/hash/rmd160.c
212
R(b, c, d, e, a, F1, K1, 13, 1);
lib/libc/hash/rmd160.c
213
R(a, b, c, d, e, F1, K1, 11, 10);
lib/libc/hash/rmd160.c
214
R(e, a, b, c, d, F1, K1, 9, 6);
lib/libc/hash/rmd160.c
215
R(d, e, a, b, c, F1, K1, 7, 15);
lib/libc/hash/rmd160.c
216
R(c, d, e, a, b, F1, K1, 15, 3);
lib/libc/hash/rmd160.c
217
R(b, c, d, e, a, F1, K1, 7, 12);
lib/libc/hash/rmd160.c
218
R(a, b, c, d, e, F1, K1, 12, 0);
lib/libc/hash/rmd160.c
219
R(e, a, b, c, d, F1, K1, 15, 9);
lib/libc/hash/rmd160.c
220
R(d, e, a, b, c, F1, K1, 9, 5);
lib/libc/hash/rmd160.c
221
R(c, d, e, a, b, F1, K1, 11, 2);
lib/libc/hash/rmd160.c
222
R(b, c, d, e, a, F1, K1, 7, 14);
lib/libc/hash/rmd160.c
223
R(a, b, c, d, e, F1, K1, 13, 11);
lib/libc/hash/rmd160.c
224
R(e, a, b, c, d, F1, K1, 12, 8); /* #31 */
lib/libc/hash/rmd160.c
226
R(d, e, a, b, c, F2, K2, 11, 3);
lib/libc/hash/rmd160.c
227
R(c, d, e, a, b, F2, K2, 13, 10);
lib/libc/hash/rmd160.c
228
R(b, c, d, e, a, F2, K2, 6, 14);
lib/libc/hash/rmd160.c
229
R(a, b, c, d, e, F2, K2, 7, 4);
lib/libc/hash/rmd160.c
230
R(e, a, b, c, d, F2, K2, 14, 9);
lib/libc/hash/rmd160.c
231
R(d, e, a, b, c, F2, K2, 9, 15);
lib/libc/hash/rmd160.c
232
R(c, d, e, a, b, F2, K2, 13, 8);
lib/libc/hash/rmd160.c
233
R(b, c, d, e, a, F2, K2, 15, 1);
lib/libc/hash/rmd160.c
234
R(a, b, c, d, e, F2, K2, 14, 2);
lib/libc/hash/rmd160.c
235
R(e, a, b, c, d, F2, K2, 8, 7);
lib/libc/hash/rmd160.c
236
R(d, e, a, b, c, F2, K2, 13, 0);
lib/libc/hash/rmd160.c
237
R(c, d, e, a, b, F2, K2, 6, 6);
lib/libc/hash/rmd160.c
238
R(b, c, d, e, a, F2, K2, 5, 13);
lib/libc/hash/rmd160.c
239
R(a, b, c, d, e, F2, K2, 12, 11);
lib/libc/hash/rmd160.c
240
R(e, a, b, c, d, F2, K2, 7, 5);
lib/libc/hash/rmd160.c
241
R(d, e, a, b, c, F2, K2, 5, 12); /* #47 */
lib/libc/hash/rmd160.c
243
R(c, d, e, a, b, F3, K3, 11, 1);
lib/libc/hash/rmd160.c
244
R(b, c, d, e, a, F3, K3, 12, 9);
lib/libc/hash/rmd160.c
245
R(a, b, c, d, e, F3, K3, 14, 11);
lib/libc/hash/rmd160.c
246
R(e, a, b, c, d, F3, K3, 15, 10);
lib/libc/hash/rmd160.c
247
R(d, e, a, b, c, F3, K3, 14, 0);
lib/libc/hash/rmd160.c
248
R(c, d, e, a, b, F3, K3, 15, 8);
lib/libc/hash/rmd160.c
249
R(b, c, d, e, a, F3, K3, 9, 12);
lib/libc/hash/rmd160.c
250
R(a, b, c, d, e, F3, K3, 8, 4);
lib/libc/hash/rmd160.c
251
R(e, a, b, c, d, F3, K3, 9, 13);
lib/libc/hash/rmd160.c
252
R(d, e, a, b, c, F3, K3, 14, 3);
lib/libc/hash/rmd160.c
253
R(c, d, e, a, b, F3, K3, 5, 7);
lib/libc/hash/rmd160.c
254
R(b, c, d, e, a, F3, K3, 6, 15);
lib/libc/hash/rmd160.c
255
R(a, b, c, d, e, F3, K3, 8, 14);
lib/libc/hash/rmd160.c
256
R(e, a, b, c, d, F3, K3, 6, 5);
lib/libc/hash/rmd160.c
257
R(d, e, a, b, c, F3, K3, 5, 6);
lib/libc/hash/rmd160.c
258
R(c, d, e, a, b, F3, K3, 12, 2); /* #63 */
lib/libc/hash/rmd160.c
260
R(b, c, d, e, a, F4, K4, 9, 4);
lib/libc/hash/rmd160.c
261
R(a, b, c, d, e, F4, K4, 15, 0);
lib/libc/hash/rmd160.c
262
R(e, a, b, c, d, F4, K4, 5, 5);
lib/libc/hash/rmd160.c
263
R(d, e, a, b, c, F4, K4, 11, 9);
lib/libc/hash/rmd160.c
264
R(c, d, e, a, b, F4, K4, 6, 7);
lib/libc/hash/rmd160.c
265
R(b, c, d, e, a, F4, K4, 8, 12);
lib/libc/hash/rmd160.c
266
R(a, b, c, d, e, F4, K4, 13, 2);
lib/libc/hash/rmd160.c
267
R(e, a, b, c, d, F4, K4, 12, 10);
lib/libc/hash/rmd160.c
268
R(d, e, a, b, c, F4, K4, 5, 14);
lib/libc/hash/rmd160.c
269
R(c, d, e, a, b, F4, K4, 12, 1);
lib/libc/hash/rmd160.c
270
R(b, c, d, e, a, F4, K4, 13, 3);
lib/libc/hash/rmd160.c
271
R(a, b, c, d, e, F4, K4, 14, 8);
lib/libc/hash/rmd160.c
272
R(e, a, b, c, d, F4, K4, 11, 11);
lib/libc/hash/rmd160.c
273
R(d, e, a, b, c, F4, K4, 8, 6);
lib/libc/hash/rmd160.c
274
R(c, d, e, a, b, F4, K4, 5, 15);
lib/libc/hash/rmd160.c
275
R(b, c, d, e, a, F4, K4, 6, 13); /* #79 */
lib/libc/hash/rmd160.c
277
aa = a ; bb = b; cc = c; dd = d; ee = e;
lib/libc/hash/rmd160.c
281
c = state[2];
lib/libc/hash/rmd160.c
286
R(a, b, c, d, e, F4, KK0, 8, 5);
lib/libc/hash/rmd160.c
287
R(e, a, b, c, d, F4, KK0, 9, 14);
lib/libc/hash/rmd160.c
288
R(d, e, a, b, c, F4, KK0, 9, 7);
lib/libc/hash/rmd160.c
289
R(c, d, e, a, b, F4, KK0, 11, 0);
lib/libc/hash/rmd160.c
290
R(b, c, d, e, a, F4, KK0, 13, 9);
lib/libc/hash/rmd160.c
291
R(a, b, c, d, e, F4, KK0, 15, 2);
lib/libc/hash/rmd160.c
292
R(e, a, b, c, d, F4, KK0, 15, 11);
lib/libc/hash/rmd160.c
293
R(d, e, a, b, c, F4, KK0, 5, 4);
lib/libc/hash/rmd160.c
294
R(c, d, e, a, b, F4, KK0, 7, 13);
lib/libc/hash/rmd160.c
295
R(b, c, d, e, a, F4, KK0, 7, 6);
lib/libc/hash/rmd160.c
296
R(a, b, c, d, e, F4, KK0, 8, 15);
lib/libc/hash/rmd160.c
297
R(e, a, b, c, d, F4, KK0, 11, 8);
lib/libc/hash/rmd160.c
298
R(d, e, a, b, c, F4, KK0, 14, 1);
lib/libc/hash/rmd160.c
299
R(c, d, e, a, b, F4, KK0, 14, 10);
lib/libc/hash/rmd160.c
300
R(b, c, d, e, a, F4, KK0, 12, 3);
lib/libc/hash/rmd160.c
301
R(a, b, c, d, e, F4, KK0, 6, 12); /* #15 */
lib/libc/hash/rmd160.c
303
R(e, a, b, c, d, F3, KK1, 9, 6);
lib/libc/hash/rmd160.c
304
R(d, e, a, b, c, F3, KK1, 13, 11);
lib/libc/hash/rmd160.c
305
R(c, d, e, a, b, F3, KK1, 15, 3);
lib/libc/hash/rmd160.c
306
R(b, c, d, e, a, F3, KK1, 7, 7);
lib/libc/hash/rmd160.c
307
R(a, b, c, d, e, F3, KK1, 12, 0);
lib/libc/hash/rmd160.c
308
R(e, a, b, c, d, F3, KK1, 8, 13);
lib/libc/hash/rmd160.c
309
R(d, e, a, b, c, F3, KK1, 9, 5);
lib/libc/hash/rmd160.c
310
R(c, d, e, a, b, F3, KK1, 11, 10);
lib/libc/hash/rmd160.c
311
R(b, c, d, e, a, F3, KK1, 7, 14);
lib/libc/hash/rmd160.c
312
R(a, b, c, d, e, F3, KK1, 7, 15);
lib/libc/hash/rmd160.c
313
R(e, a, b, c, d, F3, KK1, 12, 8);
lib/libc/hash/rmd160.c
314
R(d, e, a, b, c, F3, KK1, 7, 12);
lib/libc/hash/rmd160.c
315
R(c, d, e, a, b, F3, KK1, 6, 4);
lib/libc/hash/rmd160.c
316
R(b, c, d, e, a, F3, KK1, 15, 9);
lib/libc/hash/rmd160.c
317
R(a, b, c, d, e, F3, KK1, 13, 1);
lib/libc/hash/rmd160.c
318
R(e, a, b, c, d, F3, KK1, 11, 2); /* #31 */
lib/libc/hash/rmd160.c
320
R(d, e, a, b, c, F2, KK2, 9, 15);
lib/libc/hash/rmd160.c
321
R(c, d, e, a, b, F2, KK2, 7, 5);
lib/libc/hash/rmd160.c
322
R(b, c, d, e, a, F2, KK2, 15, 1);
lib/libc/hash/rmd160.c
323
R(a, b, c, d, e, F2, KK2, 11, 3);
lib/libc/hash/rmd160.c
324
R(e, a, b, c, d, F2, KK2, 8, 7);
lib/libc/hash/rmd160.c
325
R(d, e, a, b, c, F2, KK2, 6, 14);
lib/libc/hash/rmd160.c
326
R(c, d, e, a, b, F2, KK2, 6, 6);
lib/libc/hash/rmd160.c
327
R(b, c, d, e, a, F2, KK2, 14, 9);
lib/libc/hash/rmd160.c
328
R(a, b, c, d, e, F2, KK2, 12, 11);
lib/libc/hash/rmd160.c
329
R(e, a, b, c, d, F2, KK2, 13, 8);
lib/libc/hash/rmd160.c
330
R(d, e, a, b, c, F2, KK2, 5, 12);
lib/libc/hash/rmd160.c
331
R(c, d, e, a, b, F2, KK2, 14, 2);
lib/libc/hash/rmd160.c
332
R(b, c, d, e, a, F2, KK2, 13, 10);
lib/libc/hash/rmd160.c
333
R(a, b, c, d, e, F2, KK2, 13, 0);
lib/libc/hash/rmd160.c
334
R(e, a, b, c, d, F2, KK2, 7, 4);
lib/libc/hash/rmd160.c
335
R(d, e, a, b, c, F2, KK2, 5, 13); /* #47 */
lib/libc/hash/rmd160.c
337
R(c, d, e, a, b, F1, KK3, 15, 8);
lib/libc/hash/rmd160.c
338
R(b, c, d, e, a, F1, KK3, 5, 6);
lib/libc/hash/rmd160.c
339
R(a, b, c, d, e, F1, KK3, 8, 4);
lib/libc/hash/rmd160.c
340
R(e, a, b, c, d, F1, KK3, 11, 1);
lib/libc/hash/rmd160.c
341
R(d, e, a, b, c, F1, KK3, 14, 3);
lib/libc/hash/rmd160.c
342
R(c, d, e, a, b, F1, KK3, 14, 11);
lib/libc/hash/rmd160.c
343
R(b, c, d, e, a, F1, KK3, 6, 15);
lib/libc/hash/rmd160.c
344
R(a, b, c, d, e, F1, KK3, 14, 0);
lib/libc/hash/rmd160.c
345
R(e, a, b, c, d, F1, KK3, 6, 5);
lib/libc/hash/rmd160.c
346
R(d, e, a, b, c, F1, KK3, 9, 12);
lib/libc/hash/rmd160.c
347
R(c, d, e, a, b, F1, KK3, 12, 2);
lib/libc/hash/rmd160.c
348
R(b, c, d, e, a, F1, KK3, 9, 13);
lib/libc/hash/rmd160.c
349
R(a, b, c, d, e, F1, KK3, 12, 9);
lib/libc/hash/rmd160.c
350
R(e, a, b, c, d, F1, KK3, 5, 7);
lib/libc/hash/rmd160.c
351
R(d, e, a, b, c, F1, KK3, 15, 10);
lib/libc/hash/rmd160.c
352
R(c, d, e, a, b, F1, KK3, 8, 14); /* #63 */
lib/libc/hash/rmd160.c
354
R(b, c, d, e, a, F0, KK4, 8, 12);
lib/libc/hash/rmd160.c
355
R(a, b, c, d, e, F0, KK4, 5, 15);
lib/libc/hash/rmd160.c
356
R(e, a, b, c, d, F0, KK4, 12, 10);
lib/libc/hash/rmd160.c
357
R(d, e, a, b, c, F0, KK4, 9, 4);
lib/libc/hash/rmd160.c
358
R(c, d, e, a, b, F0, KK4, 12, 1);
lib/libc/hash/rmd160.c
359
R(b, c, d, e, a, F0, KK4, 5, 5);
lib/libc/hash/rmd160.c
360
R(a, b, c, d, e, F0, KK4, 14, 8);
lib/libc/hash/rmd160.c
361
R(e, a, b, c, d, F0, KK4, 6, 7);
lib/libc/hash/rmd160.c
362
R(d, e, a, b, c, F0, KK4, 8, 6);
lib/libc/hash/rmd160.c
363
R(c, d, e, a, b, F0, KK4, 13, 2);
lib/libc/hash/rmd160.c
364
R(b, c, d, e, a, F0, KK4, 6, 13);
lib/libc/hash/rmd160.c
365
R(a, b, c, d, e, F0, KK4, 5, 14);
lib/libc/hash/rmd160.c
366
R(e, a, b, c, d, F0, KK4, 15, 0);
lib/libc/hash/rmd160.c
367
R(d, e, a, b, c, F0, KK4, 13, 3);
lib/libc/hash/rmd160.c
368
R(c, d, e, a, b, F0, KK4, 11, 9);
lib/libc/hash/rmd160.c
369
R(b, c, d, e, a, F0, KK4, 11, 11); /* #79 */
lib/libc/hash/rmd160.c
375
state[4] = state[0] + bb + c;
lib/libc/hash/rmd160.c
77
#define R(a, b, c, d, e, Fj, Kj, sj, rj) \
lib/libc/hash/rmd160.c
79
a = ROL(sj, a + Fj(b,c,d) + X(rj) + Kj) + e; \
lib/libc/hash/rmd160.c
80
c = ROL(10, c); \
lib/libc/hash/sha1.c
105
T = crypto_rol_u32(*a, 5) + Parity(*b, *c, *d) + *e + Kt + Wt;
lib/libc/hash/sha1.c
108
*d = *c;
lib/libc/hash/sha1.c
109
*c = crypto_rol_u32(*b, 30);
lib/libc/hash/sha1.c
115
sha1_round3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libc/hash/sha1.c
121
T = crypto_rol_u32(*a, 5) + Maj(*b, *c, *d) + *e + Kt + Wt;
lib/libc/hash/sha1.c
124
*d = *c;
lib/libc/hash/sha1.c
125
*c = crypto_rol_u32(*b, 30);
lib/libc/hash/sha1.c
131
sha1_round4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libc/hash/sha1.c
137
T = crypto_rol_u32(*a, 5) + Parity(*b, *c, *d) + *e + Kt + Wt;
lib/libc/hash/sha1.c
140
*d = *c;
lib/libc/hash/sha1.c
141
*c = crypto_rol_u32(*b, 30);
lib/libc/hash/sha1.c
151
uint32_t a, b, c, d, e;
lib/libc/hash/sha1.c
157
c = state[2];
lib/libc/hash/sha1.c
201
sha1_round1(&a, &b, &c, &d, &e, W[0]);
lib/libc/hash/sha1.c
202
sha1_round1(&a, &b, &c, &d, &e, W[1]);
lib/libc/hash/sha1.c
203
sha1_round1(&a, &b, &c, &d, &e, W[2]);
lib/libc/hash/sha1.c
204
sha1_round1(&a, &b, &c, &d, &e, W[3]);
lib/libc/hash/sha1.c
205
sha1_round1(&a, &b, &c, &d, &e, W[4]);
lib/libc/hash/sha1.c
206
sha1_round1(&a, &b, &c, &d, &e, W[5]);
lib/libc/hash/sha1.c
207
sha1_round1(&a, &b, &c, &d, &e, W[6]);
lib/libc/hash/sha1.c
208
sha1_round1(&a, &b, &c, &d, &e, W[7]);
lib/libc/hash/sha1.c
209
sha1_round1(&a, &b, &c, &d, &e, W[8]);
lib/libc/hash/sha1.c
210
sha1_round1(&a, &b, &c, &d, &e, W[9]);
lib/libc/hash/sha1.c
211
sha1_round1(&a, &b, &c, &d, &e, W[10]);
lib/libc/hash/sha1.c
212
sha1_round1(&a, &b, &c, &d, &e, W[11]);
lib/libc/hash/sha1.c
213
sha1_round1(&a, &b, &c, &d, &e, W[12]);
lib/libc/hash/sha1.c
214
sha1_round1(&a, &b, &c, &d, &e, W[13]);
lib/libc/hash/sha1.c
215
sha1_round1(&a, &b, &c, &d, &e, W[14]);
lib/libc/hash/sha1.c
216
sha1_round1(&a, &b, &c, &d, &e, W[15]);
lib/libc/hash/sha1.c
235
sha1_round1(&a, &b, &c, &d, &e, W[0]);
lib/libc/hash/sha1.c
236
sha1_round1(&a, &b, &c, &d, &e, W[1]);
lib/libc/hash/sha1.c
237
sha1_round1(&a, &b, &c, &d, &e, W[2]);
lib/libc/hash/sha1.c
238
sha1_round1(&a, &b, &c, &d, &e, W[3]);
lib/libc/hash/sha1.c
239
sha1_round2(&a, &b, &c, &d, &e, W[4]);
lib/libc/hash/sha1.c
240
sha1_round2(&a, &b, &c, &d, &e, W[5]);
lib/libc/hash/sha1.c
241
sha1_round2(&a, &b, &c, &d, &e, W[6]);
lib/libc/hash/sha1.c
242
sha1_round2(&a, &b, &c, &d, &e, W[7]);
lib/libc/hash/sha1.c
243
sha1_round2(&a, &b, &c, &d, &e, W[8]);
lib/libc/hash/sha1.c
244
sha1_round2(&a, &b, &c, &d, &e, W[9]);
lib/libc/hash/sha1.c
245
sha1_round2(&a, &b, &c, &d, &e, W[10]);
lib/libc/hash/sha1.c
246
sha1_round2(&a, &b, &c, &d, &e, W[11]);
lib/libc/hash/sha1.c
247
sha1_round2(&a, &b, &c, &d, &e, W[12]);
lib/libc/hash/sha1.c
248
sha1_round2(&a, &b, &c, &d, &e, W[13]);
lib/libc/hash/sha1.c
249
sha1_round2(&a, &b, &c, &d, &e, W[14]);
lib/libc/hash/sha1.c
250
sha1_round2(&a, &b, &c, &d, &e, W[15]);
lib/libc/hash/sha1.c
269
sha1_round2(&a, &b, &c, &d, &e, W[0]);
lib/libc/hash/sha1.c
270
sha1_round2(&a, &b, &c, &d, &e, W[1]);
lib/libc/hash/sha1.c
271
sha1_round2(&a, &b, &c, &d, &e, W[2]);
lib/libc/hash/sha1.c
272
sha1_round2(&a, &b, &c, &d, &e, W[3]);
lib/libc/hash/sha1.c
273
sha1_round2(&a, &b, &c, &d, &e, W[4]);
lib/libc/hash/sha1.c
274
sha1_round2(&a, &b, &c, &d, &e, W[5]);
lib/libc/hash/sha1.c
275
sha1_round2(&a, &b, &c, &d, &e, W[6]);
lib/libc/hash/sha1.c
276
sha1_round2(&a, &b, &c, &d, &e, W[7]);
lib/libc/hash/sha1.c
277
sha1_round3(&a, &b, &c, &d, &e, W[8]);
lib/libc/hash/sha1.c
278
sha1_round3(&a, &b, &c, &d, &e, W[9]);
lib/libc/hash/sha1.c
279
sha1_round3(&a, &b, &c, &d, &e, W[10]);
lib/libc/hash/sha1.c
280
sha1_round3(&a, &b, &c, &d, &e, W[11]);
lib/libc/hash/sha1.c
281
sha1_round3(&a, &b, &c, &d, &e, W[12]);
lib/libc/hash/sha1.c
282
sha1_round3(&a, &b, &c, &d, &e, W[13]);
lib/libc/hash/sha1.c
283
sha1_round3(&a, &b, &c, &d, &e, W[14]);
lib/libc/hash/sha1.c
284
sha1_round3(&a, &b, &c, &d, &e, W[15]);
lib/libc/hash/sha1.c
303
sha1_round3(&a, &b, &c, &d, &e, W[0]);
lib/libc/hash/sha1.c
304
sha1_round3(&a, &b, &c, &d, &e, W[1]);
lib/libc/hash/sha1.c
305
sha1_round3(&a, &b, &c, &d, &e, W[2]);
lib/libc/hash/sha1.c
306
sha1_round3(&a, &b, &c, &d, &e, W[3]);
lib/libc/hash/sha1.c
307
sha1_round3(&a, &b, &c, &d, &e, W[4]);
lib/libc/hash/sha1.c
308
sha1_round3(&a, &b, &c, &d, &e, W[5]);
lib/libc/hash/sha1.c
309
sha1_round3(&a, &b, &c, &d, &e, W[6]);
lib/libc/hash/sha1.c
310
sha1_round3(&a, &b, &c, &d, &e, W[7]);
lib/libc/hash/sha1.c
311
sha1_round3(&a, &b, &c, &d, &e, W[8]);
lib/libc/hash/sha1.c
312
sha1_round3(&a, &b, &c, &d, &e, W[9]);
lib/libc/hash/sha1.c
313
sha1_round3(&a, &b, &c, &d, &e, W[10]);
lib/libc/hash/sha1.c
314
sha1_round3(&a, &b, &c, &d, &e, W[11]);
lib/libc/hash/sha1.c
315
sha1_round4(&a, &b, &c, &d, &e, W[12]);
lib/libc/hash/sha1.c
316
sha1_round4(&a, &b, &c, &d, &e, W[13]);
lib/libc/hash/sha1.c
317
sha1_round4(&a, &b, &c, &d, &e, W[14]);
lib/libc/hash/sha1.c
318
sha1_round4(&a, &b, &c, &d, &e, W[15]);
lib/libc/hash/sha1.c
337
sha1_round4(&a, &b, &c, &d, &e, W[0]);
lib/libc/hash/sha1.c
338
sha1_round4(&a, &b, &c, &d, &e, W[1]);
lib/libc/hash/sha1.c
339
sha1_round4(&a, &b, &c, &d, &e, W[2]);
lib/libc/hash/sha1.c
340
sha1_round4(&a, &b, &c, &d, &e, W[3]);
lib/libc/hash/sha1.c
341
sha1_round4(&a, &b, &c, &d, &e, W[4]);
lib/libc/hash/sha1.c
342
sha1_round4(&a, &b, &c, &d, &e, W[5]);
lib/libc/hash/sha1.c
343
sha1_round4(&a, &b, &c, &d, &e, W[6]);
lib/libc/hash/sha1.c
344
sha1_round4(&a, &b, &c, &d, &e, W[7]);
lib/libc/hash/sha1.c
345
sha1_round4(&a, &b, &c, &d, &e, W[8]);
lib/libc/hash/sha1.c
346
sha1_round4(&a, &b, &c, &d, &e, W[9]);
lib/libc/hash/sha1.c
347
sha1_round4(&a, &b, &c, &d, &e, W[10]);
lib/libc/hash/sha1.c
348
sha1_round4(&a, &b, &c, &d, &e, W[11]);
lib/libc/hash/sha1.c
349
sha1_round4(&a, &b, &c, &d, &e, W[12]);
lib/libc/hash/sha1.c
350
sha1_round4(&a, &b, &c, &d, &e, W[13]);
lib/libc/hash/sha1.c
351
sha1_round4(&a, &b, &c, &d, &e, W[14]);
lib/libc/hash/sha1.c
352
sha1_round4(&a, &b, &c, &d, &e, W[15]);
lib/libc/hash/sha1.c
356
state[2] += c;
lib/libc/hash/sha1.c
369
uint32_t a, b, c, d, e;
lib/libc/hash/sha1.c
376
c = state[2];
lib/libc/hash/sha1.c
389
sha1_round1(&a, &b, &c, &d, &e, W[i % 16]);
lib/libc/hash/sha1.c
391
sha1_round2(&a, &b, &c, &d, &e, W[i % 16]);
lib/libc/hash/sha1.c
393
sha1_round3(&a, &b, &c, &d, &e, W[i % 16]);
lib/libc/hash/sha1.c
395
sha1_round4(&a, &b, &c, &d, &e, W[i % 16]);
lib/libc/hash/sha1.c
403
state[2] += c;
lib/libc/hash/sha1.c
83
sha1_round1(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libc/hash/sha1.c
89
T = crypto_rol_u32(*a, 5) + Ch(*b, *c, *d) + *e + Kt + Wt;
lib/libc/hash/sha1.c
92
*d = *c;
lib/libc/hash/sha1.c
93
*c = crypto_rol_u32(*b, 30);
lib/libc/hash/sha1.c
99
sha1_round2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libc/hash/sha256.c
125
sha256_round(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libc/hash/sha256.c
131
T2 = Sigma0(*a) + Maj(*a, *b, *c);
lib/libc/hash/sha256.c
137
*d = *c;
lib/libc/hash/sha256.c
138
*c = *b;
lib/libc/hash/sha256.c
148
uint32_t a, b, c, d, e, f, g, h;
lib/libc/hash/sha256.c
155
c = state[2];
lib/libc/hash/sha256.c
202
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[0], W[0]);
lib/libc/hash/sha256.c
203
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[1], W[1]);
lib/libc/hash/sha256.c
204
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[2], W[2]);
lib/libc/hash/sha256.c
205
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[3], W[3]);
lib/libc/hash/sha256.c
206
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[4], W[4]);
lib/libc/hash/sha256.c
207
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[5], W[5]);
lib/libc/hash/sha256.c
208
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[6], W[6]);
lib/libc/hash/sha256.c
209
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[7], W[7]);
lib/libc/hash/sha256.c
210
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[8], W[8]);
lib/libc/hash/sha256.c
211
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[9], W[9]);
lib/libc/hash/sha256.c
212
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[10], W[10]);
lib/libc/hash/sha256.c
213
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[11], W[11]);
lib/libc/hash/sha256.c
214
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[12], W[12]);
lib/libc/hash/sha256.c
215
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[13], W[13]);
lib/libc/hash/sha256.c
216
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[14], W[14]);
lib/libc/hash/sha256.c
217
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[15], W[15]);
lib/libc/hash/sha256.c
237
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 0], W[0]);
lib/libc/hash/sha256.c
238
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 1], W[1]);
lib/libc/hash/sha256.c
239
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 2], W[2]);
lib/libc/hash/sha256.c
240
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 3], W[3]);
lib/libc/hash/sha256.c
241
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 4], W[4]);
lib/libc/hash/sha256.c
242
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 5], W[5]);
lib/libc/hash/sha256.c
243
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 6], W[6]);
lib/libc/hash/sha256.c
244
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 7], W[7]);
lib/libc/hash/sha256.c
245
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 8], W[8]);
lib/libc/hash/sha256.c
246
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 9], W[9]);
lib/libc/hash/sha256.c
247
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 10], W[10]);
lib/libc/hash/sha256.c
248
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 11], W[11]);
lib/libc/hash/sha256.c
249
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 12], W[12]);
lib/libc/hash/sha256.c
250
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 13], W[13]);
lib/libc/hash/sha256.c
251
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 14], W[14]);
lib/libc/hash/sha256.c
252
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 15], W[15]);
lib/libc/hash/sha256.c
257
state[2] += c;
lib/libc/hash/sha256.c
273
uint32_t a, b, c, d, e, f, g, h;
lib/libc/hash/sha256.c
280
c = state[2];
lib/libc/hash/sha256.c
294
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i], W[i % 16]);
lib/libc/hash/sha256.c
301
state[2] += c;
lib/libc/hash/sha512.c
143
sha512_round(uint64_t *a, uint64_t *b, uint64_t *c, uint64_t *d,
lib/libc/hash/sha512.c
150
T2 = Sigma0(*a) + Maj(*a, *b, *c);
lib/libc/hash/sha512.c
156
*d = *c;
lib/libc/hash/sha512.c
157
*c = *b;
lib/libc/hash/sha512.c
167
uint64_t a, b, c, d, e, f, g, h;
lib/libc/hash/sha512.c
174
c = state[2];
lib/libc/hash/sha512.c
221
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[0], W[0]);
lib/libc/hash/sha512.c
222
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[1], W[1]);
lib/libc/hash/sha512.c
223
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[2], W[2]);
lib/libc/hash/sha512.c
224
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[3], W[3]);
lib/libc/hash/sha512.c
225
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[4], W[4]);
lib/libc/hash/sha512.c
226
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[5], W[5]);
lib/libc/hash/sha512.c
227
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[6], W[6]);
lib/libc/hash/sha512.c
228
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[7], W[7]);
lib/libc/hash/sha512.c
229
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[8], W[8]);
lib/libc/hash/sha512.c
230
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[9], W[9]);
lib/libc/hash/sha512.c
231
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[10], W[10]);
lib/libc/hash/sha512.c
232
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[11], W[11]);
lib/libc/hash/sha512.c
233
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[12], W[12]);
lib/libc/hash/sha512.c
234
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[13], W[13]);
lib/libc/hash/sha512.c
235
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[14], W[14]);
lib/libc/hash/sha512.c
236
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[15], W[15]);
lib/libc/hash/sha512.c
256
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 0], W[0]);
lib/libc/hash/sha512.c
257
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 1], W[1]);
lib/libc/hash/sha512.c
258
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 2], W[2]);
lib/libc/hash/sha512.c
259
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 3], W[3]);
lib/libc/hash/sha512.c
260
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 4], W[4]);
lib/libc/hash/sha512.c
261
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 5], W[5]);
lib/libc/hash/sha512.c
262
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 6], W[6]);
lib/libc/hash/sha512.c
263
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 7], W[7]);
lib/libc/hash/sha512.c
264
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 8], W[8]);
lib/libc/hash/sha512.c
265
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 9], W[9]);
lib/libc/hash/sha512.c
266
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 10], W[10]);
lib/libc/hash/sha512.c
267
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 11], W[11]);
lib/libc/hash/sha512.c
268
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 12], W[12]);
lib/libc/hash/sha512.c
269
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 13], W[13]);
lib/libc/hash/sha512.c
270
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 14], W[14]);
lib/libc/hash/sha512.c
271
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 15], W[15]);
lib/libc/hash/sha512.c
276
state[2] += c;
lib/libc/hash/sha512.c
292
uint64_t a, b, c, d, e, f, g, h;
lib/libc/hash/sha512.c
299
c = state[2];
lib/libc/hash/sha512.c
313
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i], W[i % 16]);
lib/libc/hash/sha512.c
320
state[2] += c;
lib/libc/locale/___runetype_mb.c
41
___runetype_mb(wint_t c, _RuneLocale *rl)
lib/libc/locale/___runetype_mb.c
48
if (c == WEOF)
lib/libc/locale/___runetype_mb.c
51
c0 = (rune_t)c; /* XXX assumes wint_t = int */
lib/libc/locale/_wctrans.c
111
return (c);
lib/libc/locale/_wctrans.c
88
_towctrans_ext(wint_t c, struct _WCTransEntry *te)
lib/libc/locale/_wctrans.c
95
if (c == WEOF)
lib/libc/locale/_wctrans.c
96
return (c);
lib/libc/locale/_wctrans.c
98
c0 = (rune_t)c; /* XXX assumes wchar_t = int */
lib/libc/locale/_wctrans_local.h
38
_towctrans(wint_t c, _WCTransEntry *te)
lib/libc/locale/_wctrans_local.h
40
return (_RUNE_ISCACHED(c) ?
lib/libc/locale/_wctrans_local.h
41
te->te_cached[(rune_t)c]:_towctrans_ext(c, te));
lib/libc/locale/btowc.c
34
btowc(int c)
lib/libc/locale/btowc.c
40
if (c == EOF)
lib/libc/locale/btowc.c
48
cc = (char)c;
lib/libc/locale/isctype_l.c
100
return isupper(c);
lib/libc/locale/isctype_l.c
105
isxdigit_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
107
return isxdigit(c);
lib/libc/locale/isctype_l.c
112
tolower_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
114
return tolower(c);
lib/libc/locale/isctype_l.c
119
toupper_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
121
return toupper(c);
lib/libc/locale/isctype_l.c
28
isalnum_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
30
return isalnum(c);
lib/libc/locale/isctype_l.c
35
isalpha_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
37
return isalpha(c);
lib/libc/locale/isctype_l.c
42
isblank_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
44
return isblank(c);
lib/libc/locale/isctype_l.c
49
iscntrl_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
51
return iscntrl(c);
lib/libc/locale/isctype_l.c
56
isdigit_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
58
return isdigit(c);
lib/libc/locale/isctype_l.c
63
isgraph_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
65
return isgraph(c);
lib/libc/locale/isctype_l.c
70
islower_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
72
return islower(c);
lib/libc/locale/isctype_l.c
77
isprint_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
79
return isprint(c);
lib/libc/locale/isctype_l.c
84
ispunct_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
86
return ispunct(c);
lib/libc/locale/isctype_l.c
91
isspace_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/isctype_l.c
93
return isspace(c);
lib/libc/locale/isctype_l.c
98
isupper_l(int c, locale_t locale __attribute__((__unused__)))
lib/libc/locale/iswctype.c
101
return (__isctype_w((c), _RUNETYPE_C));
lib/libc/locale/iswctype.c
105
iswdigit(wint_t c)
lib/libc/locale/iswctype.c
107
return (__isctype_w((c), _RUNETYPE_D));
lib/libc/locale/iswctype.c
111
iswgraph(wint_t c)
lib/libc/locale/iswctype.c
113
return (__isctype_w((c), _RUNETYPE_G));
lib/libc/locale/iswctype.c
117
iswlower(wint_t c)
lib/libc/locale/iswctype.c
119
return (__isctype_w((c), _RUNETYPE_L));
lib/libc/locale/iswctype.c
123
iswprint(wint_t c)
lib/libc/locale/iswctype.c
125
return (__isctype_w((c), _RUNETYPE_R));
lib/libc/locale/iswctype.c
129
iswpunct(wint_t c)
lib/libc/locale/iswctype.c
131
return (__isctype_w((c), _RUNETYPE_P));
lib/libc/locale/iswctype.c
135
iswspace(wint_t c)
lib/libc/locale/iswctype.c
137
return (__isctype_w((c), _RUNETYPE_S));
lib/libc/locale/iswctype.c
142
iswupper(wint_t c)
lib/libc/locale/iswctype.c
144
return (__isctype_w((c), _RUNETYPE_U));
lib/libc/locale/iswctype.c
149
iswxdigit(wint_t c)
lib/libc/locale/iswctype.c
151
return (__isctype_w((c), _RUNETYPE_X));
lib/libc/locale/iswctype.c
155
towupper(wint_t c)
lib/libc/locale/iswctype.c
157
return (__toupper_w(c));
lib/libc/locale/iswctype.c
161
towlower(wint_t c)
lib/libc/locale/iswctype.c
163
return (__tolower_w(c));
lib/libc/locale/iswctype.c
168
wcwidth(wchar_t c)
lib/libc/locale/iswctype.c
170
if (c == L'\0')
lib/libc/locale/iswctype.c
172
if (__isctype_w((c), _RUNETYPE_R))
lib/libc/locale/iswctype.c
173
return (((unsigned)__runetype_w(c) & _RUNETYPE_SWM) >>
lib/libc/locale/iswctype.c
196
towctrans(wint_t c, wctrans_t desc)
lib/libc/locale/iswctype.c
200
return (c);
lib/libc/locale/iswctype.c
202
return (_towctrans(c, (_WCTransEntry *)desc));
lib/libc/locale/iswctype.c
207
iswctype(wint_t c, wctype_t charclass)
lib/libc/locale/iswctype.c
217
return (__isctype_w(c, ((_WCTypeEntry *)charclass)->te_mask));
lib/libc/locale/iswctype.c
54
__runetype_w(wint_t c)
lib/libc/locale/iswctype.c
58
return (_RUNE_ISCACHED(c) ?
lib/libc/locale/iswctype.c
59
rl->rl_runetype[c] : ___runetype_mb(c, rl));
lib/libc/locale/iswctype.c
63
__isctype_w(wint_t c, _RuneType f)
lib/libc/locale/iswctype.c
65
return (!!(__runetype_w(c) & f));
lib/libc/locale/iswctype.c
69
__toupper_w(wint_t c)
lib/libc/locale/iswctype.c
71
return (_towctrans(c, _wctrans_upper(_CurrentRuneLocale())));
lib/libc/locale/iswctype.c
75
__tolower_w(wint_t c)
lib/libc/locale/iswctype.c
77
return (_towctrans(c, _wctrans_lower(_CurrentRuneLocale())));
lib/libc/locale/iswctype.c
81
iswalnum(wint_t c)
lib/libc/locale/iswctype.c
83
return (__isctype_w((c), _RUNETYPE_A|_RUNETYPE_D));
lib/libc/locale/iswctype.c
87
iswalpha(wint_t c)
lib/libc/locale/iswctype.c
89
return (__isctype_w((c), _RUNETYPE_A));
lib/libc/locale/iswctype.c
93
iswblank(wint_t c)
lib/libc/locale/iswctype.c
95
return (__isctype_w((c), _RUNETYPE_B));
lib/libc/locale/iswctype.c
99
iswcntrl(wint_t c)
lib/libc/locale/iswctype_l.c
101
iswcntrl_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
103
return __isctype_wl(c, _RUNETYPE_C, locale);
lib/libc/locale/iswctype_l.c
107
iswdigit_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
109
return __isctype_wl(c, _RUNETYPE_D, locale);
lib/libc/locale/iswctype_l.c
113
iswgraph_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
115
return __isctype_wl(c, _RUNETYPE_G, locale);
lib/libc/locale/iswctype_l.c
119
iswlower_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
121
return __isctype_wl(c, _RUNETYPE_L, locale);
lib/libc/locale/iswctype_l.c
125
iswprint_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
127
return __isctype_wl(c, _RUNETYPE_R, locale);
lib/libc/locale/iswctype_l.c
131
iswpunct_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
133
return __isctype_wl(c, _RUNETYPE_P, locale);
lib/libc/locale/iswctype_l.c
137
iswspace_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
139
return __isctype_wl(c, _RUNETYPE_S, locale);
lib/libc/locale/iswctype_l.c
143
iswupper_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
145
return __isctype_wl(c, _RUNETYPE_U, locale);
lib/libc/locale/iswctype_l.c
149
iswxdigit_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
151
return __isctype_wl(c, _RUNETYPE_X, locale);
lib/libc/locale/iswctype_l.c
155
towupper_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
157
return _towctrans(c, _wctrans_upper(__runelocale(locale)));
lib/libc/locale/iswctype_l.c
161
towlower_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
163
return _towctrans(c, _wctrans_lower(__runelocale(locale)));
lib/libc/locale/iswctype_l.c
191
towctrans_l(wint_t c, wctrans_t desc,
lib/libc/locale/iswctype_l.c
194
return towctrans(c, desc);
lib/libc/locale/iswctype_l.c
198
iswctype_l(wint_t c, wctype_t charclass, locale_t locale)
lib/libc/locale/iswctype_l.c
203
return __isctype_wl(c, ((_WCTypeEntry *)charclass)->te_mask, locale);
lib/libc/locale/iswctype_l.c
72
__isctype_wl(wint_t c, _RuneType f, locale_t locale)
lib/libc/locale/iswctype_l.c
78
rt = _RUNE_ISCACHED(c) ? rl->rl_runetype[c] : ___runetype_mb(c, rl);
lib/libc/locale/iswctype_l.c
83
iswalnum_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
85
return __isctype_wl(c, _RUNETYPE_A|_RUNETYPE_D, locale);
lib/libc/locale/iswctype_l.c
89
iswalpha_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
91
return __isctype_wl(c, _RUNETYPE_A, locale);
lib/libc/locale/iswctype_l.c
95
iswblank_l(wint_t c, locale_t locale)
lib/libc/locale/iswctype_l.c
97
return __isctype_wl(c, _RUNETYPE_B, locale);
lib/libc/locale/runetype.h
48
#define _RUNE_ISCACHED(c) ((c)>=0 && (c)<_CACHED_RUNES)
lib/libc/locale/wctob.c
34
wctob(wint_t c)
lib/libc/locale/wctob.c
40
if (c == WEOF || wcrtomb(buf, c, &mbs) != 1)
lib/libc/net/inet_addr.c
100
c = *++cp;
lib/libc/net/inet_addr.c
101
if (c == 'x' || c == 'X')
lib/libc/net/inet_addr.c
102
base = 16, c = *++cp;
lib/libc/net/inet_addr.c
107
if (isascii((unsigned char)c) &&
lib/libc/net/inet_addr.c
108
isdigit((unsigned char)c)) {
lib/libc/net/inet_addr.c
109
val = (val * base) + (c - '0');
lib/libc/net/inet_addr.c
110
c = *++cp;
lib/libc/net/inet_addr.c
112
isascii((unsigned char)c) &&
lib/libc/net/inet_addr.c
113
isxdigit((unsigned char)c)) {
lib/libc/net/inet_addr.c
115
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
lib/libc/net/inet_addr.c
116
c = *++cp;
lib/libc/net/inet_addr.c
120
if (c == '.') {
lib/libc/net/inet_addr.c
130
c = *++cp;
lib/libc/net/inet_addr.c
137
if (c != '\0' &&
lib/libc/net/inet_addr.c
138
(!isascii((unsigned char)c) || !isspace((unsigned char)c)))
lib/libc/net/inet_addr.c
85
char c;
lib/libc/net/inet_addr.c
89
c = *cp;
lib/libc/net/inet_addr.c
96
if (!isdigit((unsigned char)c))
lib/libc/net/inet_addr.c
99
if (c == '0') {
lib/libc/net/inet_network.c
45
u_char c;
lib/libc/net/inet_network.c
55
while ((c = *cp)) {
lib/libc/net/inet_network.c
56
if (isdigit(c)) {
lib/libc/net/inet_network.c
57
val = (val * base) + (c - '0');
lib/libc/net/inet_network.c
61
if (base == 16 && isxdigit(c)) {
lib/libc/net/inet_network.c
62
val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A'));
lib/libc/net/rcmd.c
271
if ((numread = read(s, &c, 1)) != 1) {
lib/libc/net/rcmd.c
277
if (c != 0) {
lib/libc/net/rcmd.c
278
while (read(s, &c, 1) == 1) {
lib/libc/net/rcmd.c
279
(void)write(STDERR_FILENO, &c, 1);
lib/libc/net/rcmd.c
280
if (c == '\n')
lib/libc/net/rcmd.c
72
char c, *p;
lib/libc/net/res_comp.c
114
if (((c = *cp++) == '.') || (c == '\\')) {
lib/libc/net/res_comp.c
119
*dn++ = c;
lib/libc/net/res_comp.c
169
int c, l;
lib/libc/net/res_comp.c
185
for (c = *dn++; c != '\0'; ) {
lib/libc/net/res_comp.c
203
if (c == '.') {
lib/libc/net/res_comp.c
204
c = *dn++;
lib/libc/net/res_comp.c
207
if (c == '\\') {
lib/libc/net/res_comp.c
208
if ((c = *dn++) == '\0')
lib/libc/net/res_comp.c
216
*cp++ = c;
lib/libc/net/res_comp.c
217
} while ((c = *dn++) != '\0');
lib/libc/net/res_comp.c
219
if ((l = cp - sp - 1) == 0 && c == '\0') {
lib/libc/net/res_comp.c
333
#define hyphenchar(c) ((c) == 0x2d)
lib/libc/net/res_comp.c
334
#define bslashchar(c) ((c) == 0x5c)
lib/libc/net/res_comp.c
335
#define underscorechar(c) ((c) == 0x5f)
lib/libc/net/res_comp.c
336
#define periodchar(c) ((c) == PERIOD)
lib/libc/net/res_comp.c
337
#define asterchar(c) ((c) == 0x2a)
lib/libc/net/res_comp.c
338
#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
lib/libc/net/res_comp.c
339
|| ((c) >= 0x61 && (c) <= 0x7a))
lib/libc/net/res_comp.c
340
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
lib/libc/net/res_comp.c
342
#define borderchar(c) (alphachar(c) || digitchar(c))
lib/libc/net/res_comp.c
343
#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
lib/libc/net/res_comp.c
344
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
lib/libc/net/res_comp.c
81
int n, c;
lib/libc/regex/engine.c
1004
#define PNONCHAR(c) \
lib/libc/regex/engine.c
1005
((c) - OUT < (sizeof(nonchars)/sizeof(nonchars[0])) \
lib/libc/regex/engine.c
1006
? nonchars[(c) - OUT] : "invalid")
lib/libc/regex/engine.c
106
#define NONCHAR(c) ((c) > CHAR_MAX)
lib/libc/regex/engine.c
120
#define SP(t, s, c) print(m, t, s, c, stdout)
lib/libc/regex/engine.c
125
#define SP(t, s, c) /* nothing */
lib/libc/regex/engine.c
681
int c;
lib/libc/regex/engine.c
688
c = OUT;
lib/libc/regex/engine.c
690
c = *(start-1);
lib/libc/regex/engine.c
700
lastc = c;
lib/libc/regex/engine.c
701
c = (p == m->endp) ? OUT : *p;
lib/libc/regex/engine.c
713
if ((c == '\n' && m->g->cflags®_NEWLINE) ||
lib/libc/regex/engine.c
714
(c == OUT && !(m->eflags®_NOTEOL)) ) {
lib/libc/regex/engine.c
722
SP("boleol", st, c);
lib/libc/regex/engine.c
727
(c != OUT && ISWORD(c)))
lib/libc/regex/engine.c
730
(flagch == EOL || (c != OUT && !ISWORD(c))))
lib/libc/regex/engine.c
734
SP("boweow", st, c);
lib/libc/regex/engine.c
744
assert(c != OUT);
lib/libc/regex/engine.c
745
st = step(m->g, startst, stopst, tmp, c, st);
lib/libc/regex/engine.c
746
SP("aft", st, c);
lib/libc/regex/engine.c
770
int c;
lib/libc/regex/engine.c
777
c = OUT;
lib/libc/regex/engine.c
779
c = *(start-1);
lib/libc/regex/engine.c
789
lastc = c;
lib/libc/regex/engine.c
790
c = (p == m->endp) ? OUT : *p;
lib/libc/regex/engine.c
800
if ((c == '\n' && m->g->cflags®_NEWLINE) ||
lib/libc/regex/engine.c
801
(c == OUT && !(m->eflags®_NOTEOL))) {
lib/libc/regex/engine.c
809
SP("sboleol", st, c);
lib/libc/regex/engine.c
814
(c != OUT && ISWORD(c)))
lib/libc/regex/engine.c
817
(flagch == EOL || (c != OUT && !ISWORD(c))))
lib/libc/regex/engine.c
821
SP("sboweow", st, c);
lib/libc/regex/engine.c
833
assert(c != OUT);
lib/libc/regex/engine.c
834
st = step(m->g, startst, stopst, tmp, c, st);
lib/libc/regex/engine.c
835
SP("saft", st, c);
lib/libc/regex/regcomp.c
112
#define SEE(c) (MORE() && PEEK() == (c))
lib/libc/regex/regcomp.c
114
#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
lib/libc/regex/regcomp.c
238
char c;
lib/libc/regex/regcomp.c
247
while (MORE() && (c = PEEK()) != '|' && c != stop)
lib/libc/regex/regcomp.c
281
char c;
lib/libc/regex/regcomp.c
289
c = GETNEXT();
lib/libc/regex/regcomp.c
292
switch (c) {
lib/libc/regex/regcomp.c
339
c = GETNEXT();
lib/libc/regex/regcomp.c
340
backslash(p, c);
lib/libc/regex/regcomp.c
348
ordinary(p, c);
lib/libc/regex/regcomp.c
354
c = PEEK();
lib/libc/regex/regcomp.c
356
if (!( c == '*' || c == '+' || c == '?' ||
lib/libc/regex/regcomp.c
357
(c == '{' && MORE2() && isdigit((uch)PEEK2())) ))
lib/libc/regex/regcomp.c
362
switch (c) {
lib/libc/regex/regcomp.c
405
c = PEEK();
lib/libc/regex/regcomp.c
406
if (!( c == '*' || c == '+' || c == '?' ||
lib/libc/regex/regcomp.c
407
(c == '{' && MORE2() && isdigit((uch)PEEK2())) ) )
lib/libc/regex/regcomp.c
468
int c;
lib/libc/regex/regcomp.c
479
c = GETNEXT();
lib/libc/regex/regcomp.c
480
if (c == '\\') {
lib/libc/regex/regcomp.c
482
c = BACKSL | GETNEXT();
lib/libc/regex/regcomp.c
484
switch (c) {
lib/libc/regex/regcomp.c
532
i = (c&~BACKSL) - '0';
lib/libc/regex/regcomp.c
552
ordinary(p, (char)c);
lib/libc/regex/regcomp.c
579
} else if (c == '$') /* $ (but not \$) ends it */
lib/libc/regex/regcomp.c
687
char c;
lib/libc/regex/regcomp.c
694
c = (MORE2()) ? PEEK2() : '\0';
lib/libc/regex/regcomp.c
701
c = '\0';
lib/libc/regex/regcomp.c
705
switch (c) {
lib/libc/regex/regcomp.c
709
c = PEEK();
lib/libc/regex/regcomp.c
710
REQUIRE(c != '-' && c != ']', REG_ECTYPE);
lib/libc/regex/regcomp.c
718
c = PEEK();
lib/libc/regex/regcomp.c
719
REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
lib/libc/regex/regcomp.c
754
char c;
lib/libc/regex/regcomp.c
769
while ((c = *u++) != '\0')
lib/libc/regex/regcomp.c
770
CHadd(cs, c);
lib/libc/regex/regcomp.c
781
char c;
lib/libc/regex/regcomp.c
783
c = p_b_coll_elem(p, '=');
lib/libc/regex/regcomp.c
784
CHadd(cs, c);
lib/libc/regex/regex2.h
112
CHadd(cset *cs, char c)
lib/libc/regex/regex2.h
114
cs->ptr[(uch)c] |= cs->mask;
lib/libc/regex/regex2.h
115
cs->hash += c;
lib/libc/regex/regex2.h
119
CHsub(cset *cs, char c)
lib/libc/regex/regex2.h
121
cs->ptr[(uch)c] &= ~cs->mask;
lib/libc/regex/regex2.h
122
cs->hash -= c;
lib/libc/regex/regex2.h
126
CHIN(const cset *cs, char c)
lib/libc/regex/regex2.h
128
return (cs->ptr[(uch)c] & cs->mask) != 0;
lib/libc/regex/regex2.h
161
#define ISWORD(c) (isalnum(c) || (c) == '_')
lib/libc/regex/utils.h
54
#define memmove(d, s, c) bcopy(s, d, c)
lib/libc/rpc/svc_tcp.c
262
u_char c = (u_char)opts.ipopt_list[i];
lib/libc/rpc/svc_tcp.c
263
if (c == IPOPT_LSRR || c == IPOPT_SSRR) {
lib/libc/rpc/svc_tcp.c
267
if (c == IPOPT_EOL)
lib/libc/rpc/svc_tcp.c
269
i += (c == IPOPT_NOP) ? 1 :
lib/libc/rpc/xdr_array.c
103
for (i = 0; (i < c) && stat; i++) {
lib/libc/rpc/xdr_array.c
66
u_int nodesize, c, i;
lib/libc/rpc/xdr_array.c
73
c = *sizep;
lib/libc/rpc/xdr_array.c
74
if ((c > maxsize || c > UINT_MAX/elsize) &&
lib/libc/rpc/xdr_array.c
77
nodesize = c * elsize;
lib/libc/rpc/xdr_array.c
86
if (c == 0)
lib/libc/stdio/fgetwc.c
53
char c;
lib/libc/stdio/fgetwc.c
60
c = ch;
lib/libc/stdio/fgetwc.c
61
size = mbrtowc(&wc, &c, 1, &fp->_mbstate_in);
lib/libc/stdio/fputc.c
38
fputc(int c, FILE *fp)
lib/libc/stdio/fputc.c
40
return (putc(c, fp));
lib/libc/stdio/getc.c
57
int c;
lib/libc/stdio/getc.c
60
c = __sgetc(fp);
lib/libc/stdio/getc.c
62
return (c);
lib/libc/stdio/putc.c
43
putc_unlocked(int c, FILE *fp)
lib/libc/stdio/putc.c
48
return (__sputc(c, fp));
lib/libc/stdio/putc.c
58
putc(int c, FILE *fp)
lib/libc/stdio/putc.c
63
ret = putc_unlocked(c, fp);
lib/libc/stdio/putchar.c
41
putchar_unlocked(int c)
lib/libc/stdio/putchar.c
45
return (putc_unlocked(c,so));
lib/libc/stdio/putchar.c
55
putchar(int c)
lib/libc/stdio/putchar.c
59
return (putc(c, so));
lib/libc/stdio/puts.c
45
size_t c = strlen(s);
lib/libc/stdio/puts.c
51
iov[0].iov_len = c;
lib/libc/stdio/puts.c
54
uio.uio_resid = c + 1;
lib/libc/stdio/ungetc.c
105
c = (unsigned char)c;
lib/libc/stdio/ungetc.c
114
*--fp->_p = c;
lib/libc/stdio/ungetc.c
117
return (c);
lib/libc/stdio/ungetc.c
127
fp->_p[-1] == c) {
lib/libc/stdio/ungetc.c
140
fp->_ubuf[sizeof(fp->_ubuf) - 1] = c;
lib/libc/stdio/ungetc.c
144
return (c);
lib/libc/stdio/ungetc.c
79
ungetc(int c, FILE *fp)
lib/libc/stdio/ungetc.c
81
if (c == EOF)
lib/libc/stdio/vfprintf.c
249
#define to_digit(c) ((c) - '0')
lib/libc/stdio/vfprintf.c
250
#define is_digit(c) ((unsigned)to_digit(c) <= 9)
lib/libc/stdio/vfscanf.c
103
int c; /* character from format, or conversion */
lib/libc/stdio/vfscanf.c
130
c = *fmt++;
lib/libc/stdio/vfscanf.c
131
if (c == 0)
lib/libc/stdio/vfscanf.c
133
if (isspace(c)) {
lib/libc/stdio/vfscanf.c
139
if (c != '%')
lib/libc/stdio/vfscanf.c
147
again: c = *fmt++;
lib/libc/stdio/vfscanf.c
148
switch (c) {
lib/libc/stdio/vfscanf.c
153
if (*fp->_p != c)
lib/libc/stdio/vfscanf.c
196
width = width * 10 + c - '0';
lib/libc/stdio/vfscanf.c
210
c = CT_INT;
lib/libc/stdio/vfscanf.c
215
c = CT_INT;
lib/libc/stdio/vfscanf.c
223
c = CT_INT;
lib/libc/stdio/vfscanf.c
229
c = CT_INT;
lib/libc/stdio/vfscanf.c
237
c = CT_INT;
lib/libc/stdio/vfscanf.c
247
c = CT_FLOAT;
lib/libc/stdio/vfscanf.c
252
c = CT_STRING;
lib/libc/stdio/vfscanf.c
258
c = CT_CCL;
lib/libc/stdio/vfscanf.c
263
c = CT_CHAR;
lib/libc/stdio/vfscanf.c
268
c = CT_INT;
lib/libc/stdio/vfscanf.c
301
if (isupper(c))
lib/libc/stdio/vfscanf.c
303
c = CT_INT;
lib/libc/stdio/vfscanf.c
336
switch (c) {
lib/libc/stdio/vfscanf.c
619
c = *fp->_p;
lib/libc/stdio/vfscanf.c
624
switch (c) {
lib/libc/stdio/vfscanf.c
707
*p++ = c;
lib/libc/stdio/vfscanf.c
724
c = ((u_char *)p)[-1];
lib/libc/stdio/vfscanf.c
725
if (c == 'x' || c == 'X') {
lib/libc/stdio/vfscanf.c
727
(void) ungetc(c, fp);
lib/libc/stdio/vfscanf.c
775
c = *fp->_p;
lib/libc/stdio/vfscanf.c
780
switch (c) {
lib/libc/stdio/vfscanf.c
812
*p++ = c;
lib/libc/stdio/vfscanf.c
831
c = *(u_char *)--p;
lib/libc/stdio/vfscanf.c
832
if (c != 'e' && c != 'E') {
lib/libc/stdio/vfscanf.c
833
(void) ungetc(c, fp);/* sign */
lib/libc/stdio/vfscanf.c
834
c = *(u_char *)--p;
lib/libc/stdio/vfscanf.c
836
(void) ungetc(c, fp);
lib/libc/stdio/vfscanf.c
874
int c, n, v;
lib/libc/stdio/vfscanf.c
877
c = *fmt++; /* first char hat => negated scanset */
lib/libc/stdio/vfscanf.c
878
if (c == '^') {
lib/libc/stdio/vfscanf.c
880
c = *fmt++; /* get new first char */
lib/libc/stdio/vfscanf.c
886
if (c == 0)
lib/libc/stdio/vfscanf.c
898
tab[c] = v; /* take character c */
lib/libc/stdio/vfscanf.c
926
if (n == ']' || n < c) {
lib/libc/stdio/vfscanf.c
927
c = '-';
lib/libc/stdio/vfscanf.c
932
tab[++c] = v;
lib/libc/stdio/vfscanf.c
933
} while (c < n);
lib/libc/stdio/vfscanf.c
942
c = *fmt++;
lib/libc/stdio/vfscanf.c
943
if (c == 0)
lib/libc/stdio/vfscanf.c
945
if (c == ']')
lib/libc/stdio/vfscanf.c
954
c = n;
lib/libc/stdio/vfwprintf.c
255
#define to_digit(c) ((c) - '0')
lib/libc/stdio/vfwprintf.c
256
#define is_digit(c) ((unsigned)to_digit(c) <= 9)
lib/libc/stdio/vfwscanf.c
105
wint_t c; /* character from format, or conversion */
lib/libc/stdio/vfwscanf.c
140
c = *fmt++;
lib/libc/stdio/vfwscanf.c
141
if (c == 0) {
lib/libc/stdio/vfwscanf.c
144
if (iswspace(c)) {
lib/libc/stdio/vfwscanf.c
145
while ((c = __fgetwc_unlock(fp)) != WEOF &&
lib/libc/stdio/vfwscanf.c
146
iswspace(c))
lib/libc/stdio/vfwscanf.c
148
if (c != WEOF)
lib/libc/stdio/vfwscanf.c
149
__ungetwc(c, fp);
lib/libc/stdio/vfwscanf.c
152
if (c != '%')
lib/libc/stdio/vfwscanf.c
160
again: c = *fmt++;
lib/libc/stdio/vfwscanf.c
161
switch (c) {
lib/libc/stdio/vfwscanf.c
166
if (wi != c) {
lib/libc/stdio/vfwscanf.c
210
width = width * 10 + c - '0';
lib/libc/stdio/vfwscanf.c
224
c = CT_INT;
lib/libc/stdio/vfwscanf.c
229
c = CT_INT;
lib/libc/stdio/vfwscanf.c
237
c = CT_INT;
lib/libc/stdio/vfwscanf.c
243
c = CT_INT;
lib/libc/stdio/vfwscanf.c
251
c = CT_INT;
lib/libc/stdio/vfwscanf.c
261
c = CT_FLOAT;
lib/libc/stdio/vfwscanf.c
266
c = CT_STRING;
lib/libc/stdio/vfwscanf.c
283
c = CT_CCL;
lib/libc/stdio/vfwscanf.c
288
c = CT_CHAR;
lib/libc/stdio/vfwscanf.c
293
c = CT_INT;
lib/libc/stdio/vfwscanf.c
327
if (iswupper(c))
lib/libc/stdio/vfwscanf.c
329
c = CT_INT;
lib/libc/stdio/vfwscanf.c
350
switch (c) {
lib/libc/stdio/vfwscanf.c
543
c = __fgetwc_unlock(fp);
lib/libc/stdio/vfwscanf.c
548
switch (c) {
lib/libc/stdio/vfwscanf.c
626
if (c != WEOF)
lib/libc/stdio/vfwscanf.c
627
__ungetwc(c, fp);
lib/libc/stdio/vfwscanf.c
633
*p++ = (wchar_t)c;
lib/libc/stdio/vfwscanf.c
646
c = p[-1];
lib/libc/stdio/vfwscanf.c
647
if (c == 'x' || c == 'X') {
lib/libc/stdio/vfwscanf.c
649
__ungetwc(c, fp);
lib/libc/stdio/vfwscanf.c
692
c = __fgetwc_unlock(fp);
lib/libc/stdio/vfwscanf.c
697
switch (c) {
lib/libc/stdio/vfwscanf.c
731
if (c == decimal_point &&
lib/libc/stdio/vfwscanf.c
738
if (c != WEOF)
lib/libc/stdio/vfwscanf.c
739
__ungetwc(c, fp);
lib/libc/stdio/vfwscanf.c
742
*p++ = c;
lib/libc/stdio/vfwscanf.c
757
c = *--p;
lib/libc/stdio/vfwscanf.c
758
if (c != 'e' && c != 'E') {
lib/libc/stdio/vfwscanf.c
759
__ungetwc(c, fp);/* sign */
lib/libc/stdio/vfwscanf.c
760
c = *--p;
lib/libc/stdio/vfwscanf.c
762
__ungetwc(c, fp);
lib/libc/stdio/wbuf.c
43
__swbuf(int c, FILE *fp)
lib/libc/stdio/wbuf.c
58
c = (unsigned char)c;
lib/libc/stdio/wbuf.c
76
*fp->_p++ = c;
lib/libc/stdio/wbuf.c
77
if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n'))
lib/libc/stdio/wbuf.c
80
return (c);
lib/libc/stdlib/ecvt.c
34
char *p, *rve, c;
lib/libc/stdlib/ecvt.c
67
c = *p;
lib/libc/stdlib/ecvt.c
69
return(c == 'I' ? "inf" : "nan");
lib/libc/stdlib/getopt_long.c
111
int c;
lib/libc/stdlib/getopt_long.c
113
c = a % b;
lib/libc/stdlib/getopt_long.c
114
while (c != 0) {
lib/libc/stdlib/getopt_long.c
116
b = c;
lib/libc/stdlib/getopt_long.c
117
c = a % b;
lib/libc/stdlib/qsort.c
117
med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *))
lib/libc/stdlib/qsort.c
120
(cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
lib/libc/stdlib/qsort.c
121
:(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c ));
lib/libc/stdlib/radixsort.c
100
int c;
lib/libc/stdlib/radixsort.c
125
int c;
lib/libc/stdlib/radixsort.c
146
c = tr[(*ak++)[i]];
lib/libc/stdlib/radixsort.c
147
if (++count[c] == 1 && c != endch) {
lib/libc/stdlib/radixsort.c
148
if (c < bmin)
lib/libc/stdlib/radixsort.c
149
bmin = c;
lib/libc/stdlib/radixsort.c
201
for (aj = a; aj < an; *aj = r, aj += count[c], count[c] = 0)
lib/libc/stdlib/radixsort.c
202
for (r = *aj; aj < (ak = --top[c = tr[r[i]]]);)
lib/libc/stdlib/radixsort.c
213
int c;
lib/libc/stdlib/radixsort.c
231
c = tr[(*ak)[i]];
lib/libc/stdlib/radixsort.c
232
if (++count[c] == 1 && c != endch) {
lib/libc/stdlib/radixsort.c
233
if (c < bmin)
lib/libc/stdlib/radixsort.c
234
bmin = c;
lib/libc/stdlib/radixsort.c
257
if ((c = *cp) > 1) {
lib/libc/stdlib/radixsort.c
258
if (c > bigc) {
lib/libc/stdlib/radixsort.c
259
bigc = c;
lib/libc/stdlib/radixsort.c
262
push(ak, c, i+1);
lib/libc/stdlib/radixsort.c
264
top[cp-count] = ak += c;
lib/libc/stdlib/radixsort.c
68
for (c = 0; c < endch; c++) \
lib/libc/stdlib/radixsort.c
69
tr0[c] = c + 1; \
lib/libc/stdlib/radixsort.c
70
tr0[c] = 0; \
lib/libc/stdlib/radixsort.c
71
for (c++; c < 256; c++) \
lib/libc/stdlib/radixsort.c
72
tr0[c] = c; \
lib/libc/stdlib/radixsort.c
88
int c;
lib/libc/stdlib/strtoimax.c
114
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtoimax.c
115
if (isdigit(c))
lib/libc/stdlib/strtoimax.c
116
c -= '0';
lib/libc/stdlib/strtoimax.c
117
else if (isalpha(c))
lib/libc/stdlib/strtoimax.c
118
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtoimax.c
121
if (c >= base)
lib/libc/stdlib/strtoimax.c
126
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoimax.c
133
acc -= c;
lib/libc/stdlib/strtoimax.c
136
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoimax.c
143
acc += c;
lib/libc/stdlib/strtoimax.c
46
int c;
lib/libc/stdlib/strtoimax.c
67
c = (unsigned char) *s++;
lib/libc/stdlib/strtoimax.c
68
} while (isspace(c));
lib/libc/stdlib/strtoimax.c
69
if (c == '-') {
lib/libc/stdlib/strtoimax.c
71
c = *s++;
lib/libc/stdlib/strtoimax.c
74
if (c == '+')
lib/libc/stdlib/strtoimax.c
75
c = *s++;
lib/libc/stdlib/strtoimax.c
77
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtoimax.c
79
c = s[1];
lib/libc/stdlib/strtoimax.c
84
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtol.c
114
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtol.c
115
if (isdigit(c))
lib/libc/stdlib/strtol.c
116
c -= '0';
lib/libc/stdlib/strtol.c
117
else if (isalpha(c))
lib/libc/stdlib/strtol.c
118
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtol.c
121
if (c >= base)
lib/libc/stdlib/strtol.c
126
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtol.c
133
acc -= c;
lib/libc/stdlib/strtol.c
136
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtol.c
143
acc += c;
lib/libc/stdlib/strtol.c
47
int c;
lib/libc/stdlib/strtol.c
68
c = (unsigned char) *s++;
lib/libc/stdlib/strtol.c
69
} while (isspace(c));
lib/libc/stdlib/strtol.c
70
if (c == '-') {
lib/libc/stdlib/strtol.c
72
c = *s++;
lib/libc/stdlib/strtol.c
75
if (c == '+')
lib/libc/stdlib/strtol.c
76
c = *s++;
lib/libc/stdlib/strtol.c
78
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtol.c
80
c = s[1];
lib/libc/stdlib/strtol.c
85
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtoll.c
117
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtoll.c
118
if (isdigit(c))
lib/libc/stdlib/strtoll.c
119
c -= '0';
lib/libc/stdlib/strtoll.c
120
else if (isalpha(c))
lib/libc/stdlib/strtoll.c
121
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtoll.c
124
if (c >= base)
lib/libc/stdlib/strtoll.c
129
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoll.c
136
acc -= c;
lib/libc/stdlib/strtoll.c
139
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoll.c
146
acc += c;
lib/libc/stdlib/strtoll.c
49
int c;
lib/libc/stdlib/strtoll.c
70
c = (unsigned char) *s++;
lib/libc/stdlib/strtoll.c
71
} while (isspace(c));
lib/libc/stdlib/strtoll.c
72
if (c == '-') {
lib/libc/stdlib/strtoll.c
74
c = *s++;
lib/libc/stdlib/strtoll.c
77
if (c == '+')
lib/libc/stdlib/strtoll.c
78
c = *s++;
lib/libc/stdlib/strtoll.c
80
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtoll.c
82
c = s[1];
lib/libc/stdlib/strtoll.c
87
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtoul.c
101
acc += c;
lib/libc/stdlib/strtoul.c
47
int c;
lib/libc/stdlib/strtoul.c
62
c = (unsigned char) *s++;
lib/libc/stdlib/strtoul.c
63
} while (isspace(c));
lib/libc/stdlib/strtoul.c
64
if (c == '-') {
lib/libc/stdlib/strtoul.c
66
c = *s++;
lib/libc/stdlib/strtoul.c
69
if (c == '+')
lib/libc/stdlib/strtoul.c
70
c = *s++;
lib/libc/stdlib/strtoul.c
72
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtoul.c
74
c = s[1];
lib/libc/stdlib/strtoul.c
79
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtoul.c
83
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtoul.c
84
if (isdigit(c))
lib/libc/stdlib/strtoul.c
85
c -= '0';
lib/libc/stdlib/strtoul.c
86
else if (isalpha(c))
lib/libc/stdlib/strtoul.c
87
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtoul.c
90
if (c >= base)
lib/libc/stdlib/strtoul.c
94
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoull.c
103
acc += c;
lib/libc/stdlib/strtoull.c
49
int c;
lib/libc/stdlib/strtoull.c
64
c = (unsigned char) *s++;
lib/libc/stdlib/strtoull.c
65
} while (isspace(c));
lib/libc/stdlib/strtoull.c
66
if (c == '-') {
lib/libc/stdlib/strtoull.c
68
c = *s++;
lib/libc/stdlib/strtoull.c
71
if (c == '+')
lib/libc/stdlib/strtoull.c
72
c = *s++;
lib/libc/stdlib/strtoull.c
74
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtoull.c
76
c = s[1];
lib/libc/stdlib/strtoull.c
81
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtoull.c
85
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtoull.c
86
if (isdigit(c))
lib/libc/stdlib/strtoull.c
87
c -= '0';
lib/libc/stdlib/strtoull.c
88
else if (isalpha(c))
lib/libc/stdlib/strtoull.c
89
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtoull.c
92
if (c >= base)
lib/libc/stdlib/strtoull.c
96
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/stdlib/strtoumax.c
100
acc += c;
lib/libc/stdlib/strtoumax.c
46
int c;
lib/libc/stdlib/strtoumax.c
61
c = (unsigned char) *s++;
lib/libc/stdlib/strtoumax.c
62
} while (isspace(c));
lib/libc/stdlib/strtoumax.c
63
if (c == '-') {
lib/libc/stdlib/strtoumax.c
65
c = *s++;
lib/libc/stdlib/strtoumax.c
68
if (c == '+')
lib/libc/stdlib/strtoumax.c
69
c = *s++;
lib/libc/stdlib/strtoumax.c
71
if ((base == 0 || base == 16) && c == '0' &&
lib/libc/stdlib/strtoumax.c
73
c = s[1];
lib/libc/stdlib/strtoumax.c
78
base = c == '0' ? 8 : 10;
lib/libc/stdlib/strtoumax.c
82
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
lib/libc/stdlib/strtoumax.c
83
if (isdigit(c))
lib/libc/stdlib/strtoumax.c
84
c -= '0';
lib/libc/stdlib/strtoumax.c
85
else if (isalpha(c))
lib/libc/stdlib/strtoumax.c
86
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
lib/libc/stdlib/strtoumax.c
89
if (c >= base)
lib/libc/stdlib/strtoumax.c
93
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
lib/libc/string/memccpy.c
35
memccpy(void *t, const void *f, int c, size_t n)
lib/libc/string/memccpy.c
41
unsigned char uc = c;
lib/libc/string/memchr.c
37
memchr(const void *s, int c, size_t n)
lib/libc/string/memchr.c
43
if (*p++ == (unsigned char)c)
lib/libc/string/memrchr.c
26
memrchr(const void *s, int c, size_t n)
lib/libc/string/memrchr.c
33
if (*(--cp) == (unsigned char)c)
lib/libc/string/memset.c
37
memset(void *dst, int c, size_t n)
lib/libc/string/memset.c
43
*d++ = (unsigned char)c;
lib/libc/string/strcasestr.c
45
char c, sc;
lib/libc/string/strcasestr.c
48
if ((c = *find++) != 0) {
lib/libc/string/strcasestr.c
49
c = (char)tolower((unsigned char)c);
lib/libc/string/strcasestr.c
55
} while ((char)tolower((unsigned char)sc) != c);
lib/libc/string/strcspn.c
43
char c, sc;
lib/libc/string/strcspn.c
50
c = *p++;
lib/libc/string/strcspn.c
53
if ((sc = *spanp++) == c)
lib/libc/string/strpbrk.c
40
int c, sc;
lib/libc/string/strpbrk.c
42
while ((c = *s1++) != 0) {
lib/libc/string/strpbrk.c
44
if (sc == c)
lib/libc/string/strsep.c
50
int c, sc;
lib/libc/string/strsep.c
56
c = *s++;
lib/libc/string/strsep.c
59
if ((sc = *spanp++) == c) {
lib/libc/string/strsep.c
60
if (c == 0)
lib/libc/string/strspn.c
40
char c, sc;
lib/libc/string/strspn.c
46
c = *p++;
lib/libc/string/strspn.c
48
if (sc == c)
lib/libc/string/strtok.c
45
int c, sc;
lib/libc/string/strtok.c
55
c = *s++;
lib/libc/string/strtok.c
57
if (c == sc)
lib/libc/string/strtok.c
61
if (c == 0) { /* no non-delimiter characters */
lib/libc/string/strtok.c
72
c = *s++;
lib/libc/string/strtok.c
75
if ((sc = *spanp++) == c) {
lib/libc/string/strtok.c
76
if (c == 0)
lib/libc/string/wcschr.c
35
wcschr(const wchar_t *s, wchar_t c)
lib/libc/string/wcschr.c
41
if (*p == c) {
lib/libc/string/wcsrchr.c
35
wcsrchr(const wchar_t *s, wchar_t c)
lib/libc/string/wcsrchr.c
43
if (*p == c) {
lib/libc/string/wcstok.c
52
wchar_t c, sc;
lib/libc/string/wcstok.c
62
c = *s++;
lib/libc/string/wcstok.c
64
if (c == sc)
lib/libc/string/wcstok.c
68
if (c == L'\0') { /* no non-delimiter characters */
lib/libc/string/wcstok.c
79
c = *s++;
lib/libc/string/wcstok.c
82
if ((sc = *spanp++) == c) {
lib/libc/string/wcstok.c
83
if (c == L'\0')
lib/libc/string/wmemchr.c
35
wmemchr(const wchar_t *s, wchar_t c, size_t n)
lib/libc/string/wmemchr.c
40
if (*s == c) {
lib/libc/string/wmemset.c
35
wmemset(wchar_t *s, wchar_t c, size_t n)
lib/libc/string/wmemset.c
42
*p = c;
lib/libc/termios/tcflow.c
40
u_char c;
lib/libc/termios/tcflow.c
51
c = term.c_cc[action == TCIOFF ? VSTOP : VSTART];
lib/libc/termios/tcflow.c
52
if (c != _POSIX_VDISABLE &&
lib/libc/termios/tcflow.c
53
HIDDEN(write)(fd, &c, sizeof(c)) == -1)
lib/libc/time/localtime.c
628
char c;
lib/libc/time/localtime.c
630
while ((c = *strp) != '\0' && !isdigit((unsigned char)c) &&
lib/libc/time/localtime.c
631
c != ',' && c != '-' && c != '+')
lib/libc/time/localtime.c
648
int c;
lib/libc/time/localtime.c
650
while ((c = *strp) != '\0' && c != delim)
lib/libc/time/localtime.c
665
char c;
lib/libc/time/localtime.c
668
if (strp == NULL || !isdigit((unsigned char)(c = *strp)))
lib/libc/time/localtime.c
672
num = num * 10 + (c - '0');
lib/libc/time/localtime.c
675
c = *++strp;
lib/libc/time/localtime.c
676
} while (isdigit((unsigned char)c));
lib/libc/time/strptime.c
109
while ((c = *fmt) != '\0') {
lib/libc/time/strptime.c
114
if (isspace(c)) {
lib/libc/time/strptime.c
122
if ((c = *fmt++) != '%')
lib/libc/time/strptime.c
126
again: switch (c = *fmt++) {
lib/libc/time/strptime.c
129
if (c != *bp++)
lib/libc/time/strptime.c
641
const char * const *n2, int c)
lib/libc/time/strptime.c
648
for (i = 0; i < c; i++, n1++) {
lib/libc/time/strptime.c
95
unsigned char c;
lib/libc/uuid/uuid_to_string.c
49
int c;
lib/libc/uuid/uuid_to_string.c
62
c = asprintf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
lib/libc/uuid/uuid_to_string.c
67
if (c == -1 && status != NULL)
lib/libcrypto/arc4random/getentropy_osx.c
62
#define SHA512_Update(a, b, c) (CC_SHA512_Update((a), (b), (c)))
lib/libcrypto/asn1/a_bitstr.c
157
unsigned char *c;
lib/libcrypto/asn1/a_bitstr.c
179
if ((c = recallocarray(a->data, a->length, w + 1, 1)) == NULL) {
lib/libcrypto/asn1/a_bitstr.c
183
a->data = c;
lib/libcrypto/asn1/a_print.c
66
int c;
lib/libcrypto/asn1/a_print.c
76
c= *(s++);
lib/libcrypto/asn1/a_print.c
77
if (!(((c >= 'a') && (c <= 'z')) ||
lib/libcrypto/asn1/a_print.c
78
((c >= 'A') && (c <= 'Z')) ||
lib/libcrypto/asn1/a_print.c
79
(c == ' ') ||
lib/libcrypto/asn1/a_print.c
80
((c >= '0') && (c <= '9')) ||
lib/libcrypto/asn1/a_print.c
81
(c == ' ') || (c == '\'') ||
lib/libcrypto/asn1/a_print.c
82
(c == '(') || (c == ')') ||
lib/libcrypto/asn1/a_print.c
83
(c == '+') || (c == ',') ||
lib/libcrypto/asn1/a_print.c
84
(c == '-') || (c == '.') ||
lib/libcrypto/asn1/a_print.c
85
(c == '/') || (c == ':') ||
lib/libcrypto/asn1/a_print.c
86
(c == '=') || (c == '?')))
lib/libcrypto/asn1/a_print.c
88
if (c & 0x80)
lib/libcrypto/asn1/a_strex.c
122
do_esc_char(unsigned long c, unsigned char flags, char *do_quotes,
lib/libcrypto/asn1/a_strex.c
128
if (c > 0xffffffffL)
lib/libcrypto/asn1/a_strex.c
130
if (c > 0xffff) {
lib/libcrypto/asn1/a_strex.c
131
snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
lib/libcrypto/asn1/a_strex.c
136
if (c > 0xff) {
lib/libcrypto/asn1/a_strex.c
137
snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
lib/libcrypto/asn1/a_strex.c
142
chtmp = (unsigned char)c;
lib/libcrypto/asn1/a_strex.c
195
unsigned long c;
lib/libcrypto/asn1/a_strex.c
207
c = ((unsigned long)*p++) << 24;
lib/libcrypto/asn1/a_strex.c
208
c |= ((unsigned long)*p++) << 16;
lib/libcrypto/asn1/a_strex.c
209
c |= ((unsigned long)*p++) << 8;
lib/libcrypto/asn1/a_strex.c
210
c |= *p++;
lib/libcrypto/asn1/a_strex.c
211
if (c > UNICODE_MAX || UNICODE_IS_SURROGATE(c))
lib/libcrypto/asn1/a_strex.c
216
c = ((unsigned long)*p++) << 8;
lib/libcrypto/asn1/a_strex.c
217
c |= *p++;
lib/libcrypto/asn1/a_strex.c
218
if (UNICODE_IS_SURROGATE(c))
lib/libcrypto/asn1/a_strex.c
223
c = *p++;
lib/libcrypto/asn1/a_strex.c
227
i = UTF8_getc(p, q - p, &c);
lib/libcrypto/asn1/a_strex.c
241
utflen = UTF8_putc(utfbuf, sizeof utfbuf, c);
lib/libcrypto/asn1/a_strex.c
258
len = do_esc_char(c, (unsigned char)(flags | orflags),
lib/libcrypto/asn1/asn_mime.c
1000
char *p, c;
lib/libcrypto/asn1/asn_mime.c
1004
c = *p;
lib/libcrypto/asn1/asn_mime.c
1005
if (c == '\n')
lib/libcrypto/asn1/asn_mime.c
1007
else if (c != '\r')
lib/libcrypto/asn1/asn_mime.c
282
char bound[33], c;
lib/libcrypto/asn1/asn_mime.c
301
c = bound[i] & 0xf;
lib/libcrypto/asn1/asn_mime.c
302
if (c < 10)
lib/libcrypto/asn1/asn_mime.c
303
c += '0';
lib/libcrypto/asn1/asn_mime.c
305
c += 'A' - 10;
lib/libcrypto/asn1/asn_mime.c
306
bound[i] = c;
lib/libcrypto/asn1/asn_mime.c
673
char *p, *q, c;
lib/libcrypto/asn1/asn_mime.c
693
(c = *p) && (c != '\r') && (c != '\n'); p++) {
lib/libcrypto/asn1/asn_mime.c
701
if (c == ':') {
lib/libcrypto/asn1/asn_mime.c
710
if (c == ';') {
lib/libcrypto/asn1/asn_mime.c
722
} else if (c == '(') {
lib/libcrypto/asn1/asn_mime.c
729
if (c == ')') {
lib/libcrypto/asn1/asn_mime.c
735
if (c == '=') {
lib/libcrypto/asn1/asn_mime.c
744
if (c == ';') {
lib/libcrypto/asn1/asn_mime.c
751
} else if (c == '"') {
lib/libcrypto/asn1/asn_mime.c
753
} else if (c == '(') {
lib/libcrypto/asn1/asn_mime.c
760
if (c == '"') {
lib/libcrypto/asn1/asn_mime.c
799
char *p, c;
lib/libcrypto/asn1/asn_mime.c
802
for (p = name; (c = *p); p++) {
lib/libcrypto/asn1/asn_mime.c
803
if (c == '"') {
lib/libcrypto/asn1/asn_mime.c
810
if (!isspace((unsigned char)c))
lib/libcrypto/asn1/asn_mime.c
820
char *p, c;
lib/libcrypto/asn1/asn_mime.c
827
c = *p;
lib/libcrypto/asn1/asn_mime.c
828
if (c == '"') {
lib/libcrypto/asn1/asn_mime.c
834
if (isspace((unsigned char)c))
lib/libcrypto/asn1/tasn_enc.c
569
unsigned char c;
lib/libcrypto/asn1/tasn_enc.c
625
c = (unsigned char)*tbool;
lib/libcrypto/asn1/tasn_enc.c
626
cont = &c;
lib/libcrypto/bf/bf_local.h
102
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
lib/libcrypto/bf/bf_local.h
103
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/bf/bf_local.h
104
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/bf/bf_local.h
105
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libcrypto/bf/bf_local.h
65
#define n2ln(c,l1,l2,n) { \
lib/libcrypto/bf/bf_local.h
66
c+=n; \
lib/libcrypto/bf/bf_local.h
69
case 8: l2 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/bf/bf_local.h
70
case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/bf/bf_local.h
71
case 6: l2|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/bf/bf_local.h
72
case 5: l2|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/bf/bf_local.h
73
case 4: l1 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/bf/bf_local.h
74
case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/bf/bf_local.h
75
case 2: l1|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/bf/bf_local.h
76
case 1: l1|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/bf/bf_local.h
81
#define l2nn(l1,l2,c,n) { \
lib/libcrypto/bf/bf_local.h
82
c+=n; \
lib/libcrypto/bf/bf_local.h
84
case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \
lib/libcrypto/bf/bf_local.h
85
case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
lib/libcrypto/bf/bf_local.h
86
case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
lib/libcrypto/bf/bf_local.h
87
case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
lib/libcrypto/bf/bf_local.h
88
case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \
lib/libcrypto/bf/bf_local.h
89
case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
lib/libcrypto/bf/bf_local.h
90
case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
lib/libcrypto/bf/bf_local.h
91
case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
lib/libcrypto/bf/bf_local.h
96
#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
lib/libcrypto/bf/bf_local.h
97
l|=((unsigned long)(*((c)++)))<<16L, \
lib/libcrypto/bf/bf_local.h
98
l|=((unsigned long)(*((c)++)))<< 8L, \
lib/libcrypto/bf/bf_local.h
99
l|=((unsigned long)(*((c)++))))
lib/libcrypto/bf/blowfish.c
519
unsigned char *iv, c, cc;
lib/libcrypto/bf/blowfish.c
537
c= *(in++)^iv[n];
lib/libcrypto/bf/blowfish.c
538
*(out++) = c;
lib/libcrypto/bf/blowfish.c
539
iv[n] = c;
lib/libcrypto/bf/blowfish.c
558
c = iv[n];
lib/libcrypto/bf/blowfish.c
560
*(out++) = c^cc;
lib/libcrypto/bf/blowfish.c
564
v0 = v1 = ti[0] = ti[1] = t=c = cc = 0;
lib/libcrypto/bio/bio.h
421
#define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
lib/libcrypto/bio/bio.h
422
#define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
lib/libcrypto/bio/bio.h
424
#define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp)
lib/libcrypto/bio/bio.h
445
#define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
lib/libcrypto/bio/bio.h
459
#define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm)
lib/libcrypto/bio/bio.h
476
#define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
lib/libcrypto/bio/bss_acpt.c
166
BIO_ACCEPT *c;
lib/libcrypto/bio/bss_acpt.c
168
c = (BIO_ACCEPT *)bio->ptr;
lib/libcrypto/bio/bss_acpt.c
169
if (c->accept_sock != -1) {
lib/libcrypto/bio/bss_acpt.c
170
shutdown(c->accept_sock, SHUT_RDWR);
lib/libcrypto/bio/bss_acpt.c
171
close(c->accept_sock);
lib/libcrypto/bio/bss_acpt.c
172
c->accept_sock = -1;
lib/libcrypto/bio/bss_acpt.c
197
acpt_state(BIO *b, BIO_ACCEPT *c)
lib/libcrypto/bio/bss_acpt.c
204
switch (c->state) {
lib/libcrypto/bio/bss_acpt.c
206
if (c->param_addr == NULL) {
lib/libcrypto/bio/bss_acpt.c
210
s = BIO_get_accept_socket(c->param_addr, c->bind_mode);
lib/libcrypto/bio/bss_acpt.c
214
if (c->accept_nbio) {
lib/libcrypto/bio/bss_acpt.c
221
c->accept_sock = s;
lib/libcrypto/bio/bss_acpt.c
223
c->state = ACPT_S_GET_ACCEPT_SOCKET;
lib/libcrypto/bio/bss_acpt.c
228
c->state = ACPT_S_OK;
lib/libcrypto/bio/bss_acpt.c
233
i = BIO_accept(c->accept_sock, &(c->addr));
lib/libcrypto/bio/bss_acpt.c
252
if (c->nbio) {
lib/libcrypto/bio/bss_acpt.c
261
if (c->bio_chain != NULL) {
lib/libcrypto/bio/bss_acpt.c
262
if ((dbio = BIO_dup_chain(c->bio_chain)) == NULL)
lib/libcrypto/bio/bss_acpt.c
271
c->state = ACPT_S_OK;
lib/libcrypto/bio/bss_acpt.c
281
c->state = ACPT_S_GET_ACCEPT_SOCKET;
lib/libcrypto/bio/bss_acpt.c
96
static int acpt_state(BIO *b, BIO_ACCEPT *c);
lib/libcrypto/bio/bss_conn.c
106
static int conn_state(BIO *b, BIO_CONNECT *c);
lib/libcrypto/bio/bss_conn.c
124
conn_state(BIO *b, BIO_CONNECT *c)
lib/libcrypto/bio/bss_conn.c
131
if (c->info_callback != NULL)
lib/libcrypto/bio/bss_conn.c
132
cb = c->info_callback;
lib/libcrypto/bio/bss_conn.c
135
switch (c->state) {
lib/libcrypto/bio/bss_conn.c
137
p = c->param_hostname;
lib/libcrypto/bio/bss_conn.c
156
free(c->param_port);
lib/libcrypto/bio/bss_conn.c
157
c->param_port = strdup(p);
lib/libcrypto/bio/bss_conn.c
161
if (c->param_port == NULL) {
lib/libcrypto/bio/bss_conn.c
164
c->param_hostname);
lib/libcrypto/bio/bss_conn.c
167
c->state = BIO_CONN_S_GET_IP;
lib/libcrypto/bio/bss_conn.c
171
if (BIO_get_host_ip(c->param_hostname, &(c->ip[0])) <= 0)
lib/libcrypto/bio/bss_conn.c
173
c->state = BIO_CONN_S_GET_PORT;
lib/libcrypto/bio/bss_conn.c
177
if (c->param_port == NULL) {
lib/libcrypto/bio/bss_conn.c
180
} else if (BIO_get_port(c->param_port, &c->port) <= 0)
lib/libcrypto/bio/bss_conn.c
182
c->state = BIO_CONN_S_CREATE_SOCKET;
lib/libcrypto/bio/bss_conn.c
187
memset((char *)&c->them, 0, sizeof(c->them));
lib/libcrypto/bio/bss_conn.c
188
c->them.sin_family = AF_INET;
lib/libcrypto/bio/bss_conn.c
189
c->them.sin_port = htons((unsigned short)c->port);
lib/libcrypto/bio/bss_conn.c
191
((unsigned long)c->ip[0] << 24L)|
lib/libcrypto/bio/bss_conn.c
192
((unsigned long)c->ip[1] << 16L)|
lib/libcrypto/bio/bss_conn.c
193
((unsigned long)c->ip[2] << 8L)|
lib/libcrypto/bio/bss_conn.c
194
((unsigned long)c->ip[3]);
lib/libcrypto/bio/bss_conn.c
195
c->them.sin_addr.s_addr = htonl(l);
lib/libcrypto/bio/bss_conn.c
196
c->state = BIO_CONN_S_CREATE_SOCKET;
lib/libcrypto/bio/bss_conn.c
202
c->param_hostname, c->param_port);
lib/libcrypto/bio/bss_conn.c
207
c->state = BIO_CONN_S_NBIO;
lib/libcrypto/bio/bss_conn.c
211
if (c->nbio) {
lib/libcrypto/bio/bss_conn.c
215
c->param_hostname, c->param_port);
lib/libcrypto/bio/bss_conn.c
219
c->state = BIO_CONN_S_CONNECT;
lib/libcrypto/bio/bss_conn.c
227
c->param_hostname, c->param_port);
lib/libcrypto/bio/bss_conn.c
237
(struct sockaddr *)&c->them,
lib/libcrypto/bio/bss_conn.c
238
sizeof(c->them));
lib/libcrypto/bio/bss_conn.c
243
c->state = BIO_CONN_S_BLOCKED_CONNECT;
lib/libcrypto/bio/bss_conn.c
248
c->param_hostname, c->param_port);
lib/libcrypto/bio/bss_conn.c
253
c->state = BIO_CONN_S_OK;
lib/libcrypto/bio/bss_conn.c
262
c->param_hostname, c->param_port);
lib/libcrypto/bio/bss_conn.c
267
c->state = BIO_CONN_S_OK;
lib/libcrypto/bio/bss_conn.c
279
if (!(ret = cb((BIO *)b, c->state, ret)))
lib/libcrypto/bio/bss_conn.c
287
ret = cb((BIO *)b, c->state, ret);
lib/libcrypto/bio/bss_conn.c
346
BIO_CONNECT *c;
lib/libcrypto/bio/bss_conn.c
348
c = (BIO_CONNECT *)bio->ptr;
lib/libcrypto/bio/bss_conn.c
351
if (c->state == BIO_CONN_S_OK)
lib/libcrypto/bn/arch/aarch64/bn_arch.h
130
bn_mulw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/arch/aarch64/bn_arch.h
141
: [a]"r"(a), [b]"r"(b), [c]"r"(c)
lib/libcrypto/bn/arch/aarch64/bn_arch.h
151
bn_mulw_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG d,
lib/libcrypto/bn/arch/aarch64/bn_arch.h
164
: [a]"r"(a), [b]"r"(b), [c]"r"(c), [d]"r"(d)
lib/libcrypto/bn/arch/aarch64/bn_arch.h
225
BN_ULONG c, BN_ULONG *out_r4, BN_ULONG *out_r3, BN_ULONG *out_r2,
lib/libcrypto/bn/arch/aarch64/bn_arch.h
244
: [c]"+&r"(c), [r4]"=&r"(r4), [r3]"=&r"(r3), [r2]"=&r"(r2),
lib/libcrypto/bn/arch/aarch64/bn_arch.h
319
bn_subw_subw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_borrow,
lib/libcrypto/bn/arch/aarch64/bn_arch.h
330
: [a]"r"(a), [b]"r"(b), [c]"r"(c)
lib/libcrypto/bn/arch/aarch64/bn_arch.h
62
bn_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/arch/aarch64/bn_arch.h
73
: [a]"r"(a), [b]"r"(b), [c]"r"(c)
lib/libcrypto/bn/arch/arm/bn_arch.h
50
bn_subw_subw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_borrow,
lib/libcrypto/bn/arch/arm/bn_arch.h
63
: [a]"r"(a), [b]"r"(b), [c]"r"(c)
lib/libcrypto/bn/bn.h
282
void BN_CTX_free(BN_CTX *c);
lib/libcrypto/bn/bn_convert.c
311
uint8_t c;
lib/libcrypto/bn/bn_convert.c
353
if (!CBS_get_last_u8(&cbs, &c))
lib/libcrypto/bn/bn_convert.c
355
if (!started && c == '0')
lib/libcrypto/bn/bn_convert.c
357
if (!CBB_add_u8(&cbb, c))
lib/libcrypto/bn/bn_internal.h
135
bn_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/bn_internal.h
140
r = (BN_ULLONG)a + (BN_ULLONG)b + (BN_ULLONG)c;
lib/libcrypto/bn/bn_internal.h
164
bn_mulw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/bn_internal.h
169
r = (BN_ULLONG)a * (BN_ULLONG)b + (BN_ULLONG)c;
lib/libcrypto/bn/bn_internal.h
179
bn_mulw_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG d,
lib/libcrypto/bn/bn_internal.h
184
r = (BN_ULLONG)a * (BN_ULLONG)b + (BN_ULLONG)c + (BN_ULLONG)d;
lib/libcrypto/bn/bn_internal.h
220
bn_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/bn_internal.h
226
bn_addw(r0, c, &carry, &r0);
lib/libcrypto/bn/bn_internal.h
285
bn_subw_subw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_borrow,
lib/libcrypto/bn/bn_internal.h
291
bn_subw(r0, c, &b2, &r0);
lib/libcrypto/bn/bn_internal.h
454
bn_mulw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG *out_r1,
lib/libcrypto/bn/bn_internal.h
460
bn_addw(r0, c, &carry, &r0);
lib/libcrypto/bn/bn_internal.h
474
bn_mulw_addw_addw(BN_ULONG a, BN_ULONG b, BN_ULONG c, BN_ULONG d,
lib/libcrypto/bn/bn_internal.h
479
bn_mulw_addw(a, b, c, &r1, &r0);
lib/libcrypto/bn/bn_internal.h
547
BN_ULONG c, BN_ULONG *out_r4, BN_ULONG *out_r3, BN_ULONG *out_r2,
lib/libcrypto/bn/bn_internal.h
552
bn_mulw_addw(a0, b, c, &c, &r0);
lib/libcrypto/bn/bn_internal.h
553
bn_mulw_addw(a1, b, c, &c, &r1);
lib/libcrypto/bn/bn_internal.h
554
bn_mulw_addw(a2, b, c, &c, &r2);
lib/libcrypto/bn/bn_internal.h
555
bn_mulw_addw(a3, b, c, &c, &r3);
lib/libcrypto/bn/bn_internal.h
557
*out_r4 = c;
lib/libcrypto/bn/bn_isqrt.c
105
d = c >> s;
lib/libcrypto/bn/bn_isqrt.c
107
if (!BN_rshift(b, n, 2 * c - d - e + 1))
lib/libcrypto/bn/bn_isqrt.c
47
int c, d, e, s;
lib/libcrypto/bn/bn_isqrt.c
82
c = (BN_num_bits(n) - 1) / 2;
lib/libcrypto/bn/bn_isqrt.c
86
if (!BN_set_word(b, c))
lib/libcrypto/bn/bn_rand.c
164
unsigned char c;
lib/libcrypto/bn/bn_rand.c
167
arc4random_buf(&c, 1);
lib/libcrypto/bn/bn_rand.c
168
if (c >= 128 && i > 0)
lib/libcrypto/bn/bn_rand.c
170
else if (c < 42)
lib/libcrypto/bn/bn_rand.c
172
else if (c < 84)
lib/libcrypto/bn/s2n_bignum.h
124
extern uint64_t bignum_cmadd (uint64_t k, uint64_t *z, uint64_t c, uint64_t n, const uint64_t *y);
lib/libcrypto/bn/s2n_bignum.h
128
extern uint64_t bignum_cmnegadd (uint64_t k, uint64_t *z, uint64_t c, uint64_t n, const uint64_t *y);
lib/libcrypto/bn/s2n_bignum.h
136
extern uint64_t bignum_cmul (uint64_t k, uint64_t *z, uint64_t c, uint64_t n, const uint64_t *y);
lib/libcrypto/bn/s2n_bignum.h
140
extern void bignum_cmul_p25519 (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
141
extern void bignum_cmul_p25519_alt (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
145
extern void bignum_cmul_p256 (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
146
extern void bignum_cmul_p256_alt (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
150
extern void bignum_cmul_p256k1 (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
151
extern void bignum_cmul_p256k1_alt (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
155
extern void bignum_cmul_p384 (uint64_t z[S2N_BIGNUM_STATIC 6], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 6]);
lib/libcrypto/bn/s2n_bignum.h
156
extern void bignum_cmul_p384_alt (uint64_t z[S2N_BIGNUM_STATIC 6], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 6]);
lib/libcrypto/bn/s2n_bignum.h
160
extern void bignum_cmul_p521 (uint64_t z[S2N_BIGNUM_STATIC 9], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 9]);
lib/libcrypto/bn/s2n_bignum.h
161
extern void bignum_cmul_p521_alt (uint64_t z[S2N_BIGNUM_STATIC 9], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 9]);
lib/libcrypto/bn/s2n_bignum.h
165
extern void bignum_cmul_sm2 (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
166
extern void bignum_cmul_sm2_alt (uint64_t z[S2N_BIGNUM_STATIC 4], uint64_t c, const uint64_t x[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
437
extern void bignum_madd_n25519 (uint64_t z[S2N_BIGNUM_STATIC 4], const uint64_t x[S2N_BIGNUM_STATIC 4], const uint64_t y[S2N_BIGNUM_STATIC 4], const uint64_t c[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
438
extern void bignum_madd_n25519_alt (uint64_t z[S2N_BIGNUM_STATIC 4], const uint64_t x[S2N_BIGNUM_STATIC 4], const uint64_t y[S2N_BIGNUM_STATIC 4], const uint64_t c[S2N_BIGNUM_STATIC 4]);
lib/libcrypto/bn/s2n_bignum.h
784
extern uint64_t bignum_shl_small (uint64_t k, uint64_t *z, uint64_t n, const uint64_t *x, uint64_t c);
lib/libcrypto/bn/s2n_bignum.h
788
extern uint64_t bignum_shr_small (uint64_t k, uint64_t *z, uint64_t n, const uint64_t *x, uint64_t c);
lib/libcrypto/bn/s2n_bignum.h
957
extern uint64_t edwards25519_decode(uint64_t z[S2N_BIGNUM_STATIC 8], const uint8_t c[S2N_BIGNUM_STATIC 32]);
lib/libcrypto/bn/s2n_bignum.h
958
extern uint64_t edwards25519_decode_alt(uint64_t z[S2N_BIGNUM_STATIC 8], const uint8_t c[S2N_BIGNUM_STATIC 32]);
lib/libcrypto/cast/cast.c
861
unsigned char *iv, c, cc;
lib/libcrypto/cast/cast.c
879
c= *(in++)^iv[n];
lib/libcrypto/cast/cast.c
880
*(out++) = c;
lib/libcrypto/cast/cast.c
881
iv[n] = c;
lib/libcrypto/cast/cast.c
900
c = iv[n];
lib/libcrypto/cast/cast.c
902
*(out++) = c^cc;
lib/libcrypto/cast/cast.c
906
v0 = v1 = ti[0] = ti[1] = t=c = cc = 0;
lib/libcrypto/cast/cast_local.h
100
case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
lib/libcrypto/cast/cast_local.h
101
case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
lib/libcrypto/cast/cast_local.h
102
case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
lib/libcrypto/cast/cast_local.h
103
case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
lib/libcrypto/cast/cast_local.h
108
#define n2ln(c,l1,l2,n) { \
lib/libcrypto/cast/cast_local.h
109
c+=n; \
lib/libcrypto/cast/cast_local.h
112
case 8: l2 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/cast/cast_local.h
113
case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/cast/cast_local.h
114
case 6: l2|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/cast/cast_local.h
115
case 5: l2|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/cast/cast_local.h
116
case 4: l1 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/cast/cast_local.h
117
case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/cast/cast_local.h
118
case 2: l1|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/cast/cast_local.h
119
case 1: l1|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/cast/cast_local.h
124
#define l2nn(l1,l2,c,n) { \
lib/libcrypto/cast/cast_local.h
125
c+=n; \
lib/libcrypto/cast/cast_local.h
127
case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \
lib/libcrypto/cast/cast_local.h
128
case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
lib/libcrypto/cast/cast_local.h
129
case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
lib/libcrypto/cast/cast_local.h
130
case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
lib/libcrypto/cast/cast_local.h
131
case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \
lib/libcrypto/cast/cast_local.h
132
case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
lib/libcrypto/cast/cast_local.h
133
case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
lib/libcrypto/cast/cast_local.h
134
case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
lib/libcrypto/cast/cast_local.h
139
#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
lib/libcrypto/cast/cast_local.h
140
l|=((unsigned long)(*((c)++)))<<16L, \
lib/libcrypto/cast/cast_local.h
141
l|=((unsigned long)(*((c)++)))<< 8L, \
lib/libcrypto/cast/cast_local.h
142
l|=((unsigned long)(*((c)++))))
lib/libcrypto/cast/cast_local.h
145
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
lib/libcrypto/cast/cast_local.h
146
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/cast/cast_local.h
147
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/cast/cast_local.h
148
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libcrypto/cast/cast_local.h
201
CAST_LONG a,b,c,d; \
lib/libcrypto/cast/cast_local.h
206
c=CAST_S_table2[(t>>24)&0xff]; \
lib/libcrypto/cast/cast_local.h
208
L^=(((((a OP2 b)&0xffffffffL) OP3 c)&0xffffffffL) OP1 d)&0xffffffffL; \
lib/libcrypto/cast/cast_local.h
63
#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
lib/libcrypto/cast/cast_local.h
64
l|=((unsigned long)(*((c)++)))<< 8L, \
lib/libcrypto/cast/cast_local.h
65
l|=((unsigned long)(*((c)++)))<<16L, \
lib/libcrypto/cast/cast_local.h
66
l|=((unsigned long)(*((c)++)))<<24L)
lib/libcrypto/cast/cast_local.h
70
#define c2ln(c,l1,l2,n) { \
lib/libcrypto/cast/cast_local.h
71
c+=n; \
lib/libcrypto/cast/cast_local.h
74
case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
lib/libcrypto/cast/cast_local.h
75
case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
lib/libcrypto/cast/cast_local.h
76
case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
lib/libcrypto/cast/cast_local.h
77
case 5: l2|=((unsigned long)(*(--(c)))); \
lib/libcrypto/cast/cast_local.h
78
case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
lib/libcrypto/cast/cast_local.h
79
case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
lib/libcrypto/cast/cast_local.h
80
case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
lib/libcrypto/cast/cast_local.h
81
case 1: l1|=((unsigned long)(*(--(c)))); \
lib/libcrypto/cast/cast_local.h
86
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
lib/libcrypto/cast/cast_local.h
87
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/cast/cast_local.h
88
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/cast/cast_local.h
89
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
lib/libcrypto/cast/cast_local.h
93
#define l2cn(l1,l2,c,n) { \
lib/libcrypto/cast/cast_local.h
94
c+=n; \
lib/libcrypto/cast/cast_local.h
96
case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
lib/libcrypto/cast/cast_local.h
97
case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
lib/libcrypto/cast/cast_local.h
98
case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
lib/libcrypto/cast/cast_local.h
99
case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
lib/libcrypto/chacha/chacha-merged.c
119
chacha_encrypt_bytes(chacha_ctx *x, const u8 *m, u8 *c, u32 bytes)
lib/libcrypto/chacha/chacha-merged.c
154
ctarget = c;
lib/libcrypto/chacha/chacha-merged.c
155
c = tmp;
lib/libcrypto/chacha/chacha-merged.c
245
U32TO8_LITTLE(c + 0, x0);
lib/libcrypto/chacha/chacha-merged.c
246
U32TO8_LITTLE(c + 4, x1);
lib/libcrypto/chacha/chacha-merged.c
247
U32TO8_LITTLE(c + 8, x2);
lib/libcrypto/chacha/chacha-merged.c
248
U32TO8_LITTLE(c + 12, x3);
lib/libcrypto/chacha/chacha-merged.c
249
U32TO8_LITTLE(c + 16, x4);
lib/libcrypto/chacha/chacha-merged.c
250
U32TO8_LITTLE(c + 20, x5);
lib/libcrypto/chacha/chacha-merged.c
251
U32TO8_LITTLE(c + 24, x6);
lib/libcrypto/chacha/chacha-merged.c
252
U32TO8_LITTLE(c + 28, x7);
lib/libcrypto/chacha/chacha-merged.c
253
U32TO8_LITTLE(c + 32, x8);
lib/libcrypto/chacha/chacha-merged.c
254
U32TO8_LITTLE(c + 36, x9);
lib/libcrypto/chacha/chacha-merged.c
255
U32TO8_LITTLE(c + 40, x10);
lib/libcrypto/chacha/chacha-merged.c
256
U32TO8_LITTLE(c + 44, x11);
lib/libcrypto/chacha/chacha-merged.c
257
U32TO8_LITTLE(c + 48, x12);
lib/libcrypto/chacha/chacha-merged.c
258
U32TO8_LITTLE(c + 52, x13);
lib/libcrypto/chacha/chacha-merged.c
259
U32TO8_LITTLE(c + 56, x14);
lib/libcrypto/chacha/chacha-merged.c
260
U32TO8_LITTLE(c + 60, x15);
lib/libcrypto/chacha/chacha-merged.c
265
ctarget[i] = c[i];
lib/libcrypto/chacha/chacha-merged.c
273
c += 64;
lib/libcrypto/chacha/chacha-merged.c
32
u8 *c, u32 bytes)
lib/libcrypto/chacha/chacha-merged.c
61
#define ROTATE(v,c) (ROTL32(v,c))
lib/libcrypto/chacha/chacha-merged.c
66
#define QUARTERROUND(a,b,c,d) \
lib/libcrypto/chacha/chacha-merged.c
68
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
lib/libcrypto/chacha/chacha-merged.c
70
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
lib/libcrypto/cmac/cm_pmeth.c
179
const EVP_CIPHER *c;
lib/libcrypto/cmac/cm_pmeth.c
181
c = EVP_get_cipherbyname(value);
lib/libcrypto/cmac/cm_pmeth.c
182
if (!c)
lib/libcrypto/cmac/cm_pmeth.c
184
return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_CIPHER, -1, (void *)c);
lib/libcrypto/conf/conf.h
125
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
lib/libcrypto/conf/conf_def.c
629
def_is_number(const CONF *conf, char c)
lib/libcrypto/conf/conf_def.c
631
return IS_NUMBER(conf, c);
lib/libcrypto/conf/conf_def.c
635
def_to_int(const CONF *conf, char c)
lib/libcrypto/conf/conf_def.c
637
return c - '0';
lib/libcrypto/conf/conf_def.h
84
#define KEYTYPES(c) (CONF_type_default)
lib/libcrypto/conf/conf_def.h
85
#define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
lib/libcrypto/conf/conf_def.h
86
#define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
lib/libcrypto/conf/conf_def.h
87
#define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF)
lib/libcrypto/conf/conf_def.h
88
#define IS_ESC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ESC)
lib/libcrypto/conf/conf_def.h
89
#define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
lib/libcrypto/conf/conf_def.h
90
#define IS_WS(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_WS)
lib/libcrypto/conf/conf_def.h
91
#define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
lib/libcrypto/conf/conf_def.h
92
#define IS_ALPHA_NUMERIC_PUNCT(c,a) \
lib/libcrypto/conf/conf_def.h
93
(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
lib/libcrypto/conf/conf_def.h
94
#define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
lib/libcrypto/conf/conf_def.h
95
#define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
lib/libcrypto/conf/conf_def.h
96
#define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
lib/libcrypto/conf/conf_local.h
74
int (*is_number)(const CONF *conf, char c);
lib/libcrypto/conf/conf_local.h
75
int (*to_int)(const CONF *conf, char c);
lib/libcrypto/ct/ct_local.h
78
#define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \
lib/libcrypto/ct/ct_local.h
79
c[1]=(unsigned char)(((s) )&0xff)),c+=2)
lib/libcrypto/ct/ct_local.h
81
#define l2n3(l,c) ((c[0]=(unsigned char)(((l)>>16)&0xff), \
lib/libcrypto/ct/ct_local.h
82
c[1]=(unsigned char)(((l)>> 8)&0xff), \
lib/libcrypto/ct/ct_local.h
83
c[2]=(unsigned char)(((l) )&0xff)),c+=3)
lib/libcrypto/ct/ct_local.h
85
#define l2n8(l,c) (*((c)++)=(unsigned char)(((l)>>56)&0xff), \
lib/libcrypto/ct/ct_local.h
86
*((c)++)=(unsigned char)(((l)>>48)&0xff), \
lib/libcrypto/ct/ct_local.h
87
*((c)++)=(unsigned char)(((l)>>40)&0xff), \
lib/libcrypto/ct/ct_local.h
88
*((c)++)=(unsigned char)(((l)>>32)&0xff), \
lib/libcrypto/ct/ct_local.h
89
*((c)++)=(unsigned char)(((l)>>24)&0xff), \
lib/libcrypto/ct/ct_local.h
90
*((c)++)=(unsigned char)(((l)>>16)&0xff), \
lib/libcrypto/ct/ct_local.h
91
*((c)++)=(unsigned char)(((l)>> 8)&0xff), \
lib/libcrypto/ct/ct_local.h
92
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libcrypto/curve25519/curve25519.c
1183
static uint8_t equal(signed char b, signed char c) {
lib/libcrypto/curve25519/curve25519.c
1185
uint8_t uc = c;
lib/libcrypto/curve25519/curve25519.c
4149
const uint8_t *c)
lib/libcrypto/curve25519/curve25519.c
4175
int64_t c0 = 2097151 & load_3(c);
lib/libcrypto/curve25519/curve25519.c
4176
int64_t c1 = 2097151 & (load_4(c + 2) >> 5);
lib/libcrypto/curve25519/curve25519.c
4177
int64_t c2 = 2097151 & (load_3(c + 5) >> 2);
lib/libcrypto/curve25519/curve25519.c
4178
int64_t c3 = 2097151 & (load_4(c + 7) >> 7);
lib/libcrypto/curve25519/curve25519.c
4179
int64_t c4 = 2097151 & (load_4(c + 10) >> 4);
lib/libcrypto/curve25519/curve25519.c
4180
int64_t c5 = 2097151 & (load_3(c + 13) >> 1);
lib/libcrypto/curve25519/curve25519.c
4181
int64_t c6 = 2097151 & (load_4(c + 15) >> 6);
lib/libcrypto/curve25519/curve25519.c
4182
int64_t c7 = 2097151 & (load_3(c + 18) >> 3);
lib/libcrypto/curve25519/curve25519.c
4183
int64_t c8 = 2097151 & load_3(c + 21);
lib/libcrypto/curve25519/curve25519.c
4184
int64_t c9 = 2097151 & (load_4(c + 23) >> 5);
lib/libcrypto/curve25519/curve25519.c
4185
int64_t c10 = 2097151 & (load_3(c + 26) >> 2);
lib/libcrypto/curve25519/curve25519.c
4186
int64_t c11 = (load_4(c + 28) >> 7);
lib/libcrypto/des/des.c
152
unsigned char *iv, c, cc;
lib/libcrypto/des/des.c
172
c = *(in++) ^ iv[n];
lib/libcrypto/des/des.c
173
*(out++) = c;
lib/libcrypto/des/des.c
174
iv[n] = c;
lib/libcrypto/des/des.c
195
c = iv[n];
lib/libcrypto/des/des.c
197
*(out++) = c ^ cc;
lib/libcrypto/des/des.c
201
v0 = v1 = ti[0] = ti[1] = c = cc = 0;
lib/libcrypto/des/des.c
334
unsigned char *iv, c, cc;
lib/libcrypto/des/des.c
352
c = *(in++) ^ iv[n];
lib/libcrypto/des/des.c
353
*(out++) = c;
lib/libcrypto/des/des.c
354
iv[n] = c;
lib/libcrypto/des/des.c
373
c = iv[n];
lib/libcrypto/des/des.c
375
*(out++) = c ^ cc;
lib/libcrypto/des/des.c
379
v0 = v1 = ti[0] = ti[1] = c = cc = 0;
lib/libcrypto/des/des_fcrypt.c
180
unsigned char c, u;
lib/libcrypto/des/des_fcrypt.c
199
c = *(buf++);
lib/libcrypto/des/des_fcrypt.c
200
if (!c)
lib/libcrypto/des/des_fcrypt.c
202
key[i] = (c << 1);
lib/libcrypto/des/des_fcrypt.c
218
c = 0;
lib/libcrypto/des/des_fcrypt.c
220
c <<= 1;
lib/libcrypto/des/des_fcrypt.c
222
c |= 1;
lib/libcrypto/des/des_fcrypt.c
229
ret[i] = cov_2char[c];
lib/libcrypto/des/des_key.c
343
DES_LONG c, d, t, s, t2;
lib/libcrypto/des/des_key.c
351
c2l(in, c);
lib/libcrypto/des/des_key.c
357
PERM_OP(d, c, t, 4, 0x0f0f0f0fL);
lib/libcrypto/des/des_key.c
358
HPERM_OP(c, t, -2, 0xcccc0000L);
lib/libcrypto/des/des_key.c
360
PERM_OP(d, c, t, 1, 0x55555555L);
lib/libcrypto/des/des_key.c
361
PERM_OP(c, d, t, 8, 0x00ff00ffL);
lib/libcrypto/des/des_key.c
362
PERM_OP(d, c, t, 1, 0x55555555L);
lib/libcrypto/des/des_key.c
364
((d & 0x00ff0000L) >> 16L)|((c & 0xf0000000L) >> 4L));
lib/libcrypto/des/des_key.c
365
c &= 0x0fffffffL;
lib/libcrypto/des/des_key.c
369
c = ((c >> 2L)|(c << 26L));
lib/libcrypto/des/des_key.c
372
c = ((c >> 1L)|(c << 27L));
lib/libcrypto/des/des_key.c
375
c &= 0x0fffffffL;
lib/libcrypto/des/des_key.c
379
s = des_skb[0][(c)&0x3f]|
lib/libcrypto/des/des_key.c
380
des_skb[1][((c >> 6L) & 0x03)|((c >> 7L) & 0x3c)]|
lib/libcrypto/des/des_key.c
381
des_skb[2][((c >> 13L) & 0x0f)|((c >> 14L) & 0x30)]|
lib/libcrypto/des/des_key.c
382
des_skb[3][((c >> 20L) & 0x01)|((c >> 21L) & 0x06) |
lib/libcrypto/des/des_key.c
383
((c >> 22L) & 0x38)];
lib/libcrypto/des/des_local.h
100
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/des/des_local.h
101
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
lib/libcrypto/des/des_local.h
104
#define l2cn(l1,l2,c,n) { \
lib/libcrypto/des/des_local.h
105
c+=n; \
lib/libcrypto/des/des_local.h
107
case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff);\
lib/libcrypto/des/des_local.h
108
case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff);\
lib/libcrypto/des/des_local.h
109
case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff);\
lib/libcrypto/des/des_local.h
110
case 5: *(--(c))=(unsigned char)(((l2) )&0xff);\
lib/libcrypto/des/des_local.h
111
case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff);\
lib/libcrypto/des/des_local.h
112
case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff);\
lib/libcrypto/des/des_local.h
113
case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff);\
lib/libcrypto/des/des_local.h
114
case 1: *(--(c))=(unsigned char)(((l1) )&0xff);\
lib/libcrypto/des/des_local.h
138
#define LOAD_DATA_tmp(a,b,c,d,e,f) LOAD_DATA(a,b,c,d,e,f,g)
lib/libcrypto/des/des_local.h
77
#define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \
lib/libcrypto/des/des_local.h
78
l|=((DES_LONG)(*((c)++)))<< 8L, \
lib/libcrypto/des/des_local.h
79
l|=((DES_LONG)(*((c)++)))<<16L, \
lib/libcrypto/des/des_local.h
80
l|=((DES_LONG)(*((c)++)))<<24L)
lib/libcrypto/des/des_local.h
83
#define c2ln(c,l1,l2,n) { \
lib/libcrypto/des/des_local.h
84
c+=n; \
lib/libcrypto/des/des_local.h
87
case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \
lib/libcrypto/des/des_local.h
88
case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \
lib/libcrypto/des/des_local.h
89
case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \
lib/libcrypto/des/des_local.h
90
case 5: l2|=((DES_LONG)(*(--(c)))); \
lib/libcrypto/des/des_local.h
91
case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \
lib/libcrypto/des/des_local.h
92
case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \
lib/libcrypto/des/des_local.h
93
case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \
lib/libcrypto/des/des_local.h
94
case 1: l1|=((DES_LONG)(*(--(c)))); \
lib/libcrypto/des/des_local.h
98
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
lib/libcrypto/des/des_local.h
99
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/dsa/dsa_gen.c
111
BIGNUM *r0, *W, *X, *c, *test;
lib/libcrypto/dsa/dsa_gen.c
164
if ((c = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
276
if (!BN_mod_ct(c, X, r0, ctx))
lib/libcrypto/dsa/dsa_gen.c
278
if (!BN_sub(r0, c, BN_value_one()))
lib/libcrypto/ec/ecp_methods.c
1033
#define EC_POINT_CSWAP(c, a, b, w, t) do { \
lib/libcrypto/ec/ecp_methods.c
1034
if (!BN_swap_ct(c, (a)->X, (b)->X, w) || \
lib/libcrypto/ec/ecp_methods.c
1035
!BN_swap_ct(c, (a)->Y, (b)->Y, w) || \
lib/libcrypto/ec/ecp_methods.c
1036
!BN_swap_ct(c, (a)->Z, (b)->Z, w)) \
lib/libcrypto/ec/ecp_methods.c
1038
t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
lib/libcrypto/err/err.h
133
#define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e)
lib/libcrypto/err/err.h
135
#define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0)
lib/libcrypto/evp/bio_enc.c
406
BIO_set_cipher(BIO *bio, const EVP_CIPHER *c, const unsigned char *k,
lib/libcrypto/evp/bio_enc.c
419
if (cb(bio, BIO_CB_CTRL, (const char *)c, BIO_CTRL_SET, e, 0L) <= 0)
lib/libcrypto/evp/bio_enc.c
425
if (!EVP_CipherInit_ex(ctx->cipher_ctx, c, NULL, k, i, e))
lib/libcrypto/evp/bio_enc.c
429
return cb(bio, BIO_CB_CTRL, (const char *)c, BIO_CTRL_SET, e, 1L);
lib/libcrypto/evp/e_aes.c
1029
aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_aes.c
1031
EVP_AES_XTS_CTX *xctx = c->cipher_data;
lib/libcrypto/evp/e_aes.c
1154
aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_aes.c
1156
EVP_AES_CCM_CTX *cctx = c->cipher_data;
lib/libcrypto/evp/e_aes.c
1184
if ((c->encrypt && ptr) || (!c->encrypt && !ptr))
lib/libcrypto/evp/e_aes.c
1188
memcpy(c->buf, ptr, arg);
lib/libcrypto/evp/e_aes.c
1194
if (!c->encrypt || !cctx->tag_set)
lib/libcrypto/evp/e_aes.c
1621
aes_wrap_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_aes.c
1623
EVP_AES_WRAP_CTX *wctx = c->cipher_data;
lib/libcrypto/evp/e_aes.c
1632
if (c->iv != wctx->iv)
lib/libcrypto/evp/e_aes.c
635
aes_gcm_cleanup(EVP_CIPHER_CTX *c)
lib/libcrypto/evp/e_aes.c
637
EVP_AES_GCM_CTX *gctx = c->cipher_data;
lib/libcrypto/evp/e_aes.c
639
if (gctx->iv != c->iv)
lib/libcrypto/evp/e_aes.c
652
unsigned char c;
lib/libcrypto/evp/e_aes.c
656
c = counter[n];
lib/libcrypto/evp/e_aes.c
657
++c;
lib/libcrypto/evp/e_aes.c
658
counter[n] = c;
lib/libcrypto/evp/e_aes.c
659
if (c)
lib/libcrypto/evp/e_aes.c
665
aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_aes.c
667
EVP_AES_GCM_CTX *gctx = c->cipher_data;
lib/libcrypto/evp/e_aes.c
673
if (c->cipher->iv_len == 0) {
lib/libcrypto/evp/e_aes.c
677
gctx->ivlen = c->cipher->iv_len;
lib/libcrypto/evp/e_aes.c
678
gctx->iv = c->iv;
lib/libcrypto/evp/e_aes.c
693
if (gctx->iv != c->iv)
lib/libcrypto/evp/e_aes.c
703
if (arg <= 0 || arg > 16 || c->encrypt)
lib/libcrypto/evp/e_aes.c
705
memcpy(c->buf, ptr, arg);
lib/libcrypto/evp/e_aes.c
710
if (arg <= 0 || arg > 16 || !c->encrypt || gctx->taglen < 0)
lib/libcrypto/evp/e_aes.c
712
memcpy(ptr, c->buf, arg);
lib/libcrypto/evp/e_aes.c
729
if (c->encrypt)
lib/libcrypto/evp/e_aes.c
750
if (gctx->iv_gen == 0 || gctx->key_set == 0 || c->encrypt)
lib/libcrypto/evp/e_aes.c
761
memcpy(c->buf, ptr, arg);
lib/libcrypto/evp/e_aes.c
764
unsigned int len = c->buf[arg - 2] << 8 |
lib/libcrypto/evp/e_aes.c
765
c->buf[arg - 1];
lib/libcrypto/evp/e_aes.c
773
if (!c->encrypt) {
lib/libcrypto/evp/e_aes.c
778
c->buf[arg - 2] = len >> 8;
lib/libcrypto/evp/e_aes.c
779
c->buf[arg - 1] = len & 0xff;
lib/libcrypto/evp/e_aes.c
795
if (gctx->iv == c->iv) {
lib/libcrypto/evp/e_des.c
179
unsigned char c[1], d[1];
lib/libcrypto/evp/e_des.c
188
c[0] = (in[n / 8] & (1 << (7 - n % 8))) ? 0x80 : 0;
lib/libcrypto/evp/e_des.c
189
DES_cfb_encrypt(c, d, 1, 1, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
83
des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_des3.c
108
des3_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_des3.c
116
if (c->key_len >= 16 && DES_random_key(deskey + 1) == 0)
lib/libcrypto/evp/e_des3.c
118
if (c->key_len >= 24 && DES_random_key(deskey + 2) == 0)
lib/libcrypto/evp/e_des3.c
217
unsigned char c[1], d[1];
lib/libcrypto/evp/e_des3.c
224
c[0] = (in[n/8]&(1 << (7 - n % 8))) ? 0x80 : 0;
lib/libcrypto/evp/e_des3.c
225
DES_ede3_cfb_encrypt(c, d, 1, 1,
lib/libcrypto/evp/e_rc2.c
340
rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
lib/libcrypto/evp/e_rc2.c
349
l = EVP_CIPHER_CTX_iv_length(c);
lib/libcrypto/evp/e_rc2.c
360
if (i > 0 && !EVP_CipherInit_ex(c, NULL, NULL, NULL, iv, -1))
lib/libcrypto/evp/e_rc2.c
362
if (EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS,
lib/libcrypto/evp/e_rc2.c
365
if (!EVP_CIPHER_CTX_set_key_length(c, key_bits / 8))
lib/libcrypto/evp/e_rc2.c
372
rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
lib/libcrypto/evp/e_rc2.c
378
num = rc2_meth_to_magic(c);
lib/libcrypto/evp/e_rc2.c
379
j = EVP_CIPHER_CTX_iv_length(c);
lib/libcrypto/evp/e_rc2.c
380
if (j < 0 || j > sizeof(c->oiv))
lib/libcrypto/evp/e_rc2.c
382
i = ASN1_TYPE_set_int_octetstring(type, num, c->oiv, j);
lib/libcrypto/evp/e_rc2.c
388
rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
lib/libcrypto/evp/e_rc2.c
392
data(c)->key_bits = EVP_CIPHER_CTX_key_length(c) * 8;
lib/libcrypto/evp/e_rc2.c
396
*(int *)ptr = data(c)->key_bits;
lib/libcrypto/evp/e_rc2.c
401
data(c)->key_bits = arg;
lib/libcrypto/evp/e_rc2.c
77
static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
lib/libcrypto/evp/e_rc2.c
78
static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
lib/libcrypto/evp/e_rc2.c
79
static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr);
lib/libcrypto/evp/evp.h
380
#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
lib/libcrypto/evp/evp.h
418
#define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c)
lib/libcrypto/evp/evp.h
420
#define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
lib/libcrypto/evp/evp.h
421
#define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c)
lib/libcrypto/evp/evp.h
423
#define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
lib/libcrypto/evp/evp.h
424
#define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e)
lib/libcrypto/evp/evp.h
425
#define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e)
lib/libcrypto/evp/evp.h
426
#define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
lib/libcrypto/evp/evp.h
427
#define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
lib/libcrypto/evp/evp.h
436
int EVP_Cipher(EVP_CIPHER_CTX *c, unsigned char *out, const unsigned char *in,
lib/libcrypto/evp/evp.h
553
int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
lib/libcrypto/evp/evp.h
561
int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
lib/libcrypto/evp/evp_encode.c
370
int i, ret = 0, a, b, c, d;
lib/libcrypto/evp/evp_encode.c
390
c = conv_ascii2bin(*(f++));
lib/libcrypto/evp/evp_encode.c
393
(c & 0x80) || (d & 0x80))
lib/libcrypto/evp/evp_encode.c
397
(((unsigned long)c) << 6L) |
lib/libcrypto/evp/evp_pbe.c
420
ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de)
lib/libcrypto/evp/evp_pbe.c
464
pbe2->keyfunc->parameter, c, md, en_de);
lib/libcrypto/evp/evp_pbe.c
507
ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de)
lib/libcrypto/evp/evp_pbe.c
79
ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de);
lib/libcrypto/evp/evp_pbe.c
84
ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de);
lib/libcrypto/hmac/hmac.c
256
HMAC_CTX c;
lib/libcrypto/hmac/hmac.c
263
HMAC_CTX_init(&c);
lib/libcrypto/hmac/hmac.c
264
if (!HMAC_Init_ex(&c, key, key_len, evp_md, NULL))
lib/libcrypto/hmac/hmac.c
266
if (!HMAC_Update(&c, d, n))
lib/libcrypto/hmac/hmac.c
268
if (!HMAC_Final(&c, md, md_len))
lib/libcrypto/hmac/hmac.c
270
HMAC_CTX_cleanup(&c);
lib/libcrypto/hmac/hmac.c
273
HMAC_CTX_cleanup(&c);
lib/libcrypto/idea/idea.c
192
unsigned char *iv, c, cc;
lib/libcrypto/idea/idea.c
210
c = *(in++) ^ iv[n];
lib/libcrypto/idea/idea.c
211
*(out++) = c;
lib/libcrypto/idea/idea.c
212
iv[n] = c;
lib/libcrypto/idea/idea.c
231
c = iv[n];
lib/libcrypto/idea/idea.c
233
*(out++) = c ^ cc;
lib/libcrypto/idea/idea.c
237
v0 = v1 = ti[0] = ti[1] = t = c = cc = 0;
lib/libcrypto/idea/idea_local.h
102
#define l2nn(l1,l2,c,n) { \
lib/libcrypto/idea/idea_local.h
103
c+=n; \
lib/libcrypto/idea/idea_local.h
105
case 8: *(--(c))=(unsigned char)(((l2) )&0xff);\
lib/libcrypto/idea/idea_local.h
106
case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff);\
lib/libcrypto/idea/idea_local.h
107
case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff);\
lib/libcrypto/idea/idea_local.h
108
case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff);\
lib/libcrypto/idea/idea_local.h
109
case 4: *(--(c))=(unsigned char)(((l1) )&0xff);\
lib/libcrypto/idea/idea_local.h
110
case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff);\
lib/libcrypto/idea/idea_local.h
111
case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff);\
lib/libcrypto/idea/idea_local.h
112
case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff);\
lib/libcrypto/idea/idea_local.h
117
#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
lib/libcrypto/idea/idea_local.h
118
l|=((unsigned long)(*((c)++)))<<16L, \
lib/libcrypto/idea/idea_local.h
119
l|=((unsigned long)(*((c)++)))<< 8L, \
lib/libcrypto/idea/idea_local.h
120
l|=((unsigned long)(*((c)++))))
lib/libcrypto/idea/idea_local.h
123
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
lib/libcrypto/idea/idea_local.h
124
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/idea/idea_local.h
125
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/idea/idea_local.h
126
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libcrypto/idea/idea_local.h
129
#define s2n(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
lib/libcrypto/idea/idea_local.h
130
*((c)++)=(unsigned char)(((l)>> 8L)&0xff))
lib/libcrypto/idea/idea_local.h
133
#define n2s(c,l) (l =((IDEA_INT)(*((c)++)))<< 8L, \
lib/libcrypto/idea/idea_local.h
134
l|=((IDEA_INT)(*((c)++))) )
lib/libcrypto/idea/idea_local.h
86
#define n2ln(c,l1,l2,n) { \
lib/libcrypto/idea/idea_local.h
87
c+=n; \
lib/libcrypto/idea/idea_local.h
90
case 8: l2 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/idea/idea_local.h
91
case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/idea/idea_local.h
92
case 6: l2|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/idea/idea_local.h
93
case 5: l2|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/idea/idea_local.h
94
case 4: l1 =((unsigned long)(*(--(c)))) ; \
lib/libcrypto/idea/idea_local.h
95
case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
lib/libcrypto/idea/idea_local.h
96
case 2: l1|=((unsigned long)(*(--(c))))<<16; \
lib/libcrypto/idea/idea_local.h
97
case 1: l1|=((unsigned long)(*(--(c))))<<24; \
lib/libcrypto/lhash/lhash.c
208
lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
lib/libcrypto/lhash/lhash.c
218
ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
lib/libcrypto/lhash/lhash.c
405
lh_strhash(const char *c)
lib/libcrypto/lhash/lhash.c
411
if (c == NULL || *c == '\0')
lib/libcrypto/lhash/lhash.c
415
while (*c) {
lib/libcrypto/lhash/lhash.c
416
v = n | *c;
lib/libcrypto/lhash/lhash.c
422
c++;
lib/libcrypto/lhash/lhash.h
132
_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
lib/libcrypto/lhash/lhash.h
140
unsigned long lh_strhash(const char *c);
lib/libcrypto/md4/md4.c
102
*a = crypto_rol_u32(*a + md4_g(b, c, d) + x + 0x5a827999UL, s);
lib/libcrypto/md4/md4.c
106
md4_round3(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md4/md4.c
109
*a = crypto_rol_u32(*a + md4_h(b, c, d) + x + 0x6ed9eba1UL, s);
lib/libcrypto/md4/md4.c
113
md4_block_data_order(MD4_CTX *c, const void *_in, size_t num)
lib/libcrypto/md4/md4.c
122
A = c->A;
lib/libcrypto/md4/md4.c
123
B = c->B;
lib/libcrypto/md4/md4.c
124
C = c->C;
lib/libcrypto/md4/md4.c
125
D = c->D;
lib/libcrypto/md4/md4.c
220
c->A += A;
lib/libcrypto/md4/md4.c
221
c->B += B;
lib/libcrypto/md4/md4.c
222
c->C += C;
lib/libcrypto/md4/md4.c
223
c->D += D;
lib/libcrypto/md4/md4.c
228
MD4_Init(MD4_CTX *c)
lib/libcrypto/md4/md4.c
230
memset(c, 0, sizeof(*c));
lib/libcrypto/md4/md4.c
232
c->A = 0x67452301UL;
lib/libcrypto/md4/md4.c
233
c->B = 0xefcdab89UL;
lib/libcrypto/md4/md4.c
234
c->C = 0x98badcfeUL;
lib/libcrypto/md4/md4.c
235
c->D = 0x10325476UL;
lib/libcrypto/md4/md4.c
242
MD4_Update(MD4_CTX *c, const void *data_, size_t len)
lib/libcrypto/md4/md4.c
252
l = (c->Nl + (((MD4_LONG)len) << 3))&0xffffffffUL;
lib/libcrypto/md4/md4.c
255
if (l < c->Nl) /* overflow */
lib/libcrypto/md4/md4.c
256
c->Nh++;
lib/libcrypto/md4/md4.c
257
c->Nh+=(MD4_LONG)(len>>29); /* might cause compiler warning on 16-bit */
lib/libcrypto/md4/md4.c
258
c->Nl = l;
lib/libcrypto/md4/md4.c
260
n = c->num;
lib/libcrypto/md4/md4.c
262
p = (unsigned char *)c->data;
lib/libcrypto/md4/md4.c
266
md4_block_data_order (c, p, 1);
lib/libcrypto/md4/md4.c
270
c->num = 0;
lib/libcrypto/md4/md4.c
274
c->num += (unsigned int)len;
lib/libcrypto/md4/md4.c
281
md4_block_data_order(c, data, n);
lib/libcrypto/md4/md4.c
288
p = (unsigned char *)c->data;
lib/libcrypto/md4/md4.c
289
c->num = (unsigned int)len;
lib/libcrypto/md4/md4.c
297
MD4_Transform(MD4_CTX *c, const unsigned char *data)
lib/libcrypto/md4/md4.c
299
md4_block_data_order(c, data, 1);
lib/libcrypto/md4/md4.c
304
MD4_Final(unsigned char *md, MD4_CTX *c)
lib/libcrypto/md4/md4.c
306
unsigned char *p = (unsigned char *)c->data;
lib/libcrypto/md4/md4.c
307
size_t n = c->num;
lib/libcrypto/md4/md4.c
315
md4_block_data_order(c, p, 1);
lib/libcrypto/md4/md4.c
319
c->data[MD4_LBLOCK - 2] = htole32(c->Nl);
lib/libcrypto/md4/md4.c
320
c->data[MD4_LBLOCK - 1] = htole32(c->Nh);
lib/libcrypto/md4/md4.c
322
md4_block_data_order(c, p, 1);
lib/libcrypto/md4/md4.c
323
c->num = 0;
lib/libcrypto/md4/md4.c
326
crypto_store_htole32(&md[0 * 4], c->A);
lib/libcrypto/md4/md4.c
327
crypto_store_htole32(&md[1 * 4], c->B);
lib/libcrypto/md4/md4.c
328
crypto_store_htole32(&md[2 * 4], c->C);
lib/libcrypto/md4/md4.c
329
crypto_store_htole32(&md[3 * 4], c->D);
lib/libcrypto/md4/md4.c
338
MD4_CTX c;
lib/libcrypto/md4/md4.c
340
if (!MD4_Init(&c))
lib/libcrypto/md4/md4.c
342
MD4_Update(&c, d, n);
lib/libcrypto/md4/md4.c
343
MD4_Final(md, &c);
lib/libcrypto/md4/md4.c
344
explicit_bzero(&c, sizeof(c));
lib/libcrypto/md4/md4.c
92
md4_round1(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md4/md4.c
95
*a = crypto_rol_u32(*a + md4_f(b, c, d) + x, s);
lib/libcrypto/md4/md4.c
99
md4_round2(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md4/md4.h
100
void MD4_Transform(MD4_CTX *c, const unsigned char *b);
lib/libcrypto/md4/md4.h
93
int MD4_Init(MD4_CTX *c);
lib/libcrypto/md4/md4.h
94
int MD4_Update(MD4_CTX *c, const void *data, size_t len)
lib/libcrypto/md4/md4.h
96
int MD4_Final(unsigned char *md, MD4_CTX *c);
lib/libcrypto/md5/md5.c
103
md5_round1(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md5/md5.c
106
*a = b + crypto_rol_u32(*a + md5_F(b, c, d) + x + t, s);
lib/libcrypto/md5/md5.c
110
md5_round2(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md5/md5.c
113
*a = b + crypto_rol_u32(*a + md5_G(b, c, d) + x + t, s);
lib/libcrypto/md5/md5.c
117
md5_round3(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md5/md5.c
120
*a = b + crypto_rol_u32(*a + md5_H(b, c, d) + x + t, s);
lib/libcrypto/md5/md5.c
124
md5_round4(uint32_t *a, uint32_t b, uint32_t c, uint32_t d, uint32_t x,
lib/libcrypto/md5/md5.c
127
*a = b + crypto_rol_u32(*a + md5_I(b, c, d) + x + t, s);
lib/libcrypto/md5/md5.c
131
md5_block_data_order(MD5_CTX *c, const void *_in, size_t num)
lib/libcrypto/md5/md5.c
140
A = c->A;
lib/libcrypto/md5/md5.c
141
B = c->B;
lib/libcrypto/md5/md5.c
142
C = c->C;
lib/libcrypto/md5/md5.c
143
D = c->D;
lib/libcrypto/md5/md5.c
253
c->A += A;
lib/libcrypto/md5/md5.c
254
c->B += B;
lib/libcrypto/md5/md5.c
255
c->C += C;
lib/libcrypto/md5/md5.c
256
c->D += D;
lib/libcrypto/md5/md5.c
262
MD5_Init(MD5_CTX *c)
lib/libcrypto/md5/md5.c
264
memset(c, 0, sizeof(*c));
lib/libcrypto/md5/md5.c
266
c->A = 0x67452301UL;
lib/libcrypto/md5/md5.c
267
c->B = 0xefcdab89UL;
lib/libcrypto/md5/md5.c
268
c->C = 0x98badcfeUL;
lib/libcrypto/md5/md5.c
269
c->D = 0x10325476UL;
lib/libcrypto/md5/md5.c
276
MD5_Update(MD5_CTX *c, const void *data_, size_t len)
lib/libcrypto/md5/md5.c
286
crypto_add_u32dw_u64(&c->Nh, &c->Nl, (uint64_t)len << 3);
lib/libcrypto/md5/md5.c
288
n = c->num;
lib/libcrypto/md5/md5.c
290
p = (unsigned char *)c->data;
lib/libcrypto/md5/md5.c
294
md5_block_data_order(c, p, 1);
lib/libcrypto/md5/md5.c
298
c->num = 0;
lib/libcrypto/md5/md5.c
302
c->num += (unsigned int)len;
lib/libcrypto/md5/md5.c
309
md5_block_data_order(c, data, n);
lib/libcrypto/md5/md5.c
316
p = (unsigned char *)c->data;
lib/libcrypto/md5/md5.c
317
c->num = (unsigned int)len;
lib/libcrypto/md5/md5.c
325
MD5_Transform(MD5_CTX *c, const unsigned char *data)
lib/libcrypto/md5/md5.c
327
md5_block_data_order(c, data, 1);
lib/libcrypto/md5/md5.c
332
MD5_Final(unsigned char *md, MD5_CTX *c)
lib/libcrypto/md5/md5.c
334
unsigned char *p = (unsigned char *)c->data;
lib/libcrypto/md5/md5.c
335
size_t n = c->num;
lib/libcrypto/md5/md5.c
343
md5_block_data_order(c, p, 1);
lib/libcrypto/md5/md5.c
347
c->data[MD5_LBLOCK - 2] = htole32(c->Nl);
lib/libcrypto/md5/md5.c
348
c->data[MD5_LBLOCK - 1] = htole32(c->Nh);
lib/libcrypto/md5/md5.c
350
md5_block_data_order(c, p, 1);
lib/libcrypto/md5/md5.c
351
c->num = 0;
lib/libcrypto/md5/md5.c
354
crypto_store_htole32(&md[0 * 4], c->A);
lib/libcrypto/md5/md5.c
355
crypto_store_htole32(&md[1 * 4], c->B);
lib/libcrypto/md5/md5.c
356
crypto_store_htole32(&md[2 * 4], c->C);
lib/libcrypto/md5/md5.c
357
crypto_store_htole32(&md[3 * 4], c->D);
lib/libcrypto/md5/md5.c
366
MD5_CTX c;
lib/libcrypto/md5/md5.c
368
if (!MD5_Init(&c))
lib/libcrypto/md5/md5.c
370
MD5_Update(&c, d, n);
lib/libcrypto/md5/md5.c
371
MD5_Final(md, &c);
lib/libcrypto/md5/md5.c
372
explicit_bzero(&c, sizeof(c));
lib/libcrypto/md5/md5.c
74
void md5_block_data_order(MD5_CTX *c, const void *p, size_t num);
lib/libcrypto/md5/md5.h
87
int MD5_Init(MD5_CTX *c);
lib/libcrypto/md5/md5.h
88
int MD5_Update(MD5_CTX *c, const void *data, size_t len)
lib/libcrypto/md5/md5.h
90
int MD5_Final(unsigned char *md, MD5_CTX *c);
lib/libcrypto/md5/md5.h
94
void MD5_Transform(MD5_CTX *c, const unsigned char *b);
lib/libcrypto/mlkem/mlkem_internal.c
111
uint16_t c[DEGREE];
lib/libcrypto/mlkem/mlkem_internal.c
269
odd = reduce(step_root * s->c[j + offset]);
lib/libcrypto/mlkem/mlkem_internal.c
270
even = s->c[j];
lib/libcrypto/mlkem/mlkem_internal.c
271
s->c[j] = reduce_once(odd + even);
lib/libcrypto/mlkem/mlkem_internal.c
272
s->c[j + offset] = reduce_once(even - odd +
lib/libcrypto/mlkem/mlkem_internal.c
313
odd = s->c[j + offset];
lib/libcrypto/mlkem/mlkem_internal.c
314
even = s->c[j];
lib/libcrypto/mlkem/mlkem_internal.c
315
s->c[j] = reduce_once(odd + even);
lib/libcrypto/mlkem/mlkem_internal.c
316
s->c[j + offset] = reduce(step_root *
lib/libcrypto/mlkem/mlkem_internal.c
323
s->c[i] = reduce(s->c[i] * kInverseDegree);
lib/libcrypto/mlkem/mlkem_internal.c
343
lhs->c[i] = reduce_once(lhs->c[i] + rhs->c[i]);
lib/libcrypto/mlkem/mlkem_internal.c
353
lhs->c[i] = reduce_once(lhs->c[i] - rhs->c[i] + kPrime);
lib/libcrypto/mlkem/mlkem_internal.c
373
uint32_t real_real = (uint32_t)lhs->c[2 * i] * rhs->c[2 * i];
lib/libcrypto/mlkem/mlkem_internal.c
374
uint32_t img_img = (uint32_t)lhs->c[2 * i + 1] *
lib/libcrypto/mlkem/mlkem_internal.c
375
rhs->c[2 * i + 1];
lib/libcrypto/mlkem/mlkem_internal.c
376
uint32_t real_img = (uint32_t)lhs->c[2 * i] * rhs->c[2 * i + 1];
lib/libcrypto/mlkem/mlkem_internal.c
377
uint32_t img_real = (uint32_t)lhs->c[2 * i + 1] * rhs->c[2 * i];
lib/libcrypto/mlkem/mlkem_internal.c
379
out->c[2 * i] =
lib/libcrypto/mlkem/mlkem_internal.c
382
out->c[2 * i + 1] = reduce(img_real + real_img);
lib/libcrypto/mlkem/mlkem_internal.c
462
out->c[done++] = d1;
lib/libcrypto/mlkem/mlkem_internal.c
465
out->c[done++] = d2;
lib/libcrypto/mlkem/mlkem_internal.c
504
out->c[i] = ((value + kPrime) & mask) | (value & ~mask);
lib/libcrypto/mlkem/mlkem_internal.c
511
out->c[i + 1] = ((value + kPrime) & mask) | (value & ~mask);
lib/libcrypto/mlkem/mlkem_internal.c
567
assert(bits <= (int)sizeof(*s->c) * 8 && bits != 1);
lib/libcrypto/mlkem/mlkem_internal.c
569
uint16_t element = s->c[i];
lib/libcrypto/mlkem/mlkem_internal.c
610
out_byte |= (s->c[i + j] & 1) << j;
lib/libcrypto/mlkem/mlkem_internal.c
656
assert(bits <= (int)sizeof(*out->c) * 8 && bits != 1);
lib/libcrypto/mlkem/mlkem_internal.c
686
out->c[i] = element;
lib/libcrypto/mlkem/mlkem_internal.c
703
out->c[i + j] = in_byte & 1;
lib/libcrypto/mlkem/mlkem_internal.c
785
s->c[i] = compress(s->c[i], bits);
lib/libcrypto/mlkem/mlkem_internal.c
795
s->c[i] = decompress(s->c[i], bits);
lib/libcrypto/modes/cbc128.c
121
unsigned char c[16];
lib/libcrypto/modes/cbc128.c
158
unsigned char c;
lib/libcrypto/modes/cbc128.c
160
(*block)(in, tmp.c, key);
lib/libcrypto/modes/cbc128.c
162
c = in[n];
lib/libcrypto/modes/cbc128.c
163
out[n] = tmp.c[n] ^ ivec[n];
lib/libcrypto/modes/cbc128.c
164
ivec[n] = c;
lib/libcrypto/modes/cbc128.c
172
size_t c, *out_t = (size_t *)out,
lib/libcrypto/modes/cbc128.c
176
(*block)(in, tmp.c, key);
lib/libcrypto/modes/cbc128.c
178
c = in_t[n];
lib/libcrypto/modes/cbc128.c
180
ivec_t[n] = c;
lib/libcrypto/modes/cbc128.c
189
unsigned char c;
lib/libcrypto/modes/cbc128.c
190
(*block)(in, tmp.c, key);
lib/libcrypto/modes/cbc128.c
192
c = in[n];
lib/libcrypto/modes/cbc128.c
193
out[n] = tmp.c[n] ^ ivec[n];
lib/libcrypto/modes/cbc128.c
194
ivec[n] = c;
lib/libcrypto/modes/ccm128.c
114
ctx->nonce.c[0] |= 0x40; /* set Adata flag */
lib/libcrypto/modes/ccm128.c
115
(*block)(ctx->nonce.c, ctx->cmac.c, ctx->key),
lib/libcrypto/modes/ccm128.c
119
ctx->cmac.c[0] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
120
ctx->cmac.c[1] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
124
ctx->cmac.c[0] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
125
ctx->cmac.c[1] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
126
ctx->cmac.c[2] ^= (uint8_t)(alen >> (56 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
127
ctx->cmac.c[3] ^= (uint8_t)(alen >> (48 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
128
ctx->cmac.c[4] ^= (uint8_t)(alen >> (40 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
129
ctx->cmac.c[5] ^= (uint8_t)(alen >> (32 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
130
ctx->cmac.c[6] ^= (uint8_t)(alen >> 24);
lib/libcrypto/modes/ccm128.c
131
ctx->cmac.c[7] ^= (uint8_t)(alen >> 16);
lib/libcrypto/modes/ccm128.c
132
ctx->cmac.c[8] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
133
ctx->cmac.c[9] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
136
ctx->cmac.c[0] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
137
ctx->cmac.c[1] ^= 0xFE;
lib/libcrypto/modes/ccm128.c
138
ctx->cmac.c[2] ^= (uint8_t)(alen >> 24);
lib/libcrypto/modes/ccm128.c
139
ctx->cmac.c[3] ^= (uint8_t)(alen >> 16);
lib/libcrypto/modes/ccm128.c
140
ctx->cmac.c[4] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
141
ctx->cmac.c[5] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
147
ctx->cmac.c[i] ^= *aad;
lib/libcrypto/modes/ccm128.c
148
(*block)(ctx->cmac.c, ctx->cmac.c, ctx->key),
lib/libcrypto/modes/ccm128.c
163
uint8_t c;
lib/libcrypto/modes/ccm128.c
168
c = counter[n];
lib/libcrypto/modes/ccm128.c
169
++c;
lib/libcrypto/modes/ccm128.c
170
counter[n] = c;
lib/libcrypto/modes/ccm128.c
171
if (c)
lib/libcrypto/modes/ccm128.c
183
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
188
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
192
(*block)(ctx->nonce.c, ctx->cmac.c, key),
lib/libcrypto/modes/ccm128.c
195
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
197
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
198
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
201
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
202
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
215
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
218
memcpy(temp.c, inp, 16);
lib/libcrypto/modes/ccm128.c
225
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
226
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
227
ctr64_inc(ctx->nonce.c);
lib/libcrypto/modes/ccm128.c
231
memcpy(out, temp.c, 16);
lib/libcrypto/modes/ccm128.c
243
ctx->cmac.c[i] ^= inp[i];
lib/libcrypto/modes/ccm128.c
244
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
245
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
247
out[i] = scratch.c[i] ^ inp[i];
lib/libcrypto/modes/ccm128.c
251
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
253
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
257
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
270
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
275
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
279
(*block)(ctx->nonce.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
281
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
283
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
284
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
287
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
288
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
297
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
300
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
301
ctr64_inc(ctx->nonce.c);
lib/libcrypto/modes/ccm128.c
303
memcpy(temp.c, inp, 16);
lib/libcrypto/modes/ccm128.c
306
memcpy(out, scratch.c, 16);
lib/libcrypto/modes/ccm128.c
313
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
321
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
323
ctx->cmac.c[i] ^= (out[i] = scratch.c[i] ^ inp[i]);
lib/libcrypto/modes/ccm128.c
324
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
328
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
330
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
334
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
362
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
367
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
371
(*block)(ctx->nonce.c, ctx->cmac.c, key),
lib/libcrypto/modes/ccm128.c
374
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
376
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
377
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
380
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
381
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
391
(*stream)(inp, out, n, key, ctx->nonce.c, ctx->cmac.c);
lib/libcrypto/modes/ccm128.c
397
ctr64_add(ctx->nonce.c, n/16);
lib/libcrypto/modes/ccm128.c
402
ctx->cmac.c[i] ^= inp[i];
lib/libcrypto/modes/ccm128.c
403
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
404
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
406
out[i] = scratch.c[i] ^ inp[i];
lib/libcrypto/modes/ccm128.c
410
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
412
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
416
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
429
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
434
uint8_t c[16];
lib/libcrypto/modes/ccm128.c
438
(*block)(ctx->nonce.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
440
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
442
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
443
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
446
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
447
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
453
(*stream)(inp, out, n, key, ctx->nonce.c, ctx->cmac.c);
lib/libcrypto/modes/ccm128.c
459
ctr64_add(ctx->nonce.c, n/16);
lib/libcrypto/modes/ccm128.c
463
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
465
ctx->cmac.c[i] ^= (out[i] = scratch.c[i] ^ inp[i]);
lib/libcrypto/modes/ccm128.c
466
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
470
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
472
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
476
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
485
unsigned int M = (ctx->nonce.c[0] >> 3) & 7; /* the M parameter */
lib/libcrypto/modes/ccm128.c
491
memcpy(tag, ctx->cmac.c, M);
lib/libcrypto/modes/ccm128.c
63
memset(ctx->nonce.c, 0, sizeof(ctx->nonce.c));
lib/libcrypto/modes/ccm128.c
64
ctx->nonce.c[0] = ((uint8_t)(L - 1) & 7) | (uint8_t)(((M - 2)/2) & 7) << 3;
lib/libcrypto/modes/ccm128.c
78
unsigned int L = ctx->nonce.c[0] & 7; /* the L parameter */
lib/libcrypto/modes/ccm128.c
84
ctx->nonce.c[8] = (uint8_t)(mlen >> (56 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
85
ctx->nonce.c[9] = (uint8_t)(mlen >> (48 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
86
ctx->nonce.c[10] = (uint8_t)(mlen >> (40 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
87
ctx->nonce.c[11] = (uint8_t)(mlen >> (32 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
91
ctx->nonce.c[12] = (uint8_t)(mlen >> 24);
lib/libcrypto/modes/ccm128.c
92
ctx->nonce.c[13] = (uint8_t)(mlen >> 16);
lib/libcrypto/modes/ccm128.c
93
ctx->nonce.c[14] = (uint8_t)(mlen >> 8);
lib/libcrypto/modes/ccm128.c
94
ctx->nonce.c[15] = (uint8_t)mlen;
lib/libcrypto/modes/ccm128.c
96
ctx->nonce.c[0] &= ~0x40; /* clear Adata flag */
lib/libcrypto/modes/ccm128.c
97
memcpy(&ctx->nonce.c[1], nonce, 14 - L);
lib/libcrypto/modes/cfb128.c
122
unsigned char c;
lib/libcrypto/modes/cfb128.c
123
*(out++) = ivec[n] ^ (c = *(in++));
lib/libcrypto/modes/cfb128.c
124
ivec[n] = c;
lib/libcrypto/modes/cfb128.c
149
unsigned char c;
lib/libcrypto/modes/cfb128.c
150
out[n] = ivec[n] ^ (c = in[n]);
lib/libcrypto/modes/cfb128.c
151
ivec[n] = c;
lib/libcrypto/modes/cfb128.c
160
unsigned char c;
lib/libcrypto/modes/cfb128.c
164
out[l] = ivec[n] ^ (c = in[l]);
lib/libcrypto/modes/cfb128.c
165
ivec[n] = c;
lib/libcrypto/modes/cfb128.c
220
unsigned char c[1], d[1];
lib/libcrypto/modes/cfb128.c
224
c[0] = (in[n/8] & (1 << (7 - n % 8))) ? 0x80 : 0;
lib/libcrypto/modes/cfb128.c
225
cfbr_encrypt_block(c, d, 1, key, ivec, enc, block);
lib/libcrypto/modes/ctr128.c
179
uint8_t c;
lib/libcrypto/modes/ctr128.c
183
c = counter[n];
lib/libcrypto/modes/ctr128.c
184
++c;
lib/libcrypto/modes/ctr128.c
185
counter[n] = c;
lib/libcrypto/modes/ctr128.c
186
if (c)
lib/libcrypto/modes/ctr128.c
67
uint8_t c;
lib/libcrypto/modes/ctr128.c
71
c = counter[n];
lib/libcrypto/modes/ctr128.c
72
++c;
lib/libcrypto/modes/ctr128.c
73
counter[n] = c;
lib/libcrypto/modes/ctr128.c
74
if (c)
lib/libcrypto/modes/ctr128.c
85
size_t *data, c, n;
lib/libcrypto/modes/ctr128.c
90
c = data[n];
lib/libcrypto/modes/ctr128.c
91
++c;
lib/libcrypto/modes/ctr128.c
92
data[n] = c;
lib/libcrypto/modes/ctr128.c
93
if (c)
lib/libcrypto/modes/gcm128.c
226
(*block)(ctx->H.c, ctx->H.c, key);
lib/libcrypto/modes/gcm128.c
272
memcpy(ctx->Yi.c, iv, 12);
lib/libcrypto/modes/gcm128.c
273
ctx->Yi.c[15] = 1;
lib/libcrypto/modes/gcm128.c
281
ctx->Yi.c[i] ^= iv[i];
lib/libcrypto/modes/gcm128.c
288
ctx->Yi.c[i] ^= iv[i];
lib/libcrypto/modes/gcm128.c
299
(*ctx->block)(ctx->Yi.c, ctx->EK0.c, ctx->key);
lib/libcrypto/modes/gcm128.c
321
ctx->Xi.c[n] ^= *(aad++);
lib/libcrypto/modes/gcm128.c
340
ctx->Xi.c[i] ^= aad[i];
lib/libcrypto/modes/gcm128.c
373
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
376
ctx->Xi.c[n] ^= out[i] = in[i] ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
394
uint8_t c;
lib/libcrypto/modes/gcm128.c
414
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
417
c = in[i];
lib/libcrypto/modes/gcm128.c
418
out[i] = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
419
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
454
ctx->Xi.c[n] ^= *(out++) = *(in++) ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
466
stream(in, out, j, ctx->key, ctx->Yi.c);
lib/libcrypto/modes/gcm128.c
475
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
478
ctx->Xi.c[n] ^= out[n] = in[n] ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
496
uint8_t c;
lib/libcrypto/modes/gcm128.c
513
c = *(in++);
lib/libcrypto/modes/gcm128.c
514
*(out++) = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
515
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
528
stream(in, out, j, ctx->key, ctx->Yi.c);
lib/libcrypto/modes/gcm128.c
536
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
539
c = in[n];
lib/libcrypto/modes/gcm128.c
540
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
541
out[n] = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
574
return timingsafe_memcmp(ctx->Xi.c, tag, len);
lib/libcrypto/modes/gcm128.c
583
if (len > sizeof(ctx->Xi.c))
lib/libcrypto/modes/gcm128.c
584
len = sizeof(ctx->Xi.c);
lib/libcrypto/modes/gcm128.c
586
memcpy(tag, ctx->Xi.c, len);
lib/libcrypto/modes/modes_local.h
37
uint8_t c[16];
lib/libcrypto/modes/modes_local.h
59
uint8_t c[16];
lib/libcrypto/modes/xts128.c
113
size_t c;
lib/libcrypto/modes/xts128.c
115
for (c = 0, i = 0; i < 16; ++i) {
lib/libcrypto/modes/xts128.c
117
c += ((size_t)tweak.c[i]) << 1;
lib/libcrypto/modes/xts128.c
118
tweak.c[i] = (uint8_t)c;
lib/libcrypto/modes/xts128.c
119
c = c >> 8;
lib/libcrypto/modes/xts128.c
121
tweak.c[0] ^= (uint8_t)(0x87 & (0 - c));
lib/libcrypto/modes/xts128.c
127
out[i] = scratch.c[i];
lib/libcrypto/modes/xts128.c
128
scratch.c[i] = ch;
lib/libcrypto/modes/xts128.c
132
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
135
memcpy(out - 16, scratch.c, 16);
lib/libcrypto/modes/xts128.c
139
uint8_t c[16];
lib/libcrypto/modes/xts128.c
150
size_t c;
lib/libcrypto/modes/xts128.c
152
for (c = 0, i = 0; i < 16; ++i) {
lib/libcrypto/modes/xts128.c
154
c += ((size_t)tweak.c[i]) << 1;
lib/libcrypto/modes/xts128.c
155
tweak1.c[i] = (uint8_t)c;
lib/libcrypto/modes/xts128.c
156
c = c >> 8;
lib/libcrypto/modes/xts128.c
158
tweak1.c[0] ^= (uint8_t)(0x87 & (0 - c));
lib/libcrypto/modes/xts128.c
161
memcpy(scratch.c, inp, 16);
lib/libcrypto/modes/xts128.c
168
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
174
out[16 + i] = scratch.c[i];
lib/libcrypto/modes/xts128.c
175
scratch.c[i] = ch;
lib/libcrypto/modes/xts128.c
179
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
183
memcpy(out, scratch.c, 16);
lib/libcrypto/modes/xts128.c
66
uint8_t c[16];
lib/libcrypto/modes/xts128.c
73
memcpy(tweak.c, iv, 16);
lib/libcrypto/modes/xts128.c
75
(*ctx->block2)(tweak.c, tweak.c, ctx->key2);
lib/libcrypto/modes/xts128.c
82
memcpy(scratch.c, inp, 16);
lib/libcrypto/modes/xts128.c
89
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
93
memcpy(out, scratch.c, 16);
lib/libcrypto/pem/pem_lib.c
492
char *p, c;
lib/libcrypto/pem/pem_lib.c
528
c= *header;
lib/libcrypto/pem/pem_lib.c
529
if (!( ((c >= 'A') && (c <= 'Z')) || (c == '-') ||
lib/libcrypto/pem/pem_lib.c
530
((c >= '0') && (c <= '9'))))
lib/libcrypto/pem/pem_lib.c
536
*header = c;
lib/libcrypto/pem/pvkfmt.c
456
unsigned char *p = *out, *q, c;
lib/libcrypto/pem/pvkfmt.c
463
c = *p;
lib/libcrypto/pem/pvkfmt.c
465
*q-- = c;
lib/libcrypto/pkcs12/p12_key.c
173
uint16_t c = 1;
lib/libcrypto/pkcs12/p12_key.c
178
c += I[j + k] + B[k];
lib/libcrypto/pkcs12/p12_key.c
179
I[j + k] = (unsigned char)c;
lib/libcrypto/pkcs12/p12_key.c
180
c >>= 8;
lib/libcrypto/poly1305/poly1305-donna.c
146
c = (unsigned long)(d0 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
148
d1 += c;
lib/libcrypto/poly1305/poly1305-donna.c
149
c = (unsigned long)(d1 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
151
d2 += c;
lib/libcrypto/poly1305/poly1305-donna.c
152
c = (unsigned long)(d2 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
154
d3 += c;
lib/libcrypto/poly1305/poly1305-donna.c
155
c = (unsigned long)(d3 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
157
d4 += c;
lib/libcrypto/poly1305/poly1305-donna.c
158
c = (unsigned long)(d4 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
160
h0 += c * 5;
lib/libcrypto/poly1305/poly1305-donna.c
161
c = (h0 >> 26);
lib/libcrypto/poly1305/poly1305-donna.c
163
h1 += c;
lib/libcrypto/poly1305/poly1305-donna.c
218
unsigned long h0, h1, h2, h3, h4, c;
lib/libcrypto/poly1305/poly1305-donna.c
240
c = h1 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
242
h2 += c;
lib/libcrypto/poly1305/poly1305-donna.c
243
c = h2 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
245
h3 += c;
lib/libcrypto/poly1305/poly1305-donna.c
246
c = h3 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
248
h4 += c;
lib/libcrypto/poly1305/poly1305-donna.c
249
c = h4 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
251
h0 += c * 5;
lib/libcrypto/poly1305/poly1305-donna.c
252
c = h0 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
254
h1 += c;
lib/libcrypto/poly1305/poly1305-donna.c
258
c = g0 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
260
g1 = h1 + c;
lib/libcrypto/poly1305/poly1305-donna.c
261
c = g1 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
263
g2 = h2 + c;
lib/libcrypto/poly1305/poly1305-donna.c
264
c = g2 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
266
g3 = h3 + c;
lib/libcrypto/poly1305/poly1305-donna.c
267
c = g3 >> 26;
lib/libcrypto/poly1305/poly1305-donna.c
269
g4 = h4 + c - (1 << 26);
lib/libcrypto/poly1305/poly1305-donna.c
91
unsigned long c;
lib/libcrypto/rc2/rc2.c
100
unsigned int c, d;
lib/libcrypto/rc2/rc2.c
128
c = (0xff >> (-bits & 0x07));
lib/libcrypto/rc2/rc2.c
130
d = key_table[k[i] & c];
lib/libcrypto/rc2/rc2.c
333
unsigned char *iv, c, cc;
lib/libcrypto/rc2/rc2.c
351
c = *(in++) ^ iv[n];
lib/libcrypto/rc2/rc2.c
352
*(out++) = c;
lib/libcrypto/rc2/rc2.c
353
iv[n] = c;
lib/libcrypto/rc2/rc2.c
372
c = iv[n];
lib/libcrypto/rc2/rc2.c
374
*(out++) = c ^ cc;
lib/libcrypto/rc2/rc2.c
378
v0 = v1 = ti[0] = ti[1] = t = c = cc = 0;
lib/libcrypto/rc2/rc2_local.h
100
case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
101
case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
102
case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
103
case 1: *(--(c))=(unsigned char)(((l1) )&0xff);\
lib/libcrypto/rc2/rc2_local.h
63
#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
lib/libcrypto/rc2/rc2_local.h
64
l|=((unsigned long)(*((c)++)))<< 8L, \
lib/libcrypto/rc2/rc2_local.h
65
l|=((unsigned long)(*((c)++)))<<16L, \
lib/libcrypto/rc2/rc2_local.h
66
l|=((unsigned long)(*((c)++)))<<24L)
lib/libcrypto/rc2/rc2_local.h
70
#define c2ln(c,l1,l2,n) { \
lib/libcrypto/rc2/rc2_local.h
71
c+=n; \
lib/libcrypto/rc2/rc2_local.h
74
case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
lib/libcrypto/rc2/rc2_local.h
75
case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
lib/libcrypto/rc2/rc2_local.h
76
case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
lib/libcrypto/rc2/rc2_local.h
77
case 5: l2|=((unsigned long)(*(--(c)))); \
lib/libcrypto/rc2/rc2_local.h
78
case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
lib/libcrypto/rc2/rc2_local.h
79
case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
lib/libcrypto/rc2/rc2_local.h
80
case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
lib/libcrypto/rc2/rc2_local.h
81
case 1: l1|=((unsigned long)(*(--(c)))); \
lib/libcrypto/rc2/rc2_local.h
86
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
lib/libcrypto/rc2/rc2_local.h
87
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
lib/libcrypto/rc2/rc2_local.h
88
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
lib/libcrypto/rc2/rc2_local.h
89
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
lib/libcrypto/rc2/rc2_local.h
93
#define l2cn(l1,l2,c,n) { \
lib/libcrypto/rc2/rc2_local.h
94
c+=n; \
lib/libcrypto/rc2/rc2_local.h
96
case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
97
case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
98
case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff);\
lib/libcrypto/rc2/rc2_local.h
99
case 5: *(--(c))=(unsigned char)(((l2) )&0xff);\
lib/libcrypto/ripemd/ripemd.c
102
#define RIP1(a,b,c,d,e,w,s) { \
lib/libcrypto/ripemd/ripemd.c
103
a+=F1(b,c,d)+w; \
lib/libcrypto/ripemd/ripemd.c
105
c=crypto_rol_u32(c,10); }
lib/libcrypto/ripemd/ripemd.c
107
#define RIP2(a,b,c,d,e,w,s,K) { \
lib/libcrypto/ripemd/ripemd.c
108
a+=F2(b,c,d)+w+K; \
lib/libcrypto/ripemd/ripemd.c
110
c=crypto_rol_u32(c,10); }
lib/libcrypto/ripemd/ripemd.c
112
#define RIP3(a,b,c,d,e,w,s,K) { \
lib/libcrypto/ripemd/ripemd.c
113
a+=F3(b,c,d)+w+K; \
lib/libcrypto/ripemd/ripemd.c
115
c=crypto_rol_u32(c,10); }
lib/libcrypto/ripemd/ripemd.c
117
#define RIP4(a,b,c,d,e,w,s,K) { \
lib/libcrypto/ripemd/ripemd.c
118
a+=F4(b,c,d)+w+K; \
lib/libcrypto/ripemd/ripemd.c
120
c=crypto_rol_u32(c,10); }
lib/libcrypto/ripemd/ripemd.c
122
#define RIP5(a,b,c,d,e,w,s,K) { \
lib/libcrypto/ripemd/ripemd.c
123
a+=F5(b,c,d)+w+K; \
lib/libcrypto/ripemd/ripemd.c
125
c=crypto_rol_u32(c,10); }
lib/libcrypto/ripemd/ripemd.c
133
unsigned int a, b, c, d, e;
lib/libcrypto/ripemd/ripemd.c
271
c = C;
lib/libcrypto/ripemd/ripemd.c
366
D = ctx->B + c + D;
lib/libcrypto/ripemd/ripemd.c
376
RIPEMD160_Init(RIPEMD160_CTX *c)
lib/libcrypto/ripemd/ripemd.c
378
memset(c, 0, sizeof(*c));
lib/libcrypto/ripemd/ripemd.c
380
c->A = 0x67452301UL;
lib/libcrypto/ripemd/ripemd.c
381
c->B = 0xEFCDAB89UL;
lib/libcrypto/ripemd/ripemd.c
382
c->C = 0x98BADCFEUL;
lib/libcrypto/ripemd/ripemd.c
383
c->D = 0x10325476UL;
lib/libcrypto/ripemd/ripemd.c
384
c->E = 0xC3D2E1F0UL;
lib/libcrypto/ripemd/ripemd.c
391
RIPEMD160_Update(RIPEMD160_CTX *c, const void *data_, size_t len)
lib/libcrypto/ripemd/ripemd.c
401
l = (c->Nl + (((RIPEMD160_LONG)len) << 3))&0xffffffffUL;
lib/libcrypto/ripemd/ripemd.c
404
if (l < c->Nl) /* overflow */
lib/libcrypto/ripemd/ripemd.c
405
c->Nh++;
lib/libcrypto/ripemd/ripemd.c
406
c->Nh+=(RIPEMD160_LONG)(len>>29); /* might cause compiler warning on 16-bit */
lib/libcrypto/ripemd/ripemd.c
407
c->Nl = l;
lib/libcrypto/ripemd/ripemd.c
409
n = c->num;
lib/libcrypto/ripemd/ripemd.c
411
p = (unsigned char *)c->data;
lib/libcrypto/ripemd/ripemd.c
415
ripemd160_block_data_order(c, p, 1);
lib/libcrypto/ripemd/ripemd.c
419
c->num = 0;
lib/libcrypto/ripemd/ripemd.c
423
c->num += (unsigned int)len;
lib/libcrypto/ripemd/ripemd.c
430
ripemd160_block_data_order(c, data, n);
lib/libcrypto/ripemd/ripemd.c
437
p = (unsigned char *)c->data;
lib/libcrypto/ripemd/ripemd.c
438
c->num = (unsigned int)len;
lib/libcrypto/ripemd/ripemd.c
446
RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *data)
lib/libcrypto/ripemd/ripemd.c
448
ripemd160_block_data_order(c, data, 1);
lib/libcrypto/ripemd/ripemd.c
453
RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c)
lib/libcrypto/ripemd/ripemd.c
455
unsigned char *p = (unsigned char *)c->data;
lib/libcrypto/ripemd/ripemd.c
456
size_t n = c->num;
lib/libcrypto/ripemd/ripemd.c
464
ripemd160_block_data_order(c, p, 1);
lib/libcrypto/ripemd/ripemd.c
468
c->data[RIPEMD160_LBLOCK - 2] = htole32(c->Nl);
lib/libcrypto/ripemd/ripemd.c
469
c->data[RIPEMD160_LBLOCK - 1] = htole32(c->Nh);
lib/libcrypto/ripemd/ripemd.c
471
ripemd160_block_data_order(c, p, 1);
lib/libcrypto/ripemd/ripemd.c
472
c->num = 0;
lib/libcrypto/ripemd/ripemd.c
475
crypto_store_htole32(&md[0 * 4], c->A);
lib/libcrypto/ripemd/ripemd.c
476
crypto_store_htole32(&md[1 * 4], c->B);
lib/libcrypto/ripemd/ripemd.c
477
crypto_store_htole32(&md[2 * 4], c->C);
lib/libcrypto/ripemd/ripemd.c
478
crypto_store_htole32(&md[3 * 4], c->D);
lib/libcrypto/ripemd/ripemd.c
479
crypto_store_htole32(&md[4 * 4], c->E);
lib/libcrypto/ripemd/ripemd.c
488
RIPEMD160_CTX c;
lib/libcrypto/ripemd/ripemd.c
490
if (!RIPEMD160_Init(&c))
lib/libcrypto/ripemd/ripemd.c
492
RIPEMD160_Update(&c, d, n);
lib/libcrypto/ripemd/ripemd.c
493
RIPEMD160_Final(md, &c);
lib/libcrypto/ripemd/ripemd.c
494
explicit_bzero(&c, sizeof(c));
lib/libcrypto/ripemd/ripemd.h
87
int RIPEMD160_Init(RIPEMD160_CTX *c);
lib/libcrypto/ripemd/ripemd.h
88
int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len)
lib/libcrypto/ripemd/ripemd.h
90
int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
lib/libcrypto/ripemd/ripemd.h
95
void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b);
lib/libcrypto/rsa/rsa_eay.c
661
BIGNUM dmp1, dmq1, c, pr1;
lib/libcrypto/rsa/rsa_eay.c
702
BN_init(&c);
lib/libcrypto/rsa/rsa_eay.c
703
BN_with_flags(&c, I, BN_FLG_CONSTTIME);
lib/libcrypto/rsa/rsa_eay.c
705
if (!BN_mod_ct(r1, &c, rsa->q, ctx))
lib/libcrypto/rsa/rsa_eay.c
717
BN_init(&c);
lib/libcrypto/rsa/rsa_eay.c
718
BN_with_flags(&c, I, BN_FLG_CONSTTIME);
lib/libcrypto/rsa/rsa_eay.c
720
if (!BN_mod_ct(r1, &c, rsa->p, ctx))
lib/libcrypto/rsa/rsa_x931.c
121
unsigned char c = *p++;
lib/libcrypto/rsa/rsa_x931.c
122
if (c == 0xBA)
lib/libcrypto/rsa/rsa_x931.c
124
if (c != 0xBB) {
lib/libcrypto/sha/sha.h
103
void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
lib/libcrypto/sha/sha.h
120
int SHA224_Init(SHA256_CTX *c);
lib/libcrypto/sha/sha.h
121
int SHA224_Update(SHA256_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha.h
123
int SHA224_Final(unsigned char *md, SHA256_CTX *c);
lib/libcrypto/sha/sha.h
127
int SHA256_Init(SHA256_CTX *c);
lib/libcrypto/sha/sha.h
128
int SHA256_Update(SHA256_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha.h
130
int SHA256_Final(unsigned char *md, SHA256_CTX *c);
lib/libcrypto/sha/sha.h
134
void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
lib/libcrypto/sha/sha.h
169
int SHA384_Init(SHA512_CTX *c);
lib/libcrypto/sha/sha.h
170
int SHA384_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha.h
172
int SHA384_Final(unsigned char *md, SHA512_CTX *c);
lib/libcrypto/sha/sha.h
176
int SHA512_Init(SHA512_CTX *c);
lib/libcrypto/sha/sha.h
177
int SHA512_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha.h
179
int SHA512_Final(unsigned char *md, SHA512_CTX *c);
lib/libcrypto/sha/sha.h
183
void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
lib/libcrypto/sha/sha.h
96
int SHA1_Init(SHA_CTX *c);
lib/libcrypto/sha/sha.h
97
int SHA1_Update(SHA_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha.h
99
int SHA1_Final(unsigned char *md, SHA_CTX *c);
lib/libcrypto/sha/sha1.c
103
sha1_round1(SHA_LONG *a, SHA_LONG *b, SHA_LONG *c, SHA_LONG *d, SHA_LONG *e,
lib/libcrypto/sha/sha1.c
109
T = crypto_rol_u32(*a, 5) + Ch(*b, *c, *d) + *e + Kt + Wt;
lib/libcrypto/sha/sha1.c
112
*d = *c;
lib/libcrypto/sha/sha1.c
113
*c = crypto_rol_u32(*b, 30);
lib/libcrypto/sha/sha1.c
119
sha1_round2(SHA_LONG *a, SHA_LONG *b, SHA_LONG *c, SHA_LONG *d, SHA_LONG *e,
lib/libcrypto/sha/sha1.c
125
T = crypto_rol_u32(*a, 5) + Parity(*b, *c, *d) + *e + Kt + Wt;
lib/libcrypto/sha/sha1.c
128
*d = *c;
lib/libcrypto/sha/sha1.c
129
*c = crypto_rol_u32(*b, 30);
lib/libcrypto/sha/sha1.c
135
sha1_round3(SHA_LONG *a, SHA_LONG *b, SHA_LONG *c, SHA_LONG *d, SHA_LONG *e,
lib/libcrypto/sha/sha1.c
141
T = crypto_rol_u32(*a, 5) + Maj(*b, *c, *d) + *e + Kt + Wt;
lib/libcrypto/sha/sha1.c
144
*d = *c;
lib/libcrypto/sha/sha1.c
145
*c = crypto_rol_u32(*b, 30);
lib/libcrypto/sha/sha1.c
151
sha1_round4(SHA_LONG *a, SHA_LONG *b, SHA_LONG *c, SHA_LONG *d, SHA_LONG *e,
lib/libcrypto/sha/sha1.c
157
T = crypto_rol_u32(*a, 5) + Parity(*b, *c, *d) + *e + Kt + Wt;
lib/libcrypto/sha/sha1.c
160
*d = *c;
lib/libcrypto/sha/sha1.c
161
*c = crypto_rol_u32(*b, 30);
lib/libcrypto/sha/sha1.c
171
unsigned int a, b, c, d, e;
lib/libcrypto/sha/sha1.c
178
c = ctx->h2;
lib/libcrypto/sha/sha1.c
222
sha1_round1(&a, &b, &c, &d, &e, X0);
lib/libcrypto/sha/sha1.c
223
sha1_round1(&a, &b, &c, &d, &e, X1);
lib/libcrypto/sha/sha1.c
224
sha1_round1(&a, &b, &c, &d, &e, X2);
lib/libcrypto/sha/sha1.c
225
sha1_round1(&a, &b, &c, &d, &e, X3);
lib/libcrypto/sha/sha1.c
226
sha1_round1(&a, &b, &c, &d, &e, X4);
lib/libcrypto/sha/sha1.c
227
sha1_round1(&a, &b, &c, &d, &e, X5);
lib/libcrypto/sha/sha1.c
228
sha1_round1(&a, &b, &c, &d, &e, X6);
lib/libcrypto/sha/sha1.c
229
sha1_round1(&a, &b, &c, &d, &e, X7);
lib/libcrypto/sha/sha1.c
230
sha1_round1(&a, &b, &c, &d, &e, X8);
lib/libcrypto/sha/sha1.c
231
sha1_round1(&a, &b, &c, &d, &e, X9);
lib/libcrypto/sha/sha1.c
232
sha1_round1(&a, &b, &c, &d, &e, X10);
lib/libcrypto/sha/sha1.c
233
sha1_round1(&a, &b, &c, &d, &e, X11);
lib/libcrypto/sha/sha1.c
234
sha1_round1(&a, &b, &c, &d, &e, X12);
lib/libcrypto/sha/sha1.c
235
sha1_round1(&a, &b, &c, &d, &e, X13);
lib/libcrypto/sha/sha1.c
236
sha1_round1(&a, &b, &c, &d, &e, X14);
lib/libcrypto/sha/sha1.c
237
sha1_round1(&a, &b, &c, &d, &e, X15);
lib/libcrypto/sha/sha1.c
256
sha1_round1(&a, &b, &c, &d, &e, X0);
lib/libcrypto/sha/sha1.c
257
sha1_round1(&a, &b, &c, &d, &e, X1);
lib/libcrypto/sha/sha1.c
258
sha1_round1(&a, &b, &c, &d, &e, X2);
lib/libcrypto/sha/sha1.c
259
sha1_round1(&a, &b, &c, &d, &e, X3);
lib/libcrypto/sha/sha1.c
260
sha1_round2(&a, &b, &c, &d, &e, X4);
lib/libcrypto/sha/sha1.c
261
sha1_round2(&a, &b, &c, &d, &e, X5);
lib/libcrypto/sha/sha1.c
262
sha1_round2(&a, &b, &c, &d, &e, X6);
lib/libcrypto/sha/sha1.c
263
sha1_round2(&a, &b, &c, &d, &e, X7);
lib/libcrypto/sha/sha1.c
264
sha1_round2(&a, &b, &c, &d, &e, X8);
lib/libcrypto/sha/sha1.c
265
sha1_round2(&a, &b, &c, &d, &e, X9);
lib/libcrypto/sha/sha1.c
266
sha1_round2(&a, &b, &c, &d, &e, X10);
lib/libcrypto/sha/sha1.c
267
sha1_round2(&a, &b, &c, &d, &e, X11);
lib/libcrypto/sha/sha1.c
268
sha1_round2(&a, &b, &c, &d, &e, X12);
lib/libcrypto/sha/sha1.c
269
sha1_round2(&a, &b, &c, &d, &e, X13);
lib/libcrypto/sha/sha1.c
270
sha1_round2(&a, &b, &c, &d, &e, X14);
lib/libcrypto/sha/sha1.c
271
sha1_round2(&a, &b, &c, &d, &e, X15);
lib/libcrypto/sha/sha1.c
290
sha1_round2(&a, &b, &c, &d, &e, X0);
lib/libcrypto/sha/sha1.c
291
sha1_round2(&a, &b, &c, &d, &e, X1);
lib/libcrypto/sha/sha1.c
292
sha1_round2(&a, &b, &c, &d, &e, X2);
lib/libcrypto/sha/sha1.c
293
sha1_round2(&a, &b, &c, &d, &e, X3);
lib/libcrypto/sha/sha1.c
294
sha1_round2(&a, &b, &c, &d, &e, X4);
lib/libcrypto/sha/sha1.c
295
sha1_round2(&a, &b, &c, &d, &e, X5);
lib/libcrypto/sha/sha1.c
296
sha1_round2(&a, &b, &c, &d, &e, X6);
lib/libcrypto/sha/sha1.c
297
sha1_round2(&a, &b, &c, &d, &e, X7);
lib/libcrypto/sha/sha1.c
298
sha1_round3(&a, &b, &c, &d, &e, X8);
lib/libcrypto/sha/sha1.c
299
sha1_round3(&a, &b, &c, &d, &e, X9);
lib/libcrypto/sha/sha1.c
300
sha1_round3(&a, &b, &c, &d, &e, X10);
lib/libcrypto/sha/sha1.c
301
sha1_round3(&a, &b, &c, &d, &e, X11);
lib/libcrypto/sha/sha1.c
302
sha1_round3(&a, &b, &c, &d, &e, X12);
lib/libcrypto/sha/sha1.c
303
sha1_round3(&a, &b, &c, &d, &e, X13);
lib/libcrypto/sha/sha1.c
304
sha1_round3(&a, &b, &c, &d, &e, X14);
lib/libcrypto/sha/sha1.c
305
sha1_round3(&a, &b, &c, &d, &e, X15);
lib/libcrypto/sha/sha1.c
324
sha1_round3(&a, &b, &c, &d, &e, X0);
lib/libcrypto/sha/sha1.c
325
sha1_round3(&a, &b, &c, &d, &e, X1);
lib/libcrypto/sha/sha1.c
326
sha1_round3(&a, &b, &c, &d, &e, X2);
lib/libcrypto/sha/sha1.c
327
sha1_round3(&a, &b, &c, &d, &e, X3);
lib/libcrypto/sha/sha1.c
328
sha1_round3(&a, &b, &c, &d, &e, X4);
lib/libcrypto/sha/sha1.c
329
sha1_round3(&a, &b, &c, &d, &e, X5);
lib/libcrypto/sha/sha1.c
330
sha1_round3(&a, &b, &c, &d, &e, X6);
lib/libcrypto/sha/sha1.c
331
sha1_round3(&a, &b, &c, &d, &e, X7);
lib/libcrypto/sha/sha1.c
332
sha1_round3(&a, &b, &c, &d, &e, X8);
lib/libcrypto/sha/sha1.c
333
sha1_round3(&a, &b, &c, &d, &e, X9);
lib/libcrypto/sha/sha1.c
334
sha1_round3(&a, &b, &c, &d, &e, X10);
lib/libcrypto/sha/sha1.c
335
sha1_round3(&a, &b, &c, &d, &e, X11);
lib/libcrypto/sha/sha1.c
336
sha1_round4(&a, &b, &c, &d, &e, X12);
lib/libcrypto/sha/sha1.c
337
sha1_round4(&a, &b, &c, &d, &e, X13);
lib/libcrypto/sha/sha1.c
338
sha1_round4(&a, &b, &c, &d, &e, X14);
lib/libcrypto/sha/sha1.c
339
sha1_round4(&a, &b, &c, &d, &e, X15);
lib/libcrypto/sha/sha1.c
358
sha1_round4(&a, &b, &c, &d, &e, X0);
lib/libcrypto/sha/sha1.c
359
sha1_round4(&a, &b, &c, &d, &e, X1);
lib/libcrypto/sha/sha1.c
360
sha1_round4(&a, &b, &c, &d, &e, X2);
lib/libcrypto/sha/sha1.c
361
sha1_round4(&a, &b, &c, &d, &e, X3);
lib/libcrypto/sha/sha1.c
362
sha1_round4(&a, &b, &c, &d, &e, X4);
lib/libcrypto/sha/sha1.c
363
sha1_round4(&a, &b, &c, &d, &e, X5);
lib/libcrypto/sha/sha1.c
364
sha1_round4(&a, &b, &c, &d, &e, X6);
lib/libcrypto/sha/sha1.c
365
sha1_round4(&a, &b, &c, &d, &e, X7);
lib/libcrypto/sha/sha1.c
366
sha1_round4(&a, &b, &c, &d, &e, X8);
lib/libcrypto/sha/sha1.c
367
sha1_round4(&a, &b, &c, &d, &e, X9);
lib/libcrypto/sha/sha1.c
368
sha1_round4(&a, &b, &c, &d, &e, X10);
lib/libcrypto/sha/sha1.c
369
sha1_round4(&a, &b, &c, &d, &e, X11);
lib/libcrypto/sha/sha1.c
370
sha1_round4(&a, &b, &c, &d, &e, X12);
lib/libcrypto/sha/sha1.c
371
sha1_round4(&a, &b, &c, &d, &e, X13);
lib/libcrypto/sha/sha1.c
372
sha1_round4(&a, &b, &c, &d, &e, X14);
lib/libcrypto/sha/sha1.c
373
sha1_round4(&a, &b, &c, &d, &e, X15);
lib/libcrypto/sha/sha1.c
377
ctx->h2 += c;
lib/libcrypto/sha/sha1.c
393
SHA1_Init(SHA_CTX *c)
lib/libcrypto/sha/sha1.c
395
memset(c, 0, sizeof(*c));
lib/libcrypto/sha/sha1.c
397
c->h0 = 0x67452301UL;
lib/libcrypto/sha/sha1.c
398
c->h1 = 0xefcdab89UL;
lib/libcrypto/sha/sha1.c
399
c->h2 = 0x98badcfeUL;
lib/libcrypto/sha/sha1.c
400
c->h3 = 0x10325476UL;
lib/libcrypto/sha/sha1.c
401
c->h4 = 0xc3d2e1f0UL;
lib/libcrypto/sha/sha1.c
408
SHA1_Update(SHA_CTX *c, const void *data_, size_t len)
lib/libcrypto/sha/sha1.c
418
l = (c->Nl + (((SHA_LONG)len) << 3))&0xffffffffUL;
lib/libcrypto/sha/sha1.c
421
if (l < c->Nl) /* overflow */
lib/libcrypto/sha/sha1.c
422
c->Nh++;
lib/libcrypto/sha/sha1.c
423
c->Nh+=(SHA_LONG)(len>>29); /* might cause compiler warning on 16-bit */
lib/libcrypto/sha/sha1.c
424
c->Nl = l;
lib/libcrypto/sha/sha1.c
426
n = c->num;
lib/libcrypto/sha/sha1.c
428
p = (unsigned char *)c->data;
lib/libcrypto/sha/sha1.c
432
sha1_block_data_order(c, p, 1);
lib/libcrypto/sha/sha1.c
436
c->num = 0;
lib/libcrypto/sha/sha1.c
440
c->num += (unsigned int)len;
lib/libcrypto/sha/sha1.c
447
sha1_block_data_order(c, data, n);
lib/libcrypto/sha/sha1.c
454
p = (unsigned char *)c->data;
lib/libcrypto/sha/sha1.c
455
c->num = (unsigned int)len;
lib/libcrypto/sha/sha1.c
463
SHA1_Transform(SHA_CTX *c, const unsigned char *data)
lib/libcrypto/sha/sha1.c
465
sha1_block_data_order(c, data, 1);
lib/libcrypto/sha/sha1.c
470
SHA1_Final(unsigned char *md, SHA_CTX *c)
lib/libcrypto/sha/sha1.c
472
unsigned char *p = (unsigned char *)c->data;
lib/libcrypto/sha/sha1.c
473
size_t n = c->num;
lib/libcrypto/sha/sha1.c
481
sha1_block_data_order(c, p, 1);
lib/libcrypto/sha/sha1.c
485
c->data[SHA_LBLOCK - 2] = htobe32(c->Nh);
lib/libcrypto/sha/sha1.c
486
c->data[SHA_LBLOCK - 1] = htobe32(c->Nl);
lib/libcrypto/sha/sha1.c
488
sha1_block_data_order(c, p, 1);
lib/libcrypto/sha/sha1.c
489
c->num = 0;
lib/libcrypto/sha/sha1.c
492
crypto_store_htobe32(&md[0 * 4], c->h0);
lib/libcrypto/sha/sha1.c
493
crypto_store_htobe32(&md[1 * 4], c->h1);
lib/libcrypto/sha/sha1.c
494
crypto_store_htobe32(&md[2 * 4], c->h2);
lib/libcrypto/sha/sha1.c
495
crypto_store_htobe32(&md[3 * 4], c->h3);
lib/libcrypto/sha/sha1.c
496
crypto_store_htobe32(&md[4 * 4], c->h4);
lib/libcrypto/sha/sha1.c
505
SHA_CTX c;
lib/libcrypto/sha/sha1.c
507
if (!SHA1_Init(&c))
lib/libcrypto/sha/sha1.c
509
SHA1_Update(&c, d, n);
lib/libcrypto/sha/sha1.c
510
SHA1_Final(md, &c);
lib/libcrypto/sha/sha1.c
512
explicit_bzero(&c, sizeof(c));
lib/libcrypto/sha/sha256.c
142
sha256_round(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e,
lib/libcrypto/sha/sha256.c
148
T2 = Sigma0(*a) + Maj(*a, *b, *c);
lib/libcrypto/sha/sha256.c
154
*d = *c;
lib/libcrypto/sha/sha256.c
155
*c = *b;
lib/libcrypto/sha/sha256.c
165
uint32_t a, b, c, d, e, f, g, h;
lib/libcrypto/sha/sha256.c
172
c = ctx->h[2];
lib/libcrypto/sha/sha256.c
219
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[0], W[0]);
lib/libcrypto/sha/sha256.c
220
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[1], W[1]);
lib/libcrypto/sha/sha256.c
221
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[2], W[2]);
lib/libcrypto/sha/sha256.c
222
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[3], W[3]);
lib/libcrypto/sha/sha256.c
223
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[4], W[4]);
lib/libcrypto/sha/sha256.c
224
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[5], W[5]);
lib/libcrypto/sha/sha256.c
225
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[6], W[6]);
lib/libcrypto/sha/sha256.c
226
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[7], W[7]);
lib/libcrypto/sha/sha256.c
227
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[8], W[8]);
lib/libcrypto/sha/sha256.c
228
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[9], W[9]);
lib/libcrypto/sha/sha256.c
229
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[10], W[10]);
lib/libcrypto/sha/sha256.c
230
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[11], W[11]);
lib/libcrypto/sha/sha256.c
231
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[12], W[12]);
lib/libcrypto/sha/sha256.c
232
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[13], W[13]);
lib/libcrypto/sha/sha256.c
233
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[14], W[14]);
lib/libcrypto/sha/sha256.c
234
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[15], W[15]);
lib/libcrypto/sha/sha256.c
254
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 0], W[0]);
lib/libcrypto/sha/sha256.c
255
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 1], W[1]);
lib/libcrypto/sha/sha256.c
256
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 2], W[2]);
lib/libcrypto/sha/sha256.c
257
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 3], W[3]);
lib/libcrypto/sha/sha256.c
258
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 4], W[4]);
lib/libcrypto/sha/sha256.c
259
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 5], W[5]);
lib/libcrypto/sha/sha256.c
260
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 6], W[6]);
lib/libcrypto/sha/sha256.c
261
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 7], W[7]);
lib/libcrypto/sha/sha256.c
262
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 8], W[8]);
lib/libcrypto/sha/sha256.c
263
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 9], W[9]);
lib/libcrypto/sha/sha256.c
264
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 10], W[10]);
lib/libcrypto/sha/sha256.c
265
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 11], W[11]);
lib/libcrypto/sha/sha256.c
266
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 12], W[12]);
lib/libcrypto/sha/sha256.c
267
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 13], W[13]);
lib/libcrypto/sha/sha256.c
268
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 14], W[14]);
lib/libcrypto/sha/sha256.c
269
sha256_round(&a, &b, &c, &d, &e, &f, &g, &h, K256[i + 15], W[15]);
lib/libcrypto/sha/sha256.c
274
ctx->h[2] += c;
lib/libcrypto/sha/sha512.c
165
sha512_round(SHA_LONG64 *a, SHA_LONG64 *b, SHA_LONG64 *c, SHA_LONG64 *d,
lib/libcrypto/sha/sha512.c
172
T2 = Sigma0(*a) + Maj(*a, *b, *c);
lib/libcrypto/sha/sha512.c
178
*d = *c;
lib/libcrypto/sha/sha512.c
179
*c = *b;
lib/libcrypto/sha/sha512.c
189
SHA_LONG64 a, b, c, d, e, f, g, h;
lib/libcrypto/sha/sha512.c
196
c = ctx->h[2];
lib/libcrypto/sha/sha512.c
243
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[0], X[0]);
lib/libcrypto/sha/sha512.c
244
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[1], X[1]);
lib/libcrypto/sha/sha512.c
245
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[2], X[2]);
lib/libcrypto/sha/sha512.c
246
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[3], X[3]);
lib/libcrypto/sha/sha512.c
247
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[4], X[4]);
lib/libcrypto/sha/sha512.c
248
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[5], X[5]);
lib/libcrypto/sha/sha512.c
249
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[6], X[6]);
lib/libcrypto/sha/sha512.c
250
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[7], X[7]);
lib/libcrypto/sha/sha512.c
251
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[8], X[8]);
lib/libcrypto/sha/sha512.c
252
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[9], X[9]);
lib/libcrypto/sha/sha512.c
253
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[10], X[10]);
lib/libcrypto/sha/sha512.c
254
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[11], X[11]);
lib/libcrypto/sha/sha512.c
255
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[12], X[12]);
lib/libcrypto/sha/sha512.c
256
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[13], X[13]);
lib/libcrypto/sha/sha512.c
257
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[14], X[14]);
lib/libcrypto/sha/sha512.c
258
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[15], X[15]);
lib/libcrypto/sha/sha512.c
278
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 0], X[0]);
lib/libcrypto/sha/sha512.c
279
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 1], X[1]);
lib/libcrypto/sha/sha512.c
280
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 2], X[2]);
lib/libcrypto/sha/sha512.c
281
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 3], X[3]);
lib/libcrypto/sha/sha512.c
282
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 4], X[4]);
lib/libcrypto/sha/sha512.c
283
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 5], X[5]);
lib/libcrypto/sha/sha512.c
284
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 6], X[6]);
lib/libcrypto/sha/sha512.c
285
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 7], X[7]);
lib/libcrypto/sha/sha512.c
286
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 8], X[8]);
lib/libcrypto/sha/sha512.c
287
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 9], X[9]);
lib/libcrypto/sha/sha512.c
288
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 10], X[10]);
lib/libcrypto/sha/sha512.c
289
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 11], X[11]);
lib/libcrypto/sha/sha512.c
290
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 12], X[12]);
lib/libcrypto/sha/sha512.c
291
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 13], X[13]);
lib/libcrypto/sha/sha512.c
292
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 14], X[14]);
lib/libcrypto/sha/sha512.c
293
sha512_round(&a, &b, &c, &d, &e, &f, &g, &h, K512[i + 15], X[15]);
lib/libcrypto/sha/sha512.c
298
ctx->h[2] += c;
lib/libcrypto/sha/sha512.c
317
SHA384_Init(SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
319
memset(c, 0, sizeof(*c));
lib/libcrypto/sha/sha512.c
321
c->h[0] = U64(0xcbbb9d5dc1059ed8);
lib/libcrypto/sha/sha512.c
322
c->h[1] = U64(0x629a292a367cd507);
lib/libcrypto/sha/sha512.c
323
c->h[2] = U64(0x9159015a3070dd17);
lib/libcrypto/sha/sha512.c
324
c->h[3] = U64(0x152fecd8f70e5939);
lib/libcrypto/sha/sha512.c
325
c->h[4] = U64(0x67332667ffc00b31);
lib/libcrypto/sha/sha512.c
326
c->h[5] = U64(0x8eb44a8768581511);
lib/libcrypto/sha/sha512.c
327
c->h[6] = U64(0xdb0c2e0d64f98fa7);
lib/libcrypto/sha/sha512.c
328
c->h[7] = U64(0x47b5481dbefa4fa4);
lib/libcrypto/sha/sha512.c
330
c->md_len = SHA384_DIGEST_LENGTH;
lib/libcrypto/sha/sha512.c
337
SHA384_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha512.c
339
return SHA512_Update(c, data, len);
lib/libcrypto/sha/sha512.c
344
SHA384_Final(unsigned char *md, SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
346
return SHA512_Final(md, c);
lib/libcrypto/sha/sha512.c
353
SHA512_CTX c;
lib/libcrypto/sha/sha512.c
355
SHA384_Init(&c);
lib/libcrypto/sha/sha512.c
356
SHA512_Update(&c, d, n);
lib/libcrypto/sha/sha512.c
357
SHA512_Final(md, &c);
lib/libcrypto/sha/sha512.c
359
explicit_bzero(&c, sizeof(c));
lib/libcrypto/sha/sha512.c
366
SHA512_Init(SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
368
memset(c, 0, sizeof(*c));
lib/libcrypto/sha/sha512.c
370
c->h[0] = U64(0x6a09e667f3bcc908);
lib/libcrypto/sha/sha512.c
371
c->h[1] = U64(0xbb67ae8584caa73b);
lib/libcrypto/sha/sha512.c
372
c->h[2] = U64(0x3c6ef372fe94f82b);
lib/libcrypto/sha/sha512.c
373
c->h[3] = U64(0xa54ff53a5f1d36f1);
lib/libcrypto/sha/sha512.c
374
c->h[4] = U64(0x510e527fade682d1);
lib/libcrypto/sha/sha512.c
375
c->h[5] = U64(0x9b05688c2b3e6c1f);
lib/libcrypto/sha/sha512.c
376
c->h[6] = U64(0x1f83d9abfb41bd6b);
lib/libcrypto/sha/sha512.c
377
c->h[7] = U64(0x5be0cd19137e2179);
lib/libcrypto/sha/sha512.c
379
c->md_len = SHA512_DIGEST_LENGTH;
lib/libcrypto/sha/sha512.c
386
SHA512_Transform(SHA512_CTX *c, const unsigned char *data)
lib/libcrypto/sha/sha512.c
388
sha512_block_data_order(c, data, 1);
lib/libcrypto/sha/sha512.c
393
SHA512_Update(SHA512_CTX *c, const void *_data, size_t len)
lib/libcrypto/sha/sha512.c
396
unsigned char *p = c->u.p;
lib/libcrypto/sha/sha512.c
402
l = (c->Nl + (((SHA_LONG64)len) << 3))&U64(0xffffffffffffffff);
lib/libcrypto/sha/sha512.c
403
if (l < c->Nl)
lib/libcrypto/sha/sha512.c
404
c->Nh++;
lib/libcrypto/sha/sha512.c
406
c->Nh += (((SHA_LONG64)len) >> 61);
lib/libcrypto/sha/sha512.c
407
c->Nl = l;
lib/libcrypto/sha/sha512.c
409
if (c->num != 0) {
lib/libcrypto/sha/sha512.c
410
size_t n = sizeof(c->u) - c->num;
lib/libcrypto/sha/sha512.c
413
memcpy(p + c->num, data, len);
lib/libcrypto/sha/sha512.c
414
c->num += (unsigned int)len;
lib/libcrypto/sha/sha512.c
417
memcpy(p + c->num, data, n);
lib/libcrypto/sha/sha512.c
418
c->num = 0;
lib/libcrypto/sha/sha512.c
421
sha512_block_data_order(c, p, 1);
lib/libcrypto/sha/sha512.c
425
if (len >= sizeof(c->u)) {
lib/libcrypto/sha/sha512.c
426
sha512_block_data_order(c, data, len/sizeof(c->u));
lib/libcrypto/sha/sha512.c
428
len %= sizeof(c->u);
lib/libcrypto/sha/sha512.c
434
c->num = (int)len;
lib/libcrypto/sha/sha512.c
442
SHA512_Final(unsigned char *md, SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
444
unsigned char *p = (unsigned char *)c->u.p;
lib/libcrypto/sha/sha512.c
445
size_t n = c->num;
lib/libcrypto/sha/sha512.c
449
if (n > (sizeof(c->u) - 16)) {
lib/libcrypto/sha/sha512.c
450
memset(p + n, 0, sizeof(c->u) - n);
lib/libcrypto/sha/sha512.c
452
sha512_block_data_order(c, p, 1);
lib/libcrypto/sha/sha512.c
455
memset(p + n, 0, sizeof(c->u) - 16 - n);
lib/libcrypto/sha/sha512.c
456
c->u.d[SHA_LBLOCK - 2] = htobe64(c->Nh);
lib/libcrypto/sha/sha512.c
457
c->u.d[SHA_LBLOCK - 1] = htobe64(c->Nl);
lib/libcrypto/sha/sha512.c
459
sha512_block_data_order(c, p, 1);
lib/libcrypto/sha/sha512.c
465
switch (c->md_len) {
lib/libcrypto/sha/sha512.c
468
crypto_store_htobe64(md, c->h[n]);
lib/libcrypto/sha/sha512.c
471
crypto_store_htobe32(md, c->h[n] >> 32);
lib/libcrypto/sha/sha512.c
475
crypto_store_htobe64(md, c->h[n]);
lib/libcrypto/sha/sha512.c
481
crypto_store_htobe64(md, c->h[n]);
lib/libcrypto/sha/sha512.c
487
crypto_store_htobe64(md, c->h[n]);
lib/libcrypto/sha/sha512.c
502
SHA512_CTX c;
lib/libcrypto/sha/sha512.c
504
SHA512_Init(&c);
lib/libcrypto/sha/sha512.c
505
SHA512_Update(&c, d, n);
lib/libcrypto/sha/sha512.c
506
SHA512_Final(md, &c);
lib/libcrypto/sha/sha512.c
508
explicit_bzero(&c, sizeof(c));
lib/libcrypto/sha/sha512.c
515
SHA512_224_Init(SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
517
memset(c, 0, sizeof(*c));
lib/libcrypto/sha/sha512.c
520
c->h[0] = U64(0x8c3d37c819544da2);
lib/libcrypto/sha/sha512.c
521
c->h[1] = U64(0x73e1996689dcd4d6);
lib/libcrypto/sha/sha512.c
522
c->h[2] = U64(0x1dfab7ae32ff9c82);
lib/libcrypto/sha/sha512.c
523
c->h[3] = U64(0x679dd514582f9fcf);
lib/libcrypto/sha/sha512.c
524
c->h[4] = U64(0x0f6d2b697bd44da8);
lib/libcrypto/sha/sha512.c
525
c->h[5] = U64(0x77e36f7304c48942);
lib/libcrypto/sha/sha512.c
526
c->h[6] = U64(0x3f9d85a86a1d36c8);
lib/libcrypto/sha/sha512.c
527
c->h[7] = U64(0x1112e6ad91d692a1);
lib/libcrypto/sha/sha512.c
529
c->md_len = SHA512_224_DIGEST_LENGTH;
lib/libcrypto/sha/sha512.c
535
SHA512_224_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha512.c
537
return SHA512_Update(c, data, len);
lib/libcrypto/sha/sha512.c
541
SHA512_224_Final(unsigned char *md, SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
543
return SHA512_Final(md, c);
lib/libcrypto/sha/sha512.c
547
SHA512_256_Init(SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
549
memset(c, 0, sizeof(*c));
lib/libcrypto/sha/sha512.c
552
c->h[0] = U64(0x22312194fc2bf72c);
lib/libcrypto/sha/sha512.c
553
c->h[1] = U64(0x9f555fa3c84c64c2);
lib/libcrypto/sha/sha512.c
554
c->h[2] = U64(0x2393b86b6f53b151);
lib/libcrypto/sha/sha512.c
555
c->h[3] = U64(0x963877195940eabd);
lib/libcrypto/sha/sha512.c
556
c->h[4] = U64(0x96283ee2a88effe3);
lib/libcrypto/sha/sha512.c
557
c->h[5] = U64(0xbe5e1e2553863992);
lib/libcrypto/sha/sha512.c
558
c->h[6] = U64(0x2b0199fc2c85b8aa);
lib/libcrypto/sha/sha512.c
559
c->h[7] = U64(0x0eb72ddc81c52ca2);
lib/libcrypto/sha/sha512.c
561
c->md_len = SHA512_256_DIGEST_LENGTH;
lib/libcrypto/sha/sha512.c
567
SHA512_256_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha512.c
569
return SHA512_Update(c, data, len);
lib/libcrypto/sha/sha512.c
573
SHA512_256_Final(unsigned char *md, SHA512_CTX *c)
lib/libcrypto/sha/sha512.c
575
return SHA512_Final(md, c);
lib/libcrypto/sha/sha_internal.h
26
int SHA512_224_Init(SHA512_CTX *c);
lib/libcrypto/sha/sha_internal.h
27
int SHA512_224_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha_internal.h
29
int SHA512_224_Final(unsigned char *md, SHA512_CTX *c);
lib/libcrypto/sha/sha_internal.h
31
int SHA512_256_Init(SHA512_CTX *c);
lib/libcrypto/sha/sha_internal.h
32
int SHA512_256_Update(SHA512_CTX *c, const void *data, size_t len)
lib/libcrypto/sha/sha_internal.h
34
int SHA512_256_Final(unsigned char *md, SHA512_CTX *c);
lib/libcrypto/sm3/sm3.c
253
SM3_Init(SM3_CTX *c)
lib/libcrypto/sm3/sm3.c
255
memset(c, 0, sizeof(*c));
lib/libcrypto/sm3/sm3.c
257
c->A = 0x7380166fUL;
lib/libcrypto/sm3/sm3.c
258
c->B = 0x4914b2b9UL;
lib/libcrypto/sm3/sm3.c
259
c->C = 0x172442d7UL;
lib/libcrypto/sm3/sm3.c
260
c->D = 0xda8a0600UL;
lib/libcrypto/sm3/sm3.c
261
c->E = 0xa96f30bcUL;
lib/libcrypto/sm3/sm3.c
262
c->F = 0x163138aaUL;
lib/libcrypto/sm3/sm3.c
263
c->G = 0xe38dee4dUL;
lib/libcrypto/sm3/sm3.c
264
c->H = 0xb0fb0e4eUL;
lib/libcrypto/sm3/sm3.c
271
SM3_Update(SM3_CTX *c, const void *data_, size_t len)
lib/libcrypto/sm3/sm3.c
281
l = (c->Nl + (((SM3_WORD)len) << 3))&0xffffffffUL;
lib/libcrypto/sm3/sm3.c
284
if (l < c->Nl) /* overflow */
lib/libcrypto/sm3/sm3.c
285
c->Nh++;
lib/libcrypto/sm3/sm3.c
286
c->Nh+=(SM3_WORD)(len>>29); /* might cause compiler warning on 16-bit */
lib/libcrypto/sm3/sm3.c
287
c->Nl = l;
lib/libcrypto/sm3/sm3.c
289
n = c->num;
lib/libcrypto/sm3/sm3.c
291
p = (unsigned char *)c->data;
lib/libcrypto/sm3/sm3.c
295
sm3_block_data_order(c, p, 1);
lib/libcrypto/sm3/sm3.c
299
c->num = 0;
lib/libcrypto/sm3/sm3.c
303
c->num += (unsigned int)len;
lib/libcrypto/sm3/sm3.c
310
sm3_block_data_order(c, data, n);
lib/libcrypto/sm3/sm3.c
317
p = (unsigned char *)c->data;
lib/libcrypto/sm3/sm3.c
318
c->num = (unsigned int)len;
lib/libcrypto/sm3/sm3.c
326
SM3_Final(unsigned char *md, SM3_CTX *c)
lib/libcrypto/sm3/sm3.c
328
unsigned char *p = (unsigned char *)c->data;
lib/libcrypto/sm3/sm3.c
329
size_t n = c->num;
lib/libcrypto/sm3/sm3.c
337
sm3_block_data_order(c, p, 1);
lib/libcrypto/sm3/sm3.c
341
c->data[SM3_LBLOCK - 2] = htobe32(c->Nh);
lib/libcrypto/sm3/sm3.c
342
c->data[SM3_LBLOCK - 1] = htobe32(c->Nl);
lib/libcrypto/sm3/sm3.c
344
sm3_block_data_order(c, p, 1);
lib/libcrypto/sm3/sm3.c
345
c->num = 0;
lib/libcrypto/sm3/sm3.c
348
crypto_store_htobe32(&md[0 * 4], c->A);
lib/libcrypto/sm3/sm3.c
349
crypto_store_htobe32(&md[1 * 4], c->B);
lib/libcrypto/sm3/sm3.c
350
crypto_store_htobe32(&md[2 * 4], c->C);
lib/libcrypto/sm3/sm3.c
351
crypto_store_htobe32(&md[3 * 4], c->D);
lib/libcrypto/sm3/sm3.c
352
crypto_store_htobe32(&md[4 * 4], c->E);
lib/libcrypto/sm3/sm3.c
353
crypto_store_htobe32(&md[5 * 4], c->F);
lib/libcrypto/sm3/sm3.c
354
crypto_store_htobe32(&md[6 * 4], c->G);
lib/libcrypto/sm3/sm3.c
355
crypto_store_htobe32(&md[7 * 4], c->H);
lib/libcrypto/sm3/sm3.h
41
int SM3_Init(SM3_CTX *c);
lib/libcrypto/sm3/sm3.h
42
int SM3_Update(SM3_CTX *c, const void *data, size_t len);
lib/libcrypto/sm3/sm3.h
43
int SM3_Final(unsigned char *md, SM3_CTX *c);
lib/libcrypto/stack/stack.c
120
sk_new(int (*c)(const void *, const void *))
lib/libcrypto/stack/stack.c
131
ret->comp = c;
lib/libcrypto/stack/stack.c
205
int l, h, i, c;
lib/libcrypto/stack/stack.c
211
if ((c = cmp(key, &base[i * size])) == 0) {
lib/libcrypto/stack/stack.c
217
if (c < 0)
lib/libcrypto/stack/stack.c
72
(*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))(
lib/libcrypto/stack/stack.c
77
if (sk->comp != c)
lib/libcrypto/stack/stack.c
79
sk->comp = c;
lib/libcrypto/stack/stack.h
89
int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))(
lib/libcrypto/x509/x509_addr.c
1791
int p, c;
lib/libcrypto/x509/x509_addr.c
1799
for (c = 0; c < sk_IPAddressOrRange_num(child); c++) {
lib/libcrypto/x509/x509_addr.c
1800
child_aor = sk_IPAddressOrRange_value(child, c);
lib/libcrypto/x509/x509_asid.c
1002
int p, c;
lib/libcrypto/x509/x509_asid.c
1011
for (c = 0; c < sk_ASIdOrRange_num(child); c++) {
lib/libcrypto/x509/x509_asid.c
1012
if (!extract_min_max(sk_ASIdOrRange_value(child, c), &c_min,
lib/libcrypto/x509/x509_constraints.c
223
uint8_t prev, c = 0;
lib/libcrypto/x509/x509_constraints.c
234
prev = c;
lib/libcrypto/x509/x509_constraints.c
235
if (!CBS_get_u8(©, &c))
lib/libcrypto/x509/x509_constraints.c
241
if (!isascii(c) || c == '\0')
lib/libcrypto/x509/x509_constraints.c
244
if (!isalnum(c) && c != '-' && c != '.' && c != '_' && c != '*')
lib/libcrypto/x509/x509_constraints.c
248
if (!wildcards && c == '*')
lib/libcrypto/x509/x509_constraints.c
252
if (c == '-' && (component == 0 || i == len - 1))
lib/libcrypto/x509/x509_constraints.c
259
if (c == '.' && ((component == 0 && !first) || i == len - 1))
lib/libcrypto/x509/x509_constraints.c
262
if (c == '.') {
lib/libcrypto/x509/x509_constraints.c
325
local_part_ok(char c)
lib/libcrypto/x509/x509_constraints.c
327
return (('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||
lib/libcrypto/x509/x509_constraints.c
328
('A' <= c && c <= 'Z') || c == '!' || c == '#' || c == '$' ||
lib/libcrypto/x509/x509_constraints.c
329
c == '%' || c == '&' || c == '\'' || c == '*' || c == '+' ||
lib/libcrypto/x509/x509_constraints.c
330
c == '-' || c == '/' || c == '=' || c == '?' || c == '^' ||
lib/libcrypto/x509/x509_constraints.c
331
c == '_' || c == '`' || c == '{' || c == '|' || c == '}' ||
lib/libcrypto/x509/x509_constraints.c
332
c == '~' || c == '.');
lib/libcrypto/x509/x509_constraints.c
368
char c;
lib/libcrypto/x509/x509_constraints.c
369
if (!CBS_get_u8(©, &c))
lib/libcrypto/x509/x509_constraints.c
372
if (!isascii(c) || c == '\r' || c == '\n' || c == '\0')
lib/libcrypto/x509/x509_constraints.c
376
if (c == '"')
lib/libcrypto/x509/x509_constraints.c
379
if (c == '.')
lib/libcrypto/x509/x509_constraints.c
385
working[wi++] = c;
lib/libcrypto/x509/x509_constraints.c
393
working[wi++] = c;
lib/libcrypto/x509/x509_constraints.c
410
if (c == '\\') {
lib/libcrypto/x509/x509_constraints.c
414
if (c == '"' && i != 0) {
lib/libcrypto/x509/x509_constraints.c
427
if (c == 9)
lib/libcrypto/x509/x509_constraints.c
431
working[wi++] = c;
lib/libcrypto/x509/x509_constraints.c
434
if (c == '@') {
lib/libcrypto/x509/x509_constraints.c
446
if (c == '\\') {
lib/libcrypto/x509/x509_constraints.c
459
if (!local_part_ok(c))
lib/libcrypto/x509/x509_constraints.c
463
working[wi++] = c;
lib/libcrypto/x509/x509_utl.c
1434
unsigned char c;
lib/libcrypto/x509/x509_utl.c
1440
c = *in++;
lib/libcrypto/x509/x509_utl.c
1442
if ((c >= '0') && (c <= '9'))
lib/libcrypto/x509/x509_utl.c
1443
num |= c - '0';
lib/libcrypto/x509/x509_utl.c
1444
else if ((c >= 'A') && (c <= 'F'))
lib/libcrypto/x509/x509_utl.c
1445
num |= c - 'A' + 10;
lib/libcrypto/x509/x509_utl.c
1446
else if ((c >= 'a') && (c <= 'f'))
lib/libcrypto/x509/x509_utl.c
1447
num |= c - 'a' + 10;
lib/libcrypto/x509/x509_utl.c
359
char *p, *q, c;
lib/libcrypto/x509/x509_utl.c
374
for (p = linebuf, q = linebuf; (c = *p) && (c != '\r') &&
lib/libcrypto/x509/x509_utl.c
375
(c != '\n'); p++) {
lib/libcrypto/x509/x509_utl.c
379
if (c == ':') {
lib/libcrypto/x509/x509_utl.c
388
} else if (c == ',') {
lib/libcrypto/x509/x509_utl.c
402
if (c == ',') {
lib/libcrypto/x509/x509_utl.c
476
uint8_t c;
lib/libcrypto/x509/x509_utl.c
487
if (!CBS_get_u8(&cbs, &c))
lib/libcrypto/x509/x509_utl.c
489
if (!CBB_add_u8(&cbb, hex_digits[c >> 4]))
lib/libcrypto/x509/x509_utl.c
491
if (!CBB_add_u8(&cbb, hex_digits[c & 0xf]))
lib/libcrypto/x509/x509_utl.c
515
uint8_t c;
lib/libcrypto/x509/x509_utl.c
518
if (!CBS_peek_u8(cbs, &c))
lib/libcrypto/x509/x509_utl.c
520
if (c != ':')
lib/libcrypto/x509/x509_utl.c
522
if (!CBS_get_u8(cbs, &c))
lib/libcrypto/x509/x509_utl.c
532
uint8_t c;
lib/libcrypto/x509/x509_utl.c
534
if (!CBS_get_u8(cbs, &c))
lib/libcrypto/x509/x509_utl.c
537
if (c >= '0' && c <= '9') {
lib/libcrypto/x509/x509_utl.c
538
*out_nibble = c - '0';
lib/libcrypto/x509/x509_utl.c
541
if (c >= 'a' && c <= 'f') {
lib/libcrypto/x509/x509_utl.c
542
*out_nibble = c - 'a' + 10;
lib/libcrypto/x509/x509_utl.c
545
if (c >= 'A' && c <= 'F') {
lib/libcrypto/x509/x509_utl.c
546
*out_nibble = c - 'A' + 10;
lib/libcrypto/x509/x509_utl.c
621
char c;
lib/libcrypto/x509/x509_utl.c
626
c = name[len];
lib/libcrypto/x509/x509_utl.c
627
if (!c || (c=='.'))
lib/libcrypto/x509/x509_vfy.h
387
void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x);
lib/libcrypto/x509/x509_vfy.h
388
void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk);
lib/libcrypto/x509/x509_vfy.h
389
void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c,STACK_OF(X509_CRL) *sk);
lib/libcrypto/x509/x509cset.c
157
X509_CRL_sort(X509_CRL *c)
lib/libcrypto/x509/x509cset.c
159
sk_X509_REVOKED_sort(c->crl->revoked);
lib/libcrypto/x509/x509cset.c
160
c->crl->enc.modified = 1;
lib/libcurses/base/keyok.c
101
keyok(int c, bool flag)
lib/libcurses/base/keyok.c
103
return NCURSES_SP_NAME(keyok) (CURRENT_SCREEN, c, flag);
lib/libcurses/base/keyok.c
52
NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
lib/libcurses/base/keyok.c
57
T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
lib/libcurses/base/keyok.c
59
code = CallDriver_2(sp, td_kyOk, c, flag);
lib/libcurses/base/keyok.c
61
if (c >= 0) {
lib/libcurses/base/keyok.c
64
unsigned ch = (unsigned) c;
lib/libcurses/base/lib_addch.c
551
_nc_waddch_nosync(WINDOW *win, const NCURSES_CH_T c)
lib/libcurses/base/lib_addch.c
554
return (waddch_nosync(win, c));
lib/libcurses/base/lib_bkgd.c
131
#define TraceChar(c) _tracecchar_t2(1, &(c))
lib/libcurses/base/lib_bkgd.c
138
#define TraceChar(c) _tracechar(CharOf(c))
lib/libcurses/base/lib_color.c
171
toggled_colors(int c)
lib/libcurses/base/lib_color.c
173
if (c < 16) {
lib/libcurses/base/lib_color.c
177
c = table[c];
lib/libcurses/base/lib_color.c
179
return c;
lib/libcurses/base/lib_insch.c
150
winsch(WINDOW *win, chtype c)
lib/libcurses/base/lib_insch.c
154
T((T_CALLED("winsch(%p, %s)"), (void *) win, _tracechtype(c)));
lib/libcurses/base/lib_insch.c
160
code = _nc_insert_ch(_nc_screen_of(win), win, c);
lib/libcurses/base/lib_mouse.c
1210
#define isInter(c) ((c) >= 0x20 && (c) <= 0x2f)
lib/libcurses/base/lib_mouse.c
1211
#define isParam(c) ((c) >= 0x30 && (c) <= 0x3f)
lib/libcurses/base/lib_mouse.c
1212
#define isFinal(c) ((c) >= 0x40 && (c) <= 0x7e)
lib/libcurses/base/lib_newwin.c
247
subwin(WINDOW *w, int l, int c, int y, int x)
lib/libcurses/base/lib_newwin.c
251
T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), (void *) w, l, c, y, x));
lib/libcurses/base/lib_newwin.c
255
result = derwin(w, l, c, y - w->_begy, x - w->_begx);
lib/libcurses/base/lib_pad.c
51
NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
lib/libcurses/base/lib_pad.c
57
T((T_CALLED("newpad(%p,%d, %d)"), (void *) SP_PARM, l, c));
lib/libcurses/base/lib_pad.c
59
if (l <= 0 || c <= 0)
lib/libcurses/base/lib_pad.c
62
win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx l, c, 0, 0, _ISPAD);
lib/libcurses/base/lib_pad.c
68
if ((win->_line[i].text = typeCalloc(NCURSES_CH_T, ((size_t) c))) == 0) {
lib/libcurses/base/lib_pad.c
72
for (ptr = win->_line[i].text; ptr < win->_line[i].text + c; ptr++)
lib/libcurses/base/lib_pad.c
81
newpad(int l, int c)
lib/libcurses/base/lib_pad.c
83
return NCURSES_SP_NAME(newpad) (CURRENT_SCREEN, l, c);
lib/libcurses/base/lib_pad.c
88
subpad(WINDOW *orig, int l, int c, int begy, int begx)
lib/libcurses/base/lib_pad.c
92
T((T_CALLED("subpad(%d, %d)"), l, c));
lib/libcurses/base/lib_pad.c
96
|| ((win = derwin(orig, l, c, begy, begx)) == NULL))
lib/libcurses/build.priv.h
82
#define UChar(c) ((unsigned char)(c))
lib/libcurses/curses.h
1239
#define touchline(win, s, c) wtouchln((win), s, c, 1)
lib/libcurses/curses.h
1276
#define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o))
lib/libcurses/curses.h
1282
#define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o))
lib/libcurses/curses.h
1286
#define color_set(c,o) wcolor_set(stdscr,(c),(o))
lib/libcurses/curses.h
1289
#define echochar(c) wechochar(stdscr,(c))
lib/libcurses/curses.h
1297
#define insch(c) winsch(stdscr,(c))
lib/libcurses/curses.h
1322
#define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o)))
lib/libcurses/curses.h
1327
#define mvwhline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : whline((win),(c),(n)))
lib/libcurses/curses.h
1332
#define mvwinsch(win,y,x,c) (wmove((win),(y),(x)) == ERR ? ERR : winsch((win),(c)))
lib/libcurses/curses.h
1336
#define mvwvline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : wvline((win),(c),(n)))
lib/libcurses/curses.h
1343
#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,(y),(x),(n),(a),(c),(o))
lib/libcurses/curses.h
1348
#define mvhline(y,x,c,n) mvwhline(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1353
#define mvinsch(y,x,c) mvwinsch(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1357
#define mvvline(y,x,c,n) mvwvline(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1425
#define vsscanf(a,b,c) _nc_vsscanf(a,b,c)
lib/libcurses/curses.h
1633
#define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))])
lib/libcurses/curses.h
1855
#define add_wch(c) wadd_wch(stdscr,(c))
lib/libcurses/curses.h
1860
#define bkgrnd(c) wbkgrnd(stdscr,(c))
lib/libcurses/curses.h
1861
#define bkgrndset(c) wbkgrndset(stdscr,(c))
lib/libcurses/curses.h
1864
#define echo_wchar(c) wecho_wchar(stdscr,(c))
lib/libcurses/curses.h
1865
#define get_wch(c) wget_wch(stdscr,(c))
lib/libcurses/curses.h
1869
#define hline_set(c,n) whline_set(stdscr,(c),(n))
lib/libcurses/curses.h
1870
#define in_wch(c) win_wch(stdscr,(c))
lib/libcurses/curses.h
1871
#define in_wchnstr(c,n) win_wchnstr(stdscr,(c),(n))
lib/libcurses/curses.h
1872
#define in_wchstr(c) win_wchstr(stdscr,(c))
lib/libcurses/curses.h
1873
#define innwstr(c,n) winnwstr(stdscr,(c),(n))
lib/libcurses/curses.h
1875
#define ins_wch(c) wins_wch(stdscr,(c))
lib/libcurses/curses.h
1877
#define inwstr(c) winwstr(stdscr,(c))
lib/libcurses/curses.h
1878
#define vline_set(c,n) wvline_set(stdscr,(c),(n))
lib/libcurses/curses.h
1882
#define win_wchstr(w,c) win_wchnstr((w),(c),-1)
lib/libcurses/curses.h
1889
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1894
#define mvget_wch(y,x,c) mvwget_wch(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1897
#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1898
#define mvin_wch(y,x,c) mvwin_wch(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1899
#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1900
#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1901
#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1903
#define mvins_wch(y,x,c) mvwins_wch(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1905
#define mvinwstr(y,x,c) mvwinwstr(stdscr,(y),(x),(c))
lib/libcurses/curses.h
1906
#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,(y),(x),(c),(n))
lib/libcurses/curses.h
1908
#define mvwadd_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wch((win),(c)))
lib/libcurses/curses.h
1913
#define mvwget_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wget_wch((win),(c)))
lib/libcurses/curses.h
1916
#define mvwhline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : whline_set((win),(c),(n)))
lib/libcurses/curses.h
1917
#define mvwin_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wch((win),(c)))
lib/libcurses/curses.h
1918
#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : win_wchnstr((win),(c),(n)))
lib/libcurses/curses.h
1919
#define mvwin_wchstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wchstr((win),(c)))
lib/libcurses/curses.h
1920
#define mvwinnwstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : winnwstr((win),(c),(n)))
lib/libcurses/curses.h
1922
#define mvwins_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wins_wch((win),(c)))
lib/libcurses/curses.h
1924
#define mvwinwstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : winwstr((win),(c)))
lib/libcurses/curses.h
1925
#define mvwvline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : wvline_set((win),(c),(n)))
lib/libcurses/curses.h
349
#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,(c))])
lib/libcurses/curses.priv.h
1292
#define is7bits(c) ((unsigned)(c) < 128)
lib/libcurses/curses.priv.h
1295
#define is8bits(c) ((unsigned)(c) <= UCHAR_MAX)
lib/libcurses/curses.priv.h
1359
#define UChar(c) ((unsigned char)(c))
lib/libcurses/curses.priv.h
1360
#define UShort(c) ((unsigned short)(c))
lib/libcurses/curses.priv.h
1361
#define ChCharOf(c) ((chtype)(c) & (chtype)A_CHARTEXT)
lib/libcurses/curses.priv.h
1362
#define ChAttrOf(c) ((chtype)(c) & (chtype)A_ATTRIBUTES)
lib/libcurses/curses.priv.h
1364
#define TR_PUTC(c) TR(TRACE_CHARPUT, ("PUTC %#x", UChar(c)))
lib/libcurses/curses.priv.h
1383
#define CharOf(c) ((c).chars[0])
lib/libcurses/curses.priv.h
1384
#define AttrOf(c) ((c).attr)
lib/libcurses/curses.priv.h
1386
#define AddAttr(c,a) AttrOf(c) |= ((a) & A_ATTRIBUTES)
lib/libcurses/curses.priv.h
1387
#define RemAttr(c,a) AttrOf(c) &= ~((a) & A_ATTRIBUTES)
lib/libcurses/curses.priv.h
1388
#define SetAttr(c,a) AttrOf(c) = ((a) & A_ATTRIBUTES) | WidecExt(c)
lib/libcurses/curses.priv.h
1390
#define NewChar2(c,a) { a, { c, NulChar } NulColor }
lib/libcurses/curses.priv.h
1407
#define SetChar(ch,c,a) do { \
lib/libcurses/curses.priv.h
1410
_cp->chars[0] = (wchar_t) (c); \
lib/libcurses/curses.priv.h
1477
#define CharOf(c) ChCharOf(c)
lib/libcurses/curses.priv.h
1478
#define AttrOf(c) ChAttrOf(c)
lib/libcurses/curses.priv.h
1479
#define AddAttr(c,a) c |= (a)
lib/libcurses/curses.priv.h
1480
#define RemAttr(c,a) c &= ~((a) & A_ATTRIBUTES)
lib/libcurses/curses.priv.h
1481
#define SetAttr(c,a) c = ((c) & ~A_ATTRIBUTES) | (a)
lib/libcurses/curses.priv.h
1483
#define NewChar2(c,a) ((c) | (a))
lib/libcurses/curses.priv.h
1485
#define SetChar(ch,c,a) ch = (c) | (a)
lib/libcurses/curses.priv.h
1807
#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress)
lib/libcurses/curses.priv.h
1843
#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
lib/libcurses/curses.priv.h
1845
VIDPUTS(sp, AttrOf(c), GetPair(c)); \
lib/libcurses/curses.priv.h
1856
#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
lib/libcurses/curses.priv.h
1857
VIDPUTS(sp, AttrOf(c), GetPair(c)); \
lib/libcurses/curses.priv.h
1896
#define UpdateAttrs(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c))
lib/libcurses/curses.priv.h
1901
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c);
lib/libcurses/curses.priv.h
526
#define SetPair2(c,a,p) c = (p), \
lib/libcurses/curses.priv.h
527
a = (unColor2(a) | ColorPair(oldColor(c)))
lib/libcurses/curses.priv.h
529
#define GetPair2(c,a) ((c) ? (c) : PairNumber(a))
lib/libcurses/curses.priv.h
675
# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
lib/libcurses/curses.priv.h
698
# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
lib/libcurses/curses.priv.h
771
#define isDefaultColor(c) ((c) < 0)
lib/libcurses/curses.priv.h
888
#define isoctal(c) ((c) >= '0' && (c) <= '7')
lib/libcurses/nc_tparm.h
58
#define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
lib/libcurses/nc_tparm.h
61
#define TPARM_8(a,b,c,d,e,f,g,h,i) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i))
lib/libcurses/nc_tparm.h
62
#define TPARM_7(a,b,c,d,e,f,g,h) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h))
lib/libcurses/nc_tparm.h
63
#define TPARM_6(a,b,c,d,e,f,g) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g))
lib/libcurses/nc_tparm.h
64
#define TPARM_5(a,b,c,d,e,f) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f))
lib/libcurses/nc_tparm.h
65
#define TPARM_4(a,b,c,d,e) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e))
lib/libcurses/nc_tparm.h
66
#define TPARM_3(a,b,c,d) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d))
lib/libcurses/nc_tparm.h
67
#define TPARM_2(a,b,c) tparm(a,TPARM_N(b),TPARM_N(c))
lib/libcurses/nc_tparm.h
71
#define TPARM_8(a,b,c,d,e,f,g,h,i) TPARM_9(a,b,c,d,e,f,g,h,i,0)
lib/libcurses/nc_tparm.h
72
#define TPARM_7(a,b,c,d,e,f,g,h) TPARM_8(a,b,c,d,e,f,g,h,0)
lib/libcurses/nc_tparm.h
73
#define TPARM_6(a,b,c,d,e,f,g) TPARM_7(a,b,c,d,e,f,g,0)
lib/libcurses/nc_tparm.h
74
#define TPARM_5(a,b,c,d,e,f) TPARM_6(a,b,c,d,e,f,0)
lib/libcurses/nc_tparm.h
75
#define TPARM_4(a,b,c,d,e) TPARM_5(a,b,c,d,e,0)
lib/libcurses/nc_tparm.h
76
#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0)
lib/libcurses/nc_tparm.h
77
#define TPARM_2(a,b,c) TPARM_3(a,b,c,0)
lib/libcurses/nc_tparm.h
86
#define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)
lib/libcurses/nc_tparm.h
87
#define TIPARM_4(s,a,b,c,d) _nc_tiparm(4,s,a,b,c,d)
lib/libcurses/nc_tparm.h
88
#define TIPARM_5(s,a,b,c,d,e) _nc_tiparm(5,s,a,b,c,d,e)
lib/libcurses/nc_tparm.h
89
#define TIPARM_6(s,a,b,c,d,e,f) _nc_tiparm(6,s,a,b,c,d,e,f)
lib/libcurses/nc_tparm.h
90
#define TIPARM_7(s,a,b,c,d,e,f,g) _nc_tiparm(7,s,a,b,c,d,e,f,g)
lib/libcurses/nc_tparm.h
91
#define TIPARM_8(s,a,b,c,d,e,f,g,h) _nc_tiparm(8,s,a,b,c,d,e,f,g,h)
lib/libcurses/nc_tparm.h
92
#define TIPARM_9(s,a,b,c,d,e,f,g,h,i) _nc_tiparm(9,s,a,b,c,d,e,f,g,h,i)
lib/libcurses/new_pair.h
106
#define FORE_OF(c) (c).fg
lib/libcurses/new_pair.h
107
#define BACK_OF(c) (c).bg
lib/libcurses/tinfo/access.c
59
#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
lib/libcurses/tinfo/captoinfo.c
1020
int c, tc = FALSE;
lib/libcurses/tinfo/captoinfo.c
1022
while ((c = getopt(argc, argv, "c")) != EOF)
lib/libcurses/tinfo/captoinfo.c
1023
switch (c) {
lib/libcurses/tinfo/captoinfo.c
152
save_char(char *s, int c)
lib/libcurses/tinfo/captoinfo.c
155
temp[0] = (char) c;
lib/libcurses/tinfo/captoinfo.c
187
unsigned char c = 0;
lib/libcurses/tinfo/captoinfo.c
197
c = UChar(*sp);
lib/libcurses/tinfo/captoinfo.c
201
c = '\\';
lib/libcurses/tinfo/captoinfo.c
210
c = UChar(8 * c + (*sp++ - '0'));
lib/libcurses/tinfo/captoinfo.c
215
c = UChar(*sp);
lib/libcurses/tinfo/captoinfo.c
216
len = (c != '\0') ? 2 : 1;
lib/libcurses/tinfo/captoinfo.c
222
c = UChar(*++sp);
lib/libcurses/tinfo/captoinfo.c
223
if (c == '?') {
lib/libcurses/tinfo/captoinfo.c
224
c = 127;
lib/libcurses/tinfo/captoinfo.c
225
} else if (c == '\0') {
lib/libcurses/tinfo/captoinfo.c
228
c &= 0x1f;
lib/libcurses/tinfo/captoinfo.c
232
c = UChar(*sp);
lib/libcurses/tinfo/captoinfo.c
233
len = (c != '\0') ? 1 : 0;
lib/libcurses/tinfo/captoinfo.c
235
if (isgraph(c) && c != ',' && c != '\'' && c != '\\' && c != ':') {
lib/libcurses/tinfo/captoinfo.c
237
dp = save_char(dp, c);
lib/libcurses/tinfo/captoinfo.c
239
} else if (c != '\0') {
lib/libcurses/tinfo/captoinfo.c
241
if (c > 99)
lib/libcurses/tinfo/captoinfo.c
242
dp = save_char(dp, c / 100 + '0');
lib/libcurses/tinfo/captoinfo.c
243
if (c > 9)
lib/libcurses/tinfo/captoinfo.c
244
dp = save_char(dp, ((int) (c / 10)) % 10 + '0');
lib/libcurses/tinfo/captoinfo.c
245
dp = save_char(dp, c % 10 + '0');
lib/libcurses/tinfo/captoinfo.c
614
#define octal_fixup(n, c) fixups[n].ch = ((fixups[n].ch << 3) | ((c) - '0'))
lib/libcurses/tinfo/comp_expand.c
185
#define UnCtl(c) ((c) + '@')
lib/libcurses/tinfo/comp_scan.c
1008
return (c);
lib/libcurses/tinfo/comp_scan.c
1046
int c = next_char();
lib/libcurses/tinfo/comp_scan.c
1047
if (c == ch)
lib/libcurses/tinfo/comp_scan.c
1049
if (c == EOF)
lib/libcurses/tinfo/comp_scan.c
303
push_back(int c)
lib/libcurses/tinfo/comp_scan.c
308
*--bufptr = (char) c;
lib/libcurses/tinfo/comp_scan.c
843
int i, c;
lib/libcurses/tinfo/comp_scan.c
848
while ((c = next_char()) != separator && c != EOF) {
lib/libcurses/tinfo/comp_scan.c
850
if (c != EOF) {
lib/libcurses/tinfo/comp_scan.c
851
while ((c = next_char()) != separator && c != EOF) {
lib/libcurses/tinfo/comp_scan.c
857
if ((_nc_syntax == SYN_TERMCAP) && c == '\n')
lib/libcurses/tinfo/comp_scan.c
859
if (c == '^' && last_ch != '%') {
lib/libcurses/tinfo/comp_scan.c
860
c = next_char();
lib/libcurses/tinfo/comp_scan.c
861
if (c == EOF)
lib/libcurses/tinfo/comp_scan.c
864
if (!(is7bits(c) && isprint(c))) {
lib/libcurses/tinfo/comp_scan.c
865
_nc_warning("Illegal ^ character - '%s'", unctrl(UChar(c)));
lib/libcurses/tinfo/comp_scan.c
867
if (c == '?' && (_nc_syntax != SYN_TERMCAP)) {
lib/libcurses/tinfo/comp_scan.c
870
if ((c &= 037) == 0)
lib/libcurses/tinfo/comp_scan.c
871
c = 128;
lib/libcurses/tinfo/comp_scan.c
872
*(ptr++) = (char) (c);
lib/libcurses/tinfo/comp_scan.c
874
} else if (c == '\\') {
lib/libcurses/tinfo/comp_scan.c
877
c = next_char();
lib/libcurses/tinfo/comp_scan.c
878
if (c == EOF)
lib/libcurses/tinfo/comp_scan.c
881
if (isoctal(c) || (strict_bsd && isdigit(c))) {
lib/libcurses/tinfo/comp_scan.c
882
number = c - '0';
lib/libcurses/tinfo/comp_scan.c
884
c = next_char();
lib/libcurses/tinfo/comp_scan.c
885
if (c == EOF)
lib/libcurses/tinfo/comp_scan.c
888
if (!isoctal(c)) {
lib/libcurses/tinfo/comp_scan.c
889
if (isdigit(c)) {
lib/libcurses/tinfo/comp_scan.c
891
_nc_warning("Non-octal digit `%c' in \\ sequence", c);
lib/libcurses/tinfo/comp_scan.c
895
push_back(c);
lib/libcurses/tinfo/comp_scan.c
900
number = number * 8 + c - '0';
lib/libcurses/tinfo/comp_scan.c
908
switch (c) {
lib/libcurses/tinfo/comp_scan.c
950
switch (c) {
lib/libcurses/tinfo/comp_scan.c
952
c = '\007';
lib/libcurses/tinfo/comp_scan.c
955
c = '\033';
lib/libcurses/tinfo/comp_scan.c
958
c = '\n';
lib/libcurses/tinfo/comp_scan.c
961
c = ' ';
lib/libcurses/tinfo/comp_scan.c
964
c = ':';
lib/libcurses/tinfo/comp_scan.c
968
unctrl(UChar(c)));
lib/libcurses/tinfo/comp_scan.c
974
*(ptr++) = (char) c;
lib/libcurses/tinfo/comp_scan.c
979
else if (c == '\n' && (_nc_syntax == SYN_TERMINFO)) {
lib/libcurses/tinfo/comp_scan.c
986
*(ptr++) = (char) c;
lib/libcurses/tinfo/comp_scan.c
991
push_back(c);
lib/libcurses/tinfo/comp_scan.c
992
c = '\n';
lib/libcurses/tinfo/comp_scan.c
995
last_ch = c;
lib/libcurses/tinfo/lib_acs.c
66
NCURSES_SP_NAME(_nc_acs_char) (NCURSES_SP_DCLx int c)
lib/libcurses/tinfo/lib_acs.c
69
if (c < 0 || c >= ACS_LEN)
lib/libcurses/tinfo/lib_acs.c
78
return map[c];
lib/libcurses/tinfo/lib_tparm.c
130
#define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
lib/libcurses/tinfo/lib_tparm.c
131
#define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
lib/libcurses/tinfo/lib_tparm.c
274
#define save_char(tps, c) \
lib/libcurses/tinfo/lib_tparm.c
277
TPS(out_buff)[TPS(out_used)++] = (char) ((c == 0) ? 0200 : c); \
lib/libcurses/tinfo/lib_tparm.c
282
(save_char) (TPARM_STATE *tps, int c) {
lib/libcurses/tinfo/lib_tparm.c
283
save_char(tps, c);
lib/libcurses/tinfo/lib_tputs.c
442
_nc_outc_wrapper(SCREEN *sp, int c)
lib/libcurses/tinfo/lib_tputs.c
445
return fputc(c, stdout);
lib/libcurses/tinfo/lib_tputs.c
447
return sp->jump(c);
lib/libcurses/tinfo/make_keys.c
47
#include <names.c>
lib/libcurses/tinfo/read_termcap.c
347
register int c;
lib/libcurses/tinfo/read_termcap.c
386
c = *bp++;
lib/libcurses/tinfo/read_termcap.c
387
if (c == '\n') {
lib/libcurses/tinfo/read_termcap.c
399
*rp++ = (char) c;
lib/libcurses/tinfo/tinfo_driver.c
1369
drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int c, int flag)
lib/libcurses/tinfo/tinfo_driver.c
1379
if (c >= 0) {
lib/libcurses/tinfo/tinfo_driver.c
1380
unsigned ch = (unsigned) c;
lib/libcurses/tinfo/tinfo_driver.c
292
toggled_colors(int c)
lib/libcurses/tinfo/tinfo_driver.c
294
if (c < 16) {
lib/libcurses/tinfo/tinfo_driver.c
298
c = table[c];
lib/libcurses/tinfo/tinfo_driver.c
300
return c;
lib/libcurses/tinfo/tinfo_driver.c
545
drv_getsize(TERMINAL_CONTROL_BLOCK * TCB, int *l, int *c)
lib/libcurses/tinfo/tinfo_driver.c
548
assert(l != 0 && c != 0);
lib/libcurses/tinfo/tinfo_driver.c
550
*c = columns;
lib/libcurses/tinfo/tinfo_driver.c
555
drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c)
lib/libcurses/tinfo/tinfo_driver.c
559
columns = (short) c;
lib/libcurses/trace/visbuf.c
101
*tp++ = (char) ('@' + c);
lib/libcurses/trace/visbuf.c
104
"\\%03lo", (unsigned long) ChCharOf(c));
lib/libcurses/trace/visbuf.c
132
int c;
lib/libcurses/trace/visbuf.c
135
for (c = 0; c < NUM_VISBUFS; ++c) {
lib/libcurses/trace/visbuf.c
136
FreeAndNull(mybuf[c]);
lib/libcurses/trace/visbuf.c
146
int c;
lib/libcurses/trace/visbuf.c
149
while ((--count >= 0) && (c = *buf++) != '\0') {
lib/libcurses/trace/visbuf.c
150
tp = VisChar(tp, UChar(c), NormalLen(len));
lib/libcurses/trace/visbuf.c
218
wchar_t c;
lib/libcurses/trace/visbuf.c
221
while ((--count >= 0) && (c = *buf++) != '\0') {
lib/libcurses/trace/visbuf.c
223
int j = wctomb(temp, c), k;
lib/libcurses/trace/visbuf.c
226
"\\u%08X", (unsigned) c);
lib/libcurses/trace/visbuf.c
70
_nc_vischar(char *tp, unsigned c LIMIT_ARG)
lib/libcurses/trace/visbuf.c
74
} else if (c == '"' || c == '\\') {
lib/libcurses/trace/visbuf.c
76
*tp++ = (char) c;
lib/libcurses/trace/visbuf.c
77
} else if (is7bits((int) c) && (isgraph((int) c) || c == ' ')) {
lib/libcurses/trace/visbuf.c
78
*tp++ = (char) c;
lib/libcurses/trace/visbuf.c
79
} else if (c == '\n') {
lib/libcurses/trace/visbuf.c
82
} else if (c == '\r') {
lib/libcurses/trace/visbuf.c
85
} else if (c == '\b') {
lib/libcurses/trace/visbuf.c
88
} else if (c == '\t') {
lib/libcurses/trace/visbuf.c
91
} else if (c == '\033') {
lib/libcurses/trace/visbuf.c
94
} else if (UChar(c) == 0x7f) {
lib/libcurses/trace/visbuf.c
98
} else if (is7bits(c) && iscntrl(UChar(c))) {
lib/libcurses/tty/lib_twait.c
282
int c;
lib/libcurses/tty/lib_twait.c
293
for (c = 0; c < count; c++)
lib/libcurses/tty/lib_twait.c
294
if (fds[c].fd == ev->data.fev.fd
lib/libcurses/tty/lib_twait.c
295
&& fds[c].revents & POLLIN) {
lib/libcurses/tty/tty_display.h
123
#define UpdateAttrs(c) if (!SameAttrOf(D->_current_attr, AttrOf(c))) { \
lib/libcurses/tty/tty_display.h
125
vidattr(AttrOf(c)); \
lib/libcurses/tty/tty_display.h
136
#define UpdateAttrs(c) if (!SameAttrOf(D->_current_attr, AttrOf(c))) \
lib/libcurses/tty/tty_display.h
137
vidattr(AttrOf(c));
lib/libcurses/tty/tty_display.h
140
#define XMC_CHANGES(c) ((c) & D->_xmc_suppress)
lib/libcurses/tty/tty_update.c
1283
#define xmc_new(sp,r,c) NewScreen(sp)->_line[r].text[c]
lib/libcurses/widechar/lib_key_name.c
46
key_name(wchar_t c)
lib/libcurses/widechar/lib_key_name.c
54
my_cchar.chars[0] = c;
lib/libedit/chartype.c
174
ct_enc_width(wchar_t c)
lib/libedit/chartype.c
177
if (c < 0x80)
lib/libedit/chartype.c
179
else if (c < 0x0800)
lib/libedit/chartype.c
181
else if (c < 0x10000)
lib/libedit/chartype.c
183
else if (c < 0x110000)
lib/libedit/chartype.c
190
ct_encode_char(char *dst, size_t len, wchar_t c)
lib/libedit/chartype.c
193
if (len < ct_enc_width(c))
lib/libedit/chartype.c
195
l = wctomb(dst, c);
lib/libedit/chartype.c
255
ct_visual_width(wchar_t c)
lib/libedit/chartype.c
257
int t = ct_chr_class(c);
lib/libedit/chartype.c
267
w = wcwidth(c);
lib/libedit/chartype.c
270
if (c > 0xffff) /* prefer standard 4-byte display over 5-byte */
lib/libedit/chartype.c
281
ct_visual_char(wchar_t *dst, size_t len, wchar_t c)
lib/libedit/chartype.c
283
int t = ct_chr_class(c);
lib/libedit/chartype.c
291
if (c == '\177')
lib/libedit/chartype.c
294
*dst = c | 0100; /* uncontrolify it */
lib/libedit/chartype.c
299
*dst = c;
lib/libedit/chartype.c
304
if ((ssize_t)len < ct_visual_width(c))
lib/libedit/chartype.c
310
if (c > 0xffff) /* prefer standard 4-byte display over 5-byte */
lib/libedit/chartype.c
311
*dst++ = tohexdigit(((unsigned int) c >> 16) & 0xf);
lib/libedit/chartype.c
312
*dst++ = tohexdigit(((unsigned int) c >> 12) & 0xf);
lib/libedit/chartype.c
313
*dst++ = tohexdigit(((unsigned int) c >> 8) & 0xf);
lib/libedit/chartype.c
314
*dst++ = tohexdigit(((unsigned int) c >> 4) & 0xf);
lib/libedit/chartype.c
315
*dst = tohexdigit(((unsigned int) c ) & 0xf);
lib/libedit/chartype.c
316
return (c > 0xffff) ? 8 : 7;
lib/libedit/chartype.c
328
ct_chr_class(wchar_t c)
lib/libedit/chartype.c
330
if (c == '\t')
lib/libedit/chartype.c
332
else if (c == '\n')
lib/libedit/chartype.c
334
else if (c < 0x100 && iswcntrl(c))
lib/libedit/chartype.c
336
else if (iswprint(c))
lib/libedit/chartype.h
113
protected int ct_chr_class(wchar_t c);
lib/libedit/common.c
111
ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
138
ed_delete_next_char(EditLine *el, wint_t c)
lib/libedit/common.c
156
terminal_writec(el, c);
lib/libedit/common.c
187
ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
207
ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
229
ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
252
ed_transpose_chars(EditLine *el, wint_t c)
lib/libedit/common.c
263
c = el->el_line.cursor[-2];
lib/libedit/common.c
265
el->el_line.cursor[-1] = c;
lib/libedit/common.c
277
ed_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
305
ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
330
ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
354
ed_quoted_insert(EditLine *el, wint_t c)
lib/libedit/common.c
359
num = el_wgetc(el, &c);
lib/libedit/common.c
362
return ed_insert(el, c);
lib/libedit/common.c
372
ed_digit(EditLine *el, wint_t c)
lib/libedit/common.c
375
if (!iswdigit(c))
lib/libedit/common.c
381
el->el_state.argument = c - '0';
lib/libedit/common.c
386
(el->el_state.argument * 10) + (c - '0');
lib/libedit/common.c
391
return ed_insert(el, c);
lib/libedit/common.c
400
ed_argument_digit(EditLine *el, wint_t c)
lib/libedit/common.c
403
if (!iswdigit(c))
lib/libedit/common.c
410
(c - '0');
lib/libedit/common.c
412
el->el_state.argument = c - '0';
lib/libedit/common.c
424
ed_unassigned(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
437
wint_t c __attribute__((__unused__)))
lib/libedit/common.c
449
ed_newline(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
464
ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
483
ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
498
wint_t c __attribute__((__unused__)))
lib/libedit/common.c
510
ed_start_over(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
524
wint_t c __attribute__((__unused__)))
lib/libedit/common.c
536
ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
55
ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
572
ed_next_history(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
598
ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
665
ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
69
ed_insert(EditLine *el, wint_t c)
lib/libedit/common.c
718
ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
73
if (c == '\0')
lib/libedit/common.c
760
ed_next_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
793
ed_command(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/common.c
88
*el->el_line.cursor++ = c;
lib/libedit/common.c
95
*el->el_line.cursor++ = c;
lib/libedit/el.c
186
int c = va_arg(ap, int);
lib/libedit/el.c
188
rv = prompt_set(el, p, c, op, 1);
lib/libedit/el.c
384
wchar_t *c = va_arg(ap, wchar_t *);
lib/libedit/el.c
386
rv = prompt_get(el, p, c, op);
lib/libedit/eln.c
247
char c = va_arg(ap, int);
lib/libedit/eln.c
248
ret = prompt_set(el, p, c, op, 0);
lib/libedit/eln.c
284
char *c = va_arg(ap, char *);
lib/libedit/eln.c
287
*c = (unsigned char)wc;
lib/libedit/emacs.c
115
em_yank(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
150
em_kill_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
171
em_kill_region(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
203
em_copy_region(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
232
em_gosmacs_transpose(EditLine *el, wint_t c)
lib/libedit/emacs.c
237
c = el->el_line.cursor[-2];
lib/libedit/emacs.c
239
el->el_line.cursor[-1] = c;
lib/libedit/emacs.c
251
em_next_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
275
em_upper_case(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
298
em_capitol_case(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
329
em_lower_case(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
352
em_set_mark(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
365
em_exchange_mark(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
381
em_universal_argument(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
397
em_meta_next(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
409
em_toggle_overwrite(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
422
em_copy_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
448
em_inc_search_next(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
460
em_inc_search_prev(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
473
em_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/emacs.c
52
em_delete_or_list(EditLine *el, wint_t c)
lib/libedit/emacs.c
59
terminal_writec(el, c); /* then do an EOF */
lib/libedit/emacs.c
87
em_delete_next_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/keymacro.c
618
#define ADDC(c) \
lib/libedit/keymacro.c
620
*b++ = c; \
lib/libedit/parse.c
139
wint_t c;
lib/libedit/parse.c
150
c = '\007'; /* Bell */
lib/libedit/parse.c
153
c = '\010'; /* Backspace */
lib/libedit/parse.c
156
c = '\011'; /* Horizontal Tab */
lib/libedit/parse.c
159
c = '\012'; /* New Line */
lib/libedit/parse.c
162
c = '\013'; /* Vertical Tab */
lib/libedit/parse.c
165
c = '\014'; /* Form Feed */
lib/libedit/parse.c
168
c = '\015'; /* Carriage Return */
lib/libedit/parse.c
171
c = '\033'; /* Escape */
lib/libedit/parse.c
181
c = 0;
lib/libedit/parse.c
187
c = (c << 4) | ((int)(h - hex));
lib/libedit/parse.c
191
if (c > 0x10FFFF) /* outside valid character range */
lib/libedit/parse.c
206
for (cnt = 0, c = 0; cnt < 3; cnt++) {
lib/libedit/parse.c
212
c = (c << 3) | (ch - '0');
lib/libedit/parse.c
214
if ((c & 0xffffff00) != 0)
lib/libedit/parse.c
220
c = *p;
lib/libedit/parse.c
225
c = (*p == '?') ? '\177' : (*p & 0237);
lib/libedit/parse.c
227
c = *p;
lib/libedit/parse.c
229
return c;
lib/libedit/prompt.c
140
prompt_set(EditLine *el, el_pfunc_t prf, wchar_t c, int op, int wide)
lib/libedit/prompt.c
158
p->p_ignore = c;
lib/libedit/prompt.c
172
prompt_get(EditLine *el, el_pfunc_t *prf, wchar_t *c, int op)
lib/libedit/prompt.c
186
if (c)
lib/libedit/prompt.c
187
*c = p->p_ignore;
lib/libedit/readline.c
1835
rl_bind_key(int c, rl_command_func_t *func)
lib/libedit/readline.c
1844
e->el_map.key[c] = ED_INSERT;
lib/libedit/readline.c
1884
rl_insert(int count, int c)
lib/libedit/readline.c
1892
arr[0] = c;
lib/libedit/readline.c
1916
rl_newline(int count, int c)
lib/libedit/readline.c
1925
rl_bind_wrapper(EditLine *el, unsigned char c)
lib/libedit/readline.c
1927
if (map[c] == NULL)
lib/libedit/readline.c
1932
(*map[c])(NULL, c);
lib/libedit/readline.c
1942
rl_add_defun(const char *name, Function *fun, int c)
lib/libedit/readline.c
1945
if ((size_t)c >= sizeof(map) / sizeof(map[0]) || c < 0)
lib/libedit/readline.c
1947
map[(unsigned char)c] = fun;
lib/libedit/readline.c
1949
vis(dest, c, VIS_WHITE|VIS_NOSLASH, 0);
lib/libedit/readline.c
2061
rl_stuff_char(int c)
lib/libedit/readline.c
2065
buf[0] = c;
lib/libedit/readline.c
212
_getc_function(EditLine *el __attribute__((__unused__)), wchar_t *c)
lib/libedit/readline.c
219
*c = (wchar_t)i;
lib/libedit/readline/readline.h
83
#define CTRL(c) ((c) & 037)
lib/libedit/readline/readline.h
87
#define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit)
lib/libedit/refresh.c
1051
re_fastputc(EditLine *el, wint_t c)
lib/libedit/refresh.c
1056
w = wcwidth(c);
lib/libedit/refresh.c
1060
terminal__putc(el, c);
lib/libedit/refresh.c
1061
el->el_display[el->el_cursor.v][el->el_cursor.h++] = c;
lib/libedit/refresh.c
1108
wchar_t c;
lib/libedit/refresh.c
1111
c = el->el_line.cursor[-1];
lib/libedit/refresh.c
1113
if (c == '\t' || el->el_line.cursor != el->el_line.lastchar) {
lib/libedit/refresh.c
1123
switch (ct_chr_class(c)) {
lib/libedit/refresh.c
1128
re_fastputc(el, c);
lib/libedit/refresh.c
1134
ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
lib/libedit/refresh.c
121
re_addc(EditLine *el, wint_t c)
lib/libedit/refresh.c
123
switch (ct_chr_class(c)) {
lib/libedit/refresh.c
139
re_putc(el, c, 1);
lib/libedit/refresh.c
144
ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
lib/libedit/refresh.c
157
re_putc(EditLine *el, wint_t c, int shift)
lib/libedit/refresh.c
159
int i, w = wcwidth(c);
lib/libedit/refresh.c
160
ELRE_DEBUG(1, (__F, "printing %5x '%lc'\r\n", c, c));
lib/libedit/refresh.c
168
[el->el_refresh.r_cursor.h] = c;
lib/libedit/refresh.c
499
wchar_t *o, *n, *p, c;
lib/libedit/refresh.c
569
for (c = *ofd, n = nfd; n < nls; n++) {
lib/libedit/refresh.c
570
if (c == *n) {
lib/libedit/refresh.c
593
for (c = *nfd, o = ofd; o < ols; o++) {
lib/libedit/refresh.c
594
if (c == *o) {
lib/libedit/refresh.c
60
#define ELRE_ASSERT(a, b, c) do \
lib/libedit/refresh.c
63
c; \
lib/libedit/refresh.c
81
#define ELRE_ASSERT(a, b, c)
lib/libedit/search.c
562
cv_repeat_srch(EditLine *el, wint_t c)
lib/libedit/search.c
567
c, el->el_search.patlen, ct_encode_string(el->el_search.patbuf));
lib/libedit/search.c
570
el->el_state.lastcmd = (el_action_t) c; /* Hack to stop c_setpat */
lib/libedit/search.c
573
switch (c) {
lib/libedit/terminal.c
1206
terminal_putc(int c)
lib/libedit/terminal.c
1210
return fputc(c, terminal_outfile);
lib/libedit/terminal.c
1230
terminal__putc(EditLine *el, wint_t c)
lib/libedit/terminal.c
1234
if (c == (wint_t)MB_FILL_CHAR)
lib/libedit/terminal.c
1236
i = ct_encode_char(buf, MB_LEN_MAX, c);
lib/libedit/terminal.c
1257
terminal_writec(EditLine *el, wint_t c)
lib/libedit/terminal.c
1260
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
lib/libedit/terminal.c
393
coord_t *c = &el->el_terminal.t_size;
lib/libedit/terminal.c
397
c->h = Val(T_co);
lib/libedit/terminal.c
398
c->v = Val(T_li);
lib/libedit/terminal.c
414
coord_t *c = &el->el_terminal.t_size;
lib/libedit/terminal.c
416
b = calloc(c->v + 1, sizeof(*b));
lib/libedit/terminal.c
419
for (i = 0; i < c->v; i++) {
lib/libedit/terminal.c
420
b[i] = calloc(c->h + 1, sizeof(**b));
lib/libedit/terminal.c
428
b[c->v] = NULL;
lib/libedit/terminal.c
431
b = calloc(c->v + 1, sizeof(*b));
lib/libedit/terminal.c
434
for (i = 0; i < c->v; i++) {
lib/libedit/terminal.c
435
b[i] = calloc(c->h + 1, sizeof(**b));
lib/libedit/terminal.c
443
b[c->v] = NULL;
lib/libedit/terminal.c
668
wchar_t c;
lib/libedit/terminal.c
669
if ((c = el->el_display[el->el_cursor.v]
lib/libedit/terminal.c
671
terminal_overwrite(el, &c, 1);
lib/libedit/tokenizer.c
64
#define Strchr(s, c) strchr(s, c)
lib/libedit/tokenizer.c
71
#define Strchr(s, c) wcschr(s, c)
lib/libedit/tty.c
1259
int c = ffs((int)m->m_value);
lib/libedit/tty.c
1262
assert(c != 0);
lib/libedit/tty.c
1263
c--;
lib/libedit/tty.c
1264
c = tty__getcharindex(c);
lib/libedit/tty.c
1265
assert(c != -1);
lib/libedit/tty.c
1266
tios->c_cc[c] = v;
lib/libedit/tty.c
976
tty_update_char(EditLine *el, int mode, int c) {
lib/libedit/tty.c
977
if (!((el->el_tty.t_t[mode][MD_CHAR].t_setmask & C_SH(c)))
lib/libedit/tty.c
978
&& (el->el_tty.t_c[TS_IO][c] != el->el_tty.t_c[EX_IO][c]))
lib/libedit/tty.c
979
el->el_tty.t_c[mode][c] = el->el_tty.t_c[TS_IO][c];
lib/libedit/tty.c
980
if (el->el_tty.t_t[mode][MD_CHAR].t_clrmask & C_SH(c))
lib/libedit/tty.c
981
el->el_tty.t_c[mode][c] = el->el_tty.t_vdisable;
lib/libedit/vi.c
1048
vi_history_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
107
if (!c && el->el_line.cursor < el->el_line.lastchar)
lib/libedit/vi.c
1097
vi_redo(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
125
vi_paste_next(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
137
vi_paste_prev(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
149
vi_prev_big_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
173
vi_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
197
vi_next_big_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
220
vi_next_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
243
vi_change_case(EditLine *el, wint_t c)
lib/libedit/vi.c
252
c = *el->el_line.cursor;
lib/libedit/vi.c
253
if (iswupper(c))
lib/libedit/vi.c
254
*el->el_line.cursor = towlower(c);
lib/libedit/vi.c
255
else if (iswlower(c))
lib/libedit/vi.c
256
*el->el_line.cursor = towupper(c);
lib/libedit/vi.c
274
vi_change_meta(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
290
vi_insert_at_bol(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
305
vi_replace_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
323
vi_replace_mode(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
338
vi_substitute_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
352
vi_substitute_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
369
vi_change_to_eol(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
386
vi_insert(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
400
vi_add(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
424
vi_add_at_eol(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
439
vi_delete_meta(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
451
vi_end_big_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
474
vi_end_word(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
497
vi_undo(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
523
vi_command_mode(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
547
vi_zero(EditLine *el, wint_t c)
lib/libedit/vi.c
551
return ed_argument_digit(el, c);
lib/libedit/vi.c
567
vi_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
584
vi_list_or_eof(EditLine *el, wint_t c)
lib/libedit/vi.c
589
terminal_writec(el, c); /* then do a EOF */
lib/libedit/vi.c
61
cv_action(EditLine *el, wint_t c)
lib/libedit/vi.c
620
vi_kill_line_prev(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
640
vi_search_prev(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
652
vi_search_next(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
66
if (c != (wint_t)el->el_chared.c_vcmd.action)
lib/libedit/vi.c
664
vi_repeat_search_next(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
679
vi_repeat_search_prev(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
69
if (!(c & YANK))
lib/libedit/vi.c
696
vi_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
707
vi_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
718
vi_to_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
729
vi_to_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
740
vi_repeat_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
75
if (!(c & YANK)) {
lib/libedit/vi.c
753
vi_repeat_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
770
vi_match(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
79
if (c & INSERT)
lib/libedit/vi.c
816
vi_undo_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
829
vi_to_column(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
842
vi_yank_end(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
85
el->el_chared.c_vcmd.action = c;
lib/libedit/vi.c
855
vi_yank(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
866
vi_comment_out(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
887
vi_alias(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
916
vi_to_history_line(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libedit/vi.c
93
cv_paste(EditLine *el, wint_t c)
lib/libedit/vi.c
960
vi_histedit(EditLine *el, wint_t c __attribute__((__unused__)))
lib/libelf/elf_begin.c
34
elf_begin(int fd, Elf_Cmd c, Elf *a)
lib/libelf/elf_begin.c
45
switch (c) {
lib/libelf/elf_begin.c
71
((a->e_fd != -1 && a->e_fd != fd) || c != a->e_cmd)) {
lib/libelf/elf_begin.c
84
e = _libelf_open_object(fd, c, 1);
lib/libelf/elf_begin.c
86
e = _libelf_ar_open_member(a->e_fd, c, a);
lib/libelf/elf_cntl.c
34
elf_cntl(Elf *e, Elf_Cmd c)
lib/libelf/elf_cntl.c
37
(c != ELF_C_FDDONE && c != ELF_C_FDREAD)) {
lib/libelf/elf_cntl.c
47
if (c == ELF_C_FDREAD) {
lib/libelf/elf_flag.c
106
return (elf_flagelf(e, c, flags));
lib/libelf/elf_flag.c
110
elf_flagelf(Elf *e, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
117
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_flag.c
135
if (c == ELF_C_SET)
lib/libelf/elf_flag.c
143
elf_flagphdr(Elf *e, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
151
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_flag.c
168
return (elf_flagelf(e, c, flags));
lib/libelf/elf_flag.c
172
elf_flagscn(Elf_Scn *s, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
179
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_flag.c
185
if (c == ELF_C_SET)
lib/libelf/elf_flag.c
193
elf_flagshdr(Elf_Scn *s, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
195
return (elf_flagscn(s, c, flags));
lib/libelf/elf_flag.c
34
elf_flagarhdr(Elf_Arhdr *a, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
41
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_flag.c
47
if (c == ELF_C_SET)
lib/libelf/elf_flag.c
56
elf_flagdata(Elf_Data *d, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
64
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_flag.c
72
if (c == ELF_C_SET)
lib/libelf/elf_flag.c
81
elf_flagehdr(Elf *e, Elf_Cmd c, unsigned int flags)
lib/libelf/elf_flag.c
89
if ((c != ELF_C_SET && c != ELF_C_CLR) ||
lib/libelf/elf_update.c
1197
elf_update(Elf *e, Elf_Cmd c)
lib/libelf/elf_update.c
1206
(c != ELF_C_NULL && c != ELF_C_WRITE)) {
lib/libelf/elf_update.c
1219
if (c == ELF_C_WRITE && e->e_cmd == ELF_C_READ) {
lib/libelf/elf_update.c
1229
if (c == ELF_C_NULL)
lib/libelf/gelf_fsize.c
35
elf32_fsize(Elf_Type t, size_t c, unsigned int v)
lib/libelf/gelf_fsize.c
37
return (_libelf_fsize(t, ELFCLASS32, v, c));
lib/libelf/gelf_fsize.c
41
elf64_fsize(Elf_Type t, size_t c, unsigned int v)
lib/libelf/gelf_fsize.c
43
return (_libelf_fsize(t, ELFCLASS64, v, c));
lib/libelf/gelf_fsize.c
47
gelf_fsize(Elf *e, Elf_Type t, size_t c, unsigned int v)
lib/libelf/gelf_fsize.c
56
return (_libelf_fsize(t, e->e_class, v, c));
lib/libelf/libelf_ar.c
208
_libelf_ar_open_member(int fd, Elf_Cmd c, Elf *elf)
lib/libelf/libelf_ar.c
285
e->e_cmd = c;
lib/libelf/libelf_ar_util.c
102
if (buf[0] == '/' && (c = buf[1]) >= '0' && c <= '9') {
lib/libelf/libelf_ar_util.c
46
unsigned int c, v;
lib/libelf/libelf_ar_util.c
55
for (;s < e && (c = *s) == ' '; s++)
lib/libelf/libelf_ar_util.c
60
if ((c = *s) == ' ')
lib/libelf/libelf_ar_util.c
62
if (c < '0' || c > '9')
lib/libelf/libelf_ar_util.c
64
v = c - '0';
lib/libelf/libelf_ar_util.c
83
unsigned char c;
lib/libelf/libelf_checksum.c
34
_libelf_sum(unsigned long c, const unsigned char *s, size_t size)
lib/libelf/libelf_checksum.c
37
return (c);
lib/libelf/libelf_checksum.c
40
c += *s++;
lib/libelf/libelf_checksum.c
42
return (c);
lib/libelf/libelf_open.c
124
_libelf_open_object(int fd, Elf_Cmd c, int reporterror)
lib/libelf/libelf_open.c
133
assert(c == ELF_C_READ || c == ELF_C_RDWR || c == ELF_C_WRITE);
lib/libelf/libelf_open.c
155
if (c == ELF_C_WRITE) {
lib/libelf/libelf_open.c
160
e->e_cmd = c;
lib/libelf/libelf_open.c
238
if (c == ELF_C_RDWR && e->e_kind == ELF_K_AR) {
lib/libelf/libelf_open.c
246
e->e_cmd = c;
lib/libexpat/lib/internal.h
178
const char *unsignedCharToPrintable(unsigned char c);
lib/libexpat/lib/siphash.h
136
uint64_t c;
lib/libexpat/lib/siphash.h
199
H->c = 0;
lib/libexpat/lib/siphash.h
224
H->c += 8;
lib/libexpat/lib/siphash.h
233
uint64_t b = (H->c + left) << 56;
lib/libexpat/lib/xmlparse.c
2928
#define V1(a, b, c) XML_L(#a) XML_L(".") XML_L(#b) XML_L(".") XML_L(#c)
lib/libexpat/lib/xmlparse.c
2929
#define V2(a, b, c) XML_L("expat_") V1(a, b, c)
lib/libexpat/lib/xmlparse.c
3291
XML_Char c = 0xA;
lib/libexpat/lib/xmlparse.c
3293
parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
lib/libexpat/lib/xmlparse.c
3622
XML_Char c = 0xA;
lib/libexpat/lib/xmlparse.c
3624
parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
lib/libexpat/lib/xmlparse.c
4602
XML_Char c = 0xA;
lib/libexpat/lib/xmlparse.c
4604
parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
lib/libexpat/lib/xmlparse.c
657
static bool poolAppendChar(STRING_POOL *pool, XML_Char c);
lib/libexpat/lib/xmlparse.c
669
poolAppendChar(STRING_POOL *pool, XML_Char c) {
lib/libexpat/lib/xmlparse.c
673
*(pool->ptr)++ = c;
lib/libexpat/lib/xmlparse.c
8777
unsignedCharToPrintable(unsigned char c) {
lib/libexpat/lib/xmlparse.c
8778
switch (c) {
lib/libexpat/lib/xmltok.c
1048
isSpace(int c) {
lib/libexpat/lib/xmltok.c
1049
switch (c) {
lib/libexpat/lib/xmltok.c
1066
int c;
lib/libexpat/lib/xmltok.c
1085
c = toAscii(enc, ptr, end);
lib/libexpat/lib/xmltok.c
1086
if (c == -1) {
lib/libexpat/lib/xmltok.c
1090
if (c == ASCII_EQUALS) {
lib/libexpat/lib/xmltok.c
1094
if (isSpace(c)) {
lib/libexpat/lib/xmltok.c
1098
} while (isSpace(c = toAscii(enc, ptr, end)));
lib/libexpat/lib/xmltok.c
1099
if (c != ASCII_EQUALS) {
lib/libexpat/lib/xmltok.c
1112
c = toAscii(enc, ptr, end);
lib/libexpat/lib/xmltok.c
1113
while (isSpace(c)) {
lib/libexpat/lib/xmltok.c
1115
c = toAscii(enc, ptr, end);
lib/libexpat/lib/xmltok.c
1117
if (c != ASCII_QUOT && c != ASCII_APOS) {
lib/libexpat/lib/xmltok.c
1121
open = (char)c;
lib/libexpat/lib/xmltok.c
1125
c = toAscii(enc, ptr, end);
lib/libexpat/lib/xmltok.c
1126
if (c == open)
lib/libexpat/lib/xmltok.c
1128
if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
lib/libexpat/lib/xmltok.c
1129
&& ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
lib/libexpat/lib/xmltok.c
1130
&& c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
lib/libexpat/lib/xmltok.c
1194
int c = toAscii(enc, val, end);
lib/libexpat/lib/xmltok.c
1195
if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
lib/libexpat/lib/xmltok.c
1259
XmlUtf8Encode(int c, char *buf) {
lib/libexpat/lib/xmltok.c
1267
if (c < 0)
lib/libexpat/lib/xmltok.c
1269
if (c < min2) {
lib/libexpat/lib/xmltok.c
1270
buf[0] = (char)(c | UTF8_cval1);
lib/libexpat/lib/xmltok.c
1273
if (c < min3) {
lib/libexpat/lib/xmltok.c
1274
buf[0] = (char)((c >> 6) | UTF8_cval2);
lib/libexpat/lib/xmltok.c
1275
buf[1] = (char)((c & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1278
if (c < min4) {
lib/libexpat/lib/xmltok.c
1279
buf[0] = (char)((c >> 12) | UTF8_cval3);
lib/libexpat/lib/xmltok.c
1280
buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1281
buf[2] = (char)((c & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1284
if (c < 0x110000) {
lib/libexpat/lib/xmltok.c
1285
buf[0] = (char)((c >> 18) | UTF8_cval4);
lib/libexpat/lib/xmltok.c
1286
buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1287
buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1288
buf[3] = (char)((c & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
1329
int c = uenc->convert(uenc->userData, p);
lib/libexpat/lib/xmltok.c
1330
if (c & ~0xFFFF)
lib/libexpat/lib/xmltok.c
1332
return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF);
lib/libexpat/lib/xmltok.c
1338
int c = uenc->convert(uenc->userData, p);
lib/libexpat/lib/xmltok.c
1339
if (c & ~0xFFFF)
lib/libexpat/lib/xmltok.c
1341
return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF);
lib/libexpat/lib/xmltok.c
1347
int c = uenc->convert(uenc->userData, p);
lib/libexpat/lib/xmltok.c
1348
return (c & ~0xFFFF) || checkCharRefNumber(c) < 0;
lib/libexpat/lib/xmltok.c
1364
int c = uenc->convert(uenc->userData, *fromP);
lib/libexpat/lib/xmltok.c
1365
n = XmlUtf8Encode(c, buf);
lib/libexpat/lib/xmltok.c
1386
unsigned short c = uenc->utf16[(unsigned char)**fromP];
lib/libexpat/lib/xmltok.c
1387
if (c == 0) {
lib/libexpat/lib/xmltok.c
1388
c = (unsigned short)uenc->convert(uenc->userData, *fromP);
lib/libexpat/lib/xmltok.c
1393
*(*toP)++ = c;
lib/libexpat/lib/xmltok.c
1413
int c = table[i];
lib/libexpat/lib/xmltok.c
1414
if (c == -1) {
lib/libexpat/lib/xmltok.c
1420
} else if (c < 0) {
lib/libexpat/lib/xmltok.c
1421
if (c < -4)
lib/libexpat/lib/xmltok.c
1426
e->normal.type[i] = (unsigned char)(BT_LEAD2 - (c + 2));
lib/libexpat/lib/xmltok.c
1429
} else if (c < 0x80) {
lib/libexpat/lib/xmltok.c
1430
if (latin1_encoding.type[c] != BT_OTHER
lib/libexpat/lib/xmltok.c
1431
&& latin1_encoding.type[c] != BT_NONXML && c != i)
lib/libexpat/lib/xmltok.c
1433
e->normal.type[i] = latin1_encoding.type[c];
lib/libexpat/lib/xmltok.c
1435
e->utf8[i][1] = (char)c;
lib/libexpat/lib/xmltok.c
1436
e->utf16[i] = (unsigned short)(c == 0 ? 0xFFFF : c);
lib/libexpat/lib/xmltok.c
1437
} else if (checkCharRefNumber(c) < 0) {
lib/libexpat/lib/xmltok.c
1444
if (c > 0xFFFF)
lib/libexpat/lib/xmltok.c
1446
if (UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xff))
lib/libexpat/lib/xmltok.c
1448
else if (UCS2_GET_NAMING(namePages, c >> 8, c & 0xff))
lib/libexpat/lib/xmltok.c
1452
e->utf8[i][0] = (char)XmlUtf8Encode(c, e->utf8[i] + 1);
lib/libexpat/lib/xmltok.c
1453
e->utf16[i] = (unsigned short)c;
lib/libexpat/lib/xmltok.c
295
# define CHAR_MATCHES(enc, p, c) \
lib/libexpat/lib/xmltok.c
296
(AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c))
lib/libexpat/lib/xmltok.c
298
sb_charMatches(const ENCODING *enc, const char *p, int c) {
lib/libexpat/lib/xmltok.c
300
return *p == c;
lib/libexpat/lib/xmltok.c
304
# define CHAR_MATCHES(enc, p, c) (*(p) == (c))
lib/libexpat/lib/xmltok.c
510
unsigned char c;
lib/libexpat/lib/xmltok.c
513
c = (unsigned char)**fromP;
lib/libexpat/lib/xmltok.c
514
if (c & 0x80) {
lib/libexpat/lib/xmltok.c
517
*(*toP)++ = (char)((c >> 6) | UTF8_cval2);
lib/libexpat/lib/xmltok.c
518
*(*toP)++ = (char)((c & 0x3f) | 0x80);
lib/libexpat/lib/xmltok.c
743
#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
lib/libexpat/lib/xmltok.c
763
little2_charMatches(const ENCODING *enc, const char *p, int c) {
lib/libexpat/lib/xmltok.c
765
return LITTLE2_CHAR_MATCHES(p, c);
lib/libexpat/lib/xmltok.c
791
# define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
lib/libexpat/lib/xmltok.c
876
#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
lib/libexpat/lib/xmltok.c
896
big2_charMatches(const ENCODING *enc, const char *p, int c) {
lib/libexpat/lib/xmltok.c
898
return BIG2_CHAR_MATCHES(p, c);
lib/libexpat/lib/xmltok.c
924
# define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
lib/libexpat/lib/xmltok_impl.c
1611
int c = BYTE_TO_ASCII(enc, ptr);
lib/libexpat/lib/xmltok_impl.c
1612
switch (c) {
lib/libexpat/lib/xmltok_impl.c
1624
result |= (c - ASCII_0);
lib/libexpat/lib/xmltok_impl.c
1633
result += 10 + (c - ASCII_A);
lib/libexpat/lib/xmltok_impl.c
1642
result += 10 + (c - ASCII_a);
lib/libexpat/lib/xmltok_impl.c
1650
int c = BYTE_TO_ASCII(enc, ptr);
lib/libexpat/lib/xmltok_impl.c
1652
result += (c - ASCII_0);
lib/libexpat/tests/basic_tests.c
6112
for (int c = 0; c < 100; ++c) {
lib/libexpat/tests/basic_tests.c
6131
for (int c = 0; c < 101; ++c) {
lib/libexpat/tests/basic_tests.c
6204
for (int c = 0; c < 100; ++c) {
lib/libexpat/tests/basic_tests.c
6223
for (int c = 0; c < 101; ++c) {
lib/libform/form.priv.h
176
#define is_blank(c) ((c)==C_BLANK)
lib/libform/frm_driver.c
4070
Data_Entry_w(FORM *form, wchar_t c)
lib/libform/frm_driver.c
4075
T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
lib/libform/frm_driver.c
4085
given[0] = c;
lib/libform/frm_driver.c
4157
Data_Entry(FORM *form, int c)
lib/libform/frm_driver.c
4162
T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
lib/libform/frm_driver.c
4177
waddch(form->w, (chtype)c);
lib/libform/frm_driver.c
4191
winsch(form->w, (chtype)c);
lib/libform/frm_driver.c
4364
form_driver(FORM *form, int c)
lib/libform/frm_driver.c
4371
T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
lib/libform/frm_driver.c
4381
if (c == FIRST_ACTIVE_MAGIC)
lib/libform/frm_driver.c
4398
if ((c >= MIN_FORM_COMMAND && c <= MAX_FORM_COMMAND) &&
lib/libform/frm_driver.c
4399
((bindings[c - MIN_FORM_COMMAND].keycode & Key_Mask) == c))
lib/libform/frm_driver.c
4401
TR(TRACE_CALLS, ("form_request %s", form_request_name(c)));
lib/libform/frm_driver.c
4402
BI = &(bindings[c - MIN_FORM_COMMAND]);
lib/libform/frm_driver.c
4440
else if (KEY_MOUSE == c)
lib/libform/frm_driver.c
4515
else if (!(c & (~(int)MAX_REGULAR_CHARACTER)))
lib/libform/frm_driver.c
4526
if (!iscntrl(UChar(c)))
lib/libform/frm_driver.c
4528
if (isprint(UChar(c)) &&
lib/libform/frm_driver.c
4529
Check_Char(form, form->current, form->current->type, c,
lib/libform/frm_driver.c
4532
res = Data_Entry(form, c);
lib/libform/frm_driver.c
4570
form_driver_w(FORM *form, int type, wchar_t c)
lib/libform/frm_driver.c
4575
T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int)c));
lib/libform/frm_driver.c
4585
if (c == (wchar_t)FIRST_ACTIVE_MAGIC)
lib/libform/frm_driver.c
4605
if ((c >= MIN_FORM_COMMAND && c <= MAX_FORM_COMMAND) &&
lib/libform/frm_driver.c
4606
((bindings[c - MIN_FORM_COMMAND].keycode & Key_Mask) == c))
lib/libform/frm_driver.c
4607
BI = &(bindings[c - MIN_FORM_COMMAND]);
lib/libform/frm_driver.c
4641
else if (KEY_MOUSE == c)
lib/libform/frm_driver.c
4718
res = Data_Entry_w(form, c);
lib/libform/fty_alnum.c
141
Check_This_Character(int c, const void *argp GCC_UNUSED)
lib/libform/fty_alnum.c
144
if (iswalnum((wint_t)c))
lib/libform/fty_alnum.c
147
return (isalnum(UChar(c)) ? TRUE : FALSE);
lib/libform/fty_alpha.c
141
Check_This_Character(int c, const void *argp GCC_UNUSED)
lib/libform/fty_alpha.c
144
if (iswalpha((wint_t)c))
lib/libform/fty_alpha.c
147
return (isalpha(UChar(c)) ? TRUE : FALSE);
lib/libform/fty_int.c
262
Check_This_Character(int c, const void *argp GCC_UNUSED)
lib/libform/fty_int.c
264
return ((isDigit(UChar(c)) || (c == '-')) ? TRUE : FALSE);
lib/libform/fty_int.c
42
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
lib/libform/fty_int.c
44
#define isDigit(c) isdigit(UChar(c))
lib/libform/fty_ipv4.c
85
Check_IPV4_Character(int c, const void *argp GCC_UNUSED)
lib/libform/fty_ipv4.c
87
return ((isdigit(UChar(c)) || (c == '.')) ? TRUE : FALSE);
lib/libform/fty_num.c
300
Check_This_Character(int c, const void *argp)
lib/libform/fty_num.c
305
return ((isDigit(c) ||
lib/libform/fty_num.c
306
c == '+' ||
lib/libform/fty_num.c
307
c == '-' ||
lib/libform/fty_num.c
308
isDecimalPoint(c))
lib/libform/fty_num.c
46
#define isDecimalPoint(c) ((c) == ((L && L->decimal_point) ? *(L->decimal_point) : '.'))
lib/libform/fty_num.c
48
#define isDecimalPoint(c) ((c) == '.')
lib/libform/fty_num.c
52
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
lib/libform/fty_num.c
54
#define isDigit(c) isdigit(UChar(c))
lib/libform/fty_regex.c
110
#define UNGETC(c) (--sp)
lib/libform/fty_regex.c
111
#define RETURN(c) return(c)
lib/libform/fty_regex.c
112
#define ERROR(c) return RegEx_Error(c)
lib/libm/src/b_exp__D.c
101
x= hi - (lo = k*ln2lo-c);
lib/libm/src/b_exp__D.c
104
c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
lib/libm/src/b_exp__D.c
105
c = (x*c)/(2.0-c);
lib/libm/src/b_exp__D.c
107
return scalb(1.+(hi-(lo - c)), k);
lib/libm/src/b_exp__D.c
84
__exp__D(double x, double c)
lib/libm/src/b_tgamma.c
266
ratfun_gam(double z, double c)
lib/libm/src/b_tgamma.c
278
t.b = (z - t.a) + c;
lib/libm/src/e_acos.c
61
double z,p,q,r,w,s,c,df;
lib/libm/src/e_acos.c
94
c = (z-df*df)/(s+df);
lib/libm/src/e_acos.c
98
w = r*s+c;
lib/libm/src/e_acosf.c
38
float z,p,q,r,w,s,c,df;
lib/libm/src/e_acosf.c
70
c = (z-df*df)/(s+df);
lib/libm/src/e_acosf.c
74
w = r*s+c;
lib/libm/src/e_acosl.c
101
w = r*s+c;
lib/libm/src/e_acosl.c
54
long double z,p,q,r,w,s,c,df;
lib/libm/src/e_acosl.c
97
c = (z-df*df)/(s+df);
lib/libm/src/e_asin.c
102
c = (t-w*w)/(s+w);
lib/libm/src/e_asin.c
104
p = 2.0*s*r-(pio2_lo-2.0*c);
lib/libm/src/e_asin.c
69
double t,w,p,q,c,r,s;
lib/libm/src/e_asinf.c
40
float t,w,p,q,c,r,s;
lib/libm/src/e_asinf.c
73
c = (t-w*w)/(s+w);
lib/libm/src/e_asinf.c
75
p = (float)2.0*s*r-(pio2_lo-(float)2.0*c);
lib/libm/src/e_asinl.c
44
long double t=0.0,w,p,q,c,r,s;
lib/libm/src/e_asinl.c
93
c = (t-w*w)/(s+w);
lib/libm/src/e_asinl.c
95
p = 2.0*s*r-(pio2_lo-2.0*c);
lib/libm/src/e_exp.c
103
double y,hi,lo,c,t;
lib/libm/src/e_exp.c
143
c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
lib/libm/src/e_exp.c
144
if(k==0) return one-((x*c)/(c-2.0)-x);
lib/libm/src/e_exp.c
145
else y = one-((lo-(x*c)/(2.0-c))-hi);
lib/libm/src/e_expf.c
41
float y,hi,lo,c,t;
lib/libm/src/e_expf.c
78
c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
lib/libm/src/e_expf.c
79
if(k==0) return one-((x*c)/(c-(float)2.0)-x);
lib/libm/src/e_expf.c
80
else y = one-((lo-(x*c)/((float)2.0-c))-hi);
lib/libm/src/e_j0.c
145
double z, s,c,ss,cc,u,v;
lib/libm/src/e_j0.c
167
c = cos(x);
lib/libm/src/e_j0.c
168
ss = s-c;
lib/libm/src/e_j0.c
169
cc = s+c;
lib/libm/src/e_j0.c
176
if ((s*c)<zero) cc = z/ss;
lib/libm/src/e_j0.c
83
double z, s,c,ss,cc,r,u,v;
lib/libm/src/e_j0.c
92
c = cos(x);
lib/libm/src/e_j0.c
93
ss = s-c;
lib/libm/src/e_j0.c
94
cc = s+c;
lib/libm/src/e_j0.c
97
if ((s*c)<zero) cc = z/ss;
lib/libm/src/e_j0f.c
103
float z, s,c,ss,cc,u,v;
lib/libm/src/e_j0f.c
125
c = cosf(x);
lib/libm/src/e_j0f.c
126
ss = s-c;
lib/libm/src/e_j0f.c
127
cc = s+c;
lib/libm/src/e_j0f.c
134
if ((s*c)<zero) cc = z/ss;
lib/libm/src/e_j0f.c
41
float z, s,c,ss,cc,r,u,v;
lib/libm/src/e_j0f.c
50
c = cosf(x);
lib/libm/src/e_j0f.c
51
ss = s-c;
lib/libm/src/e_j0f.c
52
cc = s+c;
lib/libm/src/e_j0f.c
55
if ((s*c)<zero) cc = z/ss;
lib/libm/src/e_j1.c
142
double z, s,c,ss,cc,u,v;
lib/libm/src/e_j1.c
153
c = cos(x);
lib/libm/src/e_j1.c
154
ss = -s-c;
lib/libm/src/e_j1.c
155
cc = s-c;
lib/libm/src/e_j1.c
158
if ((s*c)>zero) cc = z/ss;
lib/libm/src/e_j1.c
84
double z, s,c,ss,cc,r,u,v,y;
lib/libm/src/e_j1.c
93
c = cos(y);
lib/libm/src/e_j1.c
94
ss = -s-c;
lib/libm/src/e_j1.c
95
cc = s-c;
lib/libm/src/e_j1.c
98
if ((s*c)>zero) cc = z/ss;
lib/libm/src/e_j1f.c
100
float z, s,c,ss,cc,u,v;
lib/libm/src/e_j1f.c
111
c = cosf(x);
lib/libm/src/e_j1f.c
112
ss = -s-c;
lib/libm/src/e_j1f.c
113
cc = s-c;
lib/libm/src/e_j1f.c
116
if ((s*c)>zero) cc = z/ss;
lib/libm/src/e_j1f.c
42
float z, s,c,ss,cc,r,u,v,y;
lib/libm/src/e_j1f.c
51
c = cosf(y);
lib/libm/src/e_j1f.c
52
ss = -s-c;
lib/libm/src/e_j1f.c
53
cc = s-c;
lib/libm/src/e_j1f.c
56
if ((s*c)>zero) cc = z/ss;
lib/libm/src/s_ccos.c
59
_cchsh(double x, double *c, double *s)
lib/libm/src/s_ccos.c
64
*c = cosh(x);
lib/libm/src/s_ccos.c
72
*c = e + ei;
lib/libm/src/s_ccosf.c
57
_cchshf(float xx, float *c, float *s)
lib/libm/src/s_ccosf.c
63
*c = coshf(x);
lib/libm/src/s_ccosf.c
71
*c = e + ei;
lib/libm/src/s_ccosl.c
57
cchshl(long double x, long double *c, long double *s)
lib/libm/src/s_ccosl.c
62
*c = coshl(x);
lib/libm/src/s_ccosl.c
69
*c = e + ei;
lib/libm/src/s_csin.c
61
cchsh(double x, double *c, double *s)
lib/libm/src/s_csin.c
66
*c = cosh(x);
lib/libm/src/s_csin.c
74
*c = e + ei;
lib/libm/src/s_csinf.c
58
cchshf(float xx, float *c, float *s)
lib/libm/src/s_csinf.c
64
*c = coshf(x);
lib/libm/src/s_csinf.c
72
*c = e + ei;
lib/libm/src/s_csinl.c
59
cchshl(long double x, long double *c, long double *s)
lib/libm/src/s_csinl.c
64
*c = coshl(x);
lib/libm/src/s_csinl.c
71
*c = e + ei;
lib/libm/src/s_expm1.c
131
double y,hi,lo,c,t,e,hxs,hfx,r1;
lib/libm/src/s_expm1.c
172
c = (hi-x)-lo;
lib/libm/src/s_expm1.c
188
e = (x*(e-c)-c);
lib/libm/src/s_expm1f.c
37
float y,hi,lo,c,t,e,hxs,hfx,r1;
lib/libm/src/s_expm1f.c
75
c = (hi-x)-lo;
lib/libm/src/s_expm1f.c
91
e = (x*(e-c)-c);
lib/libm/src/s_fma.c
166
c = p + q;
lib/libm/src/s_fma.c
167
cc = p - c + q + tx * ty;
lib/libm/src/s_fma.c
170
r = c + zs;
lib/libm/src/s_fma.c
171
s = r - c;
lib/libm/src/s_fma.c
172
rr = (c - (r - s)) + (zs - s) + cc;
lib/libm/src/s_fma.c
184
c = r + p;
lib/libm/src/s_fma.c
185
s = c - r;
lib/libm/src/s_fma.c
186
cc = (r - (c - s)) + (p - s) + rr;
lib/libm/src/s_fma.c
188
r = (c + cc) - p;
lib/libm/src/s_fma.c
56
double c, cc, hx, hy, p, q, tx, ty;
lib/libm/src/s_fmal.c
161
c = p + q;
lib/libm/src/s_fmal.c
162
cc = p - c + q + tx * ty;
lib/libm/src/s_fmal.c
165
r = c + zs;
lib/libm/src/s_fmal.c
166
s = r - c;
lib/libm/src/s_fmal.c
167
rr = (c - (r - s)) + (zs - s) + cc;
lib/libm/src/s_fmal.c
179
c = r + p;
lib/libm/src/s_fmal.c
180
s = c - r;
lib/libm/src/s_fmal.c
181
cc = (r - (c - s)) + (p - s) + rr;
lib/libm/src/s_fmal.c
183
r = (c + cc) - p;
lib/libm/src/s_fmal.c
51
long double c, cc, hx, hy, p, q, tx, ty;
lib/libm/src/s_log1p.c
100
double hfsq,f,c,s,z,R,u;
lib/libm/src/s_log1p.c
128
c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */
lib/libm/src/s_log1p.c
129
c /= u;
lib/libm/src/s_log1p.c
134
c = 0;
lib/libm/src/s_log1p.c
149
else {c += k*ln2_lo; return k*ln2_hi+c;}
lib/libm/src/s_log1p.c
152
return k*ln2_hi-((R-(k*ln2_lo+c))-f);
lib/libm/src/s_log1p.c
158
return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
lib/libm/src/s_log1pf.c
36
float hfsq,f,c,s,z,R,u;
lib/libm/src/s_log1pf.c
65
c = (k>0)? (float)1.0-(u-x):x-(u-(float)1.0);
lib/libm/src/s_log1pf.c
66
c /= u;
lib/libm/src/s_log1pf.c
71
c = 0;
lib/libm/src/s_log1pf.c
86
else {c += k*ln2_lo; return k*ln2_hi+c;}
lib/libm/src/s_log1pf.c
89
return k*ln2_hi-((R-(k*ln2_lo+c))-f);
lib/libm/src/s_log1pf.c
95
return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
lib/libm/src/s_nan.c
44
_digittoint(int c)
lib/libm/src/s_nan.c
46
if (!isxdigit(c))
lib/libm/src/s_nan.c
49
if (isdigit(c))
lib/libm/src/s_nan.c
50
return c - '0';
lib/libm/src/s_nan.c
52
return isupper(c) ? c - 'A' + 10 : c - 'a' + 10;
lib/libm/src/s_sincosf.c
101
c = __kernel_cosf(y[0], y[1]);
lib/libm/src/s_sincosf.c
106
*cs = c;
lib/libm/src/s_sincosf.c
109
*sn = c;
lib/libm/src/s_sincosf.c
114
*cs = -c;
lib/libm/src/s_sincosf.c
117
*sn = -c;
lib/libm/src/s_sincosf.c
34
float c, s;
lib/libmenu/m_driver.c
215
menu_driver(MENU *menu, int c)
lib/libmenu/m_driver.c
227
T((T_CALLED("menu_driver(%p,%d)"), (void *)menu, c));
lib/libmenu/m_driver.c
242
if ((c > KEY_MAX) && (c <= MAX_MENU_COMMAND))
lib/libmenu/m_driver.c
246
if (!((c == REQ_BACK_PATTERN)
lib/libmenu/m_driver.c
247
|| (c == REQ_NEXT_MATCH) || (c == REQ_PREV_MATCH)))
lib/libmenu/m_driver.c
253
switch (c)
lib/libmenu/m_driver.c
448
if (!(c & ~((int)MAX_REGULAR_CHARACTER)) && isprint(UChar(c)))
lib/libmenu/m_driver.c
449
result = _nc_Match_Next_Character_In_Item_Name(menu, c, &item);
lib/libmenu/m_driver.c
451
else if (KEY_MOUSE == c)
lib/libmenu/menu.priv.h
122
#define UChar(c) ((unsigned char)(c))
lib/libossaudio/ossaudio.c
167
struct control *c;
lib/libossaudio/ossaudio.c
169
for (c = controls; ; c = c->next) {
lib/libossaudio/ossaudio.c
170
if (c == NULL) {
lib/libossaudio/ossaudio.c
174
if (c->addr == addr)
lib/libossaudio/ossaudio.c
179
c->value = value;
lib/libossaudio/ossaudio.c
224
struct control *c;
lib/libossaudio/ossaudio.c
259
for (c = controls; c != NULL; c = c->next)
lib/libossaudio/ossaudio.c
260
idat |= 1 << c->type;
lib/libossaudio/ossaudio.c
266
for (c = controls; c != NULL; c = c->next)
lib/libossaudio/ossaudio.c
267
idat |= 1 << c->type;
lib/libossaudio/ossaudio.c
272
for (c = controls; c != NULL; c = c->next) {
lib/libossaudio/ossaudio.c
273
if (c->chan == 1)
lib/libossaudio/ossaudio.c
274
idat |= 1 << c->type;
lib/libossaudio/ossaudio.c
293
for (c = controls; c != NULL; c = c->next) {
lib/libossaudio/ossaudio.c
294
if (c->type != n)
lib/libossaudio/ossaudio.c
296
v = (c->value * 100 + c->max / 2) / c->max;
lib/libossaudio/ossaudio.c
297
if (c->chan == 1)
lib/libossaudio/ossaudio.c
310
for (c = controls; c != NULL; c = c->next) {
lib/libossaudio/ossaudio.c
311
if (c->type != n)
lib/libossaudio/ossaudio.c
314
if (c->chan == 1)
lib/libossaudio/ossaudio.c
319
v = (v * c->max + 50) / 100;
lib/libossaudio/ossaudio.c
320
sioctl_setval(hdl, c->addr, v);
lib/libpcap/etherent.c
100
d = xdtoi(c);
lib/libpcap/etherent.c
101
c = getc(fp);
lib/libpcap/etherent.c
102
if (isxdigit(c)) {
lib/libpcap/etherent.c
104
d |= xdtoi(c);
lib/libpcap/etherent.c
105
c = getc(fp);
lib/libpcap/etherent.c
108
if (c != ':')
lib/libpcap/etherent.c
110
c = getc(fp);
lib/libpcap/etherent.c
112
if (c == EOF)
lib/libpcap/etherent.c
116
if (!isspace(c)) {
lib/libpcap/etherent.c
117
c = skip_line(fp);
lib/libpcap/etherent.c
120
c = skip_space(fp);
lib/libpcap/etherent.c
123
if (c == '\n')
lib/libpcap/etherent.c
126
if (c == '#') {
lib/libpcap/etherent.c
127
c = skip_line(fp);
lib/libpcap/etherent.c
136
*bp++ = c;
lib/libpcap/etherent.c
137
c = getc(fp);
lib/libpcap/etherent.c
138
} while (!isspace(c) && c != EOF && --d > 0);
lib/libpcap/etherent.c
142
if (c != '\n')
lib/libpcap/etherent.c
147
} while (c != EOF);
lib/libpcap/etherent.c
43
xdtoi(int c)
lib/libpcap/etherent.c
45
if (isdigit(c))
lib/libpcap/etherent.c
46
return c - '0';
lib/libpcap/etherent.c
47
else if (islower(c))
lib/libpcap/etherent.c
48
return c - 'a' + 10;
lib/libpcap/etherent.c
50
return c - 'A' + 10;
lib/libpcap/etherent.c
56
int c;
lib/libpcap/etherent.c
59
c = getc(f);
lib/libpcap/etherent.c
60
} while (isspace(c) && c != '\n');
lib/libpcap/etherent.c
62
return c;
lib/libpcap/etherent.c
68
int c;
lib/libpcap/etherent.c
71
c = getc(f);
lib/libpcap/etherent.c
72
while (c != '\n' && c != EOF);
lib/libpcap/etherent.c
74
return c;
lib/libpcap/etherent.c
80
int c, d, i;
lib/libpcap/etherent.c
87
c = skip_space(fp);
lib/libpcap/etherent.c
88
if (c == '\n')
lib/libpcap/etherent.c
93
if (!isxdigit(c)) {
lib/libpcap/etherent.c
94
c = skip_line(fp);
lib/libpcap/gencode.c
62
#define JMP(c) ((c)|BPF_JMP|BPF_K)
lib/libpcap/nametoaddr.c
258
xdtoi(int c)
lib/libpcap/nametoaddr.c
260
if (isdigit(c))
lib/libpcap/nametoaddr.c
261
return c - '0';
lib/libpcap/nametoaddr.c
262
else if (islower(c))
lib/libpcap/nametoaddr.c
263
return c - 'a' + 10;
lib/libpcap/nametoaddr.c
265
return c - 'A' + 10;
lib/libpcap/optimize.c
347
int c = s->code;
lib/libpcap/optimize.c
349
if (c == NOP)
lib/libpcap/optimize.c
352
switch (BPF_CLASS(c)) {
lib/libpcap/optimize.c
355
return (BPF_RVAL(c) == BPF_A) ? A_ATOM :
lib/libpcap/optimize.c
356
(BPF_RVAL(c) == BPF_X) ? X_ATOM : -1;
lib/libpcap/optimize.c
360
return (BPF_MODE(c) == BPF_IND) ? X_ATOM :
lib/libpcap/optimize.c
361
(BPF_MODE(c) == BPF_MEM) ? s->k : -1;
lib/libpcap/optimize.c
371
if (BPF_SRC(c) == BPF_X)
lib/libpcap/optimize.c
376
return BPF_MISCOP(c) == BPF_TXA ? X_ATOM : A_ATOM;
lib/libradius/radius_mppe.c
103
c = ((uint8_t *)cipher) + 2 + off;
lib/libradius/radius_mppe.c
111
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_mppe.c
114
p[i] = c[i] ^ b[i];
lib/libradius/radius_mppe.c
49
uint8_t b[16], plain0[256], *p, *c;
lib/libradius/radius_mppe.c
68
c = ((uint8_t *)cipher) + 2 + off;
lib/libradius/radius_mppe.c
76
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_mppe.c
79
c[i] = p[i] ^ b[i];
lib/libradius/radius_mppe.c
90
uint8_t b[16], plain0[256], *p, *c;
lib/libradius/radius_userpass.c
44
char b[16], p[16], *c;
lib/libradius/radius_userpass.c
53
c = ((char *)cipher) + off;
lib/libradius/radius_userpass.c
61
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_userpass.c
64
c[i] = p[i] ^ b[i];
lib/libradius/radius_userpass.c
78
char *p, *c;
lib/libradius/radius_userpass.c
88
c = ((char *)cipher) + off;
lib/libradius/radius_userpass.c
95
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_userpass.c
98
p[i] = c[i] ^ b[i];
lib/libskey/put.c
329
btoe(char *engout, char *c)
lib/libskey/put.c
336
(void)memcpy(cp, c, 8);
lib/libskey/skeylogin.c
567
char c, *cp;
lib/libskey/skeylogin.c
595
ss = read(fd, &c, 1);
lib/libskey/skeylogin.c
596
if (ss != 1 || c == '\n' || c == '\r')
lib/libskey/skeylogin.c
598
*cp++ = c;
lib/libskey/skeylogin.c
602
while (--left && read(fd, &c, 1) == 1 && c != '\n' && c != '\r')
lib/libskey/skeylogin.c
603
*cp++ = c;
lib/libskey/skeysubr.c
271
htoi(int c)
lib/libskey/skeysubr.c
273
if ('0' <= c && c <= '9')
lib/libskey/skeysubr.c
274
return(c - '0');
lib/libskey/skeysubr.c
275
if ('a' <= c && c <= 'f')
lib/libskey/skeysubr.c
276
return(10 + c - 'a');
lib/libskey/skeysubr.c
277
if ('A' <= c && c <= 'F')
lib/libskey/skeysubr.c
278
return(10 + c - 'A');
lib/libsndio/sioctl_aucat.c
62
struct amsg_ctl_desc *c;
lib/libsndio/sioctl_aucat.c
81
c = hdl->buf;
lib/libsndio/sioctl_aucat.c
84
strlcpy(desc.group, c->group, SIOCTL_NAMEMAX);
lib/libsndio/sioctl_aucat.c
85
strlcpy(desc.node0.name, c->node0.name, SIOCTL_NAMEMAX);
lib/libsndio/sioctl_aucat.c
86
desc.node0.unit = (int16_t)ntohs(c->node0.unit);
lib/libsndio/sioctl_aucat.c
87
strlcpy(desc.node1.name, c->node1.name, SIOCTL_NAMEMAX);
lib/libsndio/sioctl_aucat.c
88
desc.node1.unit = (int16_t)ntohs(c->node1.unit);
lib/libsndio/sioctl_aucat.c
89
strlcpy(desc.func, c->func, SIOCTL_NAMEMAX);
lib/libsndio/sioctl_aucat.c
90
strlcpy(desc.display, c->display, SIOCTL_DISPLAYMAX);
lib/libsndio/sioctl_aucat.c
91
desc.type = c->type;
lib/libsndio/sioctl_aucat.c
92
desc.addr = ntohs(c->addr);
lib/libsndio/sioctl_aucat.c
93
desc.maxval = ntohs(c->maxval);
lib/libsndio/sioctl_aucat.c
95
&desc, ntohs(c->curval));
lib/libsndio/sioctl_aucat.c
97
c++;
lib/libssl/s3_cbc.c
100
c--;
lib/libssl/s3_cbc.c
101
return DUPLICATE_MSB_TO_ALL_8(c);
lib/libssl/s3_cbc.c
267
#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \
lib/libssl/s3_cbc.c
268
*((c)++)=(unsigned char)(((l)>>16)&0xff), \
lib/libssl/s3_cbc.c
269
*((c)++)=(unsigned char)(((l)>> 8)&0xff), \
lib/libssl/s3_cbc.c
270
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libssl/s3_cbc.c
272
#define l2n8(l,c) (*((c)++)=(unsigned char)(((l)>>56)&0xff), \
lib/libssl/s3_cbc.c
273
*((c)++)=(unsigned char)(((l)>>48)&0xff), \
lib/libssl/s3_cbc.c
274
*((c)++)=(unsigned char)(((l)>>40)&0xff), \
lib/libssl/s3_cbc.c
275
*((c)++)=(unsigned char)(((l)>>32)&0xff), \
lib/libssl/s3_cbc.c
276
*((c)++)=(unsigned char)(((l)>>24)&0xff), \
lib/libssl/s3_cbc.c
277
*((c)++)=(unsigned char)(((l)>>16)&0xff), \
lib/libssl/s3_cbc.c
278
*((c)++)=(unsigned char)(((l)>> 8)&0xff), \
lib/libssl/s3_cbc.c
279
*((c)++)=(unsigned char)(((l) )&0xff))
lib/libssl/s3_cbc.c
392
unsigned char c[sizeof(LARGEST_DIGEST_CTX)];
lib/libssl/s3_cbc.c
399
num_starting_blocks, k, mac_end_offset, c, index_a, index_b;
lib/libssl/s3_cbc.c
419
MD5_Init((MD5_CTX*)md_state.c);
lib/libssl/s3_cbc.c
426
SHA1_Init((SHA_CTX*)md_state.c);
lib/libssl/s3_cbc.c
432
SHA224_Init((SHA256_CTX*)md_state.c);
lib/libssl/s3_cbc.c
438
SHA256_Init((SHA256_CTX*)md_state.c);
lib/libssl/s3_cbc.c
444
SHA384_Init((SHA512_CTX*)md_state.c);
lib/libssl/s3_cbc.c
452
SHA512_Init((SHA512_CTX*)md_state.c);
lib/libssl/s3_cbc.c
509
c = mac_end_offset % md_block_size;
lib/libssl/s3_cbc.c
533
md_transform(md_state.c, hmac_pad);
lib/libssl/s3_cbc.c
553
md_transform(md_state.c, first_block);
lib/libssl/s3_cbc.c
555
md_transform(md_state.c, data + md_block_size*i - 13);
lib/libssl/s3_cbc.c
576
is_past_c = is_block_a & constant_time_ge(j, c);
lib/libssl/s3_cbc.c
577
is_past_cp1 = is_block_a & constant_time_ge(j, c + 1);
lib/libssl/s3_cbc.c
601
md_transform(md_state.c, block);
lib/libssl/s3_cbc.c
602
md_final_raw(md_state.c, block);
lib/libssl/s3_cbc.c
99
unsigned int c = a ^ b;
lib/libssl/s3_lib.c
2280
SSL_CIPHER *c, *ret = NULL;
lib/libssl/s3_lib.c
2306
c = sk_SSL_CIPHER_value(prio, i);
lib/libssl/s3_lib.c
2309
if ((c->algorithm_ssl & SSL_TLSV1_2) &&
lib/libssl/s3_lib.c
2314
if ((c->algorithm_ssl & SSL_TLSV1_3) &&
lib/libssl/s3_lib.c
2320
!(c->algorithm_ssl & SSL_TLSV1_3))
lib/libssl/s3_lib.c
2323
if (!ssl_security_shared_cipher(s, c))
lib/libssl/s3_lib.c
2326
ssl_set_cert_masks(cert, c);
lib/libssl/s3_lib.c
2330
alg_k = c->algorithm_mkey;
lib/libssl/s3_lib.c
2331
alg_a = c->algorithm_auth;
lib/libssl/s3_lib.c
2350
ii = sk_SSL_CIPHER_find(allow, c);
lib/libssl/ssl.h
1108
int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits);
lib/libssl/ssl.h
1109
const char * SSL_CIPHER_get_version(const SSL_CIPHER *c);
lib/libssl/ssl.h
1110
const char * SSL_CIPHER_get_name(const SSL_CIPHER *c);
lib/libssl/ssl.h
1111
unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c);
lib/libssl/ssl.h
1112
uint16_t SSL_CIPHER_get_value(const SSL_CIPHER *c);
lib/libssl/ssl.h
1114
int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c);
lib/libssl/ssl.h
1115
int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c);
lib/libssl/ssl.h
1116
int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c);
lib/libssl/ssl.h
1117
int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c);
lib/libssl/ssl.h
1118
const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c);
lib/libssl/ssl.h
1119
int SSL_CIPHER_is_aead(const SSL_CIPHER *c);
lib/libssl/ssl.h
1210
int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
lib/libssl/ssl.h
1211
int SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *c);
lib/libssl/ssl_cert.c
276
ssl_cert_free(SSL_CERT *c)
lib/libssl/ssl_cert.c
280
if (c == NULL)
lib/libssl/ssl_cert.c
283
i = CRYPTO_add(&c->references, -1, CRYPTO_LOCK_SSL_CERT);
lib/libssl/ssl_cert.c
287
DH_free(c->dhe_params);
lib/libssl/ssl_cert.c
290
X509_free(c->pkeys[i].x509);
lib/libssl/ssl_cert.c
291
EVP_PKEY_free(c->pkeys[i].privatekey);
lib/libssl/ssl_cert.c
292
sk_X509_pop_free(c->pkeys[i].chain, X509_free);
lib/libssl/ssl_cert.c
295
free(c);
lib/libssl/ssl_ciph.c
1474
SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits)
lib/libssl/ssl_ciph.c
1478
if (c != NULL) {
lib/libssl/ssl_ciph.c
1480
*alg_bits = c->alg_bits;
lib/libssl/ssl_ciph.c
1481
ret = c->strength_bits;
lib/libssl/ssl_ciph.c
1517
SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1519
switch (c->algorithm_enc) {
lib/libssl/ssl_ciph.c
1547
SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1549
switch (c->algorithm_mac) {
lib/libssl/ssl_ciph.c
1567
SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1569
switch (c->algorithm_mkey) {
lib/libssl/ssl_ciph.c
1583
SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1585
switch (c->algorithm_auth) {
lib/libssl/ssl_ciph.c
1599
SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1601
switch (c->algorithm2 & SSL_HANDSHAKE_MAC_MASK) {
lib/libssl/ssl_ciph.c
1613
SSL_CIPHER_is_aead(const SSL_CIPHER *c)
lib/libssl/ssl_ciph.c
1615
return (c->algorithm_mac & SSL_AEAD) == SSL_AEAD;
lib/libssl/ssl_ciph.c
579
const SSL_CIPHER *c;
lib/libssl/ssl_ciph.c
594
c = ssl3_get_cipher_by_index(i);
lib/libssl/ssl_ciph.c
600
if ((c != NULL) &&
lib/libssl/ssl_ciph.c
601
!(c->algorithm_mkey & disabled_mkey) &&
lib/libssl/ssl_ciph.c
602
!(c->algorithm_auth & disabled_auth) &&
lib/libssl/ssl_ciph.c
603
!(c->algorithm_enc & disabled_enc) &&
lib/libssl/ssl_ciph.c
604
!(c->algorithm_mac & disabled_mac) &&
lib/libssl/ssl_ciph.c
605
!(c->algorithm_ssl & disabled_ssl)) {
lib/libssl/ssl_ciph.c
606
co_list[co_list_num].cipher = c;
lib/libssl/ssl_lib.c
2303
ssl_set_cert_masks(SSL_CERT *c, const SSL_CIPHER *cipher)
lib/libssl/ssl_lib.c
2308
if (c == NULL)
lib/libssl/ssl_lib.c
2314
if (c->dhe_params != NULL || c->dhe_params_cb != NULL ||
lib/libssl/ssl_lib.c
2315
c->dhe_params_auto != 0)
lib/libssl/ssl_lib.c
2318
cpk = &(c->pkeys[SSL_PKEY_ECC]);
lib/libssl/ssl_lib.c
2325
cpk = &(c->pkeys[SSL_PKEY_RSA]);
lib/libssl/ssl_lib.c
2331
c->mask_k = mask_k;
lib/libssl/ssl_lib.c
2332
c->mask_a = mask_a;
lib/libssl/ssl_lib.c
2333
c->valid = 1;
lib/libssl/ssl_lib.c
2373
SSL_CERT *c;
lib/libssl/ssl_lib.c
2376
c = s->cert;
lib/libssl/ssl_lib.c
2377
ssl_set_cert_masks(c, s->s3->hs.cipher);
lib/libssl/ssl_lib.c
2390
return (c->pkeys + i);
lib/libssl/ssl_lib.c
2400
SSL_CERT *c;
lib/libssl/ssl_lib.c
2404
c = s->cert;
lib/libssl/ssl_lib.c
2409
(c->pkeys[SSL_PKEY_ECC].privatekey != NULL))
lib/libssl/ssl_lib.c
2416
pkey = c->pkeys[idx].privatekey;
lib/libssl/ssl_local.h
1208
void ssl_cert_free(SSL_CERT *c);
lib/libssl/ssl_local.h
1257
EVP_PKEY *ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *c, const EVP_MD **pmd,
lib/libssl/ssl_local.h
1261
void ssl_set_cert_masks(SSL_CERT *c, const SSL_CIPHER *cipher);
lib/libssl/ssl_local.h
264
#define SSL_C_PKEYLENGTH(c) 1024
lib/libssl/ssl_rsa.c
181
SSL_CERT *c;
lib/libssl/ssl_rsa.c
190
if ((c = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_rsa.c
193
if (c->pkeys[i].x509 != NULL) {
lib/libssl/ssl_rsa.c
196
if ((pktmp = X509_get0_pubkey(c->pkeys[i].x509)) == NULL)
lib/libssl/ssl_rsa.c
214
if (!X509_check_private_key(c->pkeys[i].x509, pkey)) {
lib/libssl/ssl_rsa.c
215
X509_free(c->pkeys[i].x509);
lib/libssl/ssl_rsa.c
216
c->pkeys[i].x509 = NULL;
lib/libssl/ssl_rsa.c
222
EVP_PKEY_free(c->pkeys[i].privatekey);
lib/libssl/ssl_rsa.c
224
c->pkeys[i].privatekey = pkey;
lib/libssl/ssl_rsa.c
225
c->key = &(c->pkeys[i]);
lib/libssl/ssl_rsa.c
227
c->valid = 0;
lib/libssl/ssl_rsa.c
388
SSL_CERT *c;
lib/libssl/ssl_rsa.c
398
if ((c = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_rsa.c
414
if (c->pkeys[i].privatekey != NULL) {
lib/libssl/ssl_rsa.c
415
EVP_PKEY *priv_key = c->pkeys[i].privatekey;
lib/libssl/ssl_rsa.c
433
EVP_PKEY_free(c->pkeys[i].privatekey);
lib/libssl/ssl_rsa.c
434
c->pkeys[i].privatekey = NULL;
lib/libssl/ssl_rsa.c
442
X509_free(c->pkeys[i].x509);
lib/libssl/ssl_rsa.c
444
c->pkeys[i].x509 = x;
lib/libssl/ssl_rsa.c
445
c->key = &(c->pkeys[i]);
lib/libssl/ssl_rsa.c
447
c->valid = 0;
lib/libssl/ssl_sess.c
145
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
lib/libssl/ssl_sess.c
750
SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
lib/libssl/ssl_sess.c
760
CRYPTO_add(&c->references, 1, CRYPTO_LOCK_SSL_SESSION);
lib/libssl/ssl_sess.c
767
s = lh_SSL_SESSION_insert(ctx->sessions, c);
lib/libssl/ssl_sess.c
774
if (s != NULL && s != c) {
lib/libssl/ssl_sess.c
790
SSL_SESSION_list_add(ctx, c);
lib/libssl/ssl_sess.c
825
SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
lib/libssl/ssl_sess.c
827
return remove_session_lock(ctx, c, 1);
lib/libssl/ssl_sess.c
832
remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
lib/libssl/ssl_sess.c
837
if (c == NULL || c->session_id_length == 0)
lib/libssl/ssl_sess.c
842
if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
lib/libssl/ssl_sess.c
844
r = lh_SSL_SESSION_delete(ctx->sessions, c);
lib/libssl/ssl_sess.c
845
SSL_SESSION_list_remove(ctx, c);
lib/libssl/ssl_srvr.c
1109
if ((c = ssl3_choose_cipher(s, s->s3->hs.client_ciphers,
lib/libssl/ssl_srvr.c
1115
s->s3->hs.cipher = c;
lib/libssl/ssl_srvr.c
772
SSL_CIPHER *c;
lib/libssl/ssl_srvr.c
970
c = sk_SSL_CIPHER_value(ciphers, i);
lib/libssl/ssl_srvr.c
971
if (c->value == s->session->cipher_value) {
lib/libssl/ssl_tlsext.c
718
uint8_t prev, c = 0;
lib/libssl/ssl_tlsext.c
736
prev = c;
lib/libssl/ssl_tlsext.c
737
if (!CBS_get_u8(&hostname, &c))
lib/libssl/ssl_tlsext.c
740
if (!isascii(c) || c == '\0')
lib/libssl/ssl_tlsext.c
743
if (!isalnum(c) && c != '-' && c != '.')
lib/libssl/ssl_tlsext.c
747
if (c == '-' || c == '.')
lib/libssl/ssl_tlsext.c
750
if (c == '.') {
lib/libusbhid/parse.c
102
if (c->report_ID == 0) {
lib/libusbhid/parse.c
106
if (s->last_pos[i].rid == c->report_ID)
lib/libusbhid/parse.c
113
s->last_pos[i].rid = c->report_ID;
lib/libusbhid/parse.c
120
c->report_ID = next_rID;
lib/libusbhid/parse.c
201
h->report_ID = c->report_ID; \
lib/libusbhid/parse.c
210
hid_item_t nc, *c;
lib/libusbhid/parse.c
221
c = &s->cur[s->pushlevel];
lib/libusbhid/parse.c
230
c->usage = dval;
lib/libusbhid/parse.c
247
if (s->kindset & (1 << c->kind)) {
lib/libusbhid/parse.c
248
*h = *c;
lib/libusbhid/parse.c
249
h->pos = s->pos[c->kind];
lib/libusbhid/parse.c
250
s->pos[c->kind] += c->report_size * c->report_count;
lib/libusbhid/parse.c
262
hid_clear_local(c);
lib/libusbhid/parse.c
314
c->kind = hid_input;
lib/libusbhid/parse.c
315
c->flags = dval;
lib/libusbhid/parse.c
317
c->report_count = s->loc_count;
lib/libusbhid/parse.c
318
c->report_size = s->loc_size;
lib/libusbhid/parse.c
320
if (c->flags & HIO_VARIABLE) {
lib/libusbhid/parse.c
322
if (c->report_count > 255) {
lib/libusbhid/parse.c
325
s->ncount = c->report_count;
lib/libusbhid/parse.c
331
c->report_count = 1;
lib/libusbhid/parse.c
332
c->usage_minimum = 0;
lib/libusbhid/parse.c
333
c->usage_maximum = 0;
lib/libusbhid/parse.c
340
c->kind = hid_output;
lib/libusbhid/parse.c
341
c->flags = dval;
lib/libusbhid/parse.c
344
c->kind = hid_collection;
lib/libusbhid/parse.c
345
c->collection = dval;
lib/libusbhid/parse.c
346
c->collevel++;
lib/libusbhid/parse.c
347
c->usage = s->usage_last;
lib/libusbhid/parse.c
348
nc = *c;
lib/libusbhid/parse.c
360
c->kind = hid_feature;
lib/libusbhid/parse.c
361
c->flags = dval;
lib/libusbhid/parse.c
365
c->kind = hid_endcollection;
lib/libusbhid/parse.c
366
if (c->collevel == 0) {
lib/libusbhid/parse.c
370
c->collevel--;
lib/libusbhid/parse.c
371
*h = *c;
lib/libusbhid/parse.c
381
c->_usage_page = dval << 16;
lib/libusbhid/parse.c
384
c->logical_minimum = dval;
lib/libusbhid/parse.c
387
c->logical_maximum = dval;
lib/libusbhid/parse.c
390
c->physical_minimum = dval;
lib/libusbhid/parse.c
393
c->physical_maximum = dval;
lib/libusbhid/parse.c
396
c->unit_exponent = dval;
lib/libusbhid/parse.c
399
c->unit = dval;
lib/libusbhid/parse.c
406
hid_switch_rid(s, c, dval & mask);
lib/libusbhid/parse.c
415
s->cur[s->pushlevel] = *c;
lib/libusbhid/parse.c
417
c->report_size = s->loc_size;
lib/libusbhid/parse.c
418
c->report_count = s->loc_count;
lib/libusbhid/parse.c
420
c = &s->cur[s->pushlevel];
lib/libusbhid/parse.c
426
c = &s->cur[s->pushlevel];
lib/libusbhid/parse.c
428
s->loc_size = c->report_size;
lib/libusbhid/parse.c
429
s->loc_count = c->report_count;
lib/libusbhid/parse.c
430
c->report_size = 0;
lib/libusbhid/parse.c
431
c->report_count = 0;
lib/libusbhid/parse.c
442
dval = (dval & mask) | c->_usage_page;
lib/libusbhid/parse.c
461
dval = (dval & mask) | c->_usage_page;
lib/libusbhid/parse.c
462
c->usage_minimum = dval;
lib/libusbhid/parse.c
469
dval = (dval & mask) | c->_usage_page;
lib/libusbhid/parse.c
470
c->usage_maximum = dval;
lib/libusbhid/parse.c
478
(c->usage_minimum <= c->usage_maximum)) {
lib/libusbhid/parse.c
481
c->usage_minimum;
lib/libusbhid/parse.c
483
c->usage_maximum;
lib/libusbhid/parse.c
491
c->designator_index = dval;
lib/libusbhid/parse.c
494
c->designator_minimum = dval;
lib/libusbhid/parse.c
497
c->designator_maximum = dval;
lib/libusbhid/parse.c
500
c->string_index = dval;
lib/libusbhid/parse.c
503
c->string_minimum = dval;
lib/libusbhid/parse.c
506
c->string_maximum = dval;
lib/libusbhid/parse.c
509
c->set_delimiter = dval;
lib/libusbhid/parse.c
75
hid_clear_local(hid_item_t *c)
lib/libusbhid/parse.c
78
c->usage = 0;
lib/libusbhid/parse.c
79
c->usage_minimum = 0;
lib/libusbhid/parse.c
80
c->usage_maximum = 0;
lib/libusbhid/parse.c
81
c->designator_index = 0;
lib/libusbhid/parse.c
82
c->designator_minimum = 0;
lib/libusbhid/parse.c
83
c->designator_maximum = 0;
lib/libusbhid/parse.c
84
c->string_index = 0;
lib/libusbhid/parse.c
85
c->string_minimum = 0;
lib/libusbhid/parse.c
86
c->string_maximum = 0;
lib/libusbhid/parse.c
87
c->set_delimiter = 0;
lib/libusbhid/parse.c
91
hid_switch_rid(struct hid_data *s, struct hid_item *c, int32_t next_rID)
lib/libusbhid/parse.c
97
if (c->report_ID == next_rID)
lib/libutil/ber.c
1153
ober_putc(struct ber *ber, u_char c)
lib/libutil/ber.c
1156
*ber->br_wptr = c;
lib/libutil/ber.c
1274
u_char c, last = 0;
lib/libutil/ber.c
1347
if (ober_getc(ber, &c) != 1)
lib/libutil/ber.c
1351
if ((i == 1 && last == 0 && (c & 0x80) == 0) ||
lib/libutil/ber.c
1352
(i == 1 && last == 0xff && (c & 0x80) != 0)) {
lib/libutil/ber.c
1358
val |= c;
lib/libutil/ber.c
1359
last = c;
lib/libutil/ber.c
1434
ober_getc(struct ber *b, u_char *c)
lib/libutil/ber.c
1436
return ober_read(b, c, 1);
lib/libutil/ber.c
43
static void ober_putc(struct ber *ber, u_char c);
lib/libutil/ber.c
49
static ssize_t ober_getc(struct ber *b, u_char *c);
lib/libutil/duid.c
26
char c;
lib/libutil/duid.c
36
c = duid[i];
lib/libutil/duid.c
37
if ((c < '0' || c > '9') && (c < 'a' || c > 'f'))
lib/libutil/passwd.c
262
int first, c;
lib/libutil/passwd.c
266
first = c = getchar();
lib/libutil/passwd.c
267
while (c != '\n' && c != EOF)
lib/libutil/passwd.c
268
c = getchar();
lib/libz/deflate.c
137
#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
lib/libz/deflate.h
291
#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
lib/libz/deflate.h
337
# define _tr_tally_lit(s, c, flush) \
lib/libz/deflate.h
338
{ uch cc = (c); \
lib/libz/deflate.h
355
# define _tr_tally_lit(s, c, flush) \
lib/libz/deflate.h
356
{ uch cc = (c); \
lib/libz/deflate.h
376
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
lib/libz/gzread.c
505
int ZEXPORT gzungetc(int c, gzFile file) {
lib/libz/gzread.c
529
if (c < 0)
lib/libz/gzread.c
536
state->x.next[0] = (unsigned char)c;
lib/libz/gzread.c
539
return c;
lib/libz/gzread.c
559
state->x.next[0] = (unsigned char)c;
lib/libz/gzread.c
562
return c;
lib/libz/gzwrite.c
307
int ZEXPORT gzputc(gzFile file, int c) {
lib/libz/gzwrite.c
335
state->in[have] = (unsigned char)c;
lib/libz/gzwrite.c
338
return c & 0xff;
lib/libz/gzwrite.c
343
buf[0] = (unsigned char)c;
lib/libz/gzwrite.c
346
return c & 0xff;
lib/libz/trees.c
237
# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
lib/libz/trees.c
241
# define send_code(s, c, tree) \
lib/libz/trees.c
242
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
lib/libz/trees.c
243
send_bits(s, tree[c].Code, tree[c].Len); }
lib/libz/zlib.h
1607
ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
lib/libz/zlib.h
1630
ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
lib/libz/zutil.h
237
# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
lib/libz/zutil.h
238
# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
lib/libz/zutil.h
244
# define Tracec(c,x)
lib/libz/zutil.h
245
# define Tracecv(c,x)
libexec/ftpd/ftpcmd.y
1097
int c;
libexec/ftpd/ftpcmd.y
1102
for (c = 0; tmpline[c] != '\0' && --n > 0; ++c) {
libexec/ftpd/ftpcmd.y
1103
*cs++ = tmpline[c];
libexec/ftpd/ftpcmd.y
1104
if (tmpline[c] == '\n') {
libexec/ftpd/ftpcmd.y
1111
if (c == 0)
libexec/ftpd/ftpcmd.y
1114
while ((c = getc(stdin)) != EOF) {
libexec/ftpd/ftpcmd.y
1115
c &= 0377;
libexec/ftpd/ftpcmd.y
1116
if (c == IAC) {
libexec/ftpd/ftpcmd.y
1117
if ((c = getc(stdin)) != EOF) {
libexec/ftpd/ftpcmd.y
1118
c &= 0377;
libexec/ftpd/ftpcmd.y
1119
switch (c) {
libexec/ftpd/ftpcmd.y
1122
c = getc(stdin);
libexec/ftpd/ftpcmd.y
1123
printf("%c%c%c", IAC, DONT, 0377&c);
libexec/ftpd/ftpcmd.y
1128
c = getc(stdin);
libexec/ftpd/ftpcmd.y
1129
printf("%c%c%c", IAC, WONT, 0377&c);
libexec/ftpd/ftpcmd.y
1139
*cs++ = c;
libexec/ftpd/ftpcmd.y
1147
while (c != '\n' && (c = getc(stdin)) != EOF)
libexec/ftpd/ftpcmd.y
1151
if (c == '\n')
libexec/ftpd/ftpcmd.y
1154
if (c == EOF && cs == s)
libexec/ftpd/ftpcmd.y
1198
char c;
libexec/ftpd/ftpcmd.y
1221
c = *cp;
libexec/ftpd/ftpcmd.y
1224
*cp = c;
libexec/ftpd/ftpcmd.y
1231
c = cbuf[cpos];
libexec/ftpd/ftpcmd.y
1235
cbuf[cpos] = c;
libexec/ftpd/ftpcmd.y
1255
c = cbuf[cpos];
libexec/ftpd/ftpcmd.y
1259
cbuf[cpos] = c;
libexec/ftpd/ftpcmd.y
1324
c = cbuf[cpos];
libexec/ftpd/ftpcmd.y
1327
cbuf[cpos] = c;
libexec/ftpd/ftpcmd.y
1442
struct tab *c;
libexec/ftpd/ftpcmd.y
1451
for (c = ctab; c->name != NULL; c++) {
libexec/ftpd/ftpcmd.y
1452
int len = strlen(c->name);
libexec/ftpd/ftpcmd.y
1472
c = ctab + j * lines + i;
libexec/ftpd/ftpcmd.y
1473
printf("%s%c", c->name,
libexec/ftpd/ftpcmd.y
1474
c->implemented ? ' ' : '*');
libexec/ftpd/ftpcmd.y
1475
if (c + lines >= &ctab[NCMDS])
libexec/ftpd/ftpcmd.y
1477
w = strlen(c->name) + 1;
libexec/ftpd/ftpcmd.y
1490
c = lookup(ctab, s);
libexec/ftpd/ftpcmd.y
1491
if (c == NULL) {
libexec/ftpd/ftpcmd.y
1495
if (c->implemented)
libexec/ftpd/ftpcmd.y
1496
reply(214, "Syntax: %s%s %s", type, c->name, c->help);
libexec/ftpd/ftpcmd.y
1499
c->name, c->help);
libexec/ftpd/ftpcmd.y
1516
int c;
libexec/ftpd/ftpcmd.y
1536
while((c = getc(fin)) != EOF) {
libexec/ftpd/ftpcmd.y
1537
if (c == '\n') /* will get expanded to \r\n */
libexec/ftpd/ftpd.c
1144
int c;
libexec/ftpd/ftpd.c
1149
if ((c = getc(fin)) == EOF) {
libexec/ftpd/ftpd.c
1156
if (c == '\n')
libexec/ftpd/ftpd.c
1220
int c;
libexec/ftpd/ftpd.c
1225
if ((c = getc(fout)) == EOF) {
libexec/ftpd/ftpd.c
1232
if (c == '\n')
libexec/ftpd/ftpd.c
1501
int c, cnt, filefd, netfd;
libexec/ftpd/ftpd.c
1509
while ((c = getc(instr)) != EOF) {
libexec/ftpd/ftpd.c
1513
if (c == '\n') {
libexec/ftpd/ftpd.c
1518
(void) putc(c, outstr);
libexec/ftpd/ftpd.c
1627
int c;
libexec/ftpd/ftpd.c
1668
while ((c = getc(instr)) != EOF) {
libexec/ftpd/ftpd.c
1672
if (c == '\n')
libexec/ftpd/ftpd.c
1674
while (c == '\r') {
libexec/ftpd/ftpd.c
1677
if ((c = getc(instr)) != '\n') {
libexec/ftpd/ftpd.c
1679
if (c == '\0' || c == EOF)
libexec/ftpd/ftpd.c
1683
(void) putc(c, outstr);
libexec/ftpd/ftpd.c
1726
int c;
libexec/ftpd/ftpd.c
1736
while ((c = getc(fin)) != EOF) {
libexec/ftpd/ftpd.c
1737
if (c == '\n') {
libexec/ftpd/ftpd.c
1751
if (atstart && isdigit(c))
libexec/ftpd/ftpd.c
1753
(void) putc(c, stdout);
libexec/ftpd/ftpd.c
1754
atstart = (c == '\n');
libexec/getty/main.c
368
int c, r;
libexec/getty/main.c
403
if ((c = cs&0177) == 0)
libexec/getty/main.c
406
if (c == EOT)
libexec/getty/main.c
408
if (c == '\r' || c == '\n' || np >= name + sizeof name -1) {
libexec/getty/main.c
412
if (islower(c))
libexec/getty/main.c
414
else if (isupper(c))
libexec/getty/main.c
416
else if (c == ERASE || c == '\b') {
libexec/getty/main.c
424
} else if (c == KILL) {
libexec/getty/main.c
437
} else if (isdigit(c))
libexec/getty/main.c
439
if (IG && (c <= ' ' || c > 0176))
libexec/getty/main.c
441
*np++ = c;
libexec/getty/main.c
442
if (c == '\033') {
libexec/getty/main.c
454
if (c == '\r')
libexec/getty/main.c
509
char c;
libexec/getty/main.c
511
c = cc;
libexec/getty/main.c
513
c |= partab[c&0177] & 0200;
libexec/getty/main.c
515
c ^= 0200;
libexec/getty/main.c
518
outbuf[obufcnt++] = c;
libexec/getty/main.c
522
write(STDOUT_FILENO, &c, 1);
libexec/getty/subr.c
373
char c, baud[20], *type = "default";
libexec/getty/subr.c
379
if (read(STDIN_FILENO, &c, 1) <= 0)
libexec/getty/subr.c
381
c &= 0177;
libexec/getty/subr.c
382
if (c == '\n' || c == '\r')
libexec/getty/subr.c
384
if (c == 'B')
libexec/getty/subr.c
386
baud[len] = c;
libexec/getty/subr.c
410
char c, *type = "9600-baud";
libexec/getty/subr.c
417
if (read(STDIN_FILENO, &c, sizeof(char)) != sizeof(char))
libexec/getty/subr.c
424
switch (c & 0377) {
libexec/ld.so/alpha/SYS.h
71
#define DL_SYSCALL(c) \
libexec/ld.so/alpha/SYS.h
72
LEAF_NOPROFILE(_dl_##c, irrelevant); \
libexec/ld.so/alpha/SYS.h
73
ldiq v0, SYS_##c; \
libexec/ld.so/alpha/SYS.h
75
PINSYSCALL(SYS_##c, 99b); \
libexec/ld.so/alpha/SYS.h
80
END(_dl_##c)
libexec/ld.so/chacha_private.h
120
ctarget = c;
libexec/ld.so/chacha_private.h
121
c = tmp;
libexec/ld.so/chacha_private.h
191
U32TO8_LITTLE(c + 0,x0);
libexec/ld.so/chacha_private.h
192
U32TO8_LITTLE(c + 4,x1);
libexec/ld.so/chacha_private.h
193
U32TO8_LITTLE(c + 8,x2);
libexec/ld.so/chacha_private.h
194
U32TO8_LITTLE(c + 12,x3);
libexec/ld.so/chacha_private.h
195
U32TO8_LITTLE(c + 16,x4);
libexec/ld.so/chacha_private.h
196
U32TO8_LITTLE(c + 20,x5);
libexec/ld.so/chacha_private.h
197
U32TO8_LITTLE(c + 24,x6);
libexec/ld.so/chacha_private.h
198
U32TO8_LITTLE(c + 28,x7);
libexec/ld.so/chacha_private.h
199
U32TO8_LITTLE(c + 32,x8);
libexec/ld.so/chacha_private.h
200
U32TO8_LITTLE(c + 36,x9);
libexec/ld.so/chacha_private.h
201
U32TO8_LITTLE(c + 40,x10);
libexec/ld.so/chacha_private.h
202
U32TO8_LITTLE(c + 44,x11);
libexec/ld.so/chacha_private.h
203
U32TO8_LITTLE(c + 48,x12);
libexec/ld.so/chacha_private.h
204
U32TO8_LITTLE(c + 52,x13);
libexec/ld.so/chacha_private.h
205
U32TO8_LITTLE(c + 56,x14);
libexec/ld.so/chacha_private.h
206
U32TO8_LITTLE(c + 60,x15);
libexec/ld.so/chacha_private.h
210
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
libexec/ld.so/chacha_private.h
217
c += 64;
libexec/ld.so/chacha_private.h
40
#define ROTATE(v,c) (ROTL32(v,c))
libexec/ld.so/chacha_private.h
45
#define QUARTERROUND(a,b,c,d) \
libexec/ld.so/chacha_private.h
47
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
libexec/ld.so/chacha_private.h
49
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
libexec/ld.so/chacha_private.h
89
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
libexec/ld.so/dl_printf.c
75
putcharfd(int c, int fd)
libexec/ld.so/dl_printf.c
77
char b = c;
libexec/ld.so/ldconfig/ldconfig.c
100
while ((c = getopt(argc, argv, "DmPrRsSUv")) != -1) {
libexec/ld.so/ldconfig/ldconfig.c
101
switch (c) {
libexec/ld.so/ldconfig/ldconfig.c
94
int i, c;
libexec/ld.so/ldd/ldd.c
49
int c, xflag, ret;
libexec/ld.so/ldd/ldd.c
55
while ((c = getopt(argc, argv, "x")) != -1) {
libexec/ld.so/ldd/ldd.c
56
switch (c) {
libexec/ld.so/mips64/SYS.h
39
#define DL_SYSCALL(c) \
libexec/ld.so/mips64/SYS.h
40
NLEAF(_dl_##c,0) \
libexec/ld.so/mips64/SYS.h
41
li v0,SYS_##c; \
libexec/ld.so/mips64/SYS.h
43
PINSYSCALL(SYS_##c, 99b); \
libexec/ld.so/mips64/SYS.h
49
END(_dl_##c)
libexec/ld.so/resolve.c
643
unsigned char c;
libexec/ld.so/resolve.c
654
for (p = (const unsigned char *)name; (c = *p) != '\0'; p++) {
libexec/ld.so/resolve.c
655
sl.sl_elf_hash = (sl.sl_elf_hash << 4) + c;
libexec/ld.so/resolve.c
657
sl.sl_gnu_hash = sl.sl_gnu_hash * 33 + c;
libexec/ld.so/strtol.c
105
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
libexec/ld.so/strtol.c
106
if (c >= '0' && c <= '9')
libexec/ld.so/strtol.c
107
c -= '0';
libexec/ld.so/strtol.c
108
else if (c >= 'A' && c <= 'Z')
libexec/ld.so/strtol.c
109
c -= 'A' - 10;
libexec/ld.so/strtol.c
110
else if (c >= 'a' && c <= 'z')
libexec/ld.so/strtol.c
111
c -= 'a' - 10;
libexec/ld.so/strtol.c
114
if (c >= base)
libexec/ld.so/strtol.c
119
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
libexec/ld.so/strtol.c
125
acc -= c;
libexec/ld.so/strtol.c
128
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
libexec/ld.so/strtol.c
134
acc += c;
libexec/ld.so/strtol.c
48
int c;
libexec/ld.so/strtol.c
58
c = (unsigned char) *s++;
libexec/ld.so/strtol.c
59
} while (c <= ' ' || c >= 0x7f);
libexec/ld.so/strtol.c
60
if (c == '-') {
libexec/ld.so/strtol.c
62
c = *s++;
libexec/ld.so/strtol.c
65
if (c == '+')
libexec/ld.so/strtol.c
66
c = *s++;
libexec/ld.so/strtol.c
68
if ((base == 0 || base == 16) && c == '0' &&
libexec/ld.so/strtol.c
71
c = s[1];
libexec/ld.so/strtol.c
76
base = c == '0' ? 8 : 10;
libexec/ld.so/util.h
189
char c, sc;
libexec/ld.so/util.h
191
if ((c = *find++) != 0) {
libexec/ld.so/util.h
197
} while (sc != c);
libexec/ld.so/util.h
205
_dl_isalnum(int c)
libexec/ld.so/util.h
207
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
libexec/ld.so/util.h
89
_dl_memset(void *dst, const int c, size_t n)
libexec/ld.so/util.h
95
*d++ = c;
libexec/lockspool/lockspool.c
53
char *from, c;
libexec/lockspool/lockspool.c
97
nread = read(STDIN_FILENO, &c, 1);
libexec/login_chpass/login_chpass.c
53
int c;
libexec/login_chpass/login_chpass.c
66
while ((c = getopt(argc, argv, "s:v:")) != -1)
libexec/login_chpass/login_chpass.c
67
switch (c) {
libexec/login_lchpass/login_lchpass.c
61
int c;
libexec/login_lchpass/login_lchpass.c
76
while ((c = getopt(argc, argv, "v:s:")) != -1)
libexec/login_lchpass/login_lchpass.c
77
switch (c) {
libexec/login_ldap/aldap.c
1343
isu8cont(unsigned char c)
libexec/login_ldap/aldap.c
1345
return (c & (0x80 | 0x40)) == 0x80;
libexec/login_ldap/aldap.c
255
struct ber_element *root = NULL, *ber, *c;
libexec/login_ldap/aldap.c
268
c = ber;
libexec/login_ldap/aldap.c
290
aldap_create_page_control(c, 100, page);
libexec/login_ldap/aldap.c
314
struct ber c;
libexec/login_ldap/aldap.c
317
c.br_wbuf = NULL;
libexec/login_ldap/aldap.c
330
if ((len = ober_write_elements(&c, ber)) < 1)
libexec/login_ldap/aldap.c
333
c.br_wbuf, (size_t)len) == NULL)
libexec/login_ldap/aldap.c
337
ober_free(&c);
libexec/login_ldap/aldap.c
342
ober_free(&c);
libexec/login_ldap/login_ldap.c
67
int c;
libexec/login_ldap/login_ldap.c
85
while ((c = getopt(argc, argv, "ds:v:")) != -1) {
libexec/login_ldap/login_ldap.c
86
switch(c) {
libexec/login_radius/login_radius.c
104
while ((c = getopt(argc, argv, "ds:v:")) != -1)
libexec/login_radius/login_radius.c
105
switch (c) {
libexec/login_radius/login_radius.c
165
c = -1;
libexec/login_radius/login_radius.c
167
while (++c < sizeof(challenge) &&
libexec/login_radius/login_radius.c
168
read(3, &challenge[c], 1) == 1) {
libexec/login_radius/login_radius.c
169
if (challenge[c] == '\0' && ++n == 2)
libexec/login_radius/login_radius.c
171
if (challenge[c] == '\0' && n == 1)
libexec/login_radius/login_radius.c
172
password = challenge + c + 1;
libexec/login_radius/login_radius.c
183
c = raddauth(username, class, style, challenge,
libexec/login_radius/login_radius.c
186
c = raddauth(username, class, style, NULL, 0, password, &emsg);
libexec/login_radius/login_radius.c
188
if (c == 0) {
libexec/login_radius/login_radius.c
91
int c, n;
libexec/login_reject/login_reject.c
109
c = -1;
libexec/login_reject/login_reject.c
53
int mode = 0, c;
libexec/login_reject/login_reject.c
68
while ((c = getopt(argc, argv, "v:s:")) != -1)
libexec/login_reject/login_reject.c
69
switch (c) {
libexec/login_token/login_token.c
137
c = -1;
libexec/login_token/login_token.c
138
while (++c < sizeof(challenge) &&
libexec/login_token/login_token.c
139
read(3, &challenge[c], 1) == 1) {
libexec/login_token/login_token.c
140
if (challenge[c] == '\0' && ++mode == 2)
libexec/login_token/login_token.c
142
if (challenge[c] == '\0' && mode == 1)
libexec/login_token/login_token.c
143
pp = challenge + c + 1;
libexec/login_token/login_token.c
64
int c;
libexec/login_token/login_token.c
96
while ((c = getopt(argc, argv, "ds:v:")) != -1)
libexec/login_token/login_token.c
97
switch (c) {
libexec/login_token/token.c
110
int r, c;
libexec/login_token/token.c
117
c = 0;
libexec/login_token/token.c
119
if (c++ >= 60)
libexec/login_yubikey/yubikey.c
310
int c, j, found;
libexec/login_yubikey/yubikey.c
313
for (c=0; c<16; c++) {
libexec/login_yubikey/yubikey.c
314
if (wpassword[j] == keymaps[index][c]) {
libexec/login_yubikey/yubikey.c
315
token[j] = modhex_trans[c];
libexec/snmpd/snmpd_metrics/mib.c
1536
int c;
libexec/snmpd/snmpd_metrics/mib.c
1538
if ((c = pfi_count()) == -1)
libexec/snmpd/snmpd_metrics/mib.c
1541
agentx_varbind_integer(vb, c);
libexec/snmpd/snmpd_metrics/mib.c
1625
int c;
libexec/snmpd/snmpd_metrics/mib.c
1627
if ((c = pft_count()) == -1)
libexec/snmpd/snmpd_metrics/mib.c
1630
agentx_varbind_integer(vb, c);
libexec/snmpd/snmpd_metrics/mib.c
1992
int i, c;
libexec/snmpd/snmpd_metrics/mib.c
1994
for (i = c = 0; ; i++) {
libexec/snmpd/snmpd_metrics/mib.c
2006
c += sensordev.sensors_count;
libexec/snmpd/snmpd_metrics/mib.c
2009
agentx_varbind_integer(vb, c);
libexec/snmpd/snmpd_metrics/mib.c
2273
int c = 0;
libexec/snmpd/snmpd_metrics/mib.c
2278
c++;
libexec/snmpd/snmpd_metrics/mib.c
2280
agentx_varbind_integer(vb, c);
libexec/snmpd/snmpd_metrics/pf.c
229
int c = 0;
libexec/snmpd/snmpd_metrics/pf.c
237
c++;
libexec/snmpd/snmpd_metrics/pf.c
240
return (c);
libexec/snmpd/snmpd_metrics/pf.c
326
int c = 0;
libexec/snmpd/snmpd_metrics/pf.c
336
c++;
libexec/snmpd/snmpd_metrics/pf.c
340
return (c);
libexec/spamd-setup/spamd-setup.c
188
struct cidr c;
libexec/spamd-setup/spamd-setup.c
199
memset(&c.addr, 0, sizeof(c.addr));
libexec/spamd-setup/spamd-setup.c
200
if (inet_net_pton(AF_INET, astring, &c.addr, sizeof(c.addr))
libexec/spamd-setup/spamd-setup.c
203
c.addr = ntohl(c.addr);
libexec/spamd-setup/spamd-setup.c
206
c.bits = maskbits;
libexec/spamd-setup/spamd-setup.c
207
cidr2range(c, &start->addr, &end->addr);
libexec/spamd/sdl.c
356
#define grow_sdlist(sd, c, l) do { \
libexec/spamd/sdl.c
357
if (c == l) { \
libexec/spamd/spamd.c
475
char *c = cp->obuf + off;
libexec/spamd/spamd.c
485
snprintf(c, len, "%s ", nreply);
libexec/spamd/spamd.c
486
i += strlen(c);
libexec/spamd/spamd.c
497
c = grow_obuf(cp, off);
libexec/spamd/spamd.c
498
if (c == NULL)
libexec/spamd/spamd.c
503
if (c[i-1] == '\n') {
libexec/spamd/spamd.c
506
snprintf(c + i, len - i, "%s ", nreply);
libexec/spamd/spamd.c
507
i += strlen(c + i);
libexec/spamd/spamd.c
517
c[i++] = sav;
libexec/spamd/spamd.c
519
c[i] = '\0';
libexec/spamd/spamd.c
529
c[i++] = '\n';
libexec/spamd/spamd.c
531
c[i] = '\0';
libexec/spamd/spamd.c
534
c[i++] = '"';
libexec/spamd/spamd.c
536
c[i] = '\0';
libexec/spamd/spamd.c
539
inet_ntop(af, ia, c + i, (len - i));
libexec/spamd/spamd.c
540
i += strlen(c + i);
libexec/spamd/spamd.c
547
c[i++] = sav;
libexec/spamd/spamd.c
548
c[i++] = *s;
libexec/spamd/spamd.c
550
c[i] = '\0';
regress/bin/ksh/edit/edit.c
51
int c, nready, ptyfd, readprompt, ret, status, timeout;
regress/bin/ksh/edit/edit.c
53
while ((c = getopt(argc, argv, "p:")) != -1) {
regress/bin/ksh/edit/edit.c
54
switch (c) {
regress/lib/libc/arch/alpha/divremtest/divremtest.c
142
#define TRY_IT(a, b, c) \
regress/lib/libc/arch/alpha/divremtest/divremtest.c
143
divres.a = op1.b / op2.c; \
regress/lib/libc/arch/alpha/divremtest/divremtest.c
144
modres.a = op1.b % op2.c; \
regress/lib/libc/arch/alpha/divremtest/divremtest.c
49
int c;
regress/lib/libc/arch/alpha/divremtest/divremtest.c
53
while ((c = getopt(argc, argv, "g")) != -1)
regress/lib/libc/arch/alpha/divremtest/divremtest.c
54
switch (c) {
regress/lib/libc/asr/bin/common.c
269
char buf[256], **c;
regress/lib/libc/asr/bin/common.c
273
for(c = e->h_aliases; *c; c++)
regress/lib/libc/asr/bin/common.c
274
printf(" \"%s\"", *c);
regress/lib/libc/asr/bin/common.c
279
for(c = e->h_addr_list; *c; c++) {
regress/lib/libc/asr/bin/common.c
280
printf(" %s", inet_ntop(e->h_addrtype, *c, buf, sizeof buf));
regress/lib/libc/asr/bin/common.c
288
char buf[256], **c;
regress/lib/libc/asr/bin/common.c
296
for (c = e->n_aliases; *c; c++)
regress/lib/libc/asr/bin/common.c
297
printf(" \"%s\"", *c);
regress/lib/libc/asr/bin/threads.c
54
int id, i, j, c;
regress/lib/libc/asr/bin/threads.c
59
n = NULL; c =0;
regress/lib/libc/cephes/ieee.c
1340
void esub( a, b, c )
regress/lib/libc/cephes/ieee.c
1341
unsigned short *a, *b, *c;
regress/lib/libc/cephes/ieee.c
1347
emov (a, c);
regress/lib/libc/cephes/ieee.c
1352
emov(b,c);
regress/lib/libc/cephes/ieee.c
1361
enan( c, NBITS );
regress/lib/libc/cephes/ieee.c
1366
eadd1( a, b, c );
regress/lib/libc/cephes/ieee.c
1376
void eadd( a, b, c )
regress/lib/libc/cephes/ieee.c
1377
unsigned short *a, *b, *c;
regress/lib/libc/cephes/ieee.c
1384
emov(a,c);
regress/lib/libc/cephes/ieee.c
1389
emov(b,c);
regress/lib/libc/cephes/ieee.c
1399
enan( c, NBITS );
regress/lib/libc/cephes/ieee.c
1404
eadd1( a, b, c );
regress/lib/libc/cephes/ieee.c
1407
void eadd1( a, b, c )
regress/lib/libc/cephes/ieee.c
1408
unsigned short *a, *b, *c;
regress/lib/libc/cephes/ieee.c
1417
emov(a,c);
regress/lib/libc/cephes/ieee.c
1419
eneg(c);
regress/lib/libc/cephes/ieee.c
1424
emov(b,c);
regress/lib/libc/cephes/ieee.c
1462
eclear(c);
regress/lib/libc/cephes/ieee.c
1480
eclear(c);
regress/lib/libc/cephes/ieee.c
1481
einfin(c);
regress/lib/libc/cephes/ieee.c
1483
eneg(c);
regress/lib/libc/cephes/ieee.c
1512
emovo( bi, c );
regress/lib/libc/cephes/ieee.c
1523
void ediv( a, b, c )
regress/lib/libc/cephes/ieee.c
1524
unsigned short *a, *b, *c;
regress/lib/libc/cephes/ieee.c
1538
emov(a,c);
regress/lib/libc/cephes/ieee.c
1543
emov(b,c);
regress/lib/libc/cephes/ieee.c
1551
enan( c, NBITS );
regress/lib/libc/cephes/ieee.c
1559
einfin(c);
regress/lib/libc/cephes/ieee.c
1564
eclear(c);
regress/lib/libc/cephes/ieee.c
1582
eclear(c);
regress/lib/libc/cephes/ieee.c
1597
einfin(c);
regress/lib/libc/cephes/ieee.c
1607
emovo( bi, c );
regress/lib/libc/cephes/ieee.c
1612
*(c+(NE-1)) |= 0x8000;
regress/lib/libc/cephes/ieee.c
1614
*(c+(NE-1)) &= ~0x8000;
regress/lib/libc/cephes/ieee.c
1625
void emul( a, b, c )
regress/lib/libc/cephes/ieee.c
1626
unsigned short *a, *b, *c;
regress/lib/libc/cephes/ieee.c
1640
emov(a,c);
regress/lib/libc/cephes/ieee.c
1645
emov(b,c);
regress/lib/libc/cephes/ieee.c
1653
enan( c, NBITS );
regress/lib/libc/cephes/ieee.c
1661
einfin(c);
regress/lib/libc/cephes/ieee.c
1679
eclear(c);
regress/lib/libc/cephes/ieee.c
1694
eclear(c);
regress/lib/libc/cephes/ieee.c
1704
emovo( bi, c );
regress/lib/libc/cephes/ieee.c
1708
*(c+(NE-1)) |= 0x8000;
regress/lib/libc/cephes/ieee.c
1710
*(c+(NE-1)) &= ~0x8000;
regress/lib/libc/cephes/ieee.c
3482
int k, trail, c, rndsav;
regress/lib/libc/cephes/ieee.c
3526
c = *sp & 0x7f;
regress/lib/libc/cephes/ieee.c
3527
if( (c != 'e') && (c != 'E') && (c != '\0')
regress/lib/libc/cephes/ieee.c
3528
&& (c != '\n') && (c != '\r') && (c != ' ')
regress/lib/libc/cephes/ieee.c
3529
&& (c != ',') )
regress/lib/libc/cephes/ieee.c
3910
void eremain( a, b, c )
regress/lib/libc/cephes/ieee.c
3911
unsigned short a[], b[], c[];
regress/lib/libc/cephes/ieee.c
3918
enan( c, NBITS );
regress/lib/libc/cephes/ieee.c
3925
eclear( c );
regress/lib/libc/cephes/ieee.c
3936
emovo( num, c );
regress/lib/libc/cephes/ieee.c
912
void m16m( a, b, c )
regress/lib/libc/cephes/ieee.c
914
unsigned short b[], c[];
regress/lib/libc/cephes/ieee.c
948
c[i] = p[i];
regress/lib/libc/elf_aux_info/elf_aux_info.c
12
unsigned long long c;
regress/lib/libc/elf_aux_info/elf_aux_info.c
21
if (elf_aux_info(AT_PAGESZ, &c, sizeof(c)) != EINVAL)
regress/lib/libc/fmemopen/fmemopentest.c
32
int c, failures = 0;
regress/lib/libc/fmemopen/fmemopentest.c
47
while ((c = fgetc(s1)) != EOF)
regress/lib/libc/fmemopen/fmemopentest.c
48
fputc(c, s2);
regress/lib/libc/getaddrinfo/gaitest.c
115
int c;
regress/lib/libc/getaddrinfo/gaitest.c
121
while ((c = getopt(argc, argv, "Df:p:PRs:Sv46")) != -1) {
regress/lib/libc/getaddrinfo/gaitest.c
122
switch (c) {
regress/lib/libc/locale/check_isw/check_isw.c
103
while ((n = mbrtowc(&c, s+j, 256-j, &state)) == 1) {
regress/lib/libc/locale/check_isw/check_isw.c
105
check_bool(isalnum(s[j]), iswalnum(c), '1');
regress/lib/libc/locale/check_isw/check_isw.c
106
check_bool(isalpha(s[j]), iswalpha(c), '2');
regress/lib/libc/locale/check_isw/check_isw.c
107
check_bool(isblank(s[j]), iswblank(c), '3');
regress/lib/libc/locale/check_isw/check_isw.c
108
check_bool(iscntrl(s[j]), iswcntrl(c), '4');
regress/lib/libc/locale/check_isw/check_isw.c
109
check_bool(isdigit(s[j]), iswdigit(c), '5');
regress/lib/libc/locale/check_isw/check_isw.c
110
check_bool(isgraph(s[j]), iswgraph(c), '6');
regress/lib/libc/locale/check_isw/check_isw.c
111
check_bool(islower(s[j]), iswlower(c), '6');
regress/lib/libc/locale/check_isw/check_isw.c
112
check_bool(isprint(s[j]), iswprint(c), '7');
regress/lib/libc/locale/check_isw/check_isw.c
113
check_bool(ispunct(s[j]), iswpunct(c), '8');
regress/lib/libc/locale/check_isw/check_isw.c
114
check_bool(isspace(s[j]), iswspace(c), '9');
regress/lib/libc/locale/check_isw/check_isw.c
115
check_bool(isupper(s[j]), iswupper(c), 'a');
regress/lib/libc/locale/check_isw/check_isw.c
116
check_bool(isxdigit(s[j]), iswxdigit(c), 'b');
regress/lib/libc/locale/check_isw/check_isw.c
117
d = towlower(c);
regress/lib/libc/locale/check_isw/check_isw.c
123
d = towupper(c);
regress/lib/libc/locale/check_isw/check_isw.c
82
wchar_t c, d;
regress/lib/libc/locale/setlocale/setlocale.c
60
_test_isalpha(int expected, int c, int line)
regress/lib/libc/locale/setlocale/setlocale.c
62
int result = isalpha(c);
regress/lib/libc/locale/setlocale/setlocale.c
65
line, c, result, expected);
regress/lib/libc/locale/uselocale/uselocale.c
112
#define FUNCPARA int c
regress/lib/libc/locale/uselocale/uselocale.c
113
#define FUNCARGS c
regress/lib/libc/locale/uselocale/uselocale.c
117
#define FUNCPARA int c, locale_t locale
regress/lib/libc/locale/uselocale/uselocale.c
118
#define FUNCARGS c, locale
regress/lib/libc/orientation/orientation_test.c
121
char c;
regress/lib/libc/orientation/orientation_test.c
180
TEST_NARROW(c = fgetc(f); ungetc(c, f));
regress/lib/libc/printf/string.c
47
tc(const char *fmt, int c, const char *want)
regress/lib/libc/printf/string.c
54
irc = snprintf(buf, sizeof(buf), fmt, c);
regress/lib/libc/printf/string.c
57
warn("printf(\"%s\", %d) returned %d", fmt, c, irc);
regress/lib/libc/printf/string.c
63
fmt, c, irc, len);
regress/lib/libc/printf/string.c
69
fmt, c, buf, want);
regress/lib/libc/printf/string.c
75
fmt, c, buf, irc);
regress/lib/libc/regex/debug.c
27
register int c;
regress/lib/libc/regex/main.c
376
opt(c, s)
regress/lib/libc/regex/main.c
377
int c;
regress/lib/libc/regex/main.c
380
return(strchr(s, c) != NULL);
regress/lib/libc/regex/main.c
41
int c;
regress/lib/libc/regex/main.c
47
while ((c = getopt(argc, argv, "c:E:e:S:x")) != -1)
regress/lib/libc/regex/main.c
48
switch (c) {
regress/lib/libc/regex/split.c
116
c = *p++;
regress/lib/libc/regex/split.c
117
if (c == '\0')
regress/lib/libc/regex/split.c
120
while ((sepc = *sepp++) != '\0' && sepc != c)
regress/lib/libc/regex/split.c
128
c = *p++;
regress/lib/libc/regex/split.c
130
while ((sepc = *sepp++) != '\0' && sepc != c)
regress/lib/libc/regex/split.c
17
register char c; /* latest character */
regress/lib/libc/regex/split.c
27
while ((c = *p++) == ' ' || c == '\t')
regress/lib/libc/regex/split.c
49
while ((c = *p++) != sepc)
regress/lib/libc/regex/split.c
50
if (c == '\0')
regress/lib/libc/regex/split.c
57
while ((c = *p++) != sepc)
regress/lib/libc/regex/split.c
58
if (c == '\0')
regress/lib/libc/regex/split.c
71
while ((c = *p++) != sepc && c != sepc2)
regress/lib/libc/regex/split.c
72
if (c == '\0') {
regress/lib/libc/regex/split.c
80
while ((c = *p++) == sepc || c == sepc2)
regress/lib/libc/regex/split.c
86
while (c != '\0') {
regress/lib/libc/regex/split.c
87
while ((c = *p++) == sepc || c == sepc2)
regress/lib/libc/regex/split.c
91
while ((c = *p++) != '\0' && c != sepc && c != sepc2)
regress/lib/libc/regex/split.c
97
while ((c = *--p) == sepc || c == sepc2)
regress/lib/libc/stdio/test_fflush.c
298
int r, c;
regress/lib/libc/stdio/test_fflush.c
313
c = getc(fp);
regress/lib/libc/stdio/test_fflush.c
314
ungetc(c, fp); /* push back the character has been read */
regress/lib/libc/stdio/test_fflush.c
317
assert(getc(fp) == c);
regress/lib/libc/stdio/test_fflush.c
321
c = getc(fp);
regress/lib/libc/sys/macros.h
66
#define pollts(a, b, c, e) 0
regress/lib/libc/sys/t_sendrecv.c
116
char c = 0;
regress/lib/libc/sys/t_sendrecv.c
146
read(fd[1], &c, sizeof(c));
regress/lib/libc/sys/t_sendrecv.c
152
write(fd[0], &c, sizeof(c));
regress/lib/libc/sys/t_setrlimit.c
471
ucontext_t c;
regress/lib/libc/sys/t_setrlimit.c
479
ATF_REQUIRE(getcontext(&c) == 0);
regress/lib/libc/sys/t_setrlimit.c
480
c.uc_link = NULL;
regress/lib/libc/sys/t_setrlimit.c
481
sigemptyset(&c.uc_sigmask);
regress/lib/libc/sys/t_setrlimit.c
482
c.uc_stack.ss_flags = 0;
regress/lib/libc/sys/t_setrlimit.c
483
c.uc_stack.ss_size = 4096;
regress/lib/libc/sys/t_setrlimit.c
484
ATF_REQUIRE((c.uc_stack.ss_sp = malloc(c.uc_stack.ss_size)) != NULL);
regress/lib/libc/sys/t_setrlimit.c
485
makecontext(&c, func, 1, &lwpid);
regress/lib/libc/sys/t_setrlimit.c
486
ATF_CHECK_ERRNO(EAGAIN, _lwp_create(&c, 0, &lwpid) == -1);
regress/lib/libcrypto/bio/bio_host.c
84
unsigned char c[4];
regress/lib/libcrypto/bio/bio_host.c
95
ret = BIO_get_host_ip(bgit->input, ip.c);
regress/lib/libcrypto/bn/bn_test.c
1004
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
1014
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1023
BN_zero(c);
regress/lib/libcrypto/bn/bn_test.c
1024
if (BN_mod_exp(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
1029
if (BN_mod_exp_ct(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
1034
if (BN_mod_exp_nonct(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
1040
CHECK_GOTO(BN_bntest_rand(c, 30, 0, 1)); /* must be odd for montgomery */
regress/lib/libcrypto/bn/bn_test.c
1045
if (!BN_mod_exp(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
1054
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1062
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1069
CHECK_GOTO(BN_bntest_rand(c, 30, 0, 1)); /* must be odd for montgomery */
regress/lib/libcrypto/bn/bn_test.c
1074
if (!BN_mod_exp_ct(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
1083
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1091
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1098
CHECK_GOTO(BN_bntest_rand(c, 30, 0, 1)); /* must be odd for montgomery */
regress/lib/libcrypto/bn/bn_test.c
1103
if (!BN_mod_exp_nonct(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
1112
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1120
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1137
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
1147
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1156
BN_zero(c);
regress/lib/libcrypto/bn/bn_test.c
1157
if (BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL)) {
regress/lib/libcrypto/bn/bn_test.c
1164
CHECK_GOTO(BN_set_word(c, 16));
regress/lib/libcrypto/bn/bn_test.c
1165
if (BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL)) {
regress/lib/libcrypto/bn/bn_test.c
1172
CHECK_GOTO(BN_bntest_rand(c, 30, 0, 1)); /* must be odd for montgomery */
regress/lib/libcrypto/bn/bn_test.c
1177
if (!BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1186
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1194
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1216
BIGNUM *b, *n, *c;
regress/lib/libcrypto/bn/bn_test.c
1237
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1272
CHECK_GOTO(BN_mod_mul_montgomery(c, a, b, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1274
if (BN_cmp(c, d)) {
regress/lib/libcrypto/bn/bn_test.c
1318
CHECK_GOTO(BN_mod_mul_montgomery(c, a, a, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1320
if (BN_cmp(c, d)) {
regress/lib/libcrypto/bn/bn_test.c
1425
char c = '*';
regress/lib/libcrypto/bn/bn_test.c
1428
c = '.';
regress/lib/libcrypto/bn/bn_test.c
1430
c = '+';
regress/lib/libcrypto/bn/bn_test.c
1432
c = '*';
regress/lib/libcrypto/bn/bn_test.c
1434
c = '\n';
regress/lib/libcrypto/bn/bn_test.c
1435
putc(c, stderr);
regress/lib/libcrypto/bn/bn_test.c
1641
BIGNUM *a, *b, *c, *d;
regress/lib/libcrypto/bn/bn_test.c
1651
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1655
CHECK_GOTO(BN_one(c));
regress/lib/libcrypto/bn/bn_test.c
1667
CHECK_GOTO(BN_add(c, c, c));
regress/lib/libcrypto/bn/bn_test.c
1672
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1678
CHECK_GOTO(BN_mul(d, a, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1687
CHECK_GOTO(BN_print_fp(stderr, c));
regress/lib/libcrypto/bn/bn_test.c
1705
BIGNUM *a, *b, *c;
regress/lib/libcrypto/bn/bn_test.c
1715
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1731
CHECK_GOTO(BN_add(c, a, a));
regress/lib/libcrypto/bn/bn_test.c
1732
CHECK_GOTO(BN_sub(a, b, c));
regress/lib/libcrypto/bn/bn_test.c
1751
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
1761
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1767
CHECK_GOTO(BN_one(c));
regress/lib/libcrypto/bn/bn_test.c
1773
CHECK_GOTO(BN_add(c, c, c));
regress/lib/libcrypto/bn/bn_test.c
1778
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
1784
CHECK_GOTO(BN_div(d, e, a, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1802
BIGNUM *a, *b, *c;
regress/lib/libcrypto/bn/bn_test.c
1812
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1828
CHECK_GOTO(BN_sub(c, a, b));
regress/lib/libcrypto/bn/bn_test.c
1829
CHECK_GOTO(BN_sub(c, c, b));
regress/lib/libcrypto/bn/bn_test.c
1830
if (!BN_is_zero(c) && !BN_abs_is_word(c, 1)) {
regress/lib/libcrypto/bn/bn_test.c
301
BIGNUM *a, *b, *c;
regress/lib/libcrypto/bn/bn_test.c
311
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
319
CHECK_GOTO(BN_add(c, a, b));
regress/lib/libcrypto/bn/bn_test.c
327
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
332
CHECK_GOTO(BN_add(c, c, b));
regress/lib/libcrypto/bn/bn_test.c
333
CHECK_GOTO(BN_add(c, c, a));
regress/lib/libcrypto/bn/bn_test.c
334
if (!BN_is_zero(c)) {
regress/lib/libcrypto/bn/bn_test.c
350
BIGNUM *a, *b, *c;
regress/lib/libcrypto/bn/bn_test.c
360
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
375
CHECK_GOTO(BN_sub(c, a, b));
regress/lib/libcrypto/bn/bn_test.c
383
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
386
CHECK_GOTO(BN_add(c, c, b));
regress/lib/libcrypto/bn/bn_test.c
387
CHECK_GOTO(BN_sub(c, c, a));
regress/lib/libcrypto/bn/bn_test.c
388
if (!BN_is_zero(c)) {
regress/lib/libcrypto/bn/bn_test.c
404
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
414
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
424
if (BN_div(d, c, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
440
CHECK_GOTO(BN_div(d, c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
457
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
461
CHECK_GOTO(BN_add(d, e, c));
regress/lib/libcrypto/bn/bn_test.c
558
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
568
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
585
CHECK_GOTO(BN_div_reciprocal(d, c, a, recp, ctx));
regress/lib/libcrypto/bn/bn_test.c
602
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
606
CHECK_GOTO(BN_add(d, e, c));
regress/lib/libcrypto/bn/bn_test.c
630
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
640
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
655
CHECK_GOTO(BN_mul(c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
663
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
666
CHECK_GOTO(BN_div(d, e, c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
684
BIGNUM *a, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
692
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
702
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
710
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
713
CHECK_GOTO(BN_div(d, e, c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
727
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
735
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
739
if (BN_cmp(c, d)) {
regress/lib/libcrypto/bn/bn_test.c
752
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
760
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
764
if (BN_cmp(c, d)) {
regress/lib/libcrypto/bn/bn_test.c
781
BIGNUM *a, *b, *c, *d, *A, *B, *n;
regress/lib/libcrypto/bn/bn_test.c
791
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
835
CHECK_GOTO(BN_mod_mul_montgomery(c, A, B, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
836
CHECK_GOTO(BN_from_montgomery(A, c, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
869
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
879
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
891
CHECK_GOTO(BN_mod(c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
899
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
903
CHECK_GOTO(BN_sub(e, e, c));
regress/lib/libcrypto/bn/bn_test.c
920
BIGNUM *a, *b, *c, *d, *e;
regress/lib/libcrypto/bn/bn_test.c
930
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
939
BN_zero(c);
regress/lib/libcrypto/bn/bn_test.c
940
if (BN_mod_mul(e, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
947
CHECK_GOTO(BN_bntest_rand(c, 1024, 0, 0));
regress/lib/libcrypto/bn/bn_test.c
953
if (!BN_mod_mul(e, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
967
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
976
CHECK_GOTO(BN_print(bp, c));
regress/lib/libcrypto/bn/bn_test.c
985
CHECK_GOTO(BN_div(a, b, d, c, ctx));
regress/lib/libcrypto/cast/casttest.c
112
if (memcmp(out, &(c[z][0]), 8) != 0) {
regress/lib/libcrypto/cast/casttest.c
121
printf("%02X ", c[z][i]);
regress/lib/libcrypto/cast/casttest.c
75
static const unsigned char c[3][8] = {
regress/lib/libcrypto/des/destest.c
67
#define crypt(c,s) (DES_crypt((c),(s)))
regress/lib/libcrypto/dh/dhtest.c
74
char c = '*';
regress/lib/libcrypto/dh/dhtest.c
77
c = '.';
regress/lib/libcrypto/dh/dhtest.c
79
c = '+';
regress/lib/libcrypto/dh/dhtest.c
81
c = '*';
regress/lib/libcrypto/dh/dhtest.c
83
c = '\n';
regress/lib/libcrypto/dh/dhtest.c
84
printf("%c", c);
regress/lib/libcrypto/dsa/dsatest.c
208
char c = '*';
regress/lib/libcrypto/dsa/dsatest.c
212
c = '.';
regress/lib/libcrypto/dsa/dsatest.c
216
c = '+';
regress/lib/libcrypto/dsa/dsatest.c
218
c = '*';
regress/lib/libcrypto/dsa/dsatest.c
223
c = '\n';
regress/lib/libcrypto/dsa/dsatest.c
224
BIO_write(BN_GENCB_get_arg(arg), &c, 1);
regress/lib/libcrypto/evp/evptest.c
134
test1(const EVP_CIPHER *c, const unsigned char *key, int kn,
regress/lib/libcrypto/evp/evptest.c
144
printf("Testing cipher %s%s\n", EVP_CIPHER_name(c),
regress/lib/libcrypto/evp/evptest.c
153
if (kn != EVP_CIPHER_key_length(c)) {
regress/lib/libcrypto/evp/evptest.c
155
(unsigned long)EVP_CIPHER_key_length(c));
regress/lib/libcrypto/evp/evptest.c
166
if (EVP_CIPHER_mode(c) == EVP_CIPH_WRAP_MODE && in == 0)
regress/lib/libcrypto/evp/evptest.c
168
if (!EVP_EncryptInit_ex(ctx, c, NULL, key, eiv)) {
regress/lib/libcrypto/evp/evptest.c
202
if (EVP_CIPHER_mode(c) == EVP_CIPH_WRAP_MODE && in == 0)
regress/lib/libcrypto/evp/evptest.c
204
if (!EVP_DecryptInit_ex(ctx, c,NULL, key, eiv)) {
regress/lib/libcrypto/evp/evptest.c
247
const EVP_CIPHER *c;
regress/lib/libcrypto/evp/evptest.c
249
c = EVP_get_cipherbyname(cipher);
regress/lib/libcrypto/evp/evptest.c
250
if (!c)
regress/lib/libcrypto/evp/evptest.c
253
test1(c, key, kn, iv, in, plaintext, pn, ciphertext, cn, encdec);
regress/lib/libcrypto/idea/ideatest.c
109
if (memcmp(out,c,8) != 0)
regress/lib/libcrypto/idea/ideatest.c
118
printf("%02X ",c[i]);
regress/lib/libcrypto/idea/ideatest.c
124
idea_ecb_encrypt(c,out,&dkey);
regress/lib/libcrypto/idea/ideatest.c
70
unsigned char c[8]={0x11,0xFB,0xED,0x2B,0x01,0x98,0x6D,0xE5};
regress/lib/libcrypto/lhash/lhash_test.c
167
if (lh_delete(lh, "c") != c || lh_error(lh) != 0) {
regress/lib/libcrypto/lhash/lhash_test.c
41
const char *a = "a", *b = "b", *c = "c", *d = "d";
regress/lib/libcrypto/lhash/lhash_test.c
85
if (lh_insert(lh, (void *)c) != NULL || lh_error(lh) != 0) {
regress/lib/libcrypto/lhash/lhash_test.c
89
if (lh_retrieve(lh, "c") != c) {
regress/lib/libcrypto/mlkem/mlkem_tests.c
207
CBS dk, c, k;
regress/lib/libcrypto/mlkem/mlkem_tests.c
213
parse_get_cbs(p, NIST_DECAP_C, &c);
regress/lib/libcrypto/mlkem/mlkem_tests.c
230
if (!MLKEM_decap(priv_key, CBS_data(&c), CBS_len(&c),
regress/lib/libcrypto/mlkem/parse_test_file.c
561
uint8_t c;
regress/lib/libcrypto/mlkem/parse_test_file.c
563
if (!CBS_get_u8(cbs, &c))
regress/lib/libcrypto/mlkem/parse_test_file.c
566
if (c >= '0' && c <= '9') {
regress/lib/libcrypto/mlkem/parse_test_file.c
567
*out_nibble = c - '0';
regress/lib/libcrypto/mlkem/parse_test_file.c
570
if (c >= 'a' && c <= 'f') {
regress/lib/libcrypto/mlkem/parse_test_file.c
571
*out_nibble = c - 'a' + 10;
regress/lib/libcrypto/mlkem/parse_test_file.c
574
if (c >= 'A' && c <= 'F') {
regress/lib/libcrypto/mlkem/parse_test_file.c
575
*out_nibble = c - 'A' + 10;
regress/lib/libcrypto/rsa/rsa_test.c
112
memcpy(c, ctext_ex, sizeof(ctext_ex) - 1);
regress/lib/libcrypto/rsa/rsa_test.c
129
key2(RSA *key, unsigned char *c)
regress/lib/libcrypto/rsa/rsa_test.c
206
memcpy(c, ctext_ex, sizeof(ctext_ex) - 1);
regress/lib/libcrypto/rsa/rsa_test.c
223
key3(RSA *key, unsigned char *c)
regress/lib/libcrypto/rsa/rsa_test.c
31
key1(RSA *key, unsigned char *c)
regress/lib/libcrypto/rsa/rsa_test.c
327
memcpy(c, ctext_ex, sizeof(ctext_ex) - 1);
regress/lib/libcrypto/x509/constraints.c
461
char *c;
regress/lib/libcrypto/x509/constraints.c
580
c = ".openbsd.org";
regress/lib/libcrypto/x509/constraints.c
584
if (!x509_constraints_domain(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
586
c, d);
regress/lib/libcrypto/x509/constraints.c
590
c = "www.openbsd.org";
regress/lib/libcrypto/x509/constraints.c
592
if (x509_constraints_domain(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
594
c, d);
regress/lib/libcrypto/x509/constraints.c
598
c = "";
regress/lib/libcrypto/x509/constraints.c
600
if (!x509_constraints_domain(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
602
c, d);
regress/lib/libcrypto/x509/constraints.c
606
c = "openbsd.org";
regress/lib/libcrypto/x509/constraints.c
610
if (x509_constraints_sandns(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
612
c, d);
regress/lib/libcrypto/x509/constraints.c
618
if (!x509_constraints_sandns(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
620
c, d);
regress/lib/libcrypto/x509/constraints.c
624
c = "www.openbsd.org";
regress/lib/libcrypto/x509/constraints.c
626
if (x509_constraints_sandns(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
628
c, d);
regress/lib/libcrypto/x509/constraints.c
632
c = "";
regress/lib/libcrypto/x509/constraints.c
634
if (!x509_constraints_sandns(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
636
c, d);
regress/lib/libcrypto/x509/constraints.c
644
c = ".openbsd.org";
regress/lib/libcrypto/x509/constraints.c
648
if (!x509_constraints_sandns(d, dl, c, cl)) {
regress/lib/libcrypto/x509/constraints.c
650
c, d);
regress/lib/libcrypto/x509/verify.c
264
int c;
regress/lib/libcrypto/x509/verify.c
266
for (c = 0; verbose && c < *chains; c++) {
regress/lib/libcrypto/x509/verify.c
270
fprintf(stderr, "Chain %d\n--------\n", c);
regress/lib/libcrypto/x509/verify.c
271
chain = x509_verify_ctx_chain(ctx, c);
regress/lib/libedit/chared/test_gets.c
43
ed_end_of_file(EditLine *el, wint_t c UU) {
regress/lib/libedit/keymacro/test_get.c
32
ssize_t ct_encode_char(char *dst UU, size_t len UU, wchar_t c UU) { return -1; }
regress/lib/libedit/keymacro/test_get.c
40
ct_visual_char(wchar_t *dst, size_t len UU, wchar_t c)
regress/lib/libedit/keymacro/test_get.c
42
*dst = c;
regress/lib/libm/cephes/testvect.c
418
char c[8];
regress/lib/libm/cephes/testvect.c
456
if (memcmp(u.c, v.c, 8) != 0)
regress/lib/libm/cephes/testvect.c
499
if (memcmp(u.c, v.c, 8) != 0)
regress/lib/libm/cephes/testvectl.c
393
char c[12];
regress/lib/libm/cephes/testvectl.c
417
if (memcmp(u.c, v.c, 10) != 0)
regress/lib/libm/cephes/testvectl.c
461
if (memcmp(u.c, v.c, 10) != 0)
regress/lib/libm/cephes/testvectll.c
414
char c[16];
regress/lib/libm/cephes/testvectll.c
444
if (memcmp(u.c, v.c, 16) != 0)
regress/lib/libm/cephes/testvectll.c
488
if (memcmp(u.c, v.c, 16) != 0)
regress/lib/libm/msun/atf-c.h
33
#define atf_tc_get_config_var_as_bool_wd(a, b ,c) c
regress/lib/libm/msun/ctrig_test.c
242
long double complex z, c, s;
regress/lib/libm/msun/ctrig_test.c
267
c = INFINITY * cosl(finites[i]);
regress/lib/libm/msun/ctrig_test.c
269
testall_odd(csinh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH);
regress/lib/libm/msun/ctrig_test.c
270
testall_even(ccosh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH);
regress/lib/libm/msun/ctrig_test.c
274
testall_odd(csin, z, CMPLXL(s, c), OPT_INEXACT, 0, CS_BOTH);
regress/lib/libm/msun/ctrig_test.c
275
testall_even(ccos, z, CMPLXL(c, -s), OPT_INEXACT, 0, CS_BOTH);
regress/lib/libpthread/dlopen/dlopen.c
199
pthread_cond_t c = PTHREAD_COND_INITIALIZER;
regress/lib/libpthread/dlopen/dlopen.c
221
r = p_cond_timedwait(&c, &m, &target_time);
regress/lib/libpthread/dlopen/dlopen.c
236
if ((r = p_cond_destroy(&c)))
regress/lib/libpthread/errno/errno.c
118
pthread_cond_init(&c, NULL);
regress/lib/libpthread/errno/errno.c
30
pthread_cond_t c;
regress/lib/libpthread/errno/errno.c
39
CHECKe(pthread_cond_signal(&c));
regress/lib/libpthread/errno/errno.c
48
CHECKe(pthread_cond_wait(&c, &m));
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
105
pthread_cond_broadcast(&c);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
108
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
113
pthread_cond_broadcast(&c);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
129
pthread_cond_init(&c, NULL);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
143
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
146
pthread_cond_broadcast(&c);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
23
pthread_cond_t c;
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
45
pthread_cond_broadcast(&c);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
50
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
66
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
73
pthread_cond_broadcast(&c);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
75
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
91
pthread_cond_wait(&c, &m);
regress/lib/libpthread/pthread_rwlock/pthread_rwlock.c
97
pthread_cond_broadcast(&c);
regress/lib/libpthread/stdarg/stdarg.c
25
int c;
regress/lib/libpthread/stdarg/stdarg.c
38
c = va_arg(ap, int);
regress/lib/libpthread/stdarg/stdarg.c
39
EQ(c, 'x');
regress/lib/libsndio/tools.c
60
#define IS_SEP(c) \
regress/lib/libsndio/tools.c
61
(((c) < 'a' || (c) > 'z') && \
regress/lib/libsndio/tools.c
62
((c) < 'A' || (c) > 'Z') && \
regress/lib/libsndio/tools.c
63
((c) < '0' || (c) > '9'))
regress/libexec/ld.so/initfirst/test2/libac/ac.C
26
AC c;
regress/misc/exceptions/threads/exceptions.cc
45
if (pthread_create(&p[i], NULL, c, NULL) != 0)
regress/sbin/ifconfig/ifaddr.c
1555
uint16_t c;
regress/sbin/ifconfig/ifaddr.c
1558
c = inlen > 0 ? letoh16(*in) : 0;
regress/sbin/ifconfig/ifaddr.c
1559
if (c == 0 || --outlen == 0) {
regress/sbin/ifconfig/ifaddr.c
1564
*out++ = isascii(c) ? (char)c : '?';
regress/sbin/ifconfig/ifaddr.c
1574
uint16_t c;
regress/sbin/ifconfig/ifaddr.c
1577
c = *in++;
regress/sbin/ifconfig/ifaddr.c
1579
if (c == '\0') {
regress/sbin/ifconfig/ifaddr.c
1590
*out++ = htole16(c);
regress/sbin/ifconfig/ifaddr.c
1666
unsigned char c;
regress/sbin/ifconfig/ifaddr.c
1681
for (; (c = *bits) > 32; bits++)
regress/sbin/ifconfig/ifaddr.c
1682
putchar(c);
regress/sbin/ifconfig/ifaddr.c
1698
unsigned char c;
regress/sbin/ifconfig/ifaddr.c
1707
for (; (c = *bits) > 32; bits++)
regress/sbin/ifconfig/ifaddr.c
1708
putchar(tolower(c));
regress/sbin/iked/parser/common.c
106
sa_state(struct iked * a, struct iked_sa *b, int c)
regress/sbin/iked/parser/common.c
87
childsa_lookup(struct iked_sa *a, uint64_t b, uint8_t c)
regress/sbin/iked/parser/common.c
93
ikev2_childsa_delete(struct iked *a, struct iked_sa *b, uint8_t c,
regress/sbin/iked/test_helper/test_helper.h
85
#define TEST_ONERROR(f, c) set_onerror_func(f, c)
regress/sbin/iked/test_helper/test_helper.h
91
#define ASSERT_MEM_FILLED_EQ(a1, c, l) \
regress/sbin/iked/test_helper/test_helper.h
92
assert_mem_filled(__FILE__, __LINE__, #a1, a1, c, l, TEST_EQ)
regress/sys/altivec_ast/vecast.c
37
#define AD(a, b, c, d) (struct double4){a, b, c, d}
regress/sys/altivec_ast/vecast.c
38
#define VF(a, b, c, d) (vector float)(a, b, c, d)
regress/sys/altivec_ast/vecast.c
39
#define VI(a, b, c, d) (vector int)(a, b, c, d)
regress/sys/altivec_ast/vecast.c
40
#define VU(a, b, c, d) (vector unsigned)(a, b, c, d)
regress/sys/arch/amd64/ddb/disasm.c
23
static struct db_disasm_context c;
regress/sys/arch/amd64/ddb/disasm.c
24
memset(&c, 0, sizeof(c));
regress/sys/arch/amd64/ddb/disasm.c
25
ctx = &c;
regress/sys/arch/amd64/ddb/stubs.c
61
db_expr_t c;
regress/sys/arch/amd64/ddb/stubs.c
66
c = ctx->raw.buf[0];
regress/sys/arch/amd64/ddb/stubs.c
69
return c;
regress/sys/arch/sparc64/emul-popc/simm/simm13.c
105
c = c_popc(SIGN_EXT13(i));
regress/sys/arch/sparc64/emul-popc/simm/simm13.c
106
if (c != a) {
regress/sys/arch/sparc64/emul-popc/simm/simm13.c
107
printf("BAD: %d: asm %d, c %d\n", i, a, c);
regress/sys/arch/sparc64/emul-popc/simm/simm13.c
96
int i, a, c;
regress/sys/crypto/aes/aestest.c
105
char c;
regress/sys/crypto/aes/aestest.c
110
while ((c = *(hex++)) != '\0') {
regress/sys/crypto/aes/aestest.c
111
if (strchr(" \t\r\n", c) != NULL)
regress/sys/crypto/aes/aestest.c
113
if (c >= '0' && c <= '9')
regress/sys/crypto/aes/aestest.c
114
v |= c - '0';
regress/sys/crypto/aes/aestest.c
115
else if (c >= 'a' && c <= 'f')
regress/sys/crypto/aes/aestest.c
116
v |= 10 + (c - 'a');
regress/sys/crypto/aes/aestest.c
117
else if (c >= 'A' && c <= 'F')
regress/sys/crypto/aes/aestest.c
118
v |= 10 + c - 'A';
regress/sys/crypto/aes/aestest.c
121
__func__, c);
regress/sys/dev/kcov/kcov.c
100
while ((c = getopt(argc, argv, "b:Em:pv")) != -1)
regress/sys/dev/kcov/kcov.c
101
switch (c) {
regress/sys/dev/kcov/kcov.c
89
int c, i;
regress/sys/dev/wscons/util.c
35
int c, fd;
regress/sys/dev/wscons/util.c
37
while ((c = getopt(argc, argv, "d:")) != -1)
regress/sys/dev/wscons/util.c
38
switch (c) {
regress/sys/kern/flock/flock.c
1895
int c, fd, i;
regress/sys/kern/flock/flock.c
1899
while ((c = getopt(argc, argv, "v")) != -1)
regress/sys/kern/flock/flock.c
1900
switch (c) {
regress/sys/kern/flock/lockf.c
114
int c, error, fd, i;
regress/sys/kern/flock/lockf.c
117
while ((c = getopt(argc, argv, "v")) != -1)
regress/sys/kern/flock/lockf.c
118
switch (c) {
regress/sys/kern/kqueue/main.c
17
int n, ret, c;
regress/sys/kern/kqueue/main.c
20
while ((c = getopt(argc, argv, "efFiIjlpPrR:stT:u")) != -1) {
regress/sys/kern/kqueue/main.c
21
switch (c) {
regress/sys/kern/pipe/test-kqueue.c
137
unsigned char c;
regress/sys/kern/pipe/test-kqueue.c
139
n = read(ctx.c_pipe[0], &c, 1);
regress/sys/kern/pipe/test-select.c
37
char c = 'c';
regress/sys/kern/pipe/test-select.c
50
n = write(pip[1], &c, sizeof(c));
regress/sys/kern/pipe/test-thundering-herd.c
115
n = write(ctx.c_pipe[1], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
117
n = read(ctx.c_pipe[0], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
124
(void)read(ctx.c_cv[0], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
175
unsigned char c = 'c';
regress/sys/kern/pipe/test-thundering-herd.c
193
(void)write(ctx->c_cv[1], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
91
unsigned char c = 'c';
regress/sys/kern/pread/pread.c
18
char c;
regress/sys/kern/pread/pread.c
31
if (read(fd, &c, 1) != 1)
regress/sys/kern/pread/pread.c
34
if (c != magic[0])
regress/sys/kern/pread/pread.c
35
errx(1, "read1 %c != %c", c, magic[0]);
regress/sys/kern/pread/pread.c
37
if (pread(fd, &c, 1, 7) != 1)
regress/sys/kern/pread/pread.c
40
if (c != magic[7])
regress/sys/kern/pread/pread.c
41
errx(1, "pread %c != %c", c, magic[7]);
regress/sys/kern/pread/pread.c
43
if (read(fd, &c, 1) != 1)
regress/sys/kern/pread/pread.c
46
if (c != magic[1])
regress/sys/kern/pread/pread.c
47
errx(1, "read2 %c != %c", c, magic[1]);
regress/sys/kern/pread/pread.c
49
if ((ret = pread(fd, &c, 1, -1)) != -1)
regress/sys/kern/pread/pread.c
55
if ((ret = pread(fd, &c, 3, LLONG_MAX)) != -1)
regress/sys/kern/pread/pread.c
61
if (read(fd, &c, 1) != 1)
regress/sys/kern/pread/pread.c
64
if (c != magic[2])
regress/sys/kern/pread/pread.c
65
errx(1, "read3 %c != %c", c, magic[2]);
regress/sys/kern/pread/pread.c
73
else if ((ret = pread(fd, &c, 1, 7)) != -1)
regress/sys/kern/preadv/preadv.c
20
char c, c1, c2;
regress/sys/kern/preadv/preadv.c
34
if (read(fd, &c, 1) != 1)
regress/sys/kern/preadv/preadv.c
37
if (c != magic[0])
regress/sys/kern/preadv/preadv.c
38
errx(1, "read1 %c != %c", c, magic[0]);
regress/sys/kern/preadv/preadv.c
54
if (read(fd, &c, 1) != 1)
regress/sys/kern/preadv/preadv.c
57
if (c != magic[1])
regress/sys/kern/preadv/preadv.c
58
errx(1, "read2 %c != %c", c, magic[1]);
regress/sys/kern/preadv/preadv.c
72
if (read(fd, &c, 1) != 1)
regress/sys/kern/preadv/preadv.c
75
if (c != magic[2])
regress/sys/kern/preadv/preadv.c
76
errx(1, "read3 %c != %c", c, magic[2]);
regress/sys/kern/ptrace/xstate/xstate.c
16
uint32_t a, b, c, d;
regress/sys/kern/ptrace/xstate/xstate.c
51
: "=a" (out->a), "=b" (out->b), "=c" (out->c), "=d" (out->d)
regress/sys/kern/ptrace/xstate/xstate.c
66
if ((leaf.c & CPUID_01_C_XSAVE_MASK) == 0) {
regress/sys/kern/ptrace2/macros.h
57
#define pollts(a, b, c, e) 0
regress/sys/kern/ptrace2/ptrace_test.c
186
char c;
regress/sys/kern/ptrace2/ptrace_test.c
195
CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0);
regress/sys/kern/ptrace2/ptrace_test.c
233
char c;
regress/sys/kern/ptrace2/ptrace_test.c
246
CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
269
CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
272
CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0);
regress/sys/kern/ptrace2/ptrace_test.c
286
ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
289
ATF_REQUIRE(write(cpipe[0], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
290
ATF_REQUIRE(read(cpipe[0], &c, sizeof(c)) == 0);
regress/sys/kern/ptrace2/ptrace_test.c
330
char c;
regress/sys/kern/ptrace2/ptrace_test.c
340
CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
373
CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
376
CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
400
ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
403
ATF_REQUIRE(write(cpipe[0], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
404
ATF_REQUIRE(read(cpipe[0], &c, sizeof(c)) == 0);
regress/sys/kern/ptrace2/ptrace_test.c
418
ATF_REQUIRE(write(dpipe[0], &c, sizeof(c)) == sizeof(c));
regress/sys/kern/ptrace2/ptrace_test.c
421
ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == 0);
regress/sys/kern/pwrite/pwrite.c
21
char c;
regress/sys/kern/pwrite/pwrite.c
37
if (read(fd, &c, 1) != 1)
regress/sys/kern/pwrite/pwrite.c
40
if (c != '2')
regress/sys/kern/pwrite/pwrite.c
41
errx(1, "read %c != %c", c, '2');
regress/sys/kern/pwrite/pwrite.c
43
c = '5';
regress/sys/kern/pwrite/pwrite.c
44
if (write(fd, &c, 1) != 1)
regress/sys/kern/pwrite/pwrite.c
47
if (write(fd, &c, 0) != 0)
regress/sys/kern/pwrite/pwrite.c
84
else if ((ret = pwrite(fd, &c, 1, 7)) != -1)
regress/sys/kern/pwritev/pwritev.c
24
char c;
regress/sys/kern/pwritev/pwritev.c
45
if (read(fd, &c, 1) != 1)
regress/sys/kern/pwritev/pwritev.c
48
if (c != '9')
regress/sys/kern/pwritev/pwritev.c
49
errx(1, "read %c != %c", c, '9');
regress/sys/kern/pwritev/pwritev.c
51
c = '5';
regress/sys/kern/pwritev/pwritev.c
52
if (write(fd, &c, 1) != 1)
regress/sys/kern/signal/fpsig/fpsig.c
26
double a, b, c = 0.0;
regress/sys/kern/signal/fpsig/fpsig.c
30
c += a * a + b * b;
regress/sys/kern/signal/fpsig/fpsig.c
33
g1 = c;
regress/sys/kern/signal/fpsig/fpsig.c
36
g2 = c;
regress/sys/kern/xonly/xonly.c
211
char c;
regress/sys/kern/xonly/xonly.c
218
if (write(p[1], r->addr, 1) == 1 && read(p[0], &c, 1) == 1)
regress/sys/net/pf_trans/dev-limit.c
72
int c;
regress/sys/net/pf_trans/dev-limit.c
74
while ((c = getopt(argc, argv, "t:c:s:")) != -1) {
regress/sys/net/pf_trans/dev-limit.c
75
switch (c) {
regress/sys/net/pf_trans/iocmd-limit.c
158
int c;
regress/sys/net/pf_trans/iocmd-limit.c
161
while ((c = getopt(argc, argv, "i:c:")) != -1) {
regress/sys/net/pf_trans/iocmd-limit.c
162
switch (c) {
regress/sys/net/rtable/kern_compat.h
58
#define pool_init(a, b, c, d, e, f, g) do { (a)->pr_size = (b); } while (0)
regress/sys/net/rtable/util.c
511
#define mix(a, b, c) do { \
regress/sys/net/rtable/util.c
512
a -= b; a -= c; a ^= (c >> 13); \
regress/sys/net/rtable/util.c
513
b -= c; b -= a; b ^= (a << 8); \
regress/sys/net/rtable/util.c
514
c -= a; c -= b; c ^= (b >> 13); \
regress/sys/net/rtable/util.c
515
a -= b; a -= c; a ^= (c >> 12); \
regress/sys/net/rtable/util.c
516
b -= c; b -= a; b ^= (a << 16); \
regress/sys/net/rtable/util.c
517
c -= a; c -= b; c ^= (b >> 5); \
regress/sys/net/rtable/util.c
518
a -= b; a -= c; a ^= (c >> 3); \
regress/sys/net/rtable/util.c
519
b -= c; b -= a; b ^= (a << 10); \
regress/sys/net/rtable/util.c
520
c -= a; c -= b; c ^= (b >> 15); \
regress/sys/net/rtable/util.c
526
uint32_t a, b, c;
regress/sys/net/rtable/util.c
535
c = rt_hashjitter;
regress/sys/net/rtable/util.c
545
mix(a, b, c);
regress/sys/net/rtable/util.c
556
c += (src != NULL) ? src[0] : 0;
regress/sys/net/rtable/util.c
557
mix(a, b, c);
regress/sys/net/rtable/util.c
560
c += (src != NULL) ? src[1] : 0;
regress/sys/net/rtable/util.c
561
mix(a, b, c);
regress/sys/net/rtable/util.c
564
c += (src != NULL) ? src[2] : 0;
regress/sys/net/rtable/util.c
565
mix(a, b, c);
regress/sys/net/rtable/util.c
568
c += (src != NULL) ? src[3] : 0;
regress/sys/net/rtable/util.c
569
mix(a, b, c);
regress/sys/net/rtable/util.c
575
return (c & 0xffff);
regress/sys/netinet/recvmsg/recvmsg.c
39
int c, s;
regress/sys/netinet/recvmsg/recvmsg.c
43
while ((c = getopt(argc, argv, "46dr")) != -1)
regress/sys/netinet/recvmsg/recvmsg.c
44
switch (c) {
regress/sys/uvm/minherit_zero/minherit_zero.c
32
ismemset(const void *s, int c, size_t n)
regress/sys/uvm/minherit_zero/minherit_zero.c
38
if (p[i] != c)
regress/sys/uvm/mmap_noreplace/mmap_noreplace.c
29
ismemset(void *b, int c, size_t n)
regress/sys/uvm/mmap_noreplace/mmap_noreplace.c
34
if (p[i] != c)
regress/sys/uvm/vnode/test-deadlock.c
121
char c;
regress/sys/uvm/vnode/test-deadlock.c
134
if (read(killfd, &c, 1) == 1)
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
139
pchk(name0, &p.c, "name0", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
159
return p.c;
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
163
pchk(dbm_get(*p.i++), ¯op.c, "macro", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
164
macrop.c = dump_macro(macrop, i);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
167
pchk(macro0.c, &p.c, "macro0", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
168
return macrop.c;
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
182
return p.c;
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
190
pchk(dbm_get(*p.i++), &pagep.c, "pages", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
197
pchk(val0, &p.c, "value0", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
198
pchk(page0.c, &valp, "page0", 3);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
199
return pagep.c;
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
31
const char *c;
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
77
p.c = dump_pages(p);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
78
pchk(macros.c, &p.c, "macros", 3);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
79
p.c = dump_macros(p);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
80
pchk(end.c, &p.c, "end", 0);
regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c
94
return p.c;
regress/usr.bin/ssh/unittests/crypto/tests.c
66
u_char c;
regress/usr.bin/ssh/unittests/crypto/tests.c
80
c = *sshbuf_ptr(tmp);
regress/usr.bin/ssh/unittests/crypto/tests.c
81
if (isspace(c) || c == ':' || c == ',')
regress/usr.bin/ssh/unittests/crypto/tests.c
87
ASSERT_INT_EQ(sshbuf_get_u8(tmp, &c), 0);
regress/usr.bin/ssh/unittests/crypto/tests.c
88
ASSERT_CHAR_EQ(c, '"');
regress/usr.bin/ssh/unittests/sshbuf/test_sshbuf_fixed.c
28
u_char c;
regress/usr.bin/ssh/unittests/sshbuf/test_sshbuf_fixed.c
50
ASSERT_INT_EQ(sshbuf_get_u8(p1, &c), 0);
regress/usr.bin/ssh/unittests/sshbuf/test_sshbuf_fixed.c
52
ASSERT_U8_EQ(c, 1);
regress/usr.bin/ssh/unittests/sshbuf/test_sshbuf_fixed.c
81
ASSERT_INT_EQ(sshbuf_get_u8(p2, &c), 0);
regress/usr.bin/ssh/unittests/sshbuf/test_sshbuf_fixed.c
83
ASSERT_U8_EQ(c, 1);
regress/usr.bin/ssh/unittests/sshkey/test_file.c
168
c = EC_POINT_point2bn(EC_KEY_get0_group(EVP_PKEY_get0_EC_KEY(k1->pkey)),
regress/usr.bin/ssh/unittests/sshkey/test_file.c
171
ASSERT_PTR_NE(c, NULL);
regress/usr.bin/ssh/unittests/sshkey/test_file.c
174
ASSERT_BIGNUM_EQ(b, c);
regress/usr.bin/ssh/unittests/sshkey/test_file.c
177
BN_free(c);
regress/usr.bin/ssh/unittests/sshkey/test_file.c
39
BIGNUM *a, *b, *c;
regress/usr.bin/ssh/unittests/sshkey/test_file.c
54
c = load_bignum("rsa_1.param.q");
regress/usr.bin/ssh/unittests/sshkey/test_file.c
57
ASSERT_BIGNUM_EQ(rsa_q(k1), c);
regress/usr.bin/ssh/unittests/sshkey/test_file.c
60
BN_free(c);
regress/usr.bin/ssh/unittests/sshkey/test_fuzz.c
74
u_char *sig, c[] = "some junk to be signed";
regress/usr.bin/ssh/unittests/sshkey/test_fuzz.c
85
ASSERT_INT_EQ(sshkey_sign(k, &sig, &l, c, sizeof(c),
regress/usr.bin/ssh/unittests/sshkey/test_fuzz.c
89
ASSERT_INT_EQ(sshkey_verify(k, sig, l, c, sizeof(c), NULL, 0, NULL), 0);
regress/usr.bin/ssh/unittests/sshkey/test_fuzz.c
97
c, sizeof(c), NULL, 0, NULL), 0);
regress/usr.bin/ssh/unittests/test_helper/test_helper.h
104
#define TEST_ONERROR(f, c) set_onerror_func(f, c)
regress/usr.bin/ssh/unittests/test_helper/test_helper.h
113
#define ASSERT_MEM_FILLED_EQ(a1, c, l) \
regress/usr.bin/ssh/unittests/test_helper/test_helper.h
114
assert_mem_filled(__FILE__, __LINE__, #a1, a1, c, l, TEST_EQ)
regress/usr.sbin/bgpd/unittests/rde_sets_test.c
54
struct as_set *a, *aa, *b, *c, *empty;
regress/usr.sbin/bgpd/unittests/rde_sets_test.c
63
c = build_set("c", vc, sizeof(vc) / sizeof(vc[0]), 1);
regress/usr.sbin/bgpd/unittests/rde_sets_test.c
80
if (!as_set_match(c, 42))
regress/usr.sbin/bgpd/unittests/rde_sets_test.c
82
if (as_set_match(c, 7))
regress/usr.sbin/rpki-client/test-aspa.c
41
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-aspa.c
49
while ((c = getopt(argc, argv, "v")) != -1)
regress/usr.sbin/rpki-client/test-aspa.c
50
switch (c) {
regress/usr.sbin/rpki-client/test-aspa.c
55
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-cert.c
43
int c, i, verb = 0, ta = 0;
regress/usr.sbin/rpki-client/test-cert.c
48
while ((c = getopt(argc, argv, "tv")) != -1)
regress/usr.sbin/rpki-client/test-cert.c
49
switch (c) {
regress/usr.sbin/rpki-client/test-cert.c
57
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-mft.c
43
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-mft.c
51
while (-1 != (c = getopt(argc, argv, "pv")))
regress/usr.sbin/rpki-client/test-mft.c
52
switch (c) {
regress/usr.sbin/rpki-client/test-mft.c
57
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-roa.c
40
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-roa.c
48
while ((c = getopt(argc, argv, "pv")) != -1)
regress/usr.sbin/rpki-client/test-roa.c
49
switch (c) {
regress/usr.sbin/rpki-client/test-roa.c
54
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-rrdp.c
280
int c, ret = 0;
regress/usr.sbin/rpki-client/test-rrdp.c
283
while ((c = getopt(argc, argv, "dH:N:nS:s")) != -1)
regress/usr.sbin/rpki-client/test-rrdp.c
284
switch (c) {
regress/usr.sbin/rpki-client/test-rsc.c
43
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-rsc.c
51
while (-1 != (c = getopt(argc, argv, "pv")))
regress/usr.sbin/rpki-client/test-rsc.c
52
switch (c) {
regress/usr.sbin/rpki-client/test-rsc.c
57
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-spl.c
41
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-spl.c
49
while ((c = getopt(argc, argv, "v")) != -1)
regress/usr.sbin/rpki-client/test-spl.c
50
switch (c) {
regress/usr.sbin/rpki-client/test-spl.c
55
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-tak.c
41
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-tak.c
49
while ((c = getopt(argc, argv, "v")) != -1)
regress/usr.sbin/rpki-client/test-tak.c
50
switch (c) {
regress/usr.sbin/rpki-client/test-tak.c
55
errx(1, "bad argument %c", c);
regress/usr.sbin/rpki-client/test-tal.c
40
int c, i, verb = 0;
regress/usr.sbin/rpki-client/test-tal.c
45
while ((c = getopt(argc, argv, "v")) != -1)
regress/usr.sbin/rpki-client/test-tal.c
46
switch (c) {
regress/usr.sbin/rpki-client/test-tal.c
51
errx(1, "bad argument %c", c);
regress/usr.sbin/snmpd/snmpd_regress.c
241
int c;
regress/usr.sbin/snmpd/snmpd_regress.c
243
while ((c = getopt(argc, argv, "a:h:p:v")) != -1) {
regress/usr.sbin/snmpd/snmpd_regress.c
244
switch (c) {
sbin/dhcp6leased/control.c
129
struct ctl_conn *c;
sbin/dhcp6leased/control.c
153
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
sbin/dhcp6leased/control.c
159
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
sbin/dhcp6leased/control.c
162
free(c);
sbin/dhcp6leased/control.c
165
c->iev.handler = control_dispatch_imsg;
sbin/dhcp6leased/control.c
166
c->iev.events = EV_READ;
sbin/dhcp6leased/control.c
167
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
sbin/dhcp6leased/control.c
168
c->iev.handler, &c->iev);
sbin/dhcp6leased/control.c
169
event_add(&c->iev.ev, NULL);
sbin/dhcp6leased/control.c
171
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
sbin/dhcp6leased/control.c
177
struct ctl_conn *c;
sbin/dhcp6leased/control.c
179
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/dhcp6leased/control.c
180
if (c->iev.ibuf.fd == fd)
sbin/dhcp6leased/control.c
184
return (c);
sbin/dhcp6leased/control.c
190
struct ctl_conn *c;
sbin/dhcp6leased/control.c
192
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/dhcp6leased/control.c
193
if (c->iev.ibuf.pid == pid)
sbin/dhcp6leased/control.c
197
return (c);
sbin/dhcp6leased/control.c
203
struct ctl_conn *c;
sbin/dhcp6leased/control.c
205
if ((c = control_connbyfd(fd)) == NULL) {
sbin/dhcp6leased/control.c
210
imsgbuf_clear(&c->iev.ibuf);
sbin/dhcp6leased/control.c
211
TAILQ_REMOVE(&ctl_conns, c, entry);
sbin/dhcp6leased/control.c
213
event_del(&c->iev.ev);
sbin/dhcp6leased/control.c
214
close(c->iev.ibuf.fd);
sbin/dhcp6leased/control.c
222
free(c);
sbin/dhcp6leased/control.c
228
struct ctl_conn *c;
sbin/dhcp6leased/control.c
233
if ((c = control_connbyfd(fd)) == NULL) {
sbin/dhcp6leased/control.c
239
if (imsgbuf_read(&c->iev.ibuf) != 1) {
sbin/dhcp6leased/control.c
245
if (imsgbuf_write(&c->iev.ibuf) == -1) {
sbin/dhcp6leased/control.c
252
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
sbin/dhcp6leased/control.c
266
c->iev.ibuf.pid = imsg.hdr.pid;
sbin/dhcp6leased/control.c
279
c->iev.ibuf.pid = imsg.hdr.pid;
sbin/dhcp6leased/control.c
286
c->iev.ibuf.pid = imsg.hdr.pid;
sbin/dhcp6leased/control.c
298
imsg_event_add(&c->iev);
sbin/dhcp6leased/control.c
304
struct ctl_conn *c;
sbin/dhcp6leased/control.c
306
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
sbin/dhcp6leased/control.c
309
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
sbin/dhcp6leased/parse.y
270
int c;
sbin/dhcp6leased/parse.y
274
c = file->ungetbuf[--file->ungetpos];
sbin/dhcp6leased/parse.y
276
c = getc(file->stream);
sbin/dhcp6leased/parse.y
278
if (c == START_EXPAND)
sbin/dhcp6leased/parse.y
280
else if (c == DONE_EXPAND)
sbin/dhcp6leased/parse.y
285
return (c);
sbin/dhcp6leased/parse.y
291
int c, next;
sbin/dhcp6leased/parse.y
294
if ((c = igetc()) == EOF) {
sbin/dhcp6leased/parse.y
301
return (c);
sbin/dhcp6leased/parse.y
304
while ((c = igetc()) == '\\') {
sbin/dhcp6leased/parse.y
307
c = next;
sbin/dhcp6leased/parse.y
314
if (c == EOF) {
sbin/dhcp6leased/parse.y
324
while (c == EOF) {
sbin/dhcp6leased/parse.y
327
c = igetc();
sbin/dhcp6leased/parse.y
330
return (c);
sbin/dhcp6leased/parse.y
334
lungetc(int c)
sbin/dhcp6leased/parse.y
336
if (c == EOF)
sbin/dhcp6leased/parse.y
346
file->ungetbuf[file->ungetpos++] = c;
sbin/dhcp6leased/parse.y
352
int c;
sbin/dhcp6leased/parse.y
356
c = lgetc(0);
sbin/dhcp6leased/parse.y
357
if (c == '\n') {
sbin/dhcp6leased/parse.y
361
if (c == EOF)
sbin/dhcp6leased/parse.y
372
int quotec, next, c;
sbin/dhcp6leased/parse.y
377
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/dhcp6leased/parse.y
381
if (c == '#')
sbin/dhcp6leased/parse.y
382
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/dhcp6leased/parse.y
384
if (c == '$' && !expanding) {
sbin/dhcp6leased/parse.y
386
if ((c = lgetc(0)) == EOF)
sbin/dhcp6leased/parse.y
393
if (isalnum(c) || c == '_') {
sbin/dhcp6leased/parse.y
394
*p++ = c;
sbin/dhcp6leased/parse.y
398
lungetc(c);
sbin/dhcp6leased/parse.y
416
switch (c) {
sbin/dhcp6leased/parse.y
419
quotec = c;
sbin/dhcp6leased/parse.y
421
if ((c = lgetc(quotec)) == EOF)
sbin/dhcp6leased/parse.y
423
if (c == '\n') {
sbin/dhcp6leased/parse.y
426
} else if (c == '\\') {
sbin/dhcp6leased/parse.y
431
c = next;
sbin/dhcp6leased/parse.y
437
} else if (c == quotec) {
sbin/dhcp6leased/parse.y
440
} else if (c == '\0') {
sbin/dhcp6leased/parse.y
448
*p++ = c;
sbin/dhcp6leased/parse.y
459
if (c == '-' || isdigit(c)) {
sbin/dhcp6leased/parse.y
461
*p++ = c;
sbin/dhcp6leased/parse.y
466
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/dhcp6leased/parse.y
467
lungetc(c);
sbin/dhcp6leased/parse.y
470
if (c == EOF || allowed_to_end_number(c)) {
sbin/dhcp6leased/parse.y
486
c = (unsigned char)*--p;
sbin/dhcp6leased/parse.y
487
if (c == '-')
sbin/dhcp6leased/parse.y
488
return (c);
sbin/dhcp6leased/parse.y
498
if (isalnum(c) || c == ':' || c == '_') {
sbin/dhcp6leased/parse.y
500
*p++ = c;
sbin/dhcp6leased/parse.y
505
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/dhcp6leased/parse.y
506
lungetc(c);
sbin/dhcp6leased/parse.y
513
if (c == '\n') {
sbin/dhcp6leased/parse.y
517
if (c == EOF)
sbin/dhcp6leased/parse.y
519
return (c);
sbin/dhcp6leased/parse_lease.y
159
int quotec, next, c;
sbin/dhcp6leased/parse_lease.y
163
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/dhcp6leased/parse_lease.y
167
if (c == '#')
sbin/dhcp6leased/parse_lease.y
168
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/dhcp6leased/parse_lease.y
170
switch (c) {
sbin/dhcp6leased/parse_lease.y
173
quotec = c;
sbin/dhcp6leased/parse_lease.y
175
if ((c = lgetc(quotec)) == EOF)
sbin/dhcp6leased/parse_lease.y
177
if (c == '\n') {
sbin/dhcp6leased/parse_lease.y
180
} else if (c == '\\') {
sbin/dhcp6leased/parse_lease.y
185
c = next;
sbin/dhcp6leased/parse_lease.y
191
} else if (c == quotec) {
sbin/dhcp6leased/parse_lease.y
194
} else if (c == '\0') {
sbin/dhcp6leased/parse_lease.y
202
*p++ = c;
sbin/dhcp6leased/parse_lease.y
213
if (c == '-' || isdigit(c)) {
sbin/dhcp6leased/parse_lease.y
215
*p++ = c;
sbin/dhcp6leased/parse_lease.y
220
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/dhcp6leased/parse_lease.y
221
lungetc(c);
sbin/dhcp6leased/parse_lease.y
224
if (c == EOF || allowed_to_end_number(c)) {
sbin/dhcp6leased/parse_lease.y
240
c = (unsigned char)*--p;
sbin/dhcp6leased/parse_lease.y
241
if (c == '-')
sbin/dhcp6leased/parse_lease.y
242
return (c);
sbin/dhcp6leased/parse_lease.y
252
if (isalnum(c) || c == ':' || c == '_') {
sbin/dhcp6leased/parse_lease.y
254
*p++ = c;
sbin/dhcp6leased/parse_lease.y
259
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/dhcp6leased/parse_lease.y
260
lungetc(c);
sbin/dhcp6leased/parse_lease.y
267
if (c == '\n') {
sbin/dhcp6leased/parse_lease.y
271
if (c == EOF)
sbin/dhcp6leased/parse_lease.y
273
return (c);
sbin/dhcpleased/control.c
129
struct ctl_conn *c;
sbin/dhcpleased/control.c
153
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
sbin/dhcpleased/control.c
159
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
sbin/dhcpleased/control.c
162
free(c);
sbin/dhcpleased/control.c
165
c->iev.handler = control_dispatch_imsg;
sbin/dhcpleased/control.c
166
c->iev.events = EV_READ;
sbin/dhcpleased/control.c
167
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
sbin/dhcpleased/control.c
168
c->iev.handler, &c->iev);
sbin/dhcpleased/control.c
169
event_add(&c->iev.ev, NULL);
sbin/dhcpleased/control.c
171
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
sbin/dhcpleased/control.c
177
struct ctl_conn *c;
sbin/dhcpleased/control.c
179
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/dhcpleased/control.c
180
if (c->iev.ibuf.fd == fd)
sbin/dhcpleased/control.c
184
return (c);
sbin/dhcpleased/control.c
190
struct ctl_conn *c;
sbin/dhcpleased/control.c
192
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/dhcpleased/control.c
193
if (c->iev.ibuf.pid == pid)
sbin/dhcpleased/control.c
197
return (c);
sbin/dhcpleased/control.c
203
struct ctl_conn *c;
sbin/dhcpleased/control.c
205
if ((c = control_connbyfd(fd)) == NULL) {
sbin/dhcpleased/control.c
210
imsgbuf_clear(&c->iev.ibuf);
sbin/dhcpleased/control.c
211
TAILQ_REMOVE(&ctl_conns, c, entry);
sbin/dhcpleased/control.c
213
event_del(&c->iev.ev);
sbin/dhcpleased/control.c
214
close(c->iev.ibuf.fd);
sbin/dhcpleased/control.c
222
free(c);
sbin/dhcpleased/control.c
228
struct ctl_conn *c;
sbin/dhcpleased/control.c
235
if ((c = control_connbyfd(fd)) == NULL) {
sbin/dhcpleased/control.c
241
if (imsgbuf_read(&c->iev.ibuf) != 1) {
sbin/dhcpleased/control.c
247
if (imsgbuf_write(&c->iev.ibuf) == -1) {
sbin/dhcpleased/control.c
254
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
sbin/dhcpleased/control.c
273
c->iev.ibuf.pid = pid;
sbin/dhcpleased/control.c
287
c->iev.ibuf.pid = pid;
sbin/dhcpleased/control.c
296
c->iev.ibuf.pid = pid;
sbin/dhcpleased/control.c
307
imsg_event_add(&c->iev);
sbin/dhcpleased/control.c
313
struct ctl_conn *c;
sbin/dhcpleased/control.c
315
if ((c = control_connbypid(imsg_get_pid(imsg))) == NULL)
sbin/dhcpleased/control.c
318
return (imsg_forward_event(&c->iev, imsg));
sbin/dhcpleased/frontend.c
954
char *c;
sbin/dhcpleased/frontend.c
993
if ((c = strchr(dhcp_hostname + 2, '.')) != NULL)
sbin/dhcpleased/frontend.c
994
*c = '\0';
sbin/dhcpleased/parse.y
398
int c;
sbin/dhcpleased/parse.y
402
c = file->ungetbuf[--file->ungetpos];
sbin/dhcpleased/parse.y
404
c = getc(file->stream);
sbin/dhcpleased/parse.y
406
if (c == START_EXPAND)
sbin/dhcpleased/parse.y
408
else if (c == DONE_EXPAND)
sbin/dhcpleased/parse.y
413
return (c);
sbin/dhcpleased/parse.y
419
int c, next;
sbin/dhcpleased/parse.y
422
if ((c = igetc()) == EOF) {
sbin/dhcpleased/parse.y
429
return (c);
sbin/dhcpleased/parse.y
432
while ((c = igetc()) == '\\') {
sbin/dhcpleased/parse.y
435
c = next;
sbin/dhcpleased/parse.y
442
if (c == EOF) {
sbin/dhcpleased/parse.y
452
while (c == EOF) {
sbin/dhcpleased/parse.y
455
c = igetc();
sbin/dhcpleased/parse.y
458
return (c);
sbin/dhcpleased/parse.y
462
lungetc(int c)
sbin/dhcpleased/parse.y
464
if (c == EOF)
sbin/dhcpleased/parse.y
474
file->ungetbuf[file->ungetpos++] = c;
sbin/dhcpleased/parse.y
480
int c;
sbin/dhcpleased/parse.y
484
c = lgetc(0);
sbin/dhcpleased/parse.y
485
if (c == '\n') {
sbin/dhcpleased/parse.y
489
if (c == EOF)
sbin/dhcpleased/parse.y
500
int quotec, next, c;
sbin/dhcpleased/parse.y
505
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/dhcpleased/parse.y
509
if (c == '#')
sbin/dhcpleased/parse.y
510
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/dhcpleased/parse.y
512
if (c == '$' && !expanding) {
sbin/dhcpleased/parse.y
514
if ((c = lgetc(0)) == EOF)
sbin/dhcpleased/parse.y
521
if (isalnum(c) || c == '_') {
sbin/dhcpleased/parse.y
522
*p++ = c;
sbin/dhcpleased/parse.y
526
lungetc(c);
sbin/dhcpleased/parse.y
544
switch (c) {
sbin/dhcpleased/parse.y
547
quotec = c;
sbin/dhcpleased/parse.y
549
if ((c = lgetc(quotec)) == EOF)
sbin/dhcpleased/parse.y
551
if (c == '\n') {
sbin/dhcpleased/parse.y
554
} else if (c == '\\') {
sbin/dhcpleased/parse.y
559
c = next;
sbin/dhcpleased/parse.y
565
} else if (c == quotec) {
sbin/dhcpleased/parse.y
568
} else if (c == '\0') {
sbin/dhcpleased/parse.y
576
*p++ = c;
sbin/dhcpleased/parse.y
587
if (c == '-' || isdigit(c)) {
sbin/dhcpleased/parse.y
589
*p++ = c;
sbin/dhcpleased/parse.y
594
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/dhcpleased/parse.y
595
lungetc(c);
sbin/dhcpleased/parse.y
598
if (c == EOF || allowed_to_end_number(c)) {
sbin/dhcpleased/parse.y
614
c = (unsigned char)*--p;
sbin/dhcpleased/parse.y
615
if (c == '-')
sbin/dhcpleased/parse.y
616
return (c);
sbin/dhcpleased/parse.y
626
if (isalnum(c) || c == ':' || c == '_') {
sbin/dhcpleased/parse.y
628
*p++ = c;
sbin/dhcpleased/parse.y
633
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/dhcpleased/parse.y
634
lungetc(c);
sbin/dhcpleased/parse.y
641
if (c == '\n') {
sbin/dhcpleased/parse.y
645
if (c == EOF)
sbin/dhcpleased/parse.y
647
return (c);
sbin/disklabel/disklabel.c
424
char c = DL_PARTNUM2NAME(i);
sbin/disklabel/disklabel.c
427
(void)fprintf(f, "p%c#%llu:", c, DL_GETPSIZE(pp));
sbin/disklabel/disklabel.c
428
(void)fprintf(f, "o%c#%llu:", c, DL_GETPOFFSET(pp));
sbin/disklabel/disklabel.c
431
(void)fprintf(f, "t%c=%s:", c,
sbin/disklabel/disklabel.c
435
c, pp->p_fstype);
sbin/disklabel/disklabel.c
443
(void)fprintf(f, "b%c#%u:", c,
sbin/disklabel/disklabel.c
445
(void)fprintf(f, "f%c#%u:", c,
sbin/disklabel/disklabel.c
753
char *p, c;
sbin/disklabel/disklabel.c
758
c = *p;
sbin/disklabel/disklabel.c
761
*p = c;
sbin/disklabel/disklabel.c
769
char c;
sbin/disklabel/disklabel.c
777
c = s[i];
sbin/disklabel/disklabel.c
778
if (c >= '0' && c <= '9')
sbin/disklabel/disklabel.c
779
c -= '0';
sbin/disklabel/disklabel.c
780
else if (c >= 'a' && c <= 'f')
sbin/disklabel/disklabel.c
781
c -= ('a' - 10);
sbin/disklabel/disklabel.c
782
else if (c >= 'A' && c <= 'F')
sbin/disklabel/disklabel.c
783
c -= ('A' - 10);
sbin/disklabel/disklabel.c
787
duid[i / 2] |= c & 0xf;
sbin/dump/dumprmt.c
164
unsigned char c;
sbin/dump/dumprmt.c
167
c = *cp;
sbin/dump/dumprmt.c
168
if (!isascii(c) || !(isalnum(c) || c == '_' || c == '-')) {
sbin/dump/dumprmt.c
288
char c;
sbin/dump/dumprmt.c
290
if (read(rmtape, &c, 1) != 1)
sbin/dump/dumprmt.c
292
return (c);
sbin/dumpfs/dumpfs.c
334
dumpcg(const char *name, int fd, u_int c)
sbin/dumpfs/dumpfs.c
341
printf("\ncg %u:\n", c);
sbin/dumpfs/dumpfs.c
342
cur = (off_t)fsbtodb(&afs, cgtod(&afs, c)) * DEV_BSIZE;
sbin/fsck_ext2fs/inode.c
288
int c, overh;
sbin/fsck_ext2fs/inode.c
292
c = dtog(&sblock, blk);
sbin/fsck_ext2fs/inode.c
293
overh = cgoverhead(c);
sbin/fsck_ext2fs/inode.c
294
if (blk < sblock.e2fs.e2fs_bpg * c + overh +
sbin/fsck_ext2fs/inode.c
296
if ((blk + cnt) > sblock.e2fs.e2fs_bpg * c + overh +
sbin/fsck_ext2fs/inode.c
300
blk, sblock.e2fs.e2fs_bpg * c + overh +
sbin/fsck_ext2fs/inode.c
303
blk + cnt, sblock.e2fs.e2fs_bpg * c +
sbin/fsck_ext2fs/inode.c
309
if ((blk + cnt) > sblock.e2fs.e2fs_bpg * (c + 1) + overh +
sbin/fsck_ext2fs/inode.c
313
blk, sblock.e2fs.e2fs_bpg * c + overh +
sbin/fsck_ext2fs/inode.c
316
blk+cnt, sblock.e2fs.e2fs_bpg * (c + 1) +
sbin/fsck_ext2fs/pass1.c
109
for (c = 0; c < sblock.e2fs_ncg; c++) {
sbin/fsck_ext2fs/pass1.c
59
int c, i;
sbin/fsck_ext2fs/pass1.c
66
for (c = 0; c < sblock.e2fs_ncg; c++) {
sbin/fsck_ext2fs/pass1.c
67
dbase = c * sblock.e2fs.e2fs_bpg +
sbin/fsck_ext2fs/pass1.c
70
if (letoh32(sblock.e2fs_gd[c].ext2bgd_i_tables) >= dbase) {
sbin/fsck_ext2fs/pass1.c
73
letoh32(sblock.e2fs_gd[c].ext2bgd_i_tables)
sbin/fsck_ext2fs/pass1.c
77
if (letoh32(sblock.e2fs_gd[c].ext2bgd_b_bitmap) >= dbase)
sbin/fsck_ext2fs/pass1.c
78
setbmap(letoh32(sblock.e2fs_gd[c].ext2bgd_b_bitmap));
sbin/fsck_ext2fs/pass1.c
80
if (letoh32(sblock.e2fs_gd[c].ext2bgd_i_bitmap) >= dbase)
sbin/fsck_ext2fs/pass1.c
81
setbmap(letoh32(sblock.e2fs_gd[c].ext2bgd_i_bitmap));
sbin/fsck_ext2fs/pass1.c
86
cg_has_sb(c)) {
sbin/fsck_ext2fs/pass1.c
94
if (c == 0) {
sbin/fsck_ext2fs/pass1b.c
48
int c, i;
sbin/fsck_ext2fs/pass1b.c
58
for (c = 0; c < sblock.e2fs_ncg; c++) {
sbin/fsck_ext2fs/pass5.c
104
j = fs->e2fs.e2fs_ipg * c + 1;
sbin/fsck_ext2fs/pass5.c
143
dbase = c * sblock.e2fs.e2fs_bpg +
sbin/fsck_ext2fs/pass5.c
145
dmax = (c+1) * sblock.e2fs.e2fs_bpg +
sbin/fsck_ext2fs/pass5.c
163
if (debug && (letoh16(fs->e2fs_gd[c].ext2bgd_nbfree) != nbfree ||
sbin/fsck_ext2fs/pass5.c
164
letoh16(fs->e2fs_gd[c].ext2bgd_nifree) != nifree ||
sbin/fsck_ext2fs/pass5.c
165
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs) != ndirs)) {
sbin/fsck_ext2fs/pass5.c
167
"should be %d, %d, %d\n", c,
sbin/fsck_ext2fs/pass5.c
168
letoh16(fs->e2fs_gd[c].ext2bgd_nbfree),
sbin/fsck_ext2fs/pass5.c
169
letoh16(fs->e2fs_gd[c].ext2bgd_nifree),
sbin/fsck_ext2fs/pass5.c
170
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs),
sbin/fsck_ext2fs/pass5.c
176
"SUMMARY INFORMATIONS WRONG FOR CG #%d", c);
sbin/fsck_ext2fs/pass5.c
177
if ((letoh16(fs->e2fs_gd[c].ext2bgd_nbfree) != nbfree ||
sbin/fsck_ext2fs/pass5.c
178
letoh16(fs->e2fs_gd[c].ext2bgd_nifree) != nifree ||
sbin/fsck_ext2fs/pass5.c
179
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs) != ndirs) &&
sbin/fsck_ext2fs/pass5.c
181
fs->e2fs_gd[c].ext2bgd_nbfree = htole16(nbfree);
sbin/fsck_ext2fs/pass5.c
182
fs->e2fs_gd[c].ext2bgd_nifree = htole16(nifree);
sbin/fsck_ext2fs/pass5.c
183
fs->e2fs_gd[c].ext2bgd_ndirs = htole16(ndirs);
sbin/fsck_ext2fs/pass5.c
195
"BLK(S) MISSING IN BIT MAPS #%d", c);
sbin/fsck_ext2fs/pass5.c
208
"INODE(S) MISSING IN BIT MAPS #%d", c);
sbin/fsck_ext2fs/pass5.c
53
int c;
sbin/fsck_ext2fs/pass5.c
74
for (c = 0; c < fs->e2fs_ncg; c++) {
sbin/fsck_ext2fs/pass5.c
84
blk_bitmap = getdatablk(letoh32(fs->e2fs_gd[c].ext2bgd_b_bitmap),
sbin/fsck_ext2fs/pass5.c
87
getblk(blk_bitmap, letoh32(fs->e2fs_gd[c].ext2bgd_b_bitmap),
sbin/fsck_ext2fs/pass5.c
91
ino_bitmap = getdatablk(letoh32(fs->e2fs_gd[c].ext2bgd_i_bitmap),
sbin/fsck_ext2fs/pass5.c
94
getblk(ino_bitmap, letoh32(fs->e2fs_gd[c].ext2bgd_i_bitmap),
sbin/fsck_ext2fs/setup.c
514
cgoverhead(int c)
sbin/fsck_ext2fs/setup.c
522
if (cg_has_sb(c) == 0)
sbin/fsck_ext2fs/utilities.c
103
while (c != '\n' && getc(stdin) != '\n')
sbin/fsck_ext2fs/utilities.c
106
} while (c != 'y' && c != 'Y' && c != 'n' && c != 'N');
sbin/fsck_ext2fs/utilities.c
108
if (c == 'y' || c == 'Y')
sbin/fsck_ext2fs/utilities.c
81
int c;
sbin/fsck_ext2fs/utilities.c
98
c = getc(stdin);
sbin/fsck_ext2fs/utilities.c
99
if (c == 'F') {
sbin/fsck_ffs/inode.c
237
int c;
sbin/fsck_ffs/inode.c
250
c = dtog(&sblock, blk);
sbin/fsck_ffs/inode.c
251
if (blk < cgdmin(&sblock, c)) {
sbin/fsck_ffs/inode.c
252
if ((blk + cnt) > cgsblock(&sblock, c)) {
sbin/fsck_ffs/inode.c
256
(long long)cgdmin(&sblock, c));
sbin/fsck_ffs/inode.c
259
(long long)cgsblock(&sblock, c));
sbin/fsck_ffs/inode.c
264
if ((blk + cnt) > cgbase(&sblock, c+1)) {
sbin/fsck_ffs/inode.c
268
(long long)cgdmin(&sblock, c));
sbin/fsck_ffs/pass1.c
100
for (c = 0; c < sblock.fs_ncg; c++) {
sbin/fsck_ffs/pass1.c
101
inumber = c * sblock.fs_ipg;
sbin/fsck_ffs/pass1.c
103
cgbp = cglookup(c);
sbin/fsck_ffs/pass1.c
115
inostathead[c].il_numalloced = inosused;
sbin/fsck_ffs/pass1.c
117
inostathead[c].il_stat = 0;
sbin/fsck_ffs/pass1.c
124
inostathead[c].il_stat = info;
sbin/fsck_ffs/pass1.c
145
if (lastino < (c * sblock.fs_ipg))
sbin/fsck_ffs/pass1.c
148
ninosused = lastino - (c * sblock.fs_ipg);
sbin/fsck_ffs/pass1.c
149
inostathead[c].il_numalloced = ninosused;
sbin/fsck_ffs/pass1.c
151
free(inostathead[c].il_stat);
sbin/fsck_ffs/pass1.c
152
inostathead[c].il_stat = 0;
sbin/fsck_ffs/pass1.c
168
inostathead[c].il_stat = ninfo;
sbin/fsck_ffs/pass1.c
71
u_int c;
sbin/fsck_ffs/pass1.c
78
for (c = 0; c < sblock.fs_ncg; c++) {
sbin/fsck_ffs/pass1.c
79
cgd = cgdmin(&sblock, c);
sbin/fsck_ffs/pass1.c
80
if (c == 0)
sbin/fsck_ffs/pass1.c
81
i = cgbase(&sblock, c);
sbin/fsck_ffs/pass1.c
83
i = cgsblock(&sblock, c);
sbin/fsck_ffs/pass1b.c
58
u_int c, i;
sbin/fsck_ffs/pass1b.c
69
for (c = 0; c < sblock.fs_ncg; c++) {
sbin/fsck_ffs/pass4.c
63
u_int c;
sbin/fsck_ffs/pass4.c
69
for (c = 0; c < sblock.fs_ncg; c++) {
sbin/fsck_ffs/pass4.c
70
inumber = c * sblock.fs_ipg;
sbin/fsck_ffs/pass4.c
71
for (i = 0; i < inostathead[c].il_numalloced; i++, inumber++) {
sbin/fsck_ffs/pass5.c
181
for (c = 0; c < fs->fs_ncg; c++) {
sbin/fsck_ffs/pass5.c
182
info_cg = c;
sbin/fsck_ffs/pass5.c
183
cgbp = cglookup(c);
sbin/fsck_ffs/pass5.c
186
pfatal("CG %u: BAD MAGIC NUMBER\n", c);
sbin/fsck_ffs/pass5.c
187
dbase = cgbase(fs, c);
sbin/fsck_ffs/pass5.c
193
newcg->cg_cgx = c;
sbin/fsck_ffs/pass5.c
194
if (c == fs->fs_ncg - 1)
sbin/fsck_ffs/pass5.c
235
j = fs->fs_ipg * c;
sbin/fsck_ffs/pass5.c
236
for (i = 0; i < inostathead[c].il_numalloced; j++, i++) {
sbin/fsck_ffs/pass5.c
261
if (c == 0)
sbin/fsck_ffs/pass5.c
320
cs = &fs->fs_cs(fs, c);
sbin/fsck_ffs/pass5.c
65
u_int c;
sbin/fsck_ffs/utilities.c
100
c = getc(stdin);
sbin/fsck_ffs/utilities.c
101
if (c == 'F') {
sbin/fsck_ffs/utilities.c
105
while (c != '\n' && getc(stdin) != '\n') {
sbin/fsck_ffs/utilities.c
111
} while (c != 'y' && c != 'Y' && c != 'n' && c != 'N');
sbin/fsck_ffs/utilities.c
113
if (c == 'y' || c == 'Y')
sbin/fsck_ffs/utilities.c
81
int persevere, c;
sbin/fsck_msdos/main.c
104
int c;
sbin/fsck_msdos/main.c
124
c = getchar();
sbin/fsck_msdos/main.c
125
if (c == 'F') {
sbin/fsck_msdos/main.c
129
while (c != '\n' && getchar() != '\n')
sbin/fsck_msdos/main.c
132
} while (c != 'y' && c != 'Y' && c != 'n' && c != 'N');
sbin/fsck_msdos/main.c
133
return (c == 'y' || c == 'Y');
sbin/ifconfig/ifconfig.c
5706
int t, c;
sbin/ifconfig/ifconfig.c
5711
c = strtonum(count, 2, 600, &errmsg);
sbin/ifconfig/ifconfig.c
5717
ikar.ikar_cnt = c;
sbin/ifconfig/ifconfig.c
6282
umb_printclasses(char *tag, int c)
sbin/ifconfig/ifconfig.c
6290
if (umb_dataclass[i].val & c) {
sbin/ifconfig/ifconfig.c
6303
int c = 0, v;
sbin/ifconfig/ifconfig.c
6311
c |= v;
sbin/ifconfig/ifconfig.c
6315
return c;
sbin/ifconfig/ifconfig.c
6423
uint16_t c;
sbin/ifconfig/ifconfig.c
6426
c = inlen > 0 ? letoh16(*in) : 0;
sbin/ifconfig/ifconfig.c
6427
if (c == 0 || --outlen == 0) {
sbin/ifconfig/ifconfig.c
6432
*out++ = isascii(c) ? (char)c : '?';
sbin/ifconfig/ifconfig.c
6442
uint16_t c;
sbin/ifconfig/ifconfig.c
6445
c = *in++;
sbin/ifconfig/ifconfig.c
6447
if (c == '\0') {
sbin/ifconfig/ifconfig.c
6458
*out++ = htole16(c);
sbin/ifconfig/ifconfig.c
6536
unsigned char c;
sbin/ifconfig/ifconfig.c
6551
for (; (c = *bits) > 32; bits++)
sbin/ifconfig/ifconfig.c
6552
putchar(c);
sbin/ifconfig/ifconfig.c
6568
unsigned char c;
sbin/ifconfig/ifconfig.c
6577
for (; (c = *bits) > 32; bits++)
sbin/ifconfig/ifconfig.c
6578
putchar(tolower(c));
sbin/iked/config.c
779
size_t iovcnt, j, c = 0;
sbin/iked/config.c
792
iov[c].iov_base = pol;
sbin/iked/config.c
793
iov[c++].iov_len = sizeof(*pol);
sbin/iked/config.c
796
iov[c].iov_base = prop;
sbin/iked/config.c
797
iov[c++].iov_len = sizeof(*prop);
sbin/iked/config.c
802
iov[c].iov_base = xform;
sbin/iked/config.c
803
iov[c++].iov_len = sizeof(*xform);
sbin/iked/control.c
163
struct ctl_conn *c;
sbin/iked/control.c
188
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
sbin/iked/control.c
194
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
sbin/iked/control.c
197
free(c);
sbin/iked/control.c
200
c->iev.handler = control_dispatch_imsg;
sbin/iked/control.c
201
c->iev.events = EV_READ;
sbin/iked/control.c
202
c->iev.data = cs;
sbin/iked/control.c
203
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
sbin/iked/control.c
204
c->iev.handler, c->iev.data);
sbin/iked/control.c
205
event_add(&c->iev.ev, NULL);
sbin/iked/control.c
208
c->peerid = ctl_peerid++;
sbin/iked/control.c
210
if (c->peerid == other->peerid)
sbin/iked/control.c
211
c->peerid = ctl_peerid++;
sbin/iked/control.c
213
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
sbin/iked/control.c
219
struct ctl_conn *c;
sbin/iked/control.c
221
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/iked/control.c
222
if (c->iev.ibuf.fd == fd)
sbin/iked/control.c
226
return (c);
sbin/iked/control.c
232
struct ctl_conn *c;
sbin/iked/control.c
234
if ((c = control_connbyfd(fd)) == NULL) {
sbin/iked/control.c
239
imsgbuf_clear(&c->iev.ibuf);
sbin/iked/control.c
240
TAILQ_REMOVE(&ctl_conns, c, entry);
sbin/iked/control.c
242
event_del(&c->iev.ev);
sbin/iked/control.c
243
close(c->iev.ibuf.fd);
sbin/iked/control.c
251
free(c);
sbin/iked/control.c
259
struct ctl_conn *c;
sbin/iked/control.c
263
if ((c = control_connbyfd(fd)) == NULL) {
sbin/iked/control.c
269
if (imsgbuf_read(&c->iev.ibuf) != 1) {
sbin/iked/control.c
275
if (imsgbuf_write(&c->iev.ibuf) == -1) {
sbin/iked/control.c
282
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
sbin/iked/control.c
293
imsg.hdr.peerid = c->peerid;
sbin/iked/control.c
297
if (c->flags & CTL_CONN_NOTIFY) {
sbin/iked/control.c
301
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
sbin/iked/control.c
305
c->flags |= CTL_CONN_NOTIFY;
sbin/iked/control.c
341
imsg_event_add(&c->iev);
sbin/iked/control.c
347
struct ctl_conn *c;
sbin/iked/control.c
349
TAILQ_FOREACH(c, &ctl_conns, entry)
sbin/iked/control.c
350
if (c->flags & CTL_CONN_NOTIFY)
sbin/iked/control.c
351
imsg_compose_event(&c->iev, imsg->hdr.type,
sbin/iked/control.c
359
struct ctl_conn *c;
sbin/iked/control.c
361
TAILQ_FOREACH(c, &ctl_conns, entry)
sbin/iked/control.c
362
if (c->peerid == imsg->hdr.peerid)
sbin/iked/control.c
363
imsg_compose_event(&c->iev, imsg->hdr.type,
sbin/iked/dh.c
76
const unsigned char c[CURVE25519_SIZE])
sbin/iked/iked.c
72
int c;
sbin/iked/iked.c
88
while ((c = getopt(argc, argv, "6D:df:I:nP:p:Ss:TtvV")) != -1) {
sbin/iked/iked.c
89
switch (c) {
sbin/iked/iked.h
591
#define ikestat_add(env, c, n) do { env->sc_stats.c += (n); } while(0)
sbin/iked/iked.h
592
#define ikestat_inc(env, c) ikestat_add(env, c, 1)
sbin/iked/iked.h
593
#define ikestat_dec(env, c) ikestat_add(env, c, -1)
sbin/iked/parse.y
1514
int c;
sbin/iked/parse.y
1516
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/iked/parse.y
1518
if (c == '\n')
sbin/iked/parse.y
1519
lungetc(c);
sbin/iked/parse.y
1669
int c;
sbin/iked/parse.y
1673
c = file->ungetbuf[--file->ungetpos];
sbin/iked/parse.y
1675
c = getc(file->stream);
sbin/iked/parse.y
1677
if (c == START_EXPAND)
sbin/iked/parse.y
1679
else if (c == DONE_EXPAND)
sbin/iked/parse.y
1684
return (c);
sbin/iked/parse.y
1690
int c, next;
sbin/iked/parse.y
1693
if ((c = igetc()) == EOF) {
sbin/iked/parse.y
1700
return (c);
sbin/iked/parse.y
1703
while ((c = igetc()) == '\\') {
sbin/iked/parse.y
1706
c = next;
sbin/iked/parse.y
1713
while (c == EOF) {
sbin/iked/parse.y
1723
while (c == EOF) {
sbin/iked/parse.y
1726
c = igetc();
sbin/iked/parse.y
1729
return (c);
sbin/iked/parse.y
1733
lungetc(int c)
sbin/iked/parse.y
1735
if (c == EOF)
sbin/iked/parse.y
1745
file->ungetbuf[file->ungetpos++] = c;
sbin/iked/parse.y
1751
int c;
sbin/iked/parse.y
1755
c = lgetc(0);
sbin/iked/parse.y
1756
if (c == '\n') {
sbin/iked/parse.y
1760
if (c == EOF)
sbin/iked/parse.y
1771
int quotec, next, c;
sbin/iked/parse.y
1776
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/iked/parse.y
1780
if (c == '#')
sbin/iked/parse.y
1781
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/iked/parse.y
1783
if (c == '$' && !expanding) {
sbin/iked/parse.y
1785
if ((c = lgetc(0)) == EOF)
sbin/iked/parse.y
1792
if (isalnum(c) || c == '_') {
sbin/iked/parse.y
1793
*p++ = c;
sbin/iked/parse.y
1797
lungetc(c);
sbin/iked/parse.y
1815
switch (c) {
sbin/iked/parse.y
1818
quotec = c;
sbin/iked/parse.y
1820
if ((c = lgetc(quotec)) == EOF)
sbin/iked/parse.y
1822
if (c == '\n') {
sbin/iked/parse.y
1825
} else if (c == '\\') {
sbin/iked/parse.y
1830
c = next;
sbin/iked/parse.y
1836
} else if (c == quotec) {
sbin/iked/parse.y
1839
} else if (c == '\0') {
sbin/iked/parse.y
1847
*p++ = c;
sbin/iked/parse.y
1858
if (c == '-' || isdigit(c)) {
sbin/iked/parse.y
1860
*p++ = c;
sbin/iked/parse.y
1865
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/iked/parse.y
1866
lungetc(c);
sbin/iked/parse.y
1869
if (c == EOF || allowed_to_end_number(c)) {
sbin/iked/parse.y
1885
c = (unsigned char)*--p;
sbin/iked/parse.y
1886
if (c == '-')
sbin/iked/parse.y
1887
return (c);
sbin/iked/parse.y
1897
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
sbin/iked/parse.y
1899
*p++ = c;
sbin/iked/parse.y
1904
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/iked/parse.y
1905
lungetc(c);
sbin/iked/parse.y
1912
if (c == '\n') {
sbin/iked/parse.y
1916
if (c == EOF)
sbin/iked/parse.y
1918
return (c);
sbin/iked/sntrup761.c
1066
Fq c[p];
sbin/iked/sntrup761.c
1068
Encrypt(c,r,h);
sbin/iked/sntrup761.c
1069
Rounded_encode(C,c);
sbin/iked/sntrup761.c
1076
Fq c[p];
sbin/iked/sntrup761.c
1080
Rounded_decode(c,C);
sbin/iked/sntrup761.c
1081
Decrypt(r,c,f,v);
sbin/iked/sntrup761.c
1115
static void ZEncrypt(unsigned char *c,const Inputs r,const unsigned char *pk)
sbin/iked/sntrup761.c
1123
Rounded_encode(c,B); c += Rounded_bytes;
sbin/iked/sntrup761.c
1124
Top_encode(c,T);
sbin/iked/sntrup761.c
1128
static void ZDecrypt(Inputs r,const unsigned char *c,const unsigned char *sk)
sbin/iked/sntrup761.c
1135
Rounded_decode(B,c);
sbin/iked/sntrup761.c
1136
Top_decode(T,c+Rounded_bytes);
sbin/iked/sntrup761.c
1200
static void Hide(unsigned char *c,unsigned char *r_enc,const Inputs r,const unsigned char *pk,const unsigned char *cache)
sbin/iked/sntrup761.c
1203
ZEncrypt(c,r,pk); c += Ciphertexts_bytes;
sbin/iked/sntrup761.c
1204
HashConfirm(c,r_enc,pk,cache);
sbin/iked/sntrup761.c
1208
static void Encap(unsigned char *c,unsigned char *k,const unsigned char *pk)
sbin/iked/sntrup761.c
1216
Hide(c,r_enc,r,pk,cache);
sbin/iked/sntrup761.c
1217
HashSession(k,1,r_enc,c);
sbin/iked/sntrup761.c
1221
static int Ciphertexts_diff_mask(const unsigned char *c,const unsigned char *c2)
sbin/iked/sntrup761.c
1226
while (len-- > 0) differentbits |= (*c++)^(*c2++);
sbin/iked/sntrup761.c
1231
static void Decap(unsigned char *k,const unsigned char *c,const unsigned char *sk)
sbin/iked/sntrup761.c
1242
ZDecrypt(r,c,sk);
sbin/iked/sntrup761.c
1244
mask = Ciphertexts_diff_mask(c,cnew);
sbin/iked/sntrup761.c
1246
HashSession(k,1+mask,r_enc,c);
sbin/iked/sntrup761.c
1258
int crypto_kem_sntrup761_enc(unsigned char *c,unsigned char *k,const unsigned char *pk)
sbin/iked/sntrup761.c
1260
Encap(c,k,pk);
sbin/iked/sntrup761.c
1264
int crypto_kem_sntrup761_dec(unsigned char *k,const unsigned char *c,const unsigned char *sk)
sbin/iked/sntrup761.c
1266
Decap(k,c,sk);
sbin/iked/sntrup761.c
27
int64_t c = (int64_t)b - (int64_t)a; \
sbin/iked/sntrup761.c
28
c ^= ab & (c ^ b); \
sbin/iked/sntrup761.c
29
c >>= 31; \
sbin/iked/sntrup761.c
30
c &= ab; \
sbin/iked/sntrup761.c
31
a ^= c; \
sbin/iked/sntrup761.c
32
b ^= c; \
sbin/iked/sntrup761.c
698
unsigned char c[4];
sbin/iked/sntrup761.c
701
randombytes(c,4);
sbin/iked/sntrup761.c
702
out[0] = (uint32)c[0];
sbin/iked/sntrup761.c
703
out[1] = ((uint32)c[1])<<8;
sbin/iked/sntrup761.c
704
out[2] = ((uint32)c[2])<<16;
sbin/iked/sntrup761.c
705
out[3] = ((uint32)c[3])<<24;
sbin/iked/sntrup761.c
749
static void Encrypt(Fq *c,const small *r,const Fq *h)
sbin/iked/sntrup761.c
754
Round(c,hr);
sbin/iked/sntrup761.c
758
static void Decrypt(small *r,const Fq *c,const small *f,const small *ginv)
sbin/iked/sntrup761.c
767
Rq_mult_small(cf,c,f);
sbin/iked/util.c
514
unsigned char c;
sbin/iked/util.c
533
for (; (c = *bits) > 32; bits++) {
sbin/iked/util.c
534
buf[idx][j++] = tolower((unsigned char)c);
sbin/init/init.c
1010
char c;
sbin/init/init.c
1013
if (read(p[0], &c, 1) != 1) {
sbin/init/init.c
1018
if (c == '1')
sbin/init/init.c
194
int c, fd;
sbin/init/init.c
240
while ((c = getopt(argc, argv, "sf")) != -1)
sbin/init/init.c
241
switch (c) {
sbin/init/init.c
249
warning("unrecognized flag '-%c'", c);
sbin/ipsecctl/parse.y
1123
int c, next;
sbin/ipsecctl/parse.y
1128
c = (unsigned char)parsebuf[parseindex++];
sbin/ipsecctl/parse.y
1129
if (c != '\0')
sbin/ipsecctl/parse.y
1130
return (c);
sbin/ipsecctl/parse.y
1140
if ((c = getc(file->stream)) == EOF) {
sbin/ipsecctl/parse.y
1146
return (c);
sbin/ipsecctl/parse.y
1149
while ((c = getc(file->stream)) == '\\') {
sbin/ipsecctl/parse.y
1152
c = next;
sbin/ipsecctl/parse.y
1159
while (c == EOF) {
sbin/ipsecctl/parse.y
1162
c = getc(file->stream);
sbin/ipsecctl/parse.y
1164
return (c);
sbin/ipsecctl/parse.y
1168
lungetc(int c)
sbin/ipsecctl/parse.y
1170
if (c == EOF)
sbin/ipsecctl/parse.y
1175
return (c);
sbin/ipsecctl/parse.y
1179
pushback_buffer[pushback_index++] = c;
sbin/ipsecctl/parse.y
1180
return (c);
sbin/ipsecctl/parse.y
1186
int c;
sbin/ipsecctl/parse.y
1193
c = (unsigned char)pushback_buffer[--pushback_index];
sbin/ipsecctl/parse.y
1195
c = lgetc(0);
sbin/ipsecctl/parse.y
1196
if (c == '\n') {
sbin/ipsecctl/parse.y
1200
if (c == EOF)
sbin/ipsecctl/parse.y
1211
int quotec, next, c;
sbin/ipsecctl/parse.y
1216
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/ipsecctl/parse.y
1220
if (c == '#')
sbin/ipsecctl/parse.y
1221
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/ipsecctl/parse.y
1223
if (c == '$' && parsebuf == NULL) {
sbin/ipsecctl/parse.y
1225
if ((c = lgetc(0)) == EOF)
sbin/ipsecctl/parse.y
1232
if (isalnum(c) || c == '_') {
sbin/ipsecctl/parse.y
1233
*p++ = c;
sbin/ipsecctl/parse.y
1237
lungetc(c);
sbin/ipsecctl/parse.y
1250
switch (c) {
sbin/ipsecctl/parse.y
1253
quotec = c;
sbin/ipsecctl/parse.y
1255
if ((c = lgetc(quotec)) == EOF)
sbin/ipsecctl/parse.y
1257
if (c == '\n') {
sbin/ipsecctl/parse.y
1260
} else if (c == '\\') {
sbin/ipsecctl/parse.y
1265
c = next;
sbin/ipsecctl/parse.y
1271
} else if (c == quotec) {
sbin/ipsecctl/parse.y
1274
} else if (c == '\0') {
sbin/ipsecctl/parse.y
1282
*p++ = c;
sbin/ipsecctl/parse.y
1293
if (c == '-' || isdigit(c)) {
sbin/ipsecctl/parse.y
1295
*p++ = c;
sbin/ipsecctl/parse.y
1300
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/ipsecctl/parse.y
1301
lungetc(c);
sbin/ipsecctl/parse.y
1304
if (c == EOF || allowed_to_end_number(c)) {
sbin/ipsecctl/parse.y
1320
c = (unsigned char)*--p;
sbin/ipsecctl/parse.y
1321
if (c == '-')
sbin/ipsecctl/parse.y
1322
return (c);
sbin/ipsecctl/parse.y
1332
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
sbin/ipsecctl/parse.y
1334
*p++ = c;
sbin/ipsecctl/parse.y
1339
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/ipsecctl/parse.y
1340
lungetc(c);
sbin/ipsecctl/parse.y
1347
if (c == '\n') {
sbin/ipsecctl/parse.y
1351
if (c == EOF)
sbin/ipsecctl/parse.y
1353
return (c);
sbin/isakmpd/util.c
103
hex2nibble(char c)
sbin/isakmpd/util.c
105
if (c >= '0' && c <= '9')
sbin/isakmpd/util.c
106
return c - '0';
sbin/isakmpd/util.c
107
if (c >= 'a' && c <= 'f')
sbin/isakmpd/util.c
108
return c - 'a' + 10;
sbin/isakmpd/util.c
109
if (c >= 'A' && c <= 'F')
sbin/isakmpd/util.c
110
return c - 'A' + 10;
sbin/kbd/kbd_wscons.c
234
char buf[LINE_MAX], *c, *b, device[sizeof "/dev/wskbd00"];
sbin/kbd/kbd_wscons.c
238
c = name;
sbin/kbd/kbd_wscons.c
240
while (*c != '.' && *c != '\0' && b < buf + sizeof(buf) - 1)
sbin/kbd/kbd_wscons.c
241
*b++ = *c++;
sbin/kbd/kbd_wscons.c
251
while (*c == '.') {
sbin/kbd/kbd_wscons.c
253
c++;
sbin/kbd/kbd_wscons.c
254
while (*c != '.' && *c != '\0' && b < buf + sizeof(buf) - 1)
sbin/kbd/kbd_wscons.c
255
*b++ = *c++;
sbin/mount_msdos/mount_msdos.c
67
int c, mntflags, set_gid, set_uid, set_mask;
sbin/mount_msdos/mount_msdos.c
74
while ((c = getopt(argc, argv, "sl9u:g:m:o:")) != -1) {
sbin/mount_msdos/mount_msdos.c
75
switch (c) {
sbin/mount_nfs/mount_nfs.c
163
int c;
sbin/mount_nfs/mount_nfs.c
176
while ((c = getopt(argc, argv,
sbin/mount_nfs/mount_nfs.c
178
switch (c) {
sbin/mount_ntfs/mount_ntfs.c
67
int c, mntflags, set_gid, set_uid, set_mask;
sbin/mount_ntfs/mount_ntfs.c
73
while ((c = getopt(argc, argv, "aiu:g:m:o:")) != -1) {
sbin/mount_ntfs/mount_ntfs.c
74
switch (c) {
sbin/mountd/mountd.c
246
int c, socks[2];
sbin/mountd/mountd.c
248
while ((c = getopt(argc, argv, "dnr")) != -1)
sbin/mountd/mountd.c
249
switch (c) {
sbin/mountd/mountd.c
283
if (fscanf(pidfile, "%d\n", &c) > 0 && c > 0) {
sbin/mountd/mountd.c
284
if (kill(c, 0) == 0) {
sbin/mountd/mountd.c
285
syslog(LOG_ERR, "Already running (pid %d)", c);
sbin/ncheck_ffs/ncheck_ffs.c
511
int c, i;
sbin/ncheck_ffs/ncheck_ffs.c
513
while ((c = getopt(argc, argv, "af:i:ms")) != -1)
sbin/ncheck_ffs/ncheck_ffs.c
514
switch (c) {
sbin/newfs_ext2fs/mke2fs.c
1298
uint c, i;
sbin/newfs_ext2fs/mke2fs.c
1312
c = ino_to_cg(&sblock, ino);
sbin/newfs_ext2fs/mke2fs.c
1315
if (gd[c].ext2bgd_nifree == 0)
sbin/newfs_ext2fs/mke2fs.c
1318
__func__, (uint64_t)ino, c);
sbin/newfs_ext2fs/mke2fs.c
1331
gd[c].ext2bgd_nifree--;
sbin/newfs_ext2fs/mke2fs.c
154
#define cgbase(fs, c) \
sbin/newfs_ext2fs/mke2fs.c
155
((fs)->e2fs.e2fs_first_dblock + (fs)->e2fs.e2fs_bpg * (c))
sbin/newfs_ext2fs/mke2fs.c
831
cgoverhead(uint c)
sbin/newfs_ext2fs/mke2fs.c
840
cg_has_sb(c) != 0) {
sbin/newfs_msdos/newfs_msdos.c
831
int c = 0, i;
sbin/newfs_msdos/newfs_msdos.c
834
c = (u_char)*src++;
sbin/newfs_msdos/newfs_msdos.c
835
if (c < ' ' + !i || strchr("\"*+,./:;<=>?[\\]|", c))
sbin/newfs_msdos/newfs_msdos.c
838
return i && !c;
sbin/newfs_msdos/newfs_msdos.c
847
int c, i;
sbin/newfs_msdos/newfs_msdos.c
850
c = *src ? toupper((unsigned char)*src++) : ' ';
sbin/newfs_msdos/newfs_msdos.c
851
*dest++ = !i && c == '\xe5' ? 5 : c;
sbin/pdisk/io.c
104
c = my_getch();
sbin/pdisk/io.c
106
if (c <= 0) {
sbin/pdisk/io.c
108
} else if (c == ' ' || c == '\t') {
sbin/pdisk/io.c
110
} else if (c == '\n') {
sbin/pdisk/io.c
111
my_ungetch(c);
sbin/pdisk/io.c
113
} else if (c == 'y' || c == 'Y') {
sbin/pdisk/io.c
115
} else if (c == 'n' || c == 'N') {
sbin/pdisk/io.c
128
int c;
sbin/pdisk/io.c
134
c = my_getch();
sbin/pdisk/io.c
136
if (c <= 0) {
sbin/pdisk/io.c
138
} else if (c == ' ' || c == '\t') {
sbin/pdisk/io.c
140
} else if (c == '\n') {
sbin/pdisk/io.c
143
*command = c;
sbin/pdisk/io.c
153
int c;
sbin/pdisk/io.c
157
c = my_getch();
sbin/pdisk/io.c
159
if (c <= 0) {
sbin/pdisk/io.c
161
} else if (c == ' ' || c == '\t') {
sbin/pdisk/io.c
163
} else if (c == '\n') {
sbin/pdisk/io.c
165
} else if ('0' <= c && c <= '9') {
sbin/pdisk/io.c
166
my_ungetch(c);
sbin/pdisk/io.c
170
my_ungetch(c);
sbin/pdisk/io.c
183
int c;
sbin/pdisk/io.c
186
while ((c = my_getch())) {
sbin/pdisk/io.c
187
if (c >= '0' && c <= '9') {
sbin/pdisk/io.c
188
value = value * 10 + (c - '0');
sbin/pdisk/io.c
189
} else if (c == ' ' || c == '\t' || c == '\n') {
sbin/pdisk/io.c
190
my_ungetch(c);
sbin/pdisk/io.c
204
int c;
sbin/pdisk/io.c
207
c = my_getch();
sbin/pdisk/io.c
209
if (c <= 0) {
sbin/pdisk/io.c
211
} else if (c == ' ' || c == '\t') {
sbin/pdisk/io.c
213
} else if (c == '\n') {
sbin/pdisk/io.c
215
} else if (c == '"' || c == '\'') {
sbin/pdisk/io.c
216
return get_string(c);
sbin/pdisk/io.c
217
} else if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ||
sbin/pdisk/io.c
218
(c == '-' || c == '/' || c == '.' || c == ':')) {
sbin/pdisk/io.c
219
my_ungetch(c);
sbin/pdisk/io.c
222
my_ungetch(c);
sbin/pdisk/io.c
235
int c;
sbin/pdisk/io.c
240
c = my_getch();
sbin/pdisk/io.c
241
for (s = buf;; c = my_getch()) {
sbin/pdisk/io.c
242
if (c <= 0 || c == eos || (eos == ' ' && c == '\t')) {
sbin/pdisk/io.c
245
} else if (c == '\n') {
sbin/pdisk/io.c
247
my_ungetch(c);
sbin/pdisk/io.c
250
*s++ = c;
sbin/pdisk/io.c
263
int c;
sbin/pdisk/io.c
265
c = my_getch();
sbin/pdisk/io.c
268
if (c <= 0 || divisor <= 0) {
sbin/pdisk/io.c
270
} else if (c == 't' || c == 'T') {
sbin/pdisk/io.c
273
} else if (c == 'g' || c == 'G') {
sbin/pdisk/io.c
275
} else if (c == 'm' || c == 'M') {
sbin/pdisk/io.c
277
} else if (c == 'k' || c == 'K') {
sbin/pdisk/io.c
280
my_ungetch(c);
sbin/pdisk/io.c
303
int c, result;
sbin/pdisk/io.c
307
c = my_getch();
sbin/pdisk/io.c
309
if (c == 'p' || c == 'P')
sbin/pdisk/io.c
311
else if (c > 0)
sbin/pdisk/io.c
312
my_ungetch(c);
sbin/pdisk/io.c
61
my_ungetch(int c)
sbin/pdisk/io.c
68
unget_buf[unget_count++] = c;
sbin/pdisk/io.c
76
int c;
sbin/pdisk/io.c
79
c = my_getch();
sbin/pdisk/io.c
81
if (c <= 0) {
sbin/pdisk/io.c
83
} else if (c == '\n') {
sbin/pdisk/io.c
85
my_ungetch(c);
sbin/pdisk/io.c
98
int c;
sbin/pdisk/pdisk.c
77
int c, fd, oflags;
sbin/pdisk/pdisk.c
80
while ((c = getopt(argc, argv, "lr")) != -1) {
sbin/pdisk/pdisk.c
81
switch (c) {
sbin/pfctl/parse.y
5638
int c;
sbin/pfctl/parse.y
5641
c = file->ungetbuf[--file->ungetpos];
sbin/pfctl/parse.y
5643
c = getc(file->stream);
sbin/pfctl/parse.y
5644
if (c == START_EXPAND)
sbin/pfctl/parse.y
5646
else if (c == DONE_EXPAND)
sbin/pfctl/parse.y
5651
return (c);
sbin/pfctl/parse.y
5657
int c, next;
sbin/pfctl/parse.y
5660
if ((c = igetc()) == EOF) {
sbin/pfctl/parse.y
5666
return (c);
sbin/pfctl/parse.y
5669
while ((c = igetc()) == '\\') {
sbin/pfctl/parse.y
5672
c = next;
sbin/pfctl/parse.y
5679
if (c == EOF) {
sbin/pfctl/parse.y
5689
while (c == EOF) {
sbin/pfctl/parse.y
5692
c = igetc();
sbin/pfctl/parse.y
5696
return (c);
sbin/pfctl/parse.y
5700
lungetc(int c)
sbin/pfctl/parse.y
5702
if (c == EOF)
sbin/pfctl/parse.y
5711
file->ungetbuf[file->ungetpos++] = c;
sbin/pfctl/parse.y
5717
int c;
sbin/pfctl/parse.y
5721
c = lgetc(0);
sbin/pfctl/parse.y
5722
if (c == '\n') {
sbin/pfctl/parse.y
5726
if (c == EOF)
sbin/pfctl/parse.y
5737
int quotec, next, c;
sbin/pfctl/parse.y
5742
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/pfctl/parse.y
5746
if (c == '#')
sbin/pfctl/parse.y
5747
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/pfctl/parse.y
5749
if (c == '$' && !expanding) {
sbin/pfctl/parse.y
5751
if ((c = lgetc(0)) == EOF)
sbin/pfctl/parse.y
5758
if (isalnum(c) || c == '_') {
sbin/pfctl/parse.y
5759
*p++ = c;
sbin/pfctl/parse.y
5763
lungetc(c);
sbin/pfctl/parse.y
5781
switch (c) {
sbin/pfctl/parse.y
5784
quotec = c;
sbin/pfctl/parse.y
5786
if ((c = lgetc(quotec)) == EOF)
sbin/pfctl/parse.y
5788
if (c == '\n') {
sbin/pfctl/parse.y
5791
} else if (c == '\\') {
sbin/pfctl/parse.y
5796
c = next;
sbin/pfctl/parse.y
5802
} else if (c == quotec) {
sbin/pfctl/parse.y
5805
} else if (c == '\0') {
sbin/pfctl/parse.y
5813
*p++ = c;
sbin/pfctl/parse.y
5848
if (c == '-' || isdigit(c)) {
sbin/pfctl/parse.y
5850
*p++ = c;
sbin/pfctl/parse.y
5855
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/pfctl/parse.y
5856
lungetc(c);
sbin/pfctl/parse.y
5859
if (c == EOF || allowed_to_end_number(c)) {
sbin/pfctl/parse.y
5875
c = (unsigned char)*--p;
sbin/pfctl/parse.y
5876
if (c == '-')
sbin/pfctl/parse.y
5877
return (c);
sbin/pfctl/parse.y
5887
if (isalnum(c) || c == ':' || c == '_') {
sbin/pfctl/parse.y
5889
*p++ = c;
sbin/pfctl/parse.y
5894
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/pfctl/parse.y
5895
lungetc(c);
sbin/pfctl/parse.y
5902
if (c == '\n') {
sbin/pfctl/parse.y
5906
if (c == EOF)
sbin/pfctl/parse.y
5908
return (c);
sbin/pfctl/pfctl_parser.c
315
CODE *c;
sbin/pfctl/pfctl_parser.c
335
for (c = prioritynames; c->c_name; c++)
sbin/pfctl/pfctl_parser.c
336
if (!strcmp(buf, c->c_name) && c->c_val != INTERNAL_NOPRI)
sbin/pfctl/pfctl_parser.c
337
return (c->c_val);
sbin/pfctl/pfctl_parser.c
345
CODE *c;
sbin/pfctl/pfctl_parser.c
347
for (c = prioritynames; c->c_name; c++)
sbin/pfctl/pfctl_parser.c
348
if (c->c_val == level)
sbin/pfctl/pfctl_parser.c
349
return (c->c_name);
sbin/restore/utilities.c
328
int c;
sbin/restore/utilities.c
333
c = getc(terminal);
sbin/restore/utilities.c
334
while (c != '\n' && getc(terminal) != '\n')
sbin/restore/utilities.c
337
} while (c != 'y' && c != 'n');
sbin/restore/utilities.c
338
if (c == 'y')
sbin/savecore/savecore.c
329
char c, visout[5];
sbin/savecore/savecore.c
335
if (KREAD(kd_dump, panicloc, &c) != 0 || c == '\0')
sbin/savecore/savecore.c
339
vis(visout, c, VIS_SAFE|VIS_NOSLASH, 0);
sbin/savecore/zopen.c
213
int c, disp;
sbin/savecore/zopen.c
265
c = *bp++;
sbin/savecore/zopen.c
267
zs->zs_fcode = (long)(((long)c << zs->zs_maxbits) +
sbin/savecore/zopen.c
270
i = ((c << zs->zs_hshift) ^ zs->zs_ent);
sbin/savecore/zopen.c
293
zs->zs_ent = c;
sbin/scsi/libscsi.c
570
char c;
sbin/scsi/libscsi.c
578
while ((ret = next_field(&fmt, &c, &width, &value, field_name,
sbin/scsi/libscsi.c
594
ret, c, width, value, field_name, error, suppress);
sbin/scsi/libscsi.c
597
if (c == 's') /* Absolute seek */
sbin/scsi/scsi.c
430
int c;
sbin/scsi/scsi.c
434
while (isspace(c = getc(f)))
sbin/scsi/scsi.c
437
if (c == '#') {
sbin/scsi/scsi.c
438
while ((c = getc(f)) != '\n' && c != EOF)
sbin/scsi/scsi.c
443
ungetc(c, f);
sbin/scsi/scsi.c
453
int match, next, found, c;
sbin/scsi/scsi.c
485
c = getc(modes);
sbin/scsi/scsi.c
486
if (c == EOF)
sbin/scsi/scsi.c
489
if (c == START_ENTRY) {
sbin/scsi/scsi.c
492
if (c == END_ENTRY) {
sbin/scsi/scsi.c
497
if (found && c != '\n') {
sbin/scsi/scsi.c
502
fmt[next++] = (u_char)c;
sbin/slaacd/control.c
130
struct ctl_conn *c;
sbin/slaacd/control.c
154
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
sbin/slaacd/control.c
160
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
sbin/slaacd/control.c
163
free(c);
sbin/slaacd/control.c
166
c->iev.handler = control_dispatch_imsg;
sbin/slaacd/control.c
167
c->iev.events = EV_READ;
sbin/slaacd/control.c
168
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
sbin/slaacd/control.c
169
c->iev.handler, &c->iev);
sbin/slaacd/control.c
170
event_add(&c->iev.ev, NULL);
sbin/slaacd/control.c
172
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
sbin/slaacd/control.c
178
struct ctl_conn *c;
sbin/slaacd/control.c
180
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/slaacd/control.c
181
if (c->iev.ibuf.fd == fd)
sbin/slaacd/control.c
185
return (c);
sbin/slaacd/control.c
191
struct ctl_conn *c;
sbin/slaacd/control.c
193
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/slaacd/control.c
194
if (c->iev.ibuf.pid == pid)
sbin/slaacd/control.c
198
return (c);
sbin/slaacd/control.c
204
struct ctl_conn *c;
sbin/slaacd/control.c
206
if ((c = control_connbyfd(fd)) == NULL) {
sbin/slaacd/control.c
211
imsgbuf_clear(&c->iev.ibuf);
sbin/slaacd/control.c
212
TAILQ_REMOVE(&ctl_conns, c, entry);
sbin/slaacd/control.c
214
event_del(&c->iev.ev);
sbin/slaacd/control.c
215
close(c->iev.ibuf.fd);
sbin/slaacd/control.c
223
free(c);
sbin/slaacd/control.c
229
struct ctl_conn *c;
sbin/slaacd/control.c
236
if ((c = control_connbyfd(fd)) == NULL) {
sbin/slaacd/control.c
242
if (imsgbuf_read(&c->iev.ibuf) != 1) {
sbin/slaacd/control.c
248
if (imsgbuf_write(&c->iev.ibuf) == -1) {
sbin/slaacd/control.c
255
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
sbin/slaacd/control.c
284
c->iev.ibuf.pid = pid;
sbin/slaacd/control.c
295
imsg_event_add(&c->iev);
sbin/slaacd/control.c
301
struct ctl_conn *c;
sbin/slaacd/control.c
303
if ((c = control_connbypid(imsg_get_pid(imsg))) == NULL)
sbin/slaacd/control.c
306
return (imsg_forward_event(&c->iev, imsg));
sbin/swapctl/swapctl.c
120
int c;
sbin/swapctl/swapctl.c
125
while ((c = getopt(argc, argv, "Aacdlkp:st:")) != -1) {
sbin/swapctl/swapctl.c
126
switch (c) {
sbin/unwind/control.c
129
struct ctl_conn *c;
sbin/unwind/control.c
153
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
sbin/unwind/control.c
159
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
sbin/unwind/control.c
162
free(c);
sbin/unwind/control.c
165
c->iev.handler = control_dispatch_imsg;
sbin/unwind/control.c
166
c->iev.events = EV_READ;
sbin/unwind/control.c
167
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events, c->iev.handler,
sbin/unwind/control.c
168
&c->iev);
sbin/unwind/control.c
169
event_add(&c->iev.ev, NULL);
sbin/unwind/control.c
171
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
sbin/unwind/control.c
177
struct ctl_conn *c;
sbin/unwind/control.c
179
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/unwind/control.c
180
if (c->iev.ibuf.fd == fd)
sbin/unwind/control.c
184
return (c);
sbin/unwind/control.c
190
struct ctl_conn *c;
sbin/unwind/control.c
192
TAILQ_FOREACH(c, &ctl_conns, entry) {
sbin/unwind/control.c
193
if (c->iev.ibuf.pid == pid)
sbin/unwind/control.c
197
return (c);
sbin/unwind/control.c
203
struct ctl_conn *c;
sbin/unwind/control.c
205
if ((c = control_connbyfd(fd)) == NULL) {
sbin/unwind/control.c
210
imsgbuf_clear(&c->iev.ibuf);
sbin/unwind/control.c
211
TAILQ_REMOVE(&ctl_conns, c, entry);
sbin/unwind/control.c
213
event_del(&c->iev.ev);
sbin/unwind/control.c
214
close(c->iev.ibuf.fd);
sbin/unwind/control.c
222
free(c);
sbin/unwind/control.c
228
struct ctl_conn *c;
sbin/unwind/control.c
235
if ((c = control_connbyfd(fd)) == NULL) {
sbin/unwind/control.c
241
if (imsgbuf_read(&c->iev.ibuf) != 1) {
sbin/unwind/control.c
247
if (imsgbuf_write(&c->iev.ibuf) == -1) {
sbin/unwind/control.c
259
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
sbin/unwind/control.c
279
c->iev.ibuf.pid = imsg.hdr.pid;
sbin/unwind/control.c
314
imsg_event_add(&c->iev);
sbin/unwind/control.c
320
struct ctl_conn *c;
sbin/unwind/control.c
322
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
sbin/unwind/control.c
325
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
sbin/unwind/frontend.c
1091
query_imsg.c = pq->qinfo.qclass;
sbin/unwind/frontend.c
854
query_imsg.c = pq->qinfo.qclass;
sbin/unwind/libunbound/config.h
1543
int isblank(int c);
sbin/unwind/libunbound/daemon/remote.h
372
int fast_reload_client_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/daemon/remote.h
71
struct comm_point* c;
sbin/unwind/libunbound/daemon/stats.h
118
void server_stats_insquery(struct ub_server_stats* stats, struct comm_point* c,
sbin/unwind/libunbound/dns64/dns64.c
232
char* c = ptr;
sbin/unwind/libunbound/dns64/dns64.c
236
*c = uitoa((unsigned int)(ipv4 % 256), c + 1);
sbin/unwind/libunbound/dns64/dns64.c
237
c += *c + 1;
sbin/unwind/libunbound/dns64/dns64.c
238
log_assert(c < ptr+nm_len);
sbin/unwind/libunbound/dns64/dns64.c
242
log_assert(c + sizeof(IPV4_PTR_SUFFIX) <= ptr+nm_len);
sbin/unwind/libunbound/dns64/dns64.c
243
memmove(c, IPV4_PTR_SUFFIX, sizeof(IPV4_PTR_SUFFIX));
sbin/unwind/libunbound/dns64/dns64.c
245
return c + sizeof(IPV4_PTR_SUFFIX) - ptr;
sbin/unwind/libunbound/iterator/iter_fwd.c
111
forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
121
node->dclass = c;
sbin/unwind/libunbound/iterator/iter_fwd.c
143
fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/iterator/iter_fwd.c
147
key.dclass = c;
sbin/unwind/libunbound/iterator/iter_fwd.c
155
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
sbin/unwind/libunbound/iterator/iter_fwd.c
157
return forwards_insert_data(fwd, c, dp->name, dp->namelen,
sbin/unwind/libunbound/iterator/iter_fwd.c
315
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/iterator/iter_fwd.c
319
key.dclass = c;
sbin/unwind/libunbound/iterator/iter_fwd.c
567
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_fwd.c
573
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
577
if(!forwards_insert(fwd, c, dp)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
587
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
593
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.c
604
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
609
if(fwd_zone_find(fwd, c, nm) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
613
if(!fwd_add_stub_hole(fwd, c, nm)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
623
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.c
629
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.h
194
int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
207
void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
222
int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
234
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_hints.c
171
hints_insert(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_hints.c
183
dp->namelabs, c)) {
sbin/unwind/libunbound/iterator/iter_hints.c
322
uint16_t c = LDNS_RR_CLASS_IN;
sbin/unwind/libunbound/iterator/iter_hints.c
359
c = sldns_wirerr_get_class(rr, rr_len, dname_len);
sbin/unwind/libunbound/iterator/iter_hints.c
415
if(!hints_insert(hints, c, dp, 0)) {
sbin/unwind/libunbound/iterator/iter_hints.c
580
hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_hints.c
587
dp->name, dp->namelen, dp->namelabs, c)) != NULL) {
sbin/unwind/libunbound/iterator/iter_hints.c
591
if(!hints_insert(hints, c, dp, noprime)) {
sbin/unwind/libunbound/iterator/iter_hints.c
601
hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_hints.c
610
nm, len, labs, c))) {
sbin/unwind/libunbound/iterator/iter_hints.h
185
int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_hints.h
198
void hints_delete_stub(struct iter_hints* hints, uint16_t c,
sbin/unwind/libunbound/iterator/iter_utils.c
1366
uint16_t* c)
sbin/unwind/libunbound/iterator/iter_utils.c
1368
uint16_t c1 = *c, c2 = *c;
sbin/unwind/libunbound/iterator/iter_utils.c
1383
*c = c2;
sbin/unwind/libunbound/iterator/iter_utils.c
1385
*c = c1;
sbin/unwind/libunbound/iterator/iter_utils.c
1387
*c = c1;
sbin/unwind/libunbound/iterator/iter_utils.c
1388
else *c = c2;
sbin/unwind/libunbound/iterator/iter_utils.c
799
uint16_t t, uint16_t c)
sbin/unwind/libunbound/iterator/iter_utils.c
805
qinf.qclass = c;
sbin/unwind/libunbound/iterator/iter_utils.h
348
uint16_t* c);
sbin/unwind/libunbound/iterator/iterator.c
4086
uint16_t c = 0;
sbin/unwind/libunbound/iterator/iterator.c
4089
qstate->env->fwds, &c)) {
sbin/unwind/libunbound/iterator/iterator.c
4092
qstate->qinfo.qname, qstate->qinfo.qtype, c);
sbin/unwind/libunbound/iterator/iterator.c
4095
c, qstate, id, iq, INIT_REQUEST_STATE,
sbin/unwind/libunbound/iterator/iterator.c
4105
if(c == 0xffff)
sbin/unwind/libunbound/iterator/iterator.c
4107
else c++;
sbin/unwind/libunbound/iterator/iterator.c
4363
pkt = qstate->reply->c->buffer;
sbin/unwind/libunbound/libunbound/libworker.c
1080
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
sbin/unwind/libunbound/libunbound/libworker.c
911
libworker_handle_service_reply(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/libunbound/libworker.c
922
if(!LDNS_QR_WIRE(sldns_buffer_begin(c->buffer))
sbin/unwind/libunbound/libunbound/libworker.c
923
|| LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) !=
sbin/unwind/libunbound/libunbound/libworker.c
925
|| LDNS_QDCOUNT(sldns_buffer_begin(c->buffer)) > 1) {
sbin/unwind/libunbound/libunbound/libworker.c
944
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
sbin/unwind/libunbound/libunbound/libworker.c
952
int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
sbin/unwind/libunbound/libunbound/libworker.c
960
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
sbin/unwind/libunbound/libunbound/libworker.c
968
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
sbin/unwind/libunbound/libunbound/worker.h
152
int worker_handle_request(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/libunbound/worker.h
156
int worker_handle_service_reply(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/libunbound/worker.h
84
int libworker_handle_service_reply(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/authzone.c
2119
auth_zones_cfg(struct auth_zones* az, struct config_auth* c)
sbin/unwind/libunbound/services/authzone.c
2125
if(c->isrpz) {
sbin/unwind/libunbound/services/authzone.c
2131
if(!(z=auth_zones_find_or_add_zone(az, c->name))) {
sbin/unwind/libunbound/services/authzone.c
2133
if(c->isrpz) {
sbin/unwind/libunbound/services/authzone.c
2138
if(c->masters || c->urls) {
sbin/unwind/libunbound/services/authzone.c
2142
if(c->isrpz) {
sbin/unwind/libunbound/services/authzone.c
2148
if(c->for_downstream)
sbin/unwind/libunbound/services/authzone.c
2154
if(!auth_zone_set_zonefile(z, c->zonefile)) {
sbin/unwind/libunbound/services/authzone.c
2159
if(c->isrpz) {
sbin/unwind/libunbound/services/authzone.c
2164
z->for_downstream = c->for_downstream;
sbin/unwind/libunbound/services/authzone.c
2165
z->for_upstream = c->for_upstream;
sbin/unwind/libunbound/services/authzone.c
2166
z->fallback_enabled = c->fallback_enabled;
sbin/unwind/libunbound/services/authzone.c
2167
z->zonemd_check = c->zonemd_check;
sbin/unwind/libunbound/services/authzone.c
2168
z->zonemd_reject_absence = c->zonemd_reject_absence;
sbin/unwind/libunbound/services/authzone.c
2169
if(c->isrpz && !z->rpz){
sbin/unwind/libunbound/services/authzone.c
2170
if(!(z->rpz = rpz_create(c))){
sbin/unwind/libunbound/services/authzone.c
2180
} else if(c->isrpz && z->rpz) {
sbin/unwind/libunbound/services/authzone.c
2181
if(!rpz_config(z->rpz, c)) {
sbin/unwind/libunbound/services/authzone.c
2191
if(c->isrpz) {
sbin/unwind/libunbound/services/authzone.c
2199
if(!xfer_set_masters(&x->task_probe->masters, c, 0)) {
sbin/unwind/libunbound/services/authzone.c
2204
if(!xfer_set_masters(&x->task_transfer->masters, c, 1)) {
sbin/unwind/libunbound/services/authzone.c
2305
struct auth_chunk* c, *cn;
sbin/unwind/libunbound/services/authzone.c
2306
c = at->chunks_first;
sbin/unwind/libunbound/services/authzone.c
2307
while(c) {
sbin/unwind/libunbound/services/authzone.c
2308
cn = c->next;
sbin/unwind/libunbound/services/authzone.c
2309
free(c->data);
sbin/unwind/libunbound/services/authzone.c
2310
free(c);
sbin/unwind/libunbound/services/authzone.c
2311
c = cn;
sbin/unwind/libunbound/services/authzone.c
4440
char c = (char)((*chunk)->data[*chunk_pos]);
sbin/unwind/libunbound/services/authzone.c
4448
sldns_buffer_write_u8(buf, (uint8_t)c);
sbin/unwind/libunbound/services/authzone.c
4449
if(c == '\n') {
sbin/unwind/libunbound/services/authzone.c
4473
char c = (char)sldns_buffer_read_u8_at(buf, i);
sbin/unwind/libunbound/services/authzone.c
4474
if(squote && c != '\'') continue;
sbin/unwind/libunbound/services/authzone.c
4475
if(dquote && c != '"') continue;
sbin/unwind/libunbound/services/authzone.c
4476
if(c == '"')
sbin/unwind/libunbound/services/authzone.c
4478
else if(c == '\'')
sbin/unwind/libunbound/services/authzone.c
4480
else if(c == '(')
sbin/unwind/libunbound/services/authzone.c
4482
else if(c == ')')
sbin/unwind/libunbound/services/authzone.c
4484
else if(c == ';') {
sbin/unwind/libunbound/services/authzone.c
4500
char c = (char)sldns_buffer_read_u8_at(buf, i);
sbin/unwind/libunbound/services/authzone.c
4501
if(squote && c != '\'') continue;
sbin/unwind/libunbound/services/authzone.c
4502
if(dquote && c != '"') continue;
sbin/unwind/libunbound/services/authzone.c
4503
if(c == '"')
sbin/unwind/libunbound/services/authzone.c
4505
else if(c == '\'')
sbin/unwind/libunbound/services/authzone.c
4507
else if(c == ';') {
sbin/unwind/libunbound/services/authzone.c
4522
char c = (char)sldns_buffer_read_u8_at(buf, i);
sbin/unwind/libunbound/services/authzone.c
4523
if(c == ';')
sbin/unwind/libunbound/services/authzone.c
4525
else if(c != ' ' && c != '\t' && c != '\r' && c != '\n')
sbin/unwind/libunbound/services/authzone.c
4616
char c = (char)sldns_buffer_read_u8_at(buf, i);
sbin/unwind/libunbound/services/authzone.c
4617
if(c == '\n' && i==end-1) {
sbin/unwind/libunbound/services/authzone.c
4622
if(c == '\n')
sbin/unwind/libunbound/services/authzone.c
6236
auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/authzone.c
6290
if(!check_xfer_packet(c->buffer, xfr, &gonextonfail, &transferdone)) {
sbin/unwind/libunbound/services/authzone.c
6295
if(!xfer_link_data(c->buffer, xfr)) {
sbin/unwind/libunbound/services/authzone.c
6311
c->tcp_is_reading = 1;
sbin/unwind/libunbound/services/authzone.c
6312
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/services/authzone.c
6313
comm_point_start_listening(c, -1, AUTH_TRANSFER_TIMEOUT);
sbin/unwind/libunbound/services/authzone.c
6319
auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/authzone.c
6344
if(repinfo) repinfo->c = NULL; /* signal cp deleted to
sbin/unwind/libunbound/services/authzone.c
6355
if(sldns_buffer_limit(c->buffer) > 0) {
sbin/unwind/libunbound/services/authzone.c
6357
(int)sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/services/authzone.c
6358
if(!xfer_link_data(c->buffer, xfr)) {
sbin/unwind/libunbound/services/authzone.c
6366
if(repinfo) repinfo->c = NULL; /* signal cp deleted to
sbin/unwind/libunbound/services/authzone.c
6377
c->tcp_is_reading = 1;
sbin/unwind/libunbound/services/authzone.c
6378
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/services/authzone.c
6379
comm_point_start_listening(c, -1, AUTH_TRANSFER_TIMEOUT);
sbin/unwind/libunbound/services/authzone.c
6569
auth_xfer_probe_udp_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/authzone.c
6584
repinfo->c = NULL;
sbin/unwind/libunbound/services/authzone.c
6591
if(check_packet_ok(c->buffer, LDNS_RR_TYPE_SOA, xfr,
sbin/unwind/libunbound/services/authzone.c
7377
xfer_set_masters(struct auth_master** list, struct config_auth* c,
sbin/unwind/libunbound/services/authzone.c
7387
for(p = c->urls; p; p = p->next) {
sbin/unwind/libunbound/services/authzone.c
7394
for(p = c->masters; p; p = p->next) {
sbin/unwind/libunbound/services/authzone.c
7404
for(p = c->allow_notify; p; p = p->next) {
sbin/unwind/libunbound/services/authzone.h
676
int xfer_set_masters(struct auth_master** list, struct config_auth* c,
sbin/unwind/libunbound/services/authzone.h
683
int auth_xfer_probe_udp_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/authzone.h
686
int auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/authzone.h
689
int auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err,
sbin/unwind/libunbound/services/listen_dnsport.c
1489
listen_cp_insert(struct comm_point* c, struct listen_dnsport* front)
sbin/unwind/libunbound/services/listen_dnsport.c
1495
item->com = c;
sbin/unwind/libunbound/services/listen_dnsport.c
2330
struct comm_point* c = req->cp;
sbin/unwind/libunbound/services/listen_dnsport.c
2343
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/services/listen_dnsport.c
2344
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo) ) {
sbin/unwind/libunbound/services/listen_dnsport.c
2351
c->tcp_is_reading = 0;
sbin/unwind/libunbound/services/listen_dnsport.c
2352
comm_point_stop_listening(c);
sbin/unwind/libunbound/services/listen_dnsport.c
2353
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
sbin/unwind/libunbound/services/listen_dnsport.c
2370
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2593
struct http2_stream* h2_stream = h2_session->c->h2_stream;
sbin/unwind/libunbound/services/listen_dnsport.c
2602
if(sldns_buffer_remaining(h2_session->c->buffer) == 0) {
sbin/unwind/libunbound/services/listen_dnsport.c
2613
rlen = sldns_buffer_remaining(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2653
sldns_buffer_current(h2_session->c->buffer),
sbin/unwind/libunbound/services/listen_dnsport.c
2654
sldns_buffer_remaining(h2_session->c->buffer));
sbin/unwind/libunbound/services/listen_dnsport.c
2772
if(h2_session->c->h2_stream) {
sbin/unwind/libunbound/services/listen_dnsport.c
2780
sldns_buffer_clear(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2781
if(sldns_buffer_remaining(h2_session->c->buffer) <
sbin/unwind/libunbound/services/listen_dnsport.c
2784
sldns_buffer_clear(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2790
sldns_buffer_write(h2_session->c->buffer,
sbin/unwind/libunbound/services/listen_dnsport.c
2800
sldns_buffer_flip(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2801
h2_session->c->h2_stream = h2_stream;
sbin/unwind/libunbound/services/listen_dnsport.c
2802
fptr_ok(fptr_whitelist_comm_point(h2_session->c->callback));
sbin/unwind/libunbound/services/listen_dnsport.c
2803
if((*h2_session->c->callback)(h2_session->c, h2_session->c->cb_arg,
sbin/unwind/libunbound/services/listen_dnsport.c
2804
NETEVENT_NOERROR, &h2_session->c->repinfo)) {
sbin/unwind/libunbound/services/listen_dnsport.c
2807
sldns_buffer_clear(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2808
h2_session->c->h2_stream = NULL;
sbin/unwind/libunbound/services/listen_dnsport.c
2890
sldns_buffer_clear(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2891
h2_session->c->h2_stream = NULL;
sbin/unwind/libunbound/services/listen_dnsport.c
2895
sldns_buffer_clear(h2_session->c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
2896
h2_session->c->h2_stream = NULL;
sbin/unwind/libunbound/services/listen_dnsport.c
2958
h2_session->c->http2_stream_max_qbuffer_size) {
sbin/unwind/libunbound/services/listen_dnsport.c
3085
size_t el = strlen(h2_session->c->http_endpoint);
sbin/unwind/libunbound/services/listen_dnsport.c
3088
if(valuelen < el || memcmp(h2_session->c->http_endpoint,
sbin/unwind/libunbound/services/listen_dnsport.c
3136
h2_session->c->http2_stream_max_qbuffer_size) {
sbin/unwind/libunbound/services/listen_dnsport.c
3169
} else if(len <= h2_session->c->http2_stream_max_qbuffer_size) {
sbin/unwind/libunbound/services/listen_dnsport.c
3543
doq_conn_create(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/services/listen_dnsport.c
3550
conn->doq_socket = c->doq_socket;
sbin/unwind/libunbound/services/listen_dnsport.c
3551
conn->table = c->doq_socket->table;
sbin/unwind/libunbound/services/listen_dnsport.c
3663
struct doq_conn* c = (struct doq_conn*)key1;
sbin/unwind/libunbound/services/listen_dnsport.c
3674
if(c->key.paddr.addrlen != d->key.paddr.addrlen) {
sbin/unwind/libunbound/services/listen_dnsport.c
3675
if(c->key.paddr.addrlen < d->key.paddr.addrlen)
sbin/unwind/libunbound/services/listen_dnsport.c
3679
if((r=memcmp(&c->key.paddr.addr, &d->key.paddr.addr,
sbin/unwind/libunbound/services/listen_dnsport.c
3680
c->key.paddr.addrlen))!=0)
sbin/unwind/libunbound/services/listen_dnsport.c
3682
if(c->key.paddr.localaddrlen != d->key.paddr.localaddrlen) {
sbin/unwind/libunbound/services/listen_dnsport.c
3683
if(c->key.paddr.localaddrlen < d->key.paddr.localaddrlen)
sbin/unwind/libunbound/services/listen_dnsport.c
3687
if((r=memcmp(&c->key.paddr.localaddr, &d->key.paddr.localaddr,
sbin/unwind/libunbound/services/listen_dnsport.c
3688
c->key.paddr.localaddrlen))!=0)
sbin/unwind/libunbound/services/listen_dnsport.c
3690
if(c->key.paddr.ifindex != d->key.paddr.ifindex) {
sbin/unwind/libunbound/services/listen_dnsport.c
3691
if(c->key.paddr.ifindex < d->key.paddr.ifindex)
sbin/unwind/libunbound/services/listen_dnsport.c
3695
if(c->key.dcidlen != d->key.dcidlen) {
sbin/unwind/libunbound/services/listen_dnsport.c
3696
if(c->key.dcidlen < d->key.dcidlen)
sbin/unwind/libunbound/services/listen_dnsport.c
3700
if((r=memcmp(c->key.dcid, d->key.dcid, c->key.dcidlen))!=0)
sbin/unwind/libunbound/services/listen_dnsport.c
3707
struct doq_conid* c = (struct doq_conid*)key1;
sbin/unwind/libunbound/services/listen_dnsport.c
3709
if(c->cidlen != d->cidlen) {
sbin/unwind/libunbound/services/listen_dnsport.c
3710
if(c->cidlen < d->cidlen)
sbin/unwind/libunbound/services/listen_dnsport.c
3714
return memcmp(c->cid, d->cid, c->cidlen);
sbin/unwind/libunbound/services/listen_dnsport.c
3730
struct doq_stream* c = (struct doq_stream*)key1;
sbin/unwind/libunbound/services/listen_dnsport.c
3732
if(c->stream_id != d->stream_id) {
sbin/unwind/libunbound/services/listen_dnsport.c
3733
if(c->stream_id < d->stream_id)
sbin/unwind/libunbound/services/listen_dnsport.c
4097
struct comm_point* c;
sbin/unwind/libunbound/services/listen_dnsport.c
4108
c = conn->doq_socket->cp;
sbin/unwind/libunbound/services/listen_dnsport.c
4113
if(stream->inlen > sldns_buffer_capacity(c->buffer)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4117
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
4118
sldns_buffer_write(c->buffer, stream->in, stream->inlen);
sbin/unwind/libunbound/services/listen_dnsport.c
4119
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/services/listen_dnsport.c
4120
c->repinfo.c = c;
sbin/unwind/libunbound/services/listen_dnsport.c
4121
if(!doq_conn_key_store_repinfo(&conn->key, &c->repinfo)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4126
c->repinfo.doq_streamid = stream->stream_id;
sbin/unwind/libunbound/services/listen_dnsport.c
4127
c->repinfo.doq_stream = stream;
sbin/unwind/libunbound/services/listen_dnsport.c
4129
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/services/listen_dnsport.c
4130
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4132
if(!doq_stream_send_reply(conn, stream, c->buffer)) {
sbin/unwind/libunbound/services/listen_dnsport.c
5213
doq_conn_start_closing_period(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/services/listen_dnsport.c
5239
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5243
&pi, sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5244
sldns_buffer_remaining(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5259
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
sbin/unwind/libunbound/services/listen_dnsport.c
5260
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5264
conn->close_pkt = memdup(sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5265
sldns_buffer_limit(c->doq_socket->pkt_buf));
sbin/unwind/libunbound/services/listen_dnsport.c
5270
conn->close_pkt_len = sldns_buffer_limit(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5277
doq_conn_send_close(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/services/listen_dnsport.c
5283
if(conn->close_pkt_len > sldns_buffer_capacity(c->doq_socket->pkt_buf))
sbin/unwind/libunbound/services/listen_dnsport.c
5285
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5286
sldns_buffer_write(c->doq_socket->pkt_buf, conn->close_pkt, conn->close_pkt_len);
sbin/unwind/libunbound/services/listen_dnsport.c
5287
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5289
doq_send_pkt(c, &conn->key.paddr, conn->close_ecn);
sbin/unwind/libunbound/services/listen_dnsport.c
5297
doq_conn_close_error(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/services/listen_dnsport.c
5307
if(!doq_conn_start_closing_period(c, conn))
sbin/unwind/libunbound/services/listen_dnsport.c
5320
if(!doq_conn_send_close(c, conn))
sbin/unwind/libunbound/services/listen_dnsport.c
5326
doq_conn_recv(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/services/listen_dnsport.c
5339
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5340
sldns_buffer_limit(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5405
if(!doq_conn_close_error(c, conn)) {
sbin/unwind/libunbound/services/listen_dnsport.c
5424
doq_conn_write_streams(struct comm_point* c, struct doq_conn* conn,
sbin/unwind/libunbound/services/listen_dnsport.c
5477
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5479
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5480
sldns_buffer_remaining(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/services/listen_dnsport.c
5514
if(!doq_conn_close_error(c, conn)) {
sbin/unwind/libunbound/services/listen_dnsport.c
5531
if(!doq_conn_close_error(c, conn)) {
sbin/unwind/libunbound/services/listen_dnsport.c
5552
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
sbin/unwind/libunbound/services/listen_dnsport.c
5553
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/services/listen_dnsport.c
5554
doq_send_pkt(c, &conn->key.paddr, pi.ecn);
sbin/unwind/libunbound/services/listen_dnsport.c
5556
if(c->doq_socket->have_blocked_pkt)
sbin/unwind/libunbound/services/listen_dnsport.h
719
struct doq_conn* doq_conn_create(struct comm_point* c,
sbin/unwind/libunbound/services/listen_dnsport.h
775
int doq_conn_recv(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/services/listen_dnsport.h
780
int doq_conn_write_streams(struct comm_point* c, struct doq_conn* conn,
sbin/unwind/libunbound/services/listen_dnsport.h
784
int doq_conn_send_close(struct comm_point* c, struct doq_conn* conn);
sbin/unwind/libunbound/services/localzone.c
1171
int c = 0;
sbin/unwind/libunbound/services/localzone.c
1176
c++;
sbin/unwind/libunbound/services/localzone.c
1178
if(c) verbose(VERB_ALGO, "applied tags to %d local zones", c);
sbin/unwind/libunbound/services/localzone.c
1675
? (repinfo->c != NULL
sbin/unwind/libunbound/services/localzone.c
1676
? repinfo->c->type == comm_udp
sbin/unwind/libunbound/services/localzone.c
230
int labs, enum localzone_type t, uint16_t c)
sbin/unwind/libunbound/services/localzone.c
232
struct local_zone* z = local_zone_create(nm, len, labs, t, c);
sbin/unwind/libunbound/services/localzone.c
252
z = local_zones_find(zones, nm, len, labs, c);
sbin/unwind/libunbound/services/mesh.c
1097
if(rep->query_reply.c->use_h2)
sbin/unwind/libunbound/services/mesh.c
1172
find_in_subsub(struct mesh_state* m, struct mesh_state* tofind, size_t *c)
sbin/unwind/libunbound/services/mesh.c
1175
if((*c)++ > MESH_MAX_SUBSUB)
sbin/unwind/libunbound/services/mesh.c
1178
if(r->s == tofind || find_in_subsub(r->s, tofind, c))
sbin/unwind/libunbound/services/mesh.c
1422
return r->query_reply.c->type == comm_udp;
sbin/unwind/libunbound/services/mesh.c
1493
if(r->query_reply.c->use_h2) {
sbin/unwind/libunbound/services/mesh.c
1494
r->query_reply.c->h2_stream = r->h2_stream;
sbin/unwind/libunbound/services/mesh.c
1621
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
sbin/unwind/libunbound/services/mesh.c
1622
r->query_reply.c->type, r->query_reply.c->ssl);
sbin/unwind/libunbound/services/mesh.c
1742
struct mesh_cb* c;
sbin/unwind/libunbound/services/mesh.c
1794
if(r->query_reply.c->use_h2)
sbin/unwind/libunbound/services/mesh.c
1833
if(r->query_reply.c->use_h2) {
sbin/unwind/libunbound/services/mesh.c
1843
struct sldns_buffer* r_buffer = r->query_reply.c->buffer;
sbin/unwind/libunbound/services/mesh.c
1844
if(r->query_reply.c->tcp_req_info) {
sbin/unwind/libunbound/services/mesh.c
1845
r_buffer = r->query_reply.c->tcp_req_info->spool_buffer;
sbin/unwind/libunbound/services/mesh.c
1850
if(r->query_reply.c->tcp_req_info) {
sbin/unwind/libunbound/services/mesh.c
1851
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
sbin/unwind/libunbound/services/mesh.c
1894
while((c = mstate->cb_list) != NULL) {
sbin/unwind/libunbound/services/mesh.c
1897
if(!mstate->reply_list && mstate->cb_list && !c->next) {
sbin/unwind/libunbound/services/mesh.c
1902
mstate->cb_list = c->next;
sbin/unwind/libunbound/services/mesh.c
1906
mesh_do_callback(mstate, mstate->s.return_rcode, rep, c, &tv);
sbin/unwind/libunbound/services/mesh.c
2029
if(rep->c->use_h2)
sbin/unwind/libunbound/services/mesh.c
2030
r->h2_stream = rep->c->h2_stream;
sbin/unwind/libunbound/services/mesh.c
2032
if(rep->c->type != comm_doq)
sbin/unwind/libunbound/services/mesh.c
2399
if(n->query_reply.c == cp
sbin/unwind/libunbound/services/mesh.c
2474
struct mesh_cb* c;
sbin/unwind/libunbound/services/mesh.c
2588
if(r->query_reply.c->use_h2)
sbin/unwind/libunbound/services/mesh.c
2623
r_buffer = r->query_reply.c->buffer;
sbin/unwind/libunbound/services/mesh.c
2624
if(r->query_reply.c->tcp_req_info)
sbin/unwind/libunbound/services/mesh.c
2625
r_buffer = r->query_reply.c->tcp_req_info->spool_buffer;
sbin/unwind/libunbound/services/mesh.c
2628
if(r->query_reply.c->tcp_req_info)
sbin/unwind/libunbound/services/mesh.c
2629
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
sbin/unwind/libunbound/services/mesh.c
2663
while((c = mstate->cb_list) != NULL) {
sbin/unwind/libunbound/services/mesh.c
2666
if(!mstate->reply_list && mstate->cb_list && !c->next) {
sbin/unwind/libunbound/services/mesh.c
2671
mstate->cb_list = c->next;
sbin/unwind/libunbound/services/mesh.c
2675
mesh_do_callback(mstate, LDNS_RCODE_NOERROR, msg->rep, c, &tv);
sbin/unwind/libunbound/services/mesh.c
439
struct sldns_buffer* r_buffer = rep->c->buffer;
sbin/unwind/libunbound/services/mesh.c
441
if(rep->c->tcp_req_info) {
sbin/unwind/libunbound/services/mesh.c
442
r_buffer = rep->c->tcp_req_info->spool_buffer;
sbin/unwind/libunbound/services/mesh.c
465
if(!mesh_make_new_space(mesh, rep->c->buffer)) {
sbin/unwind/libunbound/services/mesh.c
468
if(rep->c->use_h2)
sbin/unwind/libunbound/services/mesh.c
469
http2_stream_remove_mesh_state(rep->c->h2_stream);
sbin/unwind/libunbound/services/mesh.c
470
else if(rep->c->type == comm_doq && rep->doq_stream)
sbin/unwind/libunbound/services/mesh.c
483
if(rep->c->use_h2)
sbin/unwind/libunbound/services/mesh.c
484
http2_stream_remove_mesh_state(rep->c->h2_stream);
sbin/unwind/libunbound/services/mesh.c
485
else if(rep->c->type == comm_doq && rep->doq_stream)
sbin/unwind/libunbound/services/mesh.c
551
if(rep->c->tcp_req_info) {
sbin/unwind/libunbound/services/mesh.c
552
if(!tcp_req_info_add_meshstate(rep->c->tcp_req_info, mesh, s)) {
sbin/unwind/libunbound/services/mesh.c
557
if(rep->c->use_h2) {
sbin/unwind/libunbound/services/mesh.c
558
http2_stream_add_meshstate(rep->c->h2_stream, mesh, s);
sbin/unwind/libunbound/services/mesh.c
559
} else if(rep->c->type == comm_doq && rep->doq_stream) {
sbin/unwind/libunbound/services/mesh.c
612
if(rep->c->use_h2)
sbin/unwind/libunbound/services/mesh.c
613
http2_stream_remove_mesh_state(rep->c->h2_stream);
sbin/unwind/libunbound/services/mesh.c
614
else if(rep->c->type == comm_doq && rep->doq_stream)
sbin/unwind/libunbound/services/outside_network.c
101
struct comm_point* c, struct comm_reply* rep);
sbin/unwind/libunbound/services/outside_network.c
1036
comm_point_stop_listening(reuse->pending->c);
sbin/unwind/libunbound/services/outside_network.c
1039
reuse->pending->c->fd, reuse->pending,
sbin/unwind/libunbound/services/outside_network.c
1109
pend->c->tcp_write_pkt == pend->query->pkt &&
sbin/unwind/libunbound/services/outside_network.c
1110
pend->c->tcp_write_pkt_len == pend->query->pkt_len) {
sbin/unwind/libunbound/services/outside_network.c
1119
buf, (int)pend->c->tcp_write_byte_count);
sbin/unwind/libunbound/services/outside_network.c
1121
pend->c->tcp_write_pkt = NULL;
sbin/unwind/libunbound/services/outside_network.c
1122
pend->c->tcp_write_pkt_len = 0;
sbin/unwind/libunbound/services/outside_network.c
1123
pend->c->tcp_write_and_read = 0;
sbin/unwind/libunbound/services/outside_network.c
1126
pend->c->tcp_is_reading = 1;
sbin/unwind/libunbound/services/outside_network.c
1251
if(pend->c->ssl) {
sbin/unwind/libunbound/services/outside_network.c
1253
SSL_shutdown(pend->c->ssl);
sbin/unwind/libunbound/services/outside_network.c
1254
SSL_free(pend->c->ssl);
sbin/unwind/libunbound/services/outside_network.c
1255
pend->c->ssl = NULL;
sbin/unwind/libunbound/services/outside_network.c
1258
comm_point_close(pend->c);
sbin/unwind/libunbound/services/outside_network.c
1327
comm_point_start_listening(pend_tcp->c, -1, tcp_reuse_timeout);
sbin/unwind/libunbound/services/outside_network.c
1335
sldns_buffer_clear(pend_tcp->c->buffer);
sbin/unwind/libunbound/services/outside_network.c
1336
pend_tcp->c->tcp_is_reading = 1;
sbin/unwind/libunbound/services/outside_network.c
1337
pend_tcp->c->tcp_byte_count = 0;
sbin/unwind/libunbound/services/outside_network.c
1338
comm_point_stop_listening(pend_tcp->c);
sbin/unwind/libunbound/services/outside_network.c
1339
comm_point_start_listening(pend_tcp->c, -1, tcp_reuse_timeout);
sbin/unwind/libunbound/services/outside_network.c
1343
outnet_tcp_cb(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.c
1352
if(pend->c->tcp_write_and_read) {
sbin/unwind/libunbound/services/outside_network.c
1369
log_assert(c == pend->c);
sbin/unwind/libunbound/services/outside_network.c
1370
log_assert(pend->query->pkt == pend->c->tcp_write_pkt);
sbin/unwind/libunbound/services/outside_network.c
1371
log_assert(pend->query->pkt_len == pend->c->tcp_write_pkt_len);
sbin/unwind/libunbound/services/outside_network.c
1372
pend->c->tcp_write_pkt = NULL;
sbin/unwind/libunbound/services/outside_network.c
1373
pend->c->tcp_write_pkt_len = 0;
sbin/unwind/libunbound/services/outside_network.c
1386
comm_point_stop_listening(pend->c);
sbin/unwind/libunbound/services/outside_network.c
1387
outnet_tcp_take_query_setup(pend->c->fd, pend,
sbin/unwind/libunbound/services/outside_network.c
1391
pend->c->tcp_write_and_read = 0;
sbin/unwind/libunbound/services/outside_network.c
1394
pend->c->tcp_is_reading = 1;
sbin/unwind/libunbound/services/outside_network.c
1395
comm_point_stop_listening(pend->c);
sbin/unwind/libunbound/services/outside_network.c
1405
if(sldns_buffer_limit(c->buffer) < sizeof(uint16_t)) {
sbin/unwind/libunbound/services/outside_network.c
1412
c->buffer));
sbin/unwind/libunbound/services/outside_network.c
1442
error, (int)sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/services/outside_network.c
1443
waiting_tcp_callback(w, c, error, reply_info);
sbin/unwind/libunbound/services/outside_network.c
1528
outnet_udp_cb(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.c
1540
if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
sbin/unwind/libunbound/services/outside_network.c
1547
key.id = (unsigned)LDNS_ID_WIRE(sldns_buffer_begin(c->buffer));
sbin/unwind/libunbound/services/outside_network.c
1559
log_buf(VERB_ALGO, "dropped message", c->buffer);
sbin/unwind/libunbound/services/outside_network.c
1576
log_buf(VERB_ALGO, "udp message", c->buffer);
sbin/unwind/libunbound/services/outside_network.c
1577
if(p->pc->cp != c) {
sbin/unwind/libunbound/services/outside_network.c
1688
outnet->tcp_conns[i]->c = comm_point_create_tcp_out(
sbin/unwind/libunbound/services/outside_network.c
1691
if(!outnet->tcp_conns[i]->c)
sbin/unwind/libunbound/services/outside_network.c
1972
comm_point_delete(outnet->tcp_conns[i]->c);
sbin/unwind/libunbound/services/outside_network.c
2578
comm_point_stop_listening(pend->c);
sbin/unwind/libunbound/services/outside_network.c
2580
outnet_tcp_take_query_setup(pend->c->fd, pend,
sbin/unwind/libunbound/services/outside_network.c
2783
if(pend_tcp->c->fd == -1) {
sbin/unwind/libunbound/services/outside_network.c
2797
if(pend_tcp->c->fd != -1 && sq->outnet->tcp_reuse.count <
sbin/unwind/libunbound/services/outside_network.c
3061
serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
sbin/unwind/libunbound/services/outside_network.c
3080
if(sq->outnet->use_caps_for_id && error == NETEVENT_NOERROR && c &&
sbin/unwind/libunbound/services/outside_network.c
3086
if(sldns_buffer_read_u16_at(c->buffer, 4) == 0 &&
sbin/unwind/libunbound/services/outside_network.c
3087
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
sbin/unwind/libunbound/services/outside_network.c
3089
LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
sbin/unwind/libunbound/services/outside_network.c
3094
log_buf(VERB_DETAIL, "for packet", c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3096
c = NULL;
sbin/unwind/libunbound/services/outside_network.c
3097
} else if(sldns_buffer_read_u16_at(c->buffer, 4) > 0 &&
sbin/unwind/libunbound/services/outside_network.c
3098
!serviced_check_qname(c->buffer, sq->qbuf,
sbin/unwind/libunbound/services/outside_network.c
3103
log_buf(VERB_DETAIL, "for packet", c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3106
pkt_dname_tolower(c->buffer,
sbin/unwind/libunbound/services/outside_network.c
3107
sldns_buffer_at(c->buffer, 12));
sbin/unwind/libunbound/services/outside_network.c
3111
pkt_dname_tolower(c->buffer,
sbin/unwind/libunbound/services/outside_network.c
3112
sldns_buffer_at(c->buffer, 12));
sbin/unwind/libunbound/services/outside_network.c
3115
if(dobackup && c) {
sbin/unwind/libunbound/services/outside_network.c
3120
backlen = sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3122
sldns_buffer_begin(c->buffer), backlen);
sbin/unwind/libunbound/services/outside_network.c
3126
c = NULL;
sbin/unwind/libunbound/services/outside_network.c
3133
if(dobackup && c) {
sbin/unwind/libunbound/services/outside_network.c
3134
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3135
sldns_buffer_write(c->buffer, backup_p, backlen);
sbin/unwind/libunbound/services/outside_network.c
3136
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3139
(void)(*p->cb)(c, p->cb_arg, error, rep);
sbin/unwind/libunbound/services/outside_network.c
3150
serviced_tcp_callback(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.c
3181
&pi->addr, c->type, c->ssl, sq->zone, sq->zonelen, sq->qbuf,
sbin/unwind/libunbound/services/outside_network.c
3183
c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3187
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
sbin/unwind/libunbound/services/outside_network.c
3189
c->buffer)) == LDNS_RCODE_NOTIMPL) ) {
sbin/unwind/libunbound/services/outside_network.c
3192
serviced_tcp_initiate(sq, c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3196
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
sbin/unwind/libunbound/services/outside_network.c
3198
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NXDOMAIN
sbin/unwind/libunbound/services/outside_network.c
3199
|| LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
sbin/unwind/libunbound/services/outside_network.c
3240
r2.c = c;
sbin/unwind/libunbound/services/outside_network.c
3244
serviced_callbacks(sq, error, c, rep);
sbin/unwind/libunbound/services/outside_network.c
3338
serviced_udp_callback(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.c
3356
if(!serviced_udp_send(sq, c->buffer)) {
sbin/unwind/libunbound/services/outside_network.c
3357
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
sbin/unwind/libunbound/services/outside_network.c
3373
if(!serviced_udp_send(sq, c->buffer)) {
sbin/unwind/libunbound/services/outside_network.c
3374
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
sbin/unwind/libunbound/services/outside_network.c
3381
serviced_callbacks(sq, error, c, rep);
sbin/unwind/libunbound/services/outside_network.c
3395
&p->pc->pif->addr, c->type, c->ssl, sq->zone, sq->zonelen,
sbin/unwind/libunbound/services/outside_network.c
3397
sq->outnet->now_tv, c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3402
&& (LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
sbin/unwind/libunbound/services/outside_network.c
3404
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOTIMPL
sbin/unwind/libunbound/services/outside_network.c
3405
|| packet_edns_malformed(c->buffer, sq->qtype)
sbin/unwind/libunbound/services/outside_network.c
3411
if(!serviced_udp_send(sq, c->buffer)) {
sbin/unwind/libunbound/services/outside_network.c
3412
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
sbin/unwind/libunbound/services/outside_network.c
3427
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOERROR ||
sbin/unwind/libunbound/services/outside_network.c
3428
LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
sbin/unwind/libunbound/services/outside_network.c
3430
c->buffer)) == LDNS_RCODE_YXDOMAIN)) {
sbin/unwind/libunbound/services/outside_network.c
3467
if(LDNS_TC_WIRE(sldns_buffer_begin(c->buffer))) {
sbin/unwind/libunbound/services/outside_network.c
3476
serviced_tcp_initiate(sq, c->buffer);
sbin/unwind/libunbound/services/outside_network.c
3480
serviced_callbacks(sq, error, c, rep);
sbin/unwind/libunbound/services/outside_network.c
390
if(!reuse || !reuse->pending || !reuse->pending->c)
sbin/unwind/libunbound/services/outside_network.c
395
reuse->pending->c->fd);
sbin/unwind/libunbound/services/outside_network.c
3988
s += comm_point_get_mem(outnet->tcp_conns[i]->c);
sbin/unwind/libunbound/services/outside_network.c
552
struct comm_point c;
sbin/unwind/libunbound/services/outside_network.c
557
memset(&c, 0, sizeof(c));
sbin/unwind/libunbound/services/outside_network.c
559
key_p.c = &c;
sbin/unwind/libunbound/services/outside_network.c
641
pend->c->tcp_write_pkt = w->pkt;
sbin/unwind/libunbound/services/outside_network.c
642
pend->c->tcp_write_pkt_len = w->pkt_len;
sbin/unwind/libunbound/services/outside_network.c
643
pend->c->tcp_write_and_read = 1;
sbin/unwind/libunbound/services/outside_network.c
644
pend->c->tcp_write_byte_count = 0;
sbin/unwind/libunbound/services/outside_network.c
645
pend->c->tcp_is_reading = 0;
sbin/unwind/libunbound/services/outside_network.c
646
comm_point_start_listening(pend->c, s, -1);
sbin/unwind/libunbound/services/outside_network.c
671
pend->c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/services/outside_network.c
672
pend->c->tcp_do_close = 0;
sbin/unwind/libunbound/services/outside_network.c
717
pend->c->tcp_do_fastopen = 1;
sbin/unwind/libunbound/services/outside_network.c
754
pend->c->ssl = outgoing_ssl_fd(w->outnet->sslctx, s);
sbin/unwind/libunbound/services/outside_network.c
755
if(!pend->c->ssl) {
sbin/unwind/libunbound/services/outside_network.c
756
pend->c->fd = s;
sbin/unwind/libunbound/services/outside_network.c
757
comm_point_close(pend->c);
sbin/unwind/libunbound/services/outside_network.c
763
comm_point_tcp_win_bio_cb(pend->c, pend->c->ssl);
sbin/unwind/libunbound/services/outside_network.c
765
pend->c->ssl_shake_state = comm_ssl_shake_write;
sbin/unwind/libunbound/services/outside_network.c
772
pend->c->fd = s;
sbin/unwind/libunbound/services/outside_network.c
774
SSL_free(pend->c->ssl);
sbin/unwind/libunbound/services/outside_network.c
776
pend->c->ssl = NULL;
sbin/unwind/libunbound/services/outside_network.c
777
comm_point_close(pend->c);
sbin/unwind/libunbound/services/outside_network.c
781
if(!set_auth_name_on_ssl(pend->c->ssl, tls_auth_name,
sbin/unwind/libunbound/services/outside_network.c
783
pend->c->fd = s;
sbin/unwind/libunbound/services/outside_network.c
785
SSL_free(pend->c->ssl);
sbin/unwind/libunbound/services/outside_network.c
787
pend->c->ssl = NULL;
sbin/unwind/libunbound/services/outside_network.c
788
comm_point_close(pend->c);
sbin/unwind/libunbound/services/outside_network.c
799
pend->c->repinfo.remote_addrlen = w->addrlen;
sbin/unwind/libunbound/services/outside_network.c
800
pend->c->tcp_more_read_again = &pend->reuse.cp_more_read_again;
sbin/unwind/libunbound/services/outside_network.c
801
pend->c->tcp_more_write_again = &pend->reuse.cp_more_write_again;
sbin/unwind/libunbound/services/outside_network.c
804
memcpy(&pend->c->repinfo.remote_addr, &w->addr, w->addrlen);
sbin/unwind/libunbound/services/outside_network.c
814
if(pend->c->ssl) {
sbin/unwind/libunbound/services/outside_network.c
992
waiting_tcp_callback(struct waiting_tcp* w, struct comm_point* c, int error,
sbin/unwind/libunbound/services/outside_network.c
997
(void)(*w->cb)(c, w->cb_arg, error, reply_info);
sbin/unwind/libunbound/services/outside_network.h
401
struct comm_point* c;
sbin/unwind/libunbound/services/outside_network.h
908
int outnet_udp_cb(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.h
912
int outnet_tcp_cb(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.h
928
int serviced_udp_callback(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/outside_network.h
932
int serviced_tcp_callback(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/services/rpz.c
1766
? (repinfo->c != NULL
sbin/unwind/libunbound/services/rpz.c
1767
? repinfo->c->type == comm_udp
sbin/unwind/libunbound/sldns/parse.c
124
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
131
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
135
if (c == '\n' && p != 0 && t > token) {
sbin/unwind/libunbound/sldns/parse.c
145
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
151
if (c == *d)
sbin/unwind/libunbound/sldns/parse.c
155
if (c == *d && i > 0 && prev_c != '\\' && p == 0) {
sbin/unwind/libunbound/sldns/parse.c
156
if (c == '\n' && line_nr) {
sbin/unwind/libunbound/sldns/parse.c
166
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
171
if (c != ' ' && c != '\t') {
sbin/unwind/libunbound/sldns/parse.c
175
if (c != '\0' && c != '\n') {
sbin/unwind/libunbound/sldns/parse.c
183
if (c != '\0' && c != '\n') {
sbin/unwind/libunbound/sldns/parse.c
184
*t++ = c;
sbin/unwind/libunbound/sldns/parse.c
186
if (c == '\n') {
sbin/unwind/libunbound/sldns/parse.c
194
if (c == '\\' && prev_c == '\\')
sbin/unwind/libunbound/sldns/parse.c
196
else prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
199
if (c == EOF) {
sbin/unwind/libunbound/sldns/parse.c
289
int c, lc;
sbin/unwind/libunbound/sldns/parse.c
315
while ((c = sldns_bgetc(b)) != EOF) {
sbin/unwind/libunbound/sldns/parse.c
316
if (c == '\r') /* carriage return */
sbin/unwind/libunbound/sldns/parse.c
317
c = ' ';
sbin/unwind/libunbound/sldns/parse.c
318
if (c == '(' && lc != '\\' && !quoted) {
sbin/unwind/libunbound/sldns/parse.c
324
lc = c;
sbin/unwind/libunbound/sldns/parse.c
328
if (c == ')' && lc != '\\' && !quoted) {
sbin/unwind/libunbound/sldns/parse.c
334
lc = c;
sbin/unwind/libunbound/sldns/parse.c
345
if (c == ';' && quoted == 0) {
sbin/unwind/libunbound/sldns/parse.c
35
int c, prev_c;
sbin/unwind/libunbound/sldns/parse.c
350
if (c == '"' && com == 0 && lc != '\\') {
sbin/unwind/libunbound/sldns/parse.c
354
if (c == '\n' && com != 0) {
sbin/unwind/libunbound/sldns/parse.c
358
lc = c;
sbin/unwind/libunbound/sldns/parse.c
364
lc = c;
sbin/unwind/libunbound/sldns/parse.c
368
if (c == '\n' && p != 0) {
sbin/unwind/libunbound/sldns/parse.c
371
if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) {
sbin/unwind/libunbound/sldns/parse.c
379
lc = c;
sbin/unwind/libunbound/sldns/parse.c
385
if(strchr(skipw, c)) {
sbin/unwind/libunbound/sldns/parse.c
386
lc = c;
sbin/unwind/libunbound/sldns/parse.c
394
if (c == *d && lc != '\\' && (p == 0 || par)) {
sbin/unwind/libunbound/sldns/parse.c
404
*t++ = c;
sbin/unwind/libunbound/sldns/parse.c
406
if (c == '\\' && lc == '\\') {
sbin/unwind/libunbound/sldns/parse.c
409
lc = c;
sbin/unwind/libunbound/sldns/parse.c
441
char c;
sbin/unwind/libunbound/sldns/parse.c
445
c = (char) sldns_buffer_read_u8_at(buffer, buffer->_position);
sbin/unwind/libunbound/sldns/parse.c
448
if (*d == c) {
sbin/unwind/libunbound/sldns/parse.c
470
int c;
sbin/unwind/libunbound/sldns/parse.c
473
while ((c = fgetc(fp)) != EOF) {
sbin/unwind/libunbound/sldns/parse.c
474
if (line_nr && c == '\n') {
sbin/unwind/libunbound/sldns/parse.c
479
if (*d == c) {
sbin/unwind/libunbound/sldns/parse.c
485
ungetc(c, fp);
sbin/unwind/libunbound/sldns/parse.c
61
while ((c = getc(f)) != EOF) {
sbin/unwind/libunbound/sldns/parse.c
62
if (c == '\r') /* carriage return */
sbin/unwind/libunbound/sldns/parse.c
63
c = ' ';
sbin/unwind/libunbound/sldns/parse.c
64
if (c == '(' && prev_c != '\\' && !quoted) {
sbin/unwind/libunbound/sldns/parse.c
69
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
73
if (c == ')' && prev_c != '\\' && !quoted) {
sbin/unwind/libunbound/sldns/parse.c
78
prev_c = c;
sbin/unwind/libunbound/sldns/parse.c
89
if (c == ';' && quoted == 0) {
sbin/unwind/libunbound/sldns/parse.c
94
if (c == '\"' && com == 0 && prev_c != '\\') {
sbin/unwind/libunbound/sldns/parse.c
98
if (c == '\n' && com != 0) {
sbin/unwind/libunbound/sldns/parseutil.c
384
size_t c = 0; /* c is used to carry partial base32 character over
sbin/unwind/libunbound/sldns/parseutil.c
438
c = src[3] >> 7 ;
sbin/unwind/libunbound/sldns/parseutil.c
441
case 3: dst[4] = b32[(src[2] & 0x0f) << 1 | c];
sbin/unwind/libunbound/sldns/parseutil.c
444
c = src[2] >> 4 ;
sbin/unwind/libunbound/sldns/parseutil.c
447
case 2: dst[3] = b32[(src[1] & 0x01) << 4 | c];
sbin/unwind/libunbound/sldns/parseutil.c
453
c = src[1] >> 6 ;
sbin/unwind/libunbound/sldns/parseutil.c
456
case 1: dst[1] = b32[(src[0] & 0x07) << 2 | c];
sbin/unwind/libunbound/sldns/sbuffer.h
448
sldns_buffer_set_at(sldns_buffer *buffer, size_t at, int c, size_t count)
sbin/unwind/libunbound/sldns/sbuffer.h
451
memset(buffer->_data + at, c, count);
sbin/unwind/libunbound/sldns/str2wire.c
2082
uint16_t c = sldns_get_rr_class_by_name(str);
sbin/unwind/libunbound/sldns/str2wire.c
2083
if(c == 0 && strcmp(str, "CLASS0") != 0)
sbin/unwind/libunbound/sldns/str2wire.c
2087
sldns_write_uint16(rd, c);
sbin/unwind/libunbound/sldns/str2wire.c
2718
unsigned int a, b, c, d;
sbin/unwind/libunbound/sldns/str2wire.c
2724
if (sscanf(str, "%4x:%4x:%4x:%4x%n", &a, &b, &c, &d, &l) != 4 ||
sbin/unwind/libunbound/sldns/str2wire.c
2731
shorts[2] = htons(c);
sbin/unwind/libunbound/sldns/str2wire.c
2740
unsigned int a, b, c, d, e, f;
sbin/unwind/libunbound/sldns/str2wire.c
2746
&a, &b, &c, &d, &e, &f, &l) != 6 ||
sbin/unwind/libunbound/sldns/str2wire.c
2751
rd[2] = c;
sbin/unwind/libunbound/sldns/str2wire.c
2761
unsigned int a, b, c, d, e, f, g, h;
sbin/unwind/libunbound/sldns/str2wire.c
2767
&a, &b, &c, &d, &e, &f, &g, &h, &l) != 8 ||
sbin/unwind/libunbound/sldns/str2wire.c
2772
rd[2] = c;
sbin/unwind/libunbound/sldns/str2wire.c
462
ssize_t c = sldns_bget_token(strbuf, token, delim, token_len);
sbin/unwind/libunbound/sldns/str2wire.c
467
if(c == -1) {
sbin/unwind/libunbound/sldns/wire2str.c
1458
static int str_char_print(char** s, size_t* sl, uint8_t c)
sbin/unwind/libunbound/sldns/wire2str.c
1460
if(isprint((unsigned char)c) || c == '\t') {
sbin/unwind/libunbound/sldns/wire2str.c
1461
if(c == '\"' || c == '\\')
sbin/unwind/libunbound/sldns/wire2str.c
1462
return sldns_str_print(s, sl, "\\%c", c);
sbin/unwind/libunbound/sldns/wire2str.c
1464
**s = (char)c;
sbin/unwind/libunbound/sldns/wire2str.c
1470
return sldns_str_print(s, sl, "\\%03u", (unsigned)c);
sbin/unwind/libunbound/sldns/wire2str.c
491
uint16_t t, c;
sbin/unwind/libunbound/sldns/wire2str.c
499
c = sldns_read_uint16((*d)+2);
sbin/unwind/libunbound/sldns/wire2str.c
502
w += sldns_wire2str_class_print(s, sl, c);
sbin/unwind/libunbound/sldns/wire2str.c
511
c = sldns_read_uint16((*d)+2);
sbin/unwind/libunbound/sldns/wire2str.c
516
w += sldns_wire2str_class_print(s, sl, c);
sbin/unwind/libunbound/sldns/wire2str.c
544
uint16_t c = sldns_read_uint16((*d)+2);
sbin/unwind/libunbound/sldns/wire2str.c
547
w += sldns_wire2str_class_print(s, slen, c);
sbin/unwind/libunbound/sldns/wire2str.c
597
uint16_t t, c;
sbin/unwind/libunbound/sldns/wire2str.c
607
c = sldns_read_uint16((*d)+2);
sbin/unwind/libunbound/sldns/wire2str.c
610
w += sldns_wire2str_class_print(s, slen, c);
sbin/unwind/libunbound/sldns/wire2str.c
836
static int dname_char_print(char** s, size_t* slen, uint8_t c)
sbin/unwind/libunbound/sldns/wire2str.c
838
if(c == '.' || c == ';' || c == '(' || c == ')' || c == '\\')
sbin/unwind/libunbound/sldns/wire2str.c
839
return sldns_str_print(s, slen, "\\%c", c);
sbin/unwind/libunbound/sldns/wire2str.c
840
else if(!(isascii((unsigned char)c) && isgraph((unsigned char)c)))
sbin/unwind/libunbound/sldns/wire2str.c
841
return sldns_str_print(s, slen, "\\%03u", (unsigned)c);
sbin/unwind/libunbound/sldns/wire2str.c
844
**s = (char)c;
sbin/unwind/libunbound/sldns/wire2str.c
993
uint16_t c;
sbin/unwind/libunbound/sldns/wire2str.c
996
c = sldns_read_uint16(*d);
sbin/unwind/libunbound/sldns/wire2str.c
999
return sldns_wire2str_class_print(s, slen, c);
sbin/unwind/libunbound/util/alloc.h
215
# define sldns_rr_class2str(c) unbound_lite_wrapstr(sldns_rr_class2str(c))
sbin/unwind/libunbound/util/configlexer.c
125
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
sbin/unwind/libunbound/util/configlexer.c
192
#define unput(c) yyunput( c, (yytext_ptr) )
sbin/unwind/libunbound/util/configlexer.c
3918
int c = '*'; \
sbin/unwind/libunbound/util/configlexer.c
3921
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
sbin/unwind/libunbound/util/configlexer.c
3922
buf[n] = (char) c; \
sbin/unwind/libunbound/util/configlexer.c
3923
if ( c == '\n' ) \
sbin/unwind/libunbound/util/configlexer.c
3924
buf[n++] = (char) c; \
sbin/unwind/libunbound/util/configlexer.c
3925
if ( c == EOF && ferror( yyin ) ) \
sbin/unwind/libunbound/util/configlexer.c
6651
int c;
sbin/unwind/libunbound/util/configlexer.c
6709
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
sbin/unwind/libunbound/util/configlexer.c
6713
return c;
sbin/unwind/libunbound/util/data/dname.c
807
int c = memlowercmp(p1, p2, min);
sbin/unwind/libunbound/util/data/dname.c
808
if(c != 0)
sbin/unwind/libunbound/util/data/dname.c
809
return c;
sbin/unwind/libunbound/util/data/dname.c
829
int c;
sbin/unwind/libunbound/util/data/dname.c
856
if((c=memcanoncmp(d1, len1, d2, len2)) != 0) {
sbin/unwind/libunbound/util/data/dname.c
857
if(c<0)
sbin/unwind/libunbound/util/data/msgencode.c
115
int c, n, closen=0;
sbin/unwind/libunbound/util/data/msgencode.c
120
if((c = dname_lab_cmp(dname, labs, p->dname, p->labs, &n))
sbin/unwind/libunbound/util/data/msgencode.c
126
if(c<0) {
sbin/unwind/libunbound/util/data/msgencode.c
489
const sldns_rr_descriptor* c = type_rdata_compressible(key);
sbin/unwind/libunbound/util/data/msgencode.c
511
if(c) {
sbin/unwind/libunbound/util/data/msgencode.c
513
data->rr_len[j], region, tree, c,
sbin/unwind/libunbound/util/data/msgparse.c
1019
if (!cfg || !cfg->do_tcp_keepalive || !c ||
sbin/unwind/libunbound/util/data/msgparse.c
1020
c->type == comm_udp || c->tcp_keepalive)
sbin/unwind/libunbound/util/data/msgparse.c
1027
c->tcp_timeout_msec / 100,
sbin/unwind/libunbound/util/data/msgparse.c
1032
c->tcp_keepalive = 1;
sbin/unwind/libunbound/util/data/msgparse.c
1037
!c || c->type != comm_tcp ||!c->ssl || padding_seen)
sbin/unwind/libunbound/util/data/msgparse.c
1282
struct config_file* cfg, struct comm_point* c,
sbin/unwind/libunbound/util/data/msgparse.c
1330
c, repinfo, now, region, cookie_secrets);
sbin/unwind/libunbound/util/data/msgparse.c
954
struct edns_data* edns, struct config_file* cfg, struct comm_point* c,
sbin/unwind/libunbound/util/data/msgparse.c
968
if (cfg && cfg->do_tcp_keepalive && c && c->type != comm_udp && c->tcp_keepalive) {
sbin/unwind/libunbound/util/data/msgparse.c
970
c->tcp_timeout_msec / 100, region)) {
sbin/unwind/libunbound/util/data/msgparse.h
358
struct config_file* cfg, struct comm_point* c,
sbin/unwind/libunbound/util/data/packed_rrset.c
112
if((c=query_dname_compare(key1->rk.dname, key2->rk.dname)) != 0)
sbin/unwind/libunbound/util/data/packed_rrset.c
113
return c;
sbin/unwind/libunbound/util/data/packed_rrset.c
99
int c;
sbin/unwind/libunbound/util/edns.c
103
for(c=config->edns_client_strings; c; c=c->next) {
sbin/unwind/libunbound/util/edns.c
107
log_assert(c->str && c->str2);
sbin/unwind/libunbound/util/edns.c
109
if(!netblockstrtoaddr(c->str, UNBOUND_DNS_PORT, &addr, &addrlen,
sbin/unwind/libunbound/util/edns.c
112
"%s", c->str);
sbin/unwind/libunbound/util/edns.c
116
net, c->str2)) {
sbin/unwind/libunbound/util/edns.c
99
struct config_str2list* c;
sbin/unwind/libunbound/util/module.c
139
char t[16], c[16];
sbin/unwind/libunbound/util/module.c
141
sldns_wire2str_class_buf(qstate->qinfo.qclass, c, sizeof(c));
sbin/unwind/libunbound/util/module.c
143
snprintf(p, left, "validation failure <%s %s %s>:", dname, t, c);
sbin/unwind/libunbound/util/module.c
182
char t[16], c[16];
sbin/unwind/libunbound/util/module.c
184
sldns_wire2str_class_buf(qstate->qinfo.qclass, c, sizeof(c));
sbin/unwind/libunbound/util/module.c
186
snprintf(p, left, "SERVFAIL <%s %s %s>:", dname, t, c);
sbin/unwind/libunbound/util/module.c
222
char t[16], c[16];
sbin/unwind/libunbound/util/module.c
226
sldns_wire2str_class_buf(ntohs(rr->rk.rrset_class), c, sizeof(c));
sbin/unwind/libunbound/util/module.c
228
snprintf(buf, sizeof(buf), "for <%s %s %s>", dname, t, c);
sbin/unwind/libunbound/util/net_help.c
557
char t[12], c[12];
sbin/unwind/libunbound/util/net_help.c
578
snprintf(c, sizeof(c), "CLASS%d", (int)dclass);
sbin/unwind/libunbound/util/net_help.c
579
cs = c;
sbin/unwind/libunbound/util/net_help.c
588
char t[12], c[12];
sbin/unwind/libunbound/util/net_help.c
607
snprintf(c, sizeof(c), "CLASS%d", (int)dclass);
sbin/unwind/libunbound/util/net_help.c
608
cs = c;
sbin/unwind/libunbound/util/netevent.c
1013
rep.c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
1014
log_assert(rep.c->type == comm_udp);
sbin/unwind/libunbound/util/netevent.c
1018
log_assert(rep.c && rep.c->buffer && rep.c->fd == fd);
sbin/unwind/libunbound/util/netevent.c
1019
ub_comm_base_now(rep.c->ev->base);
sbin/unwind/libunbound/util/netevent.c
1021
sldns_buffer_clear(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1022
timeval_clear(&rep.c->recv_tv);
sbin/unwind/libunbound/util/netevent.c
1025
log_assert(sldns_buffer_remaining(rep.c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
1028
iov[0].iov_base = sldns_buffer_begin(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1029
iov[0].iov_len = sldns_buffer_remaining(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1046
sldns_buffer_skip(rep.c->buffer, rcv);
sbin/unwind/libunbound/util/netevent.c
1047
sldns_buffer_flip(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1078
TIMESPEC_TO_TIMEVAL(&rep.c->recv_tv, ts);
sbin/unwind/libunbound/util/netevent.c
1082
TIMESPEC_TO_TIMEVAL(&rep.c->recv_tv, ts);
sbin/unwind/libunbound/util/netevent.c
1085
memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval));
sbin/unwind/libunbound/util/netevent.c
1090
memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval));
sbin/unwind/libunbound/util/netevent.c
1099
if(rep.c->pp2_enabled && !consume_pp2_header(rep.c->buffer,
sbin/unwind/libunbound/util/netevent.c
1110
fptr_ok(fptr_whitelist_comm_point(rep.c->callback));
sbin/unwind/libunbound/util/netevent.c
1111
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
sbin/unwind/libunbound/util/netevent.c
1115
buffer = rep.c->dnscrypt_buffer;
sbin/unwind/libunbound/util/netevent.c
1117
buffer = rep.c->buffer;
sbin/unwind/libunbound/util/netevent.c
1119
(void)comm_point_send_udp_msg_if(rep.c, buffer,
sbin/unwind/libunbound/util/netevent.c
1123
if(!rep.c || rep.c->fd == -1) /* commpoint closed */
sbin/unwind/libunbound/util/netevent.c
1137
rep.c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
1138
log_assert(rep.c->type == comm_udp);
sbin/unwind/libunbound/util/netevent.c
1142
log_assert(rep.c && rep.c->buffer && rep.c->fd == fd);
sbin/unwind/libunbound/util/netevent.c
1143
ub_comm_base_now(rep.c->ev->base);
sbin/unwind/libunbound/util/netevent.c
1145
sldns_buffer_clear(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1148
log_assert(sldns_buffer_remaining(rep.c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
1149
rcv = recvfrom(fd, (void*)sldns_buffer_begin(rep.c->buffer),
sbin/unwind/libunbound/util/netevent.c
1150
sldns_buffer_remaining(rep.c->buffer), MSG_DONTWAIT,
sbin/unwind/libunbound/util/netevent.c
1168
sldns_buffer_skip(rep.c->buffer, rcv);
sbin/unwind/libunbound/util/netevent.c
1169
sldns_buffer_flip(rep.c->buffer);
sbin/unwind/libunbound/util/netevent.c
1173
if(rep.c->pp2_enabled && !consume_pp2_header(rep.c->buffer,
sbin/unwind/libunbound/util/netevent.c
1184
fptr_ok(fptr_whitelist_comm_point(rep.c->callback));
sbin/unwind/libunbound/util/netevent.c
1185
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
sbin/unwind/libunbound/util/netevent.c
1188
buffer = rep.c->dnscrypt_buffer;
sbin/unwind/libunbound/util/netevent.c
1190
buffer = rep.c->buffer;
sbin/unwind/libunbound/util/netevent.c
1192
(void)comm_point_send_udp_msg(rep.c, buffer,
sbin/unwind/libunbound/util/netevent.c
1196
if(!rep.c || rep.c->fd != fd) /* commpoint closed to -1 or reused for
sbin/unwind/libunbound/util/netevent.c
1328
doq_store_blocked_pkt(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1331
if(c->doq_socket->have_blocked_pkt)
sbin/unwind/libunbound/util/netevent.c
1334
if(sldns_buffer_limit(c->doq_socket->pkt_buf) >
sbin/unwind/libunbound/util/netevent.c
1335
sldns_buffer_capacity(c->doq_socket->blocked_pkt))
sbin/unwind/libunbound/util/netevent.c
1338
c->doq_socket->have_blocked_pkt = 1;
sbin/unwind/libunbound/util/netevent.c
1339
c->doq_socket->blocked_pkt_pi.ecn = ecn;
sbin/unwind/libunbound/util/netevent.c
1340
memcpy(c->doq_socket->blocked_paddr, paddr,
sbin/unwind/libunbound/util/netevent.c
1341
sizeof(*c->doq_socket->blocked_paddr));
sbin/unwind/libunbound/util/netevent.c
1342
sldns_buffer_clear(c->doq_socket->blocked_pkt);
sbin/unwind/libunbound/util/netevent.c
1343
sldns_buffer_write(c->doq_socket->blocked_pkt,
sbin/unwind/libunbound/util/netevent.c
1344
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1345
sldns_buffer_limit(c->doq_socket->pkt_buf));
sbin/unwind/libunbound/util/netevent.c
1346
sldns_buffer_flip(c->doq_socket->blocked_pkt);
sbin/unwind/libunbound/util/netevent.c
1350
doq_send_pkt(struct comm_point* c, struct doq_pkt_addr* paddr, uint32_t ecn)
sbin/unwind/libunbound/util/netevent.c
1359
iov[0].iov_base = sldns_buffer_begin(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1360
iov[0].iov_len = sldns_buffer_limit(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1374
doq_set_ecn(c->fd, paddr->addr.sockaddr.in.sin_family, ecn);
sbin/unwind/libunbound/util/netevent.c
1377
ret = sendmsg(c->fd, &msg, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
1396
doq_store_blocked_pkt(c, paddr, ecn);
sbin/unwind/libunbound/util/netevent.c
1415
} else if(ret != (ssize_t)sldns_buffer_limit(c->doq_socket->pkt_buf)) {
sbin/unwind/libunbound/util/netevent.c
1422
(int)sldns_buffer_limit(c->doq_socket->pkt_buf));
sbin/unwind/libunbound/util/netevent.c
1426
(int)ret, (int)sldns_buffer_limit(c->doq_socket->pkt_buf));
sbin/unwind/libunbound/util/netevent.c
1448
doq_get_localaddr_cmsg(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1474
(void*)c->socket->addr));
sbin/unwind/libunbound/util/netevent.c
1496
(void*)c->socket->addr));
sbin/unwind/libunbound/util/netevent.c
1516
(void*)c->socket->addr));
sbin/unwind/libunbound/util/netevent.c
1565
doq_recv(struct comm_point* c, struct doq_pkt_addr* paddr, int* pkt_continue,
sbin/unwind/libunbound/util/netevent.c
1578
iov[0].iov_base = sldns_buffer_begin(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1579
iov[0].iov_len = sldns_buffer_remaining(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1588
rcv = recvmsg(c->fd, &msg, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
1599
sldns_buffer_skip(c->doq_socket->pkt_buf, rcv);
sbin/unwind/libunbound/util/netevent.c
1600
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1601
if(!doq_get_localaddr_cmsg(c, paddr, pkt_continue, &msg))
sbin/unwind/libunbound/util/netevent.c
1610
doq_send_version_negotiation(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1622
unused_random = ub_random_max(c->doq_socket->rnd, 256);
sbin/unwind/libunbound/util/netevent.c
1623
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1625
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1626
sldns_buffer_capacity(c->doq_socket->pkt_buf), unused_random,
sbin/unwind/libunbound/util/netevent.c
1633
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
sbin/unwind/libunbound/util/netevent.c
1634
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1635
doq_send_pkt(c, paddr, 0);
sbin/unwind/libunbound/util/netevent.c
1736
doq_decode_pkt_header_negotiate(struct comm_point* c,
sbin/unwind/libunbound/util/netevent.c
1750
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1751
sldns_buffer_limit(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1752
c->doq_socket->sv_scidlen);
sbin/unwind/libunbound/util/netevent.c
1755
&scid, &scidlen, sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1756
sldns_buffer_limit(c->doq_socket->pkt_buf), c->doq_socket->sv_scidlen);
sbin/unwind/libunbound/util/netevent.c
1761
doq_send_version_negotiation(c, paddr,
sbin/unwind/libunbound/util/netevent.c
1799
*conn = doq_conn_find_by_addr_or_cid(c->doq_socket->table, paddr,
sbin/unwind/libunbound/util/netevent.c
1807
(*conn)->doq_socket = c->doq_socket;
sbin/unwind/libunbound/util/netevent.c
1824
doq_send_retry(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1840
scid.datalen = c->doq_socket->sv_scidlen;
sbin/unwind/libunbound/util/netevent.c
1841
doq_cid_randfill(&scid, scid.datalen, c->doq_socket->rnd);
sbin/unwind/libunbound/util/netevent.c
1844
c->doq_socket->static_secret, c->doq_socket->static_secret_len,
sbin/unwind/libunbound/util/netevent.c
1853
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1854
ret = ngtcp2_crypto_write_retry(sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1855
sldns_buffer_capacity(c->doq_socket->pkt_buf), hd->version,
sbin/unwind/libunbound/util/netevent.c
1862
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
sbin/unwind/libunbound/util/netevent.c
1863
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1864
doq_send_pkt(c, paddr, 0);
sbin/unwind/libunbound/util/netevent.c
1869
doq_send_stateless_connection_close(struct comm_point* c,
sbin/unwind/libunbound/util/netevent.c
1874
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1876
sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
1877
sldns_buffer_capacity(c->doq_socket->pkt_buf), hd->version, &hd->scid,
sbin/unwind/libunbound/util/netevent.c
1884
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
sbin/unwind/libunbound/util/netevent.c
1885
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
1886
doq_send_pkt(c, paddr, 0);
sbin/unwind/libunbound/util/netevent.c
1891
doq_verify_retry_token(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1908
c->doq_socket->static_secret,
sbin/unwind/libunbound/util/netevent.c
1909
c->doq_socket->static_secret_len, hd->version,
sbin/unwind/libunbound/util/netevent.c
1922
doq_verify_token(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
1938
c->doq_socket->static_secret, c->doq_socket->static_secret_len,
sbin/unwind/libunbound/util/netevent.c
1951
doq_delete_connection(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/util/netevent.c
1969
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
1970
node = rbtree_delete(c->doq_socket->table->conn_tree, copy.node.key);
sbin/unwind/libunbound/util/netevent.c
1974
doq_conn_write_list_remove(c->doq_socket->table, conn);
sbin/unwind/libunbound/util/netevent.c
1980
doq_timer_list_remove(c->doq_socket->table,
sbin/unwind/libunbound/util/netevent.c
1984
doq_timer_tree_remove(c->doq_socket->table,
sbin/unwind/libunbound/util/netevent.c
1987
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
1990
doq_table_quic_size_subtract(c->doq_socket->table,
sbin/unwind/libunbound/util/netevent.c
1992
doq_conn_delete(conn, c->doq_socket->table);
sbin/unwind/libunbound/util/netevent.c
2000
doq_setup_new_conn(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
2004
if(!doq_table_quic_size_available(c->doq_socket->table,
sbin/unwind/libunbound/util/netevent.c
2005
c->doq_socket->cfg, sizeof(*conn)+hd->dcid.datalen
sbin/unwind/libunbound/util/netevent.c
2010
doq_send_stateless_connection_close(c, paddr, hd,
sbin/unwind/libunbound/util/netevent.c
2014
conn = doq_conn_create(c, paddr, hd->dcid.data, hd->dcid.datalen,
sbin/unwind/libunbound/util/netevent.c
2020
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2022
if(!rbtree_insert(c->doq_socket->table->conn_tree, &conn->node)) {
sbin/unwind/libunbound/util/netevent.c
2023
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2027
doq_conn_delete(conn, c->doq_socket->table);
sbin/unwind/libunbound/util/netevent.c
2030
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2031
doq_table_quic_size_add(c->doq_socket->table,
sbin/unwind/libunbound/util/netevent.c
2047
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2055
doq_address_validation(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
2069
doq_send_retry(c, paddr, hd);
sbin/unwind/libunbound/util/netevent.c
2074
doq_send_stateless_connection_close(c, paddr, hd,
sbin/unwind/libunbound/util/netevent.c
2079
if(!doq_verify_retry_token(c, paddr, ocid, hd)) {
sbin/unwind/libunbound/util/netevent.c
2080
doq_send_stateless_connection_close(c, paddr, hd,
sbin/unwind/libunbound/util/netevent.c
2086
if(!doq_verify_token(c, paddr, hd)) {
sbin/unwind/libunbound/util/netevent.c
2087
doq_send_retry(c, paddr, hd);
sbin/unwind/libunbound/util/netevent.c
2101
if(c->doq_socket->validate_addr) {
sbin/unwind/libunbound/util/netevent.c
2102
doq_send_retry(c, paddr, hd);
sbin/unwind/libunbound/util/netevent.c
2118
doq_accept(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.c
2126
rv = ngtcp2_accept(&hd, sldns_buffer_begin(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
2127
sldns_buffer_limit(c->doq_socket->pkt_buf));
sbin/unwind/libunbound/util/netevent.c
2130
doq_send_retry(c, paddr, &hd);
sbin/unwind/libunbound/util/netevent.c
2137
if(c->doq_socket->validate_addr ||
sbin/unwind/libunbound/util/netevent.c
2144
if(!doq_address_validation(c, paddr, &hd, &ocid, &pocid))
sbin/unwind/libunbound/util/netevent.c
2147
*conn = doq_setup_new_conn(c, paddr, &hd, pocid);
sbin/unwind/libunbound/util/netevent.c
2150
(*conn)->doq_socket = c->doq_socket;
sbin/unwind/libunbound/util/netevent.c
2151
if(!doq_conn_recv(c, paddr, *conn, pi, &err_retry, NULL)) {
sbin/unwind/libunbound/util/netevent.c
2153
doq_send_retry(c, paddr, &hd);
sbin/unwind/libunbound/util/netevent.c
2154
doq_delete_connection(c, *conn);
sbin/unwind/libunbound/util/netevent.c
2163
doq_pickup_timer(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2171
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2172
RBTREE_FOR(t, struct doq_timer*, c->doq_socket->table->timer_tree) {
sbin/unwind/libunbound/util/netevent.c
2174
t->worker_doq_socket == c->doq_socket) {
sbin/unwind/libunbound/util/netevent.c
2176
t->worker_doq_socket = c->doq_socket;
sbin/unwind/libunbound/util/netevent.c
2183
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2184
c->doq_socket->marked_time = ts;
sbin/unwind/libunbound/util/netevent.c
2187
timeval_subtract(&rel, &tv, c->doq_socket->now_tv);
sbin/unwind/libunbound/util/netevent.c
2188
comm_timer_set(c->doq_socket->timer, &rel);
sbin/unwind/libunbound/util/netevent.c
2193
if(comm_timer_is_set(c->doq_socket->timer))
sbin/unwind/libunbound/util/netevent.c
2194
comm_timer_disable(c->doq_socket->timer);
sbin/unwind/libunbound/util/netevent.c
2201
doq_done_setup_timer_and_write(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/util/netevent.c
2236
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2237
node = rbtree_search(c->doq_socket->table->conn_tree, copy.node.key);
sbin/unwind/libunbound/util/netevent.c
2239
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2247
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2256
doq_conn_set_write_list(c->doq_socket->table, conn);
sbin/unwind/libunbound/util/netevent.c
2259
doq_timer_set(c->doq_socket->table, &conn->timer,
sbin/unwind/libunbound/util/netevent.c
2260
c->doq_socket, &new_tv, new_ts);
sbin/unwind/libunbound/util/netevent.c
2262
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2268
doq_done_with_conn_cb(struct comm_point* c, struct doq_conn* conn)
sbin/unwind/libunbound/util/netevent.c
2295
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2296
node = rbtree_search(c->doq_socket->table->conn_tree, copy.node.key);
sbin/unwind/libunbound/util/netevent.c
2298
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2306
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2314
doq_conn_set_write_list(c->doq_socket->table, conn);
sbin/unwind/libunbound/util/netevent.c
2315
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2321
doq_write_list_length(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2325
lock_rw_rdlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2326
conn = c->doq_socket->table->write_list_first;
sbin/unwind/libunbound/util/netevent.c
2331
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2337
doq_pop_write_conn(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2340
lock_rw_wrlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2341
conn = doq_table_pop_first(c->doq_socket->table);
sbin/unwind/libunbound/util/netevent.c
2344
conn = doq_table_pop_first(c->doq_socket->table);
sbin/unwind/libunbound/util/netevent.c
2346
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2348
conn->doq_socket = c->doq_socket;
sbin/unwind/libunbound/util/netevent.c
2354
doq_done_with_write_cb(struct comm_point* c, struct doq_conn* conn,
sbin/unwind/libunbound/util/netevent.c
2358
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2361
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2366
doq_socket_want_write(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2369
if(c->doq_socket->have_blocked_pkt)
sbin/unwind/libunbound/util/netevent.c
2371
lock_rw_rdlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2372
if(c->doq_socket->table->write_list_first)
sbin/unwind/libunbound/util/netevent.c
2374
lock_rw_unlock(&c->doq_socket->table->lock);
sbin/unwind/libunbound/util/netevent.c
2380
doq_socket_write_enable(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2383
if(c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2385
comm_point_listen_for_rw(c, 1, 1);
sbin/unwind/libunbound/util/netevent.c
2386
c->doq_socket->event_has_write = 1;
sbin/unwind/libunbound/util/netevent.c
2391
doq_socket_write_disable(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2394
if(!c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2396
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
2397
c->doq_socket->event_has_write = 0;
sbin/unwind/libunbound/util/netevent.c
2402
doq_write_blocked_pkt(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2405
if(!c->doq_socket->have_blocked_pkt)
sbin/unwind/libunbound/util/netevent.c
2407
c->doq_socket->have_blocked_pkt = 0;
sbin/unwind/libunbound/util/netevent.c
2408
if(sldns_buffer_limit(c->doq_socket->blocked_pkt) >
sbin/unwind/libunbound/util/netevent.c
2409
sldns_buffer_remaining(c->doq_socket->pkt_buf))
sbin/unwind/libunbound/util/netevent.c
2412
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
2413
sldns_buffer_write(c->doq_socket->pkt_buf,
sbin/unwind/libunbound/util/netevent.c
2414
sldns_buffer_begin(c->doq_socket->blocked_pkt),
sbin/unwind/libunbound/util/netevent.c
2415
sldns_buffer_limit(c->doq_socket->blocked_pkt));
sbin/unwind/libunbound/util/netevent.c
2416
sldns_buffer_flip(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
2417
memcpy(&paddr, c->doq_socket->blocked_paddr, sizeof(paddr));
sbin/unwind/libunbound/util/netevent.c
2418
doq_send_pkt(c, &paddr, c->doq_socket->blocked_pkt_pi.ecn);
sbin/unwind/libunbound/util/netevent.c
2419
if(c->doq_socket->have_blocked_pkt)
sbin/unwind/libunbound/util/netevent.c
2514
struct comm_point* c;
sbin/unwind/libunbound/util/netevent.c
2521
c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
2522
log_assert(c->type == comm_doq);
sbin/unwind/libunbound/util/netevent.c
2524
log_assert(c && c->doq_socket->pkt_buf && c->fd == fd);
sbin/unwind/libunbound/util/netevent.c
2525
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
2532
if(c->doq_socket->have_blocked_pkt) {
sbin/unwind/libunbound/util/netevent.c
2533
if(!doq_write_blocked_pkt(c)) {
sbin/unwind/libunbound/util/netevent.c
2537
if(!c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2538
doq_socket_write_enable(c);
sbin/unwind/libunbound/util/netevent.c
2539
doq_pickup_timer(c);
sbin/unwind/libunbound/util/netevent.c
2546
num_len = doq_write_list_length(c);
sbin/unwind/libunbound/util/netevent.c
2547
while((conn = doq_pop_write_conn(c)) != NULL) {
sbin/unwind/libunbound/util/netevent.c
2562
if(c->doq_socket->have_blocked_pkt) {
sbin/unwind/libunbound/util/netevent.c
2563
if(!c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2564
doq_socket_write_enable(c);
sbin/unwind/libunbound/util/netevent.c
2565
doq_pickup_timer(c);
sbin/unwind/libunbound/util/netevent.c
2581
if(doq_conn_write_streams(c, conn, &err_drop))
sbin/unwind/libunbound/util/netevent.c
2583
doq_done_with_write_cb(c, conn, err_drop);
sbin/unwind/libunbound/util/netevent.c
2584
if(c->doq_socket->have_blocked_pkt) {
sbin/unwind/libunbound/util/netevent.c
2585
if(!c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2586
doq_socket_write_enable(c);
sbin/unwind/libunbound/util/netevent.c
2587
doq_pickup_timer(c);
sbin/unwind/libunbound/util/netevent.c
2605
if(c->doq_socket->have_blocked_pkt) {
sbin/unwind/libunbound/util/netevent.c
2606
if(!c->doq_socket->event_has_write)
sbin/unwind/libunbound/util/netevent.c
2607
doq_socket_write_enable(c);
sbin/unwind/libunbound/util/netevent.c
2608
doq_pickup_timer(c);
sbin/unwind/libunbound/util/netevent.c
2611
sldns_buffer_clear(c->doq_socket->pkt_buf);
sbin/unwind/libunbound/util/netevent.c
2614
log_assert(sldns_buffer_remaining(c->doq_socket->pkt_buf) > 0);
sbin/unwind/libunbound/util/netevent.c
2615
if(!doq_recv(c, &paddr, &pkt_continue, &pi)) {
sbin/unwind/libunbound/util/netevent.c
2636
(int)sldns_buffer_limit(c->doq_socket->pkt_buf),
sbin/unwind/libunbound/util/netevent.c
2640
if(sldns_buffer_limit(c->doq_socket->pkt_buf) == 0)
sbin/unwind/libunbound/util/netevent.c
2644
if(!doq_decode_pkt_header_negotiate(c, &paddr, &conn))
sbin/unwind/libunbound/util/netevent.c
2647
if(!doq_accept(c, &paddr, &conn, &pi))
sbin/unwind/libunbound/util/netevent.c
2649
if(!doq_conn_write_streams(c, conn, NULL)) {
sbin/unwind/libunbound/util/netevent.c
2650
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2653
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2663
if(!doq_conn_send_close(c, conn)) {
sbin/unwind/libunbound/util/netevent.c
2664
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2666
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2677
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2680
if(!doq_conn_recv(c, &paddr, conn, &pi, NULL, &err_drop)) {
sbin/unwind/libunbound/util/netevent.c
2685
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2687
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2691
if(!doq_conn_write_streams(c, conn, &err_drop)) {
sbin/unwind/libunbound/util/netevent.c
2693
doq_delete_connection(c, conn);
sbin/unwind/libunbound/util/netevent.c
2695
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2699
doq_done_setup_timer_and_write(c, conn);
sbin/unwind/libunbound/util/netevent.c
2704
if(doq_socket_want_write(c))
sbin/unwind/libunbound/util/netevent.c
2705
doq_socket_write_enable(c);
sbin/unwind/libunbound/util/netevent.c
2706
else doq_socket_write_disable(c);
sbin/unwind/libunbound/util/netevent.c
2707
doq_pickup_timer(c);
sbin/unwind/libunbound/util/netevent.c
2713
const void* quic_sslctx, struct comm_point* c, struct comm_base* base,
sbin/unwind/libunbound/util/netevent.c
2738
doq_socket->cp = c;
sbin/unwind/libunbound/util/netevent.c
2818
doq_lookup_conn_stream(struct comm_reply* repinfo, struct comm_point* c,
sbin/unwind/libunbound/util/netevent.c
2821
log_assert(c->doq_socket);
sbin/unwind/libunbound/util/netevent.c
2822
if(c->doq_socket->current_conn) {
sbin/unwind/libunbound/util/netevent.c
2823
*conn = c->doq_socket->current_conn;
sbin/unwind/libunbound/util/netevent.c
2825
*conn = doq_lookup_repinfo(c->doq_socket->table, repinfo);
sbin/unwind/libunbound/util/netevent.c
2831
(*conn)->doq_socket = c->doq_socket;
sbin/unwind/libunbound/util/netevent.c
2840
if(!c->doq_socket->current_conn) {
sbin/unwind/libunbound/util/netevent.c
2849
if(!c->doq_socket->current_conn) {
sbin/unwind/libunbound/util/netevent.c
2865
log_assert(repinfo->c->type == comm_doq);
sbin/unwind/libunbound/util/netevent.c
2866
if(!doq_lookup_conn_stream(repinfo, repinfo->c, &conn, &stream)) {
sbin/unwind/libunbound/util/netevent.c
2873
if(!doq_stream_send_reply(conn, stream, repinfo->c->buffer))
sbin/unwind/libunbound/util/netevent.c
2875
if(!repinfo->c->doq_socket->current_conn) {
sbin/unwind/libunbound/util/netevent.c
2878
doq_done_with_conn_cb(repinfo->c, conn);
sbin/unwind/libunbound/util/netevent.c
2886
doq_socket_write_enable(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
2896
log_assert(repinfo->c->type == comm_doq);
sbin/unwind/libunbound/util/netevent.c
2897
if(!doq_lookup_conn_stream(repinfo, repinfo->c, &conn, &stream)) {
sbin/unwind/libunbound/util/netevent.c
2904
if(!repinfo->c->doq_socket->current_conn) {
sbin/unwind/libunbound/util/netevent.c
2907
doq_done_with_conn_cb(repinfo->c, conn);
sbin/unwind/libunbound/util/netevent.c
2908
doq_socket_write_enable(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
2913
int adjusted_tcp_timeout(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
2915
if(c->tcp_timeout_msec < TCP_QUERY_TIMEOUT_MINIMUM)
sbin/unwind/libunbound/util/netevent.c
2917
return c->tcp_timeout_msec;
sbin/unwind/libunbound/util/netevent.c
2922
setup_tcp_handler(struct comm_point* c, int fd, int cur, int max)
sbin/unwind/libunbound/util/netevent.c
2925
log_assert(c->type == comm_tcp || c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
2926
log_assert(c->fd == -1);
sbin/unwind/libunbound/util/netevent.c
2927
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
2929
if (c->dnscrypt)
sbin/unwind/libunbound/util/netevent.c
2930
sldns_buffer_clear(c->dnscrypt_buffer);
sbin/unwind/libunbound/util/netevent.c
2932
c->tcp_is_reading = 1;
sbin/unwind/libunbound/util/netevent.c
2933
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
2934
c->tcp_keepalive = 0;
sbin/unwind/libunbound/util/netevent.c
2949
c->tcp_timeout_msec /= 100;
sbin/unwind/libunbound/util/netevent.c
2951
c->tcp_timeout_msec /= 500;
sbin/unwind/libunbound/util/netevent.c
2953
c->tcp_timeout_msec = 0;
sbin/unwind/libunbound/util/netevent.c
2954
comm_point_start_listening(c, fd, adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
2970
int comm_point_perform_accept(struct comm_point* c,
sbin/unwind/libunbound/util/netevent.c
2976
new_fd = accept(c->fd, (struct sockaddr*)addr, addrlen);
sbin/unwind/libunbound/util/netevent.c
2979
new_fd = accept4(c->fd, (struct sockaddr*)addr, addrlen, SOCK_NONBLOCK);
sbin/unwind/libunbound/util/netevent.c
3000
if(c->ev->base->stop_accept) {
sbin/unwind/libunbound/util/netevent.c
3001
struct comm_base* b = c->ev->base;
sbin/unwind/libunbound/util/netevent.c
3047
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
3055
if(c->tcp_conn_limit && c->type == comm_tcp_accept) {
sbin/unwind/libunbound/util/netevent.c
3056
c->tcl_addr = tcl_addr_lookup(c->tcp_conn_limit, addr, *addrlen);
sbin/unwind/libunbound/util/netevent.c
3057
if(!tcl_new_connection(c->tcl_addr)) {
sbin/unwind/libunbound/util/netevent.c
3108
comm_point_tcp_win_bio_cb(struct comm_point* c, void* thessl)
sbin/unwind/libunbound/util/netevent.c
3117
BIO_set_callback_arg(SSL_get_rbio(ssl), (char*)c->ev->ev);
sbin/unwind/libunbound/util/netevent.c
3123
BIO_set_callback_arg(SSL_get_wbio(ssl), (char*)c->ev->ev);
sbin/unwind/libunbound/util/netevent.c
3149
h2_session->c->http2_max_streams}};
sbin/unwind/libunbound/util/netevent.c
3169
h2_session->c, NULL);
sbin/unwind/libunbound/util/netevent.c
317
struct ub_event* comm_point_internal(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
319
return c->ev->ev;
sbin/unwind/libunbound/util/netevent.c
3192
h2_session->c->h2_stream = NULL;
sbin/unwind/libunbound/util/netevent.c
3200
struct comm_point* c = (struct comm_point*)arg, *c_hdl;
sbin/unwind/libunbound/util/netevent.c
3202
log_assert(c->type == comm_tcp_accept);
sbin/unwind/libunbound/util/netevent.c
3207
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
3209
if(!c->tcp_free) {
sbin/unwind/libunbound/util/netevent.c
3214
c_hdl = c->tcp_free;
sbin/unwind/libunbound/util/netevent.c
3241
if(!c->ssl) {
sbin/unwind/libunbound/util/netevent.c
3264
new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3279
if(c->ssl) {
sbin/unwind/libunbound/util/netevent.c
3280
c_hdl->ssl = incoming_ssl_fd(c->ssl, new_fd);
sbin/unwind/libunbound/util/netevent.c
3294
log_assert(c_hdl == c->tcp_free);
sbin/unwind/libunbound/util/netevent.c
3297
c->cur_tcp_count++;
sbin/unwind/libunbound/util/netevent.c
3298
c->tcp_free = c_hdl->tcp_free;
sbin/unwind/libunbound/util/netevent.c
3301
if(!c->tcp_free) {
sbin/unwind/libunbound/util/netevent.c
3303
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
3305
setup_tcp_handler(c_hdl, new_fd, c->cur_tcp_count, c->max_tcp_count);
sbin/unwind/libunbound/util/netevent.c
3310
reclaim_tcp_handler(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3312
log_assert(c->type == comm_tcp);
sbin/unwind/libunbound/util/netevent.c
3313
if(c->ssl) {
sbin/unwind/libunbound/util/netevent.c
3315
SSL_shutdown(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3316
SSL_free(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3317
c->ssl = NULL;
sbin/unwind/libunbound/util/netevent.c
3320
comm_point_close(c);
sbin/unwind/libunbound/util/netevent.c
3321
if(c->tcp_parent && !c->is_in_tcp_free) {
sbin/unwind/libunbound/util/netevent.c
3323
log_assert(c->tcp_free == NULL);
sbin/unwind/libunbound/util/netevent.c
3324
log_assert(c->tcp_parent->cur_tcp_count > 0);
sbin/unwind/libunbound/util/netevent.c
3325
c->tcp_parent->cur_tcp_count--;
sbin/unwind/libunbound/util/netevent.c
3326
c->tcp_free = c->tcp_parent->tcp_free;
sbin/unwind/libunbound/util/netevent.c
3327
c->tcp_parent->tcp_free = c;
sbin/unwind/libunbound/util/netevent.c
3328
c->is_in_tcp_free = 1;
sbin/unwind/libunbound/util/netevent.c
3329
if(!c->tcp_free) {
sbin/unwind/libunbound/util/netevent.c
3331
comm_point_start_listening(c->tcp_parent, -1, -1);
sbin/unwind/libunbound/util/netevent.c
3334
c->tcp_more_read_again = NULL;
sbin/unwind/libunbound/util/netevent.c
3335
c->tcp_more_write_again = NULL;
sbin/unwind/libunbound/util/netevent.c
3336
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
3337
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
3338
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3343
tcp_callback_writer(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3345
log_assert(c->type == comm_tcp);
sbin/unwind/libunbound/util/netevent.c
3346
if(!c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3347
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3348
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
3350
if(c->tcp_do_toggle_rw)
sbin/unwind/libunbound/util/netevent.c
3351
c->tcp_is_reading = 1;
sbin/unwind/libunbound/util/netevent.c
3353
if(c->tcp_req_info) {
sbin/unwind/libunbound/util/netevent.c
3354
tcp_req_info_handle_writedone(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3356
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
3357
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3358
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
3359
if( (*c->callback)(c, c->cb_arg, NETEVENT_PKT_WRITTEN,
sbin/unwind/libunbound/util/netevent.c
3360
&c->repinfo) ) {
sbin/unwind/libunbound/util/netevent.c
3361
comm_point_start_listening(c, -1,
sbin/unwind/libunbound/util/netevent.c
3362
adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
3365
comm_point_start_listening(c, -1,
sbin/unwind/libunbound/util/netevent.c
3366
adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
3373
tcp_callback_reader(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3375
log_assert(c->type == comm_tcp || c->type == comm_local);
sbin/unwind/libunbound/util/netevent.c
3376
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3377
if(c->tcp_do_toggle_rw)
sbin/unwind/libunbound/util/netevent.c
3378
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
3379
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
3380
if(c->tcp_req_info) {
sbin/unwind/libunbound/util/netevent.c
3381
tcp_req_info_handle_readdone(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3383
if(c->type == comm_tcp)
sbin/unwind/libunbound/util/netevent.c
3384
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
3385
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
3386
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo) ) {
sbin/unwind/libunbound/util/netevent.c
3387
comm_point_start_listening(c, -1,
sbin/unwind/libunbound/util/netevent.c
3388
adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
3424
ssl_handshake(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3427
if(c->ssl_shake_state == comm_ssl_shake_hs_read) {
sbin/unwind/libunbound/util/netevent.c
3429
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3430
c->ssl_shake_state = comm_ssl_shake_none;
sbin/unwind/libunbound/util/netevent.c
3433
if(c->ssl_shake_state == comm_ssl_shake_hs_write) {
sbin/unwind/libunbound/util/netevent.c
3435
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
3436
c->ssl_shake_state = comm_ssl_shake_none;
sbin/unwind/libunbound/util/netevent.c
3441
r = SSL_do_handshake(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3443
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3445
if(c->ssl_shake_state == comm_ssl_shake_read)
sbin/unwind/libunbound/util/netevent.c
3447
c->ssl_shake_state = comm_ssl_shake_read;
sbin/unwind/libunbound/util/netevent.c
3448
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
3451
if(c->ssl_shake_state == comm_ssl_shake_write)
sbin/unwind/libunbound/util/netevent.c
3453
c->ssl_shake_state = comm_ssl_shake_write;
sbin/unwind/libunbound/util/netevent.c
3454
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3469
(struct sockaddr*)&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3470
c->repinfo.remote_addrlen))
sbin/unwind/libunbound/util/netevent.c
3484
if((vr=SSL_get_verify_result(c->ssl)) != 0)
sbin/unwind/libunbound/util/netevent.c
3489
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3490
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3496
if((SSL_get_verify_mode(c->ssl)&SSL_VERIFY_PEER)) {
sbin/unwind/libunbound/util/netevent.c
3498
if(SSL_get_verify_result(c->ssl) == X509_V_OK) {
sbin/unwind/libunbound/util/netevent.c
3500
X509* x = SSL_get1_peer_certificate(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3502
X509* x = SSL_get_peer_certificate(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3507
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3508
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3513
if(SSL_get0_peername(c->ssl)) {
sbin/unwind/libunbound/util/netevent.c
3517
SSL_get0_peername(c->ssl));
sbin/unwind/libunbound/util/netevent.c
3518
log_addr(VERB_ALGO, buf, &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3519
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3523
"authenticated", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3524
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3531
X509* x = SSL_get1_peer_certificate(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3533
X509* x = SSL_get_peer_certificate(c->ssl);
sbin/unwind/libunbound/util/netevent.c
3541
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3542
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3548
log_addr(VERB_ALGO, "SSL connection", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3549
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3554
if(c->type == comm_http && c->h2_session) {
sbin/unwind/libunbound/util/netevent.c
3557
SSL_get0_alpn_selected(c->ssl, &alpn, &alpnlen);
sbin/unwind/libunbound/util/netevent.c
3560
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
3561
c->use_h2 = 1;
sbin/unwind/libunbound/util/netevent.c
3570
if(c->tcp_is_reading) {
sbin/unwind/libunbound/util/netevent.c
3571
if(c->ssl_shake_state != comm_ssl_shake_read)
sbin/unwind/libunbound/util/netevent.c
3572
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
3574
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3576
c->ssl_shake_state = comm_ssl_shake_none;
sbin/unwind/libunbound/util/netevent.c
3583
ssl_handle_read(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3587
if(c->ssl_shake_state != comm_ssl_shake_none) {
sbin/unwind/libunbound/util/netevent.c
3588
if(!ssl_handshake(c))
sbin/unwind/libunbound/util/netevent.c
3590
if(c->ssl_shake_state != comm_ssl_shake_none)
sbin/unwind/libunbound/util/netevent.c
3593
if(c->pp2_enabled && c->pp2_header_state != pp2_header_done) {
sbin/unwind/libunbound/util/netevent.c
3597
if(c->pp2_header_state == pp2_header_none) {
sbin/unwind/libunbound/util/netevent.c
3599
if(sldns_buffer_remaining(c->buffer)<want_read_size) {
sbin/unwind/libunbound/util/netevent.c
3602
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3603
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3610
if(c->tcp_byte_count < current_read_size) {
sbin/unwind/libunbound/util/netevent.c
3612
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(
sbin/unwind/libunbound/util/netevent.c
3613
c->buffer, c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
3615
c->tcp_byte_count)) <= 0) {
sbin/unwind/libunbound/util/netevent.c
3616
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3618
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
3619
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3623
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
3627
c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
3628
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3644
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3645
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
3646
if(c->tcp_byte_count != current_read_size) return 1;
sbin/unwind/libunbound/util/netevent.c
3647
c->pp2_header_state = pp2_header_init;
sbin/unwind/libunbound/util/netevent.c
3650
if(c->pp2_header_state == pp2_header_init) {
sbin/unwind/libunbound/util/netevent.c
3653
sldns_buffer_begin(c->buffer),
sbin/unwind/libunbound/util/netevent.c
3654
sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3661
header = (struct pp2_header*)sldns_buffer_begin(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3663
if(sldns_buffer_limit(c->buffer) <
sbin/unwind/libunbound/util/netevent.c
3667
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3668
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3677
c->pp2_header_state = pp2_header_done;
sbin/unwind/libunbound/util/netevent.c
3678
} else if(c->tcp_byte_count < current_read_size) {
sbin/unwind/libunbound/util/netevent.c
3680
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(
sbin/unwind/libunbound/util/netevent.c
3681
c->buffer, c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
3683
c->tcp_byte_count)) <= 0) {
sbin/unwind/libunbound/util/netevent.c
3684
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3686
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
3687
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3691
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
3695
c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
3696
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3712
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3713
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
3714
if(c->tcp_byte_count != current_read_size) return 1;
sbin/unwind/libunbound/util/netevent.c
3715
c->pp2_header_state = pp2_header_done;
sbin/unwind/libunbound/util/netevent.c
3718
if(c->pp2_header_state != pp2_header_done || !header) {
sbin/unwind/libunbound/util/netevent.c
3720
"PROXYv2 header", "", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3721
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3724
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3725
if(!consume_pp2_header(c->buffer, &c->repinfo, 1)) {
sbin/unwind/libunbound/util/netevent.c
3727
"PROXYv2 header", "", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
3728
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
3735
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
3736
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
3739
if(c->tcp_byte_count < sizeof(uint16_t)) {
sbin/unwind/libunbound/util/netevent.c
3742
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(c->buffer,
sbin/unwind/libunbound/util/netevent.c
3743
c->tcp_byte_count), (int)(sizeof(uint16_t) -
sbin/unwind/libunbound/util/netevent.c
3744
c->tcp_byte_count))) <= 0) {
sbin/unwind/libunbound/util/netevent.c
3745
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3747
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
3748
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3752
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
3756
c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
3757
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3772
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3773
if(c->tcp_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
3775
if(sldns_buffer_read_u16_at(c->buffer, 0) >
sbin/unwind/libunbound/util/netevent.c
3776
sldns_buffer_capacity(c->buffer)) {
sbin/unwind/libunbound/util/netevent.c
3780
sldns_buffer_set_limit(c->buffer,
sbin/unwind/libunbound/util/netevent.c
3781
sldns_buffer_read_u16_at(c->buffer, 0));
sbin/unwind/libunbound/util/netevent.c
3782
if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
sbin/unwind/libunbound/util/netevent.c
3786
sldns_buffer_skip(c->buffer, (ssize_t)(c->tcp_byte_count-sizeof(uint16_t)));
sbin/unwind/libunbound/util/netevent.c
3788
(int)sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3790
if(sldns_buffer_remaining(c->buffer) > 0) {
sbin/unwind/libunbound/util/netevent.c
3792
r = SSL_read(c->ssl, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
3793
(int)sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3795
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3797
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
3798
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
3802
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
3806
c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
3807
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
3822
sldns_buffer_skip(c->buffer, (ssize_t)r);
sbin/unwind/libunbound/util/netevent.c
3824
if(sldns_buffer_remaining(c->buffer) <= 0) {
sbin/unwind/libunbound/util/netevent.c
3825
tcp_callback_reader(c);
sbin/unwind/libunbound/util/netevent.c
3829
(void)c;
sbin/unwind/libunbound/util/netevent.c
3836
ssl_handle_write(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
3840
if(c->ssl_shake_state != comm_ssl_shake_none) {
sbin/unwind/libunbound/util/netevent.c
3841
if(!ssl_handshake(c))
sbin/unwind/libunbound/util/netevent.c
3843
if(c->ssl_shake_state != comm_ssl_shake_none)
sbin/unwind/libunbound/util/netevent.c
3847
(void)SSL_set_mode(c->ssl, (long)SSL_MODE_ENABLE_PARTIAL_WRITE);
sbin/unwind/libunbound/util/netevent.c
3848
if((c->tcp_write_and_read?c->tcp_write_byte_count:c->tcp_byte_count) < sizeof(uint16_t)) {
sbin/unwind/libunbound/util/netevent.c
3849
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3851
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3852
if(c->tcp_write_pkt_len + 2 < LDNS_RR_BUF_SIZE) {
sbin/unwind/libunbound/util/netevent.c
3858
c->tcp_write_pkt,
sbin/unwind/libunbound/util/netevent.c
3859
c->tcp_write_pkt_len);
sbin/unwind/libunbound/util/netevent.c
3860
r = SSL_write(c->ssl,
sbin/unwind/libunbound/util/netevent.c
3861
(void*)(buf+c->tcp_write_byte_count),
sbin/unwind/libunbound/util/netevent.c
3862
c->tcp_write_pkt_len + 2 -
sbin/unwind/libunbound/util/netevent.c
3863
c->tcp_write_byte_count);
sbin/unwind/libunbound/util/netevent.c
3865
r = SSL_write(c->ssl,
sbin/unwind/libunbound/util/netevent.c
3866
(void*)(((uint8_t*)&len)+c->tcp_write_byte_count),
sbin/unwind/libunbound/util/netevent.c
3867
(int)(sizeof(uint16_t)-c->tcp_write_byte_count));
sbin/unwind/libunbound/util/netevent.c
3869
} else if(sizeof(uint16_t)+sldns_buffer_remaining(c->buffer) <
sbin/unwind/libunbound/util/netevent.c
3876
sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
3877
sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3878
r = SSL_write(c->ssl, (void*)(buf+c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
3880
sldns_buffer_remaining(c->buffer)
sbin/unwind/libunbound/util/netevent.c
3881
- c->tcp_byte_count));
sbin/unwind/libunbound/util/netevent.c
3883
r = SSL_write(c->ssl,
sbin/unwind/libunbound/util/netevent.c
3884
(void*)(((uint8_t*)&len)+c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
3885
(int)(sizeof(uint16_t)-c->tcp_byte_count));
sbin/unwind/libunbound/util/netevent.c
3888
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3892
c->ssl_shake_state = comm_ssl_shake_hs_read;
sbin/unwind/libunbound/util/netevent.c
3893
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
3897
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
3913
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3914
c->tcp_write_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3915
if(c->tcp_write_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
3918
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3919
if(c->tcp_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
3921
sldns_buffer_set_position(c->buffer, c->tcp_byte_count -
sbin/unwind/libunbound/util/netevent.c
3924
if((!c->tcp_write_and_read && sldns_buffer_remaining(c->buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
sbin/unwind/libunbound/util/netevent.c
3925
tcp_callback_writer(c);
sbin/unwind/libunbound/util/netevent.c
3929
log_assert(c->tcp_write_and_read || sldns_buffer_remaining(c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
3930
log_assert(!c->tcp_write_and_read || c->tcp_write_byte_count < c->tcp_write_pkt_len + 2);
sbin/unwind/libunbound/util/netevent.c
3932
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3933
r = SSL_write(c->ssl, (void*)(c->tcp_write_pkt + c->tcp_write_byte_count - 2),
sbin/unwind/libunbound/util/netevent.c
3934
(int)(c->tcp_write_pkt_len + 2 - c->tcp_write_byte_count));
sbin/unwind/libunbound/util/netevent.c
3936
r = SSL_write(c->ssl, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
3937
(int)sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
3940
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
3944
c->ssl_shake_state = comm_ssl_shake_hs_read;
sbin/unwind/libunbound/util/netevent.c
3945
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
3949
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
396
comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
sbin/unwind/libunbound/util/netevent.c
3965
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
3966
c->tcp_write_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
3968
sldns_buffer_skip(c->buffer, (ssize_t)r);
sbin/unwind/libunbound/util/netevent.c
3971
if((!c->tcp_write_and_read && sldns_buffer_remaining(c->buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
sbin/unwind/libunbound/util/netevent.c
3972
tcp_callback_writer(c);
sbin/unwind/libunbound/util/netevent.c
3976
(void)c;
sbin/unwind/libunbound/util/netevent.c
3983
ssl_handle_it(struct comm_point* c, int is_write)
sbin/unwind/libunbound/util/netevent.c
3987
if(is_write && c->ssl_shake_state == comm_ssl_shake_hs_write)
sbin/unwind/libunbound/util/netevent.c
3988
return ssl_handle_read(c);
sbin/unwind/libunbound/util/netevent.c
3989
else if(!is_write && c->ssl_shake_state == comm_ssl_shake_hs_read)
sbin/unwind/libunbound/util/netevent.c
3990
return ssl_handle_write(c);
sbin/unwind/libunbound/util/netevent.c
3994
return ssl_handle_read(c);
sbin/unwind/libunbound/util/netevent.c
3995
return ssl_handle_write(c);
sbin/unwind/libunbound/util/netevent.c
400
log_assert(c->fd != -1);
sbin/unwind/libunbound/util/netevent.c
4006
comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok)
sbin/unwind/libunbound/util/netevent.c
4010
log_assert(c->type == comm_tcp || c->type == comm_local);
sbin/unwind/libunbound/util/netevent.c
4011
if(c->ssl)
sbin/unwind/libunbound/util/netevent.c
4012
return ssl_handle_it(c, 0);
sbin/unwind/libunbound/util/netevent.c
4013
if(!c->tcp_is_reading && !c->tcp_write_and_read)
sbin/unwind/libunbound/util/netevent.c
4017
if(c->pp2_enabled && c->pp2_header_state != pp2_header_done) {
sbin/unwind/libunbound/util/netevent.c
4021
if(c->pp2_header_state == pp2_header_none) {
sbin/unwind/libunbound/util/netevent.c
4023
if(sldns_buffer_remaining(c->buffer)<want_read_size) {
sbin/unwind/libunbound/util/netevent.c
4026
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4027
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4034
if(c->tcp_byte_count < current_read_size) {
sbin/unwind/libunbound/util/netevent.c
4035
r = recv(fd, (void*)sldns_buffer_at(c->buffer,
sbin/unwind/libunbound/util/netevent.c
4036
c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
4037
current_read_size-c->tcp_byte_count, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
4039
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
4040
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
4045
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4046
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
4047
if(c->tcp_byte_count != current_read_size) return 1;
sbin/unwind/libunbound/util/netevent.c
4048
c->pp2_header_state = pp2_header_init;
sbin/unwind/libunbound/util/netevent.c
4051
if(c->pp2_header_state == pp2_header_init) {
sbin/unwind/libunbound/util/netevent.c
4054
sldns_buffer_begin(c->buffer),
sbin/unwind/libunbound/util/netevent.c
4055
sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
4062
header = (struct pp2_header*)sldns_buffer_begin(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4064
if(sldns_buffer_limit(c->buffer) <
sbin/unwind/libunbound/util/netevent.c
4068
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4069
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
407
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
sbin/unwind/libunbound/util/netevent.c
4078
c->pp2_header_state = pp2_header_done;
sbin/unwind/libunbound/util/netevent.c
4079
} else if(c->tcp_byte_count < current_read_size) {
sbin/unwind/libunbound/util/netevent.c
4080
r = recv(fd, (void*)sldns_buffer_at(c->buffer,
sbin/unwind/libunbound/util/netevent.c
4081
c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
4082
current_read_size-c->tcp_byte_count, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
4084
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
4085
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
4090
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4091
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
4092
if(c->tcp_byte_count != current_read_size) return 1;
sbin/unwind/libunbound/util/netevent.c
4093
c->pp2_header_state = pp2_header_done;
sbin/unwind/libunbound/util/netevent.c
4096
if(c->pp2_header_state != pp2_header_done || !header) {
sbin/unwind/libunbound/util/netevent.c
4098
"PROXYv2 header", "", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4099
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4102
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4103
if(!consume_pp2_header(c->buffer, &c->repinfo, 1)) {
sbin/unwind/libunbound/util/netevent.c
4105
"PROXYv2 header", "", &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4106
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
411
sent = send(c->fd, (void*)sldns_buffer_begin(packet),
sbin/unwind/libunbound/util/netevent.c
4113
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4114
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
4118
if(c->tcp_byte_count < sizeof(uint16_t)) {
sbin/unwind/libunbound/util/netevent.c
4120
r = recv(fd,(void*)sldns_buffer_at(c->buffer,c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
4121
sizeof(uint16_t)-c->tcp_byte_count, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
4123
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
4124
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
4127
if(c->pp2_enabled) goto recv_error;
sbin/unwind/libunbound/util/netevent.c
4130
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4131
if(c->tcp_byte_count != sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
4133
if(sldns_buffer_read_u16_at(c->buffer, 0) >
sbin/unwind/libunbound/util/netevent.c
4134
sldns_buffer_capacity(c->buffer)) {
sbin/unwind/libunbound/util/netevent.c
4138
sldns_buffer_set_limit(c->buffer,
sbin/unwind/libunbound/util/netevent.c
4139
sldns_buffer_read_u16_at(c->buffer, 0));
sbin/unwind/libunbound/util/netevent.c
4141
sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
sbin/unwind/libunbound/util/netevent.c
4146
(int)sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
4149
if(sldns_buffer_remaining(c->buffer) == 0)
sbin/unwind/libunbound/util/netevent.c
4153
r = recv(fd, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
4154
sldns_buffer_remaining(c->buffer), MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
4156
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
4157
return tcp_req_info_handle_read_close(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
4162
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
4163
if(sldns_buffer_remaining(c->buffer) <= 0) {
sbin/unwind/libunbound/util/netevent.c
4164
tcp_callback_reader(c);
sbin/unwind/libunbound/util/netevent.c
4210
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4211
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4234
ub_winsock_tcp_wouldblock(c->ev->ev,
sbin/unwind/libunbound/util/netevent.c
4240
sock_strerror(errno), &c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4241
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4252
comm_point_tcp_handle_write(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4256
log_assert(c->type == comm_tcp);
sbin/unwind/libunbound/util/netevent.c
4258
buffer = c->dnscrypt_buffer;
sbin/unwind/libunbound/util/netevent.c
4260
buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
4262
if(c->tcp_is_reading && !c->ssl && !c->tcp_write_and_read)
sbin/unwind/libunbound/util/netevent.c
4265
if(((!c->tcp_write_and_read && c->tcp_byte_count == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == 0)) && c->tcp_check_nb_connect) {
sbin/unwind/libunbound/util/netevent.c
4288
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4289
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4295
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
4301
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4302
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4307
if(c->ssl)
sbin/unwind/libunbound/util/netevent.c
4308
return ssl_handle_it(c, 1);
sbin/unwind/libunbound/util/netevent.c
4314
if(c->tcp_do_fastopen == 1) {
sbin/unwind/libunbound/util/netevent.c
4317
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(buffer));
sbin/unwind/libunbound/util/netevent.c
4320
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
4322
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4323
iov[0].iov_base = (uint8_t*)&len + c->tcp_write_byte_count;
sbin/unwind/libunbound/util/netevent.c
4324
iov[0].iov_len = sizeof(uint16_t) - c->tcp_write_byte_count;
sbin/unwind/libunbound/util/netevent.c
4325
iov[1].iov_base = c->tcp_write_pkt;
sbin/unwind/libunbound/util/netevent.c
4326
iov[1].iov_len = c->tcp_write_pkt_len;
sbin/unwind/libunbound/util/netevent.c
4328
iov[0].iov_base = (uint8_t*)&len + c->tcp_byte_count;
sbin/unwind/libunbound/util/netevent.c
4329
iov[0].iov_len = sizeof(uint16_t) - c->tcp_byte_count;
sbin/unwind/libunbound/util/netevent.c
4334
msg.msg_name = &c->repinfo.remote_addr;
sbin/unwind/libunbound/util/netevent.c
4335
msg.msg_namelen = c->repinfo.remote_addrlen;
sbin/unwind/libunbound/util/netevent.c
4361
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4362
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4369
if(connect(fd, (struct sockaddr *)&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4370
c->repinfo.remote_addrlen) == -1) {
sbin/unwind/libunbound/util/netevent.c
4381
(struct sockaddr *)&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4382
c->repinfo.remote_addrlen)) {
sbin/unwind/libunbound/util/netevent.c
4385
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4386
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4392
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4393
c->tcp_write_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4394
if(c->tcp_write_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
4397
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4398
if(c->tcp_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
4400
sldns_buffer_set_position(buffer, c->tcp_byte_count -
sbin/unwind/libunbound/util/netevent.c
4403
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
sbin/unwind/libunbound/util/netevent.c
4404
tcp_callback_writer(c);
sbin/unwind/libunbound/util/netevent.c
4411
if((c->tcp_write_and_read?c->tcp_write_byte_count:c->tcp_byte_count) < sizeof(uint16_t)) {
sbin/unwind/libunbound/util/netevent.c
4412
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(buffer));
sbin/unwind/libunbound/util/netevent.c
4415
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4416
iov[0].iov_base = (uint8_t*)&len + c->tcp_write_byte_count;
sbin/unwind/libunbound/util/netevent.c
4417
iov[0].iov_len = sizeof(uint16_t) - c->tcp_write_byte_count;
sbin/unwind/libunbound/util/netevent.c
4418
iov[1].iov_base = c->tcp_write_pkt;
sbin/unwind/libunbound/util/netevent.c
4419
iov[1].iov_len = c->tcp_write_pkt_len;
sbin/unwind/libunbound/util/netevent.c
4421
iov[0].iov_base = (uint8_t*)&len + c->tcp_byte_count;
sbin/unwind/libunbound/util/netevent.c
4422
iov[0].iov_len = sizeof(uint16_t) - c->tcp_byte_count;
sbin/unwind/libunbound/util/netevent.c
4429
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4430
r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_write_byte_count),
sbin/unwind/libunbound/util/netevent.c
4431
sizeof(uint16_t)-c->tcp_write_byte_count, 0);
sbin/unwind/libunbound/util/netevent.c
4433
r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_byte_count),
sbin/unwind/libunbound/util/netevent.c
4434
sizeof(uint16_t)-c->tcp_byte_count, 0);
sbin/unwind/libunbound/util/netevent.c
4451
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4452
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4455
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4456
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4464
ub_winsock_tcp_wouldblock(c->ev->ev,
sbin/unwind/libunbound/util/netevent.c
4472
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4473
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4477
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4478
c->tcp_write_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4479
if(c->tcp_write_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
4482
c->tcp_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4483
if(c->tcp_byte_count < sizeof(uint16_t))
sbin/unwind/libunbound/util/netevent.c
4485
sldns_buffer_set_position(buffer, c->tcp_byte_count -
sbin/unwind/libunbound/util/netevent.c
4488
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
sbin/unwind/libunbound/util/netevent.c
4489
tcp_callback_writer(c);
sbin/unwind/libunbound/util/netevent.c
4493
log_assert(c->tcp_write_and_read || sldns_buffer_remaining(buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
4494
log_assert(!c->tcp_write_and_read || c->tcp_write_byte_count < c->tcp_write_pkt_len + 2);
sbin/unwind/libunbound/util/netevent.c
4495
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4496
r = send(fd, (void*)(c->tcp_write_pkt + c->tcp_write_byte_count - 2),
sbin/unwind/libunbound/util/netevent.c
4497
c->tcp_write_pkt_len + 2 - c->tcp_write_byte_count, 0);
sbin/unwind/libunbound/util/netevent.c
4514
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
4521
&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
4522
c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4525
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
4526
c->tcp_write_byte_count += r;
sbin/unwind/libunbound/util/netevent.c
4531
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
sbin/unwind/libunbound/util/netevent.c
4532
tcp_callback_writer(c);
sbin/unwind/libunbound/util/netevent.c
4541
tcp_req_info_read_again(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4543
while(c->tcp_req_info->read_again) {
sbin/unwind/libunbound/util/netevent.c
4545
c->tcp_req_info->read_again = 0;
sbin/unwind/libunbound/util/netevent.c
4546
if(c->tcp_is_reading)
sbin/unwind/libunbound/util/netevent.c
4547
r = comm_point_tcp_handle_read(fd, c, 0);
sbin/unwind/libunbound/util/netevent.c
4548
else r = comm_point_tcp_handle_write(fd, c);
sbin/unwind/libunbound/util/netevent.c
4550
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4551
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4553
c->callback));
sbin/unwind/libunbound/util/netevent.c
4554
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4565
tcp_more_read_again(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4571
int* moreread = c->tcp_more_read_again;
sbin/unwind/libunbound/util/netevent.c
4574
if(!comm_point_tcp_handle_read(fd, c, 0)) {
sbin/unwind/libunbound/util/netevent.c
4575
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4576
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4578
c->callback));
sbin/unwind/libunbound/util/netevent.c
4579
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
458
p.fd = c->fd;
sbin/unwind/libunbound/util/netevent.c
4589
tcp_more_write_again(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4595
int* morewrite = c->tcp_more_write_again;
sbin/unwind/libunbound/util/netevent.c
4598
if(!comm_point_tcp_handle_write(fd, c)) {
sbin/unwind/libunbound/util/netevent.c
4599
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4600
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4602
c->callback));
sbin/unwind/libunbound/util/netevent.c
4603
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4614
struct comm_point* c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
4615
log_assert(c->type == comm_tcp);
sbin/unwind/libunbound/util/netevent.c
4616
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
4618
if(c->fd == -1 || c->fd != fd)
sbin/unwind/libunbound/util/netevent.c
4623
if(c->tcp_parent) {
sbin/unwind/libunbound/util/netevent.c
4624
c->dnscrypt = c->tcp_parent->dnscrypt;
sbin/unwind/libunbound/util/netevent.c
4626
if(c->dnscrypt && c->dnscrypt_buffer == c->buffer) {
sbin/unwind/libunbound/util/netevent.c
4627
c->dnscrypt_buffer = sldns_buffer_new(sldns_buffer_capacity(c->buffer));
sbin/unwind/libunbound/util/netevent.c
4628
if(!c->dnscrypt_buffer) {
sbin/unwind/libunbound/util/netevent.c
4630
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4631
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4633
c->callback));
sbin/unwind/libunbound/util/netevent.c
4634
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4644
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4645
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4646
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
4647
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4654
&& !(c->tcp_do_fastopen && (event&UB_EV_WRITE))
sbin/unwind/libunbound/util/netevent.c
4657
int has_tcpq = (c->tcp_req_info != NULL);
sbin/unwind/libunbound/util/netevent.c
4658
int* moreread = c->tcp_more_read_again;
sbin/unwind/libunbound/util/netevent.c
4659
if(!comm_point_tcp_handle_read(fd, c, 0)) {
sbin/unwind/libunbound/util/netevent.c
4660
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4661
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4663
c->callback));
sbin/unwind/libunbound/util/netevent.c
4664
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4669
if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again) {
sbin/unwind/libunbound/util/netevent.c
4670
if(!tcp_req_info_read_again(fd, c))
sbin/unwind/libunbound/util/netevent.c
4674
tcp_more_read_again(fd, c);
sbin/unwind/libunbound/util/netevent.c
4678
int has_tcpq = (c->tcp_req_info != NULL);
sbin/unwind/libunbound/util/netevent.c
4679
int* morewrite = c->tcp_more_write_again;
sbin/unwind/libunbound/util/netevent.c
4680
if(!comm_point_tcp_handle_write(fd, c)) {
sbin/unwind/libunbound/util/netevent.c
4681
reclaim_tcp_handler(c);
sbin/unwind/libunbound/util/netevent.c
4682
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
4684
c->callback));
sbin/unwind/libunbound/util/netevent.c
4685
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
4690
if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again) {
sbin/unwind/libunbound/util/netevent.c
4691
if(!tcp_req_info_read_again(fd, c))
sbin/unwind/libunbound/util/netevent.c
4695
tcp_more_write_again(fd, c);
sbin/unwind/libunbound/util/netevent.c
4703
reclaim_http_handler(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4705
log_assert(c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
4706
if(c->ssl) {
sbin/unwind/libunbound/util/netevent.c
4708
SSL_shutdown(c->ssl);
sbin/unwind/libunbound/util/netevent.c
4709
SSL_free(c->ssl);
sbin/unwind/libunbound/util/netevent.c
4710
c->ssl = NULL;
sbin/unwind/libunbound/util/netevent.c
4713
comm_point_close(c);
sbin/unwind/libunbound/util/netevent.c
4714
if(c->tcp_parent && !c->is_in_tcp_free) {
sbin/unwind/libunbound/util/netevent.c
4716
log_assert(c->tcp_free == NULL);
sbin/unwind/libunbound/util/netevent.c
4717
log_assert(c->tcp_parent->cur_tcp_count > 0);
sbin/unwind/libunbound/util/netevent.c
4718
c->tcp_parent->cur_tcp_count--;
sbin/unwind/libunbound/util/netevent.c
4719
c->tcp_free = c->tcp_parent->tcp_free;
sbin/unwind/libunbound/util/netevent.c
472
struct comm_base* b = c->ev->base;
sbin/unwind/libunbound/util/netevent.c
4720
c->tcp_parent->tcp_free = c;
sbin/unwind/libunbound/util/netevent.c
4721
c->is_in_tcp_free = 1;
sbin/unwind/libunbound/util/netevent.c
4722
if(!c->tcp_free) {
sbin/unwind/libunbound/util/netevent.c
4724
comm_point_start_listening(c->tcp_parent, -1, -1);
sbin/unwind/libunbound/util/netevent.c
4731
ssl_http_read_more(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4735
log_assert(sldns_buffer_remaining(c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
4737
r = SSL_read(c->ssl, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
4738
(int)sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
4740
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
4746
c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
4747
comm_point_listen_for_rw(c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
4763
(int)sldns_buffer_position(c->buffer), (int)r);
sbin/unwind/libunbound/util/netevent.c
4764
sldns_buffer_skip(c->buffer, (ssize_t)r);
sbin/unwind/libunbound/util/netevent.c
4767
(void)c;
sbin/unwind/libunbound/util/netevent.c
4774
http_read_more(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4777
log_assert(sldns_buffer_remaining(c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
4778
r = recv(fd, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
4779
sldns_buffer_remaining(c->buffer), MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
4792
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
4797
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
4801
(int)sldns_buffer_position(c->buffer), (int)r);
sbin/unwind/libunbound/util/netevent.c
4802
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
4853
http_process_initial_header(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4855
char* line = http_header_line(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4865
if(!c->http_is_chunked) {
sbin/unwind/libunbound/util/netevent.c
4874
c->tcp_byte_count = (size_t)cl;
sbin/unwind/libunbound/util/netevent.c
4877
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
4878
c->http_is_chunked = 1;
sbin/unwind/libunbound/util/netevent.c
4881
c->http_in_headers = 0;
sbin/unwind/libunbound/util/netevent.c
4882
if(c->http_is_chunked)
sbin/unwind/libunbound/util/netevent.c
4883
c->http_in_chunk_headers = 1;
sbin/unwind/libunbound/util/netevent.c
4888
http_moveover_buffer(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4889
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4899
http_process_chunk_header(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4901
char* line = http_header_line(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4903
if(c->http_in_chunk_headers == 3) {
sbin/unwind/libunbound/util/netevent.c
4906
if(line[0] == 0 && c->tcp_byte_count == 0) {
sbin/unwind/libunbound/util/netevent.c
4909
sldns_buffer_set_position(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
4910
sldns_buffer_set_limit(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
4911
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
4912
(void)(*c->callback)(c, c->cb_arg, NETEVENT_DONE, NULL);
sbin/unwind/libunbound/util/netevent.c
4918
c->http_in_chunk_headers = 1;
sbin/unwind/libunbound/util/netevent.c
4920
http_moveover_buffer(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4921
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4928
if(c->http_in_chunk_headers == 1) {
sbin/unwind/libunbound/util/netevent.c
4939
c->tcp_byte_count = (size_t)chunk_sz;
sbin/unwind/libunbound/util/netevent.c
4940
c->http_in_chunk_headers = 0;
sbin/unwind/libunbound/util/netevent.c
4942
http_moveover_buffer(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4943
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4944
if(c->tcp_byte_count == 0) {
sbin/unwind/libunbound/util/netevent.c
4946
c->http_in_chunk_headers = 3;
sbin/unwind/libunbound/util/netevent.c
4956
http_nonchunk_segment(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
4963
size_t got_now = sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4964
if(c->tcp_byte_count <= got_now) {
sbin/unwind/libunbound/util/netevent.c
4966
c->http_stored = 0;
sbin/unwind/libunbound/util/netevent.c
4967
sldns_buffer_set_position(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
4968
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
4969
(void)(*c->callback)(c, c->cb_arg, NETEVENT_DONE, NULL);
sbin/unwind/libunbound/util/netevent.c
4974
remainbufferlen = sldns_buffer_capacity(c->buffer) -
sbin/unwind/libunbound/util/netevent.c
4975
sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4976
if(remainbufferlen+got_now >= c->tcp_byte_count ||
sbin/unwind/libunbound/util/netevent.c
4977
remainbufferlen >= (size_t)(c->ssl?16384:2048)) {
sbin/unwind/libunbound/util/netevent.c
4978
size_t total = sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4979
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
4980
sldns_buffer_set_position(c->buffer, total);
sbin/unwind/libunbound/util/netevent.c
4981
c->http_stored = total;
sbin/unwind/libunbound/util/netevent.c
4987
c->tcp_byte_count -= got_now;
sbin/unwind/libunbound/util/netevent.c
4988
c->http_stored = 0;
sbin/unwind/libunbound/util/netevent.c
4989
sldns_buffer_set_position(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
4990
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
4991
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, NULL);
sbin/unwind/libunbound/util/netevent.c
4999
http_chunked_segment(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5006
size_t got_now = sldns_buffer_limit(c->buffer) - c->http_stored;
sbin/unwind/libunbound/util/netevent.c
5007
verbose(VERB_ALGO, "http_chunked_segment: got now %d, tcpbytcount %d, http_stored %d, buffer pos %d, buffer limit %d", (int)got_now, (int)c->tcp_byte_count, (int)c->http_stored, (int)sldns_buffer_position(c->buffer), (int)sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
5008
if(c->tcp_byte_count <= got_now) {
sbin/unwind/libunbound/util/netevent.c
5014
c->http_stored = 0;
sbin/unwind/libunbound/util/netevent.c
5015
sldns_buffer_skip(c->buffer, (ssize_t)c->tcp_byte_count);
sbin/unwind/libunbound/util/netevent.c
5016
sldns_buffer_clear(c->http_temp);
sbin/unwind/libunbound/util/netevent.c
5017
sldns_buffer_write(c->http_temp,
sbin/unwind/libunbound/util/netevent.c
5018
sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
5019
sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
5020
sldns_buffer_flip(c->http_temp);
sbin/unwind/libunbound/util/netevent.c
5023
fraglen = sldns_buffer_position(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5024
sldns_buffer_set_position(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
5025
sldns_buffer_set_limit(c->buffer, fraglen);
sbin/unwind/libunbound/util/netevent.c
5026
repinfo = c->repinfo;
sbin/unwind/libunbound/util/netevent.c
5027
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
5028
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &repinfo);
sbin/unwind/libunbound/util/netevent.c
5032
if(!repinfo.c) {
sbin/unwind/libunbound/util/netevent.c
5036
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5037
sldns_buffer_write(c->buffer,
sbin/unwind/libunbound/util/netevent.c
5038
sldns_buffer_begin(c->http_temp),
sbin/unwind/libunbound/util/netevent.c
5039
sldns_buffer_remaining(c->http_temp));
sbin/unwind/libunbound/util/netevent.c
5040
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5043
c->http_in_chunk_headers = 3;
sbin/unwind/libunbound/util/netevent.c
5047
c->tcp_byte_count -= got_now;
sbin/unwind/libunbound/util/netevent.c
5051
remainbufferlen = sldns_buffer_capacity(c->buffer) -
sbin/unwind/libunbound/util/netevent.c
5052
sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5053
if(remainbufferlen >= c->tcp_byte_count ||
sbin/unwind/libunbound/util/netevent.c
5055
size_t total = sldns_buffer_limit(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5056
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5057
sldns_buffer_set_position(c->buffer, total);
sbin/unwind/libunbound/util/netevent.c
5058
c->http_stored = total;
sbin/unwind/libunbound/util/netevent.c
5064
c->http_stored = 0;
sbin/unwind/libunbound/util/netevent.c
5065
sldns_buffer_set_position(c->buffer, 0);
sbin/unwind/libunbound/util/netevent.c
5066
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
5067
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, NULL);
sbin/unwind/libunbound/util/netevent.c
5075
static struct http2_session* http2_session_create(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5082
session->c = c;
sbin/unwind/libunbound/util/netevent.c
5171
log_assert(h2_session->c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
5172
log_assert(h2_session->c->h2_session);
sbin/unwind/libunbound/util/netevent.c
5173
if(++h2_session->reads_count > h2_session->c->http2_max_streams) {
sbin/unwind/libunbound/util/netevent.c
5184
if(h2_session->c->ssl) {
sbin/unwind/libunbound/util/netevent.c
5187
r = SSL_read(h2_session->c->ssl, buf, len);
sbin/unwind/libunbound/util/netevent.c
5189
int want = SSL_get_error(h2_session->c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
5195
h2_session->c->ssl_shake_state = comm_ssl_shake_hs_write;
sbin/unwind/libunbound/util/netevent.c
5196
comm_point_listen_for_rw(h2_session->c, 0, 1);
sbin/unwind/libunbound/util/netevent.c
5215
ret = recv(h2_session->c->fd, (void*)buf, len, MSG_DONTWAIT);
sbin/unwind/libunbound/util/netevent.c
5227
&h2_session->c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
5228
h2_session->c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5235
ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
sbin/unwind/libunbound/util/netevent.c
5241
&h2_session->c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
5242
h2_session->c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5252
comm_point_http2_handle_read(int ATTR_UNUSED(fd), struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5256
log_assert(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
5259
ret = nghttp2_session_recv(c->h2_session->session);
sbin/unwind/libunbound/util/netevent.c
5264
addr_to_str(&c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
5265
c->repinfo.remote_addrlen, a, sizeof(a));
sbin/unwind/libunbound/util/netevent.c
5271
if(nghttp2_session_want_write(c->h2_session->session)) {
sbin/unwind/libunbound/util/netevent.c
5272
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
5273
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
5274
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
5275
} else if(!nghttp2_session_want_read(c->h2_session->session))
sbin/unwind/libunbound/util/netevent.c
5279
(void)c;
sbin/unwind/libunbound/util/netevent.c
5291
comm_point_http_handle_read(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5293
log_assert(c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
5298
if(c->ssl && c->ssl_shake_state != comm_ssl_shake_none) {
sbin/unwind/libunbound/util/netevent.c
5299
if(!ssl_handshake(c))
sbin/unwind/libunbound/util/netevent.c
5301
if(c->ssl_shake_state != comm_ssl_shake_none)
sbin/unwind/libunbound/util/netevent.c
5306
if(!c->tcp_is_reading)
sbin/unwind/libunbound/util/netevent.c
5309
if(c->use_h2) {
sbin/unwind/libunbound/util/netevent.c
5310
return comm_point_http2_handle_read(fd, c);
sbin/unwind/libunbound/util/netevent.c
5315
if(c->http_min_version >= http_version_2) {
sbin/unwind/libunbound/util/netevent.c
5321
if(c->ssl) {
sbin/unwind/libunbound/util/netevent.c
5322
if(!ssl_http_read_more(c))
sbin/unwind/libunbound/util/netevent.c
5325
if(!http_read_more(fd, c))
sbin/unwind/libunbound/util/netevent.c
5329
if(c->http_stored >= sldns_buffer_position(c->buffer)) {
sbin/unwind/libunbound/util/netevent.c
5334
sldns_buffer_flip(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5337
if(c->http_stored < sldns_buffer_limit(c->buffer))
sbin/unwind/libunbound/util/netevent.c
5338
sldns_buffer_set_position(c->buffer, c->http_stored);
sbin/unwind/libunbound/util/netevent.c
5339
else sldns_buffer_set_position(c->buffer, sldns_buffer_limit(c->buffer));
sbin/unwind/libunbound/util/netevent.c
5341
while(sldns_buffer_remaining(c->buffer) > 0) {
sbin/unwind/libunbound/util/netevent.c
5344
if(c->http_in_headers || c->http_in_chunk_headers) {
sbin/unwind/libunbound/util/netevent.c
5346
if(!http_header_done(c->buffer)) {
sbin/unwind/libunbound/util/netevent.c
5349
http_moveover_buffer(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5353
if(!c->http_in_chunk_headers) {
sbin/unwind/libunbound/util/netevent.c
5355
if(!http_process_initial_header(c))
sbin/unwind/libunbound/util/netevent.c
5359
int r = http_process_chunk_header(c);
sbin/unwind/libunbound/util/netevent.c
5368
if(!c->http_is_chunked) {
sbin/unwind/libunbound/util/netevent.c
5370
return http_nonchunk_segment(c);
sbin/unwind/libunbound/util/netevent.c
5373
int r = http_chunked_segment(c);
sbin/unwind/libunbound/util/netevent.c
5382
http_moveover_buffer(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5389
http_check_connect(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5413
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5419
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
542
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
sbin/unwind/libunbound/util/netevent.c
5425
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5435
ssl_http_write_more(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5439
log_assert(sldns_buffer_remaining(c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
5441
r = SSL_write(c->ssl, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
5442
(int)sldns_buffer_remaining(c->buffer));
sbin/unwind/libunbound/util/netevent.c
5444
int want = SSL_get_error(c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
5448
c->ssl_shake_state = comm_ssl_shake_hs_read;
sbin/unwind/libunbound/util/netevent.c
5449
comm_point_listen_for_rw(c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
546
sent = send(c->fd, (void*)sldns_buffer_begin(packet),
sbin/unwind/libunbound/util/netevent.c
5466
sldns_buffer_skip(c->buffer, (ssize_t)r);
sbin/unwind/libunbound/util/netevent.c
5469
(void)c;
sbin/unwind/libunbound/util/netevent.c
5476
http_write_more(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5479
log_assert(sldns_buffer_remaining(c->buffer) > 0);
sbin/unwind/libunbound/util/netevent.c
5480
r = send(fd, (void*)sldns_buffer_current(c->buffer),
sbin/unwind/libunbound/util/netevent.c
5481
sldns_buffer_remaining(c->buffer), 0);
sbin/unwind/libunbound/util/netevent.c
5490
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
5495
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5498
sldns_buffer_skip(c->buffer, r);
sbin/unwind/libunbound/util/netevent.c
5508
log_assert(h2_session->c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
5509
log_assert(h2_session->c->h2_session);
sbin/unwind/libunbound/util/netevent.c
5512
if(h2_session->c->ssl) {
sbin/unwind/libunbound/util/netevent.c
5515
r = SSL_write(h2_session->c->ssl, buf, len);
sbin/unwind/libunbound/util/netevent.c
5517
int want = SSL_get_error(h2_session->c->ssl, r);
sbin/unwind/libunbound/util/netevent.c
5521
h2_session->c->ssl_shake_state = comm_ssl_shake_hs_read;
sbin/unwind/libunbound/util/netevent.c
5522
comm_point_listen_for_rw(h2_session->c, 1, 0);
sbin/unwind/libunbound/util/netevent.c
5543
ret = send(h2_session->c->fd, (void*)buf, len, 0);
sbin/unwind/libunbound/util/netevent.c
5559
&h2_session->c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
5560
h2_session->c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5567
ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
sbin/unwind/libunbound/util/netevent.c
5575
&h2_session->c->repinfo.remote_addr,
sbin/unwind/libunbound/util/netevent.c
5576
h2_session->c->repinfo.remote_addrlen);
sbin/unwind/libunbound/util/netevent.c
5586
comm_point_http2_handle_write(int ATTR_UNUSED(fd), struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5590
log_assert(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
5592
ret = nghttp2_session_send(c->h2_session->session);
sbin/unwind/libunbound/util/netevent.c
5599
if(nghttp2_session_want_read(c->h2_session->session)) {
sbin/unwind/libunbound/util/netevent.c
5600
c->tcp_is_reading = 1;
sbin/unwind/libunbound/util/netevent.c
5601
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
5602
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
sbin/unwind/libunbound/util/netevent.c
5603
} else if(!nghttp2_session_want_write(c->h2_session->session))
sbin/unwind/libunbound/util/netevent.c
5607
(void)c;
sbin/unwind/libunbound/util/netevent.c
5619
comm_point_http_handle_write(int fd, struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
5621
log_assert(c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
5626
if(c->tcp_check_nb_connect) {
sbin/unwind/libunbound/util/netevent.c
5627
int r = http_check_connect(fd, c);
sbin/unwind/libunbound/util/netevent.c
5630
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
5634
if(c->ssl && c->ssl_shake_state != comm_ssl_shake_none) {
sbin/unwind/libunbound/util/netevent.c
5635
if(!ssl_handshake(c))
sbin/unwind/libunbound/util/netevent.c
5637
if(c->ssl_shake_state != comm_ssl_shake_none)
sbin/unwind/libunbound/util/netevent.c
5641
if(c->tcp_is_reading)
sbin/unwind/libunbound/util/netevent.c
5644
if(c->use_h2) {
sbin/unwind/libunbound/util/netevent.c
5645
return comm_point_http2_handle_write(fd, c);
sbin/unwind/libunbound/util/netevent.c
5650
if(c->http_min_version >= http_version_2) {
sbin/unwind/libunbound/util/netevent.c
5656
if(c->ssl) {
sbin/unwind/libunbound/util/netevent.c
5657
if(!ssl_http_write_more(c))
sbin/unwind/libunbound/util/netevent.c
5660
if(!http_write_more(fd, c))
sbin/unwind/libunbound/util/netevent.c
5667
if(sldns_buffer_remaining(c->buffer) == 0) {
sbin/unwind/libunbound/util/netevent.c
5668
sldns_buffer_clear(c->buffer);
sbin/unwind/libunbound/util/netevent.c
5669
if(c->tcp_do_toggle_rw)
sbin/unwind/libunbound/util/netevent.c
5670
c->tcp_is_reading = 1;
sbin/unwind/libunbound/util/netevent.c
5671
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
5673
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/netevent.c
5674
comm_point_start_listening(c, -1, -1);
sbin/unwind/libunbound/util/netevent.c
5682
struct comm_point* c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
5683
log_assert(c->type == comm_http);
sbin/unwind/libunbound/util/netevent.c
5684
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
5688
reclaim_http_handler(c);
sbin/unwind/libunbound/util/netevent.c
5689
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
5690
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
5691
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
5697
if(!comm_point_http_handle_read(fd, c)) {
sbin/unwind/libunbound/util/netevent.c
5698
reclaim_http_handler(c);
sbin/unwind/libunbound/util/netevent.c
5699
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
5701
c->callback));
sbin/unwind/libunbound/util/netevent.c
5702
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
5709
if(!comm_point_http_handle_write(fd, c)) {
sbin/unwind/libunbound/util/netevent.c
5710
reclaim_http_handler(c);
sbin/unwind/libunbound/util/netevent.c
5711
if(!c->tcp_do_close) {
sbin/unwind/libunbound/util/netevent.c
5713
c->callback));
sbin/unwind/libunbound/util/netevent.c
5714
(void)(*c->callback)(c, c->cb_arg,
sbin/unwind/libunbound/util/netevent.c
5725
struct comm_point* c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
5726
log_assert(c->type == comm_local);
sbin/unwind/libunbound/util/netevent.c
5727
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
5730
if(!comm_point_tcp_handle_read(fd, c, 1)) {
sbin/unwind/libunbound/util/netevent.c
5731
fptr_ok(fptr_whitelist_comm_point(c->callback));
sbin/unwind/libunbound/util/netevent.c
5732
(void)(*c->callback)(c, c->cb_arg, NETEVENT_CLOSED,
sbin/unwind/libunbound/util/netevent.c
5743
struct comm_point* c = (struct comm_point*)arg;
sbin/unwind/libunbound/util/netevent.c
5745
log_assert(c->type == comm_raw);
sbin/unwind/libunbound/util/netevent.c
5746
ub_comm_base_now(c->ev->base);
sbin/unwind/libunbound/util/netevent.c
5750
fptr_ok(fptr_whitelist_comm_point_raw(c->callback));
sbin/unwind/libunbound/util/netevent.c
5751
(void)(*c->callback)(c, c->cb_arg, err, NULL);
sbin/unwind/libunbound/util/netevent.c
5759
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5762
if(!c)
sbin/unwind/libunbound/util/netevent.c
5764
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5766
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
5767
free(c);
sbin/unwind/libunbound/util/netevent.c
5770
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
5771
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
5772
c->buffer = buffer;
sbin/unwind/libunbound/util/netevent.c
5773
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
5774
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
5775
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
5776
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
5777
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5778
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5779
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
5780
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
5781
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
5782
c->type = comm_udp;
sbin/unwind/libunbound/util/netevent.c
5783
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
5784
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
5785
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
5786
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
5788
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
5791
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
5792
c->dnscrypt_buffer = buffer;
sbin/unwind/libunbound/util/netevent.c
5794
c->inuse = 0;
sbin/unwind/libunbound/util/netevent.c
5795
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
5796
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
5797
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
5798
c->pp2_enabled = pp2_enabled;
sbin/unwind/libunbound/util/netevent.c
5799
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
5802
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
5803
comm_point_udp_callback, c);
sbin/unwind/libunbound/util/netevent.c
5804
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
5806
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5809
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
sbin/unwind/libunbound/util/netevent.c
5811
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5814
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
5815
return c;
sbin/unwind/libunbound/util/netevent.c
5824
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5827
if(!c)
sbin/unwind/libunbound/util/netevent.c
5829
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5831
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
5832
free(c);
sbin/unwind/libunbound/util/netevent.c
5835
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
5836
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
5837
c->buffer = buffer;
sbin/unwind/libunbound/util/netevent.c
5838
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
5839
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
5840
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
5841
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
5842
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5843
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5844
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
5845
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
5846
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
5847
c->type = comm_udp;
sbin/unwind/libunbound/util/netevent.c
5848
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
5849
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
5851
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
5852
c->dnscrypt_buffer = buffer;
sbin/unwind/libunbound/util/netevent.c
5854
c->inuse = 0;
sbin/unwind/libunbound/util/netevent.c
5855
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
5856
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
5858
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
5860
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
5861
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
5862
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
5863
c->pp2_enabled = pp2_enabled;
sbin/unwind/libunbound/util/netevent.c
5864
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
5867
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
5868
comm_point_udp_ancil_callback, c);
sbin/unwind/libunbound/util/netevent.c
5869
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
5871
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5874
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
sbin/unwind/libunbound/util/netevent.c
5876
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5879
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
5880
return c;
sbin/unwind/libunbound/util/netevent.c
5892
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5896
if(!c)
sbin/unwind/libunbound/util/netevent.c
5898
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5900
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
5901
free(c);
sbin/unwind/libunbound/util/netevent.c
5904
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
5905
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
5906
c->buffer = buffer;
sbin/unwind/libunbound/util/netevent.c
5907
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
5908
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
5909
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
5910
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
5911
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5912
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
5913
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
5914
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
5915
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
5916
c->type = comm_doq;
sbin/unwind/libunbound/util/netevent.c
5917
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
5918
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
5919
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
5920
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
5922
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
5925
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
5926
c->dnscrypt_buffer = NULL;
sbin/unwind/libunbound/util/netevent.c
5928
c->doq_socket = doq_server_socket_create(table, rnd, quic_sslctx, c,
sbin/unwind/libunbound/util/netevent.c
5930
if(!c->doq_socket) {
sbin/unwind/libunbound/util/netevent.c
5932
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5935
c->inuse = 0;
sbin/unwind/libunbound/util/netevent.c
5936
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
5937
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
5938
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
5939
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
5940
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
5943
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
5944
comm_point_doq_callback, c);
sbin/unwind/libunbound/util/netevent.c
5945
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
5947
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5950
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
sbin/unwind/libunbound/util/netevent.c
5952
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
5955
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
5956
return c;
sbin/unwind/libunbound/util/netevent.c
5979
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5982
if(!c)
sbin/unwind/libunbound/util/netevent.c
5984
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
5986
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
5987
free(c);
sbin/unwind/libunbound/util/netevent.c
5990
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
5991
c->fd = -1;
sbin/unwind/libunbound/util/netevent.c
5992
c->buffer = sldns_buffer_new(bufsize);
sbin/unwind/libunbound/util/netevent.c
5993
if(!c->buffer) {
sbin/unwind/libunbound/util/netevent.c
5994
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
5995
free(c);
sbin/unwind/libunbound/util/netevent.c
5998
c->timeout = (struct timeval*)malloc(sizeof(struct timeval));
sbin/unwind/libunbound/util/netevent.c
5999
if(!c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6000
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6001
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6002
free(c);
sbin/unwind/libunbound/util/netevent.c
6005
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6006
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6007
c->tcp_parent = parent;
sbin/unwind/libunbound/util/netevent.c
6008
c->tcp_timeout_msec = parent->tcp_timeout_msec;
sbin/unwind/libunbound/util/netevent.c
6009
c->tcp_conn_limit = parent->tcp_conn_limit;
sbin/unwind/libunbound/util/netevent.c
6010
c->tcl_addr = NULL;
sbin/unwind/libunbound/util/netevent.c
6011
c->tcp_keepalive = 0;
sbin/unwind/libunbound/util/netevent.c
6012
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6013
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6014
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6015
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6016
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6017
c->type = comm_tcp;
sbin/unwind/libunbound/util/netevent.c
6018
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6019
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
6020
c->tcp_do_toggle_rw = 1;
sbin/unwind/libunbound/util/netevent.c
6021
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
6023
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
6026
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6029
c->dnscrypt_buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
6031
c->repinfo.c = c;
sbin/unwind/libunbound/util/netevent.c
6032
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6033
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6034
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
6035
c->pp2_enabled = parent->pp2_enabled;
sbin/unwind/libunbound/util/netevent.c
6036
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6038
c->tcp_req_info = tcp_req_info_create(spoolbuf);
sbin/unwind/libunbound/util/netevent.c
6039
if(!c->tcp_req_info) {
sbin/unwind/libunbound/util/netevent.c
6041
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6042
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6043
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6044
free(c);
sbin/unwind/libunbound/util/netevent.c
6047
c->tcp_req_info->cp = c;
sbin/unwind/libunbound/util/netevent.c
6048
c->tcp_do_close = 1;
sbin/unwind/libunbound/util/netevent.c
6049
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
6052
c->tcp_free = parent->tcp_free;
sbin/unwind/libunbound/util/netevent.c
6053
parent->tcp_free = c;
sbin/unwind/libunbound/util/netevent.c
6054
c->is_in_tcp_free = 1;
sbin/unwind/libunbound/util/netevent.c
6057
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6058
comm_point_tcp_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6059
if(c->ev->ev == NULL)
sbin/unwind/libunbound/util/netevent.c
6062
parent->tcp_free = c->tcp_free;
sbin/unwind/libunbound/util/netevent.c
6063
tcp_req_info_delete(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
6064
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6065
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6066
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6067
free(c);
sbin/unwind/libunbound/util/netevent.c
6070
return c;
sbin/unwind/libunbound/util/netevent.c
6080
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6083
if(!c)
sbin/unwind/libunbound/util/netevent.c
6085
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6087
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6088
free(c);
sbin/unwind/libunbound/util/netevent.c
6091
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6092
c->fd = -1;
sbin/unwind/libunbound/util/netevent.c
6093
c->buffer = sldns_buffer_new(bufsize);
sbin/unwind/libunbound/util/netevent.c
6094
if(!c->buffer) {
sbin/unwind/libunbound/util/netevent.c
6095
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6096
free(c);
sbin/unwind/libunbound/util/netevent.c
6099
c->timeout = (struct timeval*)malloc(sizeof(struct timeval));
sbin/unwind/libunbound/util/netevent.c
6100
if(!c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6101
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6102
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6103
free(c);
sbin/unwind/libunbound/util/netevent.c
6106
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6107
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6108
c->tcp_parent = parent;
sbin/unwind/libunbound/util/netevent.c
6109
c->tcp_timeout_msec = parent->tcp_timeout_msec;
sbin/unwind/libunbound/util/netevent.c
6110
c->tcp_conn_limit = parent->tcp_conn_limit;
sbin/unwind/libunbound/util/netevent.c
6111
c->tcl_addr = NULL;
sbin/unwind/libunbound/util/netevent.c
6112
c->tcp_keepalive = 0;
sbin/unwind/libunbound/util/netevent.c
6113
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6114
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6115
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6116
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6117
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6118
c->type = comm_http;
sbin/unwind/libunbound/util/netevent.c
6119
c->tcp_do_close = 1;
sbin/unwind/libunbound/util/netevent.c
6120
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
6121
c->tcp_do_toggle_rw = 1; /* will be set to 0 after http2 upgrade */
sbin/unwind/libunbound/util/netevent.c
6122
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
6124
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
6127
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6128
c->dnscrypt_buffer = NULL;
sbin/unwind/libunbound/util/netevent.c
6130
c->repinfo.c = c;
sbin/unwind/libunbound/util/netevent.c
6131
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6132
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6133
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
6134
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
6135
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6137
c->http_min_version = http_version_2;
sbin/unwind/libunbound/util/netevent.c
6138
c->http2_stream_max_qbuffer_size = bufsize;
sbin/unwind/libunbound/util/netevent.c
6140
c->http2_stream_max_qbuffer_size = 512;
sbin/unwind/libunbound/util/netevent.c
6141
c->http2_max_streams = http_max_streams;
sbin/unwind/libunbound/util/netevent.c
6142
if(!(c->http_endpoint = strdup(http_endpoint))) {
sbin/unwind/libunbound/util/netevent.c
6144
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6145
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6146
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6147
free(c);
sbin/unwind/libunbound/util/netevent.c
6150
c->use_h2 = 0;
sbin/unwind/libunbound/util/netevent.c
6152
if(!(c->h2_session = http2_session_create(c))) {
sbin/unwind/libunbound/util/netevent.c
6154
free(c->http_endpoint);
sbin/unwind/libunbound/util/netevent.c
6155
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6156
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6157
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6158
free(c);
sbin/unwind/libunbound/util/netevent.c
6161
if(!(c->h2_session->callbacks = http2_req_callbacks_create())) {
sbin/unwind/libunbound/util/netevent.c
6163
http2_session_delete(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
6164
free(c->http_endpoint);
sbin/unwind/libunbound/util/netevent.c
6165
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6166
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6167
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6168
free(c);
sbin/unwind/libunbound/util/netevent.c
6174
c->tcp_free = parent->tcp_free;
sbin/unwind/libunbound/util/netevent.c
6175
parent->tcp_free = c;
sbin/unwind/libunbound/util/netevent.c
6176
c->is_in_tcp_free = 1;
sbin/unwind/libunbound/util/netevent.c
6179
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6180
comm_point_http_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6181
if(c->ev->ev == NULL)
sbin/unwind/libunbound/util/netevent.c
6184
parent->tcp_free = c->tcp_free;
sbin/unwind/libunbound/util/netevent.c
6185
http2_session_delete(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
6186
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6187
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6188
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6189
free(c);
sbin/unwind/libunbound/util/netevent.c
6192
return c;
sbin/unwind/libunbound/util/netevent.c
6204
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6209
if(!c)
sbin/unwind/libunbound/util/netevent.c
6211
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6213
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6214
free(c);
sbin/unwind/libunbound/util/netevent.c
6217
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6218
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
6219
c->buffer = NULL;
sbin/unwind/libunbound/util/netevent.c
6220
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
6221
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6222
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6223
c->tcp_timeout_msec = idle_timeout;
sbin/unwind/libunbound/util/netevent.c
6224
c->tcp_conn_limit = tcp_conn_limit;
sbin/unwind/libunbound/util/netevent.c
6225
c->tcl_addr = NULL;
sbin/unwind/libunbound/util/netevent.c
6226
c->tcp_keepalive = 0;
sbin/unwind/libunbound/util/netevent.c
6227
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
6228
c->max_tcp_count = num;
sbin/unwind/libunbound/util/netevent.c
6229
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6230
c->tcp_handlers = (struct comm_point**)calloc((size_t)num,
sbin/unwind/libunbound/util/netevent.c
6232
if(!c->tcp_handlers) {
sbin/unwind/libunbound/util/netevent.c
6233
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6234
free(c);
sbin/unwind/libunbound/util/netevent.c
6237
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6238
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6239
c->type = comm_tcp_accept;
sbin/unwind/libunbound/util/netevent.c
6240
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6241
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
6242
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
6243
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
6245
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
6248
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6249
c->dnscrypt_buffer = NULL;
sbin/unwind/libunbound/util/netevent.c
625
comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
sbin/unwind/libunbound/util/netevent.c
6251
c->callback = NULL;
sbin/unwind/libunbound/util/netevent.c
6252
c->cb_arg = NULL;
sbin/unwind/libunbound/util/netevent.c
6253
c->socket = socket;
sbin/unwind/libunbound/util/netevent.c
6254
c->pp2_enabled = (port_type==listen_type_http?0:pp2_enabled);
sbin/unwind/libunbound/util/netevent.c
6255
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6258
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6259
comm_point_tcp_accept_callback, c);
sbin/unwind/libunbound/util/netevent.c
6260
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
6262
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
6265
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
sbin/unwind/libunbound/util/netevent.c
6267
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
6270
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
6276
c->tcp_handlers[i] = comm_point_create_tcp_handler(base,
sbin/unwind/libunbound/util/netevent.c
6277
c, bufsize, spoolbuf, callback, callback_arg, socket);
sbin/unwind/libunbound/util/netevent.c
6279
c->tcp_handlers[i] = comm_point_create_http_handler(
sbin/unwind/libunbound/util/netevent.c
6280
base, c, bufsize, harden_large_queries,
sbin/unwind/libunbound/util/netevent.c
6289
if(!c->tcp_handlers[i]) {
sbin/unwind/libunbound/util/netevent.c
6290
comm_point_delete(c);
sbin/unwind/libunbound/util/netevent.c
6295
return c;
sbin/unwind/libunbound/util/netevent.c
6302
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6305
if(!c)
sbin/unwind/libunbound/util/netevent.c
6307
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6309
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6310
free(c);
sbin/unwind/libunbound/util/netevent.c
6313
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6314
c->fd = -1;
sbin/unwind/libunbound/util/netevent.c
6315
c->buffer = sldns_buffer_new(bufsize);
sbin/unwind/libunbound/util/netevent.c
6316
if(!c->buffer) {
sbin/unwind/libunbound/util/netevent.c
6317
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6318
free(c);
sbin/unwind/libunbound/util/netevent.c
6321
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
6322
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6323
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6324
c->tcp_timeout_msec = TCP_QUERY_TIMEOUT;
sbin/unwind/libunbound/util/netevent.c
6325
c->tcp_conn_limit = NULL;
sbin/unwind/libunbound/util/netevent.c
6326
c->tcl_addr = NULL;
sbin/unwind/libunbound/util/netevent.c
6327
c->tcp_keepalive = 0;
sbin/unwind/libunbound/util/netevent.c
6328
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
6329
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6330
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6331
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6332
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6333
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6334
c->type = comm_tcp;
sbin/unwind/libunbound/util/netevent.c
6335
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6336
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
6337
c->tcp_do_toggle_rw = 1;
sbin/unwind/libunbound/util/netevent.c
6338
c->tcp_check_nb_connect = 1;
sbin/unwind/libunbound/util/netevent.c
6340
c->tcp_do_fastopen = 1;
sbin/unwind/libunbound/util/netevent.c
6343
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6344
c->dnscrypt_buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
6346
c->repinfo.c = c;
sbin/unwind/libunbound/util/netevent.c
6347
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6348
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6349
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
6350
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6352
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6353
comm_point_tcp_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6354
if(c->ev->ev == NULL)
sbin/unwind/libunbound/util/netevent.c
6357
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6358
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6359
free(c);
sbin/unwind/libunbound/util/netevent.c
6363
return c;
sbin/unwind/libunbound/util/netevent.c
6371
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6374
if(!c)
sbin/unwind/libunbound/util/netevent.c
6376
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6378
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6379
free(c);
sbin/unwind/libunbound/util/netevent.c
6382
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6383
c->fd = -1;
sbin/unwind/libunbound/util/netevent.c
6384
c->buffer = sldns_buffer_new(bufsize);
sbin/unwind/libunbound/util/netevent.c
6385
if(!c->buffer) {
sbin/unwind/libunbound/util/netevent.c
6386
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6387
free(c);
sbin/unwind/libunbound/util/netevent.c
6390
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
6391
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6392
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6393
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
6394
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6395
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6396
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6397
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6398
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6399
c->type = comm_http;
sbin/unwind/libunbound/util/netevent.c
640
log_assert(c->fd != -1);
sbin/unwind/libunbound/util/netevent.c
6400
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6401
c->do_not_close = 0;
sbin/unwind/libunbound/util/netevent.c
6402
c->tcp_do_toggle_rw = 1;
sbin/unwind/libunbound/util/netevent.c
6403
c->tcp_check_nb_connect = 1;
sbin/unwind/libunbound/util/netevent.c
6404
c->http_in_headers = 1;
sbin/unwind/libunbound/util/netevent.c
6405
c->http_in_chunk_headers = 0;
sbin/unwind/libunbound/util/netevent.c
6406
c->http_is_chunked = 0;
sbin/unwind/libunbound/util/netevent.c
6407
c->http_temp = temp;
sbin/unwind/libunbound/util/netevent.c
6409
c->tcp_do_fastopen = 1;
sbin/unwind/libunbound/util/netevent.c
6412
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6413
c->dnscrypt_buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
6415
c->repinfo.c = c;
sbin/unwind/libunbound/util/netevent.c
6416
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6417
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6418
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
6419
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6421
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6422
comm_point_http_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6423
if(c->ev->ev == NULL)
sbin/unwind/libunbound/util/netevent.c
6427
SSL_free(c->ssl);
sbin/unwind/libunbound/util/netevent.c
6429
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6430
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6431
free(c);
sbin/unwind/libunbound/util/netevent.c
6435
return c;
sbin/unwind/libunbound/util/netevent.c
6442
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6445
if(!c)
sbin/unwind/libunbound/util/netevent.c
6447
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6449
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6450
free(c);
sbin/unwind/libunbound/util/netevent.c
6453
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6454
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
6455
c->buffer = sldns_buffer_new(bufsize);
sbin/unwind/libunbound/util/netevent.c
6456
if(!c->buffer) {
sbin/unwind/libunbound/util/netevent.c
6457
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6458
free(c);
sbin/unwind/libunbound/util/netevent.c
6461
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
6462
c->tcp_is_reading = 1;
sbin/unwind/libunbound/util/netevent.c
6463
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6464
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
6465
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6466
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6467
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6468
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6469
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6470
c->type = comm_local;
sbin/unwind/libunbound/util/netevent.c
6471
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6472
c->do_not_close = 1;
sbin/unwind/libunbound/util/netevent.c
6473
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
6474
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
6476
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
6479
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6480
c->dnscrypt_buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
6482
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6483
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6484
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
6485
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6488
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6489
comm_point_local_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6490
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
6492
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6493
free(c);
sbin/unwind/libunbound/util/netevent.c
6496
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
sbin/unwind/libunbound/util/netevent.c
6498
ub_event_free(c->ev->ev);
sbin/unwind/libunbound/util/netevent.c
6499
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6500
free(c);
sbin/unwind/libunbound/util/netevent.c
6503
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
6504
return c;
sbin/unwind/libunbound/util/netevent.c
6511
struct comm_point* c = (struct comm_point*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6514
if(!c)
sbin/unwind/libunbound/util/netevent.c
6516
c->ev = (struct internal_event*)calloc(1,
sbin/unwind/libunbound/util/netevent.c
6518
if(!c->ev) {
sbin/unwind/libunbound/util/netevent.c
6519
free(c);
sbin/unwind/libunbound/util/netevent.c
6522
c->ev->base = base;
sbin/unwind/libunbound/util/netevent.c
6523
c->fd = fd;
sbin/unwind/libunbound/util/netevent.c
6524
c->buffer = NULL;
sbin/unwind/libunbound/util/netevent.c
6525
c->timeout = NULL;
sbin/unwind/libunbound/util/netevent.c
6526
c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6527
c->tcp_byte_count = 0;
sbin/unwind/libunbound/util/netevent.c
6528
c->tcp_parent = NULL;
sbin/unwind/libunbound/util/netevent.c
6529
c->max_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6530
c->cur_tcp_count = 0;
sbin/unwind/libunbound/util/netevent.c
6531
c->tcp_handlers = NULL;
sbin/unwind/libunbound/util/netevent.c
6532
c->tcp_free = NULL;
sbin/unwind/libunbound/util/netevent.c
6533
c->is_in_tcp_free = 0;
sbin/unwind/libunbound/util/netevent.c
6534
c->type = comm_raw;
sbin/unwind/libunbound/util/netevent.c
6535
c->tcp_do_close = 0;
sbin/unwind/libunbound/util/netevent.c
6536
c->do_not_close = 1;
sbin/unwind/libunbound/util/netevent.c
6537
c->tcp_do_toggle_rw = 0;
sbin/unwind/libunbound/util/netevent.c
6538
c->tcp_check_nb_connect = 0;
sbin/unwind/libunbound/util/netevent.c
6540
c->tcp_do_fastopen = 0;
sbin/unwind/libunbound/util/netevent.c
6543
c->dnscrypt = 0;
sbin/unwind/libunbound/util/netevent.c
6544
c->dnscrypt_buffer = c->buffer;
sbin/unwind/libunbound/util/netevent.c
6546
c->callback = callback;
sbin/unwind/libunbound/util/netevent.c
6547
c->cb_arg = callback_arg;
sbin/unwind/libunbound/util/netevent.c
6548
c->pp2_enabled = 0;
sbin/unwind/libunbound/util/netevent.c
6549
c->pp2_header_state = pp2_header_none;
sbin/unwind/libunbound/util/netevent.c
6554
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
sbin/unwind/libunbound/util/netevent.c
6555
comm_point_raw_handle_callback, c);
sbin/unwind/libunbound/util/netevent.c
6556
if(c->ev->ev == NULL) {
sbin/unwind/libunbound/util/netevent.c
6558
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6559
free(c);
sbin/unwind/libunbound/util/netevent.c
6562
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
sbin/unwind/libunbound/util/netevent.c
6564
ub_event_free(c->ev->ev);
sbin/unwind/libunbound/util/netevent.c
6565
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6566
free(c);
sbin/unwind/libunbound/util/netevent.c
6569
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
6570
return c;
sbin/unwind/libunbound/util/netevent.c
6574
comm_point_close(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
6576
if(!c)
sbin/unwind/libunbound/util/netevent.c
6578
if(c->fd != -1) {
sbin/unwind/libunbound/util/netevent.c
6579
verbose(5, "comm_point_close of %d: event_del", c->fd);
sbin/unwind/libunbound/util/netevent.c
6580
if(c->event_added) {
sbin/unwind/libunbound/util/netevent.c
6581
if(ub_event_del(c->ev->ev) != 0) {
sbin/unwind/libunbound/util/netevent.c
6584
c->event_added = 0;
sbin/unwind/libunbound/util/netevent.c
6587
tcl_close_connection(c->tcl_addr);
sbin/unwind/libunbound/util/netevent.c
6588
if(c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
6589
tcp_req_info_clear(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
6590
if(c->h2_session)
sbin/unwind/libunbound/util/netevent.c
6591
http2_session_server_delete(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
6593
if(c->tcp_more_read_again && *c->tcp_more_read_again)
sbin/unwind/libunbound/util/netevent.c
6594
*c->tcp_more_read_again = 0;
sbin/unwind/libunbound/util/netevent.c
6595
if(c->tcp_more_write_again && *c->tcp_more_write_again)
sbin/unwind/libunbound/util/netevent.c
6596
*c->tcp_more_write_again = 0;
sbin/unwind/libunbound/util/netevent.c
6599
if(c->fd != -1 && !c->do_not_close) {
sbin/unwind/libunbound/util/netevent.c
6601
if(c->type == comm_tcp || c->type == comm_http) {
sbin/unwind/libunbound/util/netevent.c
6603
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
6604
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6607
verbose(VERB_ALGO, "close fd %d", c->fd);
sbin/unwind/libunbound/util/netevent.c
6608
sock_close(c->fd);
sbin/unwind/libunbound/util/netevent.c
6610
c->fd = -1;
sbin/unwind/libunbound/util/netevent.c
6614
comm_point_delete(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
6616
if(!c)
sbin/unwind/libunbound/util/netevent.c
6618
if((c->type == comm_tcp || c->type == comm_http) && c->ssl) {
sbin/unwind/libunbound/util/netevent.c
6620
SSL_shutdown(c->ssl);
sbin/unwind/libunbound/util/netevent.c
6621
SSL_free(c->ssl);
sbin/unwind/libunbound/util/netevent.c
6624
if(c->type == comm_http && c->http_endpoint) {
sbin/unwind/libunbound/util/netevent.c
6625
free(c->http_endpoint);
sbin/unwind/libunbound/util/netevent.c
6626
c->http_endpoint = NULL;
sbin/unwind/libunbound/util/netevent.c
6628
comm_point_close(c);
sbin/unwind/libunbound/util/netevent.c
6629
if(c->tcp_handlers) {
sbin/unwind/libunbound/util/netevent.c
6631
for(i=0; i<c->max_tcp_count; i++)
sbin/unwind/libunbound/util/netevent.c
6632
comm_point_delete(c->tcp_handlers[i]);
sbin/unwind/libunbound/util/netevent.c
6633
free(c->tcp_handlers);
sbin/unwind/libunbound/util/netevent.c
6635
free(c->timeout);
sbin/unwind/libunbound/util/netevent.c
6636
if(c->type == comm_tcp || c->type == comm_local || c->type == comm_http) {
sbin/unwind/libunbound/util/netevent.c
6637
sldns_buffer_free(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6639
if(c->dnscrypt && c->dnscrypt_buffer != c->buffer) {
sbin/unwind/libunbound/util/netevent.c
6640
sldns_buffer_free(c->dnscrypt_buffer);
sbin/unwind/libunbound/util/netevent.c
6643
if(c->tcp_req_info) {
sbin/unwind/libunbound/util/netevent.c
6644
tcp_req_info_delete(c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
6646
if(c->h2_session) {
sbin/unwind/libunbound/util/netevent.c
6647
http2_session_delete(c->h2_session);
sbin/unwind/libunbound/util/netevent.c
6651
if(c->doq_socket)
sbin/unwind/libunbound/util/netevent.c
6652
doq_server_socket_delete(c->doq_socket);
sbin/unwind/libunbound/util/netevent.c
6654
ub_event_free(c->ev->ev);
sbin/unwind/libunbound/util/netevent.c
6655
free(c->ev);
sbin/unwind/libunbound/util/netevent.c
6656
free(c);
sbin/unwind/libunbound/util/netevent.c
6677
log_assert(repinfo && repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6679
buffer = repinfo->c->dnscrypt_buffer;
sbin/unwind/libunbound/util/netevent.c
6681
repinfo->c->tcp_req_info?
sbin/unwind/libunbound/util/netevent.c
6682
repinfo->c->tcp_req_info->spool_buffer:repinfo->c->buffer)) {
sbin/unwind/libunbound/util/netevent.c
6686
buffer = repinfo->c->buffer;
sbin/unwind/libunbound/util/netevent.c
6688
if(repinfo->c->type == comm_udp) {
sbin/unwind/libunbound/util/netevent.c
6690
comm_point_send_udp_msg_if(repinfo->c, buffer,
sbin/unwind/libunbound/util/netevent.c
6694
comm_point_send_udp_msg(repinfo->c, buffer,
sbin/unwind/libunbound/util/netevent.c
6702
if(repinfo->c->dtenv != NULL && repinfo->c->dtenv->log_client_response_messages) {
sbin/unwind/libunbound/util/netevent.c
6703
send_reply_dnstap(repinfo->c->dtenv,
sbin/unwind/libunbound/util/netevent.c
6704
repinfo->c->socket->addr,
sbin/unwind/libunbound/util/netevent.c
6705
repinfo->c->socket->addrlen,
sbin/unwind/libunbound/util/netevent.c
6707
repinfo->c->type, repinfo->c->ssl,
sbin/unwind/libunbound/util/netevent.c
6708
repinfo->c->buffer);
sbin/unwind/libunbound/util/netevent.c
6715
repinfo->c->doq_socket
sbin/unwind/libunbound/util/netevent.c
6716
?repinfo->c->dtenv:
sbin/unwind/libunbound/util/netevent.c
6718
repinfo->c->tcp_parent->dtenv;
sbin/unwind/libunbound/util/netevent.c
6719
struct sldns_buffer* dtbuffer = repinfo->c->tcp_req_info
sbin/unwind/libunbound/util/netevent.c
6720
?repinfo->c->tcp_req_info->spool_buffer
sbin/unwind/libunbound/util/netevent.c
6721
:repinfo->c->buffer;
sbin/unwind/libunbound/util/netevent.c
6723
if(repinfo->c->dnscrypt && repinfo->is_dnscrypted)
sbin/unwind/libunbound/util/netevent.c
6724
dtbuffer = repinfo->c->buffer;
sbin/unwind/libunbound/util/netevent.c
6732
repinfo->c->socket->addr,
sbin/unwind/libunbound/util/netevent.c
6733
repinfo->c->socket->addrlen,
sbin/unwind/libunbound/util/netevent.c
6735
repinfo->c->type, repinfo->c->ssl,
sbin/unwind/libunbound/util/netevent.c
6739
if(repinfo->c->tcp_req_info) {
sbin/unwind/libunbound/util/netevent.c
6740
tcp_req_info_send_reply(repinfo->c->tcp_req_info);
sbin/unwind/libunbound/util/netevent.c
6741
} else if(repinfo->c->use_h2) {
sbin/unwind/libunbound/util/netevent.c
6742
if(!http2_submit_dns_response(repinfo->c->h2_session)) {
sbin/unwind/libunbound/util/netevent.c
6745
repinfo->c->h2_stream = NULL;
sbin/unwind/libunbound/util/netevent.c
6746
repinfo->c->tcp_is_reading = 0;
sbin/unwind/libunbound/util/netevent.c
6747
comm_point_stop_listening(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6748
comm_point_start_listening(repinfo->c, -1,
sbin/unwind/libunbound/util/netevent.c
6749
adjusted_tcp_timeout(repinfo->c));
sbin/unwind/libunbound/util/netevent.c
6752
} else if(repinfo->c->doq_socket) {
sbin/unwind/libunbound/util/netevent.c
6756
comm_point_start_listening(repinfo->c, -1,
sbin/unwind/libunbound/util/netevent.c
6757
adjusted_tcp_timeout(repinfo->c));
sbin/unwind/libunbound/util/netevent.c
6767
log_assert(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6768
log_assert(repinfo->c->type != comm_tcp_accept);
sbin/unwind/libunbound/util/netevent.c
6769
if(repinfo->c->type == comm_udp)
sbin/unwind/libunbound/util/netevent.c
6771
if(repinfo->c->tcp_req_info)
sbin/unwind/libunbound/util/netevent.c
6772
repinfo->c->tcp_req_info->is_drop = 1;
sbin/unwind/libunbound/util/netevent.c
6773
if(repinfo->c->type == comm_http) {
sbin/unwind/libunbound/util/netevent.c
6774
if(repinfo->c->h2_session) {
sbin/unwind/libunbound/util/netevent.c
6775
repinfo->c->h2_session->is_drop = 1;
sbin/unwind/libunbound/util/netevent.c
6776
if(!repinfo->c->h2_session->postpone_drop)
sbin/unwind/libunbound/util/netevent.c
6777
reclaim_http_handler(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6780
reclaim_http_handler(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6783
} else if(repinfo->c->doq_socket) {
sbin/unwind/libunbound/util/netevent.c
6788
reclaim_tcp_handler(repinfo->c);
sbin/unwind/libunbound/util/netevent.c
6792
comm_point_stop_listening(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
6794
verbose(VERB_ALGO, "comm point stop listening %d", c->fd);
sbin/unwind/libunbound/util/netevent.c
6795
if(c->event_added) {
sbin/unwind/libunbound/util/netevent.c
6796
if(ub_event_del(c->ev->ev) != 0) {
sbin/unwind/libunbound/util/netevent.c
6799
c->event_added = 0;
sbin/unwind/libunbound/util/netevent.c
6804
comm_point_start_listening(struct comm_point* c, int newfd, int msec)
sbin/unwind/libunbound/util/netevent.c
6807
c->fd==-1?newfd:c->fd, msec);
sbin/unwind/libunbound/util/netevent.c
6808
if(c->type == comm_tcp_accept && !c->tcp_free) {
sbin/unwind/libunbound/util/netevent.c
6812
if(c->event_added) {
sbin/unwind/libunbound/util/netevent.c
6813
if(ub_event_del(c->ev->ev) != 0) {
sbin/unwind/libunbound/util/netevent.c
6816
c->event_added = 0;
sbin/unwind/libunbound/util/netevent.c
6819
if(!c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6820
c->timeout = (struct timeval*)malloc(sizeof(
sbin/unwind/libunbound/util/netevent.c
6822
if(!c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6827
ub_event_add_bits(c->ev->ev, UB_EV_TIMEOUT);
sbin/unwind/libunbound/util/netevent.c
6829
c->timeout->tv_sec = msec/1000;
sbin/unwind/libunbound/util/netevent.c
6830
c->timeout->tv_usec = (msec%1000)*1000;
sbin/unwind/libunbound/util/netevent.c
6833
if(msec == 0 || !c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6834
ub_event_del_bits(c->ev->ev, UB_EV_TIMEOUT);
sbin/unwind/libunbound/util/netevent.c
6837
if(c->type == comm_tcp || c->type == comm_http) {
sbin/unwind/libunbound/util/netevent.c
6838
ub_event_del_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6839
if(c->tcp_write_and_read) {
sbin/unwind/libunbound/util/netevent.c
6840
verbose(5, "startlistening %d mode rw", (newfd==-1?c->fd:newfd));
sbin/unwind/libunbound/util/netevent.c
6841
ub_event_add_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6842
} else if(c->tcp_is_reading) {
sbin/unwind/libunbound/util/netevent.c
6843
verbose(5, "startlistening %d mode r", (newfd==-1?c->fd:newfd));
sbin/unwind/libunbound/util/netevent.c
6844
ub_event_add_bits(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
6846
verbose(5, "startlistening %d mode w", (newfd==-1?c->fd:newfd));
sbin/unwind/libunbound/util/netevent.c
6847
ub_event_add_bits(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6851
if(c->fd != -1 && c->fd != newfd) {
sbin/unwind/libunbound/util/netevent.c
6852
verbose(5, "cpsl close of fd %d for %d", c->fd, newfd);
sbin/unwind/libunbound/util/netevent.c
6853
sock_close(c->fd);
sbin/unwind/libunbound/util/netevent.c
6855
c->fd = newfd;
sbin/unwind/libunbound/util/netevent.c
6856
ub_event_set_fd(c->ev->ev, c->fd);
sbin/unwind/libunbound/util/netevent.c
6858
if(ub_event_add(c->ev->ev, msec==0?NULL:c->timeout) != 0) {
sbin/unwind/libunbound/util/netevent.c
6862
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
6865
void comm_point_listen_for_rw(struct comm_point* c, int rd, int wr)
sbin/unwind/libunbound/util/netevent.c
6867
verbose(VERB_ALGO, "comm point listen_for_rw %d %d", c->fd, wr);
sbin/unwind/libunbound/util/netevent.c
6868
if(c->event_added) {
sbin/unwind/libunbound/util/netevent.c
6869
if(ub_event_del(c->ev->ev) != 0) {
sbin/unwind/libunbound/util/netevent.c
6872
c->event_added = 0;
sbin/unwind/libunbound/util/netevent.c
6874
if(!c->timeout) {
sbin/unwind/libunbound/util/netevent.c
6875
ub_event_del_bits(c->ev->ev, UB_EV_TIMEOUT);
sbin/unwind/libunbound/util/netevent.c
6877
ub_event_del_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6878
if(rd) ub_event_add_bits(c->ev->ev, UB_EV_READ);
sbin/unwind/libunbound/util/netevent.c
6879
if(wr) ub_event_add_bits(c->ev->ev, UB_EV_WRITE);
sbin/unwind/libunbound/util/netevent.c
6880
if(ub_event_add(c->ev->ev, c->timeout) != 0) {
sbin/unwind/libunbound/util/netevent.c
6884
c->event_added = 1;
sbin/unwind/libunbound/util/netevent.c
6887
size_t comm_point_get_mem(struct comm_point* c)
sbin/unwind/libunbound/util/netevent.c
6890
if(!c)
sbin/unwind/libunbound/util/netevent.c
6892
s = sizeof(*c) + sizeof(*c->ev);
sbin/unwind/libunbound/util/netevent.c
6893
if(c->timeout)
sbin/unwind/libunbound/util/netevent.c
6894
s += sizeof(*c->timeout);
sbin/unwind/libunbound/util/netevent.c
6895
if(c->type == comm_tcp || c->type == comm_local) {
sbin/unwind/libunbound/util/netevent.c
6896
s += sizeof(*c->buffer) + sldns_buffer_capacity(c->buffer);
sbin/unwind/libunbound/util/netevent.c
6898
s += sizeof(*c->dnscrypt_buffer);
sbin/unwind/libunbound/util/netevent.c
6899
if(c->buffer != c->dnscrypt_buffer) {
sbin/unwind/libunbound/util/netevent.c
6900
s += sldns_buffer_capacity(c->dnscrypt_buffer);
sbin/unwind/libunbound/util/netevent.c
6904
if(c->type == comm_tcp_accept) {
sbin/unwind/libunbound/util/netevent.c
6906
for(i=0; i<c->max_tcp_count; i++)
sbin/unwind/libunbound/util/netevent.c
6907
s += comm_point_get_mem(c->tcp_handlers[i]);
sbin/unwind/libunbound/util/netevent.c
730
sent = sendmsg(c->fd, &msg, 0);
sbin/unwind/libunbound/util/netevent.c
773
p.fd = c->fd;
sbin/unwind/libunbound/util/netevent.c
787
struct comm_base* b = c->ev->base;
sbin/unwind/libunbound/util/netevent.c
856
sent = sendmsg(c->fd, &msg, 0);
sbin/unwind/libunbound/util/netevent.c
880
(void)c;
sbin/unwind/libunbound/util/netevent.h
1128
void doq_send_pkt(struct comm_point* c, struct doq_pkt_addr* paddr,
sbin/unwind/libunbound/util/netevent.h
1191
void comm_point_tcp_win_bio_cb(struct comm_point* c, void* ssl);
sbin/unwind/libunbound/util/netevent.h
140
struct comm_point* c;
sbin/unwind/libunbound/util/netevent.h
560
struct ub_event* comm_point_internal(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
711
void comm_point_close(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
718
void comm_point_delete(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
742
int comm_point_send_udp_msg(struct comm_point* c, struct sldns_buffer* packet,
sbin/unwind/libunbound/util/netevent.h
749
void comm_point_stop_listening(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
758
void comm_point_start_listening(struct comm_point* c, int newfd, int msec);
sbin/unwind/libunbound/util/netevent.h
766
void comm_point_listen_for_rw(struct comm_point* c, int rd, int wr);
sbin/unwind/libunbound/util/netevent.h
776
int adjusted_tcp_timeout(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
785
size_t comm_point_get_mem(struct comm_point* c);
sbin/unwind/libunbound/util/netevent.h
864
int comm_point_perform_accept(struct comm_point* c,
sbin/unwind/libunbound/util/netevent.h
943
struct comm_point* c;
sbin/unwind/libunbound/util/regional.c
215
size_t c = 1;
sbin/unwind/libunbound/util/regional.c
218
c++;
sbin/unwind/libunbound/util/regional.c
221
return c;
sbin/unwind/libunbound/util/regional.c
230
size_t c = 0;
sbin/unwind/libunbound/util/regional.c
233
c++;
sbin/unwind/libunbound/util/regional.c
236
return c;
sbin/unwind/libunbound/util/storage/lookup3.c
1013
uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
sbin/unwind/libunbound/util/storage/lookup3.c
1040
c[0] = hashlittle(a, hlen, m);
sbin/unwind/libunbound/util/storage/lookup3.c
1047
e[l] &= (c[l]^d[l]);
sbin/unwind/libunbound/util/storage/lookup3.c
1048
f[l] &= ~(c[l]^d[l]);
sbin/unwind/libunbound/util/storage/lookup3.c
1049
g[l] &= c[l];
sbin/unwind/libunbound/util/storage/lookup3.c
1050
h[l] &= ~c[l];
sbin/unwind/libunbound/util/storage/lookup3.c
173
#define mix(a,b,c) \
sbin/unwind/libunbound/util/storage/lookup3.c
175
a -= c; a ^= rot(c, 4); c += b; \
sbin/unwind/libunbound/util/storage/lookup3.c
176
b -= a; b ^= rot(a, 6); a += c; \
sbin/unwind/libunbound/util/storage/lookup3.c
177
c -= b; c ^= rot(b, 8); b += a; \
sbin/unwind/libunbound/util/storage/lookup3.c
178
a -= c; a ^= rot(c,16); c += b; \
sbin/unwind/libunbound/util/storage/lookup3.c
179
b -= a; b ^= rot(a,19); a += c; \
sbin/unwind/libunbound/util/storage/lookup3.c
180
c -= b; c ^= rot(b, 4); b += a; \
sbin/unwind/libunbound/util/storage/lookup3.c
208
#define final(a,b,c) \
sbin/unwind/libunbound/util/storage/lookup3.c
210
c ^= b; c -= rot(b,14); \
sbin/unwind/libunbound/util/storage/lookup3.c
211
a ^= c; a -= rot(c,11); \
sbin/unwind/libunbound/util/storage/lookup3.c
213
c ^= b; c -= rot(b,16); \
sbin/unwind/libunbound/util/storage/lookup3.c
214
a ^= c; a -= rot(c,4); \
sbin/unwind/libunbound/util/storage/lookup3.c
216
c ^= b; c -= rot(b,24); \
sbin/unwind/libunbound/util/storage/lookup3.c
237
uint32_t a,b,c;
sbin/unwind/libunbound/util/storage/lookup3.c
240
a = b = c = raninit + (((uint32_t)length)<<2) + initval;
sbin/unwind/libunbound/util/storage/lookup3.c
247
c += k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
248
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
256
case 3 : c+=k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
263
final(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
270
return c;
sbin/unwind/libunbound/util/storage/lookup3.c
290
uint32_t a,b,c;
sbin/unwind/libunbound/util/storage/lookup3.c
293
a = b = c = raninit + ((uint32_t)(length<<2)) + *pc;
sbin/unwind/libunbound/util/storage/lookup3.c
294
c += *pb;
sbin/unwind/libunbound/util/storage/lookup3.c
301
c += k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
302
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
310
case 3 : c+=k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
317
final(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
324
*pc=c; *pb=b;
sbin/unwind/libunbound/util/storage/lookup3.c
358
uint32_t a,b,c; /* internal state */
sbin/unwind/libunbound/util/storage/lookup3.c
362
a = b = c = raninit + ((uint32_t)length) + initval;
sbin/unwind/libunbound/util/storage/lookup3.c
376
c += k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
377
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
396
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
397
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
398
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
399
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
408
case 0 : return c; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
416
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
417
case 11: c+=((uint32_t)k8[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
420
case 10: c+=((uint32_t)k8[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
423
case 9 : c+=k8[8];
sbin/unwind/libunbound/util/storage/lookup3.c
444
case 0 : return c;
sbin/unwind/libunbound/util/storage/lookup3.c
458
c += k[4] + (((uint32_t)k[5])<<16);
sbin/unwind/libunbound/util/storage/lookup3.c
459
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
468
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
sbin/unwind/libunbound/util/storage/lookup3.c
472
case 11: c+=((uint32_t)k8[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
475
case 10: c+=k[4];
sbin/unwind/libunbound/util/storage/lookup3.c
479
case 9 : c+=k8[8];
sbin/unwind/libunbound/util/storage/lookup3.c
503
case 0 : return c; /* zero length requires no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
520
c += k[8];
sbin/unwind/libunbound/util/storage/lookup3.c
521
c += ((uint32_t)k[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
522
c += ((uint32_t)k[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
523
c += ((uint32_t)k[11])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
524
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
532
case 12: c+=((uint32_t)k[11])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
535
case 11: c+=((uint32_t)k[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
538
case 10: c+=((uint32_t)k[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
541
case 9 : c+=k[8];
sbin/unwind/libunbound/util/storage/lookup3.c
567
case 0 : return c;
sbin/unwind/libunbound/util/storage/lookup3.c
571
final(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
572
return c;
sbin/unwind/libunbound/util/storage/lookup3.c
593
uint32_t a,b,c; /* internal state */
sbin/unwind/libunbound/util/storage/lookup3.c
597
a = b = c = raninit + ((uint32_t)length) + *pc;
sbin/unwind/libunbound/util/storage/lookup3.c
598
c += *pb;
sbin/unwind/libunbound/util/storage/lookup3.c
612
c += k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
613
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
632
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
633
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
634
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
635
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
644
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
652
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
653
case 11: c+=((uint32_t)k8[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
656
case 10: c+=((uint32_t)k8[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
659
case 9 : c+=k8[8];
sbin/unwind/libunbound/util/storage/lookup3.c
680
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
694
c += k[4] + (((uint32_t)k[5])<<16);
sbin/unwind/libunbound/util/storage/lookup3.c
695
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
704
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
sbin/unwind/libunbound/util/storage/lookup3.c
708
case 11: c+=((uint32_t)k8[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
711
case 10: c+=k[4];
sbin/unwind/libunbound/util/storage/lookup3.c
715
case 9 : c+=k8[8];
sbin/unwind/libunbound/util/storage/lookup3.c
739
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
756
c += k[8];
sbin/unwind/libunbound/util/storage/lookup3.c
757
c += ((uint32_t)k[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
758
c += ((uint32_t)k[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
759
c += ((uint32_t)k[11])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
760
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
768
case 12: c+=((uint32_t)k[11])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
771
case 11: c+=((uint32_t)k[10])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
774
case 10: c+=((uint32_t)k[9])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
777
case 9 : c+=k[8];
sbin/unwind/libunbound/util/storage/lookup3.c
803
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
807
final(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
808
*pc=c; *pb=b;
sbin/unwind/libunbound/util/storage/lookup3.c
823
uint32_t a,b,c;
sbin/unwind/libunbound/util/storage/lookup3.c
827
a = b = c = raninit + ((uint32_t)length) + initval;
sbin/unwind/libunbound/util/storage/lookup3.c
841
c += k[2];
sbin/unwind/libunbound/util/storage/lookup3.c
842
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
861
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
862
case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
863
case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
864
case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
873
case 0 : return c; /* zero length strings require no mixing */
sbin/unwind/libunbound/util/storage/lookup3.c
881
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
sbin/unwind/libunbound/util/storage/lookup3.c
882
case 11: c+=((uint32_t)k8[10])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
885
case 10: c+=((uint32_t)k8[9])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
888
case 9 : c+=((uint32_t)k8[8])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
909
case 0 : return c;
sbin/unwind/libunbound/util/storage/lookup3.c
928
c += ((uint32_t)k[8])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
929
c += ((uint32_t)k[9])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
930
c += ((uint32_t)k[10])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
931
c += ((uint32_t)k[11]);
sbin/unwind/libunbound/util/storage/lookup3.c
932
mix(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
940
case 12: c+=k[11];
sbin/unwind/libunbound/util/storage/lookup3.c
943
case 11: c+=((uint32_t)k[10])<<8;
sbin/unwind/libunbound/util/storage/lookup3.c
946
case 10: c+=((uint32_t)k[9])<<16;
sbin/unwind/libunbound/util/storage/lookup3.c
949
case 9 : c+=((uint32_t)k[8])<<24;
sbin/unwind/libunbound/util/storage/lookup3.c
975
case 0 : return c;
sbin/unwind/libunbound/util/storage/lookup3.c
979
final(a,b,c);
sbin/unwind/libunbound/util/storage/lookup3.c
980
return c;
sbin/unwind/libunbound/util/storage/lruhash.c
222
size_t c = 0;
sbin/unwind/libunbound/util/storage/lruhash.c
227
c++;
sbin/unwind/libunbound/util/storage/lruhash.c
231
*collisions = c;
sbin/unwind/libunbound/util/tube.c
149
tube_handle_listen(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/util/tube.c
162
r = read(c->fd, ((uint8_t*)&tube->cmd_len) + tube->cmd_read,
sbin/unwind/libunbound/util/tube.c
192
r = read(c->fd, tube->cmd_msg+tube->cmd_read-sizeof(tube->cmd_len),
sbin/unwind/libunbound/util/tube.c
225
tube_handle_write(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/util/tube.c
237
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/tube.c
242
r = write(c->fd, ((uint8_t*)&item->len) + tube->res_write,
sbin/unwind/libunbound/util/tube.c
259
r = write(c->fd, item->buf + tube->res_write - sizeof(item->len),
sbin/unwind/libunbound/util/tube.c
282
comm_point_stop_listening(c);
sbin/unwind/libunbound/util/tube.c
719
tube_handle_listen(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg),
sbin/unwind/libunbound/util/tube.c
727
tube_handle_write(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg),
sbin/unwind/libunbound/util/tube.h
270
int tube_handle_listen(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/util/tube.h
274
int tube_handle_write(struct comm_point* c, void* arg, int error,
sbin/unwind/libunbound/util/ub_event_pluggable.c
130
# define NATIVE_BITS_CB(c) (c)
sbin/unwind/libunbound/validator/autotrust.c
1737
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1740
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
sbin/unwind/libunbound/validator/autotrust.c
1745
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1756
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1767
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1773
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
sbin/unwind/libunbound/validator/autotrust.c
1779
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1782
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
sbin/unwind/libunbound/validator/autotrust.c
1785
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
sbin/unwind/libunbound/validator/autotrust.c
1790
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1793
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1798
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1801
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
sbin/unwind/libunbound/validator/autotrust.c
1810
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1818
do_newkey(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1824
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1826
else do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1832
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1835
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1838
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1845
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1848
do_keypres(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1853
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1855
else do_remtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1975
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1981
do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
sbin/unwind/libunbound/validator/val_anchor.c
1227
anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/validator/val_anchor.c
1233
key.dclass = c;
sbin/unwind/libunbound/validator/val_anchor.c
1240
if(!anchor_new_ta(anchors, nm, key.namelabs, key.namelen, c, 0)) {
sbin/unwind/libunbound/validator/val_anchor.c
1252
anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
sbin/unwind/libunbound/validator/val_anchor.c
1260
key.dclass = c;
sbin/unwind/libunbound/validator/val_anchor.c
486
skip_to_eol(FILE* in, int *c)
sbin/unwind/libunbound/validator/val_anchor.c
488
while((*c = getc(in)) != EOF ) {
sbin/unwind/libunbound/validator/val_anchor.c
489
if(*c == '\n')
sbin/unwind/libunbound/validator/val_anchor.c
496
is_bind_special(int c)
sbin/unwind/libunbound/validator/val_anchor.c
498
switch(c) {
sbin/unwind/libunbound/validator/val_anchor.c
532
int c;
sbin/unwind/libunbound/validator/val_anchor.c
534
while((c = getc(in)) != EOF ) {
sbin/unwind/libunbound/validator/val_anchor.c
535
if(comments && c == '#') { /* # blabla */
sbin/unwind/libunbound/validator/val_anchor.c
536
skip_to_eol(in, &c);
sbin/unwind/libunbound/validator/val_anchor.c
537
if(c == EOF) return 0;
sbin/unwind/libunbound/validator/val_anchor.c
540
} else if(comments && c=='/' && numdone>0 && /* /_/ bla*/
sbin/unwind/libunbound/validator/val_anchor.c
545
skip_to_eol(in, &c);
sbin/unwind/libunbound/validator/val_anchor.c
546
if(c == EOF) return 0;
sbin/unwind/libunbound/validator/val_anchor.c
549
} else if(comments && c=='*' && numdone>0 && /* /_* bla *_/ */
sbin/unwind/libunbound/validator/val_anchor.c
555
while(c != EOF && (c=getc(in)) != EOF ) {
sbin/unwind/libunbound/validator/val_anchor.c
556
if(c == '*') {
sbin/unwind/libunbound/validator/val_anchor.c
557
if((c=getc(in)) == '/')
sbin/unwind/libunbound/validator/val_anchor.c
560
if(c == '\n')
sbin/unwind/libunbound/validator/val_anchor.c
563
if(c == EOF) return 0;
sbin/unwind/libunbound/validator/val_anchor.c
569
if(isspace((unsigned char)c)) {
sbin/unwind/libunbound/validator/val_anchor.c
570
ungetc(c, in);
sbin/unwind/libunbound/validator/val_anchor.c
573
if(is_bind_special(c)) {
sbin/unwind/libunbound/validator/val_anchor.c
574
ungetc(c, in);
sbin/unwind/libunbound/validator/val_anchor.c
578
if(c == '\n') {
sbin/unwind/libunbound/validator/val_anchor.c
579
c = ' ';
sbin/unwind/libunbound/validator/val_anchor.c
586
sldns_buffer_write_u8(buf, (uint8_t)c);
sbin/unwind/libunbound/validator/val_anchor.c
588
if(isspace((unsigned char)c)) {
sbin/unwind/libunbound/validator/val_anchor.c
590
while((c = getc(in)) != EOF ) {
sbin/unwind/libunbound/validator/val_anchor.c
591
if(c == '\n')
sbin/unwind/libunbound/validator/val_anchor.c
593
if(!isspace((unsigned char)c)) {
sbin/unwind/libunbound/validator/val_anchor.c
594
ungetc(c, in);
sbin/unwind/libunbound/validator/val_anchor.c
598
if(c == EOF) return 0;
sbin/unwind/libunbound/validator/val_anchor.c
601
if(is_bind_special(c))
sbin/unwind/libunbound/validator/val_anchor.h
205
int anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm);
sbin/unwind/libunbound/validator/val_anchor.h
214
void anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
sbin/unwind/libunbound/validator/val_neg.c
1274
struct nsec3_cached_hash c;
sbin/unwind/libunbound/validator/val_neg.c
1341
c.hash = hashnc;
sbin/unwind/libunbound/validator/val_neg.c
1342
c.hash_len = nclen;
sbin/unwind/libunbound/validator/val_neg.c
1343
c.b32 = nc_b32+1;
sbin/unwind/libunbound/validator/val_neg.c
1344
c.b32_len = (size_t)nc_b32[0];
sbin/unwind/libunbound/validator/val_neg.c
1345
if(nsec3_covers(zone->name, &c, nc_rrset, 0, buf)) {
sbin/unwind/libunbound/validator/val_nsec3.c
571
int c = query_dname_compare(h1->dname, h2->dname);
sbin/unwind/libunbound/validator/val_nsec3.c
572
if(c != 0)
sbin/unwind/libunbound/validator/val_nsec3.c
573
return c;
sbin/unwind/libunbound/validator/val_nsec3.c
654
struct nsec3_cached_hash* c)
sbin/unwind/libunbound/validator/val_nsec3.c
656
int algo = nsec3_get_algo(c->nsec3, c->rr);
sbin/unwind/libunbound/validator/val_nsec3.c
657
size_t iter = nsec3_get_iter(c->nsec3, c->rr);
sbin/unwind/libunbound/validator/val_nsec3.c
660
if(!nsec3_get_salt(c->nsec3, c->rr, &salt, &saltlen))
sbin/unwind/libunbound/validator/val_nsec3.c
664
sldns_buffer_write(buf, c->dname, c->dname_len);
sbin/unwind/libunbound/validator/val_nsec3.c
668
c->hash_len = nsec3_hash_algo_size_supported(algo);
sbin/unwind/libunbound/validator/val_nsec3.c
669
if(c->hash_len == 0) {
sbin/unwind/libunbound/validator/val_nsec3.c
673
c->hash = (uint8_t*)regional_alloc(region, c->hash_len);
sbin/unwind/libunbound/validator/val_nsec3.c
674
if(!c->hash)
sbin/unwind/libunbound/validator/val_nsec3.c
677
sldns_buffer_limit(buf), (unsigned char*)c->hash);
sbin/unwind/libunbound/validator/val_nsec3.c
680
sldns_buffer_write(buf, c->hash, c->hash_len);
sbin/unwind/libunbound/validator/val_nsec3.c
685
sldns_buffer_limit(buf), (unsigned char*)c->hash);
sbin/unwind/libunbound/validator/val_nsec3.c
693
struct nsec3_cached_hash* c)
sbin/unwind/libunbound/validator/val_nsec3.c
697
r = sldns_b32_ntop_extended_hex(c->hash, c->hash_len,
sbin/unwind/libunbound/validator/val_nsec3.c
703
c->b32_len = (size_t)r;
sbin/unwind/libunbound/validator/val_nsec3.c
704
c->b32 = regional_alloc_init(region, sldns_buffer_begin(buf),
sbin/unwind/libunbound/validator/val_nsec3.c
705
c->b32_len);
sbin/unwind/libunbound/validator/val_nsec3.c
706
if(!c->b32)
sbin/unwind/libunbound/validator/val_nsec3.c
716
struct nsec3_cached_hash* c;
sbin/unwind/libunbound/validator/val_nsec3.c
728
c = (struct nsec3_cached_hash*)rbtree_search(table, &looki);
sbin/unwind/libunbound/validator/val_nsec3.c
729
if(c) {
sbin/unwind/libunbound/validator/val_nsec3.c
730
*hash = c;
sbin/unwind/libunbound/validator/val_nsec3.c
734
c = (struct nsec3_cached_hash*)regional_alloc(region, sizeof(*c));
sbin/unwind/libunbound/validator/val_nsec3.c
735
if(!c) return 0;
sbin/unwind/libunbound/validator/val_nsec3.c
736
c->node.key = c;
sbin/unwind/libunbound/validator/val_nsec3.c
737
c->nsec3 = nsec3;
sbin/unwind/libunbound/validator/val_nsec3.c
738
c->rr = rr;
sbin/unwind/libunbound/validator/val_nsec3.c
739
c->dname = dname;
sbin/unwind/libunbound/validator/val_nsec3.c
740
c->dname_len = dname_len;
sbin/unwind/libunbound/validator/val_nsec3.c
741
r = nsec3_calc_hash(region, buf, c);
sbin/unwind/libunbound/validator/val_nsec3.c
744
r = nsec3_calc_b32(region, buf, c);
sbin/unwind/libunbound/validator/val_nsec3.c
752
rbtree_insert(table, &c->node);
sbin/unwind/libunbound/validator/val_nsec3.c
754
*hash = c;
sbin/unwind/libunbound/validator/val_sigcrypt.c
1000
return c;
sbin/unwind/libunbound/validator/val_sigcrypt.c
938
int c;
sbin/unwind/libunbound/validator/val_sigcrypt.c
998
c = memcmp(d->rr_data[i]+2, d->rr_data[j]+2, minlen);
sbin/unwind/libunbound/validator/val_sigcrypt.c
999
if(c!=0)
sbin/unwind/libunbound/validator/val_utils.c
1176
check_no_anchor(struct val_anchors* anchors, uint8_t* nm, size_t l, uint16_t c)
sbin/unwind/libunbound/validator/val_utils.c
1179
if((ta=anchors_lookup(anchors, nm, l, c))) {
sbin/unwind/libunbound/validator/val_utils.c
1310
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
sbin/unwind/libunbound/validator/val_utils.c
1316
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
sbin/unwind/libunbound/validator/val_utils.c
1326
msg = dns_msg_create(nm, nmlen, LDNS_RR_TYPE_DS, c, region, 1);
sbin/unwind/libunbound/validator/val_utils.c
1339
qinfo.qclass = c;
sbin/unwind/libunbound/validator/val_utils.h
428
uint16_t c, struct regional* region, uint8_t* topname);
sbin/unwind/libunbound/validator/validator.c
108
for(i=0; i<c; i++) {
sbin/unwind/libunbound/validator/validator.c
148
int c;
sbin/unwind/libunbound/validator/validator.c
149
c = cfg_count_numbers(val_nsec3_key_iterations);
sbin/unwind/libunbound/validator/validator.c
150
if(c < 1 || (c&1)) {
sbin/unwind/libunbound/validator/validator.c
155
*keyiter_count = c/2;
sbin/unwind/libunbound/validator/validator.c
156
if(!fill_nsec3_iter(keysize, maxiter, val_nsec3_key_iterations, c/2)) {
sbin/unwind/libunbound/validator/validator.c
94
fill_nsec3_iter(size_t** keysize, size_t** maxiter, char* s, int c)
sbin/unwind/libunbound/validator/validator.c
98
*keysize = (size_t*)calloc((size_t)c, sizeof(size_t));
sbin/unwind/libunbound/validator/validator.c
99
*maxiter = (size_t*)calloc((size_t)c, sizeof(size_t));
sbin/unwind/parse.y
462
int c;
sbin/unwind/parse.y
466
c = file->ungetbuf[--file->ungetpos];
sbin/unwind/parse.y
468
c = getc(file->stream);
sbin/unwind/parse.y
470
if (c == START_EXPAND)
sbin/unwind/parse.y
472
else if (c == DONE_EXPAND)
sbin/unwind/parse.y
477
return (c);
sbin/unwind/parse.y
483
int c, next;
sbin/unwind/parse.y
486
if ((c = igetc()) == EOF) {
sbin/unwind/parse.y
493
return (c);
sbin/unwind/parse.y
496
while ((c = igetc()) == '\\') {
sbin/unwind/parse.y
499
c = next;
sbin/unwind/parse.y
506
if (c == EOF) {
sbin/unwind/parse.y
516
while (c == EOF) {
sbin/unwind/parse.y
519
c = igetc();
sbin/unwind/parse.y
522
return (c);
sbin/unwind/parse.y
526
lungetc(int c)
sbin/unwind/parse.y
528
if (c == EOF)
sbin/unwind/parse.y
538
file->ungetbuf[file->ungetpos++] = c;
sbin/unwind/parse.y
544
int c;
sbin/unwind/parse.y
548
c = lgetc(0);
sbin/unwind/parse.y
549
if (c == '\n') {
sbin/unwind/parse.y
553
if (c == EOF)
sbin/unwind/parse.y
564
int quotec, next, c;
sbin/unwind/parse.y
569
while ((c = lgetc(0)) == ' ' || c == '\t')
sbin/unwind/parse.y
573
if (c == '#')
sbin/unwind/parse.y
574
while ((c = lgetc(0)) != '\n' && c != EOF)
sbin/unwind/parse.y
576
if (c == '$' && !expanding) {
sbin/unwind/parse.y
578
if ((c = lgetc(0)) == EOF)
sbin/unwind/parse.y
585
if (isalnum(c) || c == '_') {
sbin/unwind/parse.y
586
*p++ = c;
sbin/unwind/parse.y
590
lungetc(c);
sbin/unwind/parse.y
608
switch (c) {
sbin/unwind/parse.y
611
quotec = c;
sbin/unwind/parse.y
613
if ((c = lgetc(quotec)) == EOF)
sbin/unwind/parse.y
615
if (c == '\n') {
sbin/unwind/parse.y
618
} else if (c == '\\') {
sbin/unwind/parse.y
623
c = next;
sbin/unwind/parse.y
629
} else if (c == quotec) {
sbin/unwind/parse.y
632
} else if (c == '\0') {
sbin/unwind/parse.y
640
*p++ = c;
sbin/unwind/parse.y
651
if (c == '-' || isdigit(c)) {
sbin/unwind/parse.y
653
*p++ = c;
sbin/unwind/parse.y
658
} while ((c = lgetc(0)) != EOF && isdigit(c));
sbin/unwind/parse.y
659
lungetc(c);
sbin/unwind/parse.y
662
if (c == EOF || allowed_to_end_number(c)) {
sbin/unwind/parse.y
678
c = (unsigned char)*--p;
sbin/unwind/parse.y
679
if (c == '-')
sbin/unwind/parse.y
680
return (c);
sbin/unwind/parse.y
690
if (isalnum(c) || c == ':' || c == '_') {
sbin/unwind/parse.y
692
*p++ = c;
sbin/unwind/parse.y
697
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
sbin/unwind/parse.y
698
lungetc(c);
sbin/unwind/parse.y
705
if (c == '\n') {
sbin/unwind/parse.y
709
if (c == EOF)
sbin/unwind/parse.y
711
return (c);
sbin/unwind/resolver.c
2271
sldns_wire2str_class_buf(query_imsg->c, qclass_buf, sizeof(qclass_buf));
sbin/unwind/resolver.c
859
query_imsg->c, query_imsg, resolve_done) != 0) {
sbin/unwind/unwind.h
168
int c;
sbin/wsconsctl/util.c
523
char c='\0';
sbin/wsconsctl/util.c
529
if (c != '\0')
sbin/wsconsctl/util.c
530
printf("%c", c);
sbin/wsconsctl/util.c
532
c=',';
sbin/wsconsctl/util.c
543
char c='\0';
sbin/wsconsctl/util.c
549
if (c != '\0')
sbin/wsconsctl/util.c
550
printf("%c", c);
sbin/wsconsctl/util.c
552
c=',';
sbin/wsconsctl/wsconsctl.c
176
const char *c = strchr(argv[i], '.');
sbin/wsconsctl/wsconsctl.c
178
if (!c)
sbin/wsconsctl/wsconsctl.c
179
c = strchr(argv[i], '\0');
sbin/wsconsctl/wsconsctl.c
180
k = c - argv[i];
sbin/wsconsctl/wsconsctl.c
296
char *c;
sbin/wsconsctl/wsconsctl.c
313
c = (char *)var;
sbin/wsconsctl/wsconsctl.c
314
c = c + strlen(sw->name);
sbin/wsconsctl/wsconsctl.c
316
while (c < p) {
sbin/wsconsctl/wsconsctl.c
317
if (*c >= '0' && *c <= '9')
sbin/wsconsctl/wsconsctl.c
318
i = i * 10 + *c - '0';
sbin/wsconsctl/wsconsctl.c
321
c++;
sys/arch/alpha/alpha/cpuconf.c
191
const struct cpuinit *c;
sys/arch/alpha/alpha/cpuconf.c
195
c = &cpuinit[i];
sys/arch/alpha/alpha/cpuconf.c
196
if (c->systype == systype)
sys/arch/alpha/alpha/cpuconf.c
197
return (c);
sys/arch/alpha/alpha/cpuconf.c
205
const struct cpuinit *c = platform_lookup(cputype);
sys/arch/alpha/alpha/cpuconf.c
210
c->option);
sys/arch/alpha/alpha/cpuconf.c
217
const struct cpuinit *c = platform_lookup(cputype);
sys/arch/alpha/alpha/cpuconf.c
220
(c != NULL) ? c->option : "???");
sys/arch/alpha/alpha/machdep.c
214
const struct cpuinit *c;
sys/arch/alpha/alpha/machdep.c
360
c = platform_lookup(cputype);
sys/arch/alpha/alpha/machdep.c
361
if (c == NULL) {
sys/arch/alpha/alpha/machdep.c
365
(*c->init)();
sys/arch/alpha/alpha/mem.c
120
size_t c;
sys/arch/alpha/alpha/mem.c
156
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/alpha/alpha/mem.c
158
uiomove((caddr_t)ALPHA_PHYS_TO_K0SEG(v), c, uio);
sys/arch/alpha/alpha/mem.c
170
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/alpha/alpha/mem.c
171
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/alpha/alpha/mem.c
174
error = uiomove((caddr_t)v, c, uio);
sys/arch/alpha/alpha/mem.c
196
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/alpha/alpha/mem.c
197
error = uiomove(zeropage, c, uio);
sys/arch/alpha/alpha/prom.c
105
promcnputc(dev_t dev, int c)
sys/arch/alpha/alpha/prom.c
111
*to = c;
sys/arch/alpha/alpha/prom.c
60
struct crb *c;
sys/arch/alpha/alpha/prom.c
62
c = (struct crb *)((char *)rpb + rpb->rpb_crb_off);
sys/arch/alpha/alpha/prom.c
64
prom_dispatch_v.routine_arg = c->crb_v_dispatch;
sys/arch/alpha/alpha/prom.c
65
prom_dispatch_v.routine = c->crb_v_dispatch->entry_va;
sys/arch/alpha/eisa/eisa_machdep.h
56
#define eisa_maxslots(c) \
sys/arch/alpha/eisa/eisa_machdep.h
57
((c)->ec_maxslots)
sys/arch/alpha/eisa/eisa_machdep.h
58
#define eisa_intr_map(c, i, hp) \
sys/arch/alpha/eisa/eisa_machdep.h
59
(*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
sys/arch/alpha/eisa/eisa_machdep.h
60
#define eisa_intr_string(c, h) \
sys/arch/alpha/eisa/eisa_machdep.h
61
(*(c)->ec_intr_string)((c)->ec_v, (h))
sys/arch/alpha/eisa/eisa_machdep.h
62
#define eisa_intr_establish(c, h, t, l, f, a, nm) \
sys/arch/alpha/eisa/eisa_machdep.h
63
(*(c)->ec_intr_establish)((c)->ec_v, (h), (t), (l), (f), (a), (nm))
sys/arch/alpha/eisa/eisa_machdep.h
64
#define eisa_intr_disestablish(c, h) \
sys/arch/alpha/eisa/eisa_machdep.h
65
(*(c)->ec_intr_disestablish)((c)->ec_v, (h))
sys/arch/alpha/include/bus.h
194
#define __abs_nonsingle(type, sz, t, h, o, a, c) \
sys/arch/alpha/include/bus.h
195
(*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, a, c)
sys/arch/alpha/include/bus.h
197
#define __abs_aligned_nonsingle(type, sz, t, h, o, a, c) \
sys/arch/alpha/include/bus.h
198
__abs_nonsingle(type, sz, (t), (h), (o), (a), (c))
sys/arch/alpha/include/bus.h
201
#define __abs_aligned_nonsingle(type, sz, t, h, o, a, c) \
sys/arch/alpha/include/bus.h
206
(*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, a, c); \
sys/arch/alpha/include/bus.h
209
#define __abs_set(type, sz, t, h, o, v, c) \
sys/arch/alpha/include/bus.h
210
(*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, v, c)
sys/arch/alpha/include/bus.h
212
(*(t)->__abs_opname(c,sz))((t)->abs_cookie, h1, o1, h2, o2, cnt)
sys/arch/alpha/include/bus.h
217
#define bus_space_map(t, a, s, c, hp) \
sys/arch/alpha/include/bus.h
218
(*(t)->abs_map)((t)->abs_cookie, (a), (s), (c), (hp))
sys/arch/alpha/include/bus.h
233
#define bus_space_alloc(t, rs, re, s, a, b, c, ap, hp) \
sys/arch/alpha/include/bus.h
235
(c), (ap), (hp))
sys/arch/alpha/include/bus.h
276
#define bus_space_read_multi_1(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
277
__abs_nonsingle(rm,1,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
278
#define bus_space_read_multi_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
279
__abs_aligned_nonsingle(rm,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
280
#define bus_space_read_multi_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
281
__abs_aligned_nonsingle(rm,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
282
#define bus_space_read_multi_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
283
__abs_aligned_nonsingle(rm,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
297
#define bus_space_read_raw_multi_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
298
__abs_nonsingle(rrm,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
299
#define bus_space_read_raw_multi_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
300
__abs_nonsingle(rrm,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
301
#define bus_space_read_raw_multi_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
302
__abs_nonsingle(rrm,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
307
#define bus_space_read_region_1(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
308
__abs_nonsingle(rr,1,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
309
#define bus_space_read_region_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
310
__abs_aligned_nonsingle(rr,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
311
#define bus_space_read_region_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
312
__abs_aligned_nonsingle(rr,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
313
#define bus_space_read_region_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
314
__abs_aligned_nonsingle(rr,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
329
#define bus_space_read_raw_region_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
330
bus_space_read_region_2((t), (h), (o), (u_int16_t *)(a), (c) >> 1)
sys/arch/alpha/include/bus.h
331
#define bus_space_read_raw_region_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
332
bus_space_read_region_4((t), (h), (o), (u_int32_t *)(a), (c) >> 2)
sys/arch/alpha/include/bus.h
355
#define bus_space_write_multi_1(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
356
__abs_nonsingle(wm,1,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
357
#define bus_space_write_multi_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
358
__abs_aligned_nonsingle(wm,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
359
#define bus_space_write_multi_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
360
__abs_aligned_nonsingle(wm,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
361
#define bus_space_write_multi_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
362
__abs_aligned_nonsingle(wm,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
375
#define bus_space_write_raw_multi_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
376
__abs_nonsingle(wrm,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
377
#define bus_space_write_raw_multi_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
378
__abs_nonsingle(wrm,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
379
#define bus_space_write_raw_multi_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
380
__abs_nonsingle(wrm,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
385
#define bus_space_write_region_1(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
386
__abs_nonsingle(wr,1,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
387
#define bus_space_write_region_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
388
__abs_aligned_nonsingle(wr,2,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
389
#define bus_space_write_region_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
390
__abs_aligned_nonsingle(wr,4,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
391
#define bus_space_write_region_8(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
392
__abs_aligned_nonsingle(wr,8,(t),(h),(o),(a),(c))
sys/arch/alpha/include/bus.h
407
#define bus_space_write_raw_region_2(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
408
bus_space_write_region_2((t), (h), (o), (const u_int16_t *)(a), (c) >> 1)
sys/arch/alpha/include/bus.h
409
#define bus_space_write_raw_region_4(t, h, o, a, c) \
sys/arch/alpha/include/bus.h
410
bus_space_write_region_4((t), (h), (o), (const u_int32_t *)(a), (c) >> 2)
sys/arch/alpha/include/bus.h
415
#define bus_space_set_multi_1(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
416
__abs_set(sm,1,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
417
#define bus_space_set_multi_2(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
418
__abs_set(sm,2,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
419
#define bus_space_set_multi_4(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
420
__abs_set(sm,4,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
421
#define bus_space_set_multi_8(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
422
__abs_set(sm,8,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
428
#define bus_space_set_region_1(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
429
__abs_set(sr,1,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
430
#define bus_space_set_region_2(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
431
__abs_set(sr,2,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
432
#define bus_space_set_region_4(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
433
__abs_set(sr,4,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
434
#define bus_space_set_region_8(t, h, o, v, c) \
sys/arch/alpha/include/bus.h
435
__abs_set(sr,8,(t),(h),(o),(v),(c))
sys/arch/alpha/include/bus.h
441
#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
sys/arch/alpha/include/bus.h
442
__abs_copy(1, t, h1, o1, h2, o2, c)
sys/arch/alpha/include/bus.h
443
#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
sys/arch/alpha/include/bus.h
444
__abs_copy(2, t, h1, o1, h2, o2, c)
sys/arch/alpha/include/bus.h
445
#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
sys/arch/alpha/include/bus.h
446
__abs_copy(4, t, h1, o1, h2, o2, c)
sys/arch/alpha/include/bus.h
447
#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
sys/arch/alpha/include/bus.h
448
__abs_copy(8, t, h1, o1, h2, o2, c)
sys/arch/alpha/include/loadfile_machdep.h
40
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/alpha/include/loadfile_machdep.h
41
#define BCOPY(s, d, c) bcopy((void *)s, (void *)LOADADDR(d), (c))
sys/arch/alpha/include/loadfile_machdep.h
42
#define BZERO(d, c) bzero((void *)LOADADDR(d), (c))
sys/arch/alpha/isa/isa_machdep.h
53
#define isa_intr_establish(c, i, t, l, f, a, nm) \
sys/arch/alpha/isa/isa_machdep.h
54
(*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a), (nm))
sys/arch/alpha/isa/isa_machdep.h
55
#define isa_intr_disestablish(c, h) \
sys/arch/alpha/isa/isa_machdep.h
56
(*(c)->ic_intr_disestablish)((c)->ic_v, (h))
sys/arch/alpha/isa/isa_machdep.h
57
#define isa_intr_alloc(c, m, t, i) \
sys/arch/alpha/isa/isa_machdep.h
58
(*(c)->ic_intr_alloc)((c)->ic_v, (m), (t), (i))
sys/arch/alpha/isa/isa_machdep.h
59
#define isa_intr_check(c, i, t) \
sys/arch/alpha/isa/isa_machdep.h
60
(*(c)->ic_intr_check)((c)->ic_v, (i), (t))
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
442
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
445
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
459
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
462
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
528
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
531
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
545
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
548
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
561
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
564
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
578
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
581
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
594
bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
598
for (i = 0, o = 0; i < c; i++, o += BYTES) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
610
bus_size_t o, u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
615
while (c > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
619
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
620
c -= i; \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
634
bus_size_t o, const u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
639
while (c > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
643
if (i < c) \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
649
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c
650
c -= i; \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
469
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
472
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
486
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
489
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
555
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
558
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
572
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
575
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
588
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
591
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
605
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
608
while (c-- > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
621
bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
626
bcopy((void *)(h1 + o1), (void *)(h2 + o2), c * BYTES); \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
632
for (i = 0, o = (c - 1) * BYTES; i < c; i++, o -= BYTES)\
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
636
for (i = 0, o = 0; i < c; i++, o += BYTES) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
648
bus_size_t o, u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
653
while (c > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
657
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
658
c -= i; \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
672
bus_size_t o, const u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
677
while (c > 0) { \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
681
if (i < c) \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
687
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
688
c -= i; \
sys/arch/alpha/pci/pci_machdep.h
100
#define pci_conf_size(c, t) \
sys/arch/alpha/pci/pci_machdep.h
101
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/alpha/pci/pci_machdep.h
102
#define pci_conf_read(c, t, r) \
sys/arch/alpha/pci/pci_machdep.h
103
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/alpha/pci/pci_machdep.h
104
#define pci_conf_write(c, t, r, v) \
sys/arch/alpha/pci/pci_machdep.h
105
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/alpha/pci/pci_machdep.h
108
#define pci_intr_string(c, ih) \
sys/arch/alpha/pci/pci_machdep.h
109
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/alpha/pci/pci_machdep.h
110
#define pci_intr_line(c, ih) \
sys/arch/alpha/pci/pci_machdep.h
111
(*(c)->pc_intr_line)((c)->pc_intr_v, (ih))
sys/arch/alpha/pci/pci_machdep.h
112
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/alpha/pci/pci_machdep.h
113
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), (nm))
sys/arch/alpha/pci/pci_machdep.h
114
#define pci_intr_disestablish(c, iv) \
sys/arch/alpha/pci/pci_machdep.h
115
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/alpha/pci/pci_machdep.h
116
#define pci_probe_device_hook(c, a) (0)
sys/arch/alpha/pci/pci_machdep.h
118
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/alpha/pci/pci_machdep.h
119
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/alpha/pci/pci_machdep.h
127
#define alpha_pciide_compat_intr_establish(c, d, p, ch, f, a) \
sys/arch/alpha/pci/pci_machdep.h
128
((c)->pc_pciide_compat_intr_establish == NULL ? NULL : \
sys/arch/alpha/pci/pci_machdep.h
129
(*(c)->pc_pciide_compat_intr_establish)((c)->pc_conf_v, (d), (p), \
sys/arch/alpha/pci/pci_machdep.h
132
#define alpha_pciide_compat_intr_disestablish(c, cookie) \
sys/arch/alpha/pci/pci_machdep.h
133
do { if ((c)->pc_pciide_compat_intr_disestablish != NULL) \
sys/arch/alpha/pci/pci_machdep.h
134
((c)->pc_pciide_compat_intr_disestablish)((c)->pc_conf_v, \
sys/arch/alpha/pci/pci_machdep.h
94
#define pci_bus_maxdevs(c, b) \
sys/arch/alpha/pci/pci_machdep.h
95
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/alpha/pci/pci_machdep.h
96
#define pci_make_tag(c, b, d, f) \
sys/arch/alpha/pci/pci_machdep.h
97
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/alpha/pci/pci_machdep.h
98
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/alpha/pci/pci_machdep.h
99
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
546
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
549
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
563
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
566
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
637
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
640
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
654
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
657
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
670
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
673
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
687
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
690
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
703
bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
707
for (i = 0, o = 0; i < c; i++, o += BYTES) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
719
bus_size_t o, u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
724
while (c > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
728
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
729
c -= i; \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
743
bus_size_t o, const u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
748
while (c > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
752
if (i < c) \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
758
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
759
c -= i; \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1000
c -= i; \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1014
bus_size_t o, const u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1019
while (c > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1023
if (i < c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1029
i = MIN(c, BYTES); \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
1030
c -= i; \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
789
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
792
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
806
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
809
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
897
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
900
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
914
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
917
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
930
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
933
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
947
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
950
while (c-- > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
963
bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
968
bcopy((void *)(h1 + o1), (void *)(h2 + o2), c * BYTES); \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
974
for (i = 0, o = (c - 1) * BYTES; i < c; i++, o -= BYTES)\
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
978
for (i = 0, o = 0; i < c; i++, o += BYTES) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
990
bus_size_t o, u_int8_t *a, bus_size_t c) \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
995
while (c > 0) { \
sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
999
i = MIN(c, BYTES); \
sys/arch/alpha/stand/boot/devopen.c
53
register int c, i;
sys/arch/alpha/stand/boot/devopen.c
63
while ((c = *cp) != '\0') {
sys/arch/alpha/stand/boot/devopen.c
64
if (c == '(') {
sys/arch/alpha/stand/boot/devopen.c
69
*ncp++ = c;
sys/arch/alpha/stand/boot/devopen.c
74
if ((c = *cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/boot/devopen.c
75
ctlr = c - '0';
sys/arch/alpha/stand/boot/devopen.c
76
c = *++cp;
sys/arch/alpha/stand/boot/devopen.c
79
if (c == ',') {
sys/arch/alpha/stand/boot/devopen.c
81
if ((c = *++cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/boot/devopen.c
82
unit = c - '0';
sys/arch/alpha/stand/boot/devopen.c
83
c = *++cp;
sys/arch/alpha/stand/boot/devopen.c
86
if (c == ',') {
sys/arch/alpha/stand/boot/devopen.c
88
if ((c = *++cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/boot/devopen.c
89
part = c - '0';
sys/arch/alpha/stand/boot/devopen.c
90
c = *++cp;
sys/arch/alpha/stand/boot/devopen.c
94
if (c != ')')
sys/arch/alpha/stand/installboot.c
110
while ((c = getopt(argc, argv, "vns:e:")) != -1) {
sys/arch/alpha/stand/installboot.c
111
switch (c) {
sys/arch/alpha/stand/installboot.c
94
int c, devfd;
sys/arch/alpha/stand/nboot/prom.c
41
struct crb *c;
sys/arch/alpha/stand/nboot/prom.c
44
c = (struct crb *)((u_int8_t *)r + r->rpb_crb_off);
sys/arch/alpha/stand/nboot/prom.c
46
prom_dispatch_v.routine_arg = c->crb_v_dispatch;
sys/arch/alpha/stand/nboot/prom.c
47
prom_dispatch_v.routine = c->crb_v_dispatch->entry_va;
sys/arch/alpha/stand/nboot/promcons.c
62
int c;
sys/arch/alpha/stand/nboot/promcons.c
66
c = stash;
sys/arch/alpha/stand/nboot/promcons.c
69
return c;
sys/arch/alpha/stand/nboot/promcons.c
75
c = ret.u.retval;
sys/arch/alpha/stand/nboot/promcons.c
77
stash = c;
sys/arch/alpha/stand/nboot/promcons.c
78
return c;
sys/arch/alpha/stand/nboot/promcons.c
86
prom_cnputc(dev_t dev, int c)
sys/arch/alpha/stand/nboot/promcons.c
90
char cbuf = c;
sys/arch/alpha/stand/netboot/devopen.c
100
*ncp++ = c;
sys/arch/alpha/stand/netboot/devopen.c
105
if ((c = *cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/netboot/devopen.c
106
ctlr = c - '0';
sys/arch/alpha/stand/netboot/devopen.c
107
c = *++cp;
sys/arch/alpha/stand/netboot/devopen.c
110
if (c == ',') {
sys/arch/alpha/stand/netboot/devopen.c
112
if ((c = *++cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/netboot/devopen.c
113
unit = c - '0';
sys/arch/alpha/stand/netboot/devopen.c
114
c = *++cp;
sys/arch/alpha/stand/netboot/devopen.c
117
if (c == ',') {
sys/arch/alpha/stand/netboot/devopen.c
119
if ((c = *++cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/netboot/devopen.c
120
part = c - '0';
sys/arch/alpha/stand/netboot/devopen.c
121
c = *++cp;
sys/arch/alpha/stand/netboot/devopen.c
125
if (c != ')')
sys/arch/alpha/stand/netboot/devopen.c
54
register int c, i;
sys/arch/alpha/stand/netboot/devopen.c
65
if ((c = *cp) >= '0' && c <= '9') {
sys/arch/alpha/stand/netboot/devopen.c
66
ctlr = c - '0';
sys/arch/alpha/stand/netboot/devopen.c
71
while ((c = *cp) != '\0') {
sys/arch/alpha/stand/netboot/devopen.c
72
if (c == '/')
sys/arch/alpha/stand/netboot/devopen.c
74
if (c >= '0' && c <= '9') {
sys/arch/alpha/stand/netboot/devopen.c
76
unit = c - '0';
sys/arch/alpha/stand/netboot/devopen.c
79
if ((c = *++cp) >= 'a' && c <= 'h') {
sys/arch/alpha/stand/netboot/devopen.c
80
part = c - 'a';
sys/arch/alpha/stand/netboot/devopen.c
81
c = *++cp;
sys/arch/alpha/stand/netboot/devopen.c
83
if (c != '/')
sys/arch/alpha/stand/netboot/devopen.c
88
*ncp++ = c;
sys/arch/alpha/stand/netboot/devopen.c
94
while ((c = *cp) != '\0') {
sys/arch/alpha/stand/netboot/devopen.c
95
if (c == '(') {
sys/arch/alpha/stand/netboot/if_prom.c
187
#define dval(c) (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \
sys/arch/alpha/stand/netboot/if_prom.c
188
(((c) >= 'A' && (c) <= 'F') ? (10 + (c) - 'A') : \
sys/arch/alpha/stand/netboot/if_prom.c
189
(((c) >= 'a' && (c) <= 'f') ? (10 + (c) - 'a') : -1)))
sys/arch/alpha/stand/prom.c
44
struct crb *c;
sys/arch/alpha/stand/prom.c
48
c = (struct crb *)((u_int8_t *)r + r->rpb_crb_off);
sys/arch/alpha/stand/prom.c
50
prom_dispatch_v.routine_arg = c->crb_v_dispatch;
sys/arch/alpha/stand/prom.c
51
prom_dispatch_v.routine = c->crb_v_dispatch->entry_va;
sys/arch/alpha/stand/prom.c
71
putchar(c)
sys/arch/alpha/stand/prom.c
72
int c;
sys/arch/alpha/stand/prom.c
77
if (c == '\r' || c == '\n') {
sys/arch/alpha/stand/prom.c
85
cbuf = c;
sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
76
int c, fd, i;
sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
78
while ((c = getopt(argc, argv, "a:fh:o:uv")) != -1) {
sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
79
switch (c) {
sys/arch/alpha/tc/tc_bus_mem.c
384
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
387
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
400
bus_size_t o, TYPE *a, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
403
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
495
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
498
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
511
bus_size_t o, const TYPE *a, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
514
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
527
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
530
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
543
bus_size_t o, TYPE val, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
546
while (c-- > 0) { \
sys/arch/alpha/tc/tc_bus_mem.c
559
bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/alpha/tc/tc_bus_mem.c
565
bcopy((void *)(h1 + o1), (void *)(h2 + o2), c * BYTES); \
sys/arch/alpha/tc/tc_bus_mem.c
571
for (o = 0; c > 0; c--, o += BYTES) \
sys/arch/alpha/tc/tc_bus_mem.c
576
for (o = (c - 1) * BYTES; c > 0; c--, o -= BYTES) \
sys/arch/amd64/amd64/aesni.c
180
struct cryptoini *c;
sys/arch/amd64/amd64/aesni.c
197
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/amd64/amd64/aesni.c
198
switch (c->cri_alg) {
sys/arch/amd64/amd64/aesni.c
200
ses->ses_klen = c->cri_klen / 8;
sys/arch/amd64/amd64/aesni.c
202
aesni_set_key(ses, c->cri_key, ses->ses_klen);
sys/arch/amd64/amd64/aesni.c
209
ses->ses_klen = c->cri_klen / 8 - AESCTR_NONCESIZE;
sys/arch/amd64/amd64/aesni.c
210
memcpy(ses->ses_nonce, c->cri_key + ses->ses_klen,
sys/arch/amd64/amd64/aesni.c
213
aesni_set_key(ses, c->cri_key, ses->ses_klen);
sys/arch/amd64/amd64/aesni.c
225
ses->ses_klen = c->cri_klen / 16;
sys/arch/amd64/amd64/aesni.c
233
c->cri_key, aes1->aes_klen);
sys/arch/amd64/amd64/aesni.c
235
c->cri_key + ses->ses_klen, aes2->aes_klen);
sys/arch/amd64/amd64/aesni.c
295
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/aesni.c
296
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/amd64/amd64/aesni.c
299
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/amd64/amd64/aesni.c
301
axf->blocksize - (c->cri_klen / 8));
sys/arch/amd64/amd64/aesni.c
303
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/aesni.c
304
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/amd64/amd64/aesni.c
308
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/amd64/amd64/aesni.c
310
axf->blocksize - (c->cri_klen / 8));
sys/arch/amd64/amd64/aesni.c
312
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/aesni.c
313
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/amd64/amd64/aesni.c
316
swd->sw_alg = c->cri_alg;
sys/arch/amd64/amd64/bus_space.c
1000
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1007
for (; c != 0; c--, addr1 += 2, addr2 += 2)
sys/arch/amd64/amd64/bus_space.c
1011
for (addr1 += 2 * (c - 1), addr2 += 2 * (c - 1);
sys/arch/amd64/amd64/bus_space.c
1012
c != 0; c--, addr1 -= 2, addr2 -= 2)
sys/arch/amd64/amd64/bus_space.c
1019
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1026
for (; c != 0; c--, addr1 += 4, addr2 += 4)
sys/arch/amd64/amd64/bus_space.c
1030
for (addr1 += 4 * (c - 1), addr2 += 4 * (c - 1);
sys/arch/amd64/amd64/bus_space.c
1031
c != 0; c--, addr1 -= 4, addr2 -= 4)
sys/arch/amd64/amd64/bus_space.c
1038
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1358
u_int8_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1362
while (c--)
sys/arch/amd64/amd64/bus_space.c
1368
u_int16_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1372
while (c--)
sys/arch/amd64/amd64/bus_space.c
1378
u_int32_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1382
while (c--)
sys/arch/amd64/amd64/bus_space.c
1388
u_int64_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1392
while (c--)
sys/arch/amd64/amd64/bus_space.c
1398
u_int8_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1402
for (; c != 0; c--, addr++)
sys/arch/amd64/amd64/bus_space.c
1408
u_int16_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1412
for (; c != 0; c--, addr += sizeof(v))
sys/arch/amd64/amd64/bus_space.c
1418
u_int32_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1422
for (; c != 0; c--, addr += sizeof(v))
sys/arch/amd64/amd64/bus_space.c
1428
u_int64_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
1432
for (; c != 0; c--, addr += sizeof(v))
sys/arch/amd64/amd64/bus_space.c
1438
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1445
for (; c != 0; c--, addr1++, addr2++)
sys/arch/amd64/amd64/bus_space.c
1450
for (addr1 += (c - 1), addr2 += (c - 1);
sys/arch/amd64/amd64/bus_space.c
1451
c != 0; c--, addr1--, addr2--)
sys/arch/amd64/amd64/bus_space.c
1459
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1466
for (; c != 0; c--, addr1 += 2, addr2 += 2)
sys/arch/amd64/amd64/bus_space.c
1471
for (addr1 += 2 * (c - 1), addr2 += 2 * (c - 1);
sys/arch/amd64/amd64/bus_space.c
1472
c != 0; c--, addr1 -= 2, addr2 -= 2)
sys/arch/amd64/amd64/bus_space.c
1480
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1487
for (; c != 0; c--, addr1 += 4, addr2 += 4)
sys/arch/amd64/amd64/bus_space.c
1492
for (addr1 += 4 * (c - 1), addr2 += 4 * (c - 1);
sys/arch/amd64/amd64/bus_space.c
1493
c != 0; c--, addr1 -= 4, addr2 -= 4)
sys/arch/amd64/amd64/bus_space.c
1501
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
1508
for (; c != 0; c--, addr1 += 8, addr2 += 8)
sys/arch/amd64/amd64/bus_space.c
1513
for (addr1 += 8 * (c - 1), addr2 += 8 * (c - 1);
sys/arch/amd64/amd64/bus_space.c
1514
c != 0; c--, addr1 -= 8, addr2 -= 8)
sys/arch/amd64/amd64/bus_space.c
907
u_int8_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
911
while (c--)
sys/arch/amd64/amd64/bus_space.c
917
u_int16_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
921
while (c--)
sys/arch/amd64/amd64/bus_space.c
927
u_int32_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
931
while (c--)
sys/arch/amd64/amd64/bus_space.c
937
u_int64_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
944
u_int8_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
948
for (; c != 0; c--, addr++)
sys/arch/amd64/amd64/bus_space.c
954
u_int16_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
958
for (; c != 0; c--, addr += sizeof(v))
sys/arch/amd64/amd64/bus_space.c
964
u_int32_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
968
for (; c != 0; c--, addr += sizeof(v))
sys/arch/amd64/amd64/bus_space.c
974
u_int64_t v, size_t c)
sys/arch/amd64/amd64/bus_space.c
981
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/bus_space.c
988
for (; c != 0; c--, addr1++, addr2++)
sys/arch/amd64/amd64/bus_space.c
992
for (addr1 += (c - 1), addr2 += (c - 1);
sys/arch/amd64/amd64/bus_space.c
993
c != 0; c--, addr1--, addr2--)
sys/arch/amd64/amd64/conf.c
102
#define cdev_psp_init(c,n) { \
sys/arch/amd64/amd64/conf.c
103
dev_init(c,n,open), dev_init(c,n,close), \
sys/arch/amd64/amd64/conf.c
106
dev_init(c,n,ioctl), \
sys/arch/amd64/amd64/conf.c
79
#define cdev_ocis_init(c,n) { \
sys/arch/amd64/amd64/conf.c
80
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/amd64/amd64/conf.c
81
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/amd64/amd64/conf.c
86
#define cdev_nvram_init(c,n) { \
sys/arch/amd64/amd64/conf.c
87
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/arch/amd64/amd64/conf.c
93
#define cdev_vmm_init(c,n) { \
sys/arch/amd64/amd64/conf.c
94
dev_init(c,n,open), dev_init(c,n,close), \
sys/arch/amd64/amd64/conf.c
97
dev_init(c,n,ioctl), \
sys/arch/amd64/amd64/db_trace.c
101
char c;
sys/arch/amd64/amd64/db_trace.c
103
while ((c = *cp++) != 0) {
sys/arch/amd64/amd64/db_trace.c
104
if (c == 't')
sys/arch/amd64/amd64/db_trace.c
106
if (c == 'u')
sys/arch/amd64/amd64/mem.c
128
size_t c;
sys/arch/amd64/amd64/mem.c
152
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/amd64/amd64/mem.c
153
if (v >= (vaddr_t)&start && v < kern_end - c) {
sys/arch/amd64/amd64/mem.c
154
if (v < (vaddr_t)&etext - c &&
sys/arch/amd64/amd64/mem.c
157
} else if ((!uvm_kernacc((caddr_t)v, c,
sys/arch/amd64/amd64/mem.c
159
(v < pmap_direct_base || v > pmap_direct_end - c))
sys/arch/amd64/amd64/mem.c
161
error = uiomove((caddr_t)v, c, uio);
sys/arch/amd64/amd64/mem.c
173
c = iov->iov_len;
sys/arch/amd64/amd64/mem.c
179
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/amd64/amd64/mem.c
180
error = uiomove(zeropage, c, uio);
sys/arch/amd64/amd64/mem.c
186
iov->iov_base += c;
sys/arch/amd64/amd64/mem.c
187
iov->iov_len -= c;
sys/arch/amd64/amd64/mem.c
188
uio->uio_offset += c;
sys/arch/amd64/amd64/mem.c
189
uio->uio_resid -= c;
sys/arch/amd64/amd64/process_machdep.c
254
uint32_t a, b, c, d;
sys/arch/amd64/amd64/process_machdep.c
272
CPUID_LEAF(0xd, 2, a, b, c, d);
sys/arch/amd64/amd64/sev_bus_space.c
404
uint8_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
408
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
414
uint16_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
418
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
424
uint32_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
428
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
434
uint8_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
438
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
444
uint16_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
448
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
454
uint32_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
458
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
464
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
470
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
473
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
481
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
487
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
491
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
499
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
505
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
509
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
693
uint8_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
697
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
703
uint16_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
707
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
713
uint32_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
717
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
723
uint64_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
727
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
733
uint8_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
737
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
743
uint16_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
747
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
753
uint32_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
757
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
763
uint64_t v, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
767
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
773
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
779
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
783
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
791
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
797
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
801
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
809
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
815
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
819
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/sev_bus_space.c
827
bus_space_handle_t h2, bus_size_t o2, size_t c)
sys/arch/amd64/amd64/sev_bus_space.c
833
for (bus_size_t i = 0; i < c; ++i)
sys/arch/amd64/amd64/sev_bus_space.c
837
for (bus_size_t i = c; i > 0; --i)
sys/arch/amd64/amd64/ucode.c
126
uint16_t c;
sys/arch/amd64/amd64/ucode.c
134
uint8_t c[16];
sys/arch/amd64/amd64/via.c
114
struct cryptoini *c;
sys/arch/amd64/amd64/via.c
157
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/amd64/amd64/via.c
158
switch (c->cri_alg) {
sys/arch/amd64/amd64/via.c
160
switch (c->cri_klen) {
sys/arch/amd64/amd64/via.c
177
ses->ses_klen = c->cri_klen;
sys/arch/amd64/amd64/via.c
181
AES_KeySetup_Encrypt(ses->ses_ekey, c->cri_key,
sys/arch/amd64/amd64/via.c
182
c->cri_klen / 8);
sys/arch/amd64/amd64/via.c
183
AES_KeySetup_Decrypt(ses->ses_dkey, c->cri_key,
sys/arch/amd64/amd64/via.c
184
c->cri_klen / 8);
sys/arch/amd64/amd64/via.c
232
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/via.c
233
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/amd64/amd64/via.c
236
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/amd64/amd64/via.c
238
axf->blocksize - (c->cri_klen / 8));
sys/arch/amd64/amd64/via.c
240
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/via.c
241
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/amd64/amd64/via.c
245
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/amd64/amd64/via.c
247
axf->blocksize - (c->cri_klen / 8));
sys/arch/amd64/amd64/via.c
249
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/amd64/amd64/via.c
250
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/amd64/amd64/via.c
253
swd->sw_alg = c->cri_alg;
sys/arch/amd64/include/biosvar.h
79
#define BIOS32_MAKESIG(a, b, c, d) \
sys/arch/amd64/include/biosvar.h
80
((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
sys/arch/amd64/include/conf.h
46
#define cdev_acpi_init(c,n) {\
sys/arch/amd64/include/conf.h
47
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/amd64/include/conf.h
48
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/amd64/include/conf.h
50
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/amd64/include/conf.h
62
#define cdev_kexec_init(c,n) { \
sys/arch/amd64/include/conf.h
63
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/amd64/include/conf.h
64
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/amd64/include/loadfile_machdep.h
51
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/amd64/include/loadfile_machdep.h
52
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/amd64/include/loadfile_machdep.h
53
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/amd64/include/segments.h
83
#define USERMODE(c, f) (ISPL(c) == SEL_UPL)
sys/arch/amd64/include/segments.h
84
#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL)
sys/arch/amd64/stand/efiboot/diskprobe.c
203
char c;
sys/arch/amd64/stand/efiboot/diskprobe.c
206
c = 'c';
sys/arch/amd64/stand/efiboot/diskprobe.c
209
c = (d & 0x80) ? 'h' : 'f';
sys/arch/amd64/stand/efiboot/diskprobe.c
213
c, u, d,
sys/arch/amd64/stand/efiboot/efiboot.c
565
efi_cons_putc(dev_t dev, int c)
sys/arch/amd64/stand/efiboot/efiboot.c
569
if (c == '\n')
sys/arch/amd64/stand/efiboot/efiboot.c
572
buf[0] = c;
sys/arch/amd64/stand/efiboot/efiboot.c
661
pio_com_putc(dev_t dev, int c)
sys/arch/amd64/stand/efiboot/efiboot.c
668
outb(port + com_data, c);
sys/arch/amd64/stand/efiboot/efiboot.c
825
efi_com_putc(dev_t dev, int c)
sys/arch/amd64/stand/efiboot/efiboot.c
832
pio_com_putc(dev, c);
sys/arch/amd64/stand/efiboot/efiboot.c
836
buf = c;
sys/arch/amd64/stand/efiboot/machdep.c
42
#define CKPT(c) (*(u_int16_t*)0xb8148 = 0x4700 + (c))
sys/arch/amd64/stand/efiboot/machdep.c
44
#define CKPT(c) /* c */
sys/arch/amd64/stand/libsa/bioscons.c
112
pc_putc(dev_t dev, int c)
sys/arch/amd64/stand/libsa/bioscons.c
114
__asm volatile(DOINT(0x10) : : "a" (c | 0xe00), "b" (1) :
sys/arch/amd64/stand/libsa/bioscons.c
235
com_putc(dev_t dev, int c)
sys/arch/amd64/stand/libsa/bioscons.c
242
outb(port + com_data, c);
sys/arch/amd64/stand/libsa/diskprobe.c
311
char c;
sys/arch/amd64/stand/libsa/diskprobe.c
314
c = 'c';
sys/arch/amd64/stand/libsa/diskprobe.c
317
c = (d & 0x80) ? 'h' : 'f';
sys/arch/amd64/stand/libsa/diskprobe.c
321
c, u, d,
sys/arch/amd64/stand/libsa/machdep.c
40
#define CKPT(c) (*(u_int16_t*)0xb8148 = 0x4700 + (c))
sys/arch/amd64/stand/libsa/machdep.c
42
#define CKPT(c) /* c */
sys/arch/amd64/stand/libsa/time.c
43
bcdtoint(u_int8_t c)
sys/arch/amd64/stand/libsa/time.c
45
return ((c & 0xf0) / 8) * 5 + (c & 0x0f);
sys/arch/amd64/stand/rdboot/cmd.c
261
int c, timed_out = 0;
sys/arch/amd64/stand/rdboot/cmd.c
280
else if ((c = getchar()) != EOF) {
sys/arch/amd64/stand/rdboot/cmd.c
281
putchar(c); /* Echo. */
sys/arch/amd64/stand/rdboot/cmd.c
282
ungetc(c, stdin);
sys/arch/arm/arm/db_trace.c
59
char c, *cp = modif;
sys/arch/arm/arm/db_trace.c
64
while ((c = *cp++) != 0) {
sys/arch/arm/arm/db_trace.c
65
if (c == 'u')
sys/arch/arm/arm/db_trace.c
67
if (c == 't')
sys/arch/arm/arm/mem.c
148
size_t c;
sys/arch/arm/arm/mem.c
179
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/arm/arm/mem.c
180
error = uiomove((caddr_t)memhook + o, c, uio);
sys/arch/arm/arm/mem.c
188
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/arm/arm/mem.c
189
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/arm/arm/mem.c
192
error = uiomove((caddr_t)v, c, uio);
sys/arch/arm/arm/mem.c
208
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/arm/arm/mem.c
209
error = uiomove(zeropage, c, uio);
sys/arch/arm/include/bus.h
222
#define __bs_nonsingle(type, sz, t, h, o, a, c) \
sys/arch/arm/include/bus.h
223
(*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c)
sys/arch/arm/include/bus.h
224
#define __bs_set(type, sz, t, h, o, v, c) \
sys/arch/arm/include/bus.h
225
(*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, v, c)
sys/arch/arm/include/bus.h
227
(*(t)->__bs_opname(c,sz))((t)->bs_cookie, h1, o1, h2, o2, cnt)
sys/arch/arm/include/bus.h
232
#define bus_space_map(t, a, s, c, hp) \
sys/arch/arm/include/bus.h
233
(*(t)->bs_map)((t)->bs_cookie, (a), (s), (c), (hp))
sys/arch/arm/include/bus.h
243
#define bus_space_alloc(t, rs, re, s, a, b, c, ap, hp) \
sys/arch/arm/include/bus.h
245
(c), (ap), (hp))
sys/arch/arm/include/bus.h
281
#define bus_space_read_multi_1(t, h, o, a, c) \
sys/arch/arm/include/bus.h
282
__bs_nonsingle(rm,1,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
283
#define bus_space_read_multi_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
284
__bs_nonsingle(rm,2,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
285
#define bus_space_read_multi_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
286
__bs_nonsingle(rm,4,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
287
#define bus_space_read_multi_8(t, h, o, a, c) \
sys/arch/arm/include/bus.h
288
__bs_nonsingle(rm,8,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
293
#define bus_space_read_region_1(t, h, o, a, c) \
sys/arch/arm/include/bus.h
294
__bs_nonsingle(rr,1,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
295
#define bus_space_read_region_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
296
__bs_nonsingle(rr,2,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
297
#define bus_space_read_region_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
298
__bs_nonsingle(rr,4,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
299
#define bus_space_read_region_8(t, h, o, a, c) \
sys/arch/arm/include/bus.h
300
__bs_nonsingle(rr,8,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
313
#define bus_space_write_multi_1(t, h, o, a, c) \
sys/arch/arm/include/bus.h
314
__bs_nonsingle(wm,1,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
315
#define bus_space_write_multi_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
316
__bs_nonsingle(wm,2,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
317
#define bus_space_write_multi_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
318
__bs_nonsingle(wm,4,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
319
#define bus_space_write_multi_8(t, h, o, a, c) \
sys/arch/arm/include/bus.h
320
__bs_nonsingle(wm,8,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
325
#define bus_space_write_region_1(t, h, o, a, c) \
sys/arch/arm/include/bus.h
326
__bs_nonsingle(wr,1,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
327
#define bus_space_write_region_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
328
__bs_nonsingle(wr,2,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
329
#define bus_space_write_region_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
330
__bs_nonsingle(wr,4,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
331
#define bus_space_write_region_8(t, h, o, a, c) \
sys/arch/arm/include/bus.h
332
__bs_nonsingle(wr,8,(t),(h),(o),(a),(c))
sys/arch/arm/include/bus.h
337
#define bus_space_set_multi_1(t, h, o, v, c) \
sys/arch/arm/include/bus.h
338
__bs_set(sm,1,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
339
#define bus_space_set_multi_2(t, h, o, v, c) \
sys/arch/arm/include/bus.h
340
__bs_set(sm,2,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
341
#define bus_space_set_multi_4(t, h, o, v, c) \
sys/arch/arm/include/bus.h
342
__bs_set(sm,4,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
343
#define bus_space_set_multi_8(t, h, o, v, c) \
sys/arch/arm/include/bus.h
344
__bs_set(sm,8,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
349
#define bus_space_set_region_1(t, h, o, v, c) \
sys/arch/arm/include/bus.h
350
__bs_set(sr,1,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
351
#define bus_space_set_region_2(t, h, o, v, c) \
sys/arch/arm/include/bus.h
352
__bs_set(sr,2,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
353
#define bus_space_set_region_4(t, h, o, v, c) \
sys/arch/arm/include/bus.h
354
__bs_set(sr,4,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
355
#define bus_space_set_region_8(t, h, o, v, c) \
sys/arch/arm/include/bus.h
356
__bs_set(sr,8,(t),(h),(o),(v),(c))
sys/arch/arm/include/bus.h
361
#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
sys/arch/arm/include/bus.h
362
__bs_copy(1, t, h1, o1, h2, o2, c)
sys/arch/arm/include/bus.h
363
#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
sys/arch/arm/include/bus.h
364
__bs_copy(2, t, h1, o1, h2, o2, c)
sys/arch/arm/include/bus.h
365
#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
sys/arch/arm/include/bus.h
366
__bs_copy(4, t, h1, o1, h2, o2, c)
sys/arch/arm/include/bus.h
367
#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
sys/arch/arm/include/bus.h
368
__bs_copy(8, t, h1, o1, h2, o2, c)
sys/arch/arm/include/bus.h
850
#define bus_space_read_raw_region_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
851
bus_space_read_region_2((t), (h), (o), (u_int16_t *)(a), (c) >> 1)
sys/arch/arm/include/bus.h
852
#define bus_space_read_raw_region_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
853
bus_space_read_region_4((t), (h), (o), (u_int32_t *)(a), (c) >> 2)
sys/arch/arm/include/bus.h
872
#define bus_space_write_raw_region_2(t, h, o, a, c) \
sys/arch/arm/include/bus.h
873
bus_space_write_region_2((t), (h), (o), (const u_int16_t *)(a), (c) >> 1)
sys/arch/arm/include/bus.h
874
#define bus_space_write_raw_region_4(t, h, o, a, c) \
sys/arch/arm/include/bus.h
875
bus_space_write_region_4((t), (h), (o), (const u_int32_t *)(a), (c) >> 2)
sys/arch/arm/include/conf.h
61
#define cdev_apm_init(c,n) { \
sys/arch/arm/include/conf.h
62
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/arm/include/conf.h
63
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/arm/include/conf.h
65
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/arm/include/conf.h
74
#define cdev_openprom_init(c,n) { \
sys/arch/arm/include/conf.h
75
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/arm/include/conf.h
76
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/arm/include/cpufunc.h
162
#define cpu_control(c, s) cpufuncs.cf_control(c, s)
sys/arch/arm/include/cpufunc.h
163
#define cpu_auxcontrol(c, s) cpufuncs.cf_auxcontrol(c, s)
sys/arch/arm/include/pci_machdep.h
100
#define pci_intr_establish_cpu(c, ih, l, ci, h, a, nm) \
sys/arch/arm/include/pci_machdep.h
101
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (ci), (h), (a),\
sys/arch/arm/include/pci_machdep.h
103
#define pci_intr_disestablish(c, iv) \
sys/arch/arm/include/pci_machdep.h
104
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/arm/include/pci_machdep.h
106
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/arm/include/pci_machdep.h
107
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/arm/include/pci_machdep.h
75
#define pci_bus_maxdevs(c, b) \
sys/arch/arm/include/pci_machdep.h
76
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/arm/include/pci_machdep.h
77
#define pci_make_tag(c, b, d, f) \
sys/arch/arm/include/pci_machdep.h
78
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/arm/include/pci_machdep.h
79
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/arm/include/pci_machdep.h
80
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/arm/include/pci_machdep.h
81
#define pci_conf_size(c, t) \
sys/arch/arm/include/pci_machdep.h
82
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/arm/include/pci_machdep.h
83
#define pci_conf_read(c, t, r) \
sys/arch/arm/include/pci_machdep.h
84
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/arm/include/pci_machdep.h
85
#define pci_conf_write(c, t, r, v) \
sys/arch/arm/include/pci_machdep.h
86
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/arm/include/pci_machdep.h
87
#define pci_probe_device_hook(c, a) \
sys/arch/arm/include/pci_machdep.h
88
(*(c)->pc_probe_device_hook)((c)->pc_conf_v, (a))
sys/arch/arm/include/pci_machdep.h
89
#define pci_intr_map(c, ihp) \
sys/arch/arm/include/pci_machdep.h
90
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/arm/include/pci_machdep.h
91
#define pci_intr_map_msi(c, ihp) \
sys/arch/arm/include/pci_machdep.h
92
(*(c)->pa_pc->pc_intr_map_msi)((c), (ihp))
sys/arch/arm/include/pci_machdep.h
93
#define pci_intr_map_msix(c, vec, ihp) \
sys/arch/arm/include/pci_machdep.h
94
(*(c)->pa_pc->pc_intr_map_msix)((c), (vec), (ihp))
sys/arch/arm/include/pci_machdep.h
95
#define pci_intr_string(c, ih) \
sys/arch/arm/include/pci_machdep.h
96
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/arm/include/pci_machdep.h
97
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/arm/include/pci_machdep.h
98
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), NULL, (h), (a),\
sys/arch/arm64/arm64/cryptox.c
145
struct cryptoini *c;
sys/arch/arm64/arm64/cryptox.c
162
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/arm64/arm64/cryptox.c
163
switch (c->cri_alg) {
sys/arch/arm64/arm64/cryptox.c
165
ses->ses_klen = c->cri_klen / 8;
sys/arch/arm64/arm64/cryptox.c
167
aes_v8_set_encrypt_key(c->cri_key, c->cri_klen, &ses->ses_ekey);
sys/arch/arm64/arm64/cryptox.c
168
aes_v8_set_decrypt_key(c->cri_key, c->cri_klen, &ses->ses_dkey);
sys/arch/arm64/arm64/cryptox.c
212
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/arm64/arm64/cryptox.c
213
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/arm64/arm64/cryptox.c
216
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/arm64/arm64/cryptox.c
218
axf->blocksize - (c->cri_klen / 8));
sys/arch/arm64/arm64/cryptox.c
220
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/arm64/arm64/cryptox.c
221
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/arm64/arm64/cryptox.c
225
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/arm64/arm64/cryptox.c
227
axf->blocksize - (c->cri_klen / 8));
sys/arch/arm64/arm64/cryptox.c
229
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/arm64/arm64/cryptox.c
230
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/arm64/arm64/cryptox.c
233
swd->sw_alg = c->cri_alg;
sys/arch/arm64/arm64/db_trace.c
58
char c, *cp = modif;
sys/arch/arm64/arm64/db_trace.c
66
while ((c = *cp++) != 0) {
sys/arch/arm64/arm64/db_trace.c
67
if (c == 'u')
sys/arch/arm64/arm64/db_trace.c
69
if (c == 't')
sys/arch/arm64/arm64/disasm.c
101
OPFUNC_DECL(func, a, b, c, d, e, f, g, \
sys/arch/arm64/arm64/disasm.c
103
#define OP8FUNC(func, a, b, c, d, e, f, g, h) \
sys/arch/arm64/arm64/disasm.c
105
OPFUNC_DECL(func, a, b, c, d, e, f, g, h)
sys/arch/arm64/arm64/disasm.c
198
#define CONDNAME(c) conditioncode[(c) & 15]
sys/arch/arm64/arm64/disasm.c
199
#define IVCONDNAME(c) conditioncode[((c) ^ 1) & 15]
sys/arch/arm64/arm64/disasm.c
53
#define OPFUNC_DECL(func, a, b, c, d, e, f, g, h) \
sys/arch/arm64/arm64/disasm.c
55
uint64_t a, uint64_t b, uint64_t c, uint64_t d, \
sys/arch/arm64/arm64/disasm.c
82
#define OP3FUNC(func, a, b, c) \
sys/arch/arm64/arm64/disasm.c
84
OPFUNC_DECL(func, a, b, c, \
sys/arch/arm64/arm64/disasm.c
87
#define OP4FUNC(func, a, b, c, d) \
sys/arch/arm64/arm64/disasm.c
89
OPFUNC_DECL(func, a, b, c, d, \
sys/arch/arm64/arm64/disasm.c
91
#define OP5FUNC(func, a, b, c, d, e) \
sys/arch/arm64/arm64/disasm.c
93
OPFUNC_DECL( func, a, b, c, d, e, \
sys/arch/arm64/arm64/disasm.c
95
#define OP6FUNC(func, a, b, c, d, e, f) \
sys/arch/arm64/arm64/disasm.c
97
OPFUNC_DECL(func, a, b, c, d, e, f, \
sys/arch/arm64/arm64/disasm.c
99
#define OP7FUNC(func, a, b, c, d, e, f, g) \
sys/arch/arm64/arm64/mem.c
150
size_t c;
sys/arch/arm64/arm64/mem.c
181
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/arm64/arm64/mem.c
182
error = uiomove((caddr_t)vmmap + o, c, uio);
sys/arch/arm64/arm64/mem.c
190
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/arm64/arm64/mem.c
191
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/arm64/arm64/mem.c
194
error = uiomove((caddr_t)v, c, uio);
sys/arch/arm64/arm64/mem.c
210
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/arm64/arm64/mem.c
211
error = uiomove(zeropage, c, uio);
sys/arch/arm64/include/asm.h
128
#define ENTRY(y) _ENTRY(y); bti c; _PROF_PROLOGUE
sys/arch/arm64/include/asm.h
129
#define ENTRY_NP(y) _ENTRY(y); bti c
sys/arch/arm64/include/asm.h
130
#define ENTRY_NB(y) _ENTRY_NB(y); bti c; _PROF_PROLOGUE
sys/arch/arm64/include/asm.h
131
#define ASENTRY(y) _ENTRY(y); bti c; _PROF_PROLOGUE
sys/arch/arm64/include/asm.h
132
#define ASENTRY_NP(y) _ENTRY(y); bti c
sys/arch/arm64/include/bus.h
127
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
sys/arch/arm64/include/bus.h
265
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/arm64/include/bus.h
270
while (c--)
sys/arch/arm64/include/bus.h
277
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/arm64/include/bus.h
282
while (c--)
sys/arch/arm64/include/bus.h
288
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/arm64/include/bus.h
293
while (c--)
sys/arch/arm64/include/bus.h
299
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/arm64/include/bus.h
304
while (c--)
sys/arch/arm64/include/bus.h
31
#define CAT3(a,b,c) a##b##c
sys/arch/arm64/include/bus.h
34
#define CAT3(a,b,c) a/**/b/**/c
sys/arch/arm64/include/conf.h
43
#define cdev_openprom_init(c,n) { \
sys/arch/arm64/include/conf.h
44
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/arm64/include/conf.h
45
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/arm64/include/conf.h
52
#define cdev_acpiapm_init(c,n) { \
sys/arch/arm64/include/conf.h
53
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/arm64/include/conf.h
54
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/arm64/include/conf.h
56
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/arm64/include/loadfile_machdep.h
43
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/arm64/include/loadfile_machdep.h
44
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/arm64/include/loadfile_machdep.h
45
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/arm64/include/pci_machdep.h
100
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/arm64/include/pci_machdep.h
101
#define pci_probe_device_hook(c, a) \
sys/arch/arm64/include/pci_machdep.h
102
(*(c)->pc_probe_device_hook)((c)->pc_conf_v, (a))
sys/arch/arm64/include/pci_machdep.h
103
#define pci_intr_map(c, ihp) \
sys/arch/arm64/include/pci_machdep.h
104
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/arm64/include/pci_machdep.h
105
#define pci_intr_map_msi(c, ihp) \
sys/arch/arm64/include/pci_machdep.h
106
(*(c)->pa_pc->pc_intr_map_msi)((c), (ihp))
sys/arch/arm64/include/pci_machdep.h
107
#define pci_intr_map_msivec(c, vec, ihp) \
sys/arch/arm64/include/pci_machdep.h
108
(*(c)->pa_pc->pc_intr_map_msivec)((c), (vec), (ihp))
sys/arch/arm64/include/pci_machdep.h
109
#define pci_intr_map_msix(c, vec, ihp) \
sys/arch/arm64/include/pci_machdep.h
110
(*(c)->pa_pc->pc_intr_map_msix)((c), (vec), (ihp))
sys/arch/arm64/include/pci_machdep.h
111
#define pci_intr_string(c, ih) \
sys/arch/arm64/include/pci_machdep.h
112
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/arm64/include/pci_machdep.h
113
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/arm64/include/pci_machdep.h
114
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), NULL, (h), (a),\
sys/arch/arm64/include/pci_machdep.h
116
#define pci_intr_establish_cpu(c, ih, l, ci, h, a, nm) \
sys/arch/arm64/include/pci_machdep.h
117
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (ci), (h), (a),\
sys/arch/arm64/include/pci_machdep.h
119
#define pci_intr_disestablish(c, iv) \
sys/arch/arm64/include/pci_machdep.h
120
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/arm64/include/pci_machdep.h
122
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/arm64/include/pci_machdep.h
123
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/arm64/include/pci_machdep.h
89
#define pci_bus_maxdevs(c, b) \
sys/arch/arm64/include/pci_machdep.h
90
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/arm64/include/pci_machdep.h
91
#define pci_make_tag(c, b, d, f) \
sys/arch/arm64/include/pci_machdep.h
92
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/arm64/include/pci_machdep.h
93
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/arm64/include/pci_machdep.h
94
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/arm64/include/pci_machdep.h
95
#define pci_conf_size(c, t) \
sys/arch/arm64/include/pci_machdep.h
96
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/arm64/include/pci_machdep.h
97
#define pci_conf_read(c, t, r) \
sys/arch/arm64/include/pci_machdep.h
98
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/arm64/include/pci_machdep.h
99
#define pci_conf_write(c, t, r, v) \
sys/arch/arm64/stand/efiboot/efiboot.c
198
efi_cons_putc(dev_t dev, int c)
sys/arch/arm64/stand/efiboot/efiboot.c
202
if (c == '\n')
sys/arch/arm64/stand/efiboot/efiboot.c
205
buf[0] = c;
sys/arch/arm64/stand/efiboot/efiboot.c
232
efi_com_putc(dev_t dev, int c)
sys/arch/arm64/stand/efiboot/efiboot.c
234
efi_cons_putc(dev, c);
sys/arch/arm64/stand/efiboot/efiboot.c
258
efi_fb_putc(dev_t dev, int c)
sys/arch/arm64/stand/efiboot/efiboot.c
260
efi_cons_putc(dev, c);
sys/arch/armv7/include/loadfile_machdep.h
43
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/armv7/include/loadfile_machdep.h
44
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/armv7/include/loadfile_machdep.h
45
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/armv7/omap/omdisplay.c
1129
if (descr->c.nrows == 0) {
sys/arch/armv7/omap/omdisplay.c
1134
rasops_init(rinfo, descr->c.ncols, descr->c.nrows);
sys/arch/armv7/omap/omdisplay.c
1136
rasops_init(rinfo, descr->c.nrows, descr->c.ncols);
sys/arch/armv7/omap/omdisplay.c
1139
descr->c.nrows = rinfo->ri_rows;
sys/arch/armv7/omap/omdisplay.c
1140
descr->c.ncols = rinfo->ri_cols;
sys/arch/armv7/omap/omdisplay.c
1141
descr->c.capabilities = rinfo->ri_caps;
sys/arch/armv7/omap/omdisplay.c
1142
descr->c.textops = &rinfo->ri_ops;
sys/arch/armv7/omap/omdisplay.c
479
struct wsscreen_descr c; /* standard descriptor */
sys/arch/armv7/omap/omdisplay.c
493
&omdisplay_screen.c
sys/arch/armv7/stand/efiboot/efiboot.c
181
efi_cons_putc(dev_t dev, int c)
sys/arch/armv7/stand/efiboot/efiboot.c
185
if (c == '\n')
sys/arch/armv7/stand/efiboot/efiboot.c
188
buf[0] = c;
sys/arch/armv7/stand/efiboot/efiboot.c
215
efi_com_putc(dev_t dev, int c)
sys/arch/armv7/stand/efiboot/efiboot.c
217
efi_cons_putc(dev, c);
sys/arch/armv7/stand/efiboot/efiboot.c
241
efi_fb_putc(dev_t dev, int c)
sys/arch/armv7/stand/efiboot/efiboot.c
243
efi_cons_putc(dev, c);
sys/arch/hppa/dev/dino.c
1004
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1021
c /= 2;
sys/arch/hppa/dev/dino.c
1022
while (c--)
sys/arch/hppa/dev/dino.c
1028
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1043
c /= 4;
sys/arch/hppa/dev/dino.c
1044
while (c--)
sys/arch/hppa/dev/dino.c
1050
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1057
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1075
c /= 2;
sys/arch/hppa/dev/dino.c
1076
while (c--)
sys/arch/hppa/dev/dino.c
1082
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1098
c /= 4;
sys/arch/hppa/dev/dino.c
1099
while (c--)
sys/arch/hppa/dev/dino.c
1105
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1111
dino_rr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1118
while (c--)
sys/arch/hppa/dev/dino.c
1124
for (; c--; h++) {
sys/arch/hppa/dev/dino.c
1133
dino_rr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1140
while (c--) {
sys/arch/hppa/dev/dino.c
1148
for (; c--; h += 2) {
sys/arch/hppa/dev/dino.c
1160
dino_rr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1167
while (c--) {
sys/arch/hppa/dev/dino.c
1175
for (; c--; h += 4) {
sys/arch/hppa/dev/dino.c
1184
dino_rr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1190
dino_wr_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1197
while (c--)
sys/arch/hppa/dev/dino.c
1203
for (; c--; h++) {
sys/arch/hppa/dev/dino.c
1212
dino_wr_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1219
while (c--) {
sys/arch/hppa/dev/dino.c
1227
for (; c--; h += 2) {
sys/arch/hppa/dev/dino.c
1239
dino_wr_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1246
while (c--) {
sys/arch/hppa/dev/dino.c
1254
for (; c--; h += 4) {
sys/arch/hppa/dev/dino.c
1263
dino_wr_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1270
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1274
c /= 2;
sys/arch/hppa/dev/dino.c
1278
while (c--)
sys/arch/hppa/dev/dino.c
1284
for (; c--; h += 2) {
sys/arch/hppa/dev/dino.c
1296
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1300
c /= 4;
sys/arch/hppa/dev/dino.c
1304
while (c--)
sys/arch/hppa/dev/dino.c
1310
for (; c--; h += 4) {
sys/arch/hppa/dev/dino.c
1319
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1326
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1331
c /= 2;
sys/arch/hppa/dev/dino.c
1335
while (c--)
sys/arch/hppa/dev/dino.c
1341
for (; c--; h += 2) {
sys/arch/hppa/dev/dino.c
1353
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1358
c /= 4;
sys/arch/hppa/dev/dino.c
1362
while (c--)
sys/arch/hppa/dev/dino.c
1368
for (; c--; h += 4) {
sys/arch/hppa/dev/dino.c
1377
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
1383
dino_sr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
1390
while (c--)
sys/arch/hppa/dev/dino.c
1396
for (; c--; h++) {
sys/arch/hppa/dev/dino.c
1405
dino_sr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
1413
while (c--)
sys/arch/hppa/dev/dino.c
1419
for (; c--; h += 2) {
sys/arch/hppa/dev/dino.c
1430
dino_sr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
1438
while (c--)
sys/arch/hppa/dev/dino.c
1444
for (; c--; h += 4) {
sys/arch/hppa/dev/dino.c
1452
dino_sr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
1459
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/dino.c
1461
while (c--)
sys/arch/hppa/dev/dino.c
1467
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/dino.c
1469
while (c--) {
sys/arch/hppa/dev/dino.c
1478
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/dino.c
1480
while (c--) {
sys/arch/hppa/dev/dino.c
1489
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/dino.c
1491
while (c--) {
sys/arch/hppa/dev/dino.c
797
dino_rm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
812
while (c--)
sys/arch/hppa/dev/dino.c
817
dino_rm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
834
while (c--)
sys/arch/hppa/dev/dino.c
839
dino_rm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
854
while (c--)
sys/arch/hppa/dev/dino.c
859
dino_rm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
865
dino_wm_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
880
while (c--)
sys/arch/hppa/dev/dino.c
885
dino_wm_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
902
while (c--)
sys/arch/hppa/dev/dino.c
907
dino_wm_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
922
while (c--)
sys/arch/hppa/dev/dino.c
927
dino_wm_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/dino.c
933
dino_sm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
948
while (c--)
sys/arch/hppa/dev/dino.c
953
dino_sm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
971
while (c--)
sys/arch/hppa/dev/dino.c
976
dino_sm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/dino.c
992
while (c--)
sys/arch/hppa/dev/dino.c
997
dino_sm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
1003
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/elroy.c
1005
while (c--)
sys/arch/hppa/dev/elroy.c
1011
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/elroy.c
1013
while (c--) {
sys/arch/hppa/dev/elroy.c
1022
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/elroy.c
1024
while (c--) {
sys/arch/hppa/dev/elroy.c
103
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
1033
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/dev/elroy.c
1035
while (c--) {
sys/arch/hppa/dev/elroy.c
105
u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
107
u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
109
u_int64_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
111
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
113
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
115
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
117
const u_int64_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
119
u_int8_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
121
u_int16_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
123
u_int32_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
125
u_int64_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
127
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
129
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
131
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
133
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
135
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
137
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
139
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
141
u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
143
u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
145
u_int64_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
147
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
149
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
151
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
153
const u_int64_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
155
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
157
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
159
u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
161
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
163
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
165
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/dev/elroy.c
167
u_int8_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
169
u_int16_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
171
u_int32_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
173
u_int64_t vv, bus_size_t c);
sys/arch/hppa/dev/elroy.c
175
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/dev/elroy.c
177
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/dev/elroy.c
179
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/dev/elroy.c
181
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/dev/elroy.c
558
elroy_rm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
564
while (c--)
sys/arch/hppa/dev/elroy.c
569
elroy_rm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
575
while (c--)
sys/arch/hppa/dev/elroy.c
580
elroy_rm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
586
while (c--)
sys/arch/hppa/dev/elroy.c
591
elroy_rm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
597
while (c--)
sys/arch/hppa/dev/elroy.c
602
elroy_wm_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
608
while (c--)
sys/arch/hppa/dev/elroy.c
613
elroy_wm_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
619
while (c--)
sys/arch/hppa/dev/elroy.c
624
elroy_wm_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
630
while (c--)
sys/arch/hppa/dev/elroy.c
635
elroy_wm_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
641
while (c--)
sys/arch/hppa/dev/elroy.c
646
elroy_sm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
652
while (c--)
sys/arch/hppa/dev/elroy.c
657
elroy_sm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
664
while (c--)
sys/arch/hppa/dev/elroy.c
669
elroy_sm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
676
while (c--)
sys/arch/hppa/dev/elroy.c
681
elroy_sm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
688
while (c--)
sys/arch/hppa/dev/elroy.c
694
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
700
c /= 2;
sys/arch/hppa/dev/elroy.c
701
while (c--)
sys/arch/hppa/dev/elroy.c
707
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
713
c /= 4;
sys/arch/hppa/dev/elroy.c
714
while (c--)
sys/arch/hppa/dev/elroy.c
720
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
726
c /= 8;
sys/arch/hppa/dev/elroy.c
727
while (c--)
sys/arch/hppa/dev/elroy.c
733
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
740
c /= 2;
sys/arch/hppa/dev/elroy.c
741
while (c--)
sys/arch/hppa/dev/elroy.c
747
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
754
c /= 4;
sys/arch/hppa/dev/elroy.c
755
while (c--)
sys/arch/hppa/dev/elroy.c
761
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
768
c /= 8;
sys/arch/hppa/dev/elroy.c
769
while (c--)
sys/arch/hppa/dev/elroy.c
774
elroy_rr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
780
while (c--)
sys/arch/hppa/dev/elroy.c
785
elroy_rr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
791
while (c--) {
sys/arch/hppa/dev/elroy.c
798
elroy_rr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
804
while (c--) {
sys/arch/hppa/dev/elroy.c
811
elroy_rr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
817
while (c--) {
sys/arch/hppa/dev/elroy.c
824
elroy_wr_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
830
while (c--)
sys/arch/hppa/dev/elroy.c
835
elroy_wr_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
841
while (c--) {
sys/arch/hppa/dev/elroy.c
848
elroy_wr_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
854
while (c--) {
sys/arch/hppa/dev/elroy.c
861
elroy_wr_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
867
while (c--) {
sys/arch/hppa/dev/elroy.c
875
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
879
c /= 2;
sys/arch/hppa/dev/elroy.c
882
while (c--)
sys/arch/hppa/dev/elroy.c
888
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
892
c /= 4;
sys/arch/hppa/dev/elroy.c
895
while (c--)
sys/arch/hppa/dev/elroy.c
901
u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
905
c /= 8;
sys/arch/hppa/dev/elroy.c
908
while (c--)
sys/arch/hppa/dev/elroy.c
914
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
919
c /= 2;
sys/arch/hppa/dev/elroy.c
922
while (c--)
sys/arch/hppa/dev/elroy.c
928
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
933
c /= 4;
sys/arch/hppa/dev/elroy.c
936
while (c--)
sys/arch/hppa/dev/elroy.c
942
const u_int8_t *a, bus_size_t c)
sys/arch/hppa/dev/elroy.c
947
c /= 8;
sys/arch/hppa/dev/elroy.c
950
while (c--)
sys/arch/hppa/dev/elroy.c
955
elroy_sr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
961
while (c--)
sys/arch/hppa/dev/elroy.c
966
elroy_sr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
973
while (c--)
sys/arch/hppa/dev/elroy.c
978
elroy_sr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
985
while (c--)
sys/arch/hppa/dev/elroy.c
990
elroy_sr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/dev/elroy.c
997
while (c--)
sys/arch/hppa/dev/mongoose.c
100
u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
102
u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
104
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
106
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
108
u_int16_t vv, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
110
u_int32_t vv, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
301
mg_isa_rm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
304
while (c--)
sys/arch/hppa/dev/mongoose.c
309
mg_isa_rm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
312
while (c--)
sys/arch/hppa/dev/mongoose.c
317
mg_isa_wm_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
321
while (c--) {
sys/arch/hppa/dev/mongoose.c
328
mg_isa_wm_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
332
while (c--) {
sys/arch/hppa/dev/mongoose.c
339
mg_isa_sm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
343
while (c--)
sys/arch/hppa/dev/mongoose.c
348
mg_isa_sm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
352
while (c--)
sys/arch/hppa/dev/mongoose.c
357
mg_isa_rr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
362
while (c--) {
sys/arch/hppa/dev/mongoose.c
369
mg_isa_rr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
374
while (c--) {
sys/arch/hppa/dev/mongoose.c
381
mg_isa_wr_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
386
while (c--) {
sys/arch/hppa/dev/mongoose.c
393
mg_isa_wr_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
398
while (c--) {
sys/arch/hppa/dev/mongoose.c
405
mg_isa_sr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
410
while (c--)
sys/arch/hppa/dev/mongoose.c
415
mg_isa_sr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/dev/mongoose.c
420
while (c--)
sys/arch/hppa/dev/mongoose.c
88
u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
90
u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
92
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
94
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
96
u_int16_t vv, bus_size_t c);
sys/arch/hppa/dev/mongoose.c
98
u_int32_t vv, bus_size_t c);
sys/arch/hppa/dev/pdc.c
338
int c;
sys/arch/hppa/dev/pdc.c
340
while (pdccnlookc(tp->t_dev, &c)) {
sys/arch/hppa/dev/pdc.c
342
(*linesw[tp->t_line].l_rint)(c, tp);
sys/arch/hppa/dev/pdc.c
382
int c;
sys/arch/hppa/dev/pdc.c
387
while(!pdccnlookc(dev, &c))
sys/arch/hppa/dev/pdc.c
390
return (c);
sys/arch/hppa/dev/pdc.c
394
pdccnputc(dev_t dev, int c)
sys/arch/hppa/dev/pdc.c
399
*pdc_consbuf = c;
sys/arch/hppa/gsc/gsckbc.c
549
int c;
sys/arch/hppa/gsc/gsckbc.c
551
c = pckbc_poll_data1(t->t_iot, t->t_ioh_d, t->t_ioh_d, slot, 0);
sys/arch/hppa/gsc/gsckbc.c
552
if (c != -1 && q && CMD_IN_QUEUE(q)) {
sys/arch/hppa/gsc/gsckbc.c
555
if (pckbc_cmdresponse(t, slot, c))
sys/arch/hppa/gsc/gsckbc.c
558
return (c);
sys/arch/hppa/gsc/gsckbc.c
608
int i, c = 0;
sys/arch/hppa/gsc/gsckbc.c
617
c = pckbc_poll_data1(iot, ioh, ioh, slot, 0);
sys/arch/hppa/gsc/gsckbc.c
618
if (c != -1)
sys/arch/hppa/gsc/gsckbc.c
622
if (c == KBC_DEVCMD_ACK) {
sys/arch/hppa/gsc/gsckbc.c
626
if (c == KBC_DEVCMD_RESEND) {
sys/arch/hppa/gsc/gsckbc.c
640
if (c == -1) {
sys/arch/hppa/gsc/gsckbc.c
648
printf("pckbc_cmd: lost 0x%x\n", c);
sys/arch/hppa/gsc/gsckbc.c
658
c = pckbc_poll_data1(iot, ioh, ioh, slot, 0);
sys/arch/hppa/gsc/gsckbc.c
659
if (c != -1)
sys/arch/hppa/gsc/gsckbc.c
662
if (c == -1) {
sys/arch/hppa/gsc/gsckbc.c
669
cmd->response[cmd->responseidx++] = c;
sys/arch/hppa/gsc/harmony.c
1104
struct harmony_channel *c = &sc->sc_playback;
sys/arch/hppa/gsc/harmony.c
1105
struct harmony_dma *d = c->c_current;
sys/arch/hppa/gsc/harmony.c
1115
cur >= (d->d_map->dm_segs[0].ds_addr + c->c_segsz))
sys/arch/hppa/gsc/harmony.c
1118
d->d_map->dm_segs[0].ds_addr + c->c_segsz);
sys/arch/hppa/gsc/harmony.c
1121
if (cur > c->c_theaddr) {
sys/arch/hppa/gsc/harmony.c
1122
nsegs = (cur - c->c_theaddr) / HARMONY_BUFSIZE;
sys/arch/hppa/gsc/harmony.c
1123
} else if (cur < c->c_theaddr) {
sys/arch/hppa/gsc/harmony.c
1124
nsegs = (d->d_map->dm_segs[0].ds_addr + c->c_segsz -
sys/arch/hppa/gsc/harmony.c
1125
c->c_theaddr) / HARMONY_BUFSIZE;
sys/arch/hppa/gsc/harmony.c
1130
if (nsegs != 0 && c->c_intr != NULL) {
sys/arch/hppa/gsc/harmony.c
1132
(*c->c_intr)(c->c_intrarg);
sys/arch/hppa/gsc/harmony.c
1133
c->c_theaddr = cur;
sys/arch/hppa/gsc/harmony.c
276
struct harmony_channel *c;
sys/arch/hppa/gsc/harmony.c
293
c = &sc->sc_playback;
sys/arch/hppa/gsc/harmony.c
294
d = c->c_current;
sys/arch/hppa/gsc/harmony.c
295
togo = c->c_segsz - c->c_cnt;
sys/arch/hppa/gsc/harmony.c
298
c->c_cnt = togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
300
nextaddr = c->c_lastaddr;
sys/arch/hppa/gsc/harmony.c
301
if (togo > c->c_blksz)
sys/arch/hppa/gsc/harmony.c
302
togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
303
c->c_cnt += togo;
sys/arch/hppa/gsc/harmony.c
308
c->c_blksz, BUS_DMASYNC_PREWRITE);
sys/arch/hppa/gsc/harmony.c
312
c->c_lastaddr = nextaddr + togo;
sys/arch/hppa/gsc/harmony.c
319
c = &sc->sc_capture;
sys/arch/hppa/gsc/harmony.c
322
if (sc->sc_capturing && c->c_intr != NULL)
sys/arch/hppa/gsc/harmony.c
323
(*c->c_intr)(c->c_intrarg);
sys/arch/hppa/gsc/harmony.c
877
struct harmony_channel *c = &sc->sc_playback;
sys/arch/hppa/gsc/harmony.c
890
c->c_intr = intr;
sys/arch/hppa/gsc/harmony.c
891
c->c_intrarg = intrarg;
sys/arch/hppa/gsc/harmony.c
892
c->c_blksz = blksize;
sys/arch/hppa/gsc/harmony.c
893
c->c_current = d;
sys/arch/hppa/gsc/harmony.c
894
c->c_segsz = (caddr_t)end - (caddr_t)start;
sys/arch/hppa/gsc/harmony.c
895
c->c_cnt = 0;
sys/arch/hppa/gsc/harmony.c
896
c->c_lastaddr = d->d_map->dm_segs[0].ds_addr;
sys/arch/hppa/gsc/harmony.c
900
togo = c->c_segsz - c->c_cnt;
sys/arch/hppa/gsc/harmony.c
903
c->c_cnt = togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
905
nextaddr = c->c_lastaddr;
sys/arch/hppa/gsc/harmony.c
906
if (togo > c->c_blksz)
sys/arch/hppa/gsc/harmony.c
907
togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
908
c->c_cnt += togo;
sys/arch/hppa/gsc/harmony.c
913
c->c_blksz, BUS_DMASYNC_PREWRITE);
sys/arch/hppa/gsc/harmony.c
917
c->c_theaddr = nextaddr;
sys/arch/hppa/gsc/harmony.c
919
c->c_lastaddr = nextaddr + togo;
sys/arch/hppa/gsc/harmony.c
930
struct harmony_channel *c = &sc->sc_capture;
sys/arch/hppa/gsc/harmony.c
941
d = c->c_current;
sys/arch/hppa/gsc/harmony.c
942
togo = c->c_segsz - c->c_cnt;
sys/arch/hppa/gsc/harmony.c
945
c->c_cnt = togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
947
nextaddr = c->c_lastaddr;
sys/arch/hppa/gsc/harmony.c
948
if (togo > c->c_blksz)
sys/arch/hppa/gsc/harmony.c
949
togo = c->c_blksz;
sys/arch/hppa/gsc/harmony.c
950
c->c_cnt += togo;
sys/arch/hppa/gsc/harmony.c
955
c->c_blksz, BUS_DMASYNC_PREWRITE);
sys/arch/hppa/gsc/harmony.c
959
c->c_lastaddr = nextaddr + togo;
sys/arch/hppa/gsc/harmony.c
970
struct harmony_channel *c = &sc->sc_capture;
sys/arch/hppa/gsc/harmony.c
981
c->c_intr = intr;
sys/arch/hppa/gsc/harmony.c
982
c->c_intrarg = intrarg;
sys/arch/hppa/gsc/harmony.c
983
c->c_blksz = blksize;
sys/arch/hppa/gsc/harmony.c
984
c->c_current = d;
sys/arch/hppa/gsc/harmony.c
985
c->c_segsz = (caddr_t)end - (caddr_t)start;
sys/arch/hppa/gsc/harmony.c
986
c->c_cnt = 0;
sys/arch/hppa/gsc/harmony.c
987
c->c_lastaddr = d->d_map->dm_segs[0].ds_addr;
sys/arch/hppa/hppa/mainbus.c
105
u_int8_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
107
u_int16_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
109
u_int32_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
111
u_int64_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
113
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
115
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
117
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
119
const u_int64_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
121
u_int8_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
123
u_int16_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
125
u_int32_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
127
u_int64_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
130
u_int8_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
132
u_int16_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
134
u_int32_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
136
u_int64_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
138
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
140
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
142
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
144
const u_int64_t *a, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
146
u_int8_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
148
u_int16_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
150
u_int32_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
152
u_int64_t vv, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
154
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
156
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
158
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
160
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/hppa/mainbus.c
420
mbus_rm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
423
while (c--)
sys/arch/hppa/hppa/mainbus.c
428
mbus_rm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
431
while (c--)
sys/arch/hppa/hppa/mainbus.c
436
mbus_rm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
439
while (c--)
sys/arch/hppa/hppa/mainbus.c
444
mbus_rm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
447
while (c--)
sys/arch/hppa/hppa/mainbus.c
452
mbus_wm_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
455
while (c--)
sys/arch/hppa/hppa/mainbus.c
460
mbus_wm_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
463
while (c--)
sys/arch/hppa/hppa/mainbus.c
468
mbus_wm_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
471
while (c--)
sys/arch/hppa/hppa/mainbus.c
476
mbus_wm_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
479
while (c--)
sys/arch/hppa/hppa/mainbus.c
484
mbus_sm_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
487
while (c--)
sys/arch/hppa/hppa/mainbus.c
492
mbus_sm_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
495
while (c--)
sys/arch/hppa/hppa/mainbus.c
500
mbus_sm_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
503
while (c--)
sys/arch/hppa/hppa/mainbus.c
508
mbus_sm_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
511
while (c--)
sys/arch/hppa/hppa/mainbus.c
516
mbus_rr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
520
while (c--)
sys/arch/hppa/hppa/mainbus.c
525
mbus_rr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
529
while (c--)
sys/arch/hppa/hppa/mainbus.c
534
mbus_rr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
538
while (c--)
sys/arch/hppa/hppa/mainbus.c
543
mbus_rr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
547
while (c--)
sys/arch/hppa/hppa/mainbus.c
552
mbus_wr_1(void *v, bus_space_handle_t h, bus_size_t o, const u_int8_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
556
while (c--)
sys/arch/hppa/hppa/mainbus.c
561
mbus_wr_2(void *v, bus_space_handle_t h, bus_size_t o, const u_int16_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
565
while (c--)
sys/arch/hppa/hppa/mainbus.c
570
mbus_wr_4(void *v, bus_space_handle_t h, bus_size_t o, const u_int32_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
574
while (c--)
sys/arch/hppa/hppa/mainbus.c
579
mbus_wr_8(void *v, bus_space_handle_t h, bus_size_t o, const u_int64_t *a, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
583
while (c--)
sys/arch/hppa/hppa/mainbus.c
588
mbus_sr_1(void *v, bus_space_handle_t h, bus_size_t o, u_int8_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
592
while (c--)
sys/arch/hppa/hppa/mainbus.c
597
mbus_sr_2(void *v, bus_space_handle_t h, bus_size_t o, u_int16_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
601
while (c--)
sys/arch/hppa/hppa/mainbus.c
606
mbus_sr_4(void *v, bus_space_handle_t h, bus_size_t o, u_int32_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
610
while (c--)
sys/arch/hppa/hppa/mainbus.c
615
mbus_sr_8(void *v, bus_space_handle_t h, bus_size_t o, u_int64_t vv, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
619
while (c--)
sys/arch/hppa/hppa/mainbus.c
625
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
630
while (c--)
sys/arch/hppa/hppa/mainbus.c
636
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
641
while (c--)
sys/arch/hppa/hppa/mainbus.c
647
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
652
while (c--)
sys/arch/hppa/hppa/mainbus.c
658
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/hppa/hppa/mainbus.c
663
while (c--)
sys/arch/hppa/hppa/mem.c
335
size_t c;
sys/arch/hppa/hppa/mem.c
357
c = ptoa(physmem) - v;
sys/arch/hppa/hppa/mem.c
358
c = ulmin(c, uio->uio_resid);
sys/arch/hppa/hppa/mem.c
359
error = uiomove((caddr_t)v, c, uio);
sys/arch/hppa/hppa/mem.c
365
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/hppa/hppa/mem.c
367
c, (uio->uio_rw == UIO_READ) ? B_READ : B_WRITE)) {
sys/arch/hppa/hppa/mem.c
372
error = uiomove((caddr_t)v, c, uio);
sys/arch/hppa/hppa/mem.c
393
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/hppa/hppa/mem.c
394
error = uiomove(zeropage, c, uio);
sys/arch/hppa/include/bus.h
100
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
103
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
105
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
107
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
110
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
112
bus_size_t o, u_int16_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
114
bus_size_t o, u_int32_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
116
bus_size_t o, u_int64_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
119
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
121
bus_size_t o, const u_int16_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
123
bus_size_t o, const u_int32_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
125
bus_size_t o, const u_int64_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
128
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
130
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
132
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
135
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
137
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
139
bus_size_t o, const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
142
bus_size_t o, u_int8_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
144
bus_size_t o, u_int16_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
146
bus_size_t o, u_int32_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
148
bus_size_t o, u_int64_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
151
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/include/bus.h
153
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/include/bus.h
155
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/include/bus.h
157
bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
sys/arch/hppa/include/bus.h
170
#define bus_space_map(t,a,c,ca,hp) \
sys/arch/hppa/include/bus.h
171
(((t)->hbt_map)((t)->hbt_cookie,(a),(c),(ca),(hp)))
sys/arch/hppa/include/bus.h
172
#define bus_space_unmap(t,h,c) \
sys/arch/hppa/include/bus.h
173
(((t)->hbt_unmap)((t)->hbt_cookie,(h),(c)))
sys/arch/hppa/include/bus.h
174
#define bus_space_subregion(t,h,o,c,hp) \
sys/arch/hppa/include/bus.h
175
(((t)->hbt_subregion)((t)->hbt_cookie,(h),(o),(c),(hp)))
sys/arch/hppa/include/bus.h
176
#define bus_space_alloc(t,b,e,c,al,bn,ca,ap,hp) \
sys/arch/hppa/include/bus.h
177
(((t)->hbt_alloc)((t)->hbt_cookie,(b),(e),(c),(al),(bn),(ca),(ap),(hp)))
sys/arch/hppa/include/bus.h
178
#define bus_space_free(t,h,c) \
sys/arch/hppa/include/bus.h
179
(((t)->hbt_free)((t)->hbt_cookie,(h),(c)))
sys/arch/hppa/include/bus.h
191
#define bus_space_read_multi_1(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
192
(((t)->hbt_rm_1)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
193
#define bus_space_read_multi_2(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
194
(((t)->hbt_rm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
195
#define bus_space_read_multi_4(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
196
(((t)->hbt_rm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
197
#define bus_space_read_multi_8(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
198
(((t)->hbt_rm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
200
#define bus_space_write_multi_1(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
201
(((t)->hbt_wm_1)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
202
#define bus_space_write_multi_2(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
203
(((t)->hbt_wm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
204
#define bus_space_write_multi_4(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
205
(((t)->hbt_wm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
206
#define bus_space_write_multi_8(t,h,o,a,c) \
sys/arch/hppa/include/bus.h
207
(((t)->hbt_wm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
209
#define bus_space_set_multi_1(t,h,o,v,c) \
sys/arch/hppa/include/bus.h
210
(((t)->hbt_sm_1)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
211
#define bus_space_set_multi_2(t,h,o,v,c) \
sys/arch/hppa/include/bus.h
212
(((t)->hbt_sm_2)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
213
#define bus_space_set_multi_4(t,h,o,v,c) \
sys/arch/hppa/include/bus.h
214
(((t)->hbt_sm_4)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
215
#define bus_space_set_multi_8(t,h,o,v,c) \
sys/arch/hppa/include/bus.h
216
(((t)->hbt_sm_8)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
218
#define bus_space_read_raw_multi_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
219
(((t)->hbt_rrm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
220
#define bus_space_read_raw_multi_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
221
(((t)->hbt_rrm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
222
#define bus_space_read_raw_multi_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
223
(((t)->hbt_rrm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
225
#define bus_space_write_raw_multi_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
226
(((t)->hbt_wrm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
227
#define bus_space_write_raw_multi_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
228
(((t)->hbt_wrm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
229
#define bus_space_write_raw_multi_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
230
(((t)->hbt_wrm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
232
#define bus_space_read_region_1(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
233
(((t)->hbt_rr_1)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
234
#define bus_space_read_region_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
235
(((t)->hbt_rr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
236
#define bus_space_read_region_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
237
(((t)->hbt_rr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
238
#define bus_space_read_region_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
239
(((t)->hbt_rr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
241
#define bus_space_write_region_1(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
242
(((t)->hbt_wr_1)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
243
#define bus_space_write_region_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
244
(((t)->hbt_wr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
245
#define bus_space_write_region_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
246
(((t)->hbt_wr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
247
#define bus_space_write_region_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
248
(((t)->hbt_wr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
250
#define bus_space_read_raw_region_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
251
(((t)->hbt_rrr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
252
#define bus_space_read_raw_region_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
253
(((t)->hbt_rrr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
254
#define bus_space_read_raw_region_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
255
(((t)->hbt_rrr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
257
#define bus_space_write_raw_region_2(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
258
(((t)->hbt_wrr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
259
#define bus_space_write_raw_region_4(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
260
(((t)->hbt_wrr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
261
#define bus_space_write_raw_region_8(t, h, o, a, c) \
sys/arch/hppa/include/bus.h
262
(((t)->hbt_wrr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
sys/arch/hppa/include/bus.h
264
#define bus_space_set_region_1(t, h, o, v, c) \
sys/arch/hppa/include/bus.h
265
(((t)->hbt_sr_1)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
266
#define bus_space_set_region_2(t, h, o, v, c) \
sys/arch/hppa/include/bus.h
267
(((t)->hbt_sr_2)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
268
#define bus_space_set_region_4(t, h, o, v, c) \
sys/arch/hppa/include/bus.h
269
(((t)->hbt_sr_4)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
270
#define bus_space_set_region_8(t, h, o, v, c) \
sys/arch/hppa/include/bus.h
271
(((t)->hbt_sr_8)((t)->hbt_cookie, (h), (o), (v), (c)))
sys/arch/hppa/include/bus.h
273
#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
sys/arch/hppa/include/bus.h
274
(((t)->hbt_cp_1)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
sys/arch/hppa/include/bus.h
275
#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
sys/arch/hppa/include/bus.h
276
(((t)->hbt_cp_2)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
sys/arch/hppa/include/bus.h
277
#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
sys/arch/hppa/include/bus.h
278
(((t)->hbt_cp_4)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
sys/arch/hppa/include/bus.h
279
#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
sys/arch/hppa/include/bus.h
280
(((t)->hbt_cp_8)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
sys/arch/hppa/include/bus.h
69
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
71
bus_size_t o, u_int16_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
73
bus_size_t o, u_int32_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
75
bus_size_t o, u_int64_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
78
const u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
80
const u_int16_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
82
const u_int32_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
84
const u_int64_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
87
u_int8_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
89
u_int16_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
91
u_int32_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
93
u_int64_t vv, bus_size_t c);
sys/arch/hppa/include/bus.h
96
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/bus.h
98
bus_size_t o, u_int8_t *a, bus_size_t c);
sys/arch/hppa/include/eisa_machdep.h
61
#define eisa_maxslots(c) 8
sys/arch/hppa/include/eisa_machdep.h
62
#define eisa_intr_map(c, i, hp) \
sys/arch/hppa/include/eisa_machdep.h
63
(*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
sys/arch/hppa/include/eisa_machdep.h
64
#define eisa_intr_string(c, h) \
sys/arch/hppa/include/eisa_machdep.h
65
(*(c)->ec_intr_string)((c)->ec_v, (h))
sys/arch/hppa/include/eisa_machdep.h
66
#define eisa_intr_establish(c, h, t, l, f, a, nm) \
sys/arch/hppa/include/eisa_machdep.h
67
(*(c)->ec_intr_establish)((c)->ec_v, (h), (t), (l), (f), (a), (nm))
sys/arch/hppa/include/eisa_machdep.h
68
#define eisa_intr_disestablish(c, h) \
sys/arch/hppa/include/eisa_machdep.h
69
(*(c)->ec_intr_disestablish)((c)->ec_v, (h))
sys/arch/hppa/include/isa_machdep.h
52
#define isa_intr_establish(c, i, t, l, f, a, nm) \
sys/arch/hppa/include/isa_machdep.h
53
(*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a), (nm))
sys/arch/hppa/include/isa_machdep.h
54
#define isa_intr_disestablish(c, h) \
sys/arch/hppa/include/isa_machdep.h
55
(*(c)->ic_intr_disestablish)((c)->ic_v, (h))
sys/arch/hppa/include/isa_machdep.h
56
#define isa_intr_check(c, i, t) \
sys/arch/hppa/include/isa_machdep.h
57
(*(c)->ic_intr_check)((c)->ic_v, (i), (t))
sys/arch/hppa/include/loadfile_machdep.h
49
#define READ(f, b, c) pread((f), (void *)LOADADDR(b), (c))
sys/arch/hppa/include/loadfile_machdep.h
50
#define BCOPY(s, d, c) vpbcopy((s), (void *)LOADADDR(d), (c))
sys/arch/hppa/include/loadfile_machdep.h
51
#define BZERO(d, c) pbzero((void *)LOADADDR(d), (c))
sys/arch/hppa/include/loadfile_machdep.h
67
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/hppa/include/loadfile_machdep.h
68
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/hppa/include/loadfile_machdep.h
69
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/hppa/include/pci_machdep.h
69
#define pci_bus_maxdevs(c, b) \
sys/arch/hppa/include/pci_machdep.h
70
(*(c)->pc_bus_maxdevs)((c)->_cookie, (b))
sys/arch/hppa/include/pci_machdep.h
71
#define pci_make_tag(c, b, d, f) \
sys/arch/hppa/include/pci_machdep.h
72
(*(c)->pc_make_tag)((c)->_cookie, (b), (d), (f))
sys/arch/hppa/include/pci_machdep.h
73
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/hppa/include/pci_machdep.h
74
(*(c)->pc_decompose_tag)((c)->_cookie, (t), (bp), (dp), (fp))
sys/arch/hppa/include/pci_machdep.h
75
#define pci_conf_size(c, t) \
sys/arch/hppa/include/pci_machdep.h
76
(*(c)->pc_conf_size)((c)->_cookie, (t))
sys/arch/hppa/include/pci_machdep.h
77
#define pci_conf_read(c, t, r) \
sys/arch/hppa/include/pci_machdep.h
78
(*(c)->pc_conf_read)((c)->_cookie, (t), (r))
sys/arch/hppa/include/pci_machdep.h
79
#define pci_conf_write(c, t, r, v) \
sys/arch/hppa/include/pci_machdep.h
80
(*(c)->pc_conf_write)((c)->_cookie, (t), (r), (v))
sys/arch/hppa/include/pci_machdep.h
85
#define pci_intr_line(c, ih) (ih)
sys/arch/hppa/include/pci_machdep.h
86
#define pci_intr_string(c, ih) \
sys/arch/hppa/include/pci_machdep.h
87
(*(c)->pc_intr_string)((c)->_cookie, (ih))
sys/arch/hppa/include/pci_machdep.h
88
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/hppa/include/pci_machdep.h
89
(*(c)->pc_intr_establish)((c)->_cookie, (ih), (l), (h), (a), (nm))
sys/arch/hppa/include/pci_machdep.h
90
#define pci_intr_disestablish(c, iv) \
sys/arch/hppa/include/pci_machdep.h
91
(*(c)->pc_intr_disestablish)((c)->_cookie, (iv))
sys/arch/hppa/include/pci_machdep.h
92
#define pci_probe_device_hook(c, a) (0)
sys/arch/hppa/include/pci_machdep.h
94
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/hppa/include/pci_machdep.h
95
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/hppa/include/pci_machdep.h
97
#define pciide_machdep_compat_intr_establish(a, b, c, d, e) (NULL)
sys/arch/hppa/stand/libsa/itecons.c
143
ite_putc(dev, c)
sys/arch/hppa/stand/libsa/itecons.c
145
int c;
sys/arch/hppa/stand/libsa/itecons.c
150
*cnbuf = c;
sys/arch/hppa/stand/libsa/itecons.c
165
int err, c, l, i;
sys/arch/hppa/stand/libsa/itecons.c
171
c = stash;
sys/arch/hppa/stand/libsa/itecons.c
174
return c;
sys/arch/hppa/stand/libsa/itecons.c
183
c = cnbuf[0];
sys/arch/hppa/stand/libsa/itecons.c
194
dev, l, c);
sys/arch/hppa/stand/libsa/itecons.c
205
printf("kbd: \'%c\' (0x%x)\n", c, c);
sys/arch/hppa/stand/libsa/itecons.c
208
stash = c;
sys/arch/hppa/stand/libsa/itecons.c
210
return (c);
sys/arch/hppa/stand/mkboot/mkboot.c
85
register int n, pos, c;
sys/arch/hppa/stand/mkboot/mkboot.c
90
while ((c = getopt(argc, argv, "vl:")) != -1) {
sys/arch/hppa/stand/mkboot/mkboot.c
91
switch (c) {
sys/arch/i386/i386/conf.c
79
#define cdev_joy_init(c,n) { \
sys/arch/i386/i386/conf.c
80
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/arch/i386/i386/conf.c
81
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/i386/i386/conf.c
86
#define cdev_ocis_init(c,n) { \
sys/arch/i386/i386/conf.c
87
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/i386/i386/conf.c
88
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/i386/i386/conf.c
93
#define cdev_nvram_init(c,n) { \
sys/arch/i386/i386/conf.c
94
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/arch/i386/i386/db_trace.c
113
char c;
sys/arch/i386/i386/db_trace.c
115
while ((c = *cp++) != 0) {
sys/arch/i386/i386/db_trace.c
116
if (c == 't')
sys/arch/i386/i386/db_trace.c
118
if (c == 'u')
sys/arch/i386/i386/mem.c
122
size_t c;
sys/arch/i386/i386/mem.c
151
c = ulmin(uio->uio_resid, NBPG - o);
sys/arch/i386/i386/mem.c
152
error = uiomove((caddr_t)vmmap + o, c, uio);
sys/arch/i386/i386/mem.c
161
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/i386/i386/mem.c
162
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/i386/i386/mem.c
165
error = uiomove((caddr_t)v, c, uio);
sys/arch/i386/i386/mem.c
177
c = iov->iov_len;
sys/arch/i386/i386/mem.c
184
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/i386/i386/mem.c
185
error = uiomove(zeropage, c, uio);
sys/arch/i386/i386/mem.c
191
iov->iov_base = (char *)iov->iov_base + c;
sys/arch/i386/i386/mem.c
192
iov->iov_len -= c;
sys/arch/i386/i386/mem.c
193
uio->uio_offset += c;
sys/arch/i386/i386/mem.c
194
uio->uio_resid -= c;
sys/arch/i386/i386/ucode.c
149
uint16_t c;
sys/arch/i386/i386/ucode.c
157
uint8_t c[16];
sys/arch/i386/i386/via.c
115
struct cryptoini *c;
sys/arch/i386/i386/via.c
158
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/i386/i386/via.c
159
switch (c->cri_alg) {
sys/arch/i386/i386/via.c
161
switch (c->cri_klen) {
sys/arch/i386/i386/via.c
178
ses->ses_klen = c->cri_klen;
sys/arch/i386/i386/via.c
182
AES_KeySetup_Encrypt(ses->ses_ekey, c->cri_key,
sys/arch/i386/i386/via.c
183
c->cri_klen / 8);
sys/arch/i386/i386/via.c
184
AES_KeySetup_Decrypt(ses->ses_dkey, c->cri_key,
sys/arch/i386/i386/via.c
185
c->cri_klen / 8);
sys/arch/i386/i386/via.c
233
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/i386/via.c
234
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/i386/i386/via.c
237
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/i386/i386/via.c
239
axf->blocksize - (c->cri_klen / 8));
sys/arch/i386/i386/via.c
241
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/i386/via.c
242
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/i386/i386/via.c
246
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/i386/i386/via.c
248
axf->blocksize - (c->cri_klen / 8));
sys/arch/i386/i386/via.c
250
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/i386/via.c
251
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/i386/i386/via.c
254
swd->sw_alg = c->cri_alg;
sys/arch/i386/include/biosvar.h
107
#define BIOS32_MAKESIG(a, b, c, d) \
sys/arch/i386/include/biosvar.h
108
((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
sys/arch/i386/include/bus.h
174
#define bus_space_read_raw_multi_2(t, h, o, a, c) \
sys/arch/i386/include/bus.h
175
bus_space_read_multi_2((t), (h), (o), (u_int16_t *)(a), (c) >> 1)
sys/arch/i386/include/bus.h
176
#define bus_space_read_raw_multi_4(t, h, o, a, c) \
sys/arch/i386/include/bus.h
177
bus_space_read_multi_4((t), (h), (o), (u_int32_t *)(a), (c) >> 2)
sys/arch/i386/include/bus.h
289
#define bus_space_write_multi_8(t, h, o, a, c) \
sys/arch/i386/include/conf.h
42
#define cdev_acpiapm_init(c,n) {\
sys/arch/i386/include/conf.h
43
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/i386/include/conf.h
44
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/i386/include/conf.h
46
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/i386/include/loadfile_machdep.h
45
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (size_t)(c))
sys/arch/i386/include/loadfile_machdep.h
46
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/i386/include/loadfile_machdep.h
47
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/i386/include/segments.h
62
#define USERMODE(c, f) (ISPL(c) == SEL_UPL)
sys/arch/i386/include/segments.h
63
#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL)
sys/arch/i386/isa/clock.c
261
int c = a; \
sys/arch/i386/isa/clock.c
263
b = c; \
sys/arch/i386/isa/joy.c
120
c.x = x ? sc->x_off[JOYPART(dev)] + TICKS2USEC(t0 - x) : 0x80000000;
sys/arch/i386/isa/joy.c
121
c.y = y ? sc->y_off[JOYPART(dev)] + TICKS2USEC(t0 - y) : 0x80000000;
sys/arch/i386/isa/joy.c
123
c.b1 = ~state & 1;
sys/arch/i386/isa/joy.c
124
c.b2 = ~(state >> 1) & 1;
sys/arch/i386/isa/joy.c
125
return uiomove((caddr_t) & c, sizeof(struct joystick), uio);
sys/arch/i386/isa/joy.c
94
struct joystick c;
sys/arch/i386/pci/glxsb.c
361
struct cryptoini *c;
sys/arch/i386/pci/glxsb.c
394
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/i386/pci/glxsb.c
395
switch (c->cri_alg) {
sys/arch/i386/pci/glxsb.c
398
if (c->cri_klen != 128) {
sys/arch/i386/pci/glxsb.c
417
if (txf->setkey(swd->sw_kschedule, c->cri_key,
sys/arch/i386/pci/glxsb.c
418
c->cri_klen / 8) < 0) {
sys/arch/i386/pci/glxsb.c
426
ses->ses_klen = c->cri_klen;
sys/arch/i386/pci/glxsb.c
429
bcopy(c->cri_key, ses->ses_key, sizeof(ses->ses_key));
sys/arch/i386/pci/glxsb.c
472
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/pci/glxsb.c
473
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/i386/pci/glxsb.c
476
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/i386/pci/glxsb.c
478
axf->blocksize - (c->cri_klen / 8));
sys/arch/i386/pci/glxsb.c
480
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/pci/glxsb.c
481
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/i386/pci/glxsb.c
485
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/i386/pci/glxsb.c
487
axf->blocksize - (c->cri_klen / 8));
sys/arch/i386/pci/glxsb.c
489
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/i386/pci/glxsb.c
490
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/i386/pci/glxsb.c
493
swd->sw_alg = c->cri_alg;
sys/arch/i386/pci/pci_machdep.h
109
#define pci_probe_device_hook(c, a) (0)
sys/arch/i386/pci/pci_machdep.h
99
#define pci_intr_line(c, ih) ((ih).line)
sys/arch/i386/stand/libsa/bioscons.c
110
pc_putc(dev_t dev, int c)
sys/arch/i386/stand/libsa/bioscons.c
112
__asm volatile(DOINT(0x10) : : "a" (c | 0xe00), "b" (1) :
sys/arch/i386/stand/libsa/bioscons.c
232
com_putc(dev_t dev, int c)
sys/arch/i386/stand/libsa/bioscons.c
239
outb(port + com_data, c);
sys/arch/i386/stand/libsa/debug.c
104
d_putc(dev_t d, int c)
sys/arch/i386/stand/libsa/debug.c
106
switch (c) {
sys/arch/i386/stand/libsa/debug.c
113
((u_int16_t volatile *)VBASE)[d_pos++] = 0x0700 | (u_char)c;
sys/arch/i386/stand/libsa/debug.c
46
#define CKPT(c) (*(u_short volatile *)(VBASE+160) = (0x1700 | (c)))
sys/arch/i386/stand/libsa/debug.c
48
#define CKPT(c) /* c */
sys/arch/i386/stand/libsa/diskprobe.c
388
char c;
sys/arch/i386/stand/libsa/diskprobe.c
391
c = 'c';
sys/arch/i386/stand/libsa/diskprobe.c
394
c = (d & 0x80) ? 'h' : 'f';
sys/arch/i386/stand/libsa/diskprobe.c
398
c, u, d,
sys/arch/i386/stand/libsa/machdep.c
45
#define CKPT(c) (*(u_int16_t*)0xb8148 = 0x4700 + (c))
sys/arch/i386/stand/libsa/machdep.c
47
#define CKPT(c) /* c */
sys/arch/i386/stand/libsa/time.c
43
bcdtoint(u_int8_t c)
sys/arch/i386/stand/libsa/time.c
45
return ((c & 0xf0) / 8) * 5 + (c & 0x0f);
sys/arch/landisk/include/bus.h
232
#define __bs_nonsingle(type, sz, tn, t, h, o, a, c) \
sys/arch/landisk/include/bus.h
233
(*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c)
sys/arch/landisk/include/bus.h
235
#define __bs_set(type, sz, tn, t, h, o, v, c) \
sys/arch/landisk/include/bus.h
236
(*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, v, c)
sys/arch/landisk/include/bus.h
239
(*(t)->__bs_opname(c,sz))((t)->bs_cookie, h1, o1, h2, o2, cnt)
sys/arch/landisk/include/bus.h
297
#define bus_space_read_multi_1(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
298
__bs_nonsingle(rm,1,uint8_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
299
#define bus_space_read_multi_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
300
__bs_nonsingle(rm,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
301
#define bus_space_read_multi_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
302
__bs_nonsingle(rm,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
303
#define bus_space_read_multi_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
304
__bs_nonsingle(rm,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
306
#define bus_space_read_raw_multi_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
307
__bs_nonsingle(rrm,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
308
#define bus_space_read_raw_multi_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
309
__bs_nonsingle(rrm,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
310
#define bus_space_read_raw_multi_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
311
__bs_nonsingle(rrm,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
317
#define bus_space_read_region_1(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
318
__bs_nonsingle(rr,1,uint8_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
319
#define bus_space_read_region_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
320
__bs_nonsingle(rr,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
321
#define bus_space_read_region_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
322
__bs_nonsingle(rr,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
323
#define bus_space_read_region_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
324
__bs_nonsingle(rr,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
326
#define bus_space_read_raw_region_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
327
__bs_nonsingle(rrr,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
328
#define bus_space_read_raw_region_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
329
__bs_nonsingle(rrr,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
330
#define bus_space_read_raw_region_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
331
__bs_nonsingle(rrr,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
346
#define bus_space_write_multi_1(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
347
__bs_nonsingle(wm,1,uint8_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
348
#define bus_space_write_multi_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
349
__bs_nonsingle(wm,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
350
#define bus_space_write_multi_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
351
__bs_nonsingle(wm,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
352
#define bus_space_write_multi_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
353
__bs_nonsingle(wm,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
355
#define bus_space_write_raw_multi_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
356
__bs_nonsingle(wrm,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
357
#define bus_space_write_raw_multi_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
358
__bs_nonsingle(wrm,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
359
#define bus_space_write_raw_multi_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
360
__bs_nonsingle(wrm,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
366
#define bus_space_write_region_1(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
367
__bs_nonsingle(wr,1,uint8_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
368
#define bus_space_write_region_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
369
__bs_nonsingle(wr,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
370
#define bus_space_write_region_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
371
__bs_nonsingle(wr,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
372
#define bus_space_write_region_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
373
__bs_nonsingle(wr,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
375
#define bus_space_write_raw_region_2(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
376
__bs_nonsingle(wrr,2,uint16_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
377
#define bus_space_write_raw_region_4(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
378
__bs_nonsingle(wrr,4,uint32_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
379
#define bus_space_write_raw_region_8(t, h, o, a, c) \
sys/arch/landisk/include/bus.h
380
__bs_nonsingle(wrr,8,uint64_t,(t),(h),(o),(a),(c))
sys/arch/landisk/include/bus.h
386
#define bus_space_set_multi_1(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
387
__bs_set(sm,1,uint8_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
388
#define bus_space_set_multi_2(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
389
__bs_set(sm,2,uint16_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
390
#define bus_space_set_multi_4(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
391
__bs_set(sm,4,uint32_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
392
#define bus_space_set_multi_8(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
393
__bs_set(sm,8,uint64_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
399
#define bus_space_set_region_1(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
400
__bs_set(sr,1,uint8_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
401
#define bus_space_set_region_2(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
402
__bs_set(sr,2,uint16_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
403
#define bus_space_set_region_4(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
404
__bs_set(sr,4,uint32_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
405
#define bus_space_set_region_8(t, h, o, v, c) \
sys/arch/landisk/include/bus.h
406
__bs_set(sr,8,uint64_t,(t),(h),(o),(v),(c))
sys/arch/landisk/include/bus.h
412
#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
sys/arch/landisk/include/bus.h
413
__bs_copy(1, uint8_t, (t), (h1), (o1), (h2), (o2), (c))
sys/arch/landisk/include/bus.h
414
#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
sys/arch/landisk/include/bus.h
415
__bs_copy(2, uint16_t, (t), (h1), (o1), (h2), (o2), (c))
sys/arch/landisk/include/bus.h
416
#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
sys/arch/landisk/include/bus.h
417
__bs_copy(4, uint32_t, (t), (h1), (o1), (h2), (o2), (c))
sys/arch/landisk/include/bus.h
418
#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
sys/arch/landisk/include/bus.h
419
__bs_copy(8, uint64_t, (t), (h1), (o1), (h2), (o2), (c))
sys/arch/landisk/include/loadfile_machdep.h
41
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/landisk/include/loadfile_machdep.h
42
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/landisk/include/loadfile_machdep.h
43
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/landisk/include/pci_machdep.h
86
#define pci_probe_device_hook(c, a) (0)
sys/arch/landisk/include/pci_machdep.h
88
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/landisk/include/pci_machdep.h
89
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/landisk/stand/boot/scifcons.c
180
unsigned char c, err_c;
sys/arch/landisk/stand/boot/scifcons.c
186
c = serbuf[serbuf_read];
sys/arch/landisk/stand/boot/scifcons.c
188
return (c);
sys/arch/landisk/stand/boot/scifcons.c
194
c = scif_frdr_read();
sys/arch/landisk/stand/boot/scifcons.c
206
return (c);
sys/arch/landisk/stand/boot/scifcons.c
208
serbuf[serbuf_write] = (u_char)c;
sys/arch/landisk/stand/boot/scifcons.c
221
scif_cnputc(dev_t dev, int c)
sys/arch/landisk/stand/boot/scifcons.c
229
scif_ftdr_write(c);
sys/arch/landisk/stand/xxboot/ufs12.c
445
int rc, c, nlinks = 0;
sys/arch/landisk/stand/xxboot/ufs12.c
535
while ((c = *cp) != '\0' && c != '/') {
sys/arch/landisk/stand/xxboot/ufs12.c
552
*cp = c;
sys/arch/loongson/include/bus.h
113
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
sys/arch/loongson/include/bus.h
248
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/loongson/include/bus.h
253
while (c--)
sys/arch/loongson/include/bus.h
260
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/loongson/include/bus.h
265
while (c--)
sys/arch/loongson/include/bus.h
271
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/loongson/include/bus.h
276
while (c--)
sys/arch/loongson/include/bus.h
282
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/loongson/include/bus.h
287
while (c--)
sys/arch/loongson/include/bus.h
32
#define CAT3(a,b,c) a##b##c
sys/arch/loongson/include/bus.h
35
#define CAT3(a,b,c) a/**/b/**/c
sys/arch/loongson/include/conf.h
36
#define cdev_apm_init(c,n) { \
sys/arch/loongson/include/conf.h
37
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/loongson/include/conf.h
38
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/loongson/include/conf.h
40
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/loongson/include/isa_machdep.h
41
#define isa_intr_establish(c, i, t, l, f, a, n) \
sys/arch/loongson/include/isa_machdep.h
42
(*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a), (n))
sys/arch/loongson/include/isa_machdep.h
43
#define isa_intr_disestablish(c, h) \
sys/arch/loongson/include/isa_machdep.h
44
(*(c)->ic_intr_disestablish)((c)->ic_v, (h))
sys/arch/loongson/include/loadfile_machdep.h
41
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/loongson/include/loadfile_machdep.h
42
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/loongson/include/loadfile_machdep.h
43
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/loongson/include/pci_machdep.h
64
#define pci_bus_maxdevs(c, b) \
sys/arch/loongson/include/pci_machdep.h
65
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/loongson/include/pci_machdep.h
66
#define pci_make_tag(c, b, d, f) \
sys/arch/loongson/include/pci_machdep.h
67
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/loongson/include/pci_machdep.h
68
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/loongson/include/pci_machdep.h
69
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/loongson/include/pci_machdep.h
70
#define pci_conf_size(c, t) \
sys/arch/loongson/include/pci_machdep.h
71
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/loongson/include/pci_machdep.h
72
#define pci_conf_read(c, t, r) \
sys/arch/loongson/include/pci_machdep.h
73
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/loongson/include/pci_machdep.h
74
#define pci_conf_write(c, t, r, v) \
sys/arch/loongson/include/pci_machdep.h
75
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/loongson/include/pci_machdep.h
76
#define pci_intr_map(c, ihp) \
sys/arch/loongson/include/pci_machdep.h
77
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/loongson/include/pci_machdep.h
78
#define pci_intr_map_msi(c, ihp) (-1)
sys/arch/loongson/include/pci_machdep.h
79
#define pci_intr_map_msix(c, vec, ihp) (-1)
sys/arch/loongson/include/pci_machdep.h
80
#define pci_intr_string(c, ih) \
sys/arch/loongson/include/pci_machdep.h
81
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/loongson/include/pci_machdep.h
82
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/loongson/include/pci_machdep.h
83
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), (nm))
sys/arch/loongson/include/pci_machdep.h
84
#define pci_intr_disestablish(c, iv) \
sys/arch/loongson/include/pci_machdep.h
85
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/loongson/include/pci_machdep.h
86
#define pci_probe_device_hook(c, a) (0)
sys/arch/loongson/include/pci_machdep.h
88
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/loongson/include/pci_machdep.h
89
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/loongson/loongson/autoconf.c
101
return c - '0';
sys/arch/loongson/loongson/autoconf.c
96
parsehex(int c)
sys/arch/loongson/loongson/autoconf.c
98
if (c >= 'a')
sys/arch/loongson/loongson/autoconf.c
99
return c - 'a' + 10;
sys/arch/loongson/loongson/machdep.c
1144
int c;
sys/arch/loongson/loongson/machdep.c
1154
c = *s++;
sys/arch/loongson/loongson/machdep.c
1155
} while (c == ' ' || c == '\t');
sys/arch/loongson/loongson/machdep.c
1158
while (c == '-') {
sys/arch/loongson/loongson/machdep.c
1160
c = *s++;
sys/arch/loongson/loongson/machdep.c
1164
if (base == 0 && c == '0') {
sys/arch/loongson/loongson/machdep.c
1165
c = *s++;
sys/arch/loongson/loongson/machdep.c
1166
switch (c) {
sys/arch/loongson/loongson/machdep.c
1170
c = *s++;
sys/arch/loongson/loongson/machdep.c
1175
c = *s++;
sys/arch/loongson/loongson/machdep.c
1185
if (c >= '0' && c <= '9')
sys/arch/loongson/loongson/machdep.c
1186
d = c - '0';
sys/arch/loongson/loongson/machdep.c
1187
else if (c >= 'a' && c <= 'z')
sys/arch/loongson/loongson/machdep.c
1188
d = c - 'a' + 10;
sys/arch/loongson/loongson/machdep.c
1189
else if (c >= 'A' && c <= 'Z')
sys/arch/loongson/loongson/machdep.c
1190
d = c - 'A' + 10;
sys/arch/loongson/loongson/machdep.c
1197
c = *s++;
sys/arch/loongson/loongson/machdep.c
1221
int c;
sys/arch/loongson/loongson/machdep.c
1234
c = (int)*bufpos++;
sys/arch/loongson/loongson/machdep.c
1240
return c;
sys/arch/loongson/loongson/machdep.c
1244
pmoncnputc(dev_t dev, int c)
sys/arch/loongson/loongson/machdep.c
1246
if (c == '\n')
sys/arch/loongson/loongson/machdep.c
1249
pmon_printf("%c", c);
sys/arch/loongson/loongson/wscons_machdep.c
267
int c;
sys/arch/loongson/loongson/wscons_machdep.c
270
c = wskbd_cngetc(dev);
sys/arch/loongson/loongson/wscons_machdep.c
273
return c;
sys/arch/loongson/stand/boot/cons.c
54
int c;
sys/arch/loongson/stand/boot/cons.c
67
c = (int)*bufpos;
sys/arch/loongson/stand/boot/cons.c
76
return c;
sys/arch/loongson/stand/boot/cons.c
80
pmon_cnputc(dev_t dev, int c)
sys/arch/loongson/stand/boot/cons.c
82
if (c == '\n')
sys/arch/loongson/stand/boot/cons.c
85
pmon_printf("%c", c);
sys/arch/loongson/stand/boot/exec.c
36
char *c;
sys/arch/loongson/stand/boot/exec.c
53
c = kernelflags;
sys/arch/loongson/stand/boot/exec.c
54
*c++ = '-';
sys/arch/loongson/stand/boot/exec.c
56
*c++ = 'a';
sys/arch/loongson/stand/boot/exec.c
58
*c++ = 'c';
sys/arch/loongson/stand/boot/exec.c
60
*c++ = 'd';
sys/arch/loongson/stand/boot/exec.c
62
*c++ = 'g';
sys/arch/loongson/stand/boot/exec.c
64
*c++ = 's';
sys/arch/loongson/stand/boot/exec.c
65
*c = '\0';
sys/arch/luna88k/dev/lunaws.c
315
int c, j = 0;
sys/arch/luna88k/dev/lunaws.c
317
c = omkbd_raw[key];
sys/arch/luna88k/dev/lunaws.c
318
if (c != RAWKEY_Null) {
sys/arch/luna88k/dev/lunaws.c
320
if (c & 0x80)
sys/arch/luna88k/dev/lunaws.c
322
cbuf[j] = c & 0x7f;
sys/arch/luna88k/dev/siotty.c
189
u_int8_t c;
sys/arch/luna88k/dev/siotty.c
203
c = sio->sio_data;
sys/arch/luna88k/dev/siotty.c
204
put[0] = c;
sys/arch/luna88k/dev/siotty.c
679
int s, c;
sys/arch/luna88k/dev/siotty.c
685
c = sio->sio_data;
sys/arch/luna88k/dev/siotty.c
688
return c;
sys/arch/luna88k/dev/siotty.c
692
syscnputc(dev_t dev, int c)
sys/arch/luna88k/dev/siotty.c
702
sio->sio_data = c;
sys/arch/luna88k/dev/timekeeper.c
212
u_int8_t c; \
sys/arch/luna88k/dev/timekeeper.c
214
c = *chipdata; (data) = FROMBCD(c); \
sys/arch/luna88k/dev/timekeeper.c
232
u_int8_t c;
sys/arch/luna88k/dev/timekeeper.c
237
_DS_GET(DS_REGB, c);
sys/arch/luna88k/dev/timekeeper.c
238
c |= DS_REGB_24HR;
sys/arch/luna88k/dev/timekeeper.c
239
c &= ~DS_REGB_BINARY;
sys/arch/luna88k/dev/timekeeper.c
240
_DS_SET(DS_REGB, c);
sys/arch/luna88k/dev/timekeeper.c
280
u_int8_t c;
sys/arch/luna88k/dev/timekeeper.c
285
_DS_GET(DS_REGB, c);
sys/arch/luna88k/dev/timekeeper.c
286
c |= DS_REGB_SET;
sys/arch/luna88k/dev/timekeeper.c
287
_DS_SET(DS_REGB, c);
sys/arch/luna88k/dev/timekeeper.c
298
_DS_GET(DS_REGB, c);
sys/arch/luna88k/dev/timekeeper.c
299
c &= ~DS_REGB_SET;
sys/arch/luna88k/dev/timekeeper.c
300
_DS_SET(DS_REGB, c);
sys/arch/luna88k/include/bus.h
358
#define bus_space_write_multi_8(t, h, o, a, c) \
sys/arch/luna88k/include/bus.h
525
bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) \
sys/arch/luna88k/include/bus.h
531
for (o = 0; c != 0; c--, o += BYTES) \
sys/arch/luna88k/include/bus.h
536
for (o = (c - 1) * BYTES; c != 0; c--, o -= BYTES) \
sys/arch/luna88k/include/conf.h
52
#define cdev_lcd_init(c,n) { \
sys/arch/luna88k/include/conf.h
53
dev_init(c,n,open), dev_init(c,n,close), \
sys/arch/luna88k/include/conf.h
54
(dev_type_read((*))) enodev, dev_init(c,n,write), \
sys/arch/luna88k/include/conf.h
55
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/arch/luna88k/include/conf.h
59
#define cdev_pcex_init(c,n) { \
sys/arch/luna88k/include/conf.h
60
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/luna88k/include/conf.h
61
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/luna88k/include/conf.h
63
dev_init(c,n,mmap) }
sys/arch/luna88k/include/conf.h
66
#define cdev_xp_init(c,n) { \
sys/arch/luna88k/include/conf.h
67
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/luna88k/include/conf.h
68
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/luna88k/include/conf.h
70
dev_init(c,n,mmap) }
sys/arch/luna88k/include/loadfile_machdep.h
39
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/luna88k/include/loadfile_machdep.h
40
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/luna88k/include/loadfile_machdep.h
41
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/luna88k/luna88k/autoconf.c
117
char *value, c;
sys/arch/luna88k/luna88k/autoconf.c
161
c = value[0];
sys/arch/luna88k/luna88k/autoconf.c
165
c = value[1];
sys/arch/luna88k/luna88k/autoconf.c
167
c = -1;
sys/arch/luna88k/luna88k/autoconf.c
169
if ((c >= '0') && (c <= '6'))
sys/arch/luna88k/luna88k/autoconf.c
170
autoboot.targ = 6 - (c - '0');
sys/arch/luna88k/luna88k/romcons.c
78
int s, c;
sys/arch/luna88k/luna88k/romcons.c
82
c = ROMGETC();
sys/arch/luna88k/luna88k/romcons.c
84
} while (c == -1);
sys/arch/luna88k/luna88k/romcons.c
85
return c;
sys/arch/luna88k/luna88k/romcons.c
89
romcnputc(dev_t dev, int c)
sys/arch/luna88k/luna88k/romcons.c
94
ROMPUTC(c);
sys/arch/luna88k/stand/boot/bmc.c
119
int c, unit = 1, poll = (dev & 0x80) != 0;
sys/arch/luna88k/stand/boot/bmc.c
126
PEEK_RBUF(unit, c);
sys/arch/luna88k/stand/boot/bmc.c
127
return c;
sys/arch/luna88k/stand/boot/bmc.c
135
POP_RBUF(unit, c);
sys/arch/luna88k/stand/boot/bmc.c
136
return c;
sys/arch/luna88k/stand/boot/bmc.c
140
bmccnputc(dev_t dev, int c)
sys/arch/luna88k/stand/boot/bmc.c
142
bmdputc(c);
sys/arch/luna88k/stand/boot/bmd.c
170
bmd_escape(int c)
sys/arch/luna88k/stand/boot/bmd.c
174
switch (c) {
sys/arch/luna88k/stand/boot/bmd.c
189
bmd_escape_0(int c)
sys/arch/luna88k/stand/boot/bmd.c
194
switch (c) {
sys/arch/luna88k/stand/boot/bmd.c
239
bmd_escape_1(int c)
sys/arch/luna88k/stand/boot/bmd.c
246
switch (c) {
sys/arch/luna88k/stand/boot/bmd.c
270
*bp->bc_esc++ = c;
sys/arch/luna88k/stand/boot/bmd.c
349
bmdputc(int c)
sys/arch/luna88k/stand/boot/bmd.c
355
c &= 0x7F;
sys/arch/luna88k/stand/boot/bmd.c
362
*bp->bc_esc++ = c;
sys/arch/luna88k/stand/boot/bmd.c
363
(*bp->bc_escape)(c);
sys/arch/luna88k/stand/boot/bmd.c
367
if (isprint(c)) {
sys/arch/luna88k/stand/boot/bmd.c
369
bq->bl_col, bp->bc_row, c);
sys/arch/luna88k/stand/boot/bmd.c
385
switch (c) {
sys/arch/luna88k/stand/boot/bmd.c
441
return(c);
sys/arch/luna88k/stand/boot/bmd.c
466
bmd_draw_char(char *raddr, char *waddr, int col, int row, int c)
sys/arch/luna88k/stand/boot/bmd.c
472
fp = &bmdfont[c][0];
sys/arch/luna88k/stand/boot/bmd.c
97
#define isprint(c) ((c) >= 0x20 && (c) < 0x7f)
sys/arch/luna88k/stand/boot/getsecs.c
91
uint8_t c;
sys/arch/luna88k/stand/boot/getsecs.c
94
_DS_GET(DS_REGB, c);
sys/arch/luna88k/stand/boot/getsecs.c
95
c |= DS_REGB_24HR;
sys/arch/luna88k/stand/boot/getsecs.c
96
c &= ~DS_REGB_BINARY;
sys/arch/luna88k/stand/boot/getsecs.c
97
_DS_SET(DS_REGB, c);
sys/arch/luna88k/stand/boot/kbd.c
221
unsigned int c, updown = 0;
sys/arch/luna88k/stand/boot/kbd.c
228
c = kbd_keymap[code].km_type;
sys/arch/luna88k/stand/boot/kbd.c
230
if (c == KC_IGNORE)
sys/arch/luna88k/stand/boot/kbd.c
233
if ((c == KC_CODE) && updown)
sys/arch/luna88k/stand/boot/kbd.c
236
if (c == KC_SHIFT) {
sys/arch/luna88k/stand/boot/kbd.c
256
c = kbd_keymap[code].km_code[1];
sys/arch/luna88k/stand/boot/kbd.c
258
c = kbd_keymap[code].km_code[0];
sys/arch/luna88k/stand/boot/kbd.c
261
c |= 0x80;
sys/arch/luna88k/stand/boot/kbd.c
264
c &= 0x1F;
sys/arch/luna88k/stand/boot/kbd.c
266
return(c);
sys/arch/luna88k/stand/boot/rcvbuf.h
103
#define PEEK_RBUF(n, c) \
sys/arch/luna88k/stand/boot/rcvbuf.h
105
c= *(rcvbuf[n].rb_pop - 1); \
sys/arch/luna88k/stand/boot/rcvbuf.h
89
#define PUSH_RBUF(n, c) \
sys/arch/luna88k/stand/boot/rcvbuf.h
91
*(--rcvbuf[n].rb_push) = c ; \
sys/arch/luna88k/stand/boot/rcvbuf.h
96
#define POP_RBUF(n, c) \
sys/arch/luna88k/stand/boot/rcvbuf.h
98
c= *(--rcvbuf[n].rb_pop); \
sys/arch/luna88k/stand/boot/sio.c
107
int c = kbd_decode(sio_addr[unit]->sio_data);
sys/arch/luna88k/stand/boot/sio.c
109
if ((c & KC_TYPE) == KC_CODE)
sys/arch/luna88k/stand/boot/sio.c
110
PUSH_RBUF(unit, c);
sys/arch/luna88k/stand/boot/sio.c
156
int c, unit = dev & ~0x80, poll = (dev & 0x80) != 0;
sys/arch/luna88k/stand/boot/sio.c
163
PEEK_RBUF(unit, c);
sys/arch/luna88k/stand/boot/sio.c
164
return c;
sys/arch/luna88k/stand/boot/sio.c
173
POP_RBUF(unit, c);
sys/arch/luna88k/stand/boot/sio.c
174
return c;
sys/arch/luna88k/stand/boot/sio.c
178
siocnputc(dev_t dev, int c)
sys/arch/luna88k/stand/boot/sio.c
190
sio_addr[unit]->sio_data = (c & 0xFF);
sys/arch/m88k/m88k/db_disasm.c
623
char c = ' ';
sys/arch/m88k/m88k/db_disasm.c
629
c = 'u';
sys/arch/m88k/m88k/db_disasm.c
635
c = 'u';
sys/arch/m88k/m88k/db_disasm.c
659
rf != 0 ? xinstwidth[aryno] : instwidth[aryno], c);
sys/arch/m88k/m88k/db_disasm.c
679
char c = ' ';
sys/arch/m88k/m88k/db_disasm.c
687
c = 'u';
sys/arch/m88k/m88k/db_disasm.c
696
c = 'u';
sys/arch/m88k/m88k/db_disasm.c
728
opcode, rf != 0 ? xinstwidth[aryno] : instwidth[aryno], c,
sys/arch/m88k/m88k/db_interface.c
177
int c, force = 0, help = 0;
sys/arch/m88k/m88k/db_interface.c
185
switch (c = *modif++, c) {
sys/arch/m88k/m88k/db_interface.c
193
db_printf("unknown modifier [%c]\n", c);
sys/arch/m88k/m88k/db_trace.c
168
int c;
sys/arch/m88k/m88k/db_trace.c
175
c = value & 0xf;
sys/arch/m88k/m88k/db_trace.c
177
if (c > 9)
sys/arch/m88k/m88k/db_trace.c
182
if (c > 9) /* starts with a letter, thus needs 0x */
sys/arch/m88k/m88k/mem.c
116
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/m88k/m88k/mem.c
122
} else if (!uvm_kernacc((caddr_t)v, c,
sys/arch/m88k/m88k/mem.c
125
error = uiomove((caddr_t)v, c, uio);
sys/arch/m88k/m88k/mem.c
137
c = iov->iov_len;
sys/arch/m88k/m88k/mem.c
143
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/m88k/m88k/mem.c
144
error = uiomove(zpage, c, uio);
sys/arch/m88k/m88k/mem.c
152
iov->iov_base += c;
sys/arch/m88k/m88k/mem.c
153
iov->iov_len -= c;
sys/arch/m88k/m88k/mem.c
154
uio->uio_offset += c;
sys/arch/m88k/m88k/mem.c
155
uio->uio_resid -= c;
sys/arch/m88k/m88k/mem.c
92
size_t c;
sys/arch/macppc/dev/awacs.c
1014
c = DBDMA_CMD_IN_MORE;
sys/arch/macppc/dev/awacs.c
1019
c = DBDMA_CMD_IN_LAST;
sys/arch/macppc/dev/awacs.c
1021
DBDMA_BUILD(cmd, c, 0, bsize, pa, DBDMA_INT_ALWAYS,
sys/arch/macppc/dev/awacs.c
484
u_int16_t c, status;
sys/arch/macppc/dev/awacs.c
490
c = in16rb(&cmd->d_command);
sys/arch/macppc/dev/awacs.c
493
if (c >> 12 == DBDMA_CMD_OUT_LAST)
sys/arch/macppc/dev/awacs.c
498
if (c & (DBDMA_INT_ALWAYS << 4)) {
sys/arch/macppc/dev/awacs.c
512
u_int16_t c, status;
sys/arch/macppc/dev/awacs.c
519
c = in16rb(&cmd->d_command);
sys/arch/macppc/dev/awacs.c
522
if (c >> 12 == DBDMA_CMD_IN_LAST)
sys/arch/macppc/dev/awacs.c
527
if (c & (DBDMA_INT_ALWAYS << 4)) {
sys/arch/macppc/dev/awacs.c
955
int c;
sys/arch/macppc/dev/awacs.c
970
c = DBDMA_CMD_OUT_MORE;
sys/arch/macppc/dev/awacs.c
975
c = DBDMA_CMD_OUT_LAST;
sys/arch/macppc/dev/awacs.c
977
DBDMA_BUILD(cmd, c, 0, bsize, pa, DBDMA_INT_ALWAYS,
sys/arch/macppc/dev/awacs.c
999
int c;
sys/arch/macppc/dev/i2s.c
133
u_int16_t c, status;
sys/arch/macppc/dev/i2s.c
144
c = in16rb(&cmd->d_command);
sys/arch/macppc/dev/i2s.c
147
if (c >> 12 == DBDMA_CMD_OUT_LAST)
sys/arch/macppc/dev/i2s.c
152
if (c & (DBDMA_INT_ALWAYS << 4)) {
sys/arch/macppc/dev/i2s.c
167
u_int16_t c, status;
sys/arch/macppc/dev/i2s.c
178
c = in16rb(&cmd->d_command);
sys/arch/macppc/dev/i2s.c
181
if (c >> 12 == DBDMA_CMD_IN_LAST)
sys/arch/macppc/dev/i2s.c
186
if (c & (DBDMA_INT_ALWAYS << 4)) {
sys/arch/macppc/dev/i2s.c
590
int c;
sys/arch/macppc/dev/i2s.c
604
c = DBDMA_CMD_OUT_MORE;
sys/arch/macppc/dev/i2s.c
609
c = DBDMA_CMD_OUT_LAST;
sys/arch/macppc/dev/i2s.c
611
DBDMA_BUILD(cmd, c, 0, bsize, pa, DBDMA_INT_ALWAYS,
sys/arch/macppc/dev/i2s.c
632
int c;
sys/arch/macppc/dev/i2s.c
646
c = DBDMA_CMD_IN_MORE;
sys/arch/macppc/dev/i2s.c
651
c = DBDMA_CMD_IN_LAST;
sys/arch/macppc/dev/i2s.c
653
DBDMA_BUILD(cmd, c, 0, bsize, pa, DBDMA_INT_ALWAYS,
sys/arch/macppc/dev/zs.c
893
register int s, c, rr0;
sys/arch/macppc/dev/zs.c
902
c = in8(&zc->zc_data);
sys/arch/macppc/dev/zs.c
906
return (c);
sys/arch/macppc/dev/zs.c
913
zs_putc(volatile struct zschan *zc, int c)
sys/arch/macppc/dev/zs.c
926
out8(&zc->zc_data, c);
sys/arch/macppc/dev/zs.c
940
register int c;
sys/arch/macppc/dev/zs.c
943
c = zs_getc(zc);
sys/arch/macppc/dev/zs.c
947
c = ch;
sys/arch/macppc/dev/zs.c
949
return c;
sys/arch/macppc/dev/zs.c
956
zscnputc(dev_t dev, int c)
sys/arch/macppc/dev/zs.c
961
zs_putc(zc, c);
sys/arch/macppc/dev/zs.c
963
char ch = c;
sys/arch/macppc/include/bus.h
41
#define CAT3(a,b,c) a##b##c
sys/arch/macppc/include/bus.h
437
u_int8_t val, bus_size_t c);
sys/arch/macppc/include/bus.h
44
#define CAT3(a,b,c) a/**/b/**/c
sys/arch/macppc/include/bus.h
440
u_int16_t val, bus_size_t c);
sys/arch/macppc/include/bus.h
443
u_int32_t val, bus_size_t c);
sys/arch/macppc/include/bus.h
449
bus_size_t o1, bus_size_t o2, bus_size_t c);
sys/arch/macppc/include/bus.h
452
bus_size_t o1, bus_size_t o2, bus_size_t c);
sys/arch/macppc/include/bus.h
455
bus_size_t o1, bus_size_t o2, bus_size_t c);
sys/arch/macppc/include/conf.h
40
#define cdev_apm_init(c,n) { \
sys/arch/macppc/include/conf.h
41
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/macppc/include/conf.h
42
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/macppc/include/conf.h
44
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/arch/macppc/include/conf.h
50
#define cdev_openprom_init(c,n) { \
sys/arch/macppc/include/conf.h
51
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/macppc/include/conf.h
52
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/macppc/include/loadfile_machdep.h
41
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/macppc/include/loadfile_machdep.h
42
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/macppc/include/loadfile_machdep.h
43
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/macppc/include/pci_machdep.h
94
#define pci_probe_device_hook(c, a) (0)
sys/arch/macppc/include/pci_machdep.h
96
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/macppc/include/pci_machdep.h
97
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/macppc/macppc/mem.c
239
vsize_t c;
sys/arch/macppc/macppc/mem.c
258
c = uio->uio_resid;
sys/arch/macppc/macppc/mem.c
260
pmap_real_memory(&v, &c);
sys/arch/macppc/macppc/mem.c
261
error = uiomove((caddr_t)v, c, uio);
sys/arch/macppc/macppc/mem.c
267
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/macppc/macppc/mem.c
268
error = uiomove((caddr_t)v, c, uio);
sys/arch/macppc/macppc/mem.c
280
c = iov->iov_len;
sys/arch/macppc/macppc/mem.c
286
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/macppc/macppc/mem.c
287
error = uiomove(zeropage, c, uio);
sys/arch/macppc/macppc/mem.c
295
iov->iov_base += c;
sys/arch/macppc/macppc/mem.c
296
iov->iov_len -= c;
sys/arch/macppc/macppc/mem.c
297
uio->uio_offset += c;
sys/arch/macppc/macppc/mem.c
298
uio->uio_resid -= c;
sys/arch/macppc/macppc/ofw_machdep.c
601
ofwcnputc(dev_t dev, int c)
sys/arch/macppc/macppc/ofw_machdep.c
603
char ch = c;
sys/arch/macppc/stand/Locore.c
503
putchar(int c)
sys/arch/macppc/stand/Locore.c
505
char ch = c;
sys/arch/macppc/stand/Locore.c
506
if (c == '\177') {
sys/arch/macppc/stand/Locore.c
513
if (c == '\n')
sys/arch/macppc/stand/Locore.c
564
ofc_putc(dev_t dev, int c)
sys/arch/macppc/stand/Locore.c
570
ch = c;
sys/arch/macppc/stand/Locore.c
571
if (c == '\177' && c == '\b') {
sys/arch/mips64/include/cpu.h
97
#define PHYS_TO_XKPHYS(x,c) ((paddr_t)(x) | XKPHYS_BASE | ((c) << 59))
sys/arch/mips64/include/fpu.h
27
#define FPCSR_CONDBIT(c) ((c) == 0 ? 23 : 24 + (c))
sys/arch/mips64/include/fpu.h
28
#define FPCSR_CONDVAL(c) (1U << FPCSR_CONDBIT(c))
sys/arch/mips64/include/loongson3.h
29
#define LS3_IPI_BASE(n, c) (LS3_CFG_BASE(n) + 0x1000 + 0x100*(c))
sys/arch/mips64/mips64/mem.c
106
size_t c;
sys/arch/mips64/mips64/mem.c
123
c = iov->iov_len;
sys/arch/mips64/mips64/mem.c
124
if (v + c < v || v + c > ptoa((psize_t)physmem))
sys/arch/mips64/mips64/mem.c
127
error = uiomove((caddr_t)v, c, uio);
sys/arch/mips64/mips64/mem.c
133
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/mips64/mips64/mem.c
138
(psize_t)c, 0);
sys/arch/mips64/mips64/mem.c
143
(psize_t)c, CKSEG_SIZE);
sys/arch/mips64/mips64/mem.c
148
(psize_t)c, CKSEG_SIZE);
sys/arch/mips64/mips64/mem.c
151
allowed = uvm_kernacc((caddr_t)v, c,
sys/arch/mips64/mips64/mem.c
155
error = uiomove((caddr_t)v, c, uio);
sys/arch/mips64/mips64/mem.c
170
c = iov->iov_len;
sys/arch/mips64/mips64/mem.c
176
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/mips64/mips64/mem.c
177
error = uiomove(zeropage, c, uio);
sys/arch/mips64/mips64/mem.c
185
iov->iov_base += c;
sys/arch/mips64/mips64/mem.c
186
iov->iov_len -= c;
sys/arch/mips64/mips64/mem.c
187
uio->uio_offset += c;
sys/arch/mips64/mips64/mem.c
188
uio->uio_resid -= c;
sys/arch/mips64/mips64/mips64_machdep.c
110
if (c != 0)
sys/arch/mips64/mips64/mips64_machdep.c
111
*dst++ = *src++ | c;
sys/arch/mips64/mips64/mips64_machdep.c
235
int p, c;
sys/arch/mips64/mips64/mips64_machdep.c
245
c = cp0_get_count();
sys/arch/mips64/mips64/mips64_machdep.c
246
dly -= c - p;
sys/arch/mips64/mips64/mips64_machdep.c
247
p = c;
sys/arch/mips64/mips64/mips64_machdep.c
81
uint32_t a, b, c, d;
sys/arch/mips64/mips64/mips64_machdep.c
91
c = dest & 0xffff;
sys/arch/mips64/mips64/mips64_machdep.c
93
if (c & 0x8000)
sys/arch/octeon/dev/cn30xxuart.c
218
octuartcnpollc(dev_t dev, int c)
sys/arch/octeon/dev/cn30xxuart.c
223
octuartcnputc(dev_t dev, int c)
sys/arch/octeon/dev/cn30xxuart.c
230
octeon_xkphys_write_8(MIO_UART0_RBR, (uint8_t)c);
sys/arch/octeon/dev/cn30xxuart.c
237
int c, d;
sys/arch/octeon/dev/cn30xxuart.c
245
c = (uint8_t)octeon_xkphys_read_8(MIO_UART0_RBR);
sys/arch/octeon/dev/cn30xxuart.c
247
return (c);
sys/arch/octeon/dev/if_ogx.c
1770
const struct ogx_counter *c;
sys/arch/octeon/dev/if_ogx.c
1796
c = &ogx_counters[i];
sys/arch/octeon/dev/if_ogx.c
1797
kstat_kv_unit_init(&kvs[i], c->c_name, KSTAT_KV_T_COUNTER64,
sys/arch/octeon/dev/if_ogx.c
1798
c->c_unit);
sys/arch/octeon/dev/if_ogx.c
1814
const struct ogx_counter *c;
sys/arch/octeon/dev/if_ogx.c
1822
c = &ogx_counters[i];
sys/arch/octeon/dev/if_ogx.c
1823
switch (c->c_type) {
sys/arch/octeon/dev/if_ogx.c
1825
val = PORT_RD_8(sc, c->c_reg);
sys/arch/octeon/dev/if_ogx.c
1838
sc->sc_pki_stat_ioh, c->c_reg);
sys/arch/octeon/dev/if_ogx.c
1862
const struct ogx_counter *c;
sys/arch/octeon/dev/if_ogx.c
1867
c = &ogx_counters[i];
sys/arch/octeon/dev/if_ogx.c
1868
switch (c->c_type) {
sys/arch/octeon/dev/if_ogx.c
1870
PORT_WR_8(sc, c->c_reg, 0);
sys/arch/octeon/dev/if_ogx.c
1874
c->c_reg, 0);
sys/arch/octeon/dev/octcf.c
176
char buf[41], c, *p, *q;
sys/arch/octeon/dev/octcf.c
219
c = *p++;
sys/arch/octeon/dev/octcf.c
220
if (c == '\0')
sys/arch/octeon/dev/octcf.c
222
if (c != ' ') {
sys/arch/octeon/dev/octcf.c
227
*q++ = c;
sys/arch/octeon/dev/octcrypto.c
337
struct cryptoini *c;
sys/arch/octeon/dev/octcrypto.c
356
for (c = cri; c != NULL; c = c->cri_next) {
sys/arch/octeon/dev/octcrypto.c
357
switch (c->cri_alg) {
sys/arch/octeon/dev/octcrypto.c
359
ses->ses_klen = c->cri_klen / 8;
sys/arch/octeon/dev/octcrypto.c
360
memcpy(ses->ses_key, c->cri_key, ses->ses_klen);
sys/arch/octeon/dev/octcrypto.c
366
ses->ses_klen = c->cri_klen / 8 - AESCTR_NONCESIZE;
sys/arch/octeon/dev/octcrypto.c
367
memcpy(ses->ses_key, c->cri_key, ses->ses_klen);
sys/arch/octeon/dev/octcrypto.c
368
memcpy(ses->ses_nonce, c->cri_key + ses->ses_klen,
sys/arch/octeon/dev/octcrypto.c
431
klen = c->cri_klen / 8;
sys/arch/octeon/dev/octcrypto.c
434
memcpy(bptr, c->cri_key, klen);
sys/arch/octeon/dev/octcrypto.c
483
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/octeon/dev/octcrypto.c
484
c->cri_key[i] ^= HMAC_IPAD_VAL;
sys/arch/octeon/dev/octcrypto.c
487
axf->Update(swd->sw_ictx, c->cri_key, c->cri_klen / 8);
sys/arch/octeon/dev/octcrypto.c
489
axf->blocksize - (c->cri_klen / 8));
sys/arch/octeon/dev/octcrypto.c
491
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/octeon/dev/octcrypto.c
492
c->cri_key[i] ^= (HMAC_IPAD_VAL ^
sys/arch/octeon/dev/octcrypto.c
496
axf->Update(swd->sw_octx, c->cri_key, c->cri_klen / 8);
sys/arch/octeon/dev/octcrypto.c
498
axf->blocksize - (c->cri_klen / 8));
sys/arch/octeon/dev/octcrypto.c
500
for (i = 0; i < c->cri_klen / 8; i++)
sys/arch/octeon/dev/octcrypto.c
501
c->cri_key[i] ^= HMAC_OPAD_VAL;
sys/arch/octeon/dev/octcrypto.c
504
swd->sw_alg = c->cri_alg;
sys/arch/octeon/include/bus.h
112
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
sys/arch/octeon/include/bus.h
246
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/octeon/include/bus.h
251
while (c--)
sys/arch/octeon/include/bus.h
258
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/octeon/include/bus.h
263
while (c--)
sys/arch/octeon/include/bus.h
269
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/octeon/include/bus.h
274
while (c--)
sys/arch/octeon/include/bus.h
280
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/octeon/include/bus.h
285
while (c--)
sys/arch/octeon/include/bus.h
32
#define CAT3(a,b,c) a##b##c
sys/arch/octeon/include/bus.h
35
#define CAT3(a,b,c) a/**/b/**/c
sys/arch/octeon/include/conf.h
39
#define cdev_octboot_init(c,n) { \
sys/arch/octeon/include/conf.h
40
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/octeon/include/conf.h
41
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/octeon/include/conf.h
46
#define cdev_openprom_init(c,n) { \
sys/arch/octeon/include/conf.h
47
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/octeon/include/conf.h
48
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/octeon/include/loadfile_machdep.h
41
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/octeon/include/loadfile_machdep.h
42
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/octeon/include/loadfile_machdep.h
43
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/octeon/include/pci_machdep.h
108
#define pci_conf_read(c, t, r) \
sys/arch/octeon/include/pci_machdep.h
109
pci_conf_read_db(c, t, r, __FILE__, __FUNCTION__, __LINE__)
sys/arch/octeon/include/pci_machdep.h
110
#define pci_conf_write(c, t, r, v) \
sys/arch/octeon/include/pci_machdep.h
111
pci_conf_write_db(c, t, r, v, __FILE__, __FUNCTION__, __LINE__)
sys/arch/octeon/include/pci_machdep.h
113
#define pci_conf_read(c, t, r) \
sys/arch/octeon/include/pci_machdep.h
114
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/octeon/include/pci_machdep.h
115
#define pci_conf_write(c, t, r, v) \
sys/arch/octeon/include/pci_machdep.h
116
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/octeon/include/pci_machdep.h
118
#define pci_intr_map(c, ihp) \
sys/arch/octeon/include/pci_machdep.h
119
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/octeon/include/pci_machdep.h
120
#define pci_intr_map_msi(c, ihp) (-1)
sys/arch/octeon/include/pci_machdep.h
121
#define pci_intr_map_msix(c, vec, ihp) (-1)
sys/arch/octeon/include/pci_machdep.h
122
#define pci_intr_string(c, ih) \
sys/arch/octeon/include/pci_machdep.h
123
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/octeon/include/pci_machdep.h
124
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/octeon/include/pci_machdep.h
125
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), (nm))
sys/arch/octeon/include/pci_machdep.h
126
#define pci_intr_disestablish(c, iv) \
sys/arch/octeon/include/pci_machdep.h
127
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/octeon/include/pci_machdep.h
128
#define pci_probe_device_hook(c, a) (0)
sys/arch/octeon/include/pci_machdep.h
130
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/octeon/include/pci_machdep.h
131
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/octeon/include/pci_machdep.h
72
#define pci_bus_maxdevs(c, b) \
sys/arch/octeon/include/pci_machdep.h
73
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/octeon/include/pci_machdep.h
74
#define pci_make_tag(c, b, d, f) \
sys/arch/octeon/include/pci_machdep.h
75
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/octeon/include/pci_machdep.h
76
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/octeon/include/pci_machdep.h
77
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/octeon/include/pci_machdep.h
79
#define pci_conf_size(c, t) \
sys/arch/octeon/include/pci_machdep.h
80
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/octeon/octeon/autoconf.c
113
parsehex(int c)
sys/arch/octeon/octeon/autoconf.c
115
if (c >= 'a')
sys/arch/octeon/octeon/autoconf.c
116
return c - 'a' + 10;
sys/arch/octeon/octeon/autoconf.c
118
return c - '0';
sys/arch/octeon/stand/rdboot/cmd.c
257
int c, timed_out = 0;
sys/arch/octeon/stand/rdboot/cmd.c
276
else if ((c = getchar()) != EOF) {
sys/arch/octeon/stand/rdboot/cmd.c
277
putchar(c); /* Echo. */
sys/arch/octeon/stand/rdboot/cmd.c
278
ungetc(c, stdin);
sys/arch/powerpc/ddb/db_trace.c
140
char c, *cp = modif;
sys/arch/powerpc/ddb/db_trace.c
143
while ((c = *cp++) != 0) {
sys/arch/powerpc/ddb/db_trace.c
144
if (c == 't')
sys/arch/powerpc/powerpc/bus_space.c
276
bus_size_t c) \
sys/arch/powerpc/powerpc/bus_space.c
285
for (i = c-1; i >= 0; i--) \
sys/arch/powerpc/powerpc/bus_space.c
288
for (i = 0; i < c; i++) \
sys/arch/powerpc/powerpc/bus_space.c
297
u_int8_t val, bus_size_t c)
sys/arch/powerpc/powerpc/bus_space.c
304
for (i = 0; i < c; i++)
sys/arch/powerpc/powerpc/bus_space.c
310
u_int16_t val, bus_size_t c)
sys/arch/powerpc/powerpc/bus_space.c
318
for (i = 0; i < c; i++)
sys/arch/powerpc/powerpc/bus_space.c
323
u_int32_t val, bus_size_t c)
sys/arch/powerpc/powerpc/bus_space.c
331
for (i = 0; i < c; i++)
sys/arch/powerpc/powerpc/in_cksum.c
112
s_util.c[0] = *w++;
sys/arch/powerpc/powerpc/in_cksum.c
217
s_util.c[1] = *w;
sys/arch/powerpc/powerpc/in_cksum.c
223
s_util.c[0] = *w;
sys/arch/powerpc/powerpc/in_cksum.c
231
s_util.c[1] = 0;
sys/arch/powerpc/powerpc/in_cksum.c
70
uint8_t c[2];
sys/arch/powerpc/powerpc/in_cksum.c
93
s_util.c[1] = *w++;
sys/arch/powerpc/powerpc/pmap.c
1846
u_char c;
sys/arch/powerpc/powerpc/pmap.c
1871
c = *up;
sys/arch/powerpc/powerpc/pmap.c
1872
*kp = c;
sys/arch/powerpc/powerpc/pmap.c
1873
if (c == 0) {
sys/arch/powerpc/powerpc/pmap.c
1902
u_char c;
sys/arch/powerpc/powerpc/pmap.c
1927
c = *kp;
sys/arch/powerpc/powerpc/pmap.c
1928
*up = c;
sys/arch/powerpc/powerpc/pmap.c
1929
if (c == 0) {
sys/arch/powerpc64/dev/ipmi_opal.c
107
ipmi_opal_buildmsg(struct ipmi_cmd *c)
sys/arch/powerpc64/dev/ipmi_opal.c
109
struct ipmi_softc *sc = c->c_sc;
sys/arch/powerpc64/dev/ipmi_opal.c
113
msg->netfn = NETFN_LUN(c->c_netfn, c->c_rslun);
sys/arch/powerpc64/dev/ipmi_opal.c
114
msg->cmd = c->c_cmd;
sys/arch/powerpc64/dev/ipmi_opal.c
115
if (c->c_txlen && c->c_data)
sys/arch/powerpc64/dev/ipmi_opal.c
116
memcpy(msg->data, c->c_data, c->c_txlen);
sys/arch/powerpc64/dev/ipmi_opal.c
120
ipmi_opal_sendmsg(struct ipmi_cmd *c)
sys/arch/powerpc64/dev/ipmi_opal.c
122
struct ipmi_opal_softc *sc = (struct ipmi_opal_softc *)c->c_sc;
sys/arch/powerpc64/dev/ipmi_opal.c
126
opal_phys(sc->sc.sc_buf), c->c_txlen);
sys/arch/powerpc64/dev/ipmi_opal.c
132
ipmi_opal_recvmsg(struct ipmi_cmd *c)
sys/arch/powerpc64/dev/ipmi_opal.c
134
struct ipmi_opal_softc *sc = (struct ipmi_opal_softc *)c->c_sc;
sys/arch/powerpc64/dev/ipmi_opal.c
158
c->c_rxlen = MIN(size, c->c_maxrxlen);
sys/arch/powerpc64/dev/opalcons.c
130
opalcons_putc(dev_t dev, int c)
sys/arch/powerpc64/dev/opalcons.c
134
char ch = c;
sys/arch/powerpc64/dev/opalcons.c
304
int c;
sys/arch/powerpc64/dev/opalcons.c
306
while (opalcons_getc(sc, &c)) {
sys/arch/powerpc64/dev/opalcons.c
308
(*linesw[tp->t_line].l_rint)(c, tp);
sys/arch/powerpc64/include/bus.h
122
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
sys/arch/powerpc64/include/bus.h
258
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/powerpc64/include/bus.h
263
while (c--)
sys/arch/powerpc64/include/bus.h
270
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/powerpc64/include/bus.h
275
while (c--)
sys/arch/powerpc64/include/bus.h
281
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/powerpc64/include/bus.h
286
while (c--)
sys/arch/powerpc64/include/bus.h
292
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/powerpc64/include/bus.h
297
while (c--)
sys/arch/powerpc64/include/bus.h
30
#define CAT3(a,b,c) a##b##c
sys/arch/powerpc64/include/conf.h
10
#define cdev_kexec_init(c,n) { \
sys/arch/powerpc64/include/conf.h
11
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/powerpc64/include/conf.h
12
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/powerpc64/include/conf.h
17
#define cdev_openprom_init(c,n) { \
sys/arch/powerpc64/include/conf.h
18
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/powerpc64/include/conf.h
19
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/powerpc64/include/pci_machdep.h
100
#define pci_intr_map_msi(c, ihp) \
sys/arch/powerpc64/include/pci_machdep.h
101
(*(c)->pa_pc->pc_intr_map_msi)((c), (ihp))
sys/arch/powerpc64/include/pci_machdep.h
102
#define pci_intr_map_msix(c, vec, ihp) \
sys/arch/powerpc64/include/pci_machdep.h
103
(*(c)->pa_pc->pc_intr_map_msix)((c), (vec), (ihp))
sys/arch/powerpc64/include/pci_machdep.h
104
#define pci_intr_string(c, ih) \
sys/arch/powerpc64/include/pci_machdep.h
105
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/powerpc64/include/pci_machdep.h
106
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/powerpc64/include/pci_machdep.h
107
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), NULL, (h), (a),\
sys/arch/powerpc64/include/pci_machdep.h
109
#define pci_intr_establish_cpu(c, ih, l, ci, h, a, nm) \
sys/arch/powerpc64/include/pci_machdep.h
110
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (ci), (h), (a),\
sys/arch/powerpc64/include/pci_machdep.h
112
#define pci_intr_disestablish(c, iv) \
sys/arch/powerpc64/include/pci_machdep.h
113
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/powerpc64/include/pci_machdep.h
114
#define pci_probe_device_hook(c, a) (0)
sys/arch/powerpc64/include/pci_machdep.h
116
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/powerpc64/include/pci_machdep.h
117
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/powerpc64/include/pci_machdep.h
86
#define pci_bus_maxdevs(c, b) \
sys/arch/powerpc64/include/pci_machdep.h
87
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/powerpc64/include/pci_machdep.h
88
#define pci_make_tag(c, b, d, f) \
sys/arch/powerpc64/include/pci_machdep.h
89
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/powerpc64/include/pci_machdep.h
90
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/powerpc64/include/pci_machdep.h
91
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/powerpc64/include/pci_machdep.h
92
#define pci_conf_size(c, t) \
sys/arch/powerpc64/include/pci_machdep.h
93
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/powerpc64/include/pci_machdep.h
94
#define pci_conf_read(c, t, r) \
sys/arch/powerpc64/include/pci_machdep.h
95
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/powerpc64/include/pci_machdep.h
96
#define pci_conf_write(c, t, r, v) \
sys/arch/powerpc64/include/pci_machdep.h
97
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/powerpc64/include/pci_machdep.h
98
#define pci_intr_map(c, ihp) \
sys/arch/powerpc64/include/pci_machdep.h
99
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/powerpc64/powerpc64/db_trace.c
102
char c, *cp = modif;
sys/arch/powerpc64/powerpc64/db_trace.c
107
while ((c = *cp++) != 0) {
sys/arch/powerpc64/powerpc64/db_trace.c
108
if (c == 't')
sys/arch/powerpc64/powerpc64/machdep.c
536
opal_cnputc(dev_t dev, int c)
sys/arch/powerpc64/powerpc64/machdep.c
539
char ch = c;
sys/arch/powerpc64/powerpc64/mem.c
124
c = ulmin(uio->uio_resid, NBPG - o);
sys/arch/powerpc64/powerpc64/mem.c
125
error = uiomove((caddr_t)vmmap + o, c, uio);
sys/arch/powerpc64/powerpc64/mem.c
134
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/powerpc64/powerpc64/mem.c
135
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/powerpc64/powerpc64/mem.c
138
error = uiomove((caddr_t)v, c, uio);
sys/arch/powerpc64/powerpc64/mem.c
150
c = iov->iov_len;
sys/arch/powerpc64/powerpc64/mem.c
157
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/powerpc64/powerpc64/mem.c
158
error = uiomove(zeropage, c, uio);
sys/arch/powerpc64/powerpc64/mem.c
164
iov->iov_base = (char *)iov->iov_base + c;
sys/arch/powerpc64/powerpc64/mem.c
165
iov->iov_len -= c;
sys/arch/powerpc64/powerpc64/mem.c
166
uio->uio_offset += c;
sys/arch/powerpc64/powerpc64/mem.c
167
uio->uio_resid -= c;
sys/arch/powerpc64/powerpc64/mem.c
95
size_t c;
sys/arch/powerpc64/stand/rdboot/cmd.c
255
int c, timed_out = 0;
sys/arch/powerpc64/stand/rdboot/cmd.c
274
else if ((c = getchar()) != EOF) {
sys/arch/powerpc64/stand/rdboot/cmd.c
275
putchar(c); /* Echo. */
sys/arch/powerpc64/stand/rdboot/cmd.c
276
ungetc(c, stdin);
sys/arch/riscv64/dev/sfuart.c
197
int c, handled = 0;
sys/arch/riscv64/dev/sfuart.c
214
c = val & 0xff;
sys/arch/riscv64/dev/sfuart.c
219
*p++ = c;
sys/arch/riscv64/dev/sfuart.c
613
sfuartcnputc(dev_t dev, int c)
sys/arch/riscv64/dev/sfuart.c
618
bus_space_write_4(sfuartconsiot, sfuartconsioh, UART_TXDATA, c);
sys/arch/riscv64/include/bus.h
128
#define bus_space_map(t, o, s, c, p) (*(t)->_space_map)((t), (o), (s), (c), (p))
sys/arch/riscv64/include/bus.h
265
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/riscv64/include/bus.h
271
while (c--)
sys/arch/riscv64/include/bus.h
279
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/riscv64/include/bus.h
285
while (c--)
sys/arch/riscv64/include/bus.h
292
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/riscv64/include/bus.h
298
while (c--)
sys/arch/riscv64/include/bus.h
305
bus_space_handle_t h2, bus_size_t o2, bus_size_t c)
sys/arch/riscv64/include/bus.h
311
while (c--)
sys/arch/riscv64/include/bus.h
32
#define CAT3(a,b,c) a##b##c
sys/arch/riscv64/include/bus.h
35
#define CAT3(a,b,c) a/**/b/**/c
sys/arch/riscv64/include/conf.h
42
#define cdev_openprom_init(c,n) { \
sys/arch/riscv64/include/conf.h
43
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/riscv64/include/conf.h
44
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/riscv64/include/elf.h
44
#define HWCAP_ISA_BIT(c) (1 << ((c) - 'a'))
sys/arch/riscv64/include/loadfile_machdep.h
43
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/riscv64/include/loadfile_machdep.h
44
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/riscv64/include/loadfile_machdep.h
45
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/riscv64/include/pci_machdep.h
100
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
sys/arch/riscv64/include/pci_machdep.h
101
#define pci_probe_device_hook(c, a) \
sys/arch/riscv64/include/pci_machdep.h
102
(*(c)->pc_probe_device_hook)((c)->pc_conf_v, (a))
sys/arch/riscv64/include/pci_machdep.h
103
#define pci_intr_map(c, ihp) \
sys/arch/riscv64/include/pci_machdep.h
104
(*(c)->pa_pc->pc_intr_map)((c), (ihp))
sys/arch/riscv64/include/pci_machdep.h
105
#define pci_intr_map_msi(c, ihp) \
sys/arch/riscv64/include/pci_machdep.h
106
(*(c)->pa_pc->pc_intr_map_msi)((c), (ihp))
sys/arch/riscv64/include/pci_machdep.h
107
#define pci_intr_map_msix(c, vec, ihp) \
sys/arch/riscv64/include/pci_machdep.h
108
(*(c)->pa_pc->pc_intr_map_msix)((c), (vec), (ihp))
sys/arch/riscv64/include/pci_machdep.h
109
#define pci_intr_string(c, ih) \
sys/arch/riscv64/include/pci_machdep.h
110
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
sys/arch/riscv64/include/pci_machdep.h
111
#define pci_intr_establish(c, ih, l, h, a, nm) \
sys/arch/riscv64/include/pci_machdep.h
112
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), NULL, (h), (a),\
sys/arch/riscv64/include/pci_machdep.h
114
#define pci_intr_establish_cpu(c, ih, l, ci, h, a, nm) \
sys/arch/riscv64/include/pci_machdep.h
115
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (ci), (h), (a),\
sys/arch/riscv64/include/pci_machdep.h
117
#define pci_intr_disestablish(c, iv) \
sys/arch/riscv64/include/pci_machdep.h
118
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
sys/arch/riscv64/include/pci_machdep.h
120
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/riscv64/include/pci_machdep.h
121
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/riscv64/include/pci_machdep.h
89
#define pci_bus_maxdevs(c, b) \
sys/arch/riscv64/include/pci_machdep.h
90
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
sys/arch/riscv64/include/pci_machdep.h
91
#define pci_make_tag(c, b, d, f) \
sys/arch/riscv64/include/pci_machdep.h
92
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
sys/arch/riscv64/include/pci_machdep.h
93
#define pci_decompose_tag(c, t, bp, dp, fp) \
sys/arch/riscv64/include/pci_machdep.h
94
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
sys/arch/riscv64/include/pci_machdep.h
95
#define pci_conf_size(c, t) \
sys/arch/riscv64/include/pci_machdep.h
96
(*(c)->pc_conf_size)((c)->pc_conf_v, (t))
sys/arch/riscv64/include/pci_machdep.h
97
#define pci_conf_read(c, t, r) \
sys/arch/riscv64/include/pci_machdep.h
98
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
sys/arch/riscv64/include/pci_machdep.h
99
#define pci_conf_write(c, t, r, v) \
sys/arch/riscv64/riscv64/db_trace.c
54
char c, *cp = modif;
sys/arch/riscv64/riscv64/db_trace.c
60
while ((c = *cp++) != 0) {
sys/arch/riscv64/riscv64/db_trace.c
61
if (c == 'u')
sys/arch/riscv64/riscv64/db_trace.c
63
if (c == 't') {
sys/arch/riscv64/riscv64/mem.c
146
size_t c;
sys/arch/riscv64/riscv64/mem.c
177
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/riscv64/riscv64/mem.c
178
error = uiomove((caddr_t)vmmap + o, c, uio);
sys/arch/riscv64/riscv64/mem.c
186
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/riscv64/riscv64/mem.c
187
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/riscv64/riscv64/mem.c
190
error = uiomove((caddr_t)v, c, uio);
sys/arch/riscv64/riscv64/mem.c
206
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/riscv64/riscv64/mem.c
207
error = uiomove(zeropage, c, uio);
sys/arch/riscv64/riscv64/sbi.c
217
int c;
sys/arch/riscv64/riscv64/sbi.c
220
c = sbi_console_getchar();
sys/arch/riscv64/riscv64/sbi.c
221
if (c != -1)
sys/arch/riscv64/riscv64/sbi.c
222
return c;
sys/arch/riscv64/riscv64/sbi.c
227
sbi_cnputc(dev_t dev, int c)
sys/arch/riscv64/riscv64/sbi.c
229
sbi_console_putchar(c);
sys/arch/riscv64/stand/efiboot/efiboot.c
185
efi_cons_putc(dev_t dev, int c)
sys/arch/riscv64/stand/efiboot/efiboot.c
189
if (c == '\n')
sys/arch/riscv64/stand/efiboot/efiboot.c
192
buf[0] = c;
sys/arch/riscv64/stand/efiboot/efiboot.c
219
efi_fb_putc(dev_t dev, int c)
sys/arch/riscv64/stand/efiboot/efiboot.c
221
efi_cons_putc(dev, c);
sys/arch/sh/dev/scif.c
1127
u_char c = scif_frdr_read();
sys/arch/sh/dev/scif.c
1138
put[0] = c;
sys/arch/sh/dev/scif.c
1346
int c;
sys/arch/sh/dev/scif.c
1350
c = scif_getc();
sys/arch/sh/dev/scif.c
1353
return (c);
sys/arch/sh/dev/scif.c
1357
scifcnputc(dev_t dev, int c)
sys/arch/sh/dev/scif.c
1362
scif_putc((u_char)c);
sys/arch/sh/dev/scif.c
336
scif_putc(unsigned char c)
sys/arch/sh/dev/scif.c
343
scif_ftdr_write(c);
sys/arch/sh/dev/scif.c
367
unsigned char c, err_c;
sys/arch/sh/dev/scif.c
377
c = scif_frdr_read();
sys/arch/sh/dev/scif.c
392
return(c);
sys/arch/sh/dev/scif.c
658
unsigned char c;
sys/arch/sh/dev/scif.c
663
c = scif_frdr_read();
sys/arch/sh/sh/db_interface.c
210
#define ON(x, c) ((x) & (c) ? '|' : '.')
sys/arch/sh/sh/db_trace.c
89
char c;
sys/arch/sh/sh/db_trace.c
91
while ((c = *cp++) != '\0') {
sys/arch/sh/sh/db_trace.c
92
if (c == 't') {
sys/arch/sh/sh/db_trace.c
99
if (c == 'u') {
sys/arch/sh/sh/mem.c
135
size_t c;
sys/arch/sh/sh/mem.c
155
c = ulmin(uio->uio_resid, PAGE_SIZE - o);
sys/arch/sh/sh/mem.c
157
c, uio);
sys/arch/sh/sh/mem.c
173
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/sh/sh/mem.c
174
error = uiomove((caddr_t)v, c, uio);
sys/arch/sh/sh/mem.c
178
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/sh/sh/mem.c
179
if (!uvm_kernacc((void *)v, c,
sys/arch/sh/sh/mem.c
182
error = uiomove((caddr_t)v, c, uio);
sys/arch/sh/sh/mem.c
199
c = ulmin(iov->iov_len, PAGE_SIZE);
sys/arch/sh/sh/mem.c
200
error = uiomove(zeropage, c, uio);
sys/arch/sparc64/dev/comkbd_ebus.c
264
u_int8_t c;
sys/arch/sparc64/dev/comkbd_ebus.c
271
c = COM_READ(sc, com_data);
sys/arch/sparc64/dev/comkbd_ebus.c
275
sunkbd_decode(c, type, data);
sys/arch/sparc64/dev/comkbd_ebus.c
279
comkbd_putc(struct comkbd_softc *sc, u_int8_t c)
sys/arch/sparc64/dev/comkbd_ebus.c
291
COM_WRITE(sc, com_data, c);
sys/arch/sparc64/dev/comkbd_ebus.c
340
u_int8_t c;
sys/arch/sparc64/dev/comkbd_ebus.c
357
c = sc->sc_ier | IER_ETXRDY;
sys/arch/sparc64/dev/comkbd_ebus.c
358
if (c != sc->sc_ier) {
sys/arch/sparc64/dev/comkbd_ebus.c
359
COM_WRITE(sc, com_ier, c);
sys/arch/sparc64/dev/comkbd_ebus.c
360
sc->sc_ier = c;
sys/arch/sparc64/dev/comkbd_ebus.c
424
u_int8_t stat, c;
sys/arch/sparc64/dev/comkbd_ebus.c
440
c = COM_READ(sc, com_data);
sys/arch/sparc64/dev/comkbd_ebus.c
442
sunkbd_raw(ss, c);
sys/arch/sparc64/dev/comkbd_ebus.c
456
c = COM_READ(sc, com_data);
sys/arch/sparc64/dev/comkbd_ebus.c
457
sunkbd_raw(ss, c);
sys/arch/sparc64/dev/comkbd_ebus.c
476
c = COM_READ(sc, com_data);
sys/arch/sparc64/dev/comkbd_ebus.c
477
sunkbd_raw(ss, c);
sys/arch/sparc64/dev/comms_ebus.c
271
uint8_t c;
sys/arch/sparc64/dev/comms_ebus.c
285
c = *sc->sc_rxget;
sys/arch/sparc64/dev/comms_ebus.c
289
sunms_input(&sc->sc_base, c);
sys/arch/sparc64/dev/cons.h
40
extern void zs_putc(void *arg, int c);
sys/arch/sparc64/dev/consinit.c
135
prom_cnputc(dev_t dev, int c)
sys/arch/sparc64/dev/consinit.c
138
char c0 = (c & 0x7f);
sys/arch/sparc64/dev/fd.c
1232
#define FDC_WRFIFO(fdc, c) \
sys/arch/sparc64/dev/fd.c
1234
if (fdc_wrfifo(fdc, (c))) { \
sys/arch/sparc64/dev/iommureg.h
146
#define MAKEIOTTE(pa,w,c,s) (((pa)&IOTTE_PAMASK)|((w)?IOTTE_W:0)|((c)?IOTTE_C:0)|((s)?IOTTE_STREAM:0)|(IOTTE_V|IOTTE_8K))
sys/arch/sparc64/dev/pcons.c
398
#define ENCODE_STATE(c, n) (short)(((c)&0x1ff)|(((n)&0x7f)<<9))
sys/arch/sparc64/dev/pcons.c
419
unsigned int i, c, n;
sys/arch/sparc64/dev/pcons.c
423
c = (*magic++)&0xff;
sys/arch/sparc64/dev/pcons.c
425
switch (c) {
sys/arch/sparc64/dev/pcons.c
442
c = (*magic++)&0xff;
sys/arch/sparc64/dev/pcons.c
444
switch (c) {
sys/arch/sparc64/dev/pcons.c
449
c = CNC_BREAK;
sys/arch/sparc64/dev/pcons.c
453
c = 0;
sys/arch/sparc64/dev/pcons.c
461
printf("mag %d %x:%x\n", i, c, n);
sys/arch/sparc64/dev/pcons.c
463
m[i] = ENCODE_STATE(c, n);
sys/arch/sparc64/dev/sab.c
1167
sabtty_cnputc(struct sabtty_softc *sc, int c)
sys/arch/sparc64/dev/sab.c
1170
SAB_WRITE(sc, SAB_TIC, c);
sys/arch/sparc64/dev/sab.c
118
#define SAB_WRITE_BLOCK(sc,r,p,c) \
sys/arch/sparc64/dev/sab.c
119
bus_space_write_region_1((sc)->sc_bt, (sc)->sc_bh, (r), (p), (c))
sys/arch/sparc64/dev/sab.c
1241
sab_cnputc(dev_t dev, int c)
sys/arch/sparc64/dev/sab.c
1247
sabtty_cnputc(sc, c);
sys/arch/sparc64/dev/sbbc.c
442
int c;
sys/arch/sparc64/dev/sbbc.c
446
c = *(sc->sc_sram_cons + rdptr);
sys/arch/sparc64/dev/sbbc.c
447
(*linesw[tp->t_line].l_rint)(c, tp);
sys/arch/sparc64/dev/sbbc.c
478
int c;
sys/arch/sparc64/dev/sbbc.c
480
while(!sbbc_cnlookc(dev, &c))
sys/arch/sparc64/dev/sbbc.c
483
return (c);
sys/arch/sparc64/dev/sbbc.c
487
sbbc_cnputc(dev_t dev, int c)
sys/arch/sparc64/dev/sbbc.c
493
*(sc->sc_sram_cons + wrptr) = c;
sys/arch/sparc64/dev/vcons.c
159
int c;
sys/arch/sparc64/dev/vcons.c
161
while(!vcons_cnlookc(dev, &c))
sys/arch/sparc64/dev/vcons.c
164
return (c);
sys/arch/sparc64/dev/vcons.c
168
vcons_cnputc(dev_t dev, int c)
sys/arch/sparc64/dev/vcons.c
170
while (hv_cons_putchar(c) == H_EWOULDBLOCK);
sys/arch/sparc64/dev/vcons.c
354
int c;
sys/arch/sparc64/dev/vcons.c
356
while (vcons_cnlookc(tp->t_dev, &c)) {
sys/arch/sparc64/dev/vcons.c
358
(*linesw[tp->t_line].l_rint)(c, tp);
sys/arch/sparc64/dev/z8530kbd.c
1041
u_int8_t c, rr0;
sys/arch/sparc64/dev/z8530kbd.c
1048
c = *zst->zst_cs->cs_reg_data;
sys/arch/sparc64/dev/z8530kbd.c
1051
sunkbd_decode(c, type, data);
sys/arch/sparc64/dev/z8530kbd.c
552
zskbd_putc(struct zskbd_softc *zst, u_int8_t c)
sys/arch/sparc64/dev/z8530kbd.c
561
*zst->zst_cs->cs_reg_data = c;
sys/arch/sparc64/dev/z8530kbd.c
719
u_char rr0, rr1, c;
sys/arch/sparc64/dev/z8530kbd.c
731
c = zs_read_data(cs);
sys/arch/sparc64/dev/z8530kbd.c
738
put[0] = c;
sys/arch/sparc64/dev/z8530kbd.c
896
u_int8_t cbuf[SUNKBD_MAX_INPUT_SIZE], *c;
sys/arch/sparc64/dev/z8530kbd.c
908
c = cbuf;
sys/arch/sparc64/dev/z8530kbd.c
924
*c++ = code;
sys/arch/sparc64/dev/z8530kbd.c
925
if (c - cbuf == sizeof cbuf) {
sys/arch/sparc64/dev/z8530kbd.c
926
sunkbd_input(ss, cbuf, c - cbuf);
sys/arch/sparc64/dev/z8530kbd.c
927
c = cbuf;
sys/arch/sparc64/dev/z8530kbd.c
935
if (c != cbuf)
sys/arch/sparc64/dev/z8530kbd.c
936
sunkbd_input(ss, cbuf, c - cbuf);
sys/arch/sparc64/dev/zs.c
667
int s, c, rr0;
sys/arch/sparc64/dev/zs.c
676
c = zc->zc_data;
sys/arch/sparc64/dev/zs.c
680
return (c);
sys/arch/sparc64/dev/zs.c
687
zs_putc(void *arg, int c)
sys/arch/sparc64/dev/zs.c
709
zc->zc_data = c;
sys/arch/sparc64/dev/zs.c
733
zscnputc(dev_t dev, int c)
sys/arch/sparc64/dev/zs.c
735
zs_putc(zs_conschan_put, c);
sys/arch/sparc64/include/conf.h
100
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
sys/arch/sparc64/include/conf.h
40
#define cdev_openprom_init(c,n) { \
sys/arch/sparc64/include/conf.h
41
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/arch/sparc64/include/conf.h
42
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/sparc64/include/conf.h
49
#define cdev_uperf_init(c,n) { \
sys/arch/sparc64/include/conf.h
50
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/sparc64/include/conf.h
51
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/sparc64/include/conf.h
58
#define cdev_vdsp_init(c,n) { \
sys/arch/sparc64/include/conf.h
59
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/sparc64/include/conf.h
60
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/arch/sparc64/include/conf.h
64
#define cdev_gen_init(c,n) { \
sys/arch/sparc64/include/conf.h
65
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/arch/sparc64/include/conf.h
66
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
sys/arch/sparc64/include/conf.h
68
0, 0, dev_init(c,n,kqfilter) }
sys/arch/sparc64/include/conf.h
98
#define cdev_bpp_init(c,n) { \
sys/arch/sparc64/include/conf.h
99
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/arch/sparc64/include/ctlreg.h
304
#define TAG_TARGET(c,v) ((((uint64_t)c)<<48)|(((uint64_t)v)&TAG_TARGET_VA_MASK))
sys/arch/sparc64/include/instr.h
341
#define _I_BRANCH(a, c, op2, disp) \
sys/arch/sparc64/include/instr.h
342
_I_ANY(IOP_OP2, (a) << 29 | (c) << 25 | (op2) << 22 | (disp))
sys/arch/sparc64/include/loadfile_machdep.h
46
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/sparc64/include/loadfile_machdep.h
47
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/sparc64/include/loadfile_machdep.h
48
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/sparc64/include/loadfile_machdep.h
58
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
sys/arch/sparc64/include/loadfile_machdep.h
59
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
sys/arch/sparc64/include/loadfile_machdep.h
60
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
sys/arch/sparc64/include/pci_machdep.h
129
#define pci_min_powerstate(c, t) (PCI_PMCSR_STATE_D3)
sys/arch/sparc64/include/pci_machdep.h
130
#define pci_set_powerstate_md(c, t, s, p)
sys/arch/sparc64/include/pci_machdep.h
132
#define pciide_machdep_compat_intr_establish(a, b, c, d, e) (NULL)
sys/arch/sparc64/sparc64/autoconf.c
198
int c;
sys/arch/sparc64/sparc64/autoconf.c
216
for (v = 0;; v = v * 16 + c, str++) {
sys/arch/sparc64/sparc64/autoconf.c
217
c = *(u_char *)str;
sys/arch/sparc64/sparc64/autoconf.c
218
if (c <= '9') {
sys/arch/sparc64/sparc64/autoconf.c
219
if ((c -= '0') < 0)
sys/arch/sparc64/sparc64/autoconf.c
221
} else if (c <= 'F') {
sys/arch/sparc64/sparc64/autoconf.c
222
if ((c -= 'A' - 10) < 10)
sys/arch/sparc64/sparc64/autoconf.c
224
} else if (c <= 'f') {
sys/arch/sparc64/sparc64/autoconf.c
225
if ((c -= 'a' - 10) < 10)
sys/arch/sparc64/sparc64/autoconf.c
447
char buf[128], *cp, c;
sys/arch/sparc64/sparc64/autoconf.c
460
c = *cp;
sys/arch/sparc64/sparc64/autoconf.c
463
*cp = c;
sys/arch/sparc64/sparc64/busop.c
1001
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
1002
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
1004
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
1006
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
101
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
1013
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
1021
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1022
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
1025
for (; c; p++, c--, ptr += 8) {
sys/arch/sparc64/sparc64/busop.c
103
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
1037
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
1045
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1046
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
1049
for (; c; p++, c--, ptr += 8) {
sys/arch/sparc64/sparc64/busop.c
1061
size_t c)
sys/arch/sparc64/sparc64/busop.c
1068
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
1069
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
1072
for (; c; c--, ptr += 8)
sys/arch/sparc64/sparc64/busop.c
1086
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
1093
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1094
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
1096
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
1098
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
110
u_int16_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
1110
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
1117
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1118
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
1120
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
1122
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
1134
size_t c)
sys/arch/sparc64/sparc64/busop.c
1139
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
1140
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
1142
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
1144
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
1151
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
1159
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1160
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
1163
for (; c; p++, c--, ptr += 1) {
sys/arch/sparc64/sparc64/busop.c
1175
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
118
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
1183
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
1184
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
1187
for (; c; p++, c--, ptr += 1) {
sys/arch/sparc64/sparc64/busop.c
1199
size_t c)
sys/arch/sparc64/sparc64/busop.c
1206
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
1207
c /= sizeof(u_int8_t);
sys/arch/sparc64/sparc64/busop.c
121
for (; c; p++, c--, ptr += 2) {
sys/arch/sparc64/sparc64/busop.c
1210
for (; c; c--, ptr += 1)
sys/arch/sparc64/sparc64/busop.c
133
const u_int16_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
141
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
144
for (; c; p++, c--, ptr += 2) {
sys/arch/sparc64/sparc64/busop.c
156
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
163
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
166
for (; c; c--, ptr += 2)
sys/arch/sparc64/sparc64/busop.c
173
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
184
t->asi, c));
sys/arch/sparc64/sparc64/busop.c
187
for (; c; c--, ptr1 += 2, ptr2 += 2) {
sys/arch/sparc64/sparc64/busop.c
204
u_int32_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
211
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
213
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
215
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
227
const u_int32_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
234
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
236
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
238
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
250
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
255
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
257
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
259
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
266
u_int32_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
274
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
277
for (; c; p++, c--, ptr += 4) {
sys/arch/sparc64/sparc64/busop.c
289
const u_int32_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
297
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
300
for (; c; p++, c--, ptr += 4) {
sys/arch/sparc64/sparc64/busop.c
312
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
319
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
322
for (; c; c--, ptr += 4)
sys/arch/sparc64/sparc64/busop.c
329
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
340
t->asi, c));
sys/arch/sparc64/sparc64/busop.c
343
for (; c; c--, ptr1 += 4, ptr2 += 4) {
sys/arch/sparc64/sparc64/busop.c
360
u_int64_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
367
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
369
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
371
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
383
const u_int64_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
390
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
392
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
394
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
406
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
411
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
413
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
415
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
422
u_int64_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
430
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
433
for (; c; p++, c--, ptr += 8) {
sys/arch/sparc64/sparc64/busop.c
445
const u_int64_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
453
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
456
for (; c; p++, c--, ptr += 8) {
sys/arch/sparc64/sparc64/busop.c
468
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
475
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
478
for (; c; c--, ptr += 8)
sys/arch/sparc64/sparc64/busop.c
48
u_int16_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
485
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
496
t->asi, c));
sys/arch/sparc64/sparc64/busop.c
499
for (; c; c--, ptr1 += 8, ptr2 += 8) {
sys/arch/sparc64/sparc64/busop.c
516
u_int8_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
523
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
525
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
527
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
539
const u_int8_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
546
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
548
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
55
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
550
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
562
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
567
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
569
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
57
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
571
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
578
u_int8_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
586
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
589
for (; c; p++, c--, ptr += 1) {
sys/arch/sparc64/sparc64/busop.c
59
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
601
const u_int8_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
609
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
612
for (; c; p++, c--, ptr += 1) {
sys/arch/sparc64/sparc64/busop.c
624
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
631
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
634
for (; c; c--, ptr += 1)
sys/arch/sparc64/sparc64/busop.c
641
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
652
t->asi, c));
sys/arch/sparc64/sparc64/busop.c
655
for (; c; c--, ptr1 += 1, ptr2 += 1) {
sys/arch/sparc64/sparc64/busop.c
672
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
679
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
680
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
682
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
684
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
696
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
703
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
704
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
706
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
708
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
71
const u_int16_t *a, bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
720
size_t c)
sys/arch/sparc64/sparc64/busop.c
725
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
726
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
728
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
730
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
737
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
745
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
746
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
749
for (; c; p++, c--, ptr += 2) {
sys/arch/sparc64/sparc64/busop.c
761
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
769
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
770
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
773
for (; c; p++, c--, ptr += 2) {
sys/arch/sparc64/sparc64/busop.c
78
(long long)o, t->asi, c));
sys/arch/sparc64/sparc64/busop.c
785
size_t c)
sys/arch/sparc64/sparc64/busop.c
792
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
793
c /= sizeof(u_int16_t);
sys/arch/sparc64/sparc64/busop.c
796
for (; c; c--, ptr += 2)
sys/arch/sparc64/sparc64/busop.c
80
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
810
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
817
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
818
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
82
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
820
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
822
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
834
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
841
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
842
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
844
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
846
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
858
size_t c)
sys/arch/sparc64/sparc64/busop.c
863
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
864
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
866
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
868
while (--c > 0)
sys/arch/sparc64/sparc64/busop.c
875
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
883
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
884
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
887
for (; c; p++, c--, ptr += 4) {
sys/arch/sparc64/sparc64/busop.c
899
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
907
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
908
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
911
for (; c; p++, c--, ptr += 4) {
sys/arch/sparc64/sparc64/busop.c
923
size_t c)
sys/arch/sparc64/sparc64/busop.c
930
(long long)o, t->sasi, c, v));
sys/arch/sparc64/sparc64/busop.c
931
c /= sizeof(u_int32_t);
sys/arch/sparc64/sparc64/busop.c
934
for (; c; c--, ptr += 4)
sys/arch/sparc64/sparc64/busop.c
94
bus_size_t c)
sys/arch/sparc64/sparc64/busop.c
948
void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
955
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
956
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
958
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
960
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
972
const void *a, size_t c)
sys/arch/sparc64/sparc64/busop.c
979
(long long)o, t->sasi, c));
sys/arch/sparc64/sparc64/busop.c
980
c /= sizeof(u_int64_t);
sys/arch/sparc64/sparc64/busop.c
982
++c; /* Looping on "--c" is slightly faster than on "c--" */
sys/arch/sparc64/sparc64/busop.c
984
while (--c > 0) {
sys/arch/sparc64/sparc64/busop.c
99
(long long)o, t->asi, c, v));
sys/arch/sparc64/sparc64/busop.c
996
size_t c)
sys/arch/sparc64/sparc64/db_disasm.c
106
#define FORMAT3(a,b,c) (OP(a) | OP3(b) | F3I(c))
sys/arch/sparc64/sparc64/db_disasm.c
107
#define FORMAT3F(a,b,c) (OP(a) | OP3(b) | OPF(c))
sys/arch/sparc64/sparc64/db_interface.c
1047
register char c, *cp = modif;
sys/arch/sparc64/sparc64/db_interface.c
1049
while ((c = *cp++) != 0)
sys/arch/sparc64/sparc64/db_interface.c
1050
if (c == 'p')
sys/arch/sparc64/sparc64/db_interface.c
723
register char c, *cp = modif;
sys/arch/sparc64/sparc64/db_interface.c
724
while ((c = *cp++) != 0)
sys/arch/sparc64/sparc64/db_interface.c
725
if (c == 'u')
sys/arch/sparc64/sparc64/db_interface.c
785
register char c, *cp = modif;
sys/arch/sparc64/sparc64/db_interface.c
786
while ((c = *cp++) != 0)
sys/arch/sparc64/sparc64/db_interface.c
787
if (c == 'f')
sys/arch/sparc64/sparc64/db_interface.c
826
register char c, *cp = modif;
sys/arch/sparc64/sparc64/db_interface.c
828
while ((c = *cp++) != 0)
sys/arch/sparc64/sparc64/db_interface.c
829
if (c == 'f')
sys/arch/sparc64/sparc64/db_trace.c
289
register char c, *cp = modif;
sys/arch/sparc64/sparc64/db_trace.c
290
while ((c = *cp++) != 0)
sys/arch/sparc64/sparc64/db_trace.c
291
if (c == 'u')
sys/arch/sparc64/sparc64/db_trace.c
60
char c, *cp = modif;
sys/arch/sparc64/sparc64/db_trace.c
62
while ((c = *cp++) != 0) {
sys/arch/sparc64/sparc64/db_trace.c
63
if (c == 't')
sys/arch/sparc64/sparc64/db_trace.c
65
if (c == 'u')
sys/arch/sparc64/sparc64/mem.c
139
c = ulmin(uio->uio_resid, NBPG - o);
sys/arch/sparc64/sparc64/mem.c
140
error = uiomove((caddr_t)vmmap + o, c, uio);
sys/arch/sparc64/sparc64/mem.c
149
c = ulmin(iov->iov_len, MAXPHYS);
sys/arch/sparc64/sparc64/mem.c
150
if (!uvm_kernacc((caddr_t)v, c,
sys/arch/sparc64/sparc64/mem.c
153
error = uiomove((caddr_t)v, c, uio);
sys/arch/sparc64/sparc64/mem.c
171
c = ulmin(iov->iov_len, NBPG);
sys/arch/sparc64/sparc64/mem.c
172
error = uiomove(zeropage, c, uio);
sys/arch/sparc64/sparc64/mem.c
98
size_t c;
sys/arch/sparc64/stand/ofwboot/Locore.c
669
putchar(int c)
sys/arch/sparc64/stand/ofwboot/Locore.c
671
char ch = c;
sys/arch/sparc64/stand/ofwboot/Locore.c
673
if (c == '\n')
sys/crypto/blake2s.c
121
#define G(r, i, a, b, c, d) do { \
sys/crypto/blake2s.c
124
c += d; \
sys/crypto/blake2s.c
125
b = ror32(b ^ c, 12); \
sys/crypto/blake2s.c
128
c += d; \
sys/crypto/blake2s.c
129
b = ror32(b ^ c, 7); \
sys/crypto/blf.c
105
Blowfish_initstate(blf_ctx *c)
sys/crypto/blf.c
381
*c = initstate;
sys/crypto/blf.c
406
Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
sys/crypto/blf.c
418
c->P[i] = c->P[i] ^ temp;
sys/crypto/blf.c
425
Blowfish_encipher(c, data);
sys/crypto/blf.c
427
c->P[i] = data[0];
sys/crypto/blf.c
428
c->P[i + 1] = data[1];
sys/crypto/blf.c
433
Blowfish_encipher(c, data);
sys/crypto/blf.c
435
c->S[i][k] = data[0];
sys/crypto/blf.c
436
c->S[i][k + 1] = data[1];
sys/crypto/blf.c
443
Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
sys/crypto/blf.c
456
c->P[i] = c->P[i] ^ temp;
sys/crypto/blf.c
465
Blowfish_encipher(c, d);
sys/crypto/blf.c
467
c->P[i] = d[0];
sys/crypto/blf.c
468
c->P[i + 1] = d[1];
sys/crypto/blf.c
475
Blowfish_encipher(c, d);
sys/crypto/blf.c
477
c->S[i][k] = d[0];
sys/crypto/blf.c
478
c->S[i][k + 1] = d[1];
sys/crypto/blf.c
485
blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
sys/crypto/blf.c
488
Blowfish_initstate(c);
sys/crypto/blf.c
491
Blowfish_expand0state(c, k, len);
sys/crypto/blf.c
495
blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
sys/crypto/blf.c
502
Blowfish_encipher(c, d);
sys/crypto/blf.c
508
blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
sys/crypto/blf.c
515
Blowfish_decipher(c, d);
sys/crypto/blf.c
521
blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
sys/crypto/blf.c
531
Blowfish_encipher(c, d);
sys/crypto/blf.c
547
blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
sys/crypto/blf.c
55
Blowfish_encipher(blf_ctx *c, u_int32_t *x)
sys/crypto/blf.c
557
Blowfish_decipher(c, d);
sys/crypto/blf.c
573
blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
sys/crypto/blf.c
585
Blowfish_encipher(c, d);
sys/crypto/blf.c
59
u_int32_t *s = c->S[0];
sys/crypto/blf.c
60
u_int32_t *p = c->P;
sys/crypto/blf.c
602
blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
sys/crypto/blf.c
615
Blowfish_decipher(c, d);
sys/crypto/blf.c
635
Blowfish_decipher(c, d);
sys/crypto/blf.c
80
Blowfish_decipher(blf_ctx *c, u_int32_t *x)
sys/crypto/blf.c
84
u_int32_t *s = c->S[0];
sys/crypto/blf.c
85
u_int32_t *p = c->P;
sys/crypto/chacha_private.h
128
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
sys/crypto/chacha_private.h
159
ctarget = c;
sys/crypto/chacha_private.h
160
c = tmp;
sys/crypto/chacha_private.h
230
U32TO8_LITTLE(c + 0,x0);
sys/crypto/chacha_private.h
231
U32TO8_LITTLE(c + 4,x1);
sys/crypto/chacha_private.h
232
U32TO8_LITTLE(c + 8,x2);
sys/crypto/chacha_private.h
233
U32TO8_LITTLE(c + 12,x3);
sys/crypto/chacha_private.h
234
U32TO8_LITTLE(c + 16,x4);
sys/crypto/chacha_private.h
235
U32TO8_LITTLE(c + 20,x5);
sys/crypto/chacha_private.h
236
U32TO8_LITTLE(c + 24,x6);
sys/crypto/chacha_private.h
237
U32TO8_LITTLE(c + 28,x7);
sys/crypto/chacha_private.h
238
U32TO8_LITTLE(c + 32,x8);
sys/crypto/chacha_private.h
239
U32TO8_LITTLE(c + 36,x9);
sys/crypto/chacha_private.h
240
U32TO8_LITTLE(c + 40,x10);
sys/crypto/chacha_private.h
241
U32TO8_LITTLE(c + 44,x11);
sys/crypto/chacha_private.h
242
U32TO8_LITTLE(c + 48,x12);
sys/crypto/chacha_private.h
243
U32TO8_LITTLE(c + 52,x13);
sys/crypto/chacha_private.h
244
U32TO8_LITTLE(c + 56,x14);
sys/crypto/chacha_private.h
245
U32TO8_LITTLE(c + 60,x15);
sys/crypto/chacha_private.h
249
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
sys/crypto/chacha_private.h
256
c += 64;
sys/crypto/chacha_private.h
41
#define ROTATE(v,c) (ROTL32(v,c))
sys/crypto/chacha_private.h
46
#define QUARTERROUND(a,b,c,d) \
sys/crypto/chacha_private.h
48
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
sys/crypto/chacha_private.h
50
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
sys/crypto/cryptosoft.c
80
#define COPYBACK(x, a, b, c, d) \
sys/crypto/cryptosoft.c
83
m_copyback((struct mbuf *)a,b,c,d,M_NOWAIT); \
sys/crypto/cryptosoft.c
85
cuio_copyback((struct uio *)a,b,c,d); \
sys/crypto/cryptosoft.c
87
#define COPYDATA(x, a, b, c, d) \
sys/crypto/cryptosoft.c
90
m_copydata((struct mbuf *)a,b,c,d); \
sys/crypto/cryptosoft.c
92
cuio_copydata((struct uio *)a,b,c,d); \
sys/crypto/curve25519.c
102
addcarryx_u26(uint8_t /*bool*/ c, uint32_t a, uint32_t b, uint32_t *low)
sys/crypto/curve25519.c
107
uint32_t x = a + b + c;
sys/crypto/curve25519.c
113
subborrow_u25(uint8_t /*bool*/ c, uint32_t a, uint32_t b, uint32_t *low)
sys/crypto/curve25519.c
118
uint32_t x = a - b - c;
sys/crypto/curve25519.c
124
subborrow_u26(uint8_t /*bool*/ c, uint32_t a, uint32_t b, uint32_t *low)
sys/crypto/curve25519.c
129
uint32_t x = a - b - c;
sys/crypto/curve25519.c
91
addcarryx_u25(uint8_t /*bool*/ c, uint32_t a, uint32_t b, uint32_t *low)
sys/crypto/curve25519.c
96
uint32_t x = a + b + c;
sys/crypto/des_locl.h
78
#define c2l(c,l) (l =((u_int32_t)(*((c)++))) , \
sys/crypto/des_locl.h
79
l|=((u_int32_t)(*((c)++)))<< 8L, \
sys/crypto/des_locl.h
80
l|=((u_int32_t)(*((c)++)))<<16L, \
sys/crypto/des_locl.h
81
l|=((u_int32_t)(*((c)++)))<<24L)
sys/crypto/des_locl.h
83
#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
sys/crypto/des_locl.h
84
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
sys/crypto/des_locl.h
85
*((c)++)=(unsigned char)(((l)>>16L)&0xff), \
sys/crypto/des_locl.h
86
*((c)++)=(unsigned char)(((l)>>24L)&0xff))
sys/crypto/md5.c
147
u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
sys/crypto/md5.c
163
c = state[2];
sys/crypto/md5.c
166
MD5STEP(F1, a, b, c, d, in[ 0] + 0xd76aa478, 7);
sys/crypto/md5.c
167
MD5STEP(F1, d, a, b, c, in[ 1] + 0xe8c7b756, 12);
sys/crypto/md5.c
168
MD5STEP(F1, c, d, a, b, in[ 2] + 0x242070db, 17);
sys/crypto/md5.c
169
MD5STEP(F1, b, c, d, a, in[ 3] + 0xc1bdceee, 22);
sys/crypto/md5.c
170
MD5STEP(F1, a, b, c, d, in[ 4] + 0xf57c0faf, 7);
sys/crypto/md5.c
171
MD5STEP(F1, d, a, b, c, in[ 5] + 0x4787c62a, 12);
sys/crypto/md5.c
172
MD5STEP(F1, c, d, a, b, in[ 6] + 0xa8304613, 17);
sys/crypto/md5.c
173
MD5STEP(F1, b, c, d, a, in[ 7] + 0xfd469501, 22);
sys/crypto/md5.c
174
MD5STEP(F1, a, b, c, d, in[ 8] + 0x698098d8, 7);
sys/crypto/md5.c
175
MD5STEP(F1, d, a, b, c, in[ 9] + 0x8b44f7af, 12);
sys/crypto/md5.c
176
MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
sys/crypto/md5.c
177
MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
sys/crypto/md5.c
178
MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
sys/crypto/md5.c
179
MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
sys/crypto/md5.c
180
MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
sys/crypto/md5.c
181
MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
sys/crypto/md5.c
183
MD5STEP(F2, a, b, c, d, in[ 1] + 0xf61e2562, 5);
sys/crypto/md5.c
184
MD5STEP(F2, d, a, b, c, in[ 6] + 0xc040b340, 9);
sys/crypto/md5.c
185
MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
sys/crypto/md5.c
186
MD5STEP(F2, b, c, d, a, in[ 0] + 0xe9b6c7aa, 20);
sys/crypto/md5.c
187
MD5STEP(F2, a, b, c, d, in[ 5] + 0xd62f105d, 5);
sys/crypto/md5.c
188
MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
sys/crypto/md5.c
189
MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
sys/crypto/md5.c
190
MD5STEP(F2, b, c, d, a, in[ 4] + 0xe7d3fbc8, 20);
sys/crypto/md5.c
191
MD5STEP(F2, a, b, c, d, in[ 9] + 0x21e1cde6, 5);
sys/crypto/md5.c
192
MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
sys/crypto/md5.c
193
MD5STEP(F2, c, d, a, b, in[ 3] + 0xf4d50d87, 14);
sys/crypto/md5.c
194
MD5STEP(F2, b, c, d, a, in[ 8] + 0x455a14ed, 20);
sys/crypto/md5.c
195
MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
sys/crypto/md5.c
196
MD5STEP(F2, d, a, b, c, in[ 2] + 0xfcefa3f8, 9);
sys/crypto/md5.c
197
MD5STEP(F2, c, d, a, b, in[ 7] + 0x676f02d9, 14);
sys/crypto/md5.c
198
MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
sys/crypto/md5.c
200
MD5STEP(F3, a, b, c, d, in[ 5] + 0xfffa3942, 4);
sys/crypto/md5.c
201
MD5STEP(F3, d, a, b, c, in[ 8] + 0x8771f681, 11);
sys/crypto/md5.c
202
MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
sys/crypto/md5.c
203
MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
sys/crypto/md5.c
204
MD5STEP(F3, a, b, c, d, in[ 1] + 0xa4beea44, 4);
sys/crypto/md5.c
205
MD5STEP(F3, d, a, b, c, in[ 4] + 0x4bdecfa9, 11);
sys/crypto/md5.c
206
MD5STEP(F3, c, d, a, b, in[ 7] + 0xf6bb4b60, 16);
sys/crypto/md5.c
207
MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
sys/crypto/md5.c
208
MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
sys/crypto/md5.c
209
MD5STEP(F3, d, a, b, c, in[ 0] + 0xeaa127fa, 11);
sys/crypto/md5.c
210
MD5STEP(F3, c, d, a, b, in[ 3] + 0xd4ef3085, 16);
sys/crypto/md5.c
211
MD5STEP(F3, b, c, d, a, in[ 6] + 0x04881d05, 23);
sys/crypto/md5.c
212
MD5STEP(F3, a, b, c, d, in[ 9] + 0xd9d4d039, 4);
sys/crypto/md5.c
213
MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
sys/crypto/md5.c
214
MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
sys/crypto/md5.c
215
MD5STEP(F3, b, c, d, a, in[2 ] + 0xc4ac5665, 23);
sys/crypto/md5.c
217
MD5STEP(F4, a, b, c, d, in[ 0] + 0xf4292244, 6);
sys/crypto/md5.c
218
MD5STEP(F4, d, a, b, c, in[7 ] + 0x432aff97, 10);
sys/crypto/md5.c
219
MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
sys/crypto/md5.c
220
MD5STEP(F4, b, c, d, a, in[5 ] + 0xfc93a039, 21);
sys/crypto/md5.c
221
MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
sys/crypto/md5.c
222
MD5STEP(F4, d, a, b, c, in[3 ] + 0x8f0ccc92, 10);
sys/crypto/md5.c
223
MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
sys/crypto/md5.c
224
MD5STEP(F4, b, c, d, a, in[1 ] + 0x85845dd1, 21);
sys/crypto/md5.c
225
MD5STEP(F4, a, b, c, d, in[8 ] + 0x6fa87e4f, 6);
sys/crypto/md5.c
226
MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
sys/crypto/md5.c
227
MD5STEP(F4, c, d, a, b, in[6 ] + 0xa3014314, 15);
sys/crypto/md5.c
228
MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
sys/crypto/md5.c
229
MD5STEP(F4, a, b, c, d, in[4 ] + 0xf7537e82, 6);
sys/crypto/md5.c
230
MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
sys/crypto/md5.c
231
MD5STEP(F4, c, d, a, b, in[2 ] + 0x2ad7d2bb, 15);
sys/crypto/md5.c
232
MD5STEP(F4, b, c, d, a, in[9 ] + 0xeb86d391, 21);
sys/crypto/md5.c
236
state[2] += c;
sys/crypto/poly1305.c
128
c = (unsigned long)(d0 >> 26);
sys/crypto/poly1305.c
130
d1 += c;
sys/crypto/poly1305.c
131
c = (unsigned long)(d1 >> 26);
sys/crypto/poly1305.c
133
d2 += c;
sys/crypto/poly1305.c
134
c = (unsigned long)(d2 >> 26);
sys/crypto/poly1305.c
136
d3 += c;
sys/crypto/poly1305.c
137
c = (unsigned long)(d3 >> 26);
sys/crypto/poly1305.c
139
d4 += c;
sys/crypto/poly1305.c
140
c = (unsigned long)(d4 >> 26);
sys/crypto/poly1305.c
142
h0 += c * 5;
sys/crypto/poly1305.c
143
c = (h0 >> 26);
sys/crypto/poly1305.c
145
h1 += c;
sys/crypto/poly1305.c
198
unsigned long h0, h1, h2, h3, h4, c;
sys/crypto/poly1305.c
220
c = h1 >> 26;
sys/crypto/poly1305.c
222
h2 += c;
sys/crypto/poly1305.c
223
c = h2 >> 26;
sys/crypto/poly1305.c
225
h3 += c;
sys/crypto/poly1305.c
226
c = h3 >> 26;
sys/crypto/poly1305.c
228
h4 += c;
sys/crypto/poly1305.c
229
c = h4 >> 26;
sys/crypto/poly1305.c
231
h0 += c * 5;
sys/crypto/poly1305.c
232
c = h0 >> 26;
sys/crypto/poly1305.c
234
h1 += c;
sys/crypto/poly1305.c
238
c = g0 >> 26;
sys/crypto/poly1305.c
240
g1 = h1 + c;
sys/crypto/poly1305.c
241
c = g1 >> 26;
sys/crypto/poly1305.c
243
g2 = h2 + c;
sys/crypto/poly1305.c
244
c = g2 >> 26;
sys/crypto/poly1305.c
246
g3 = h3 + c;
sys/crypto/poly1305.c
247
c = g3 >> 26;
sys/crypto/poly1305.c
249
g4 = h4 + c - (1 << 26);
sys/crypto/poly1305.c
73
unsigned long c;
sys/crypto/rmd160.c
159
u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
sys/crypto/rmd160.c
176
c = state[2];
sys/crypto/rmd160.c
181
R(a, b, c, d, e, F0, K0, 11, 0);
sys/crypto/rmd160.c
182
R(e, a, b, c, d, F0, K0, 14, 1);
sys/crypto/rmd160.c
183
R(d, e, a, b, c, F0, K0, 15, 2);
sys/crypto/rmd160.c
184
R(c, d, e, a, b, F0, K0, 12, 3);
sys/crypto/rmd160.c
185
R(b, c, d, e, a, F0, K0, 5, 4);
sys/crypto/rmd160.c
186
R(a, b, c, d, e, F0, K0, 8, 5);
sys/crypto/rmd160.c
187
R(e, a, b, c, d, F0, K0, 7, 6);
sys/crypto/rmd160.c
188
R(d, e, a, b, c, F0, K0, 9, 7);
sys/crypto/rmd160.c
189
R(c, d, e, a, b, F0, K0, 11, 8);
sys/crypto/rmd160.c
190
R(b, c, d, e, a, F0, K0, 13, 9);
sys/crypto/rmd160.c
191
R(a, b, c, d, e, F0, K0, 14, 10);
sys/crypto/rmd160.c
192
R(e, a, b, c, d, F0, K0, 15, 11);
sys/crypto/rmd160.c
193
R(d, e, a, b, c, F0, K0, 6, 12);
sys/crypto/rmd160.c
194
R(c, d, e, a, b, F0, K0, 7, 13);
sys/crypto/rmd160.c
195
R(b, c, d, e, a, F0, K0, 9, 14);
sys/crypto/rmd160.c
196
R(a, b, c, d, e, F0, K0, 8, 15); /* #15 */
sys/crypto/rmd160.c
198
R(e, a, b, c, d, F1, K1, 7, 7);
sys/crypto/rmd160.c
199
R(d, e, a, b, c, F1, K1, 6, 4);
sys/crypto/rmd160.c
200
R(c, d, e, a, b, F1, K1, 8, 13);
sys/crypto/rmd160.c
201
R(b, c, d, e, a, F1, K1, 13, 1);
sys/crypto/rmd160.c
202
R(a, b, c, d, e, F1, K1, 11, 10);
sys/crypto/rmd160.c
203
R(e, a, b, c, d, F1, K1, 9, 6);
sys/crypto/rmd160.c
204
R(d, e, a, b, c, F1, K1, 7, 15);
sys/crypto/rmd160.c
205
R(c, d, e, a, b, F1, K1, 15, 3);
sys/crypto/rmd160.c
206
R(b, c, d, e, a, F1, K1, 7, 12);
sys/crypto/rmd160.c
207
R(a, b, c, d, e, F1, K1, 12, 0);
sys/crypto/rmd160.c
208
R(e, a, b, c, d, F1, K1, 15, 9);
sys/crypto/rmd160.c
209
R(d, e, a, b, c, F1, K1, 9, 5);
sys/crypto/rmd160.c
210
R(c, d, e, a, b, F1, K1, 11, 2);
sys/crypto/rmd160.c
211
R(b, c, d, e, a, F1, K1, 7, 14);
sys/crypto/rmd160.c
212
R(a, b, c, d, e, F1, K1, 13, 11);
sys/crypto/rmd160.c
213
R(e, a, b, c, d, F1, K1, 12, 8); /* #31 */
sys/crypto/rmd160.c
215
R(d, e, a, b, c, F2, K2, 11, 3);
sys/crypto/rmd160.c
216
R(c, d, e, a, b, F2, K2, 13, 10);
sys/crypto/rmd160.c
217
R(b, c, d, e, a, F2, K2, 6, 14);
sys/crypto/rmd160.c
218
R(a, b, c, d, e, F2, K2, 7, 4);
sys/crypto/rmd160.c
219
R(e, a, b, c, d, F2, K2, 14, 9);
sys/crypto/rmd160.c
220
R(d, e, a, b, c, F2, K2, 9, 15);
sys/crypto/rmd160.c
221
R(c, d, e, a, b, F2, K2, 13, 8);
sys/crypto/rmd160.c
222
R(b, c, d, e, a, F2, K2, 15, 1);
sys/crypto/rmd160.c
223
R(a, b, c, d, e, F2, K2, 14, 2);
sys/crypto/rmd160.c
224
R(e, a, b, c, d, F2, K2, 8, 7);
sys/crypto/rmd160.c
225
R(d, e, a, b, c, F2, K2, 13, 0);
sys/crypto/rmd160.c
226
R(c, d, e, a, b, F2, K2, 6, 6);
sys/crypto/rmd160.c
227
R(b, c, d, e, a, F2, K2, 5, 13);
sys/crypto/rmd160.c
228
R(a, b, c, d, e, F2, K2, 12, 11);
sys/crypto/rmd160.c
229
R(e, a, b, c, d, F2, K2, 7, 5);
sys/crypto/rmd160.c
230
R(d, e, a, b, c, F2, K2, 5, 12); /* #47 */
sys/crypto/rmd160.c
232
R(c, d, e, a, b, F3, K3, 11, 1);
sys/crypto/rmd160.c
233
R(b, c, d, e, a, F3, K3, 12, 9);
sys/crypto/rmd160.c
234
R(a, b, c, d, e, F3, K3, 14, 11);
sys/crypto/rmd160.c
235
R(e, a, b, c, d, F3, K3, 15, 10);
sys/crypto/rmd160.c
236
R(d, e, a, b, c, F3, K3, 14, 0);
sys/crypto/rmd160.c
237
R(c, d, e, a, b, F3, K3, 15, 8);
sys/crypto/rmd160.c
238
R(b, c, d, e, a, F3, K3, 9, 12);
sys/crypto/rmd160.c
239
R(a, b, c, d, e, F3, K3, 8, 4);
sys/crypto/rmd160.c
240
R(e, a, b, c, d, F3, K3, 9, 13);
sys/crypto/rmd160.c
241
R(d, e, a, b, c, F3, K3, 14, 3);
sys/crypto/rmd160.c
242
R(c, d, e, a, b, F3, K3, 5, 7);
sys/crypto/rmd160.c
243
R(b, c, d, e, a, F3, K3, 6, 15);
sys/crypto/rmd160.c
244
R(a, b, c, d, e, F3, K3, 8, 14);
sys/crypto/rmd160.c
245
R(e, a, b, c, d, F3, K3, 6, 5);
sys/crypto/rmd160.c
246
R(d, e, a, b, c, F3, K3, 5, 6);
sys/crypto/rmd160.c
247
R(c, d, e, a, b, F3, K3, 12, 2); /* #63 */
sys/crypto/rmd160.c
249
R(b, c, d, e, a, F4, K4, 9, 4);
sys/crypto/rmd160.c
250
R(a, b, c, d, e, F4, K4, 15, 0);
sys/crypto/rmd160.c
251
R(e, a, b, c, d, F4, K4, 5, 5);
sys/crypto/rmd160.c
252
R(d, e, a, b, c, F4, K4, 11, 9);
sys/crypto/rmd160.c
253
R(c, d, e, a, b, F4, K4, 6, 7);
sys/crypto/rmd160.c
254
R(b, c, d, e, a, F4, K4, 8, 12);
sys/crypto/rmd160.c
255
R(a, b, c, d, e, F4, K4, 13, 2);
sys/crypto/rmd160.c
256
R(e, a, b, c, d, F4, K4, 12, 10);
sys/crypto/rmd160.c
257
R(d, e, a, b, c, F4, K4, 5, 14);
sys/crypto/rmd160.c
258
R(c, d, e, a, b, F4, K4, 12, 1);
sys/crypto/rmd160.c
259
R(b, c, d, e, a, F4, K4, 13, 3);
sys/crypto/rmd160.c
260
R(a, b, c, d, e, F4, K4, 14, 8);
sys/crypto/rmd160.c
261
R(e, a, b, c, d, F4, K4, 11, 11);
sys/crypto/rmd160.c
262
R(d, e, a, b, c, F4, K4, 8, 6);
sys/crypto/rmd160.c
263
R(c, d, e, a, b, F4, K4, 5, 15);
sys/crypto/rmd160.c
264
R(b, c, d, e, a, F4, K4, 6, 13); /* #79 */
sys/crypto/rmd160.c
266
aa = a ; bb = b; cc = c; dd = d; ee = e;
sys/crypto/rmd160.c
270
c = state[2];
sys/crypto/rmd160.c
275
R(a, b, c, d, e, F4, KK0, 8, 5);
sys/crypto/rmd160.c
276
R(e, a, b, c, d, F4, KK0, 9, 14);
sys/crypto/rmd160.c
277
R(d, e, a, b, c, F4, KK0, 9, 7);
sys/crypto/rmd160.c
278
R(c, d, e, a, b, F4, KK0, 11, 0);
sys/crypto/rmd160.c
279
R(b, c, d, e, a, F4, KK0, 13, 9);
sys/crypto/rmd160.c
280
R(a, b, c, d, e, F4, KK0, 15, 2);
sys/crypto/rmd160.c
281
R(e, a, b, c, d, F4, KK0, 15, 11);
sys/crypto/rmd160.c
282
R(d, e, a, b, c, F4, KK0, 5, 4);
sys/crypto/rmd160.c
283
R(c, d, e, a, b, F4, KK0, 7, 13);
sys/crypto/rmd160.c
284
R(b, c, d, e, a, F4, KK0, 7, 6);
sys/crypto/rmd160.c
285
R(a, b, c, d, e, F4, KK0, 8, 15);
sys/crypto/rmd160.c
286
R(e, a, b, c, d, F4, KK0, 11, 8);
sys/crypto/rmd160.c
287
R(d, e, a, b, c, F4, KK0, 14, 1);
sys/crypto/rmd160.c
288
R(c, d, e, a, b, F4, KK0, 14, 10);
sys/crypto/rmd160.c
289
R(b, c, d, e, a, F4, KK0, 12, 3);
sys/crypto/rmd160.c
290
R(a, b, c, d, e, F4, KK0, 6, 12); /* #15 */
sys/crypto/rmd160.c
292
R(e, a, b, c, d, F3, KK1, 9, 6);
sys/crypto/rmd160.c
293
R(d, e, a, b, c, F3, KK1, 13, 11);
sys/crypto/rmd160.c
294
R(c, d, e, a, b, F3, KK1, 15, 3);
sys/crypto/rmd160.c
295
R(b, c, d, e, a, F3, KK1, 7, 7);
sys/crypto/rmd160.c
296
R(a, b, c, d, e, F3, KK1, 12, 0);
sys/crypto/rmd160.c
297
R(e, a, b, c, d, F3, KK1, 8, 13);
sys/crypto/rmd160.c
298
R(d, e, a, b, c, F3, KK1, 9, 5);
sys/crypto/rmd160.c
299
R(c, d, e, a, b, F3, KK1, 11, 10);
sys/crypto/rmd160.c
300
R(b, c, d, e, a, F3, KK1, 7, 14);
sys/crypto/rmd160.c
301
R(a, b, c, d, e, F3, KK1, 7, 15);
sys/crypto/rmd160.c
302
R(e, a, b, c, d, F3, KK1, 12, 8);
sys/crypto/rmd160.c
303
R(d, e, a, b, c, F3, KK1, 7, 12);
sys/crypto/rmd160.c
304
R(c, d, e, a, b, F3, KK1, 6, 4);
sys/crypto/rmd160.c
305
R(b, c, d, e, a, F3, KK1, 15, 9);
sys/crypto/rmd160.c
306
R(a, b, c, d, e, F3, KK1, 13, 1);
sys/crypto/rmd160.c
307
R(e, a, b, c, d, F3, KK1, 11, 2); /* #31 */
sys/crypto/rmd160.c
309
R(d, e, a, b, c, F2, KK2, 9, 15);
sys/crypto/rmd160.c
310
R(c, d, e, a, b, F2, KK2, 7, 5);
sys/crypto/rmd160.c
311
R(b, c, d, e, a, F2, KK2, 15, 1);
sys/crypto/rmd160.c
312
R(a, b, c, d, e, F2, KK2, 11, 3);
sys/crypto/rmd160.c
313
R(e, a, b, c, d, F2, KK2, 8, 7);
sys/crypto/rmd160.c
314
R(d, e, a, b, c, F2, KK2, 6, 14);
sys/crypto/rmd160.c
315
R(c, d, e, a, b, F2, KK2, 6, 6);
sys/crypto/rmd160.c
316
R(b, c, d, e, a, F2, KK2, 14, 9);
sys/crypto/rmd160.c
317
R(a, b, c, d, e, F2, KK2, 12, 11);
sys/crypto/rmd160.c
318
R(e, a, b, c, d, F2, KK2, 13, 8);
sys/crypto/rmd160.c
319
R(d, e, a, b, c, F2, KK2, 5, 12);
sys/crypto/rmd160.c
320
R(c, d, e, a, b, F2, KK2, 14, 2);
sys/crypto/rmd160.c
321
R(b, c, d, e, a, F2, KK2, 13, 10);
sys/crypto/rmd160.c
322
R(a, b, c, d, e, F2, KK2, 13, 0);
sys/crypto/rmd160.c
323
R(e, a, b, c, d, F2, KK2, 7, 4);
sys/crypto/rmd160.c
324
R(d, e, a, b, c, F2, KK2, 5, 13); /* #47 */
sys/crypto/rmd160.c
326
R(c, d, e, a, b, F1, KK3, 15, 8);
sys/crypto/rmd160.c
327
R(b, c, d, e, a, F1, KK3, 5, 6);
sys/crypto/rmd160.c
328
R(a, b, c, d, e, F1, KK3, 8, 4);
sys/crypto/rmd160.c
329
R(e, a, b, c, d, F1, KK3, 11, 1);
sys/crypto/rmd160.c
330
R(d, e, a, b, c, F1, KK3, 14, 3);
sys/crypto/rmd160.c
331
R(c, d, e, a, b, F1, KK3, 14, 11);
sys/crypto/rmd160.c
332
R(b, c, d, e, a, F1, KK3, 6, 15);
sys/crypto/rmd160.c
333
R(a, b, c, d, e, F1, KK3, 14, 0);
sys/crypto/rmd160.c
334
R(e, a, b, c, d, F1, KK3, 6, 5);
sys/crypto/rmd160.c
335
R(d, e, a, b, c, F1, KK3, 9, 12);
sys/crypto/rmd160.c
336
R(c, d, e, a, b, F1, KK3, 12, 2);
sys/crypto/rmd160.c
337
R(b, c, d, e, a, F1, KK3, 9, 13);
sys/crypto/rmd160.c
338
R(a, b, c, d, e, F1, KK3, 12, 9);
sys/crypto/rmd160.c
339
R(e, a, b, c, d, F1, KK3, 5, 7);
sys/crypto/rmd160.c
340
R(d, e, a, b, c, F1, KK3, 15, 10);
sys/crypto/rmd160.c
341
R(c, d, e, a, b, F1, KK3, 8, 14); /* #63 */
sys/crypto/rmd160.c
343
R(b, c, d, e, a, F0, KK4, 8, 12);
sys/crypto/rmd160.c
344
R(a, b, c, d, e, F0, KK4, 5, 15);
sys/crypto/rmd160.c
345
R(e, a, b, c, d, F0, KK4, 12, 10);
sys/crypto/rmd160.c
346
R(d, e, a, b, c, F0, KK4, 9, 4);
sys/crypto/rmd160.c
347
R(c, d, e, a, b, F0, KK4, 12, 1);
sys/crypto/rmd160.c
348
R(b, c, d, e, a, F0, KK4, 5, 5);
sys/crypto/rmd160.c
349
R(a, b, c, d, e, F0, KK4, 14, 8);
sys/crypto/rmd160.c
350
R(e, a, b, c, d, F0, KK4, 6, 7);
sys/crypto/rmd160.c
351
R(d, e, a, b, c, F0, KK4, 8, 6);
sys/crypto/rmd160.c
352
R(c, d, e, a, b, F0, KK4, 13, 2);
sys/crypto/rmd160.c
353
R(b, c, d, e, a, F0, KK4, 6, 13);
sys/crypto/rmd160.c
354
R(a, b, c, d, e, F0, KK4, 5, 14);
sys/crypto/rmd160.c
355
R(e, a, b, c, d, F0, KK4, 15, 0);
sys/crypto/rmd160.c
356
R(d, e, a, b, c, F0, KK4, 13, 3);
sys/crypto/rmd160.c
357
R(c, d, e, a, b, F0, KK4, 11, 9);
sys/crypto/rmd160.c
358
R(b, c, d, e, a, F0, KK4, 11, 11); /* #79 */
sys/crypto/rmd160.c
364
state[4] = state[0] + bb + c;
sys/crypto/rmd160.c
78
#define R(a, b, c, d, e, Fj, Kj, sj, rj) \
sys/crypto/rmd160.c
80
a = ROL(sj, a + Fj(b,c,d) + X(rj) + Kj) + e; \
sys/crypto/rmd160.c
81
c = ROL(10, c); \
sys/crypto/set_key.c
142
register u_int32_t c, d, t, s;
sys/crypto/set_key.c
158
c2l(in, c);
sys/crypto/set_key.c
177
PERM_OP (d, c, t, 4, 0x0f0f0f0fL);
sys/crypto/set_key.c
178
HPERM_OP(c, t, -2, 0xcccc0000L);
sys/crypto/set_key.c
180
PERM_OP (d, c, t, 1, 0x55555555L);
sys/crypto/set_key.c
181
PERM_OP (c, d, t, 8, 0x00ff00ffL);
sys/crypto/set_key.c
182
PERM_OP (d, c, t, 1, 0x55555555L);
sys/crypto/set_key.c
184
((d & 0x00ff0000L) >> 16L) | ((c & 0xf0000000L) >> 4L));
sys/crypto/set_key.c
185
c &= 0x0fffffffL;
sys/crypto/set_key.c
189
{ c = ((c >> 2L) | (c << 26L)); d = ((d >> 2L) | (d << 26L)); }
sys/crypto/set_key.c
191
{ c = ((c >> 1L) | (c << 27L)); d = ((d >> 1L) | (d << 27L)); }
sys/crypto/set_key.c
192
c &= 0x0fffffffL;
sys/crypto/set_key.c
196
s = des_skb[0][ (c ) & 0x3f ]|
sys/crypto/set_key.c
197
des_skb[1][((c >> 6) & 0x03) | ((c >> 7L) & 0x3c)]|
sys/crypto/set_key.c
198
des_skb[2][((c >> 13) & 0x0f) | ((c >> 14L) & 0x30)]|
sys/crypto/set_key.c
199
des_skb[3][((c >> 20) & 0x01) | ((c >> 21L) & 0x06) |
sys/crypto/set_key.c
200
((c >> 22L) & 0x38)];
sys/crypto/sha1.c
102
a = b = c = d = e = 0;
sys/crypto/sha1.c
52
u_int32_t a, b, c, d, e;
sys/crypto/sha1.c
54
unsigned char c[64];
sys/crypto/sha1.c
69
c = state[2];
sys/crypto/sha1.c
74
R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
sys/crypto/sha1.c
75
R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
sys/crypto/sha1.c
76
R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
sys/crypto/sha1.c
77
R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
sys/crypto/sha1.c
78
R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
sys/crypto/sha1.c
79
R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
sys/crypto/sha1.c
80
R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
sys/crypto/sha1.c
81
R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
sys/crypto/sha1.c
82
R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
sys/crypto/sha1.c
83
R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
sys/crypto/sha1.c
84
R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
sys/crypto/sha1.c
85
R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
sys/crypto/sha1.c
86
R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
sys/crypto/sha1.c
87
R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
sys/crypto/sha1.c
88
R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
sys/crypto/sha1.c
89
R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
sys/crypto/sha1.c
90
R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
sys/crypto/sha1.c
91
R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
sys/crypto/sha1.c
92
R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
sys/crypto/sha1.c
93
R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
sys/crypto/sha1.c
98
state[2] += c;
sys/crypto/sha2.c
269
#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) do { \
sys/crypto/sha2.c
275
(h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
sys/crypto/sha2.c
279
#define ROUND256(a,b,c,d,e,f,g,h) do { \
sys/crypto/sha2.c
287
(h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
sys/crypto/sha2.c
294
u_int32_t a, b, c, d, e, f, g, h, s0, s1;
sys/crypto/sha2.c
301
c = state[2];
sys/crypto/sha2.c
311
ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
sys/crypto/sha2.c
312
ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
sys/crypto/sha2.c
313
ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
sys/crypto/sha2.c
314
ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
sys/crypto/sha2.c
315
ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
sys/crypto/sha2.c
316
ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
sys/crypto/sha2.c
317
ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
sys/crypto/sha2.c
318
ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
sys/crypto/sha2.c
323
ROUND256(a,b,c,d,e,f,g,h);
sys/crypto/sha2.c
324
ROUND256(h,a,b,c,d,e,f,g);
sys/crypto/sha2.c
325
ROUND256(g,h,a,b,c,d,e,f);
sys/crypto/sha2.c
326
ROUND256(f,g,h,a,b,c,d,e);
sys/crypto/sha2.c
327
ROUND256(e,f,g,h,a,b,c,d);
sys/crypto/sha2.c
328
ROUND256(d,e,f,g,h,a,b,c);
sys/crypto/sha2.c
329
ROUND256(c,d,e,f,g,h,a,b);
sys/crypto/sha2.c
330
ROUND256(b,c,d,e,f,g,h,a);
sys/crypto/sha2.c
336
state[2] += c;
sys/crypto/sha2.c
344
a = b = c = d = e = f = g = h = T1 = 0;
sys/crypto/sha2.c
352
u_int32_t a, b, c, d, e, f, g, h, s0, s1;
sys/crypto/sha2.c
359
c = state[2];
sys/crypto/sha2.c
373
T2 = Sigma0_256(a) + Maj(a, b, c);
sys/crypto/sha2.c
378
d = c;
sys/crypto/sha2.c
379
c = b;
sys/crypto/sha2.c
396
T2 = Sigma0_256(a) + Maj(a, b, c);
sys/crypto/sha2.c
401
d = c;
sys/crypto/sha2.c
402
c = b;
sys/crypto/sha2.c
412
state[2] += c;
sys/crypto/sha2.c
420
a = b = c = d = e = f = g = h = T1 = T2 = 0;
sys/crypto/sha2.c
545
#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) do { \
sys/crypto/sha2.c
553
(h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
sys/crypto/sha2.c
558
#define ROUND512(a,b,c,d,e,f,g,h) do { \
sys/crypto/sha2.c
566
(h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
sys/crypto/sha2.c
573
u_int64_t a, b, c, d, e, f, g, h, s0, s1;
sys/crypto/sha2.c
580
c = state[2];
sys/crypto/sha2.c
589
ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
sys/crypto/sha2.c
590
ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
sys/crypto/sha2.c
591
ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
sys/crypto/sha2.c
592
ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
sys/crypto/sha2.c
593
ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
sys/crypto/sha2.c
594
ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
sys/crypto/sha2.c
595
ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
sys/crypto/sha2.c
596
ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
sys/crypto/sha2.c
601
ROUND512(a,b,c,d,e,f,g,h);
sys/crypto/sha2.c
602
ROUND512(h,a,b,c,d,e,f,g);
sys/crypto/sha2.c
603
ROUND512(g,h,a,b,c,d,e,f);
sys/crypto/sha2.c
604
ROUND512(f,g,h,a,b,c,d,e);
sys/crypto/sha2.c
605
ROUND512(e,f,g,h,a,b,c,d);
sys/crypto/sha2.c
606
ROUND512(d,e,f,g,h,a,b,c);
sys/crypto/sha2.c
607
ROUND512(c,d,e,f,g,h,a,b);
sys/crypto/sha2.c
608
ROUND512(b,c,d,e,f,g,h,a);
sys/crypto/sha2.c
614
state[2] += c;
sys/crypto/sha2.c
622
a = b = c = d = e = f = g = h = T1 = 0;
sys/crypto/sha2.c
630
u_int64_t a, b, c, d, e, f, g, h, s0, s1;
sys/crypto/sha2.c
637
c = state[2];
sys/crypto/sha2.c
653
T2 = Sigma0_512(a) + Maj(a, b, c);
sys/crypto/sha2.c
658
d = c;
sys/crypto/sha2.c
659
c = b;
sys/crypto/sha2.c
676
T2 = Sigma0_512(a) + Maj(a, b, c);
sys/crypto/sha2.c
681
d = c;
sys/crypto/sha2.c
682
c = b;
sys/crypto/sha2.c
692
state[2] += c;
sys/crypto/sha2.c
700
a = b = c = d = e = f = g = h = T1 = T2 = 0;
sys/ddb/db_command.c
158
int c;
sys/ddb/db_command.c
160
while ((c = *lp) == *rp) {
sys/ddb/db_command.c
161
if (c == 0) {
sys/ddb/db_command.c
169
if (c == 0) {
sys/ddb/db_examine.c
101
switch (c) {
sys/ddb/db_examine.c
211
dis = c;
sys/ddb/db_examine.c
74
int i, c;
sys/ddb/db_examine.c
93
while ((c = *fp++) != 0) {
sys/ddb/db_hangman.c
118
int c;
sys/ddb/db_hangman.c
128
c = TOLOWER(*p);
sys/ddb/db_hangman.c
129
cnputc(ISLOWALPHA(c) && ABC_ISCLR(c) ? '-' : *p);
sys/ddb/db_hangman.c
159
int skill, c;
sys/ddb/db_hangman.c
178
c = cngetc();
sys/ddb/db_hangman.c
179
c = TOLOWER(c);
sys/ddb/db_hangman.c
181
if (ISLOWALPHA(c) && ABC_ISCLR(c)) {
sys/ddb/db_hangman.c
187
if (TOLOWER(*p) == c)
sys/ddb/db_hangman.c
191
ABC_SETRIGHT(c);
sys/ddb/db_hangman.c
194
ABC_SETWRONG(c);
sys/ddb/db_hangman.c
39
#define ABC_ISCLR(c) sabc->abc[(c)-'a']==0
sys/ddb/db_hangman.c
40
#define ABC_ISWRONG(c) sabc->abc[(c)-'a']=='_'
sys/ddb/db_hangman.c
41
#define ABC_SETWRONG(c) (sabc->abc[(c)-'a']='_')
sys/ddb/db_hangman.c
42
#define ABC_SETRIGHT(c) (sabc->abc[(c)-'a']='+')
sys/ddb/db_hangman.c
48
#define TOLOWER(c) ((c)|0x20)
sys/ddb/db_hangman.c
49
#define ISLOWALPHA(c) ('a'<=(c) && (c)<='z')
sys/ddb/db_hangman.c
50
#define ISALPHA(c) ISLOWALPHA(TOLOWER(c))
sys/ddb/db_input.c
142
db_inputchar(int c)
sys/ddb/db_input.c
144
switch (c) {
sys/ddb/db_input.c
204
c = db_lc[-2];
sys/ddb/db_input.c
206
db_lc[-1] = c;
sys/ddb/db_input.c
295
*db_le++ = c;
sys/ddb/db_input.c
314
*db_le++ = c;
sys/ddb/db_input.c
319
} else if (c >= ' ' && c <= '~') {
sys/ddb/db_input.c
324
*db_lc++ = c;
sys/ddb/db_input.c
326
cnputc(c);
sys/ddb/db_input.c
73
#define CTRL(c) ((c) & 0x1f)
sys/ddb/db_input.c
74
#define isspace(c) ((c) == ' ' || (c) == '\t')
sys/ddb/db_input.c
86
db_putnchars(int c, int count)
sys/ddb/db_input.c
89
cnputc(c);
sys/ddb/db_lex.c
132
int c;
sys/ddb/db_lex.c
134
c = db_read_char();
sys/ddb/db_lex.c
135
while (c <= ' ' || c > '~') {
sys/ddb/db_lex.c
136
if (c == '\n' || c == -1)
sys/ddb/db_lex.c
138
c = db_read_char();
sys/ddb/db_lex.c
141
if (c >= '0' && c <= '9') {
sys/ddb/db_lex.c
145
if (c > '0')
sys/ddb/db_lex.c
148
c = db_read_char();
sys/ddb/db_lex.c
149
if (c == 'O' || c == 'o')
sys/ddb/db_lex.c
151
else if (c == 'T' || c == 't')
sys/ddb/db_lex.c
153
else if (c == 'X' || c == 'x')
sys/ddb/db_lex.c
157
db_unread_char(c);
sys/ddb/db_lex.c
159
c = db_read_char();
sys/ddb/db_lex.c
163
if (c >= '0' && c <= ((r == 8) ? '7' : '9'))
sys/ddb/db_lex.c
164
digit = c - '0';
sys/ddb/db_lex.c
165
else if (r == 16 && ((c >= 'A' && c <= 'F') ||
sys/ddb/db_lex.c
166
(c >= 'a' && c <= 'f'))) {
sys/ddb/db_lex.c
167
if (c >= 'a')
sys/ddb/db_lex.c
168
digit = c - 'a' + 10;
sys/ddb/db_lex.c
169
else if (c >= 'A')
sys/ddb/db_lex.c
170
digit = c - 'A' + 10;
sys/ddb/db_lex.c
174
c = db_read_char();
sys/ddb/db_lex.c
176
if ((c >= '0' && c <= '9') ||
sys/ddb/db_lex.c
177
(c >= 'A' && c <= 'Z') ||
sys/ddb/db_lex.c
178
(c >= 'a' && c <= 'z') ||
sys/ddb/db_lex.c
179
(c == '_')) {
sys/ddb/db_lex.c
183
db_unread_char(c);
sys/ddb/db_lex.c
186
if ((c >= 'A' && c <= 'Z') ||
sys/ddb/db_lex.c
187
(c >= 'a' && c <= 'z') ||
sys/ddb/db_lex.c
188
c == '_' || c == '\\') {
sys/ddb/db_lex.c
193
if (c == '\\') {
sys/ddb/db_lex.c
194
c = db_read_char();
sys/ddb/db_lex.c
195
if (c == '\n' || c == -1) {
sys/ddb/db_lex.c
200
*cp++ = c;
sys/ddb/db_lex.c
202
c = db_read_char();
sys/ddb/db_lex.c
203
if ((c >= 'A' && c <= 'Z') ||
sys/ddb/db_lex.c
204
(c >= 'a' && c <= 'z') ||
sys/ddb/db_lex.c
205
(c >= '0' && c <= '9') ||
sys/ddb/db_lex.c
206
c == '_' || c == '\\' || c == ':') {
sys/ddb/db_lex.c
207
if (c == '\\') {
sys/ddb/db_lex.c
208
c = db_read_char();
sys/ddb/db_lex.c
209
if (c == '\n' || c == -1) {
sys/ddb/db_lex.c
214
*cp++ = c;
sys/ddb/db_lex.c
225
db_unread_char(c);
sys/ddb/db_lex.c
229
switch (c) {
sys/ddb/db_lex.c
235
c = db_read_char();
sys/ddb/db_lex.c
236
if (c == '.')
sys/ddb/db_lex.c
238
db_unread_char(c);
sys/ddb/db_lex.c
263
c = db_read_char();
sys/ddb/db_lex.c
264
if (c == '<')
sys/ddb/db_lex.c
266
db_unread_char(c);
sys/ddb/db_lex.c
269
c = db_read_char();
sys/ddb/db_lex.c
270
if (c == '>')
sys/ddb/db_lex.c
272
db_unread_char(c);
sys/ddb/db_lex.c
82
int c;
sys/ddb/db_lex.c
85
c = db_look_char;
sys/ddb/db_lex.c
88
c = -1;
sys/ddb/db_lex.c
90
c = *db_lp++;
sys/ddb/db_lex.c
91
return (c);
sys/ddb/db_lex.c
95
db_unread_char(int c)
sys/ddb/db_lex.c
97
db_look_char = c;
sys/ddb/db_output.c
142
db_putchar(int c)
sys/ddb/db_output.c
147
if (c > ' ' && c <= '~') {
sys/ddb/db_output.c
154
cnputc(c);
sys/ddb/db_output.c
165
} else if (c == '\n') {
sys/ddb/db_output.c
167
cnputc(c);
sys/ddb/db_output.c
171
} else if (c == '\t') {
sys/ddb/db_output.c
174
} else if (c == ' ') {
sys/ddb/db_output.c
177
} else if (c == '\007') {
sys/ddb/db_output.c
179
cnputc(c);
sys/ddb/db_output.c
70
#define CTRL(c) ((c) & 0xff)
sys/ddb/db_rint.c
44
db_rint(int c)
sys/ddb/db_rint.c
48
if (ddbescape && ((c & 0x7f) == 'D')) {
sys/ddb/db_rint.c
55
if ((ddbescape == 0) && ((c & 0x7f) == 27)) {
sys/ddb/db_sym.c
85
db_eqname(const char *src, const char *dst, int c)
sys/ddb/db_sym.c
89
if (src[0] == c)
sys/dev/acpi/acpicpu_x86.c
950
int i, c, cf;
sys/dev/acpi/acpicpu_x86.c
963
c = 0;
sys/dev/acpi/acpicpu_x86.c
970
if (cf == sc->sc_pss[c].pss_core_freq) {
sys/dev/acpi/acpicpu_x86.c
982
sc->sc_pss[c].pss_core_freq = cf;
sys/dev/acpi/acpicpu_x86.c
983
sc->sc_pss[c].pss_power = aml_val2int(
sys/dev/acpi/acpicpu_x86.c
985
sc->sc_pss[c].pss_trans_latency = aml_val2int(
sys/dev/acpi/acpicpu_x86.c
987
sc->sc_pss[c].pss_bus_latency = aml_val2int(
sys/dev/acpi/acpicpu_x86.c
989
sc->sc_pss[c].pss_ctrl = aml_val2int(
sys/dev/acpi/acpicpu_x86.c
991
sc->sc_pss[c].pss_status = aml_val2int(
sys/dev/acpi/acpicpu_x86.c
993
c++;
sys/dev/acpi/acpicpu_x86.c
995
sc->sc_pss_len = c;
sys/dev/acpi/acpivar.h
46
#define ACPI_UUID(a, b, c, d, e) \
sys/dev/acpi/acpivar.h
48
(b), (b) >> 8, (c), (c) >> 8, (d) >> 8, (d), \
sys/dev/acpi/dsdt.c
2034
char c;
sys/dev/acpi/dsdt.c
2038
c = *(str++) - '0';
sys/dev/acpi/dsdt.c
2040
c = *(str++) - 'a' + 10;
sys/dev/acpi/dsdt.c
2042
c = *(str++) - 'A' + 10;
sys/dev/acpi/dsdt.c
2045
v = (v << 4) + c;
sys/dev/acpi/dsdt.c
2054
struct aml_value *c = NULL;
sys/dev/acpi/dsdt.c
2068
c = aml_allocvalue(AML_OBJTYPE_BUFFER, a->length,
sys/dev/acpi/dsdt.c
2072
c = aml_allocvalue(AML_OBJTYPE_BUFFER, a->length,
sys/dev/acpi/dsdt.c
2077
c = aml_allocvalue(AML_OBJTYPE_BUFFER, 0, NULL);
sys/dev/acpi/dsdt.c
2078
aml_rwfield(a, 0, a->v_field.bitlen, c, ACPI_IOREAD);
sys/dev/acpi/dsdt.c
2086
c = aml_allocvalue(AML_OBJTYPE_INTEGER, 0, NULL);
sys/dev/acpi/dsdt.c
2087
memcpy(&c->v_integer, a->v_buffer,
sys/dev/acpi/dsdt.c
2088
min(a->length, c->length));
sys/dev/acpi/dsdt.c
2091
c = aml_allocvalue(AML_OBJTYPE_INTEGER, 0, NULL);
sys/dev/acpi/dsdt.c
2092
c->v_integer = aml_hextoint(a->v_string);
sys/dev/acpi/dsdt.c
2095
c = aml_allocvalue(AML_OBJTYPE_INTEGER, 0, NULL);
sys/dev/acpi/dsdt.c
2101
c = aml_allocvalue(AML_OBJTYPE_INTEGER, 0, NULL);
sys/dev/acpi/dsdt.c
2102
aml_rwfield(a, 0, a->v_field.bitlen, c, ACPI_IOREAD);
sys/dev/acpi/dsdt.c
2112
c = aml_allocvalue(AML_OBJTYPE_STRING, 20, NULL);
sys/dev/acpi/dsdt.c
2113
snprintf(c->v_string, c->length, (ctype == AML_OBJTYPE_HEXSTRING) ?
sys/dev/acpi/dsdt.c
2117
c = aml_allocvalue(AML_OBJTYPE_STRING, a->length,
sys/dev/acpi/dsdt.c
2124
c = aml_allocvalue(AML_OBJTYPE_STRING, 0, NULL);
sys/dev/acpi/dsdt.c
2129
return c;
sys/dev/acpi/dsdt.c
2135
struct aml_value *c;
sys/dev/acpi/dsdt.c
2137
c = aml_tryconv(a, ctype, clen);
sys/dev/acpi/dsdt.c
2138
if (c == NULL) {
sys/dev/acpi/dsdt.c
2144
return c;
sys/dev/acpi/dsdt.c
2194
struct aml_value *c = NULL;
sys/dev/acpi/dsdt.c
2208
c = aml_allocvalue(AML_OBJTYPE_BUFFER,
sys/dev/acpi/dsdt.c
2210
memcpy(c->v_buffer, &a1->v_integer, a1->length);
sys/dev/acpi/dsdt.c
2211
memcpy(c->v_buffer+a1->length, &a2->v_integer, a2->length);
sys/dev/acpi/dsdt.c
2214
c = aml_allocvalue(AML_OBJTYPE_BUFFER,
sys/dev/acpi/dsdt.c
2216
memcpy(c->v_buffer, a1->v_buffer, a1->length);
sys/dev/acpi/dsdt.c
2217
memcpy(c->v_buffer+a1->length, a2->v_buffer, a2->length);
sys/dev/acpi/dsdt.c
2220
c = aml_allocvalue(AML_OBJTYPE_STRING,
sys/dev/acpi/dsdt.c
2222
memcpy(c->v_string, a1->v_string, a1->length);
sys/dev/acpi/dsdt.c
2223
memcpy(c->v_string+a1->length, a2->v_string, a2->length);
sys/dev/acpi/dsdt.c
2231
return c;
sys/dev/acpi/dsdt.c
2248
struct aml_value *c;
sys/dev/acpi/dsdt.c
2260
c = aml_allocvalue(AML_OBJTYPE_BUFFER, l1+l2+l3, NULL);
sys/dev/acpi/dsdt.c
2261
memcpy(c->v_buffer, a1->v_buffer, l1);
sys/dev/acpi/dsdt.c
2262
memcpy(c->v_buffer+l1, a2->v_buffer, l2);
sys/dev/acpi/dsdt.c
2263
memcpy(c->v_buffer+l1+l2, a3, l3);
sys/dev/acpi/dsdt.c
2265
return c;
sys/dev/acpi/dsdt.c
3490
char c;
sys/dev/acpi/dsdt.c
3496
c = *(++ch);
sys/dev/acpi/dsdt.c
3497
switch (c) {
sys/dev/acpi/dsdt.c
3503
aml_parsesimple(scope, c, &tmp);
sys/dev/acpi/dsdt.c
3512
rv = aml_parsesimple(scope, c, NULL);
sys/dev/acpi/tpm.c
745
uint8_t c;
sys/dev/acpi/tpm.c
761
c = bus_space_read_1(sc->sc_bt, sc->sc_bh, TPM_DATA);
sys/dev/acpi/tpm.c
762
DPRINTF((" %02x", c));
sys/dev/acpi/tpm.c
763
*p++ = c;
sys/dev/adb/akbd.c
546
int c, j, s;
sys/dev/adb/akbd.c
550
c = keyboard[val];
sys/dev/adb/akbd.c
551
if (c == 0) {
sys/dev/adb/akbd.c
554
if (c & 0x80)
sys/dev/adb/akbd.c
556
cbuf[j] = c & 0x7f;
sys/dev/ata/wd.c
175
char buf[41], c, *p, *q;
sys/dev/ata/wd.c
198
c = *p++;
sys/dev/ata/wd.c
199
if (c == '\0')
sys/dev/ata/wd.c
201
if (c != ' ') {
sys/dev/ata/wd.c
206
*q++ = c;
sys/dev/audio.c
1859
audio_mixer_get(struct audio_softc *sc, struct mixer_ctrl *c)
sys/dev/audio.c
1861
if (c->dev < sc->mix_nent)
sys/dev/audio.c
1862
return sc->ops->get_port(sc->arg, c);
sys/dev/audio.c
1864
switch (c->dev - sc->mix_nent) {
sys/dev/audio.c
1868
c->un.ord = sc->record_enable;
sys/dev/audio.c
1878
audio_mixer_set(struct audio_softc *sc, struct mixer_ctrl *c, struct proc *p)
sys/dev/audio.c
1882
if (c->dev < sc->mix_nent) {
sys/dev/audio.c
1883
error = sc->ops->set_port(sc->arg, c);
sys/dev/audio.c
1888
audio_event(sc, c->dev);
sys/dev/audio.c
1892
switch (c->dev - sc->mix_nent) {
sys/dev/audio.c
1896
switch (c->un.ord) {
sys/dev/audio.c
1905
sc->record_enable = c->un.ord;
sys/dev/cons.c
210
cnputc(int c)
sys/dev/cons.c
216
if (c) {
sys/dev/cons.c
217
(*cn_tab->cn_putc)(cn_tab->cn_dev, c);
sys/dev/cons.c
218
if (c == '\n')
sys/dev/fdt/amluart.c
202
u_char c;
sys/dev/fdt/amluart.c
220
c = HREAD4(sc, UART_RFIFO);
sys/dev/fdt/amluart.c
222
c |= TTY_FE;
sys/dev/fdt/amluart.c
224
c |= TTY_PE;
sys/dev/fdt/amluart.c
231
*p++ = c;
sys/dev/fdt/amluart.c
600
uint8_t c;
sys/dev/fdt/amluart.c
605
c = bus_space_read_4(amluartconsiot, amluartconsioh, UART_RFIFO);
sys/dev/fdt/amluart.c
606
return c;
sys/dev/fdt/amluart.c
610
amluartcnputc(dev_t dev, int c)
sys/dev/fdt/amluart.c
615
bus_space_write_4(amluartconsiot, amluartconsioh, UART_WFIFO, c);
sys/dev/fdt/cduart.c
274
int c, handled = 0;
sys/dev/fdt/cduart.c
294
c = cduart_read(sc, CDUART_FIFO) & 0xff;
sys/dev/fdt/cduart.c
297
*ibufp++ = c;
sys/dev/fdt/cduart.c
675
uint8_t c;
sys/dev/fdt/cduart.c
681
c = bus_space_read_4(cduartconsiot, cduartconsioh, CDUART_FIFO);
sys/dev/fdt/cduart.c
684
return c;
sys/dev/fdt/cduart.c
688
cduartcnputc(dev_t dev, int c)
sys/dev/fdt/cduart.c
696
bus_space_write_4(cduartconsiot, cduartconsioh, CDUART_FIFO, c);
sys/dev/fdt/exuart.c
1041
int c;
sys/dev/fdt/exuart.c
1049
c = bus_space_read_4(exuartconsiot, exuartconsioh, EXUART_URXH);
sys/dev/fdt/exuart.c
105
void exuartcnputc(dev_t dev, int c);
sys/dev/fdt/exuart.c
1051
return c;
sys/dev/fdt/exuart.c
1055
exuartcnputc(dev_t dev, int c)
sys/dev/fdt/exuart.c
1062
bus_space_write_4(exuartconsiot, exuartconsioh, EXUART_UTXH, c);
sys/dev/fdt/exuart.c
287
u_int16_t c;
sys/dev/fdt/exuart.c
293
c = bus_space_read_4(iot, ioh, EXUART_URXH);
sys/dev/fdt/exuart.c
299
*p++ = c;
sys/dev/fdt/exuart.c
359
c = bus_space_read_4(iot, ioh, EXUART_URXH);
sys/dev/fdt/exuart.c
365
*p++ = c;
sys/dev/fdt/exuart.c
608
int c;
sys/dev/fdt/exuart.c
650
c = *ibufp++;
sys/dev/fdt/exuart.c
652
if (ISSET(c, EXUART_UERSTAT_OVERRUN)) {
sys/dev/fdt/exuart.c
660
if (ISSET(c, EXUART_UERSTAT_PARITY))
sys/dev/fdt/exuart.c
662
if (ISSET(c, EXUART_UERSTAT_FRAME))
sys/dev/fdt/exuart.c
665
c = (c & 0xff) | err;
sys/dev/fdt/exuart.c
666
(*linesw[tp->t_line].l_rint)(c, tp);
sys/dev/fdt/if_cad.c
1889
const struct cad_counter *c;
sys/dev/fdt/if_cad.c
1904
c = &cad_counters[i];
sys/dev/fdt/if_cad.c
1905
kstat_kv_unit_init(&kvs[i], c->c_name, KSTAT_KV_T_COUNTER64,
sys/dev/fdt/if_cad.c
1906
c->c_unit);
sys/dev/fdt/if_cad.c
1922
const struct cad_counter *c;
sys/dev/fdt/if_cad.c
1937
c = &cad_counters[i];
sys/dev/fdt/if_cad.c
1938
if (c->c_reg == 0)
sys/dev/fdt/if_cad.c
1940
kstat_kv_u64(&kvs[i]) += HREAD4(sc, c->c_reg);
sys/dev/fdt/if_mvneta.c
1927
const struct mvneta_counter *c = &mvneta_counters[i];
sys/dev/fdt/if_mvneta.c
1928
if (c->reg == 0)
sys/dev/fdt/if_mvneta.c
1931
kstat_kv_u64(&kvs[i]) += (uint64_t)MVNETA_READ(sc, c->reg);
sys/dev/fdt/if_mvneta.c
1982
const struct mvneta_counter *c = &mvneta_counters[i];
sys/dev/fdt/if_mvneta.c
1983
kstat_kv_unit_init(&kvs[i], c->name,
sys/dev/fdt/if_mvneta.c
1984
KSTAT_KV_T_COUNTER64, c->unit);
sys/dev/fdt/if_mvneta.c
88
#define MVNETA_READ_FILTER(sc, reg, val, c) \
sys/dev/fdt/if_mvneta.c
89
bus_space_read_region_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val), (c))
sys/dev/fdt/if_mvneta.c
90
#define MVNETA_WRITE_FILTER(sc, reg, val, c) \
sys/dev/fdt/if_mvneta.c
91
bus_space_write_region_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val), (c))
sys/dev/fdt/if_mvnetareg.h
508
#define MVNETA_PRXF01_PREFETCHCOMMAND0(c) (((c) & 0xffff) << 0) xxxx
sys/dev/fdt/if_mvnetareg.h
509
#define MVNETA_PRXF01_PREFETCHCOMMAND1(c) (((c) & 0xffff) << 16) xxxx
sys/dev/fdt/imxuart.c
206
u_int16_t c;
sys/dev/fdt/imxuart.c
225
c = bus_space_read_2(iot, ioh, IMXUART_URXD);
sys/dev/fdt/imxuart.c
226
if (ISSET(c, IMXUART_RX_BRK)) {
sys/dev/fdt/imxuart.c
234
c &= ~0xff;
sys/dev/fdt/imxuart.c
241
*p++ = c;
sys/dev/fdt/imxuart.c
425
int c;
sys/dev/fdt/imxuart.c
459
c = *ibufp++;
sys/dev/fdt/imxuart.c
460
if (ISSET(c, IMXUART_RX_OVERRUN)) {
sys/dev/fdt/imxuart.c
468
if (ISSET(c, IMXUART_RX_PRERR))
sys/dev/fdt/imxuart.c
470
if (ISSET(c, IMXUART_RX_FRMERR))
sys/dev/fdt/imxuart.c
472
c = (c & 0xff) | err;
sys/dev/fdt/imxuart.c
473
(*linesw[tp->t_line].l_rint)(c, tp);
sys/dev/fdt/imxuart.c
844
int c;
sys/dev/fdt/imxuart.c
850
c = bus_space_read_1(imxuartconsiot, imxuartconsioh, IMXUART_URXD);
sys/dev/fdt/imxuart.c
852
return c;
sys/dev/fdt/imxuart.c
856
imxuartcnputc(dev_t dev, int c)
sys/dev/fdt/imxuart.c
860
bus_space_write_1(imxuartconsiot, imxuartconsioh, IMXUART_UTXD, (uint8_t)c);
sys/dev/fdt/imxuart.c
96
void imxuartcnputc(dev_t dev, int c);
sys/dev/fdt/mvuart.c
223
uint16_t *p, c;
sys/dev/fdt/mvuart.c
229
c = HREAD4(sc, MVUART_RBR);
sys/dev/fdt/mvuart.c
230
c |= (stat & MVUART_STAT_STD_ERROR_MASK) << 8;
sys/dev/fdt/mvuart.c
234
*p++ = c;
sys/dev/fdt/mvuart.c
348
int c, err, s;
sys/dev/fdt/mvuart.c
373
c = *ibufp++;
sys/dev/fdt/mvuart.c
374
if (ISSET(c, (MVUART_STAT_STD_PAR_ERR << 8)))
sys/dev/fdt/mvuart.c
376
if (ISSET(c, (MVUART_STAT_STD_FRM_ERR << 8)))
sys/dev/fdt/mvuart.c
378
c = (c & 0xff) | err;
sys/dev/fdt/mvuart.c
379
(*linesw[tp->t_line].l_rint)(c, tp);
sys/dev/fdt/mvuart.c
636
int c;
sys/dev/fdt/mvuart.c
642
c = bus_space_read_4(mvuartconsiot, mvuartconsioh, MVUART_RBR);
sys/dev/fdt/mvuart.c
644
return c;
sys/dev/fdt/mvuart.c
648
mvuartcnputc(dev_t dev, int c)
sys/dev/fdt/mvuart.c
655
bus_space_write_4(mvuartconsiot, mvuartconsioh, MVUART_TSH, (uint8_t)c);
sys/dev/fdt/mvuart.c
99
void mvuartcnputc(dev_t dev, int c);
sys/dev/fdt/rkusbphy.c
329
const struct rkusbphy_chip *c = &id->id_chips[i];
sys/dev/fdt/rkusbphy.c
330
if (faa->fa_reg[0].addr == c->c_base_addr) {
sys/dev/fdt/rkusbphy.c
332
sc->sc_regs = c->c_regs;
sys/dev/hid/hid.c
100
if (c->report_ID == nextid)
sys/dev/hid/hid.c
104
if (c->report_ID == 0) {
sys/dev/hid/hid.c
108
if (s->last_pos[i].rid == c->report_ID)
sys/dev/hid/hid.c
115
s->last_pos[i].rid = c->report_ID;
sys/dev/hid/hid.c
116
s->last_pos[i].pos = c->loc.pos;
sys/dev/hid/hid.c
120
c->report_ID = nextid;
sys/dev/hid/hid.c
135
c->loc.pos = s->last_pos[i].pos;
sys/dev/hid/hid.c
138
c->loc.pos = 0;
sys/dev/hid/hid.c
194
struct hid_item *c;
sys/dev/hid/hid.c
205
c = &s->cur[s->pushlevel];
sys/dev/hid/hid.c
215
c->usage = dval;
sys/dev/hid/hid.c
232
if (s->kind == hid_all || s->kind == c->kind) {
sys/dev/hid/hid.c
233
*h = *c;
sys/dev/hid/hid.c
236
c->loc.pos += c->loc.size * c->loc.count;
sys/dev/hid/hid.c
248
hid_clear_local(c);
sys/dev/hid/hid.c
301
c->kind = hid_input;
sys/dev/hid/hid.c
303
c->flags = dval;
sys/dev/hid/hid.c
304
c->loc.count = s->loc_count;
sys/dev/hid/hid.c
305
c->loc.size = s->loc_size;
sys/dev/hid/hid.c
307
if (c->flags & HIO_VARIABLE) {
sys/dev/hid/hid.c
309
if (c->loc.count > MAXLOCCNT) {
sys/dev/hid/hid.c
315
s->ncount = c->loc.count;
sys/dev/hid/hid.c
321
c->loc.count = 1;
sys/dev/hid/hid.c
328
c->kind = hid_output;
sys/dev/hid/hid.c
331
c->kind = hid_collection;
sys/dev/hid/hid.c
332
c->collection = uval;
sys/dev/hid/hid.c
333
c->collevel++;
sys/dev/hid/hid.c
334
c->usage = s->usage_last;
sys/dev/hid/hid.c
335
*h = *c;
sys/dev/hid/hid.c
338
c->kind = hid_feature;
sys/dev/hid/hid.c
341
c->kind = hid_endcollection;
sys/dev/hid/hid.c
342
if (c->collevel == 0) {
sys/dev/hid/hid.c
346
c->collevel--;
sys/dev/hid/hid.c
347
*h = *c;
sys/dev/hid/hid.c
357
c->_usage_page = uval << 16;
sys/dev/hid/hid.c
360
c->logical_minimum = dval;
sys/dev/hid/hid.c
363
c->logical_maximum = dval;
sys/dev/hid/hid.c
366
c->physical_minimum = dval;
sys/dev/hid/hid.c
369
c->physical_maximum = dval;
sys/dev/hid/hid.c
372
c->unit_exponent = uval;
sys/dev/hid/hid.c
375
c->unit = uval;
sys/dev/hid/hid.c
381
hid_switch_rid(s, c, dval);
sys/dev/hid/hid.c
389
s->cur[s->pushlevel] = *c;
sys/dev/hid/hid.c
391
c->loc.size = s->loc_size;
sys/dev/hid/hid.c
392
c->loc.count = s->loc_count;
sys/dev/hid/hid.c
394
c = &s->cur[s->pushlevel];
sys/dev/hid/hid.c
404
oldpos = c->loc.pos;
sys/dev/hid/hid.c
405
c = &s->cur[s->pushlevel];
sys/dev/hid/hid.c
407
s->loc_size = c->loc.size;
sys/dev/hid/hid.c
408
s->loc_count = c->loc.count;
sys/dev/hid/hid.c
410
c->loc.pos = oldpos;
sys/dev/hid/hid.c
411
c->loc.size = 0;
sys/dev/hid/hid.c
412
c->loc.count = 0;
sys/dev/hid/hid.c
427
uval = c->_usage_page | uval;
sys/dev/hid/hid.c
447
uval = c->_usage_page | uval;
sys/dev/hid/hid.c
448
c->usage_minimum = uval;
sys/dev/hid/hid.c
455
uval = c->_usage_page | uval;
sys/dev/hid/hid.c
456
c->usage_maximum = uval;
sys/dev/hid/hid.c
464
(c->usage_minimum <= c->usage_maximum)) {
sys/dev/hid/hid.c
467
c->usage_minimum;
sys/dev/hid/hid.c
469
c->usage_maximum;
sys/dev/hid/hid.c
477
c->designator_index = uval;
sys/dev/hid/hid.c
480
c->designator_minimum = uval;
sys/dev/hid/hid.c
483
c->designator_maximum = uval;
sys/dev/hid/hid.c
486
c->string_index = uval;
sys/dev/hid/hid.c
489
c->string_minimum = uval;
sys/dev/hid/hid.c
492
c->string_maximum = uval;
sys/dev/hid/hid.c
495
c->set_delimiter = uval;
sys/dev/hid/hid.c
79
hid_clear_local(struct hid_item *c)
sys/dev/hid/hid.c
81
c->loc.count = 0;
sys/dev/hid/hid.c
82
c->loc.size = 0;
sys/dev/hid/hid.c
83
c->usage = 0;
sys/dev/hid/hid.c
84
c->usage_minimum = 0;
sys/dev/hid/hid.c
85
c->usage_maximum = 0;
sys/dev/hid/hid.c
86
c->designator_index = 0;
sys/dev/hid/hid.c
87
c->designator_minimum = 0;
sys/dev/hid/hid.c
88
c->designator_maximum = 0;
sys/dev/hid/hid.c
89
c->string_index = 0;
sys/dev/hid/hid.c
90
c->string_minimum = 0;
sys/dev/hid/hid.c
91
c->string_maximum = 0;
sys/dev/hid/hid.c
92
c->set_delimiter = 0;
sys/dev/hid/hid.c
96
hid_switch_rid(struct hid_data *s, struct hid_item *c, int32_t nextid)
sys/dev/hid/hidcc.c
1138
hidcc_rawinput(struct hidcc *sc, u_char c, int release)
sys/dev/hid/hidcc.c
1145
if (c & 0x80)
sys/dev/hid/hidcc.c
1147
buf[len++] = c & 0x7f;
sys/dev/hid/hidkbd.c
474
#define ADDKEY(c) ibuf[nkeys++] = (c)
sys/dev/hid/hidkbd.c
561
int c;
sys/dev/hid/hidkbd.c
565
c = hidkbd_trtab[key & CODEMASK];
sys/dev/hid/hidkbd.c
566
if (c == NN)
sys/dev/hid/hidkbd.c
568
if (c & 0x80)
sys/dev/hid/hidkbd.c
570
cbuf[j] = c & 0x7f;
sys/dev/hid/hidkbd.c
574
c & 0x80 ? "0xe0 " : "",
sys/dev/hid/hidkbd.c
681
int c;
sys/dev/hid/hidkbd.c
683
c = kbd->sc_pollchars[0];
sys/dev/hid/hidkbd.c
687
*type = c & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN;
sys/dev/hid/hidkbd.c
688
*data = c & CODEMASK;
sys/dev/hil/hil.c
280
u_int8_t c, stat;
sys/dev/hil/hil.c
294
c = bus_space_read_1(sc->sc_bst, sc->sc_bsh,
sys/dev/hil/hil.c
298
hil_process_int(sc, stat, c);
sys/dev/hil/hil.c
307
hil_process_int(struct hil_softc *sc, u_int8_t stat, u_int8_t c)
sys/dev/hil/hil.c
313
if (c & HIL_ERROR) {
sys/dev/hil/hil.c
315
switch (c) {
sys/dev/hil/hil.c
325
if (c & HIL_COMMAND) {
sys/dev/hil/hil.c
326
if (c & HIL_POLLDATA) { /* End of data */
sys/dev/hil/hil.c
337
if (c & HIL_POLLDATA) { /* Start of polled data */
sys/dev/hil/hil.c
338
sc->sc_actdev = (c & HIL_DEVMASK);
sys/dev/hil/hil.c
341
if (sc->sc_cmddev == (c & HIL_DEVMASK)) {
sys/dev/hil/hil.c
350
*sc->sc_pollbp++ = c;
sys/dev/hil/hil.c
357
*sc->sc_cmdbp++ = c;
sys/dev/hil/hil.c
369
hil_process_poll(struct hil_softc *sc, u_int8_t stat, u_int8_t c)
sys/dev/hil/hil.c
375
if (c & HIL_ERROR) {
sys/dev/hil/hil.c
377
switch (c) {
sys/dev/hil/hil.c
406
if (c & HIL_COMMAND) {
sys/dev/hil/hil.c
407
if (!(c & HIL_POLLDATA)) {
sys/dev/hil/hil.c
413
if (c & HIL_POLLDATA) {
sys/dev/hil/hil.c
415
sc->sc_actdev = (c & HIL_DEVMASK);
sys/dev/hil/hil.c
419
if (sc->sc_cmddev == (c & HIL_DEVMASK)) {
sys/dev/hil/hil.c
702
u_int8_t status, c;
sys/dev/hil/hil.c
746
c = bus_space_read_1(sc->sc_bst, sc->sc_bsh, HILP_DATA);
sys/dev/hil/hil.c
748
hil_process_int(sc, status, c);
sys/dev/hil/hil.c
870
u_int8_t s, c;
sys/dev/hil/hil.c
876
c = bus_space_read_1(sc->sc_bst, sc->sc_bsh, HILP_DATA);
sys/dev/hil/hil.c
879
if (hil_process_poll(sc, s, c)) {
sys/dev/hil/hil.c
883
*data = c;
sys/dev/hil/hilkbd.c
324
u_int8_t c, stat;
sys/dev/hil/hilkbd.c
327
while (hil_poll_data((struct hildev_softc *)sc, &stat, &c) != 0)
sys/dev/hil/hilkbd.c
334
if (c != HIL_KBDBUTTON)
sys/dev/hil/hilkbd.c
338
hilkbd_decode(sc, c, type, data, HIL_KBDBUTTON);
sys/dev/hil/hilkbd.c
398
int c, j = 0;
sys/dev/hil/hilkbd.c
402
c = hilkbd_raw[key];
sys/dev/hil/hilkbd.c
403
if (c == RAWKEY_Null)
sys/dev/hil/hilkbd.c
406
if (c & 0x80)
sys/dev/hil/hilkbd.c
408
cbuf[j] = c & 0x7f;
sys/dev/i2c/ipmi_i2c.c
106
struct ipmi_cmd c;
sys/dev/i2c/ipmi_i2c.c
111
c.c_sc = &sc->sc;
sys/dev/i2c/ipmi_i2c.c
112
c.c_rssa = BMC_SA;
sys/dev/i2c/ipmi_i2c.c
113
c.c_rslun = BMC_LUN;
sys/dev/i2c/ipmi_i2c.c
114
c.c_netfn = APP_NETFN;
sys/dev/i2c/ipmi_i2c.c
115
c.c_cmd = APP_GET_SYSTEM_INTERFACE_CAPS;
sys/dev/i2c/ipmi_i2c.c
116
c.c_txlen = 1;
sys/dev/i2c/ipmi_i2c.c
117
c.c_rxlen = 0;
sys/dev/i2c/ipmi_i2c.c
118
c.c_maxrxlen = sizeof(data);
sys/dev/i2c/ipmi_i2c.c
119
c.c_data = data;
sys/dev/i2c/ipmi_i2c.c
120
if (ipmi_sendcmd(&c) || ipmi_recvcmd(&c))
sys/dev/i2c/ipmi_i2c.c
136
struct ipmi_cmd c;
sys/dev/i2c/ipmi_i2c.c
139
c.c_sc = &sc->sc;
sys/dev/i2c/ipmi_i2c.c
140
c.c_rssa = BMC_SA;
sys/dev/i2c/ipmi_i2c.c
141
c.c_rslun = BMC_LUN;
sys/dev/i2c/ipmi_i2c.c
142
c.c_netfn = APP_NETFN;
sys/dev/i2c/ipmi_i2c.c
143
c.c_cmd = APP_GET_DEVICE_ID;
sys/dev/i2c/ipmi_i2c.c
144
c.c_txlen = 0;
sys/dev/i2c/ipmi_i2c.c
145
c.c_rxlen = 0;
sys/dev/i2c/ipmi_i2c.c
146
c.c_maxrxlen = sizeof(data);
sys/dev/i2c/ipmi_i2c.c
147
c.c_data = data;
sys/dev/i2c/ipmi_i2c.c
148
if (ipmi_sendcmd(&c) || ipmi_recvcmd(&c))
sys/dev/i2c/ipmi_i2c.c
156
ssif_sendmsg(struct ipmi_cmd *c)
sys/dev/i2c/ipmi_i2c.c
158
struct ipmi_i2c_softc *sc = (struct ipmi_i2c_softc *)c->c_sc;
sys/dev/i2c/ipmi_i2c.c
164
if (c->c_txlen > 32)
sys/dev/i2c/ipmi_i2c.c
170
cmd[1] = c->c_txlen;
sys/dev/i2c/ipmi_i2c.c
173
sc->sc_addr, cmd, sizeof(cmd), buf, c->c_txlen, 0);
sys/dev/i2c/ipmi_i2c.c
184
ssif_recvmsg(struct ipmi_cmd *c)
sys/dev/i2c/ipmi_i2c.c
186
struct ipmi_i2c_softc *sc = (struct ipmi_i2c_softc *)c->c_sc;
sys/dev/i2c/ipmi_i2c.c
210
c->c_rxlen = MIN(30, c->c_maxrxlen);
sys/dev/i2c/ipmi_i2c.c
211
memcpy(sc->sc.sc_buf, &buf[3], c->c_rxlen);
sys/dev/i2c/ipmi_i2c.c
215
c->c_rxlen = MIN(buf[0], c->c_maxrxlen);
sys/dev/i2c/ipmi_i2c.c
216
memcpy(sc->sc.sc_buf, &buf[1], c->c_rxlen);
sys/dev/i2c/ipmi_i2c.c
224
while (buf[1] != 0xff && c->c_rxlen < c->c_maxrxlen) {
sys/dev/i2c/ipmi_i2c.c
238
len = MIN(31, c->c_maxrxlen - c->c_rxlen);
sys/dev/i2c/ipmi_i2c.c
239
memcpy(&sc->sc.sc_buf[c->c_rxlen], &buf[2], len);
sys/dev/i2c/ipmi_i2c.c
242
len = MIN(buf[0] - 1, c->c_maxrxlen - c->c_rxlen);
sys/dev/i2c/ipmi_i2c.c
243
memcpy(&sc->sc.sc_buf[c->c_rxlen], &buf[2], len);
sys/dev/i2c/ipmi_i2c.c
248
c->c_rxlen += len;
sys/dev/ic/adv.h
76
#define ADV_CCB_OFF(c) (offsetof(struct adv_control, ccbs[0]) + \
sys/dev/ic/adv.h
77
(((u_long)(c)) - ((u_long)&sc->sc_control->ccbs[0])))
sys/dev/ic/adw.h
100
#define ADW_CCB_OFF(c) (offsetof(struct adw_control, ccbs[0]) + \
sys/dev/ic/adw.h
101
(((u_long)(c)) - ((u_long)&sc->sc_control->ccbs[0])))
sys/dev/ic/ar5008.c
1828
ar5008_set_rf_mode(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5008.c
1832
reg = IEEE80211_IS_CHAN_2GHZ(c) ?
sys/dev/ic/ar5008.c
1835
reg |= IEEE80211_IS_CHAN_2GHZ(c) ?
sys/dev/ic/ar5008.c
1837
} else if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar5008.c
1886
ar5008_set_phy(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5008.c
1899
if (extc > c) /* XXX */
sys/dev/ic/ar5008.c
1915
ar5008_set_delta_slope(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5008.c
1921
coeff = (100 << 24) / c->ic_freq;
sys/dev/ic/ar5008.c
2513
ar5008_hw_init(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5008.c
2526
ar5416_reset_addac(sc, c);
sys/dev/ic/ar5008.c
2532
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5008.c
2537
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5008.c
2561
ar9280_reset_rx_gain(sc, c);
sys/dev/ic/ar5008.c
2563
ar9280_reset_tx_gain(sc, c);
sys/dev/ic/ar5008.c
2585
ar5416_reset_bb_gain(sc, c);
sys/dev/ic/ar5008.c
2587
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar5008.c
2633
ar5008_set_phy(sc, c, extc);
sys/dev/ic/ar5008.c
2642
ops->set_txpower(sc, c, extc);
sys/dev/ic/ar5008.c
2645
ar5416_rf_reset(sc, c);
sys/dev/ic/ar5008.c
2779
ar5008_get_lg_tpow(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5008.c
2787
fbin = athn_chan2fbin(c);
sys/dev/ic/ar5008.c
2810
ar5008_get_ht_tpow(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5008.c
2818
fbin = athn_chan2fbin(c);
sys/dev/ic/ar5416.c
183
ar5416_set_synth(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
187
uint32_t freq = c->ic_freq;
sys/dev/ic/ar5416.c
191
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar5416.c
210
ar5416_force_bias(sc, c);
sys/dev/ic/ar5416.c
237
ar5416_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
247
modal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(c)];
sys/dev/ic/ar5416.c
282
txRxAtten = IEEE80211_IS_CHAN_2GHZ(c) ? 23 : 44;
sys/dev/ic/ar5416.c
335
ar5416_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
366
ar5416_get_pdadcs(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
378
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar5416.c
388
fbin = athn_chan2fbin(c);
sys/dev/ic/ar5416.c
427
ar5416_set_power_calib(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5416.c
439
modal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(c)];
sys/dev/ic/ar5416.c
447
if ((sc->flags & ATHN_FLAG_OLPC) && IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar5416.c
480
ar9280_olpc_get_pdadcs(sc, c, i, boundaries,
sys/dev/ic/ar5416.c
497
ar5416_get_pdadcs(sc, c, i, nxpdgains, overlap,
sys/dev/ic/ar5416.c
526
ar5416_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
539
ar5416_set_power_calib(sc, c);
sys/dev/ic/ar5416.c
541
modal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(c)];
sys/dev/ic/ar5416.c
559
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar5416.c
561
ar5008_get_lg_tpow(sc, c, AR_CTL_11B, eep->calTargetPowerCck,
sys/dev/ic/ar5416.c
565
ar5008_get_lg_tpow(sc, c, AR_CTL_11G, eep->calTargetPower2G,
sys/dev/ic/ar5416.c
569
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT20,
sys/dev/ic/ar5416.c
575
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT40,
sys/dev/ic/ar5416.c
591
ar5008_get_lg_tpow(sc, c, AR_CTL_11A, eep->calTargetPower5G,
sys/dev/ic/ar5416.c
595
ar5008_get_ht_tpow(sc, c, AR_CTL_5GHT20,
sys/dev/ic/ar5416.c
601
ar5008_get_ht_tpow(sc, c, AR_CTL_5GHT40,
sys/dev/ic/ar5416.c
626
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar5416.c
648
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5416.c
678
ar5416_spur_mitigate(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
684
spurchans = sc->ops.get_spur_chans(sc, IEEE80211_IS_CHAN_2GHZ(c));
sys/dev/ic/ar5416.c
689
spur -= c->ic_freq * 10;
sys/dev/ic/ar5416.c
712
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5416.c
782
ar5416_rw_bank6tpc(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
788
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/ic/ar5416.c
807
ar5416_rf_reset(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5416.c
825
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/ar5416.c
840
ar5416_rw_bank6tpc(sc, c, rwbank6tpc);
sys/dev/ic/ar5416.c
846
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/ar5416.c
858
ar5416_reset_bb_gain(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5416.c
863
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5416.c
876
ar5416_force_bias(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5416.c
882
KASSERT(IEEE80211_IS_CHAN_2GHZ(c));
sys/dev/ic/ar5416.c
887
if (c->ic_freq < 2412)
sys/dev/ic/ar5416.c
889
else if (c->ic_freq < 2422)
sys/dev/ic/ar5416.c
908
ar9160_rw_addac(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar5416.c
919
modal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(c)];
sys/dev/ic/ar5416.c
922
fbin = athn_chan2fbin(c);
sys/dev/ic/ar5416.c
935
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar5416.c
942
ar5416_reset_addac(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar5416.c
953
ar9160_rw_addac(sc, c, rwaddac);
sys/dev/ic/ar5xxx.c
1229
u_int16_t c;
sys/dev/ic/ar5xxx.c
1232
c = channel->c_channel + hal->ah_chanoff;
sys/dev/ic/ar5xxx.c
1237
if (c < 4800) {
sys/dev/ic/ar5xxx.c
1238
if (!((c - 2224) % 5)) {
sys/dev/ic/ar5xxx.c
1239
data0 = ((2 * (c - 704)) - 3040) / 10;
sys/dev/ic/ar5xxx.c
1241
} else if (!((c - 2192) % 5)) {
sys/dev/ic/ar5xxx.c
1242
data0 = ((2 * (c - 672)) - 3040) / 10;
sys/dev/ic/ar5xxx.c
1249
if (!(c % 20) && c >= 5120) {
sys/dev/ic/ar5xxx.c
1250
data0 = ar5k_bitswap(((c - 4800) / 20 << 2), 8);
sys/dev/ic/ar5xxx.c
1252
} else if (!(c % 10)) {
sys/dev/ic/ar5xxx.c
1253
data0 = ar5k_bitswap(((c - 4800) / 10 << 1), 8);
sys/dev/ic/ar5xxx.c
1255
} else if (!(c % 5)) {
sys/dev/ic/ar5xxx.c
1256
data0 = ar5k_bitswap((c - 4800) / 5, 8);
sys/dev/ic/ar5xxx.c
372
u_int i, c;
sys/dev/ic/ar5xxx.c
381
i = c = 0;
sys/dev/ic/ar5xxx.c
400
for (i = min; i <= max && c < max_channels; i++) {
sys/dev/ic/ar5xxx.c
404
all_channels[c].c_channel = freq;
sys/dev/ic/ar5xxx.c
405
all_channels[c++].c_channel_flags = flags;
sys/dev/ic/ar5xxx.c
431
(c < max_channels); i++) {
sys/dev/ic/ar5xxx.c
445
all_channels[c].c_channel_flags = CHANNEL_A;
sys/dev/ic/ar5xxx.c
450
all_channels[c++].channel = ar5k_5ghz_channels[i].rc_channel;
sys/dev/ic/ar5xxx.c
458
(c < max_channels); i++) {
sys/dev/ic/ar5xxx.c
473
all_channels[c].c_channel_flags = CHANNEL_B;
sys/dev/ic/ar5xxx.c
477
all_channels[c].c_channel_flags = CHANNEL_B;
sys/dev/ic/ar5xxx.c
479
all_channels[c].c_channel_flags |= (CHANNEL_G | CHANNEL_PUREG);
sys/dev/ic/ar5xxx.c
483
all_channels[c++].channel = ar5k_2ghz_channels[i].rc_channel;
sys/dev/ic/ar5xxx.c
488
*channels_size = c;
sys/dev/ic/ar9003.c
1770
ar9003_set_rf_mode(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9003.c
1774
reg = IEEE80211_IS_CHAN_2GHZ(c) ?
sys/dev/ic/ar9003.c
1776
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar9003.c
1825
ar9003_set_phy(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9003.c
1835
if (extc > c) /* XXX */
sys/dev/ic/ar9003.c
1853
ar9003_set_delta_slope(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9003.c
1859
coeff = (100 << 24) / c->ic_freq;
sys/dev/ic/ar9003.c
2226
int32_t m, p, c;
sys/dev/ic/ar9003.c
2229
int32_t min, max, div, f1, f2, f3, m, p, c;
sys/dev/ic/ar9003.c
2237
val[0][0].c = ((res[0] >> 24) & 0xff) | (res[1] & 0xf) << 8;
sys/dev/ic/ar9003.c
2241
val[0][1].c = (res[2] >> 12) & 0xfff;
sys/dev/ic/ar9003.c
2245
val[1][0].c = res[4] & 0xfff;
sys/dev/ic/ar9003.c
2249
val[1][1].c = (res[5] >> 4) & 0xfff;
sys/dev/ic/ar9003.c
2255
c = SIGN_EXT(val[i][j].c);
sys/dev/ic/ar9003.c
2261
phs[i][j] = (c * SCALE) / p;
sys/dev/ic/ar9003.c
2423
ar9003_paprd_calib(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9003.c
2434
ops->get_paprd_masks(sc, c, &ht20mask, &ht40mask);
sys/dev/ic/ar9003.c
3069
ar9003_reset_rx_gain(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9003.c
3076
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9003.c
3087
ar9003_reset_tx_gain(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9003.c
3094
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9003.c
3105
ar9003_hw_init(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9003.c
3133
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9003.c
3138
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9003.c
3153
ar9003_reset_rx_gain(sc, c);
sys/dev/ic/ar9003.c
3155
ar9003_reset_tx_gain(sc, c);
sys/dev/ic/ar9003.c
3157
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar9003.c
3187
ar9003_set_phy(sc, c, extc);
sys/dev/ic/ar9003.c
3190
ops->set_txpower(sc, c, extc);
sys/dev/ic/ar9003.c
3195
ar9003_get_lg_tpow(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9003.c
3203
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9003.c
3227
ar9003_get_ht_tpow(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9003.c
3235
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9280.c
176
ar9280_set_synth(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9280.c
180
uint32_t freq = c->ic_freq;
sys/dev/ic/ar9280.c
184
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9280.c
240
ar9280_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9280.c
250
modal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(c)];
sys/dev/ic/ar9280.c
285
txRxAtten = IEEE80211_IS_CHAN_2GHZ(c) ? 23 : 44;
sys/dev/ic/ar9280.c
293
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9280.c
323
if ((sc->flags & ATHN_FLAG_USB) && IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/ic/ar9280.c
396
(IEEE80211_IS_CHAN_2GHZ(c) ||
sys/dev/ic/ar9280.c
419
ar9280_olpc_get_pdadcs(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9280.c
428
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9280.c
440
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9280.c
466
ar9280_spur_mitigate(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9280.c
478
spurchans = sc->ops.get_spur_chans(sc, IEEE80211_IS_CHAN_2GHZ(c));
sys/dev/ic/ar9280.c
484
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9280.c
488
spur -= c->ic_freq;
sys/dev/ic/ar9280.c
523
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9280.c
542
ar9280_reset_rx_gain(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9280.c
548
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9280.c
557
ar9280_reset_tx_gain(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9280.c
563
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9285.c
195
ar9285_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9285.c
595
ar9285_cl_cal(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9285.c
657
ar9285_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9285.c
664
if ((error = ar9285_cl_cal(sc, c, extc)) != 0)
sys/dev/ic/ar9285.c
704
error = ar9285_cl_cal(sc, c, extc);
sys/dev/ic/ar9285.c
711
ar9285_get_pdadcs(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9285.c
726
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9285.c
742
ar9285_set_power_calib(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9285.c
773
ar9285_get_pdadcs(sc, c, nxpdgains, overlap, boundaries, pdadcs);
sys/dev/ic/ar9285.c
795
ar9285_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9285.c
807
ar9285_set_power_calib(sc, c);
sys/dev/ic/ar9285.c
814
ar5008_get_lg_tpow(sc, c, AR_CTL_11B, eep->calTargetPowerCck,
sys/dev/ic/ar9285.c
818
ar5008_get_lg_tpow(sc, c, AR_CTL_11G, eep->calTargetPower2G,
sys/dev/ic/ar9285.c
822
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT20, eep->calTargetPower2GHT20,
sys/dev/ic/ar9285.c
827
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT40,
sys/dev/ic/ar9287.c
168
ar9287_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9287.c
270
ar9287_get_pdadcs(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9287.c
288
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9287.c
314
ar9287_olpc_get_pdgain(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9287.c
329
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9287.c
342
ar9287_set_power_calib(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9287.c
388
ar9287_olpc_get_pdgain(sc, c, i, &txpower);
sys/dev/ic/ar9287.c
408
ar9287_get_pdadcs(sc, c, i, nxpdgains, overlap,
sys/dev/ic/ar9287.c
438
ar9287_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9287.c
450
ar9287_set_power_calib(sc, c);
sys/dev/ic/ar9287.c
466
ar5008_get_lg_tpow(sc, c, AR_CTL_11B, eep->calTargetPowerCck,
sys/dev/ic/ar9287.c
470
ar5008_get_lg_tpow(sc, c, AR_CTL_11G, eep->calTargetPower2G,
sys/dev/ic/ar9287.c
474
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT20, eep->calTargetPower2GHT20,
sys/dev/ic/ar9287.c
479
ar5008_get_ht_tpow(sc, c, AR_CTL_2GHT40,
sys/dev/ic/ar9287.c
525
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
245
ar9380_get_paprd_masks(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
251
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
260
ar9380_set_synth(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
263
uint32_t freq = c->ic_freq;
sys/dev/ic/ar9380.c
266
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9380.c
295
ar9380_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
304
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
393
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar9380.c
395
if (c->ic_freq <= 5500) {
sys/dev/ic/ar9380.c
396
db = athn_interpolate(c->ic_freq,
sys/dev/ic/ar9380.c
400
db = athn_interpolate(c->ic_freq,
sys/dev/ic/ar9380.c
406
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar9380.c
408
if (c->ic_freq <= 5500) {
sys/dev/ic/ar9380.c
409
margin = athn_interpolate(c->ic_freq,
sys/dev/ic/ar9380.c
413
margin = athn_interpolate(c->ic_freq,
sys/dev/ic/ar9380.c
505
ar9380_spur_mitigate_cck(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
514
spur = freqs[i] - c->ic_freq;
sys/dev/ic/ar9380.c
546
ar9380_spur_mitigate_ofdm(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
555
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
585
freq = c->ic_freq;
sys/dev/ic/ar9380.c
599
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
684
ar9380_spur_mitigate(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
688
ar9380_spur_mitigate_cck(sc, c, extc);
sys/dev/ic/ar9380.c
689
ar9380_spur_mitigate_ofdm(sc, c, extc);
sys/dev/ic/ar9380.c
693
ar9380_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
701
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9380.c
703
ar9003_get_lg_tpow(sc, c, AR_CTL_11B,
sys/dev/ic/ar9380.c
708
ar9003_get_lg_tpow(sc, c, AR_CTL_11G,
sys/dev/ic/ar9380.c
713
ar9003_get_ht_tpow(sc, c, AR_CTL_2GHT20,
sys/dev/ic/ar9380.c
719
ar9003_get_ht_tpow(sc, c, AR_CTL_2GHT40,
sys/dev/ic/ar9380.c
726
ar9003_get_lg_tpow(sc, c, AR_CTL_11A,
sys/dev/ic/ar9380.c
731
ar9003_get_ht_tpow(sc, c, AR_CTL_5GHT20,
sys/dev/ic/ar9380.c
737
ar9003_get_ht_tpow(sc, c, AR_CTL_5GHT40,
sys/dev/ic/ar9380.c
754
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9380.c
802
ar9380_set_correction(sc, c);
sys/dev/ic/ar9380.c
806
ar9380_get_correction(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/ar9380.c
815
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/ic/ar9380.c
825
fbin = athn_chan2fbin(c);
sys/dev/ic/ar9380.c
837
ar9380_set_correction(struct athn_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/ar9380.c
845
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/ar9380.c
851
ar9380_get_correction(sc, c, i, &corr, &temp);
sys/dev/ic/ar9380.c
866
if (IEEE80211_IS_CHAN_5GHZ(c) &&
sys/dev/ic/ar9380.c
868
if (c->ic_freq <= 5500) {
sys/dev/ic/ar9380.c
869
slope = athn_interpolate(c->ic_freq,
sys/dev/ic/ar9380.c
873
slope = athn_interpolate(c->ic_freq,
sys/dev/ic/ath.c
2685
struct ieee80211_channel *c;
sys/dev/ic/ath.c
2694
c = ic->ic_ibss_chan;
sys/dev/ic/ath.c
2695
hchan.channel = c->ic_freq;
sys/dev/ic/ath.c
2696
hchan.channelFlags = c->ic_flags;
sys/dev/ic/ath.c
2700
("%s: channel %u/%x\n", __func__, c->ic_freq, c->ic_flags));
sys/dev/ic/ath.c
2713
__func__, c->ic_freq));
sys/dev/ic/ath.c
2926
HAL_CHANNEL *c = &chans[i];
sys/dev/ic/ath.c
2927
ix = ieee80211_mhz2ieee(c->channel, c->channelFlags);
sys/dev/ic/ath.c
2930
ifp->if_xname, ix, c->channel, c->channelFlags);
sys/dev/ic/ath.c
2935
sc->sc_dev.dv_xname, i, nchan, c->channel, c->channelFlags,
sys/dev/ic/ath.c
2939
ic->ic_channels[ix].ic_freq = c->channel;
sys/dev/ic/ath.c
2940
ic->ic_channels[ix].ic_flags = c->channelFlags;
sys/dev/ic/ath.c
2943
ic->ic_channels[ix].ic_flags |= c->channelFlags;
sys/dev/ic/ath.c
754
struct ieee80211_channel *c;
sys/dev/ic/ath.c
761
c = ic->ic_ibss_chan;
sys/dev/ic/ath.c
762
hchan.channel = c->ic_freq;
sys/dev/ic/ath.c
763
hchan.channelFlags = c->ic_flags;
sys/dev/ic/athn.c
1406
athn_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/athn.c
1415
error = ar9285_init_calib(sc, c, extc);
sys/dev/ic/athn.c
1417
error = ar5416_init_calib(sc, c, extc);
sys/dev/ic/athn.c
1442
} else if (IEEE80211_IS_CHAN_5GHZ(c) || extc != NULL) {
sys/dev/ic/athn.c
1735
athn_chan2fbin(struct ieee80211_channel *c)
sys/dev/ic/athn.c
1737
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/athn.c
1738
return (c->ic_freq - 2300);
sys/dev/ic/athn.c
1740
return ((c->ic_freq - 4800) / 5);
sys/dev/ic/athn.c
2239
athn_hw_reset(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/athn.c
2291
athn_init_pll(sc, c);
sys/dev/ic/athn.c
2292
ops->set_rf_mode(sc, c);
sys/dev/ic/athn.c
2323
ops->hw_init(sc, c, extc);
sys/dev/ic/athn.c
2346
ops->set_delta_slope(sc, c, extc);
sys/dev/ic/athn.c
2348
ops->spur_mitigate(sc, c, extc);
sys/dev/ic/athn.c
2349
ops->init_from_rom(sc, c, extc);
sys/dev/ic/athn.c
2371
if ((error = ops->set_synth(sc, c, extc)) != 0) {
sys/dev/ic/athn.c
2375
sc->curchan = c;
sys/dev/ic/athn.c
2439
if ((error = athn_init_calib(sc, c, extc)) != 0) {
sys/dev/ic/athn.c
2732
athn_chan_sifs(struct ieee80211_channel *c)
sys/dev/ic/athn.c
2734
return IEEE80211_IS_CHAN_2GHZ(c) ? IEEE80211_DUR_DS_SIFS : 16;
sys/dev/ic/athn.c
2746
athn_acktimeout(struct ieee80211_channel *c, int slot)
sys/dev/ic/athn.c
2748
int sifs = athn_chan_sifs(c);
sys/dev/ic/athn.c
2752
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/athn.c
2759
athn_setacktimeout(struct athn_softc *sc, struct ieee80211_channel *c, int slot)
sys/dev/ic/athn.c
2761
int ackto = athn_acktimeout(c, slot);
sys/dev/ic/athn.c
2769
athn_setctstimeout(struct athn_softc *sc, struct ieee80211_channel *c, int slot)
sys/dev/ic/athn.c
2771
int ctsto = athn_acktimeout(c, slot);
sys/dev/ic/athn.c
2772
int sifs = athn_chan_sifs(c);
sys/dev/ic/athn.c
2776
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/athn.c
3004
struct ieee80211_channel *c, *extc;
sys/dev/ic/athn.c
3007
c = ic->ic_bss->ni_chan = ic->ic_ibss_chan;
sys/dev/ic/athn.c
3046
if ((error = athn_hw_reset(sc, c, extc, 1)) != 0) {
sys/dev/ic/athn.c
753
athn_init_pll(struct athn_softc *sc, const struct ieee80211_channel *c)
sys/dev/ic/athn.c
764
if (c != NULL && IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/ic/athn.c
775
if (c != NULL && IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/athn.c
781
if (c != NULL && IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/athn.c
871
athn_set_chan(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/athn.c
886
ops->set_phy(sc, c, extc);
sys/dev/ic/athn.c
889
if ((error = ops->set_synth(sc, c, extc)) != 0)
sys/dev/ic/athn.c
892
sc->curchan = c;
sys/dev/ic/athn.c
896
ops->set_txpower(sc, c, extc);
sys/dev/ic/athn.c
903
ops->set_delta_slope(sc, c, extc);
sys/dev/ic/athn.c
905
ops->spur_mitigate(sc, c, extc);
sys/dev/ic/athn.c
911
athn_switch_chan(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/athn.c
943
if (c->ic_flags != sc->curchan->ic_flags ||
sys/dev/ic/athn.c
952
error = athn_set_chan(sc, c, extc);
sys/dev/ic/athn.c
956
error = athn_hw_reset(sc, c, extc, 0);
sys/dev/ic/bwfm.c
1862
bwfm_chan2spec(struct bwfm_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/bwfm.c
1865
return bwfm_chan2spec_d11n(sc, c);
sys/dev/ic/bwfm.c
1867
return bwfm_chan2spec_d11ac(sc, c);
sys/dev/ic/bwfm.c
1871
bwfm_chan2spec_d11n(struct bwfm_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/bwfm.c
1875
chanspec = ieee80211_mhz2ieee(c->ic_freq, 0) & BWFM_CHANSPEC_CHAN_MASK;
sys/dev/ic/bwfm.c
1878
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/bwfm.c
1880
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/bwfm.c
1887
bwfm_chan2spec_d11ac(struct bwfm_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/bwfm.c
1891
chanspec = ieee80211_mhz2ieee(c->ic_freq, 0) & BWFM_CHANSPEC_CHAN_MASK;
sys/dev/ic/bwfm.c
1894
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/bwfm.c
1896
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/com.c
1000
int c;
sys/dev/ic/com.c
1044
c = *ibufp++;
sys/dev/ic/com.c
1051
c |= lsrmap[(*ibufp++ & (LSR_BI|LSR_FE|LSR_PE)) >> 2];
sys/dev/ic/com.c
1052
(*linesw[tp->t_line].l_rint)(c, tp);
sys/dev/ic/com.c
1239
u_char stat, c;
sys/dev/ic/com.c
1245
c = comcn_read_reg(com_data);
sys/dev/ic/com.c
1250
return (c);
sys/dev/ic/com.c
1257
comcnputc(dev_t dev, int c)
sys/dev/ic/com.c
1267
comcn_write_reg(com_data, (u_int8_t)(c & 0xff));
sys/dev/ic/cy.c
1357
int c, co, br;
sys/dev/ic/cy.c
1362
for (c = 0, co = 8; co <= 2048; co <<= 2, c++) {
sys/dev/ic/cy.c
1366
*cor = c;
sys/dev/ic/dc.c
1857
struct dc_desc *c;
sys/dev/ic/dc.c
1860
c = &sc->dc_ldata->dc_rx_list[i];
sys/dev/ic/dc.c
1907
c->dc_data = htole32(
sys/dev/ic/dc.c
1910
c->dc_ctl = htole32(DC_RXCTL_RLINK | ETHER_MAX_DIX_LEN);
sys/dev/ic/dc.c
1911
c->dc_status = htole32(DC_RXSTAT_OWN);
sys/dev/ic/dc.c
1978
struct dc_desc *c = NULL;
sys/dev/ic/dc.c
1991
c = &sc->dc_ldata->dc_rx_list[i];
sys/dev/ic/dc.c
1992
rxstat = letoh32(c->dc_status);
sys/dev/ic/dc21040reg.h
39
#define TULIP_BITFIELD3(a, b, c) c, b, a
sys/dev/ic/dc21040reg.h
40
#define TULIP_BITFIELD4(a, b, c, d) d, c, b, a
sys/dev/ic/dc21040reg.h
43
#define TULIP_BITFIELD3(a, b, c) a, b, c
sys/dev/ic/dc21040reg.h
44
#define TULIP_BITFIELD4(a, b, c, d) a, b, c, d
sys/dev/ic/if_wi.c
343
#define ADD(m, c) ifmedia_add(&sc->sc_media, (m), (c), NULL)
sys/dev/ic/mtd8xx.c
489
struct mtd_rx_desc *c;
sys/dev/ic/mtd8xx.c
492
c = &sc->mtd_ldata->mtd_rx_list[i];
sys/dev/ic/mtd8xx.c
527
c->rd_buf = htole32(
sys/dev/ic/mtd8xx.c
530
c->rd_rcw = htole32(ETHER_MAX_DIX_LEN);
sys/dev/ic/mtd8xx.c
531
c->rd_rsr = htole32(RSR_OWN);
sys/dev/ic/nvme.c
1118
struct nvme_cqe c;
sys/dev/ic/nvme.c
1141
if (ISSET(state.c.flags, NVME_CQE_PHASE))
sys/dev/ic/nvme.c
1168
state->c.flags = ccb->ccb_cqe_flags;
sys/dev/ic/nvme.c
1169
SET(state->c.flags, NVME_CQE_PHASE);
sys/dev/ic/osiop.c
128
#define OSIOP_TRACE(a,b,c,d) do { \
sys/dev/ic/osiop.c
131
osiop_trbuf[osiop_trix + 2] = (c); \
sys/dev/ic/osiop.c
140
#define OSIOP_TRACE(a,b,c,d)
sys/dev/ic/p9000.h
223
#define P9100_COLOR8(c) ((c) | ((c) << 8) | ((c) << 16) | ((c) << 24))
sys/dev/ic/p9000.h
224
#define P9100_COLOR16(c) ((c) | ((c) << 16))
sys/dev/ic/pcdisplay_subr.c
148
pcdisplay_putchar(void *id, int row, int col, u_int c, uint32_t attr)
sys/dev/ic/pcdisplay_subr.c
161
c | (attr << 8));
sys/dev/ic/pcdisplay_subr.c
163
scr->mem[off] = c | (attr << 8);
sys/dev/ic/pckbc.c
151
register u_char c;
sys/dev/ic/pckbc.c
155
c = bus_space_read_1(iot, ioh_d, 0);
sys/dev/ic/pckbc.c
158
DPRINTF("lost aux 0x%x\n", c);
sys/dev/ic/pckbc.c
163
DPRINTF("lost kbd 0x%x\n", c);
sys/dev/ic/pckbc.c
166
DPRINTF("discard aux data 0x%x\n", c);
sys/dev/ic/pckbc.c
170
return (c);
sys/dev/ic/pckbc.c
500
int c;
sys/dev/ic/pckbc.c
502
c = pckbc_poll_data1(t->t_iot, t->t_ioh_d, t->t_ioh_c,
sys/dev/ic/pckbc.c
504
if (c != -1 && q && CMD_IN_QUEUE(q)) {
sys/dev/ic/pckbc.c
507
if (pckbc_cmdresponse(t, slot, c))
sys/dev/ic/pckbc.c
510
return (c);
sys/dev/ic/pckbc.c
611
int i, c = 0;
sys/dev/ic/pckbc.c
620
c = pckbc_poll_data1(iot, ioh_d, ioh_c, slot,
sys/dev/ic/pckbc.c
622
if (c != -1)
sys/dev/ic/pckbc.c
626
switch (c) {
sys/dev/ic/pckbc.c
638
c == KBC_DEVCMD_RESEND ? "RESEND": "BAT");
sys/dev/ic/pckbc.c
650
DPRINTF("pckbc_cmd: lost 0x%x\n", c);
sys/dev/ic/pckbc.c
660
c = pckbc_poll_data1(iot, ioh_d, ioh_c, slot,
sys/dev/ic/pckbc.c
662
if (c != -1)
sys/dev/ic/pckbc.c
665
if (c == -1) {
sys/dev/ic/pckbc.c
670
cmd->response[cmd->responseidx++] = c;
sys/dev/ic/pluart.c
137
void pluartcnputc(dev_t dev, int c);
sys/dev/ic/pluart.c
246
u_int16_t c;
sys/dev/ic/pluart.c
268
c = bus_space_read_2(iot, ioh, UART_DR);
sys/dev/ic/pluart.c
269
if (c & UART_DR_BE) {
sys/dev/ic/pluart.c
277
c = 0;
sys/dev/ic/pluart.c
284
*p++ = c;
sys/dev/ic/pluart.c
494
int c;
sys/dev/ic/pluart.c
530
c = *ibufp++;
sys/dev/ic/pluart.c
547
c = (c & 0xff) | err;
sys/dev/ic/pluart.c
548
(*linesw[tp->t_line].l_rint)(c, tp);
sys/dev/ic/pluart.c
876
int c;
sys/dev/ic/pluart.c
882
c = bus_space_read_4(pluartconsiot, pluartconsioh, UART_DR);
sys/dev/ic/pluart.c
884
return c;
sys/dev/ic/pluart.c
888
pluartcnputc(dev_t dev, int c)
sys/dev/ic/pluart.c
895
bus_space_write_4(pluartconsiot, pluartconsioh, UART_DR, (uint8_t)c);
sys/dev/ic/qcuart.c
140
u_char c;
sys/dev/ic/qcuart.c
149
c = HREAD4(sc, GENI_RX_FIFO);
sys/dev/ic/qcuart.c
153
*p++ = c;
sys/dev/ic/qcuart.c
549
uint8_t c;
sys/dev/ic/qcuart.c
566
c = bus_space_read_4(iot, ioh, GENI_RX_FIFO);
sys/dev/ic/qcuart.c
567
return c;
sys/dev/ic/qcuart.c
571
qcuartcnputc(dev_t dev, int c)
sys/dev/ic/qcuart.c
590
bus_space_write_4(iot, ioh, GENI_TX_FIFO, c);
sys/dev/ic/qla.c
99
int qla_get_port_db(struct qla_softc *c, u_int16_t,
sys/dev/ic/rt2560.c
2129
rt2560_set_chan(struct rt2560_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/rt2560.c
2135
chan = ieee80211_chan2ieee(ic, c);
sys/dev/ic/rt2661.c
2215
rt2661_select_band(struct rt2661_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/rt2661.c
2223
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/ic/rt2661.c
2227
if ((IEEE80211_IS_CHAN_2GHZ(c) && sc->ext_2ghz_lna) ||
sys/dev/ic/rt2661.c
2228
(IEEE80211_IS_CHAN_5GHZ(c) && sc->ext_5ghz_lna)) {
sys/dev/ic/rt2661.c
2237
if ((IEEE80211_IS_CHAN_2GHZ(c) && sc->ext_2ghz_lna) ||
sys/dev/ic/rt2661.c
2238
(IEEE80211_IS_CHAN_5GHZ(c) && sc->ext_5ghz_lna)) {
sys/dev/ic/rt2661.c
2250
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/ic/rt2661.c
2257
sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10;
sys/dev/ic/rt2661.c
2261
rt2661_set_chan(struct rt2661_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/rt2661.c
2269
chan = ieee80211_chan2ieee(ic, c);
sys/dev/ic/rt2661.c
2293
if (c->ic_flags != sc->sc_curchan->ic_flags) {
sys/dev/ic/rt2661.c
2294
rt2661_select_band(sc, c);
sys/dev/ic/rt2661.c
2297
sc->sc_curchan = c;
sys/dev/ic/rt2661.c
2331
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/ic/rt2860.c
3107
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/ic/rt2860.c
3110
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/ic/rt2860.c
3111
u_int chan = ieee80211_chan2ieee(ic, c);
sys/dev/ic/rt2860.c
4115
rt2860_switch_chan(struct rt2860_softc *sc, struct ieee80211_channel *c)
sys/dev/ic/rt2860.c
4120
chan = ieee80211_chan2ieee(ic, c);
sys/dev/ic/rtwn.c
2146
rtwn_get_txpower(struct rtwn_softc *sc, int chain, struct ieee80211_channel *c,
sys/dev/ic/rtwn.c
2150
rtwn_r88e_get_txpower(sc, chain, c, extc, power);
sys/dev/ic/rtwn.c
2152
rtwn_r92e_get_txpower(sc, chain, c, extc, power);
sys/dev/ic/rtwn.c
2154
rtwn_r92c_get_txpower(sc, chain, c, extc, power);
sys/dev/ic/rtwn.c
2159
struct ieee80211_channel *c, struct ieee80211_channel *extc,
sys/dev/ic/rtwn.c
2169
chan = ieee80211_chan2ieee(ic, c); /* XXX center freq! */
sys/dev/ic/rtwn.c
2258
struct ieee80211_channel *c, struct ieee80211_channel *extc,
sys/dev/ic/rtwn.c
2269
chan = ieee80211_chan2ieee(ic, c); /* XXX center freq! */
sys/dev/ic/rtwn.c
2321
struct ieee80211_channel *c, struct ieee80211_channel *extc,
sys/dev/ic/rtwn.c
2331
chan = ieee80211_chan2ieee(ic, c); /* XXX center freq! */
sys/dev/ic/rtwn.c
2393
rtwn_set_txpower(struct rtwn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/rtwn.c
2401
rtwn_get_txpower(sc, i, c, extc, power);
sys/dev/ic/rtwn.c
2408
rtwn_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c,
sys/dev/ic/rtwn.c
2416
chan = ieee80211_chan2ieee(ic, c); /* XXX center freq! */
sys/dev/ic/rtwn.c
2419
rtwn_set_txpower(sc, c, extc);
sys/dev/ic/rtwn.c
2423
int prichlo = c->ic_freq < extc->ic_freq;
sys/dev/ic/sti.c
1412
int c;
sys/dev/ic/sti.c
1417
c = -1;
sys/dev/ic/sti.c
1419
c = (int)sti_unitoroman[uni - 0xa0];
sys/dev/ic/sti.c
1420
if (c == 0)
sys/dev/ic/sti.c
1421
c = -1;
sys/dev/ic/sti.c
1423
c = uni;
sys/dev/ic/sti.c
1426
c = uni;
sys/dev/ic/sti.c
1430
if (c == -1 || c < fp->first || c > fp->last) {
sys/dev/ic/sti.c
1435
*index = c;
sys/dev/ic/vga.c
1153
vga_putchar(void *c, int row, int col, u_int uc, uint32_t attr)
sys/dev/ic/vga.c
1155
struct vgascreen *scr = c;
sys/dev/ic/vga.c
1162
rc = pcdisplay_putchar(c, row, col, uc, attr);
sys/dev/ic/vga.c
1196
vga_getchar(void *c, int row, int col, struct wsdisplay_charcell *cell)
sys/dev/ic/vga.c
1198
struct vga_config *vc = c;
sys/dev/ic/xl.c
1072
xl_newbuf(struct xl_softc *sc, struct xl_chain_onefrag *c)
sys/dev/ic/xl.c
1089
if (c->map->dm_nsegs != 0) {
sys/dev/ic/xl.c
1090
bus_dmamap_sync(sc->sc_dmat, c->map,
sys/dev/ic/xl.c
1091
0, c->map->dm_mapsize, BUS_DMASYNC_POSTREAD);
sys/dev/ic/xl.c
1092
bus_dmamap_unload(sc->sc_dmat, c->map);
sys/dev/ic/xl.c
1095
map = c->map;
sys/dev/ic/xl.c
1096
c->map = sc->sc_rx_sparemap;
sys/dev/ic/xl.c
1102
bus_dmamap_sync(sc->sc_dmat, c->map, 0, c->map->dm_mapsize,
sys/dev/ic/xl.c
1105
c->xl_mbuf = m_new;
sys/dev/ic/xl.c
1106
c->xl_ptr->xl_frag.xl_addr =
sys/dev/ic/xl.c
1107
htole32(c->map->dm_segs[0].ds_addr + ETHER_ALIGN);
sys/dev/ic/xl.c
1108
c->xl_ptr->xl_frag.xl_len =
sys/dev/ic/xl.c
1109
htole32(c->map->dm_segs[0].ds_len | XL_LAST_FRAG);
sys/dev/ic/xl.c
1110
c->xl_ptr->xl_status = htole32(0);
sys/dev/ic/xl.c
1113
((caddr_t)c->xl_ptr - sc->sc_listkva), sizeof(struct xl_list),
sys/dev/ic/xl.c
1365
struct xl_chain *c;
sys/dev/ic/xl.c
1368
c = &sc->xl_cdata.xl_tx_chain[i];
sys/dev/ic/xl.c
1370
c->xl_phys);
sys/dev/ic/xl.c
1523
xl_encap(struct xl_softc *sc, struct xl_chain *c, struct mbuf *m_head)
sys/dev/ic/xl.c
1549
c->xl_ptr->xl_frag[frag].xl_addr =
sys/dev/ic/xl.c
1551
c->xl_ptr->xl_frag[frag].xl_len =
sys/dev/ic/xl.c
1590
if (c->map->dm_nsegs != 0) {
sys/dev/ic/xl.c
1591
bus_dmamap_sync(sc->sc_dmat, c->map,
sys/dev/ic/xl.c
1592
0, c->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
sys/dev/ic/xl.c
1593
bus_dmamap_unload(sc->sc_dmat, c->map);
sys/dev/ic/xl.c
1596
c->xl_mbuf = m_head;
sys/dev/ic/xl.c
1597
sc->sc_tx_sparemap = c->map;
sys/dev/ic/xl.c
1598
c->map = map;
sys/dev/ic/xl.c
1599
c->xl_ptr->xl_frag[frag - 1].xl_len |= htole32(XL_LAST_FRAG);
sys/dev/ic/xl.c
1600
c->xl_ptr->xl_status = htole32(total_len);
sys/dev/ic/xl.c
1601
c->xl_ptr->xl_next = 0;
sys/dev/ic/xl.c
1616
c->xl_ptr->xl_status = htole32(status);
sys/dev/ic/z8530sc.c
129
uint8_t c, rr0, rr1;
sys/dev/ic/z8530sc.c
147
c = zs_read_data(cs);
sys/dev/ic/z8530tty.c
1271
uint8_t rr0, rr1, c;
sys/dev/ic/z8530tty.c
1283
c = zs_read_data(cs);
sys/dev/ic/z8530tty.c
1290
put[0] = c;
sys/dev/ipmi.c
1004
struct ipmi_cmd c;
sys/dev/ipmi.c
1005
c.c_sc = sc;
sys/dev/ipmi.c
1006
c.c_rssa = BMC_SA;
sys/dev/ipmi.c
1007
c.c_rslun = BMC_LUN;
sys/dev/ipmi.c
1008
c.c_netfn = STORAGE_NETFN;
sys/dev/ipmi.c
1009
c.c_cmd = STORAGE_GET_SDR;
sys/dev/ipmi.c
1010
c.c_txlen = IPMI_SET_WDOG_MAX;
sys/dev/ipmi.c
1011
c.c_rxlen = 0;
sys/dev/ipmi.c
1012
c.c_maxrxlen = 8 + length;
sys/dev/ipmi.c
1013
c.c_data = cmd;
sys/dev/ipmi.c
1014
ipmi_cmd(&c);
sys/dev/ipmi.c
1015
len = c.c_rxlen;
sys/dev/ipmi.c
1039
struct ipmi_cmd c;
sys/dev/ipmi.c
1040
c.c_sc = sc;
sys/dev/ipmi.c
1041
c.c_rssa = BMC_SA;
sys/dev/ipmi.c
1042
c.c_rslun = BMC_LUN;
sys/dev/ipmi.c
1043
c.c_netfn = STORAGE_NETFN;
sys/dev/ipmi.c
1044
c.c_cmd = STORAGE_RESERVE_SDR;
sys/dev/ipmi.c
1045
c.c_txlen = 0;
sys/dev/ipmi.c
1046
c.c_maxrxlen = sizeof(resid);
sys/dev/ipmi.c
1047
c.c_rxlen = 0;
sys/dev/ipmi.c
1048
c.c_data = &resid;
sys/dev/ipmi.c
1049
ipmi_cmd(&c);
sys/dev/ipmi.c
1298
struct ipmi_cmd c;
sys/dev/ipmi.c
1299
c.c_sc = sc;
sys/dev/ipmi.c
1300
c.c_rssa = s1->owner_id;
sys/dev/ipmi.c
1301
c.c_rslun = s1->owner_lun;
sys/dev/ipmi.c
1302
c.c_netfn = SE_NETFN;
sys/dev/ipmi.c
1303
c.c_cmd = SE_GET_SENSOR_READING;
sys/dev/ipmi.c
1304
c.c_txlen = 1;
sys/dev/ipmi.c
1305
c.c_maxrxlen = sizeof(data);
sys/dev/ipmi.c
1306
c.c_rxlen = 0;
sys/dev/ipmi.c
1307
c.c_data = data;
sys/dev/ipmi.c
1308
ipmi_cmd(&c);
sys/dev/ipmi.c
1310
if (c.c_ccode != 0) {
sys/dev/ipmi.c
1312
psensor->i_sensor.desc, c.c_ccode);
sys/dev/ipmi.c
1559
struct ipmi_cmd *c = &sc->sc_ioctl.cmd;
sys/dev/ipmi.c
1596
c->c_sc = sc;
sys/dev/ipmi.c
1597
c->c_ccode = -1;
sys/dev/ipmi.c
1647
struct ipmi_cmd *c = &sc->sc_ioctl.cmd;
sys/dev/ipmi.c
1658
c->c_maxrxlen = sizeof(sc->sc_ioctl.buf);
sys/dev/ipmi.c
1659
c->c_data = sc->sc_ioctl.buf;
sys/dev/ipmi.c
1676
if (len > c->c_maxrxlen) {
sys/dev/ipmi.c
1681
c->c_ccode = -1;
sys/dev/ipmi.c
1682
rc = copyin(req->msg.data, c->c_data, len);
sys/dev/ipmi.c
1685
KASSERT(c->c_ccode == -1);
sys/dev/ipmi.c
1688
c->c_netfn = req->msg.netfn;
sys/dev/ipmi.c
1689
c->c_cmd = req->msg.cmd;
sys/dev/ipmi.c
1690
c->c_txlen = req->msg.data_len;
sys/dev/ipmi.c
1691
c->c_rxlen = 0;
sys/dev/ipmi.c
1692
ipmi_cmd(c);
sys/dev/ipmi.c
1700
if (c->c_ccode == -1) {
sys/dev/ipmi.c
1704
ccode = c->c_ccode & 0xff;
sys/dev/ipmi.c
1714
recv->msg.data_len = c->c_rxlen + 1;
sys/dev/ipmi.c
1716
rc = copyout(c->c_data, recv->msg.data + 1, c->c_rxlen);
sys/dev/ipmi.c
1725
c->c_rssa = iv;
sys/dev/ipmi.c
1728
*(int *)data = c->c_rssa;
sys/dev/ipmi.c
1736
c->c_rslun = iv;
sys/dev/ipmi.c
1739
*(int *)data = c->c_rslun;
sys/dev/ipmi.c
1753
c->c_ccode = -1;
sys/dev/ipmi.c
1790
struct ipmi_cmd c;
sys/dev/ipmi.c
1792
c.c_sc = sc;
sys/dev/ipmi.c
1793
c.c_rssa = BMC_SA;
sys/dev/ipmi.c
1794
c.c_rslun = BMC_LUN;
sys/dev/ipmi.c
1795
c.c_netfn = APP_NETFN;
sys/dev/ipmi.c
1796
c.c_cmd = APP_RESET_WATCHDOG;
sys/dev/ipmi.c
1797
c.c_txlen = 0;
sys/dev/ipmi.c
1798
c.c_maxrxlen = 0;
sys/dev/ipmi.c
1799
c.c_rxlen = 0;
sys/dev/ipmi.c
1800
c.c_data = NULL;
sys/dev/ipmi.c
1801
ipmi_cmd(&c);
sys/dev/ipmi.c
1809
struct ipmi_cmd c;
sys/dev/ipmi.c
1811
c.c_sc = sc;
sys/dev/ipmi.c
1812
c.c_rssa = BMC_SA;
sys/dev/ipmi.c
1813
c.c_rslun = BMC_LUN;
sys/dev/ipmi.c
1814
c.c_netfn = APP_NETFN;
sys/dev/ipmi.c
1815
c.c_cmd = APP_GET_WATCHDOG_TIMER;
sys/dev/ipmi.c
1816
c.c_txlen = 0;
sys/dev/ipmi.c
1817
c.c_maxrxlen = IPMI_GET_WDOG_MAX;
sys/dev/ipmi.c
1818
c.c_rxlen = 0;
sys/dev/ipmi.c
1819
c.c_data = wdog;
sys/dev/ipmi.c
1820
ipmi_cmd(&c);
sys/dev/ipmi.c
1833
c.c_cmd = APP_SET_WATCHDOG_TIMER;
sys/dev/ipmi.c
1834
c.c_txlen = IPMI_SET_WDOG_MAX;
sys/dev/ipmi.c
1835
c.c_maxrxlen = 0;
sys/dev/ipmi.c
1836
c.c_rxlen = 0;
sys/dev/ipmi.c
1837
c.c_data = wdog;
sys/dev/ipmi.c
1838
ipmi_cmd(&c);
sys/dev/ipmi.c
1905
struct ipmi_cmd c;
sys/dev/ipmi.c
1906
c.c_sc = sc;
sys/dev/ipmi.c
1907
c.c_rssa = BMC_SA;
sys/dev/ipmi.c
1908
c.c_rslun = BMC_LUN;
sys/dev/ipmi.c
1909
c.c_netfn = APP_NETFN;
sys/dev/ipmi.c
1910
c.c_cmd = APP_GET_DEVICE_ID;
sys/dev/ipmi.c
1911
c.c_txlen = 0;
sys/dev/ipmi.c
1912
c.c_maxrxlen = sizeof(cmd);
sys/dev/ipmi.c
1913
c.c_rxlen = 0;
sys/dev/ipmi.c
1914
c.c_data = cmd;
sys/dev/ipmi.c
1915
ipmi_cmd(&c);
sys/dev/ipmi.c
1917
dbg_dump(1, "bmc data", c.c_rxlen, cmd);
sys/dev/ipmi.c
342
bt_sendmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
344
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
349
for (i = 0; i < c->c_txlen; i++)
sys/dev/ipmi.c
364
bt_recvmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
366
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
387
c->c_rxlen = len - 1;
sys/dev/ipmi.c
522
smic_sendmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
524
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
529
for (idx = 1; idx < c->c_txlen - 1; idx++) {
sys/dev/ipmi.c
536
dbg_printf(50, "smic_sendmsg %d/%d = %.2x\n", idx, c->c_txlen, sts);
sys/dev/ipmi.c
544
smic_recvmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
546
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
549
c->c_rxlen = 0;
sys/dev/ipmi.c
564
c->c_rxlen = idx;
sys/dev/ipmi.c
568
dbg_printf(50, "smic_recvmsg %d/%d = %.2x\n", idx, c->c_maxrxlen, sts);
sys/dev/ipmi.c
691
kcs_sendmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
693
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
697
dbg_dump(50, "kcs sendmsg", c->c_txlen, sc->sc_buf);
sys/dev/ipmi.c
699
for (idx = 0; idx < c->c_txlen; idx++) {
sys/dev/ipmi.c
700
if (idx == c->c_txlen - 1)
sys/dev/ipmi.c
709
dbg_printf(1, "kcs sendmsg = %d/%d <%.2x>\n", idx, c->c_txlen, sts);
sys/dev/ipmi.c
710
dbg_dump(1, "kcs_sendmsg", c->c_txlen, sc->sc_buf);
sys/dev/ipmi.c
718
kcs_recvmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
720
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
723
for (idx = 0; idx < c->c_maxrxlen; idx++) {
sys/dev/ipmi.c
729
c->c_rxlen = idx;
sys/dev/ipmi.c
731
dbg_printf(1, "kcs recvmsg = %d/%d <%.2x>\n", idx, c->c_maxrxlen, sts);
sys/dev/ipmi.c
847
bt_buildmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
849
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
852
buf[IPMI_BTMSG_LEN] = c->c_txlen + (IPMI_BTMSG_DATASND - 1);
sys/dev/ipmi.c
853
buf[IPMI_BTMSG_NFLN] = NETFN_LUN(c->c_netfn, c->c_rslun);
sys/dev/ipmi.c
855
buf[IPMI_BTMSG_CMD] = c->c_cmd;
sys/dev/ipmi.c
856
if (c->c_txlen && c->c_data)
sys/dev/ipmi.c
857
memcpy(buf + IPMI_BTMSG_DATASND, c->c_data, c->c_txlen);
sys/dev/ipmi.c
865
cmn_buildmsg(struct ipmi_cmd *c)
sys/dev/ipmi.c
867
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
870
buf[IPMI_MSG_NFLN] = NETFN_LUN(c->c_netfn, c->c_rslun);
sys/dev/ipmi.c
871
buf[IPMI_MSG_CMD] = c->c_cmd;
sys/dev/ipmi.c
872
if (c->c_txlen && c->c_data)
sys/dev/ipmi.c
873
memcpy(buf + IPMI_MSG_DATASND, c->c_data, c->c_txlen);
sys/dev/ipmi.c
878
ipmi_sendcmd(struct ipmi_cmd *c)
sys/dev/ipmi.c
880
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
884
c->c_rssa, NETFN_LUN(c->c_netfn, c->c_rslun), c->c_cmd, c->c_txlen);
sys/dev/ipmi.c
885
dbg_dump(10, " send", c->c_txlen, c->c_data);
sys/dev/ipmi.c
886
if (c->c_rssa != BMC_SA) {
sys/dev/ipmi.c
888
sc->sc_if->buildmsg(c);
sys/dev/ipmi.c
906
sc->sc_if->buildmsg(c);
sys/dev/ipmi.c
908
c->c_txlen += sc->sc_if->datasnd;
sys/dev/ipmi.c
909
rc = sc->sc_if->sendmsg(c);
sys/dev/ipmi.c
917
ipmi_recvcmd(struct ipmi_cmd *c)
sys/dev/ipmi.c
919
struct ipmi_softc *sc = c->c_sc;
sys/dev/ipmi.c
923
c->c_maxrxlen += sc->sc_if->datarcv;
sys/dev/ipmi.c
924
if (sc->sc_if->recvmsg(c) ||
sys/dev/ipmi.c
925
c->c_rxlen < sc->sc_if->datarcv) {
sys/dev/ipmi.c
929
c->c_rxlen -= sc->sc_if->datarcv;
sys/dev/ipmi.c
930
if (c->c_rxlen > 0 && c->c_data)
sys/dev/ipmi.c
931
memcpy(c->c_data, buf + sc->sc_if->datarcv, c->c_rxlen);
sys/dev/ipmi.c
942
c->c_rxlen);
sys/dev/ipmi.c
943
dbg_dump(10, " recv", c->c_rxlen, c->c_data);
sys/dev/ipmi.c
949
ipmi_cmd(struct ipmi_cmd *c)
sys/dev/ipmi.c
952
ipmi_cmd_poll(c);
sys/dev/ipmi.c
954
ipmi_cmd_wait(c);
sys/dev/ipmi.c
958
ipmi_cmd_poll(struct ipmi_cmd *c)
sys/dev/ipmi.c
960
if ((c->c_ccode = ipmi_sendcmd(c)))
sys/dev/ipmi.c
961
printf("%s: sendcmd fails\n", DEVNAME(c->c_sc));
sys/dev/ipmi.c
963
c->c_ccode = ipmi_recvcmd(c);
sys/dev/ipmi.c
967
ipmi_cmd_wait(struct ipmi_cmd *c)
sys/dev/ipmi.c
972
task_set(&t, ipmi_cmd_wait_cb, c);
sys/dev/ipmi.c
973
res = task_add(c->c_sc->sc_cmd_taskq, &t);
sys/dev/ipmi.c
976
tsleep_nsec(c, PWAIT, "ipmicmd", INFSLP);
sys/dev/ipmi.c
978
res = task_del(c->c_sc->sc_cmd_taskq, &t);
sys/dev/ipmi.c
985
struct ipmi_cmd *c = arg;
sys/dev/ipmi.c
987
ipmi_cmd_poll(c);
sys/dev/ipmi.c
988
wakeup(c);
sys/dev/isa/elink.c
111
u_char c;
sys/dev/isa/elink.c
113
c = 0xff;
sys/dev/isa/elink.c
115
bus_space_write_1(iot, ioh, 0, c);
sys/dev/isa/elink.c
116
if (c & 0x80) {
sys/dev/isa/elink.c
117
c <<= 1;
sys/dev/isa/elink.c
118
c ^= p;
sys/dev/isa/elink.c
120
c <<= 1;
sys/dev/isa/gus.c
1183
unsigned char c = (unsigned char) flags;
sys/dev/isa/gus.c
1197
c |= GUSMASK_DMA_WIDTH;
sys/dev/isa/gus.c
1205
c |= GUSMASK_DMA_ENABLE | GUSMASK_DMA_R0 | GUSMASK_DMA_IRQ;
sys/dev/isa/gus.c
1237
bus_space_write_1(iot, ioh2, GUS_DATA_HIGH, c);
sys/dev/isa/gus.c
3153
unsigned char c,d,m;
sys/dev/isa/gus.c
3163
c = bus_space_read_1(iot, sc->sc_ioh3, GUS_BOARD_REV);
sys/dev/isa/gus.c
3164
if (c != 0xff)
sys/dev/isa/gus.c
3165
sc->sc_revision = c;
sys/dev/isa/gus.c
3182
c = ((unsigned char) gus_irq_map[ia->ia_irq]) | GUSMASK_BOTH_RQ;
sys/dev/isa/gus.c
3215
bus_space_write_1(iot, sc->sc_ioh1, GUS_IRQ_CONTROL, c);
sys/dev/isa/gus.c
3222
bus_space_write_1(iot, sc->sc_ioh1, GUS_IRQ_CONTROL, c);
sys/dev/isa/if_ie.c
373
u_char c;
sys/dev/isa/if_ie.c
381
c = inb(PORT + IEATT_REVISION);
sys/dev/isa/if_ie.c
382
switch (SL_BOARD(c)) {
sys/dev/isa/if_ie.c
397
sc->sc_dev.dv_xname, SL_BOARD(c));
sys/dev/isa/if_ie.c
402
sc->hard_vers = SL_REV(c);
sys/dev/isa/if_ie.c
440
u_char c;
sys/dev/isa/if_ie.c
473
c = inb(PORT + IE507_MADDR);
sys/dev/isa/if_ie.c
474
if (c & 0x20) {
sys/dev/isa/isadmareg.h
20
#define DMA2_CHN(c) (2*(2*(c))) /* addr reg for channel c */
sys/dev/isa/isadmareg.h
9
#define DMA1_CHN(c) (1*(2*(c))) /* addr reg for channel c */
sys/dev/isa/isadmavar.h
47
#define isadma_acquire(c) isa_dma_acquire(isa_dev, (c))
sys/dev/isa/isadmavar.h
48
#define isadma_release(c) isa_dma_release(isa_dev, (c))
sys/dev/isa/isadmavar.h
49
#define isadma_cascade(c) isa_dmacascade(isa_dev, (c))
sys/dev/isa/isadmavar.h
50
#define isadma_start(a, s, c, f) \
sys/dev/isa/isadmavar.h
51
isa_dmastart(isa_dev, (c), (a), (s), 0, (f), BUS_DMA_WAITOK|BUS_DMA_BUS1)
sys/dev/isa/isadmavar.h
52
#define isadma_abort(c) isa_dmaabort(isa_dev, (c))
sys/dev/isa/isadmavar.h
53
#define isadma_finished(c) isa_dmafinished(isa_dev, (c))
sys/dev/isa/isadmavar.h
54
#define isadma_done(c) isa_dmadone(isa_dev, (c))
sys/dev/isa/isapnp.c
371
struct isa_attach_args *c, *best, *f = *ipa;
sys/dev/isa/isapnp.c
381
for (best = c = f; c != NULL; c = c->ipa_sibling) {
sys/dev/isa/isapnp.c
382
if (!SAMEDEV(c, f))
sys/dev/isa/isapnp.c
384
if (c->ipa_pref < best->ipa_pref)
sys/dev/isa/isapnp.c
385
best = c;
sys/dev/isa/isapnp.c
396
for (c = f; c->ipa_sibling != best; c = c->ipa_sibling)
sys/dev/isa/isapnp.c
398
c->ipa_sibling = best->ipa_sibling;
sys/dev/isa/isapnp.c
404
for (c = f; c != NULL; c = c->ipa_sibling)
sys/dev/isa/isapnp.c
405
if (c != best && SAMEDEV(c, best))
sys/dev/isa/isapnp.c
408
if (c == NULL) {
sys/dev/isa/isapnp.c
420
for (c = f; c; ) {
sys/dev/isa/isapnp.c
421
if (c == best)
sys/dev/isa/isapnp.c
423
d = c->ipa_sibling;
sys/dev/isa/isapnp.c
424
if (SAMEDEV(c, best))
sys/dev/isa/isapnp.c
425
free(c, M_DEVBUF, 0);
sys/dev/isa/isapnp.c
428
n->ipa_sibling = c;
sys/dev/isa/isapnp.c
431
l = c;
sys/dev/isa/isapnp.c
432
n = c;
sys/dev/isa/isapnp.c
433
c->ipa_sibling = NULL;
sys/dev/isa/isapnp.c
435
c = d;
sys/dev/isa/isapnp.c
835
int c, d;
sys/dev/isa/isapnp.c
854
for (c = 0; c < sc->sc_ncards; c++) {
sys/dev/isa/isapnp.c
858
isapnp_write_reg(sc, ISAPNP_WAKE, c + 1);
sys/dev/isa/isapnp.c
860
if ((ipa = isapnp_get_resource(sc, c, ia)) == NULL)
sys/dev/isa/isapnpres.c
150
isapnp_merge(struct isa_attach_args *c, const struct isa_attach_args *d)
sys/dev/isa/isapnpres.c
155
c->ipa_io[c->ipa_nio++] = d->ipa_io[i];
sys/dev/isa/isapnpres.c
158
c->ipa_mem[c->ipa_nmem++] = d->ipa_mem[i];
sys/dev/isa/isapnpres.c
161
c->ipa_mem32[c->ipa_nmem32++] = d->ipa_mem32[i];
sys/dev/isa/isapnpres.c
164
c->ipa_irq[c->ipa_nirq++] = d->ipa_irq[i];
sys/dev/isa/isapnpres.c
167
c->ipa_drq[c->ipa_ndrq++] = d->ipa_drq[i];
sys/dev/isa/isapnpres.c
177
struct isa_attach_args *dev, *conf, *d, *c, *pa;
sys/dev/isa/isapnpres.c
182
for (conf = c = NULL, d = dev; d; d = dev) {
sys/dev/isa/isapnpres.c
204
if (c == NULL)
sys/dev/isa/isapnpres.c
205
c = conf = pa;
sys/dev/isa/isapnpres.c
207
c->ipa_sibling = pa;
sys/dev/isa/isapnpres.c
209
while (c->ipa_sibling)
sys/dev/isa/isapnpres.c
210
c = c->ipa_sibling;
sys/dev/isa/isapnpres.c
434
isapnp_get_resource(struct isapnp_softc *sc, int c,
sys/dev/isa/isapnpres.c
457
if (d != sc->sc_id[c][i] && i != ISAPNP_SERIAL_SIZE - 1) {
sys/dev/isa/isapnpres.c
460
sc->sc_dev.dv_xname, c + 1, i);
sys/dev/isa/isapnpres.c
498
sc->sc_dev.dv_xname, c + 1);
sys/dev/isa/isapnpres.c
506
sc->sc_dev.dv_xname, c + 1);
sys/dev/isa/isapnpres.c
521
warned >= 10 ? "Too many tag errors" : "Resource timeout", c + 1);
sys/dev/isa/spkr.c
115
#define toupper(c) ((c) - ' ' * (((c) >= 'a') && ((c) <= 'z')))
sys/dev/isa/spkr.c
116
#define isdigit(c) (((c) >= '0') && ((c) <= '9'))
sys/dev/isa/spkr.c
117
#define dtoi(c) ((c) - '0')
sys/dev/isa/spkr.c
225
char c = toupper(*cp);
sys/dev/isa/spkr.c
228
printf("playstring: %c (%x)\n", c, c);
sys/dev/isa/spkr.c
231
switch (c) {
sys/dev/isa/spkr.c
240
pitch = notetab[c - 'A'] + octave * OCTAVE_NOTES;
sys/dev/isa/wds.c
202
u_int8_t c;
sys/dev/isa/wds.c
209
c = bus_space_read_1(iot, ioh, WDS_STAT);
sys/dev/isa/wds.c
210
if (c & WDSS_REJ)
sys/dev/isa/wds.c
366
u_char c;
sys/dev/isa/wds.c
373
c = bus_space_read_1(iot, ioh, WDS_IRQSTAT) & WDSI_MASK;
sys/dev/isa/wds.c
378
switch (c) {
sys/dev/isa/wds.c
389
sc->sc_dev.dv_xname, c);
sys/dev/isa/wds.c
569
u_char c;
sys/dev/isa/wds.c
577
c = WDSC_IRQMFREE;
sys/dev/isa/wds.c
578
wds_cmd(sc, &c, sizeof c);
sys/dev/isa/wds.c
598
c = WDSC_MSTART(wmbo - wmbx->mbo);
sys/dev/isa/wds.c
599
wds_cmd(sc, &c, sizeof c);
sys/dev/isa/wds.c
704
u_char c;
sys/dev/isa/wds.c
710
c = bus_space_read_1(iot, ioh, WDS_STAT);
sys/dev/isa/wds.c
775
u_char c;
sys/dev/isa/wds.c
809
c = WDSC_DISUNSOL;
sys/dev/isa/wds.c
810
wds_cmd(sc, &c, sizeof c);
sys/dev/microcode/siop/ncr53cxxx.c
555
char c;
sys/dev/microcode/siop/ncr53cxxx.c
562
while ((c = *p++) && c != '\n' && (c <= ' ' || c == '\t'))
sys/dev/microcode/siop/ncr53cxxx.c
564
if (c == '\n' || c == 0 || c == ';')
sys/dev/microcode/siop/ncr53cxxx.c
570
if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') ||
sys/dev/microcode/siop/ncr53cxxx.c
571
(c >= 'A' && c <= 'Z') || c == '$' || c == '_') {
sys/dev/microcode/siop/ncr53cxxx.c
573
*s++ = c;
sys/dev/microcode/siop/ncr53cxxx.c
574
while (((c = *p) >= '0' && c <= '9') ||
sys/dev/microcode/siop/ncr53cxxx.c
575
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
sys/dev/microcode/siop/ncr53cxxx.c
576
c == '_' || c == '$') {
sys/dev/microcode/siop/ncr53cxxx.c
586
tokens[ntokens].type = c;
sys/dev/mii/acphy.c
127
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/mii/brgphy.c
265
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/mii/dcphy.c
142
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/mii/mii_physubr.c
401
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/mii/mlphy.c
191
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/mii/xmphy.c
119
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
sys/dev/pci/azalia.c
2662
int nbits, c, chan, i;
sys/dev/pci/azalia.c
2736
for (c = 0; c < group->nconv; c++) {
sys/dev/pci/azalia.c
2742
for (i = 0; i <= c; i++) {
sys/dev/pci/azalia.c
2755
for (c = 0; c < group->nconv; c++) {
sys/dev/pci/azalia.c
2761
for (i = 0; i <= c; i++) {
sys/dev/pci/azalia.c
955
int c, i;
sys/dev/pci/azalia.c
957
c = 0;
sys/dev/pci/azalia.c
960
c++;
sys/dev/pci/azalia.c
962
if (c == 0) {
sys/dev/pci/azalia.c
970
c = -1;
sys/dev/pci/azalia.c
977
if (c < 0)
sys/dev/pci/azalia.c
978
c = i;
sys/dev/pci/azalia.c
980
c = i;
sys/dev/pci/azalia.c
984
az->codecno = c;
sys/dev/pci/drm/amd/amdgpu/amdgpu.h
1587
#define amdgpu_asic_query_video_codecs(adev, e, c) (adev)->asic_funcs->query_video_codecs((adev), (e), (c))
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1888
struct cpuinfo_x86 *c = &cpu_data(0);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1894
if (c->x86_vendor == X86_VENDOR_INTEL)
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1907
if (c->x86_vendor == X86_VENDOR_AMD && c->x86 == 0x17 &&
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1908
c->x86_model == 0x08)
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1930
struct cpuinfo_x86 *c = &cpu_data(0);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1938
if (c->x86 == 6 &&
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
1940
switch (c->x86_model) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_display.h
37
#define amdgpu_display_add_encoder(adev, e, s, c) (adev)->mode_info.funcs->add_encoder((adev), (e), (s), (c))
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
116
u32 c = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
123
places[c].fpfn = adev->gmc.mem_partitions[mem_id].range.fpfn;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
128
places[c].lpfn = adev->gmc.mem_partitions[mem_id].range.lpfn + 1;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
130
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
131
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
133
places[c].mem_type = TTM_PL_VRAM;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
134
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
137
places[c].lpfn = min_not_zero(places[c].lpfn, visible_pfn);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
139
places[c].flags |= TTM_PL_FLAG_TOPDOWN;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
143
places[c].flags |= TTM_PL_FLAG_CONTIGUOUS;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
145
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
149
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
150
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
151
places[c].mem_type = AMDGPU_PL_DOORBELL;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
152
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
153
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
157
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
158
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
159
places[c].mem_type = AMDGPU_PL_MMIO_REMAP;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
160
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
161
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
165
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
166
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
167
places[c].mem_type =
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
170
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
177
places[c].flags |= TTM_PL_FLAG_FALLBACK;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
178
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
182
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
183
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
184
places[c].mem_type = TTM_PL_SYSTEM;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
185
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
186
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
190
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
191
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
192
places[c].mem_type = AMDGPU_PL_GDS;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
193
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
194
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
198
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
199
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
200
places[c].mem_type = AMDGPU_PL_GWS;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
201
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
202
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
206
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
207
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
208
places[c].mem_type = AMDGPU_PL_OA;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
209
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
210
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
213
if (!c) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
214
places[c].fpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
215
places[c].lpfn = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
216
places[c].mem_type = TTM_PL_SYSTEM;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
217
places[c].flags = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
218
c++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
221
BUG_ON(c > AMDGPU_BO_MAX_PLACEMENTS);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
223
placement->num_placement = c;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.h
439
#define amdgpu_ring_emit_gfx_shadow(r, s, c, g, i, v) ((r)->funcs->emit_gfx_shadow((r), (s), (c), (g), (i), (v)))
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
49
static inline void NAME##_attr_init(struct NAME##_caps *c) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
50
{ if (c) bitmap_zero(c->bmap, NAME##_BITMAP_BITS); } \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
51
static inline int NAME##_attr_set(struct NAME##_caps *c, \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
54
if (!c) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
60
bitmap_write(c->bmap, (unsigned long)attr, \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
64
static inline int NAME##_attr_get(const struct NAME##_caps *c, \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
68
if (!c || !out) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
72
v = bitmap_read(c->bmap, NAME##_ATTR_START(cap), AMDGPU_CAP_ATTR_BITS); \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
76
static inline bool NAME##_cap_is_ro(const struct NAME##_caps *c, enum NAME##_cap_id id) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
77
{ enum amdgpu_cap_attr a; return !NAME##_attr_get(c, id, &a) && a == AMDGPU_CAP_ATTR_RO; } \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
78
static inline bool NAME##_cap_is_wo(const struct NAME##_caps *c, enum NAME##_cap_id id) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
79
{ enum amdgpu_cap_attr a; return !NAME##_attr_get(c, id, &a) && a == AMDGPU_CAP_ATTR_WO; } \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
80
static inline bool NAME##_cap_is_rw(const struct NAME##_caps *c, enum NAME##_cap_id id) \
sys/dev/pci/drm/amd/amdgpu/amdgpu_utils.h
81
{ enum amdgpu_cap_attr a; return !NAME##_attr_get(c, id, &a) && a == AMDGPU_CAP_ATTR_RW; }
sys/dev/pci/drm/amd/amdgpu/amdgpu_vf_error.h
27
#define AMDGIM_ERROR_CODE_FLAGS_TO_MAILBOX(c,f) (((c & 0xFFFF) << 16) | (f & 0xFFFF))
sys/dev/pci/drm/amd/amdgpu/amdgpu_vf_error.h
28
#define AMDGIM_ERROR_CODE(t,c) (((t&0xF)<<12)|(c&0xFFF))
sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.h
273
amdgpu_virt_attr_set(void *c,
sys/dev/pci/drm/amd/amdgpu/dce_v10_0.c
903
fixed20_12 a, b, c;
sys/dev/pci/drm/amd/amdgpu/dce_v10_0.c
928
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/amd/amdgpu/dce_v10_0.c
929
b.full = dfixed_div(c, b);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
1000
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
1001
c.full = dfixed_mul(c, amdgpu_crtc->hsc);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
1002
c.full = dfixed_div(c, a);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
1004
c.full = dfixed_div(c, a);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
1005
priority_b_mark = dfixed_trunc(c);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
756
fixed20_12 a, b, c;
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
781
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
782
b.full = dfixed_div(c, b);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
893
fixed20_12 a, b, c;
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
987
c.full = dfixed_const(latency_watermark_a);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
988
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
989
c.full = dfixed_mul(c, amdgpu_crtc->hsc);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
990
c.full = dfixed_div(c, a);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
992
c.full = dfixed_div(c, a);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
993
priority_a_mark = dfixed_trunc(c);
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
999
c.full = dfixed_const(latency_watermark_b);
sys/dev/pci/drm/amd/amdgpu/dce_v8_0.c
856
fixed20_12 a, b, c;
sys/dev/pci/drm/amd/amdgpu/dce_v8_0.c
881
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/amd/amdgpu/dce_v8_0.c
882
b.full = dfixed_div(c, b);
sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c
518
#define AMDGPU_RAS_SUB_BLOCK(subblock, a, b, c, d, e, f, g, h) \
sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c
522
((a) | ((b) << 1) | ((c) << 2) | ((d) << 3)), \
sys/dev/pci/drm/amd/amdkfd/kfd_crat.c
1828
struct cpuinfo_x86 *c = &cpu_data(0);
sys/dev/pci/drm/amd/amdkfd/kfd_crat.c
1831
if (c->x86_vendor == X86_VENDOR_AMD)
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
1154
context->bw_ctx.bw.dcn.watermarks.c = context->bw_ctx.bw.dcn.watermarks.a;
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
580
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_exit_ns =
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
582
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
584
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
586
context->bw_ctx.bw.dcn.watermarks.c.pte_meta_urgent_ns = v->ptemeta_urgent_watermark * 1000;
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
587
context->bw_ctx.bw.dcn.watermarks.c.urgent_ns = v->urgent_watermark * 1000;
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
631
context->bw_ctx.bw.dcn.watermarks.c = context->bw_ctx.bw.dcn.watermarks.a;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1814
context->bw_ctx.bw.dcn.watermarks.c.urgent_ns = get_wm_urgent(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1815
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1816
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_exit_ns = get_wm_stutter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1817
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.pstate_change_ns = get_wm_dram_clock_change(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1818
context->bw_ctx.bw.dcn.watermarks.c.pte_meta_urgent_ns = get_wm_memory_trip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1819
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_nom = get_fraction_of_urgent_bandwidth(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1820
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
2304
calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.c,
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
440
context->bw_ctx.bw.dcn.watermarks.c.urgent_ns = get_wm_urgent(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
441
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
442
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_exit_ns = get_wm_stutter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
443
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.pstate_change_ns = get_wm_dram_clock_change(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
444
context->bw_ctx.bw.dcn.watermarks.c.pte_meta_urgent_ns = get_wm_memory_trip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
445
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_nom = get_fraction_of_urgent_bandwidth(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
446
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
447
context->bw_ctx.bw.dcn.watermarks.c.urgent_latency_ns = get_urgent_latency(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
453
context->bw_ctx.bw.dcn.watermarks.a = context->bw_ctx.bw.dcn.watermarks.c;
sys/dev/pci/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c
453
calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.c,
sys/dev/pci/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c
534
context->bw_ctx.bw.dcn.watermarks.c = context->bw_ctx.bw.dcn.watermarks.a;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2541
context->bw_ctx.bw.dcn.watermarks.c.urgent_ns = get_wm_urgent(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2542
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2543
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.cstate_exit_ns = get_wm_stutter_exit(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2544
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.pstate_change_ns = get_wm_dram_clock_change(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2545
context->bw_ctx.bw.dcn.watermarks.c.pte_meta_urgent_ns = get_wm_memory_trip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2546
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_nom = get_fraction_of_urgent_bandwidth(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2547
context->bw_ctx.bw.dcn.watermarks.c.frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2548
context->bw_ctx.bw.dcn.watermarks.c.urgent_latency_ns = get_urgent_latency(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2553
context->bw_ctx.bw.dcn.watermarks.c.cstate_pstate.fclk_pstate_change_ns = get_wm_dram_clock_change(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2554
context->bw_ctx.bw.dcn.watermarks.c.usr_retraining_ns = get_usr_retraining_watermark(&context->bw_ctx.dml, pipes, pipe_cnt) * 1000;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
2561
context->bw_ctx.bw.dcn.watermarks.a = context->bw_ctx.bw.dcn.watermarks.c;
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
37
static inline double dml_min3(double a, double b, double c)
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
39
return dml_min(dml_min(a, b), c);
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
42
static inline double dml_min4(double a, double b, double c, double d)
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
44
return dml_min(dml_min(a, b), dml_min(c, d));
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
52
static inline double dml_max3(double a, double b, double c)
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
54
return dml_max(dml_max(a, b), c);
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
57
static inline double dml_max4(double a, double b, double c, double d)
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
59
return dml_max(dml_max(a, b), dml_max(c, d));
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
62
static inline double dml_max5(double a, double b, double c, double d, double e)
sys/dev/pci/drm/amd/display/dc/dml/dml_inline_defs.h
64
return dml_max(dml_max4(a, b, c, d), e);
sys/dev/pci/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
42
static int median3(int a, int b, int c)
sys/dev/pci/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
46
if (b > c)
sys/dev/pci/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
47
swap(b, c);
sys/dev/pci/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
49
swap(b, c);
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.c
161
dml_float_t dml_max4(dml_float_t a, dml_float_t b, dml_float_t c, dml_float_t d)
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.c
163
return dml_max(dml_max(a, b), dml_max(c, d));
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.c
165
dml_float_t dml_max5(dml_float_t a, dml_float_t b, dml_float_t c, dml_float_t d, dml_float_t e)
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.c
167
return dml_max(dml_max4(a, b, c, d), e);
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.h
45
__DML_DLL_EXPORT__ dml_float_t dml_max4(dml_float_t a, dml_float_t b, dml_float_t c, dml_float_t d);
sys/dev/pci/drm/amd/display/dc/dml2/display_mode_util.h
46
__DML_DLL_EXPORT__ dml_float_t dml_max5(dml_float_t a, dml_float_t b, dml_float_t c, dml_float_t d, dml_float_t e);
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
837
wm_regs = &watermarks->dcn4x.c;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
488
dml2_extract_watermark_set(&context->bw_ctx.bw.dcn.watermarks.c, &dml2->v20.dml_core_ctx);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
490
memcpy(&context->bw_ctx.bw.dcn.watermarks.c, &dml2->v20.g6_temp_read_watermark_set, sizeof(context->bw_ctx.bw.dcn.watermarks.c));
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
305
if (safe_to_lower || watermarks->c.urgent_ns > hubbub1->watermarks.c.urgent_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
306
hubbub1->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
307
prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
314
watermarks->c.urgent_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
315
} else if (watermarks->c.urgent_ns < hubbub1->watermarks.c.urgent_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
318
if (safe_to_lower || watermarks->c.pte_meta_urgent_ns > hubbub1->watermarks.c.pte_meta_urgent_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
319
hubbub1->watermarks.c.pte_meta_urgent_ns = watermarks->c.pte_meta_urgent_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
320
prog_wm_value = convert_and_clamp(watermarks->c.pte_meta_urgent_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
325
watermarks->c.pte_meta_urgent_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
326
} else if (watermarks->c.pte_meta_urgent_ns < hubbub1->watermarks.c.pte_meta_urgent_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
434
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
435
> hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
436
hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
437
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
439
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
445
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
446
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
447
< hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
450
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
451
> hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
452
hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
453
watermarks->c.cstate_pstate.cstate_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
455
watermarks->c.cstate_pstate.cstate_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
461
watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
462
} else if (watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
463
< hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
547
if (safe_to_lower || watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
548
> hubbub1->watermarks.c.cstate_pstate.pstate_change_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
549
hubbub1->watermarks.c.cstate_pstate.pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
550
watermarks->c.cstate_pstate.pstate_change_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
552
watermarks->c.cstate_pstate.pstate_change_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
558
watermarks->c.cstate_pstate.pstate_change_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
559
} else if (watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
560
< hubbub1->watermarks.c.cstate_pstate.pstate_change_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
243
if (safe_to_lower || watermarks->c.urgent_ns > hubbub1->watermarks.c.urgent_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
244
hubbub1->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
245
prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
253
watermarks->c.urgent_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
254
} else if (watermarks->c.urgent_ns < hubbub1->watermarks.c.urgent_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
278
if (safe_to_lower || watermarks->c.urgent_latency_ns > hubbub1->watermarks.c.urgent_latency_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
279
hubbub1->watermarks.c.urgent_latency_ns = watermarks->c.urgent_latency_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
280
prog_wm_value = convert_and_clamp(watermarks->c.urgent_latency_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
284
} else if (watermarks->c.urgent_latency_ns < hubbub1->watermarks.c.urgent_latency_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
416
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
417
> hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
418
hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
419
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
421
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
428
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
429
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
430
< hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
433
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
434
> hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
435
hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
436
watermarks->c.cstate_pstate.cstate_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
438
watermarks->c.cstate_pstate.cstate_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
445
watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
446
} else if (watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
447
< hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
536
if (safe_to_lower || watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
537
> hubbub1->watermarks.c.cstate_pstate.pstate_change_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
538
hubbub1->watermarks.c.cstate_pstate.pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
539
watermarks->c.cstate_pstate.pstate_change_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
541
watermarks->c.cstate_pstate.pstate_change_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
548
watermarks->c.cstate_pstate.pstate_change_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
549
} else if (watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
550
< hubbub1->watermarks.c.cstate_pstate.pstate_change_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
273
if (safe_to_lower || watermarks->c.urgent_ns > hubbub2->watermarks.c.urgent_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
274
hubbub2->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
275
prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
282
watermarks->c.urgent_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
283
} else if (watermarks->c.urgent_ns < hubbub2->watermarks.c.urgent_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
287
if (safe_to_lower || watermarks->c.frac_urg_bw_flip
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
288
> hubbub2->watermarks.c.frac_urg_bw_flip) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
289
hubbub2->watermarks.c.frac_urg_bw_flip = watermarks->c.frac_urg_bw_flip;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
292
DCHUBBUB_ARB_FRAC_URG_BW_FLIP_C, watermarks->c.frac_urg_bw_flip);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
293
} else if (watermarks->c.frac_urg_bw_flip
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
294
< hubbub2->watermarks.c.frac_urg_bw_flip)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
297
if (safe_to_lower || watermarks->c.frac_urg_bw_nom
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
298
> hubbub2->watermarks.c.frac_urg_bw_nom) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
299
hubbub2->watermarks.c.frac_urg_bw_nom = watermarks->c.frac_urg_bw_nom;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
302
DCHUBBUB_ARB_FRAC_URG_BW_NOM_C, watermarks->c.frac_urg_bw_nom);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
303
} else if (watermarks->c.frac_urg_bw_nom
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
304
< hubbub2->watermarks.c.frac_urg_bw_nom)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
307
if (safe_to_lower || watermarks->c.urgent_latency_ns > hubbub2->watermarks.c.urgent_latency_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
308
hubbub2->watermarks.c.urgent_latency_ns = watermarks->c.urgent_latency_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
309
prog_wm_value = convert_and_clamp(watermarks->c.urgent_latency_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
313
} else if (watermarks->c.urgent_latency_ns < hubbub2->watermarks.c.urgent_latency_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
504
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
505
> hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
506
hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
507
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
509
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
515
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
516
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
517
< hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
520
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
521
> hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
522
hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
523
watermarks->c.cstate_pstate.cstate_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
525
watermarks->c.cstate_pstate.cstate_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
531
watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
532
} else if (watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
533
< hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
536
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
537
> hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
538
hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
539
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
541
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
547
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
548
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
549
< hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
552
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
553
> hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
554
hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
555
watermarks->c.cstate_pstate.cstate_exit_z8_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
557
watermarks->c.cstate_pstate.cstate_exit_z8_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
563
watermarks->c.cstate_pstate.cstate_exit_z8_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
564
} else if (watermarks->c.cstate_pstate.cstate_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
565
< hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
682
if (safe_to_lower || watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
683
> hubbub2->watermarks.c.cstate_pstate.pstate_change_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
684
hubbub2->watermarks.c.cstate_pstate.pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
685
watermarks->c.cstate_pstate.pstate_change_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
687
watermarks->c.cstate_pstate.pstate_change_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
693
watermarks->c.cstate_pstate.pstate_change_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
694
} else if (watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
695
< hubbub2->watermarks.c.cstate_pstate.pstate_change_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
277
if (safe_to_lower || watermarks->c.urgent_ns > hubbub2->watermarks.c.urgent_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
278
hubbub2->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
279
prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
286
watermarks->c.urgent_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
287
} else if (watermarks->c.urgent_ns < hubbub2->watermarks.c.urgent_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
291
if (safe_to_lower || watermarks->c.frac_urg_bw_flip
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
292
> hubbub2->watermarks.c.frac_urg_bw_flip) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
293
hubbub2->watermarks.c.frac_urg_bw_flip = watermarks->c.frac_urg_bw_flip;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
296
DCHUBBUB_ARB_FRAC_URG_BW_FLIP_C, watermarks->c.frac_urg_bw_flip);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
297
} else if (watermarks->c.frac_urg_bw_flip
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
298
< hubbub2->watermarks.c.frac_urg_bw_flip)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
301
if (safe_to_lower || watermarks->c.frac_urg_bw_nom
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
302
> hubbub2->watermarks.c.frac_urg_bw_nom) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
303
hubbub2->watermarks.c.frac_urg_bw_nom = watermarks->c.frac_urg_bw_nom;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
306
DCHUBBUB_ARB_FRAC_URG_BW_NOM_C, watermarks->c.frac_urg_bw_nom);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
307
} else if (watermarks->c.frac_urg_bw_nom
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
308
< hubbub2->watermarks.c.frac_urg_bw_nom)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
311
if (safe_to_lower || watermarks->c.urgent_latency_ns > hubbub2->watermarks.c.urgent_latency_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
312
hubbub2->watermarks.c.urgent_latency_ns = watermarks->c.urgent_latency_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
313
prog_wm_value = convert_and_clamp(watermarks->c.urgent_latency_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
317
} else if (watermarks->c.urgent_latency_ns < hubbub2->watermarks.c.urgent_latency_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
444
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
445
> hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
446
hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
447
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
449
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
455
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
456
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
457
< hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
460
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
461
> hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
462
hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
463
watermarks->c.cstate_pstate.cstate_exit_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
465
watermarks->c.cstate_pstate.cstate_exit_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
471
watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
472
} else if (watermarks->c.cstate_pstate.cstate_exit_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
473
< hubbub2->watermarks.c.cstate_pstate.cstate_exit_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
560
if (safe_to_lower || watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
561
> hubbub2->watermarks.c.cstate_pstate.pstate_change_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
562
hubbub2->watermarks.c.cstate_pstate.pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
563
watermarks->c.cstate_pstate.pstate_change_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
565
watermarks->c.cstate_pstate.pstate_change_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
571
watermarks->c.cstate_pstate.pstate_change_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
572
} else if (watermarks->c.cstate_pstate.pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
573
< hubbub2->watermarks.c.cstate_pstate.pstate_change_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
629
if (safe_to_lower || watermarks->c.cstate_pstate.fclk_pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
630
> hubbub2->watermarks.c.cstate_pstate.fclk_pstate_change_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
631
hubbub2->watermarks.c.cstate_pstate.fclk_pstate_change_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
632
watermarks->c.cstate_pstate.fclk_pstate_change_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
634
watermarks->c.cstate_pstate.fclk_pstate_change_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
640
watermarks->c.cstate_pstate.fclk_pstate_change_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
641
} else if (watermarks->c.cstate_pstate.fclk_pstate_change_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
642
< hubbub2->watermarks.c.cstate_pstate.fclk_pstate_change_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
710
if (safe_to_lower || watermarks->c.usr_retraining_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
711
> hubbub2->watermarks.c.usr_retraining_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
712
hubbub2->watermarks.c.usr_retraining_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
713
watermarks->c.usr_retraining_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
715
watermarks->c.usr_retraining_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
721
watermarks->c.usr_retraining_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
722
} else if (watermarks->c.usr_retraining_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
723
< hubbub2->watermarks.c.usr_retraining_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
190
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
191
> hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
192
hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
193
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
195
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
201
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
202
} else if (watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
203
< hubbub2->watermarks.c.cstate_pstate.cstate_enter_plus_exit_z8_ns)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
206
if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
207
> hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
208
hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns =
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
209
watermarks->c.cstate_pstate.cstate_exit_z8_ns;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
211
watermarks->c.cstate_pstate.cstate_exit_z8_ns,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
217
watermarks->c.cstate_pstate.cstate_exit_z8_ns, prog_wm_value);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
218
} else if (watermarks->c.cstate_pstate.cstate_exit_z8_ns
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
219
< hubbub2->watermarks.c.cstate_pstate.cstate_exit_z8_ns)
sys/dev/pci/drm/amd/display/dc/inc/hw/mem_input.h
58
struct dcn_watermarks c;
sys/dev/pci/drm/amd/display/dc/inc/hw/mem_input.h
64
struct dml2_dchub_watermark_regs c;
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
279
struct fixed31_32 c;
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
287
c = dc_fixpt_from_fraction(55991073, 100000000);
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
294
x = dc_fixpt_sub(in_x, c);
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
310
struct fixed31_32 c;
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
318
c = dc_fixpt_from_fraction(55991073, 100000000);
sys/dev/pci/drm/amd/display/modules/color/color_gamma.c
331
*out_y = dc_fixpt_add(x, c);
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
283
enum phm_platform_caps c)
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
285
caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] |= (1UL <<
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
286
(c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)));
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
290
enum phm_platform_caps c)
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
292
caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] &= ~(1UL << (c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)));
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
295
static inline bool phm_cap_enabled(const uint32_t *caps, enum phm_platform_caps c)
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
297
return (0 != (caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] &
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
298
(1UL << (c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)))));
sys/dev/pci/drm/amd/pm/powerplay/inc/hardwaremanager.h
301
#define PP_CAP(c) phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, (c))
sys/dev/pci/drm/amd/pm/powerplay/inc/smu11_driver_if.h
302
uint32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/smu11_driver_if.h
313
uint32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/smu72.h
52
int32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/smu73.h
43
int32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/smu74.h
77
int32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/vega12/smu9_driver_if.h
204
uint32_t c;
sys/dev/pci/drm/amd/pm/powerplay/inc/vega12/smu9_driver_if.h
215
uint32_t c;
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h
344
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h
355
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h
348
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h
359
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
432
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
438
uint32_t c; // store in fixed point, [31:20] signed integer, [19:0] fractional bits
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
449
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h
228
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
418
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
429
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
419
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
430
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h
434
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h
445
uint32_t c; // store in IEEE float format in this variable
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1639
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1654
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1655
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1656
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1690
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1692
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1695
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1696
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3037
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3052
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3053
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3054
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3088
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3090
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3093
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
3094
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2543
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2558
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2559
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2560
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2594
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2596
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2599
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
2600
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1539
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1554
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1555
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1556
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1590
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1592
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1595
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
1596
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2765
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2780
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2781
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2782
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2816
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2818
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2821
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
2822
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2402
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2417
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2418
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2419
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2457
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2459
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2462
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
2463
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
1989
int i, j, r, c;
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2004
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2005
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2006
SwI2cCmd_t *cmd = &req->SwI2cCmds[c];
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2041
for (c = i = 0; i < num_msgs; i++) {
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2043
c += msg[i].len;
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2046
for (j = 0; j < msg[i].len; j++, c++) {
sys/dev/pci/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
2047
SwI2cCmd_t *cmd = &res->SwI2cCmds[c];
sys/dev/pci/drm/drm_atomic.c
1149
struct __drm_connnectors_state *c;
sys/dev/pci/drm/drm_atomic.c
1153
c = krealloc_array(state->connectors, alloc,
sys/dev/pci/drm/drm_atomic.c
1155
if (!c)
sys/dev/pci/drm/drm_atomic.c
1158
c = kmalloc_array(alloc,
sys/dev/pci/drm/drm_atomic.c
1160
if (!c)
sys/dev/pci/drm/drm_atomic.c
1162
memcpy(c, state->connectors,
sys/dev/pci/drm/drm_atomic.c
1167
state->connectors = c;
sys/dev/pci/drm/drm_atomic_uapi.c
1209
int i, c = 0, ret;
sys/dev/pci/drm/drm_atomic_uapi.c
1281
c++;
sys/dev/pci/drm/drm_atomic_uapi.c
1335
if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT)) {
sys/dev/pci/drm/drm_draw_internal.h
22
char c, size_t font_pitch)
sys/dev/pci/drm/drm_draw_internal.h
24
return font->data + (c * font->height) * font_pitch;
sys/dev/pci/drm/drm_edid.c
3012
#define MODE_REFRESH_DIFF(c,t) (abs((c) - (t)))
sys/dev/pci/drm/drm_edid.c
3245
BUILD_BUG_ON(offsetof(typeof(*descriptor), data.other_data.data.range.formula.gtf2.c) != 13);
sys/dev/pci/drm/drm_edid.c
3247
return descriptor ? descriptor->data.other_data.data.range.formula.gtf2.c : 0;
sys/dev/pci/drm/drm_edid.c
3859
do_inferred_modes(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
3861
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_edid.c
3944
do_established_modes(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
3946
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_edid.c
3993
do_standard_modes(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
3995
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_edid.c
4102
do_cvt_mode(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
4104
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_edid.c
4132
do_detailed_mode(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
4134
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_edid.c
6513
void get_monitor_range(const struct detailed_timing *timing, void *c)
sys/dev/pci/drm/drm_edid.c
6515
struct detailed_mode_closure *closure = c;
sys/dev/pci/drm/drm_linux.c
770
memchr_inv(const void *s, int c, size_t n)
sys/dev/pci/drm/drm_linux.c
776
if (*p++ != (unsigned char)c)
sys/dev/pci/drm/drm_trace.h
5
#define trace_drm_vblank_event(a, b, c, d)
sys/dev/pci/drm/drm_trace.h
6
#define trace_drm_vblank_event_queued(a, b, c)
sys/dev/pci/drm/drm_trace.h
7
#define trace_drm_vblank_event_delivered(a, b, c)
sys/dev/pci/drm/i915/display/intel_color.c
601
s64 c = CTM_COEFF_ABS(coeff);
sys/dev/pci/drm/i915/display/intel_color.c
604
c >>= 32 - frac_bits - 1;
sys/dev/pci/drm/i915/display/intel_color.c
607
c = (c + 1) >> 1;
sys/dev/pci/drm/i915/display/intel_color.c
610
c = -c;
sys/dev/pci/drm/i915/display/intel_color.c
612
c = clamp(c, -(s64)BIT(int_bits + frac_bits - 1),
sys/dev/pci/drm/i915/display/intel_color.c
615
return c & (BIT(int_bits + frac_bits) - 1);
sys/dev/pci/drm/i915/display/intel_connector.h
28
int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *ddc);
sys/dev/pci/drm/i915/display/intel_display_reg_defs.h
32
#define _MMIO_BASE_PIPE3(base, pipe, a, b, c) _MMIO((base) + _PICK_EVEN_2RANGES(pipe, 1, a, a, b, c))
sys/dev/pci/drm/i915/display/intel_display_reg_defs.h
33
#define _MMIO_BASE_PORT3(base, pipe, a, b, c) _MMIO((base) + _PICK_EVEN_2RANGES(pipe, 1, a, a, b, c))
sys/dev/pci/drm/i915/display/intel_display_trace.h
18
#define trace_intel_frontbuffer_flush(a, b, c)
sys/dev/pci/drm/i915/display/intel_display_trace.h
19
#define trace_intel_frontbuffer_invalidate(a, b, c)
sys/dev/pci/drm/i915/display/intel_display_trace.h
20
#define trace_intel_memory_cxsr(a, b, c)
sys/dev/pci/drm/i915/display/intel_display_trace.h
25
#define trace_intel_pipe_scaler_update_arm(a, b, c, d, e, f)
sys/dev/pci/drm/i915/display/intel_display_trace.h
26
#define trace_intel_pipe_update_end(a, b, c)
sys/dev/pci/drm/i915/display/intel_display_trace.h
29
#define trace_intel_plane_async_flip(a, b, c)
sys/dev/pci/drm/i915/display/intel_display_trace.h
31
#define trace_intel_plane_scaler_update_arm(a, b, c, d, e, f)
sys/dev/pci/drm/i915/display/intel_display_trace.h
35
#define trace_vlv_fifo_size(a, b, c, d)
sys/dev/pci/drm/i915/display/intel_dp_aux_regs.h
74
#define DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL(c) REG_FIELD_PREP(DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL_MASK, (c) - 1)
sys/dev/pci/drm/i915/display/intel_dp_aux_regs.h
76
#define DP_AUX_CH_CTL_SYNC_PULSE_SKL(c) REG_FIELD_PREP(DP_AUX_CH_CTL_SYNC_PULSE_SKL_MASK, (c) - 1)
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
878
u64 a, b, c, d, diff, diff_best;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
907
c = 1000000 * diff;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
910
if (a < c && b < d) {
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
917
} else if (a >= c && b < d) {
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
922
} else if (a >= c && b >= d) {
sys/dev/pci/drm/i915/display/intel_overlay.c
114
#define RGB30_TO_COLORKEY(c) \
sys/dev/pci/drm/i915/display/intel_overlay.c
115
((((c) & 0x3fc00000) >> 6) | (((c) & 0x000ff000) >> 4) | (((c) & 0x000003fc) >> 2))
sys/dev/pci/drm/i915/display/intel_overlay.c
116
#define RGB16_TO_COLORKEY(c) \
sys/dev/pci/drm/i915/display/intel_overlay.c
117
((((c) & 0xf800) << 8) | (((c) & 0x07e0) << 5) | (((c) & 0x001f) << 3))
sys/dev/pci/drm/i915/display/intel_overlay.c
118
#define RGB15_TO_COLORKEY(c) \
sys/dev/pci/drm/i915/display/intel_overlay.c
119
((((c) & 0x7c00) << 9) | (((c) & 0x03e0) << 6) | (((c) & 0x001f) << 3))
sys/dev/pci/drm/i915/display/intel_overlay.c
120
#define RGB8I_TO_COLORKEY(c) \
sys/dev/pci/drm/i915/display/intel_overlay.c
121
((((c) & 0xff) << 16) | (((c) & 0xff) << 8) | (((c) & 0xff) << 0))
sys/dev/pci/drm/i915/display/intel_sdvo.c
66
#define IS_TV(c) ((c)->output_flag & SDVO_TV_MASK)
sys/dev/pci/drm/i915/display/intel_sdvo.c
67
#define IS_TMDS(c) ((c)->output_flag & SDVO_TMDS_MASK)
sys/dev/pci/drm/i915/display/intel_sdvo.c
68
#define IS_LVDS(c) ((c)->output_flag & SDVO_LVDS_MASK)
sys/dev/pci/drm/i915/display/intel_sdvo.c
69
#define IS_TV_OR_LVDS(c) ((c)->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
sys/dev/pci/drm/i915/display/intel_sdvo.c
70
#define IS_DIGITAL(c) ((c)->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
sys/dev/pci/drm/i915/display/intel_sdvo.c
72
#define HAS_DDC(c) ((c)->output_flag & (SDVO_RGB_MASK | SDVO_TMDS_MASK | \
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
162
int c, a = 0;
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
187
c = mpll_ana_v2i - 2;
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
191
if (vco_clk <= curve_freq_hz[c][i + 1]) {
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
198
get_ana_cp_int_prop(vco_clk, refclk_postscalar, mpll_ana_v2i, c, a,
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
52
int c, int a,
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
79
curve_0_interpolated = interp(vco_clk, curve_freq_hz[c][a], curve_freq_hz[c][a + 1],
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
80
curve_0[c][a], curve_0[c][a + 1]);
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
82
curve_2_interpolated = interp(vco_clk, curve_freq_hz[c][a], curve_freq_hz[c][a + 1],
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
83
curve_2[c][a], curve_2[c][a + 1]);
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
85
curve_1_interpolated = interp(vco_clk, curve_freq_hz[c][a], curve_freq_hz[c][a + 1],
sys/dev/pci/drm/i915/display/intel_snps_hdmi_pll.c
86
curve_1[c][a], curve_1[c][a + 1]);
sys/dev/pci/drm/i915/display/vlv_dsi_regs.h
16
#define _MIPI_PORT(port, a, c) (((port) == PORT_A) ? a : c) /* ports A and C only */
sys/dev/pci/drm/i915/display/vlv_dsi_regs.h
17
#define _MMIO_MIPI(base, port, a, c) _MMIO((base) + _MIPI_PORT(port, a, c))
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
1621
char __maybe_unused c;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
1637
int err = __get_user(c, addr);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
1641
return __get_user(c, end - 1);
sys/dev/pci/drm/i915/gem/i915_gem_shmem.c
545
char __maybe_unused c;
sys/dev/pci/drm/i915/gem/i915_gem_shmem.c
552
err = __get_user(c, user_data);
sys/dev/pci/drm/i915/gem/i915_gem_shmem.c
556
err = __get_user(c, user_data + len - 1);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_mman.c
1719
char __maybe_unused c;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_mman.c
1726
err = __get_user(c, addr);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_mman.c
1731
return __get_user(c, end - 1);
sys/dev/pci/drm/i915/gt/intel_rps.c
270
u16 c;
sys/dev/pci/drm/i915/gt/intel_rps.c
303
rps->ips.c = cparams[i].c;
sys/dev/pci/drm/i915/gt/intel_rps.c
351
result = div_u64(div_u64(ips->m * delta, dt) + ips->c, 10);
sys/dev/pci/drm/i915/gt/intel_rps_types.h
24
int c, m;
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1931
static int preempt_client_init(struct intel_gt *gt, struct preempt_client *c)
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1933
c->ctx = kernel_context(gt->i915, NULL);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1934
if (!c->ctx)
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1937
if (igt_spinner_init(&c->spin, gt))
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1943
kernel_context_close(c->ctx);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1947
static void preempt_client_fini(struct preempt_client *c)
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1949
igt_spinner_fini(&c->spin);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1950
kernel_context_close(c->ctx);
sys/dev/pci/drm/i915/gt/uc/intel_guc_fwif.h
159
#define SLPC_EVENT(id, c) (\
sys/dev/pci/drm/i915/gt/uc/intel_guc_fwif.h
161
FIELD_PREP(HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ARGC, c) \
sys/dev/pci/drm/i915/gvt/dmabuf.c
246
static bool validate_hotspot(struct intel_vgpu_cursor_plane_format *c)
sys/dev/pci/drm/i915/gvt/dmabuf.c
248
if (c && c->x_hot <= c->width && c->y_hot <= c->height)
sys/dev/pci/drm/i915/gvt/dmabuf.c
260
struct intel_vgpu_cursor_plane_format c;
sys/dev/pci/drm/i915/gvt/dmabuf.c
296
ret = intel_vgpu_decode_cursor_plane(vgpu, &c);
sys/dev/pci/drm/i915/gvt/dmabuf.c
299
info->start = c.base;
sys/dev/pci/drm/i915/gvt/dmabuf.c
300
info->start_gpa = c.base_gpa;
sys/dev/pci/drm/i915/gvt/dmabuf.c
301
info->width = c.width;
sys/dev/pci/drm/i915/gvt/dmabuf.c
302
info->height = c.height;
sys/dev/pci/drm/i915/gvt/dmabuf.c
303
info->stride = c.width * (c.bpp / 8);
sys/dev/pci/drm/i915/gvt/dmabuf.c
304
info->drm_format = c.drm_format;
sys/dev/pci/drm/i915/gvt/dmabuf.c
306
info->x_pos = c.x_pos;
sys/dev/pci/drm/i915/gvt/dmabuf.c
307
info->y_pos = c.y_pos;
sys/dev/pci/drm/i915/gvt/dmabuf.c
309
if (validate_hotspot(&c)) {
sys/dev/pci/drm/i915/gvt/dmabuf.c
310
info->x_hot = c.x_hot;
sys/dev/pci/drm/i915/gvt/dmabuf.c
311
info->y_hot = c.y_hot;
sys/dev/pci/drm/i915/gvt/scheduler.c
920
check_shadow_context_ppgtt(struct execlist_ring_context *c, struct intel_vgpu_mm *m)
sys/dev/pci/drm/i915/gvt/scheduler.c
923
u64 shadow_pdp = c->pdps[7].val | (u64) c->pdps[6].val << 32;
sys/dev/pci/drm/i915/i915_gpu_error.c
1559
struct intel_engine_capture_vma *c;
sys/dev/pci/drm/i915/i915_gpu_error.c
1564
c = kmalloc(sizeof(*c), gfp);
sys/dev/pci/drm/i915/i915_gpu_error.c
1565
if (!c)
sys/dev/pci/drm/i915/i915_gpu_error.c
1568
if (!i915_vma_resource_hold(vma_res, &c->lockdep_cookie)) {
sys/dev/pci/drm/i915/i915_gpu_error.c
1569
kfree(c);
sys/dev/pci/drm/i915/i915_gpu_error.c
1573
strscpy(c->name, name, sizeof(c->name));
sys/dev/pci/drm/i915/i915_gpu_error.c
1574
c->vma_res = i915_vma_resource_get(vma_res);
sys/dev/pci/drm/i915/i915_gpu_error.c
1576
c->next = next;
sys/dev/pci/drm/i915/i915_gpu_error.c
1577
return c;
sys/dev/pci/drm/i915/i915_gpu_error.c
1607
struct i915_capture_list *c;
sys/dev/pci/drm/i915/i915_gpu_error.c
1609
for (c = rq->capture_list; c; c = c->next)
sys/dev/pci/drm/i915/i915_gpu_error.c
1610
capture = capture_vma_snapshot(capture, c->vma_res, gfp,
sys/dev/pci/drm/i915/i915_gpu_error.c
278
static bool compress_init(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
280
struct z_stream_s *zstream = &c->zstream;
sys/dev/pci/drm/i915/i915_gpu_error.c
282
if (intel_pool_init(&c->pool, ALLOW_FAIL))
sys/dev/pci/drm/i915/i915_gpu_error.c
289
pool_fini(&c->pool);
sys/dev/pci/drm/i915/i915_gpu_error.c
293
c->tmp = NULL;
sys/dev/pci/drm/i915/i915_gpu_error.c
295
c->tmp = pool_alloc(&c->pool, ALLOW_FAIL);
sys/dev/pci/drm/i915/i915_gpu_error.c
300
static bool compress_start(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
302
struct z_stream_s *zstream = &c->zstream;
sys/dev/pci/drm/i915/i915_gpu_error.c
311
static void *compress_next_page(struct i915_vma_compress *c,
sys/dev/pci/drm/i915/i915_gpu_error.c
317
page_addr = pool_alloc(&c->pool, ALLOW_FAIL);
sys/dev/pci/drm/i915/i915_gpu_error.c
326
static int compress_page(struct i915_vma_compress *c,
sys/dev/pci/drm/i915/i915_gpu_error.c
331
struct z_stream_s *zstream = &c->zstream;
sys/dev/pci/drm/i915/i915_gpu_error.c
334
if (wc && c->tmp && i915_memcpy_from_wc(c->tmp, src, PAGE_SIZE))
sys/dev/pci/drm/i915/i915_gpu_error.c
335
zstream->next_in = c->tmp;
sys/dev/pci/drm/i915/i915_gpu_error.c
340
zstream->next_out = compress_next_page(c, dst);
sys/dev/pci/drm/i915/i915_gpu_error.c
360
static int compress_flush(struct i915_vma_compress *c,
sys/dev/pci/drm/i915/i915_gpu_error.c
363
struct z_stream_s *zstream = &c->zstream;
sys/dev/pci/drm/i915/i915_gpu_error.c
368
zstream->next_out = compress_next_page(c, dst);
sys/dev/pci/drm/i915/i915_gpu_error.c
389
static void compress_finish(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
391
zlib_deflateEnd(&c->zstream);
sys/dev/pci/drm/i915/i915_gpu_error.c
394
static void compress_fini(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
396
kfree(c->zstream.workspace);
sys/dev/pci/drm/i915/i915_gpu_error.c
397
if (c->tmp)
sys/dev/pci/drm/i915/i915_gpu_error.c
398
pool_free(&c->pool, c->tmp);
sys/dev/pci/drm/i915/i915_gpu_error.c
399
pool_fini(&c->pool);
sys/dev/pci/drm/i915/i915_gpu_error.c
413
static bool compress_init(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
415
return intel_pool_init(&c->pool, ALLOW_FAIL) == 0;
sys/dev/pci/drm/i915/i915_gpu_error.c
418
static bool compress_start(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
423
static int compress_page(struct i915_vma_compress *c,
sys/dev/pci/drm/i915/i915_gpu_error.c
433
ptr = pool_alloc(&c->pool, ALLOW_FAIL);
sys/dev/pci/drm/i915/i915_gpu_error.c
446
static int compress_flush(struct i915_vma_compress *c,
sys/dev/pci/drm/i915/i915_gpu_error.c
452
static void compress_finish(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
456
static void compress_fini(struct i915_vma_compress *c)
sys/dev/pci/drm/i915/i915_gpu_error.c
458
pool_fini(&c->pool);
sys/dev/pci/drm/i915/i915_trace.h
10
#define trace_i915_gem_evict(a, b, c, d)
sys/dev/pci/drm/i915/i915_trace.h
11
#define trace_i915_gem_evict_node(a, b, c)
sys/dev/pci/drm/i915/i915_trace.h
16
#define trace_i915_gem_object_fault(a, b, c, d)
sys/dev/pci/drm/i915/i915_trace.h
17
#define trace_i915_gem_object_pread(a, b, c)
sys/dev/pci/drm/i915/i915_trace.h
18
#define trace_i915_gem_object_pwrite(a, b, c)
sys/dev/pci/drm/i915/i915_trace.h
19
#define trace_i915_gem_shrink(a, b, c)
sys/dev/pci/drm/i915/i915_trace.h
22
#define trace_i915_reg_rw(a, b, c, d, e)
sys/dev/pci/drm/i915/intel_uncore_trace.h
8
#define trace_i915_reg_rw(a, b, c, d, e)
sys/dev/pci/drm/include/drm/drm_edid.h
130
u8 c; /* need to divide by 2 */
sys/dev/pci/drm/include/drm/drm_modes.h
134
#define DRM_MODE(nm, t, c, hd, hss, hse, ht, hsk, vd, vss, vse, vt, vs, f) \
sys/dev/pci/drm/include/drm/drm_modes.h
135
.name = nm, .status = 0, .type = (t), .clock = (c), \
sys/dev/pci/drm/include/linux/ctype.h
31
isascii(int c)
sys/dev/pci/drm/include/linux/ctype.h
33
return ((unsigned int)c <= 0177);
sys/dev/pci/drm/include/linux/ctype.h
37
isprint(int c)
sys/dev/pci/drm/include/linux/ctype.h
39
if (c == -1)
sys/dev/pci/drm/include/linux/ctype.h
41
if ((unsigned char)c >= 040 && (unsigned char)c <= 0176)
sys/dev/pci/drm/include/linux/ctype.h
47
isgraph(int c)
sys/dev/pci/drm/include/linux/ctype.h
49
if (c == -1)
sys/dev/pci/drm/include/linux/ctype.h
51
if ((unsigned char)c >= 041 && (unsigned char)c <= 0176)
sys/dev/pci/drm/include/linux/ctype.h
57
isspace(int c)
sys/dev/pci/drm/include/linux/ctype.h
59
return (c == ' ' || c == '\t');
sys/dev/pci/drm/include/linux/debugfs.h
11
#define debugfs_create_atomic_t(a, b, c, d)
sys/dev/pci/drm/include/linux/debugfs.h
14
#define debugfs_create_file(a, b, c, d, e) ERR_PTR(-ENOSYS)
sys/dev/pci/drm/include/linux/debugfs.h
15
#define debugfs_create_file_unsafe(a, b, c, d, e) ERR_PTR(-ENOSYS)
sys/dev/pci/drm/include/linux/debugfs.h
16
#define debugfs_create_bool(a, b, c, d)
sys/dev/pci/drm/include/linux/debugfs.h
18
#define DEFINE_DEBUGFS_ATTRIBUTE(a, b, c, d)
sys/dev/pci/drm/include/linux/dynamic_debug.h
6
#define DECLARE_DYNDBG_CLASSMAP(a, b, c, ...)
sys/dev/pci/drm/include/linux/eventfd.h
12
eventfd_signal(struct eventfd_ctx *c)
sys/dev/pci/drm/include/linux/eventfd.h
17
eventfd_ctx_put(struct eventfd_ctx *c)
sys/dev/pci/drm/include/linux/fb.h
74
#define FB_GEN_DEFAULT_DEFERRED_IOMEM_OPS(a, b, c)
sys/dev/pci/drm/include/linux/fb.h
75
#define FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS(a, b, c)
sys/dev/pci/drm/include/linux/fb.h
76
#define FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(a, b, c)
sys/dev/pci/drm/include/linux/firmware.h
53
#define request_firmware_nowait(a, b, c, d, e, f, g) -EINVAL
sys/dev/pci/drm/include/linux/fs.h
30
#define DEFINE_SIMPLE_ATTRIBUTE(a, b, c, d)
sys/dev/pci/drm/include/linux/gcd.h
40
unsigned long c;
sys/dev/pci/drm/include/linux/gcd.h
42
c = a % b;
sys/dev/pci/drm/include/linux/gcd.h
43
while (c != 0) {
sys/dev/pci/drm/include/linux/gcd.h
45
b = c;
sys/dev/pci/drm/include/linux/gcd.h
46
c = a % b;
sys/dev/pci/drm/include/linux/iosys-map.h
39
iosys_map_memset(struct iosys_map *ism, size_t off, int c, size_t len)
sys/dev/pci/drm/include/linux/iosys-map.h
42
memset_io(ism->vaddr_iomem + off, c, len);
sys/dev/pci/drm/include/linux/iosys-map.h
44
memset(ism->vaddr + off, c, len);
sys/dev/pci/drm/include/linux/kernel.h
140
#define PTR_IF(c, p) ((c) ? (p) : NULL)
sys/dev/pci/drm/include/linux/lockdep.h
16
#define lockdep_assert(c) do {} while(0)
sys/dev/pci/drm/include/linux/lockdep.h
22
#define lock_acquire(lock, a, b, c, d, e, f)
sys/dev/pci/drm/include/linux/lockdep.h
24
#define lock_acquire_shared_recursive(lock, a, b, c, d)
sys/dev/pci/drm/include/linux/lockdep.h
28
#define lockdep_init_map(a, b, c, d)
sys/dev/pci/drm/include/linux/lockdep.h
29
#define lockdep_set_class_and_name(a, b, c)
sys/dev/pci/drm/include/linux/lockdep.h
32
#define mutex_acquire(a, b, c, d)
sys/dev/pci/drm/include/linux/of.h
70
#define of_parse_phandle_with_args(n, a, b, c, d) \
sys/dev/pci/drm/include/linux/of.h
71
__of_parse_phandle_with_args(__of_node(n), (a), (b), (c), (d))
sys/dev/pci/drm/include/linux/of_device.h
10
#define of_device_is_compatible(n, c) \
sys/dev/pci/drm/include/linux/of_device.h
11
__of_device_is_compatible(__of_node(n), (c))
sys/dev/pci/drm/include/linux/pci.h
328
pcie_capability_clear_word(struct pci_dev *pdev, int off, u16 c)
sys/dev/pci/drm/include/linux/pci.h
332
r &= ~c;
sys/dev/pci/drm/include/linux/pci.h
338
pcie_capability_clear_and_set_word(struct pci_dev *pdev, int off, u16 c, u16 s)
sys/dev/pci/drm/include/linux/pci.h
342
r &= ~c;
sys/dev/pci/drm/include/linux/rbtree.h
65
#define rb_set_color(r, c) rb_color((r)) = (c)
sys/dev/pci/drm/include/linux/rculist.h
13
#define list_for_each_entry_lockless(a, b, c) list_for_each_entry(a, b, c)
sys/dev/pci/drm/include/linux/rcupdate.h
14
#define rcu_dereference_protected(p, c) (p)
sys/dev/pci/drm/include/linux/rcupdate.h
15
#define rcu_dereference_check(p, c) (p)
sys/dev/pci/drm/include/linux/rcupdate.h
25
#define rcu_replace_pointer(rp, p, c) \
sys/dev/pci/drm/include/linux/seq_file.h
21
seq_putc(struct seq_file *m, char c)
sys/dev/pci/drm/include/linux/string.h
25
memset32(uint32_t *b, uint32_t c, size_t len)
sys/dev/pci/drm/include/linux/string.h
29
*dst++ = c;
sys/dev/pci/drm/include/linux/string.h
34
memset64(uint64_t *b, uint64_t c, size_t len)
sys/dev/pci/drm/include/linux/string.h
38
*dst++ = c;
sys/dev/pci/drm/include/media/cec-notifier.h
26
const struct drm_connector *c)
sys/dev/pci/drm/include/uapi/drm/drm_fourcc.h
1012
#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
sys/dev/pci/drm/include/uapi/drm/drm_fourcc.h
1019
(((c) & 0x7) << 23)))
sys/dev/pci/drm/include/uapi/drm/drm_fourcc.h
105
#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
sys/dev/pci/drm/include/uapi/drm/drm_fourcc.h
106
((__u32)(c) << 16) | ((__u32)(d) << 24))
sys/dev/pci/drm/linux_sort.c
76
med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *))
sys/dev/pci/drm/linux_sort.c
79
(cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
sys/dev/pci/drm/linux_sort.c
80
:(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c ));
sys/dev/pci/drm/linux_sort_r.c
77
med3(char *a, char *b, char *c,
sys/dev/pci/drm/linux_sort_r.c
82
(cmp(b, c, p) < 0 ? b : (cmp(a, c, p) < 0 ? c : a ))
sys/dev/pci/drm/linux_sort_r.c
83
:(cmp(b, c, p) > 0 ? b : (cmp(a, c, p) < 0 ? a : c ));
sys/dev/pci/drm/radeon/cik.c
9126
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/cik.c
9151
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/radeon/cik.c
9152
b.full = dfixed_div(c, b);
sys/dev/pci/drm/radeon/evergreen.c
2076
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/evergreen.c
2099
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/radeon/evergreen.c
2100
b.full = dfixed_div(c, b);
sys/dev/pci/drm/radeon/evergreen.c
2170
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/evergreen.c
2261
c.full = dfixed_const(latency_watermark_a);
sys/dev/pci/drm/radeon/evergreen.c
2262
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/radeon/evergreen.c
2263
c.full = dfixed_mul(c, radeon_crtc->hsc);
sys/dev/pci/drm/radeon/evergreen.c
2264
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/evergreen.c
2266
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/evergreen.c
2267
priority_a_mark = dfixed_trunc(c);
sys/dev/pci/drm/radeon/evergreen.c
2273
c.full = dfixed_const(latency_watermark_b);
sys/dev/pci/drm/radeon/evergreen.c
2274
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/radeon/evergreen.c
2275
c.full = dfixed_mul(c, radeon_crtc->hsc);
sys/dev/pci/drm/radeon/evergreen.c
2276
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/evergreen.c
2278
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/evergreen.c
2279
priority_b_mark = dfixed_trunc(c);
sys/dev/pci/drm/radeon/mkregtable.c
146
unsigned nlloop, i, j, n, c, id;
sys/dev/pci/drm/radeon/mkregtable.c
149
c = t->nentry;
sys/dev/pci/drm/radeon/mkregtable.c
154
if (n > c)
sys/dev/pci/drm/radeon/mkregtable.c
155
n = c;
sys/dev/pci/drm/radeon/mkregtable.c
156
c -= n;
sys/dev/pci/drm/radeon/r100.c
1339
unsigned c, i;
sys/dev/pci/drm/radeon/r100.c
1348
c = radeon_get_ib_value(p, idx++) & 0x1F;
sys/dev/pci/drm/radeon/r100.c
1349
if (c > 16) {
sys/dev/pci/drm/radeon/r100.c
1355
track->num_arrays = c;
sys/dev/pci/drm/radeon/r100.c
1356
for (i = 0; i < (c - 1); i += 2, idx += 3) {
sys/dev/pci/drm/radeon/r100.c
1382
if (c & 1) {
sys/dev/pci/drm/radeon/r100.c
3233
int c;
sys/dev/pci/drm/radeon/r100.c
3437
c = 3;
sys/dev/pci/drm/radeon/r100.c
3440
c = 1;
sys/dev/pci/drm/radeon/r100.c
3444
c = 3;
sys/dev/pci/drm/radeon/r100.c
3449
temp_ff.full = dfixed_const(c);
sys/dev/pci/drm/radeon/r600_dpm.c
378
void r600_set_tpc(struct radeon_device *rdev, u32 c)
sys/dev/pci/drm/radeon/r600_dpm.c
380
WREG32_P(CG_TPC, TPCC(c), ~TPCC_MASK);
sys/dev/pci/drm/radeon/r600_dpm.h
160
void r600_set_tpc(struct radeon_device *rdev, u32 c);
sys/dev/pci/drm/radeon/radeon_object.c
100
rbo->placements[c].mem_type = TTM_PL_TT;
sys/dev/pci/drm/radeon/radeon_object.c
101
rbo->placements[c++].flags = 0;
sys/dev/pci/drm/radeon/radeon_object.c
105
rbo->placements[c].fpfn = 0;
sys/dev/pci/drm/radeon/radeon_object.c
106
rbo->placements[c].mem_type = TTM_PL_SYSTEM;
sys/dev/pci/drm/radeon/radeon_object.c
107
rbo->placements[c++].flags = 0;
sys/dev/pci/drm/radeon/radeon_object.c
109
if (!c) {
sys/dev/pci/drm/radeon/radeon_object.c
110
rbo->placements[c].fpfn = 0;
sys/dev/pci/drm/radeon/radeon_object.c
111
rbo->placements[c].mem_type = TTM_PL_SYSTEM;
sys/dev/pci/drm/radeon/radeon_object.c
112
rbo->placements[c++].flags = 0;
sys/dev/pci/drm/radeon/radeon_object.c
115
rbo->placement.num_placement = c;
sys/dev/pci/drm/radeon/radeon_object.c
117
for (i = 0; i < c; ++i) {
sys/dev/pci/drm/radeon/radeon_object.c
78
u32 c = 0, i;
sys/dev/pci/drm/radeon/radeon_object.c
87
rbo->placements[c].fpfn =
sys/dev/pci/drm/radeon/radeon_object.c
89
rbo->placements[c].mem_type = TTM_PL_VRAM;
sys/dev/pci/drm/radeon/radeon_object.c
90
rbo->placements[c++].flags = 0;
sys/dev/pci/drm/radeon/radeon_object.c
93
rbo->placements[c].fpfn = 0;
sys/dev/pci/drm/radeon/radeon_object.c
94
rbo->placements[c].mem_type = TTM_PL_VRAM;
sys/dev/pci/drm/radeon/radeon_object.c
95
rbo->placements[c++].flags = 0;
sys/dev/pci/drm/radeon/radeon_object.c
99
rbo->placements[c].fpfn = 0;
sys/dev/pci/drm/radeon/radeon_vce.c
105
c += strlen(fw_version);
sys/dev/pci/drm/radeon/radeon_vce.c
107
if (sscanf(c, "%2hhd.%2hhd.%2hhd]", &start, &mid, &end) != 3)
sys/dev/pci/drm/radeon/radeon_vce.c
110
if (c[2] != '.') {
sys/dev/pci/drm/radeon/radeon_vce.c
114
start = (10 * (c[0] - '0')) + (c[1] - '0');
sys/dev/pci/drm/radeon/radeon_vce.c
115
c += 3;
sys/dev/pci/drm/radeon/radeon_vce.c
117
if (c[1] != '.') {
sys/dev/pci/drm/radeon/radeon_vce.c
121
mid = c[0] - '0';
sys/dev/pci/drm/radeon/radeon_vce.c
122
c += 2;
sys/dev/pci/drm/radeon/radeon_vce.c
124
if (c[1] != ']') {
sys/dev/pci/drm/radeon/radeon_vce.c
128
end = c[0] - '0';
sys/dev/pci/drm/radeon/radeon_vce.c
134
c = rdev->vce_fw->data;
sys/dev/pci/drm/radeon/radeon_vce.c
135
for (; size > 0; --size, ++c)
sys/dev/pci/drm/radeon/radeon_vce.c
136
if (strncmp(c, fb_version, strlen(fb_version)) == 0)
sys/dev/pci/drm/radeon/radeon_vce.c
142
c += strlen(fb_version);
sys/dev/pci/drm/radeon/radeon_vce.c
144
if (sscanf(c, "%2u]", &rdev->vce.fb_version) != 1)
sys/dev/pci/drm/radeon/radeon_vce.c
147
if (c[2] != ']') {
sys/dev/pci/drm/radeon/radeon_vce.c
151
rdev->vce.fb_version = (10 * (c[0] - '0')) + (c[1] - '0');
sys/dev/pci/drm/radeon/radeon_vce.c
61
const char *fw_name, *c;
sys/dev/pci/drm/radeon/radeon_vce.c
97
c = rdev->vce_fw->data;
sys/dev/pci/drm/radeon/radeon_vce.c
98
for (; size > 0; --size, ++c)
sys/dev/pci/drm/radeon/radeon_vce.c
99
if (strncmp(c, fw_version, strlen(fw_version)) == 0)
sys/dev/pci/drm/radeon/rs690.c
278
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/rs690.c
311
c.full = dfixed_const(256);
sys/dev/pci/drm/radeon/rs690.c
312
a.full = dfixed_div(b, c);
sys/dev/pci/drm/radeon/rs690.c
336
c.full = dfixed_const(2);
sys/dev/pci/drm/radeon/rs690.c
337
b.full = dfixed_div(b, c);
sys/dev/pci/drm/radeon/rv515.c
929
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/rv515.c
959
c.full = dfixed_const(256);
sys/dev/pci/drm/radeon/rv515.c
960
a.full = dfixed_div(b, c);
sys/dev/pci/drm/radeon/rv515.c
984
c.full = dfixed_const(2);
sys/dev/pci/drm/radeon/rv515.c
985
b.full = dfixed_div(b, c);
sys/dev/pci/drm/radeon/si.c
2193
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/si.c
2218
c.full = dfixed_const(lb_fill_bw);
sys/dev/pci/drm/radeon/si.c
2219
b.full = dfixed_div(c, b);
sys/dev/pci/drm/radeon/si.c
2288
fixed20_12 a, b, c;
sys/dev/pci/drm/radeon/si.c
2385
c.full = dfixed_const(latency_watermark_a);
sys/dev/pci/drm/radeon/si.c
2386
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/radeon/si.c
2387
c.full = dfixed_mul(c, radeon_crtc->hsc);
sys/dev/pci/drm/radeon/si.c
2388
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/si.c
2390
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/si.c
2391
priority_a_mark = dfixed_trunc(c);
sys/dev/pci/drm/radeon/si.c
2397
c.full = dfixed_const(latency_watermark_b);
sys/dev/pci/drm/radeon/si.c
2398
c.full = dfixed_mul(c, b);
sys/dev/pci/drm/radeon/si.c
2399
c.full = dfixed_mul(c, radeon_crtc->hsc);
sys/dev/pci/drm/radeon/si.c
2400
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/si.c
2402
c.full = dfixed_div(c, a);
sys/dev/pci/drm/radeon/si.c
2403
priority_b_mark = dfixed_trunc(c);
sys/dev/pci/eapreg.h
183
#define EAP_SET_SIZE(c,s) (((c)<<16) | (s))
sys/dev/pci/emuxki.c
1072
chan->fxsend.c.level = chan->fxsend.d.level =
sys/dev/pci/emuxki.c
1081
chan->fxsend.c.dest = 0x2;
sys/dev/pci/emuxki.c
1163
chan->fxsend.c.level = fxsend->c.level;
sys/dev/pci/emuxki.c
1167
chan->fxsend.c.dest = fxsend->c.dest;
sys/dev/pci/emuxki.c
1211
(chan->fxsend.c.dest << 16) |
sys/dev/pci/emuxki.c
1227
(chan->fxsend.c.dest << 24) |
sys/dev/pci/emuxki.c
1237
(chan->fxsend.c.level << 24) | chan->loop.start);
sys/dev/pci/emuxki.c
1546
fxsend.c.dest = 0x2;
sys/dev/pci/emuxki.c
1554
fxsend.a.level = fxsend.c.level = 0xc0;
sys/dev/pci/emuxki.c
1560
fxsend.a.level = fxsend.c.level = 0x00;
sys/dev/pci/emuxkivar.h
91
} a, b, c, d, e, f, g, h;
sys/dev/pci/if_devar.h
868
#define TULIP_SETCTX(m, c) ((void) ((m)->m_pkthdr.ph_cookie = (void *)(c)))
sys/dev/pci/if_em.c
3804
const struct em_counter *c = &em_counters[i];
sys/dev/pci/if_em.c
3805
if (c->reg == 0)
sys/dev/pci/if_em.c
3809
E1000_REG_TR(hw, c->reg)); /* wtf */
sys/dev/pci/if_em.c
3876
const struct em_counter *c = &em_counters[i];
sys/dev/pci/if_em.c
3877
kstat_kv_unit_init(&kvs[i], c->name,
sys/dev/pci/if_em.c
3878
KSTAT_KV_T_COUNTER64, c->unit);
sys/dev/pci/if_igc.c
2717
const struct igc_counter *c = &igc_counters[i];
sys/dev/pci/if_igc.c
2718
if (c->reg == 0)
sys/dev/pci/if_igc.c
2721
kstat_kv_u64(&kvs[i]) += IGC_READ_REG(hw, c->reg);
sys/dev/pci/if_igc.c
2806
const struct igc_counter *c = &igc_counters[i];
sys/dev/pci/if_igc.c
2807
kstat_kv_unit_init(&kvs[i], c->name,
sys/dev/pci/if_igc.c
2808
KSTAT_KV_T_COUNTER64, c->unit);
sys/dev/pci/if_iwm.c
7551
struct ieee80211_channel *c;
sys/dev/pci/if_iwm.c
7554
for (nchan = 0, c = &ic->ic_channels[1];
sys/dev/pci/if_iwm.c
7555
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_iwm.c
7557
c++) {
sys/dev/pci/if_iwm.c
7558
if (c->ic_flags == 0)
sys/dev/pci/if_iwm.c
7561
chan->channel_num = htole16(ieee80211_mhz2ieee(c->ic_freq, 0));
sys/dev/pci/if_iwm.c
7579
struct ieee80211_channel *c;
sys/dev/pci/if_iwm.c
7582
for (nchan = 0, c = &ic->ic_channels[1];
sys/dev/pci/if_iwm.c
7583
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_iwm.c
7585
c++) {
sys/dev/pci/if_iwm.c
7586
if (c->ic_flags == 0)
sys/dev/pci/if_iwm.c
7589
chan->channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
sys/dev/pci/if_iwm.c
7843
struct ieee80211_channel *c;
sys/dev/pci/if_iwm.c
7880
for (c = &ic->ic_channels[1], nchan = 0;
sys/dev/pci/if_iwm.c
7881
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_iwm.c
7882
nchan < sc->sc_capa_n_scan_channels; c++) {
sys/dev/pci/if_iwm.c
7883
if (c->ic_flags == 0)
sys/dev/pci/if_iwm.c
7886
ieee80211_mhz2ieee(c->ic_freq, 0);
sys/dev/pci/if_iwn.c
1525
int j, c;
sys/dev/pci/if_iwn.c
1530
for (c = 0; c < 2; c++) {
sys/dev/pci/if_iwn.c
1533
"power=%d pa_det=%d\n", c, j,
sys/dev/pci/if_iwn.c
1534
chans[0].samples[c][j].temp,
sys/dev/pci/if_iwn.c
1535
chans[0].samples[c][j].gain,
sys/dev/pci/if_iwn.c
1536
chans[0].samples[c][j].power,
sys/dev/pci/if_iwn.c
1537
chans[0].samples[c][j].pa_det);
sys/dev/pci/if_iwn.c
1541
for (c = 0; c < 2; c++) {
sys/dev/pci/if_iwn.c
1544
"power=%d pa_det=%d\n", c, j,
sys/dev/pci/if_iwn.c
1545
chans[1].samples[c][j].temp,
sys/dev/pci/if_iwn.c
1546
chans[1].samples[c][j].gain,
sys/dev/pci/if_iwn.c
1547
chans[1].samples[c][j].power,
sys/dev/pci/if_iwn.c
1548
chans[1].samples[c][j].pa_det);
sys/dev/pci/if_iwn.c
4126
int i, c, grp, maxpwr, is_ht40 = 0;
sys/dev/pci/if_iwn.c
4189
for (c = 0; c < 2; c++) {
sys/dev/pci/if_iwn.c
4194
chans[0].num, chans[0].samples[c][1].power,
sys/dev/pci/if_iwn.c
4195
chans[1].num, chans[1].samples[c][1].power, 1);
sys/dev/pci/if_iwn.c
4197
chans[0].num, chans[0].samples[c][1].gain,
sys/dev/pci/if_iwn.c
4198
chans[1].num, chans[1].samples[c][1].gain, 1);
sys/dev/pci/if_iwn.c
4200
chans[0].num, chans[0].samples[c][1].temp,
sys/dev/pci/if_iwn.c
4201
chans[1].num, chans[1].samples[c][1].temp, 1);
sys/dev/pci/if_iwn.c
4203
c, power, gain, temp));
sys/dev/pci/if_iwn.c
4239
idx += (int32_t)letoh32(uc->atten[grp][c]);
sys/dev/pci/if_iwn.c
4253
c, ridx, idx));
sys/dev/pci/if_iwn.c
4254
cmd.power[ridx].rf_gain[c] = rf_gain[idx];
sys/dev/pci/if_iwn.c
4255
cmd.power[ridx].dsp_gain[c] = dsp_gain[idx];
sys/dev/pci/if_iwn.c
5153
struct ieee80211_channel *c;
sys/dev/pci/if_iwn.c
5310
for (c = &ic->ic_channels[1];
sys/dev/pci/if_iwn.c
5311
c <= &ic->ic_channels[IEEE80211_CHAN_MAX]; c++) {
sys/dev/pci/if_iwn.c
5312
if ((c->ic_flags & flags) != flags)
sys/dev/pci/if_iwn.c
5315
chan->chan = htole16(ieee80211_chan2ieee(ic, c));
sys/dev/pci/if_iwn.c
5321
if (c->ic_flags & IEEE80211_CHAN_PASSIVE)
sys/dev/pci/if_iwn.c
5341
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/pci/if_iwnreg.h
1036
#define IWN_CTOK(c) ((c) + 273)
sys/dev/pci/if_iwnreg.h
1038
#define IWN_CTOMUK(c) (((c) * 1000000) + 273150000)
sys/dev/pci/if_iwx.c
7277
struct ieee80211_channel *c;
sys/dev/pci/if_iwx.c
7280
for (nchan = 0, c = &ic->ic_channels[1];
sys/dev/pci/if_iwx.c
7281
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_iwx.c
7284
c++) {
sys/dev/pci/if_iwx.c
7287
if (c->ic_flags == 0)
sys/dev/pci/if_iwx.c
7290
channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
sys/dev/pci/if_iwx.c
7294
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/pci/if_iwx.c
7320
struct ieee80211_channel *c;
sys/dev/pci/if_iwx.c
7323
for (nchan = 0, c = &ic->ic_channels[1];
sys/dev/pci/if_iwx.c
7324
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_iwx.c
7327
c++) {
sys/dev/pci/if_iwx.c
7330
if (c->ic_flags == 0)
sys/dev/pci/if_iwx.c
7333
channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
sys/dev/pci/if_iwx.c
7334
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/pci/if_ixl.c
3722
struct cond *c = arg;
sys/dev/pci/if_ixl.c
3724
cond_signal(c);
sys/dev/pci/if_ixl.c
3730
struct cond c = COND_INITIALIZER();
sys/dev/pci/if_ixl.c
3734
ixl_atq_set(iatq, ixl_wakeup, &c);
sys/dev/pci/if_ixl.c
3737
cond_wait(&c, wmesg);
sys/dev/pci/if_ixl.c
5362
const struct ixl_counter *c;
sys/dev/pci/if_ixl.c
5368
c = &state->counters[i];
sys/dev/pci/if_ixl.c
5370
r = c->c_base + (state->index * 8);
sys/dev/pci/if_ixl.c
5372
if (c->c_width == 32)
sys/dev/pci/if_ixl.c
5396
const struct ixl_counter *c = &state->counters[i];
sys/dev/pci/if_ixl.c
5399
if (c->c_width < 64) {
sys/dev/pci/if_ixl.c
5401
n += (1ULL << c->c_width);
sys/dev/pci/if_ixl.c
5432
const struct ixl_counter *c;
sys/dev/pci/if_ixl.c
5443
c = &counters[i];
sys/dev/pci/if_ixl.c
5445
kstat_kv_unit_init(&kvs[i], c->c_name,
sys/dev/pci/if_ixl.c
5446
KSTAT_KV_T_COUNTER64, c->c_type);
sys/dev/pci/if_lge.c
620
lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m)
sys/dev/pci/if_lge.c
646
c->lge_mbuf = m_new;
sys/dev/pci/if_lge.c
647
c->lge_fragptr_hi = 0;
sys/dev/pci/if_lge.c
648
c->lge_fragptr_lo = VTOPHYS(mtod(m_new, caddr_t));
sys/dev/pci/if_lge.c
649
c->lge_fraglen = m_new->m_len;
sys/dev/pci/if_lge.c
650
c->lge_ctl = m_new->m_len | LGE_RXCTL_WANTINTR | LGE_FRAGCNT(1);
sys/dev/pci/if_lge.c
651
c->lge_sts = 0;
sys/dev/pci/if_lge.c
664
CSR_WRITE_4(sc, LGE_RXDESC_ADDR_LO, VTOPHYS(c));
sys/dev/pci/if_lge.c
681
int c, i, total_len = 0;
sys/dev/pci/if_lge.c
687
c = cnt;
sys/dev/pci/if_lge.c
691
while(c) {
sys/dev/pci/if_lge.c
701
c--;
sys/dev/pci/if_mcx.c
6846
struct mcx_calibration *c = &sc->sc_calibration[0];
sys/dev/pci/if_mcx.c
6852
c->c_ubase = nsecuptime();
sys/dev/pci/if_mcx.c
6853
c->c_tbase = mcx_timer(sc);
sys/dev/pci/if_mcx.c
6855
c->c_ratio = 0;
sys/dev/pci/if_mcx.c
6912
const struct mcx_calibration *c)
sys/dev/pci/if_mcx.c
6951
if (ISSET(sc->sc_ac.ac_if.if_flags, IFF_LINK0) && c->c_ratio) {
sys/dev/pci/if_mcx.c
6953
t -= c->c_timestamp;
sys/dev/pci/if_mcx.c
6954
t *= c->c_ratio;
sys/dev/pci/if_mcx.c
6956
t += c->c_uptime;
sys/dev/pci/if_mcx.c
7021
const struct mcx_calibration *c;
sys/dev/pci/if_mcx.c
7030
c = &sc->sc_calibration[gen % nitems(sc->sc_calibration)];
sys/dev/pci/if_mcx.c
7045
rxfree += mcx_process_rx(sc, rx, cqe, &ml, c);
sys/dev/pci/if_msk.c
2461
int c, i, j;
sys/dev/pci/if_msk.c
2465
c = len - i;
sys/dev/pci/if_msk.c
2466
if (c > 16) c = 16;
sys/dev/pci/if_msk.c
2468
for (j = 0; j < c; j++) {
sys/dev/pci/if_msk.c
2478
for (j = 0; j < c; j++) {
sys/dev/pci/if_msk.c
2485
if (c < 16)
sys/dev/pci/if_mwx.c
4210
struct ieee80211_channel *c;
sys/dev/pci/if_mwx.c
4246
for (nchan = 0, c = &ic->ic_channels[1];
sys/dev/pci/if_mwx.c
4247
c <= &ic->ic_channels[IEEE80211_CHAN_MAX] &&
sys/dev/pci/if_mwx.c
4248
nchan < 64; c++) {
sys/dev/pci/if_mwx.c
4252
if (c->ic_flags == 0)
sys/dev/pci/if_mwx.c
4260
channel_num = ieee80211_mhz2ieee(c->ic_freq, 0);
sys/dev/pci/if_mwx.c
4262
if (IEEE80211_IS_CHAN_2GHZ(c)) {
sys/dev/pci/if_mwx.c
459
int c = '.';
sys/dev/pci/if_mwx.c
461
c = data[l];
sys/dev/pci/if_mwx.c
462
printf("%c", c);
sys/dev/pci/if_mwxreg.h
393
#define MT_DMA_CTL_SD_GET_LEN1(c) ((c) & MT_DMA_CTL_SD_LEN_MASK)
sys/dev/pci/if_mwxreg.h
394
#define MT_DNA_CTL_SD_GET_LEN0(c) \
sys/dev/pci/if_mwxreg.h
395
(((c) >> MT_DMA_CTL_SD_LEN0_SHIFT) & MT_DMA_CTL_SD_LEN_MASK)
sys/dev/pci/if_nge.c
956
nge_newbuf(struct nge_softc *sc, struct nge_desc *c, struct mbuf *m)
sys/dev/pci/if_nge.c
977
c->nge_mbuf = m_new;
sys/dev/pci/if_nge.c
978
c->nge_ptr = VTOPHYS(mtod(m_new, caddr_t));
sys/dev/pci/if_nge.c
980
c->nge_ptr));
sys/dev/pci/if_nge.c
981
c->nge_ctl = m_new->m_len;
sys/dev/pci/if_nge.c
982
c->nge_extsts = 0;
sys/dev/pci/if_qwx_pci.c
2556
struct qwx_mhi_chan_ctxt *cbase, *c;
sys/dev/pci/if_qwx_pci.c
2560
c = &cbase[i];
sys/dev/pci/if_qwx_pci.c
2561
chcfg = le32toh(c->chcfg);
sys/dev/pci/if_qwx_pci.c
2568
c->chcfg = htole32(chcfg);
sys/dev/pci/if_qwx_pci.c
2569
c->chtype = htole32(MHI_CHAN_TYPE_INVALID);
sys/dev/pci/if_qwx_pci.c
2570
c->erindex = 0;
sys/dev/pci/if_qwx_pci.c
2576
c = &cbase[ring->mhi_chan_id];
sys/dev/pci/if_qwx_pci.c
2577
c->chtype = htole32(ring->mhi_chan_direction);
sys/dev/pci/if_qwx_pci.c
2578
c->erindex = htole32(ring->mhi_chan_event_ring_index);
sys/dev/pci/if_qwx_pci.c
2579
ring->chan_ctxt = c;
sys/dev/pci/if_qwx_pci.c
2594
struct qwx_mhi_event_ctxt *c;
sys/dev/pci/if_qwx_pci.c
2596
c = (struct qwx_mhi_event_ctxt *)QWX_DMA_KVA(psc->event_ctxt);
sys/dev/pci/if_qwx_pci.c
2597
for (i = 0; i < nitems(psc->event_rings); i++, c++) {
sys/dev/pci/if_qwx_pci.c
2600
ring->event_ctxt = c;
sys/dev/pci/if_qwx_pci.c
2602
intmod = le32toh(c->intmod);
sys/dev/pci/if_qwx_pci.c
2606
c->intmod = htole32(intmod);
sys/dev/pci/if_qwx_pci.c
2608
c->ertype = htole32(MHI_ER_TYPE_VALID);
sys/dev/pci/if_qwx_pci.c
2609
c->msivec = htole32(ring->mhi_er_irq);
sys/dev/pci/if_qwx_pci.c
2615
c->rbase = htole64(paddr);
sys/dev/pci/if_qwx_pci.c
2616
c->rp = htole64(ring->rp);
sys/dev/pci/if_qwx_pci.c
2617
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwx_pci.c
2620
c->rlen = htole64(len);
sys/dev/pci/if_qwx_pci.c
2632
struct qwx_mhi_cmd_ctxt *c;
sys/dev/pci/if_qwx_pci.c
2641
c = (struct qwx_mhi_cmd_ctxt *)QWX_DMA_KVA(psc->cmd_ctxt);
sys/dev/pci/if_qwx_pci.c
2642
c->rbase = htole64(paddr);
sys/dev/pci/if_qwx_pci.c
2643
c->rp = htole64(paddr);
sys/dev/pci/if_qwx_pci.c
2644
c->wp = htole64(paddr);
sys/dev/pci/if_qwx_pci.c
2645
c->rlen = htole64(len);
sys/dev/pci/if_qwx_pci.c
2680
struct qwx_mhi_cmd_ctxt *c;
sys/dev/pci/if_qwx_pci.c
2693
c = (struct qwx_mhi_cmd_ctxt *)QWX_DMA_KVA(psc->cmd_ctxt);
sys/dev/pci/if_qwx_pci.c
2694
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwx_pci.c
2846
struct qwx_mhi_chan_ctxt *c;
sys/dev/pci/if_qwx_pci.c
2854
c = ring->chan_ctxt;
sys/dev/pci/if_qwx_pci.c
2856
chcfg = le32toh(c->chcfg);
sys/dev/pci/if_qwx_pci.c
2859
c->chcfg = htole32(chcfg);
sys/dev/pci/if_qwx_pci.c
2864
c->rbase = htole64(paddr);
sys/dev/pci/if_qwx_pci.c
2865
c->rp = htole64(ring->rp);
sys/dev/pci/if_qwx_pci.c
2866
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwx_pci.c
2868
c->rlen = htole64(len);
sys/dev/pci/if_qwx_pci.c
3864
struct qwx_mhi_event_ctxt *c;
sys/dev/pci/if_qwx_pci.c
3869
c = ring->event_ctxt;
sys/dev/pci/if_qwx_pci.c
3870
if (c == NULL) {
sys/dev/pci/if_qwx_pci.c
3881
rp = le64toh(c->rp);
sys/dev/pci/if_qwx_pci.c
3882
wp = le64toh(c->wp);
sys/dev/pci/if_qwx_pci.c
3943
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwx_pci.c
4090
struct qwx_mhi_event_ctxt *c;
sys/dev/pci/if_qwx_pci.c
4095
c = ring->event_ctxt;
sys/dev/pci/if_qwx_pci.c
4096
if (c == NULL) {
sys/dev/pci/if_qwx_pci.c
4107
rp = le64toh(c->rp);
sys/dev/pci/if_qwx_pci.c
4108
wp = le64toh(c->wp);
sys/dev/pci/if_qwx_pci.c
4160
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwz_pci.c
2365
struct qwz_mhi_chan_ctxt *cbase, *c;
sys/dev/pci/if_qwz_pci.c
2369
c = &cbase[i];
sys/dev/pci/if_qwz_pci.c
2370
chcfg = le32toh(c->chcfg);
sys/dev/pci/if_qwz_pci.c
2377
c->chcfg = htole32(chcfg);
sys/dev/pci/if_qwz_pci.c
2378
c->chtype = htole32(MHI_CHAN_TYPE_INVALID);
sys/dev/pci/if_qwz_pci.c
2379
c->erindex = 0;
sys/dev/pci/if_qwz_pci.c
2385
c = &cbase[ring->mhi_chan_id];
sys/dev/pci/if_qwz_pci.c
2386
c->chtype = htole32(ring->mhi_chan_direction);
sys/dev/pci/if_qwz_pci.c
2387
c->erindex = htole32(ring->mhi_chan_event_ring_index);
sys/dev/pci/if_qwz_pci.c
2388
ring->chan_ctxt = c;
sys/dev/pci/if_qwz_pci.c
2403
struct qwz_mhi_event_ctxt *c;
sys/dev/pci/if_qwz_pci.c
2405
c = (struct qwz_mhi_event_ctxt *)QWZ_DMA_KVA(psc->event_ctxt);
sys/dev/pci/if_qwz_pci.c
2406
for (i = 0; i < nitems(psc->event_rings); i++, c++) {
sys/dev/pci/if_qwz_pci.c
2409
ring->event_ctxt = c;
sys/dev/pci/if_qwz_pci.c
2411
intmod = le32toh(c->intmod);
sys/dev/pci/if_qwz_pci.c
2415
c->intmod = htole32(intmod);
sys/dev/pci/if_qwz_pci.c
2417
c->ertype = htole32(MHI_ER_TYPE_VALID);
sys/dev/pci/if_qwz_pci.c
2418
c->msivec = htole32(ring->mhi_er_irq);
sys/dev/pci/if_qwz_pci.c
2424
c->rbase = htole64(paddr);
sys/dev/pci/if_qwz_pci.c
2425
c->rp = htole64(ring->rp);
sys/dev/pci/if_qwz_pci.c
2426
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwz_pci.c
2429
c->rlen = htole64(len);
sys/dev/pci/if_qwz_pci.c
2441
struct qwz_mhi_cmd_ctxt *c;
sys/dev/pci/if_qwz_pci.c
2449
c = (struct qwz_mhi_cmd_ctxt *)QWZ_DMA_KVA(psc->cmd_ctxt);
sys/dev/pci/if_qwz_pci.c
2450
c->rbase = htole64(paddr);
sys/dev/pci/if_qwz_pci.c
2451
c->rp = htole64(paddr);
sys/dev/pci/if_qwz_pci.c
2452
c->wp = htole64(paddr);
sys/dev/pci/if_qwz_pci.c
2453
c->rlen = htole64(len);
sys/dev/pci/if_qwz_pci.c
2488
struct qwz_mhi_cmd_ctxt *c;
sys/dev/pci/if_qwz_pci.c
2501
c = (struct qwz_mhi_cmd_ctxt *)QWZ_DMA_KVA(psc->cmd_ctxt);
sys/dev/pci/if_qwz_pci.c
2502
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwz_pci.c
2654
struct qwz_mhi_chan_ctxt *c;
sys/dev/pci/if_qwz_pci.c
2662
c = ring->chan_ctxt;
sys/dev/pci/if_qwz_pci.c
2664
chcfg = le32toh(c->chcfg);
sys/dev/pci/if_qwz_pci.c
2667
c->chcfg = htole32(chcfg);
sys/dev/pci/if_qwz_pci.c
2671
c->rbase = htole64(paddr);
sys/dev/pci/if_qwz_pci.c
2672
c->rp = htole64(ring->rp);
sys/dev/pci/if_qwz_pci.c
2673
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwz_pci.c
2675
c->rlen = htole64(len);
sys/dev/pci/if_qwz_pci.c
3708
struct qwz_mhi_event_ctxt *c;
sys/dev/pci/if_qwz_pci.c
3713
c = ring->event_ctxt;
sys/dev/pci/if_qwz_pci.c
3714
if (c == NULL) {
sys/dev/pci/if_qwz_pci.c
3725
rp = le64toh(c->rp);
sys/dev/pci/if_qwz_pci.c
3726
wp = le64toh(c->wp);
sys/dev/pci/if_qwz_pci.c
3785
c->wp = htole64(ring->wp);
sys/dev/pci/if_qwz_pci.c
3931
struct qwz_mhi_event_ctxt *c;
sys/dev/pci/if_qwz_pci.c
3936
c = ring->event_ctxt;
sys/dev/pci/if_qwz_pci.c
3937
if (c == NULL) {
sys/dev/pci/if_qwz_pci.c
3948
rp = le64toh(c->rp);
sys/dev/pci/if_qwz_pci.c
3949
wp = le64toh(c->wp);
sys/dev/pci/if_qwz_pci.c
3999
c->wp = htole64(ring->wp);
sys/dev/pci/if_sis.c
1310
sis_newbuf(struct sis_softc *sc, struct sis_desc *c)
sys/dev/pci/if_sis.c
1314
if (c == NULL)
sys/dev/pci/if_sis.c
1323
if (bus_dmamap_load_mbuf(sc->sc_dmat, c->map, m_new,
sys/dev/pci/if_sis.c
1329
bus_dmamap_sync(sc->sc_dmat, c->map, 0, c->map->dm_mapsize,
sys/dev/pci/if_sis.c
1332
c->sis_mbuf = m_new;
sys/dev/pci/if_sis.c
1333
c->sis_ptr = htole32(c->map->dm_segs[0].ds_addr);
sys/dev/pci/if_sis.c
1336
((caddr_t)c - sc->sc_listkva), sizeof(struct sis_desc),
sys/dev/pci/if_sis.c
1339
c->sis_ctl = htole32(ETHER_MAX_DIX_LEN);
sys/dev/pci/if_sis.c
1342
((caddr_t)c - sc->sc_listkva), sizeof(struct sis_desc),
sys/dev/pci/if_sk.c
2565
int c, i, j;
sys/dev/pci/if_sk.c
2569
c = len - i;
sys/dev/pci/if_sk.c
2570
if (c > 16) c = 16;
sys/dev/pci/if_sk.c
2572
for (j = 0; j < c; j++) {
sys/dev/pci/if_sk.c
2582
for (j = 0; j < c; j++) {
sys/dev/pci/if_sk.c
2589
if (c < 16)
sys/dev/pci/if_sk.c
616
struct sk_chain *c;
sys/dev/pci/if_sk.c
643
c = &sc_if->sk_cdata.sk_rx_chain[prod];
sys/dev/pci/if_sk.c
644
c->sk_mbuf = m;
sys/dev/pci/if_sk.c
646
r = c->sk_desc;
sys/dev/pci/if_ste.c
1238
ste_encap(struct ste_softc *sc, struct ste_chain *c, struct mbuf *m_head)
sys/dev/pci/if_ste.c
1245
d = c->ste_ptr;
sys/dev/pci/if_ste.c
1289
c->ste_mbuf = m_head;
sys/dev/pci/if_ste.c
934
ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *c, struct mbuf *m)
sys/dev/pci/if_ste.c
956
c->ste_mbuf = m_new;
sys/dev/pci/if_ste.c
957
c->ste_ptr->ste_status = 0;
sys/dev/pci/if_ste.c
958
c->ste_ptr->ste_frag.ste_addr = vtophys(mtod(m_new, vaddr_t));
sys/dev/pci/if_ste.c
959
c->ste_ptr->ste_frag.ste_len = (ETHER_MAX_DIX_LEN + ETHER_VLAN_ENCAP_LEN) | STE_FRAG_LAST;
sys/dev/pci/if_tl.c
1356
tl_encap(struct tl_softc *sc, struct tl_chain *c, struct mbuf *m_head)
sys/dev/pci/if_tl.c
1376
c->tl_ptr->tl_frag[frag].tlist_dadr =
sys/dev/pci/if_tl.c
1378
c->tl_ptr->tl_frag[frag].tlist_dcnt = m->m_len;
sys/dev/pci/if_tl.c
1410
f = &c->tl_ptr->tl_frag[0];
sys/dev/pci/if_tl.c
1421
f = &c->tl_ptr->tl_frag[frag];
sys/dev/pci/if_tl.c
1428
c->tl_mbuf = m_head;
sys/dev/pci/if_tl.c
1429
c->tl_ptr->tl_frag[frag - 1].tlist_dcnt |= TL_LAST_FRAG;
sys/dev/pci/if_tl.c
1430
c->tl_ptr->tlist_frsize = total_len;
sys/dev/pci/if_tl.c
1431
c->tl_ptr->tlist_cstat = TL_CSTAT_READY;
sys/dev/pci/if_tl.c
1432
c->tl_ptr->tlist_fptr = 0;
sys/dev/pci/if_tl.c
970
tl_newbuf(struct tl_softc *sc, struct tl_chain_onefrag *c)
sys/dev/pci/if_tl.c
989
c->tl_mbuf = m_new;
sys/dev/pci/if_tl.c
990
c->tl_next = NULL;
sys/dev/pci/if_tl.c
991
c->tl_ptr->tlist_frsize = MCLBYTES;
sys/dev/pci/if_tl.c
992
c->tl_ptr->tlist_fptr = 0;
sys/dev/pci/if_tl.c
993
c->tl_ptr->tl_frag.tlist_dadr = VTOPHYS(mtod(m_new, caddr_t));
sys/dev/pci/if_tl.c
994
c->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES;
sys/dev/pci/if_tl.c
995
c->tl_ptr->tlist_cstat = TL_CSTAT_READY;
sys/dev/pci/if_vr.c
1176
struct vr_chain *c = *cp;
sys/dev/pci/if_vr.c
1196
error = bus_dmamap_load_mbuf(sc->sc_dmat, c->vr_map, m,
sys/dev/pci/if_vr.c
1205
bus_dmamap_load_mbuf(sc->sc_dmat, c->vr_map, m,
sys/dev/pci/if_vr.c
1214
bus_dmamap_sync(sc->sc_dmat, c->vr_map, 0, c->vr_map->dm_mapsize,
sys/dev/pci/if_vr.c
1216
if (c->vr_map->dm_mapsize < VR_MIN_FRAMELEN)
sys/dev/pci/if_vr.c
1246
c->vr_mbuf = m;
sys/dev/pci/if_vr.c
1247
txmap = c->vr_map;
sys/dev/pci/if_vr.c
1250
*cp = c = c->vr_nextdesc;
sys/dev/pci/if_vr.c
1251
f = c->vr_ptr;
sys/dev/pci/if_vr.c
1258
f->vr_next = htole32(c->vr_nextdesc->vr_paddr | intdisable);
sys/dev/pci/if_vr.c
1264
*cp = c = c->vr_nextdesc;
sys/dev/pci/if_vr.c
1265
f = c->vr_ptr;
sys/dev/pci/if_vr.c
1270
f->vr_next = htole32(c->vr_nextdesc->vr_paddr | intdisable);
sys/dev/pci/if_wb.c
1144
wb_encap(struct wb_softc *sc, struct wb_chain *c, struct mbuf *m_head)
sys/dev/pci/if_wb.c
1164
f = &c->wb_ptr->wb_frag[frag];
sys/dev/pci/if_wb.c
1171
f->wb_next = VTOPHYS(&c->wb_ptr->wb_frag[frag + 1]);
sys/dev/pci/if_wb.c
1203
f = &c->wb_ptr->wb_frag[0];
sys/dev/pci/if_wb.c
1212
f = &c->wb_ptr->wb_frag[frag];
sys/dev/pci/if_wb.c
1220
c->wb_mbuf = m_head;
sys/dev/pci/if_wb.c
1221
c->wb_lastdesc = frag - 1;
sys/dev/pci/if_wb.c
1222
WB_TXCTL(c) |= WB_TXCTL_LASTFRAG;
sys/dev/pci/if_wb.c
1223
WB_TXNEXT(c) = VTOPHYS(&c->wb_nextdesc->wb_ptr->wb_frag[0]);
sys/dev/pci/if_wb.c
874
wb_newbuf(struct wb_softc *sc, struct wb_chain_onefrag *c)
sys/dev/pci/if_wb.c
876
c->wb_ptr->wb_data = VTOPHYS(c->wb_buf + sizeof(u_int64_t));
sys/dev/pci/if_wb.c
877
c->wb_ptr->wb_ctl = WB_RXCTL_RLINK | ETHER_MAX_DIX_LEN;
sys/dev/pci/if_wb.c
878
c->wb_ptr->wb_status = WB_RXSTAT;
sys/dev/pci/if_wpi.c
2278
struct ieee80211_channel *c, int ridx)
sys/dev/pci/if_wpi.c
2294
chan = ieee80211_chan2ieee(ic, c);
sys/dev/pci/if_wpi.c
2302
pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 0 : 5;
sys/dev/pci/if_wpi.c
2305
pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 7 : 10;
sys/dev/pci/if_wpi.c
2308
pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 9 : 12;
sys/dev/pci/if_wpi.c
2494
struct ieee80211_channel *c;
sys/dev/pci/if_wpi.c
2559
for (c = &ic->ic_channels[1];
sys/dev/pci/if_wpi.c
2560
c <= &ic->ic_channels[IEEE80211_CHAN_MAX]; c++) {
sys/dev/pci/if_wpi.c
2561
if ((c->ic_flags & flags) != flags)
sys/dev/pci/if_wpi.c
2564
chan->chan = ieee80211_chan2ieee(ic, c);
sys/dev/pci/if_wpi.c
2567
if (!(c->ic_flags & IEEE80211_CHAN_PASSIVE))
sys/dev/pci/if_wpi.c
2572
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/pci/igc_nvm.c
42
uint16_t IGC_UNUSEDARG b, uint16_t IGC_UNUSEDARG *c)
sys/dev/pci/igc_nvm.c
89
uint16_t IGC_UNUSEDARG b, uint16_t IGC_UNUSEDARG *c)
sys/dev/pci/ips.c
540
#define ips_exec(s, c) (s)->sc_chip->ic_exec((s), (c))
sys/dev/pci/kate.c
100
pcireg_t c;
sys/dev/pci/kate.c
111
c = pci_conf_read(pa->pa_pc, pa->pa_tag, K_CPUID_FAMILY_MODEL_R);
sys/dev/pci/kate.c
114
if ((c & ~0xf) == kate_proc[i].cpuid[j])
sys/dev/pci/kate.c
139
pcireg_t c, d;
sys/dev/pci/kate.c
142
c = pci_conf_read(pa->pa_pc, pa->pa_tag, K_CPUID_FAMILY_MODEL_R);
sys/dev/pci/kate.c
146
if ((c & ~0xf) == kate_proc[i].cpuid[j]) {
sys/dev/pci/kate.c
149
kate_proc[i].rev, c & 0xf);
sys/dev/pci/kate.c
152
if (c != 0x0 && sc->sc_rev == '\0') {
sys/dev/pci/kate.c
155
printf(": cpuid 0x%x", c);
sys/dev/pci/km.c
119
int c;
sys/dev/pci/km.c
122
c = KM_GET_CURTMP(r);
sys/dev/pci/km.c
123
s->value = c * 125000 + 273150000;
sys/dev/pci/maestro.c
842
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
sys/dev/pci/maestro.c
845
if (c) {
sys/dev/pci/maestro.c
848
rc = c->vtbl->mixer_set_port(c, cp);
sys/dev/pci/maestro.c
858
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
sys/dev/pci/maestro.c
861
if (c) {
sys/dev/pci/maestro.c
864
rc = c->vtbl->mixer_get_port(c, cp);
sys/dev/pci/maestro.c
874
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
sys/dev/pci/maestro.c
877
if (c) {
sys/dev/pci/maestro.c
880
rc = c->vtbl->query_devinfo(c, cp);
sys/dev/pci/pciide_ixp_reg.h
51
#define IXP_UDMA_ENABLE(u, c, d) do { \
sys/dev/pci/pciide_ixp_reg.h
52
(u) |= (1 << (2 * (c) + (d))); \
sys/dev/pci/pciide_ixp_reg.h
54
#define IXP_UDMA_DISABLE(u, c, d) do { \
sys/dev/pci/pciide_ixp_reg.h
55
(u) &= ~(1 << (2 * (c) + (d))); \
sys/dev/pci/pciide_ixp_reg.h
64
#define IXP_SET_MODE(u, c, d, m) do { \
sys/dev/pci/pciide_ixp_reg.h
65
int __ixpshift = 16 + 8*(c) + 4*(d); \
sys/dev/pci/pciide_ixp_reg.h
74
#define IXP_SET_TIMING(m, c, d, t) do { \
sys/dev/pci/pciide_ixp_reg.h
75
int __ixpshift = 16*(c) + 8*(d); \
sys/dev/pci/pciide_natsemi_reg.h
95
#define NATSEMI_RTREG(c,d) (0x44 + (c * 8) + (d * 4) + 0)
sys/dev/pci/pciide_natsemi_reg.h
96
#define NATSEMI_WTREG(c,d) (0x44 + (c * 8) + (d * 4) + 1)
sys/dev/pci/tga.c
103
int tga_putchar(void *c, int row, int col, u_int uc, uint32_t attr);
sys/dev/pci/tga.c
1261
tga_putchar(void *c, int row, int col, u_int uc, uint32_t attr)
sys/dev/pci/tga.c
1263
struct rasops_info *ri = c;
sys/dev/pci/tga.c
1283
ri->ri_ops.unpack_attr(c, attr, &fg, &bg, &ul);
sys/dev/pci/tga.c
1325
tga_eraserows(void *c, int row, int num, uint32_t attr)
sys/dev/pci/tga.c
1327
struct rasops_info *ri = c;
sys/dev/pci/tga.c
1333
ri->ri_ops.unpack_attr(c, attr, &fg, &bg, NULL);
sys/dev/pci/tga.c
1379
tga_erasecols(void *c, int row, int col, int num, uint32_t attr)
sys/dev/pci/tga.c
1381
struct rasops_info *ri = c;
sys/dev/pci/tga.c
1387
ri->ri_ops.unpack_attr(c, attr, &fg, &bg, NULL);
sys/dev/pci/virtio_pci.c
217
struct virtio_pci_common_cfg c; \
sys/dev/pci/virtio_pci.c
219
size_t size = sizeof(c.memb); \
sys/dev/pci/vmwpvs.c
1013
vmwpvs_scsi_cmd_done(struct vmwpvs_softc *sc, struct vmwpvs_ring_cmp *c)
sys/dev/pci/vmwpvs.c
1015
u_int64_t ctx = c->context;
sys/dev/pci/vmwpvs.c
1038
xs->status = c->scsi_status;
sys/dev/pci/vmwpvs.c
1039
switch (c->host_status) {
sys/dev/pci/vmwpvs.c
1043
if (c->scsi_status == VMWPVS_SCSI_STATUS_CHECK) {
sys/dev/pci/vmwpvs.c
1053
xs->resid = xs->datalen - c->data_len;
sys/dev/pci/vmwpvs.c
1063
__FUNCTION__, __LINE__, c->host_status, c->scsi_status);
sys/dev/pci/yds.c
146
#define YWRITEREGION4(sc, r, x, c) \
sys/dev/pci/yds.c
147
bus_space_write_region_4((sc)->memt, (sc)->memh, (r), (x), (c) / 4)
sys/dev/pckbc/pmsreg.h
103
#define SYNAPTICS_CAP_EXTENDED_QUERIES(c) (((c) >> 20) & 0x07)
sys/dev/pv/virtio.c
106
char c;
sys/dev/pv/virtio.c
128
c = (neg&bit) ? '+' : '-';
sys/dev/pv/virtio.c
130
printf(" %c%s", c, namep->name);
sys/dev/pv/virtio.c
132
printf(" %cUnknown(%d)", c, i);
sys/dev/rasops/rasops.c
1260
int16_t c = (int16_t)ri->ri_devcmap[((u_int)attr >> 24) & 0xf];
sys/dev/rasops/rasops.c
1263
*(int16_t *)rp = c;
sys/dev/rasops/rasops.c
1523
rasops_vcons_mapchar(void *cookie, int c, u_int *cp)
sys/dev/rasops/rasops.c
1527
return rasops_mapchar(scr->rs_ri, c, cp);
sys/dev/rasops/rasops.c
507
rasops_mapchar(void *cookie, int c, u_int *cp)
sys/dev/rasops/rasops.c
518
if ((c = wsfont_map_unichar(ri->ri_font, c)) < 0) {
sys/dev/rasops/rasops.c
524
if (c < ri->ri_font->firstchar ||
sys/dev/rasops/rasops.c
525
c - ri->ri_font->firstchar >= ri->ri_font->numchars) {
sys/dev/rasops/rasops.c
530
*cp = c;
sys/dev/rasops/rasops.c
795
int c;
sys/dev/rasops/rasops.c
809
c = i | (i << 4);
sys/dev/rasops/rasops.c
810
ri->ri_devcmap[i] = c | (c<<8) | (c<<16) | (c<<24);
sys/dev/rasops/rasops.c
829
c = (*p >> (8 - ri->ri_rnum)) << ri->ri_rpos;
sys/dev/rasops/rasops.c
831
c = (*p << (ri->ri_rnum - 8)) << ri->ri_rpos;
sys/dev/rasops/rasops.c
835
c |= (*p >> (8 - ri->ri_gnum)) << ri->ri_gpos;
sys/dev/rasops/rasops.c
837
c |= (*p << (ri->ri_gnum - 8)) << ri->ri_gpos;
sys/dev/rasops/rasops.c
841
c |= (*p >> (8 - ri->ri_bnum)) << ri->ri_bpos;
sys/dev/rasops/rasops.c
843
c |= (*p << (ri->ri_bnum - 8)) << ri->ri_bpos;
sys/dev/rasops/rasops.c
848
c = c | ((c & 0xff) << 24);
sys/dev/rasops/rasops.c
850
c = c | (c << 16);
sys/dev/rasops/rasops.c
855
ri->ri_devcmap[i] = c;
sys/dev/rasops/rasops.c
857
ri->ri_devcmap[i] = swap32(c);
sys/dev/rasops/rasops.c
859
ri->ri_devcmap[i] = swap16(c);
sys/dev/rasops/rasops.c
861
ri->ri_devcmap[i] = c;
sys/dev/rasops/rasops.c
863
ri->ri_devcmap[i] = c;
sys/dev/rasops/rasops15.c
133
int16_t c = (int16_t)clr[0];
sys/dev/rasops/rasops15.c
139
*(int16_t *)dp = c;
sys/dev/rasops/rasops15.c
163
int16_t c = (int16_t)clr[1];
sys/dev/rasops/rasops15.c
167
*(int16_t *)rp = c;
sys/dev/rasops/rasops15.c
243
int32_t c = stamp[0];
sys/dev/rasops/rasops15.c
245
rp[0] = rp[1] = rp[2] = rp[3] = c;
sys/dev/rasops/rasops15.c
269
int32_t c = STAMP_READ(28);
sys/dev/rasops/rasops15.c
272
rp[0] = rp[1] = rp[2] = rp[3] = c;
sys/dev/rasops/rasops15.c
319
int32_t c = stamp[0];
sys/dev/rasops/rasops15.c
321
rp[0] = rp[1] = rp[2] = rp[3] = rp[4] = rp[5] = c;
sys/dev/rasops/rasops15.c
349
int32_t c = STAMP_READ(28);
sys/dev/rasops/rasops15.c
352
rp[0] = rp[1] = rp[2] = rp[3] = rp[4] = rp[5] = c;
sys/dev/rasops/rasops15.c
399
int32_t c = stamp[0];
sys/dev/rasops/rasops15.c
402
rp[4] = rp[5] = rp[6] = rp[7] = c;
sys/dev/rasops/rasops15.c
434
int32_t c = STAMP_READ(28);
sys/dev/rasops/rasops15.c
438
rp[4] = rp[5] = rp[6] = rp[7] = c;
sys/dev/rasops/rasops24.c
264
int32_t c = stamp[0];
sys/dev/rasops/rasops24.c
266
rp[0] = rp[1] = rp[2] = rp[3] = rp[4] = rp[5] = c;
sys/dev/rasops/rasops24.c
292
int32_t c = STAMP_READ(52);
sys/dev/rasops/rasops24.c
295
rp[0] = rp[1] = rp[2] = rp[3] = rp[4] = rp[5] = c;
sys/dev/rasops/rasops24.c
342
int32_t c = stamp[0];
sys/dev/rasops/rasops24.c
345
rp[4] = rp[5] = rp[6] = rp[7] = rp[8] = c;
sys/dev/rasops/rasops24.c
376
int32_t c = STAMP_READ(52);
sys/dev/rasops/rasops24.c
380
rp[4] = rp[5] = rp[6] = rp[7] = rp[8] = c;
sys/dev/rasops/rasops24.c
427
int32_t c = stamp[0];
sys/dev/rasops/rasops24.c
431
rp[8] = rp[9] = rp[10] = rp[11] = c;
sys/dev/rasops/rasops24.c
467
int32_t c = STAMP_READ(52);
sys/dev/rasops/rasops24.c
472
rp[8] = rp[9] = rp[10] = rp[11] = c;
sys/dev/rasops/rasops4.c
288
u_int16_t c = stamp[0];
sys/dev/rasops/rasops4.c
290
rp[0] = c;
sys/dev/rasops/rasops4.c
291
rp[1] = c;
sys/dev/rasops/rasops4.c
360
u_int16_t c = stamp[0];
sys/dev/rasops/rasops4.c
362
rp[0] = c;
sys/dev/rasops/rasops4.c
363
rp[1] = c;
sys/dev/rasops/rasops4.c
364
rp[2] = c;
sys/dev/rasops/rasops4.c
435
u_int16_t c = stamp[0];
sys/dev/rasops/rasops4.c
437
rp[0] = c;
sys/dev/rasops/rasops4.c
438
rp[1] = c;
sys/dev/rasops/rasops4.c
439
rp[2] = c;
sys/dev/rasops/rasops4.c
440
rp[3] = c;
sys/dev/rasops/rasops8.c
120
u_char c = clr[0];
sys/dev/rasops/rasops8.c
127
*dp++ = c;
sys/dev/rasops/rasops8.c
149
u_char c = clr[1];
sys/dev/rasops/rasops8.c
154
*rp++ = c;
sys/dev/rasops/rasops8.c
301
int32_t c = stamp[0];
sys/dev/rasops/rasops8.c
303
rp[0] = rp[1] = rp[2] = c;
sys/dev/sbus/cgsix.c
473
u_int32_t c;
sys/dev/sbus/cgsix.c
478
c = BT_READ(sc, BT_CTRL);
sys/dev/sbus/cgsix.c
479
c |= (BTCR_DISPENA_OV0 | BTCR_DISPENA_OV1) << 24;
sys/dev/sbus/cgsix.c
480
BT_WRITE(sc, BT_CTRL, c);
sys/dev/sbus/cgsix.c
483
c = BT_READ(sc, BT_CTRL);
sys/dev/sbus/cgsix.c
484
c &= ~((BTCR_DISPENA_OV0 | BTCR_DISPENA_OV1) << 24);
sys/dev/sbus/cgsix.c
485
BT_WRITE(sc, BT_CTRL, c);
sys/dev/sbus/cgtwelve.c
324
u_int32_t c;
sys/dev/sbus/cgtwelve.c
358
for (c = 1; c < 256; c++)
sys/dev/sbus/cgtwelve.c
412
for (c = 0; c < 256; c++)
sys/dev/sbus/cgtwelve.c
413
sc->sc_ramdac->color = c | (c << 8) | (c << 16);
sys/dev/sbus/magma.c
200
int c, co, br;
sys/dev/sbus/magma.c
205
for (c = 0, co = 8 ; co <= 2048 ; co <<= 2, c++) {
sys/dev/sbus/magma.c
209
*cor = c;
sys/dev/sbus/tvtwo.c
423
u_int32_t c;
sys/dev/sbus/tvtwo.c
426
for (c = 0; c < 256; c++) {
sys/dev/sbus/tvtwo.c
427
dac[3] = c; /* R */
sys/dev/sbus/tvtwo.c
428
dac[3] = c; /* G */
sys/dev/sbus/tvtwo.c
429
dac[3] = c; /* B */
sys/dev/sdmmc/if_bwfm_sdio.c
1485
struct bwfm_sdio_console c;
sys/dev/sdmmc/if_bwfm_sdio.c
1493
(char *)&c, sizeof(c), 0);
sys/dev/sdmmc/if_bwfm_sdio.c
1497
c.log_buf = letoh32(c.log_buf);
sys/dev/sdmmc/if_bwfm_sdio.c
1498
c.log_bufsz = letoh32(c.log_bufsz);
sys/dev/sdmmc/if_bwfm_sdio.c
1499
c.log_idx = letoh32(c.log_idx);
sys/dev/sdmmc/if_bwfm_sdio.c
1502
sc->sc_console_buf = malloc(c.log_bufsz, M_DEVBUF,
sys/dev/sdmmc/if_bwfm_sdio.c
1504
sc->sc_console_buf_size = c.log_bufsz;
sys/dev/sdmmc/if_bwfm_sdio.c
1507
newidx = c.log_idx;
sys/dev/sdmmc/if_bwfm_sdio.c
1511
err = bwfm_sdio_ram_read_write(sc, c.log_buf, sc->sc_console_buf,
sys/dev/softraid.c
2708
int vol = -1, found, c;
sys/dev/softraid.c
2732
found = c = 0;
sys/dev/softraid.c
2739
c++;
sys/dev/softraid.c
2747
sd->sd_set_chunk_state(sd, c, BIOC_SDOFFLINE);
sys/dev/softraid.c
2815
int c, part, open = 0;
sys/dev/softraid.c
2824
c = sr_chunk_in_use(sc, dev);
sys/dev/softraid.c
2825
if (c != BIOC_SDINVALID && c != BIOC_SDOFFLINE) {
sys/dev/softraid.c
2826
if (c == BIOC_SDHOTSPARE)
sys/dev/softraid.c
4325
sr_set_chunk_state(struct sr_discipline *sd, int c, int new_state)
sys/dev/softraid.c
4331
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname, c, new_state);
sys/dev/softraid.c
4335
old_state = sd->sd_vol.sv_chunks[c]->src_meta.scm_status;
sys/dev/softraid.c
4358
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname,
sys/dev/softraid.c
4363
sd->sd_vol.sv_chunks[c]->src_meta.scm_status = new_state;
sys/dev/softraid.c
4685
int c, s, slept, percent = 0, old_percent = -1;
sys/dev/softraid.c
4817
for (c = 0; c < sd->sd_meta->ssdi.ssd_chunk_no; c++) {
sys/dev/softraid.c
4818
if (sd->sd_vol.sv_chunks[c]->src_meta.scm_status ==
sys/dev/softraid.c
4820
sd->sd_set_chunk_state(sd, c, BIOC_SDONLINE);
sys/dev/softraid.c
5028
int i, j, c;
sys/dev/softraid.c
5035
c = b[i + j];
sys/dev/softraid.c
5036
if (c < ' ' || c > 'z' || i + j > len)
sys/dev/softraid.c
5037
c = '.';
sys/dev/softraid.c
5038
printf("%c", c);
sys/dev/softraid_crypto.c
390
sr_crypto_encrypt(u_char *p, u_char *c, u_char *key, size_t size, int alg)
sys/dev/softraid_crypto.c
400
rijndael_encrypt(&ctx, &p[i], &c[i]);
sys/dev/softraid_crypto.c
416
sr_crypto_decrypt(u_char *c, u_char *p, u_char *key, size_t size, int alg)
sys/dev/softraid_crypto.c
426
rijndael_decrypt(&ctx, &c[i], &p[i]);
sys/dev/softraid_crypto.c
558
u_char *c, *p = NULL;
sys/dev/softraid_crypto.c
568
c = (u_char *)mdd_crypto->scr_meta->scm_key;
sys/dev/softraid_crypto.c
574
if (sr_crypto_decrypt(c, p, kdfinfo1->maskkey, ksz,
sys/dev/softraid_crypto.c
603
c = (u_char *)mdd_crypto->scr_meta->scm_key;
sys/dev/softraid_crypto.c
604
if (sr_crypto_encrypt(p, c, kdfinfo2->maskkey, ksz,
sys/dev/softraid_crypto.c
647
int c, part, open = 0;
sys/dev/softraid_crypto.c
657
c = sr_chunk_in_use(sc, dev);
sys/dev/softraid_crypto.c
658
if (c != BIOC_SDINVALID && c != BIOC_SDOFFLINE) {
sys/dev/softraid_crypto.c
812
int c, part, open = 0;
sys/dev/softraid_crypto.c
823
c = sr_chunk_in_use(sc, dev);
sys/dev/softraid_crypto.c
824
if (c != BIOC_SDINVALID && c != BIOC_SDOFFLINE) {
sys/dev/softraid_raid1.c
106
sr_raid1_set_chunk_state(struct sr_discipline *sd, int c, int new_state)
sys/dev/softraid_raid1.c
112
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname, c, new_state);
sys/dev/softraid_raid1.c
116
old_state = sd->sd_vol.sv_chunks[c]->src_meta.scm_status;
sys/dev/softraid_raid1.c
179
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname,
sys/dev/softraid_raid1.c
184
sd->sd_vol.sv_chunks[c]->src_meta.scm_status = new_state;
sys/dev/softraid_raid1c.c
148
int c;
sys/dev/softraid_raid1c.c
153
for (c = 0; c < no_chunk; c++)
sys/dev/softraid_raid1c.c
154
chunks[c] = sd->sd_vol.sv_chunks[c];
sys/dev/softraid_raid1c.c
156
for (c = no_chunk; c < sd->sd_meta->ssdi.ssd_chunk_no; c++) {
sys/dev/softraid_raid1c.c
157
ch_prev = chunks[c - 1];
sys/dev/softraid_raid1c.c
163
chunks[c] = ch_entry;
sys/dev/softraid_raid5.c
147
sr_raid5_set_chunk_state(struct sr_discipline *sd, int c, int new_state)
sys/dev/softraid_raid5.c
153
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname, c, new_state);
sys/dev/softraid_raid5.c
157
old_state = sd->sd_vol.sv_chunks[c]->src_meta.scm_status;
sys/dev/softraid_raid5.c
207
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname,
sys/dev/softraid_raid5.c
212
sd->sd_vol.sv_chunks[c]->src_meta.scm_status = new_state;
sys/dev/softraid_raid6.c
162
sr_raid6_set_chunk_state(struct sr_discipline *sd, int c, int new_state)
sys/dev/softraid_raid6.c
169
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname, c, new_state);
sys/dev/softraid_raid6.c
173
old_state = sd->sd_vol.sv_chunks[c]->src_meta.scm_status;
sys/dev/softraid_raid6.c
223
sd->sd_vol.sv_chunks[c]->src_meta.scmi.scm_devname,
sys/dev/softraid_raid6.c
228
sd->sd_vol.sv_chunks[c]->src_meta.scm_status = new_state;
sys/dev/sun/sunkbd.c
104
u_int8_t c;
sys/dev/sun/sunkbd.c
108
c = SKBD_CMD_BELLOFF;
sys/dev/sun/sunkbd.c
109
(*sc->sc_sendcmd)(v, &c, 1);
sys/dev/sun/sunkbd.c
115
sunkbd_decode(u_int8_t c, u_int *type, int *value)
sys/dev/sun/sunkbd.c
117
switch (c) {
sys/dev/sun/sunkbd.c
123
*type = (c & 0x80) ?
sys/dev/sun/sunkbd.c
125
*value = c & 0x7f;
sys/dev/sun/sunkbd.c
131
sunkbd_decode5(u_int8_t c, u_int *type, int *value)
sys/dev/sun/sunkbd.c
133
sunkbd_decode(c, type, value);
sys/dev/sun/sunkbd.c
168
int c, rlen = 0;
sys/dev/sun/sunkbd.c
172
c = sunkbd_rawmap[value];
sys/dev/sun/sunkbd.c
173
if (c == RAWKEY_Null)
sys/dev/sun/sunkbd.c
176
if (c & 0x80)
sys/dev/sun/sunkbd.c
178
rbuf[rlen] = c & 0x7f;
sys/dev/sun/sunkbd.c
234
sunkbd_raw(struct sunkbd_softc *sc, u_int8_t c)
sys/dev/sun/sunkbd.c
240
sc->sc_layout = c;
sys/dev/sun/sunkbd.c
244
switch (c) {
sys/dev/sun/sunkbd.c
264
if (c < KB_SUN2 || c > KB_SUN4)
sys/dev/sun/sunkbd.c
266
sc->sc_dev.dv_xname, c);
sys/dev/sun/sunkbd.c
268
sc->sc_id = c;
sys/dev/sun/sunkbd.c
278
u_int8_t c;
sys/dev/sun/sunkbd.c
284
c = click ? SKBD_CMD_CLICKON : SKBD_CMD_CLICKOFF;
sys/dev/sun/sunkbd.c
285
(*sc->sc_sendcmd)(sc, &c, 1);
sys/dev/sun/sunkbd.c
78
u_int8_t c = SKBD_CMD_BELLON;
sys/dev/sun/sunkbd.c
93
(*sc->sc_sendcmd)(sc, &c, 1);
sys/dev/sun/sunms.c
131
sunms_input(struct sunms_softc *sc, int c)
sys/dev/sun/sunms.c
166
if (ISSET(c, 0x80) && !ISSET(c, 0x30))
sys/dev/sun/sunms.c
181
sc->sc_pktlen = ISSET(c, 0x08) ? 3 : 5;
sys/dev/sun/sunms.c
183
if (!ISSET(c, 1 << 2)) /* left button */
sys/dev/sun/sunms.c
185
if (!ISSET(c, 1 << 1)) /* middle button */
sys/dev/sun/sunms.c
187
if (!ISSET(c, 1 << 0)) /* right button */
sys/dev/sun/sunms.c
210
sc->sc_dx += (int8_t)c;
sys/dev/sun/sunms.c
215
sc->sc_dy += (int8_t)c;
sys/dev/sun/sunmsvar.h
62
void sunms_input(struct sunms_softc *, int c);
sys/dev/sun/z8530ms.c
272
u_char rr0, rr1, c;
sys/dev/sun/z8530ms.c
282
c = zs_read_data(cs);
sys/dev/sun/z8530ms.c
294
sc->sc_rbuf[put] = (c << 8) | rr1;
sys/dev/sun/z8530ms.c
380
int get, c, s, s2;
sys/dev/sun/z8530ms.c
412
c = (ring_data >> 8) & 0xff;
sys/dev/sun/z8530ms.c
418
sunms_input(&sc->sc_base, c);
sys/dev/tc/tcdsreg.h
85
#define TCDS_CIR_CLR(c, b) c = ((c | TCDS_CIR_ALLINTR) & ~b)
sys/dev/tc/tcdsreg.h
86
#define TCDS_CIR_SET(c, b) c = ((c | TCDS_CIR_ALLINTR) | b)
sys/dev/tc/zs_ioasic.c
634
int s, c;
sys/dev/tc/zs_ioasic.c
643
c = zs_read_data(cs);
sys/dev/tc/zs_ioasic.c
650
return (c);
sys/dev/tc/zs_ioasic.c
657
zs_putc(struct zs_chanstate *cs, int c)
sys/dev/tc/zs_ioasic.c
668
zs_write_data(cs, c);
sys/dev/tc/zs_ioasic.c
813
zs_ioasic_cnputc(dev_t dev, int c)
sys/dev/tc/zs_ioasic.c
815
zs_putc(&zs_ioasic_conschanstate_store, c);
sys/dev/usb/dwc2/gcd.h
40
unsigned long c;
sys/dev/usb/dwc2/gcd.h
42
c = a % b;
sys/dev/usb/dwc2/gcd.h
43
while (c != 0) {
sys/dev/usb/dwc2/gcd.h
45
b = c;
sys/dev/usb/dwc2/gcd.h
46
c = a % b;
sys/dev/usb/ehci.c
285
ehci_reverse_bits(u_int8_t c, int nbits)
sys/dev/usb/ehci.c
287
c = ((c >> 1) & 0x55) | ((c << 1) & 0xaa);
sys/dev/usb/ehci.c
288
c = ((c >> 2) & 0x33) | ((c << 2) & 0xcc);
sys/dev/usb/ehci.c
289
c = ((c >> 4) & 0x0f) | ((c << 4) & 0xf0);
sys/dev/usb/ehci.c
291
return c >> (8 - nbits);
sys/dev/usb/if_athn_usb.c
1529
athn_usb_switch_chan(struct athn_softc *sc, struct ieee80211_channel *c,
sys/dev/usb/if_athn_usb.c
1550
if (c->ic_flags != sc->curchan->ic_flags ||
sys/dev/usb/if_athn_usb.c
1556
error = athn_set_chan(sc, c, extc);
sys/dev/usb/if_athn_usb.c
1562
error = athn_hw_reset(sc, c, extc, 0);
sys/dev/usb/if_athn_usb.c
1566
error = athn_set_chan(sc, c, extc);
sys/dev/usb/if_athn_usb.c
1573
sc->ops.set_txpower(sc, c, extc);
sys/dev/usb/if_athn_usb.c
1580
mode = htobe16(IEEE80211_IS_CHAN_2GHZ(c) ?
sys/dev/usb/if_athn_usb.c
2547
struct ieee80211_channel *c, *extc;
sys/dev/usb/if_athn_usb.c
2569
c = ic->ic_bss->ni_chan = ic->ic_ibss_chan;
sys/dev/usb/if_athn_usb.c
2583
error = athn_hw_reset(sc, c, extc, 1);
sys/dev/usb/if_athn_usb.c
2587
ops->set_txpower(sc, c, extc);
sys/dev/usb/if_athn_usb.c
2589
mode = htobe16(IEEE80211_IS_CHAN_2GHZ(c) ?
sys/dev/usb/if_atu.c
1495
atu_newbuf(struct atu_softc *sc, struct atu_chain *c, struct mbuf *m)
sys/dev/usb/if_atu.c
1520
c->atu_mbuf = m_new;
sys/dev/usb/if_atu.c
1528
struct atu_chain *c;
sys/dev/usb/if_atu.c
1535
c = &cd->atu_rx_chain[i];
sys/dev/usb/if_atu.c
1536
c->atu_sc = sc;
sys/dev/usb/if_atu.c
1537
c->atu_idx = i;
sys/dev/usb/if_atu.c
1538
if (c->atu_xfer == NULL) {
sys/dev/usb/if_atu.c
1539
c->atu_xfer = usbd_alloc_xfer(sc->atu_udev);
sys/dev/usb/if_atu.c
1540
if (c->atu_xfer == NULL)
sys/dev/usb/if_atu.c
1542
c->atu_buf = usbd_alloc_buffer(c->atu_xfer,
sys/dev/usb/if_atu.c
1544
if (c->atu_buf == NULL) /* XXX free xfer */
sys/dev/usb/if_atu.c
1546
if (atu_newbuf(sc, c, NULL) == ENOBUFS) /* XXX free? */
sys/dev/usb/if_atu.c
1557
struct atu_chain *c;
sys/dev/usb/if_atu.c
1567
c = &cd->atu_tx_chain[i];
sys/dev/usb/if_atu.c
1568
c->atu_sc = sc;
sys/dev/usb/if_atu.c
1569
c->atu_idx = i;
sys/dev/usb/if_atu.c
1570
if (c->atu_xfer == NULL) {
sys/dev/usb/if_atu.c
1571
c->atu_xfer = usbd_alloc_xfer(sc->atu_udev);
sys/dev/usb/if_atu.c
1572
if (c->atu_xfer == NULL)
sys/dev/usb/if_atu.c
1574
c->atu_mbuf = NULL;
sys/dev/usb/if_atu.c
1575
c->atu_buf = usbd_alloc_buffer(c->atu_xfer,
sys/dev/usb/if_atu.c
1577
if (c->atu_buf == NULL)
sys/dev/usb/if_atu.c
1579
SLIST_INSERT_HEAD(&cd->atu_tx_free, c, atu_list);
sys/dev/usb/if_atu.c
1613
struct atu_chain *c = (struct atu_chain *)priv;
sys/dev/usb/if_atu.c
1614
struct atu_softc *sc = c->atu_sc;
sys/dev/usb/if_atu.c
1678
h = (struct atu_rx_hdr *)c->atu_buf;
sys/dev/usb/if_atu.c
1691
m = c->atu_mbuf;
sys/dev/usb/if_atu.c
1692
memcpy(mtod(m, char *), c->atu_buf + ATU_RX_HDRLEN, len);
sys/dev/usb/if_atu.c
1700
if (atu_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_atu.c
1747
usbd_setup_xfer(c->atu_xfer, sc->atu_ep[ATU_ENDPT_RX], c, c->atu_buf,
sys/dev/usb/if_atu.c
1750
usbd_transfer(c->atu_xfer);
sys/dev/usb/if_atu.c
1760
struct atu_chain *c = (struct atu_chain *)priv;
sys/dev/usb/if_atu.c
1761
struct atu_softc *sc = c->atu_sc;
sys/dev/usb/if_atu.c
1769
if (c->atu_mbuf != NULL) {
sys/dev/usb/if_atu.c
1770
m_freem(c->atu_mbuf);
sys/dev/usb/if_atu.c
1771
c->atu_mbuf = NULL;
sys/dev/usb/if_atu.c
1785
usbd_get_xfer_status(c->atu_xfer, NULL, NULL, NULL, &err);
sys/dev/usb/if_atu.c
1791
SLIST_INSERT_HEAD(&sc->atu_cdata.atu_tx_free, c, atu_list);
sys/dev/usb/if_atu.c
1815
struct atu_chain *c, struct mbuf *m)
sys/dev/usb/if_atu.c
1860
m_copydata(m, 0, m->m_pkthdr.len, c->atu_buf + ATU_TX_HDRLEN);
sys/dev/usb/if_atu.c
1862
h = (struct atu_tx_hdr *)c->atu_buf;
sys/dev/usb/if_atu.c
1872
c->atu_length = len;
sys/dev/usb/if_atu.c
1873
c->atu_mbuf = m;
sys/dev/usb/if_atu.c
1875
usbd_setup_xfer(c->atu_xfer, sc->atu_ep[ATU_ENDPT_TX],
sys/dev/usb/if_atu.c
1876
c, c->atu_buf, c->atu_length, USBD_NO_COPY, ATU_TX_TIMEOUT,
sys/dev/usb/if_atu.c
1880
c->atu_in_xfer = 1;
sys/dev/usb/if_atu.c
1881
err = usbd_transfer(c->atu_xfer);
sys/dev/usb/if_atu.c
1885
c->atu_mbuf = NULL;
sys/dev/usb/if_atu.c
1901
struct atu_chain *c;
sys/dev/usb/if_atu.c
1922
c = SLIST_FIRST(&cd->atu_tx_free);
sys/dev/usb/if_atu.c
1923
if (c != NULL) {
sys/dev/usb/if_atu.c
1930
if (c == NULL) {
sys/dev/usb/if_atu.c
1950
SLIST_INSERT_HEAD(&cd->atu_tx_free, c,
sys/dev/usb/if_atu.c
1962
SLIST_INSERT_HEAD(&cd->atu_tx_free, c,
sys/dev/usb/if_atu.c
1993
if (atu_tx_start(sc, ni, c, m)) {
sys/dev/usb/if_atu.c
1996
SLIST_INSERT_HEAD(&cd->atu_tx_free, c,
sys/dev/usb/if_atu.c
2014
struct atu_chain *c;
sys/dev/usb/if_atu.c
2059
c = &sc->atu_cdata.atu_rx_chain[i];
sys/dev/usb/if_atu.c
2061
usbd_setup_xfer(c->atu_xfer, sc->atu_ep[ATU_ENDPT_RX], c,
sys/dev/usb/if_atu.c
2062
c->atu_buf, ATU_RX_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_atu.c
2064
usbd_transfer(c->atu_xfer);
sys/dev/usb/if_atu.c
2194
struct atu_chain *c;
sys/dev/usb/if_atu.c
2218
c = &sc->atu_cdata.atu_tx_chain[cnt];
sys/dev/usb/if_atu.c
2219
if (c->atu_in_xfer) {
sys/dev/usb/if_atu.c
2220
usbd_get_xfer_status(c->atu_xfer, NULL, NULL, NULL,
sys/dev/usb/if_atu.c
2222
atu_txeof(c->atu_xfer, c, stat);
sys/dev/usb/if_aue.c
1030
memcpy(mtod(c->aue_mbuf, char *), c->aue_buf, total_len);
sys/dev/usb/if_aue.c
1037
memcpy(&r, c->aue_buf + total_len - 4, sizeof(r));
sys/dev/usb/if_aue.c
1047
m = c->aue_mbuf;
sys/dev/usb/if_aue.c
1052
if (aue_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_aue.c
1065
c, c->aue_buf, AUE_BUFSZ,
sys/dev/usb/if_aue.c
1082
struct aue_chain *c = priv;
sys/dev/usb/if_aue.c
1083
struct aue_softc *sc = c->aue_sc;
sys/dev/usb/if_aue.c
1112
m_freem(c->aue_mbuf);
sys/dev/usb/if_aue.c
1113
c->aue_mbuf = NULL;
sys/dev/usb/if_aue.c
1177
struct aue_chain *c;
sys/dev/usb/if_aue.c
1182
c = &sc->aue_cdata.aue_tx_chain[idx];
sys/dev/usb/if_aue.c
1188
m_copydata(m, 0, m->m_pkthdr.len, c->aue_buf + 2);
sys/dev/usb/if_aue.c
1189
c->aue_mbuf = m;
sys/dev/usb/if_aue.c
1197
c->aue_buf[0] = (u_int8_t)m->m_pkthdr.len;
sys/dev/usb/if_aue.c
1198
c->aue_buf[1] = (u_int8_t)(m->m_pkthdr.len >> 8);
sys/dev/usb/if_aue.c
1201
usbd_setup_xfer(c->aue_xfer, sc->aue_ep[AUE_ENDPT_TX],
sys/dev/usb/if_aue.c
1202
c, c->aue_buf, total_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_aue.c
1206
err = usbd_transfer(c->aue_xfer);
sys/dev/usb/if_aue.c
1336
struct aue_chain *c;
sys/dev/usb/if_aue.c
1367
c = &sc->aue_cdata.aue_rx_chain[i];
sys/dev/usb/if_aue.c
1368
usbd_setup_xfer(c->aue_xfer, sc->aue_ep[AUE_ENDPT_RX],
sys/dev/usb/if_aue.c
1369
c, c->aue_buf, AUE_BUFSZ,
sys/dev/usb/if_aue.c
1372
(void)usbd_transfer(c->aue_xfer); /* XXX */
sys/dev/usb/if_aue.c
1475
struct aue_chain *c;
sys/dev/usb/if_aue.c
1485
c = &sc->aue_cdata.aue_tx_chain[0];
sys/dev/usb/if_aue.c
1486
usbd_get_xfer_status(c->aue_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_aue.c
1487
aue_txeof(c->aue_xfer, c, stat);
sys/dev/usb/if_aue.c
860
aue_newbuf(struct aue_softc *sc, struct aue_chain *c, struct mbuf *m)
sys/dev/usb/if_aue.c
889
c->aue_mbuf = m_new;
sys/dev/usb/if_aue.c
898
struct aue_chain *c;
sys/dev/usb/if_aue.c
905
c = &cd->aue_rx_chain[i];
sys/dev/usb/if_aue.c
906
c->aue_sc = sc;
sys/dev/usb/if_aue.c
907
c->aue_idx = i;
sys/dev/usb/if_aue.c
908
if (aue_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_aue.c
910
if (c->aue_xfer == NULL) {
sys/dev/usb/if_aue.c
911
c->aue_xfer = usbd_alloc_xfer(sc->aue_udev);
sys/dev/usb/if_aue.c
912
if (c->aue_xfer == NULL)
sys/dev/usb/if_aue.c
914
c->aue_buf = usbd_alloc_buffer(c->aue_xfer, AUE_BUFSZ);
sys/dev/usb/if_aue.c
915
if (c->aue_buf == NULL)
sys/dev/usb/if_aue.c
927
struct aue_chain *c;
sys/dev/usb/if_aue.c
934
c = &cd->aue_tx_chain[i];
sys/dev/usb/if_aue.c
935
c->aue_sc = sc;
sys/dev/usb/if_aue.c
936
c->aue_idx = i;
sys/dev/usb/if_aue.c
937
c->aue_mbuf = NULL;
sys/dev/usb/if_aue.c
938
if (c->aue_xfer == NULL) {
sys/dev/usb/if_aue.c
939
c->aue_xfer = usbd_alloc_xfer(sc->aue_udev);
sys/dev/usb/if_aue.c
940
if (c->aue_xfer == NULL)
sys/dev/usb/if_aue.c
942
c->aue_buf = usbd_alloc_buffer(c->aue_xfer, AUE_BUFSZ);
sys/dev/usb/if_aue.c
943
if (c->aue_buf == NULL)
sys/dev/usb/if_aue.c
996
struct aue_chain *c = priv;
sys/dev/usb/if_aue.c
997
struct aue_softc *sc = c->aue_sc;
sys/dev/usb/if_axe.c
1068
memset(c->axe_buf, 0, sc->axe_bufsz);
sys/dev/usb/if_axe.c
1072
c, c->axe_buf, sc->axe_bufsz,
sys/dev/usb/if_axe.c
1091
struct axe_chain *c;
sys/dev/usb/if_axe.c
1095
c = priv;
sys/dev/usb/if_axe.c
1096
sc = c->axe_sc;
sys/dev/usb/if_axe.c
1121
m_freem(c->axe_mbuf);
sys/dev/usb/if_axe.c
1122
c->axe_mbuf = NULL;
sys/dev/usb/if_axe.c
1184
struct axe_chain *c;
sys/dev/usb/if_axe.c
1189
c = &sc->axe_cdata.axe_tx_chain[idx];
sys/dev/usb/if_axe.c
1197
memcpy(c->axe_buf, &hdr, sizeof(hdr));
sys/dev/usb/if_axe.c
1200
m_copydata(m, 0, m->m_pkthdr.len, c->axe_buf + length);
sys/dev/usb/if_axe.c
1206
memcpy(c->axe_buf + length, &hdr, sizeof(hdr));
sys/dev/usb/if_axe.c
1211
m_copydata(m, 0, m->m_pkthdr.len, c->axe_buf);
sys/dev/usb/if_axe.c
1215
c->axe_mbuf = m;
sys/dev/usb/if_axe.c
1217
usbd_setup_xfer(c->axe_xfer, sc->axe_ep[AXE_ENDPT_TX],
sys/dev/usb/if_axe.c
1218
c, c->axe_buf, length, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_axe.c
1222
err = usbd_transfer(c->axe_xfer);
sys/dev/usb/if_axe.c
1224
c->axe_mbuf = NULL;
sys/dev/usb/if_axe.c
1282
struct axe_chain *c;
sys/dev/usb/if_axe.c
1364
c = &sc->axe_cdata.axe_rx_chain[i];
sys/dev/usb/if_axe.c
1365
usbd_setup_xfer(c->axe_xfer, sc->axe_ep[AXE_ENDPT_RX],
sys/dev/usb/if_axe.c
1366
c, c->axe_buf, sc->axe_bufsz,
sys/dev/usb/if_axe.c
1369
usbd_transfer(c->axe_xfer);
sys/dev/usb/if_axe.c
1433
struct axe_chain *c;
sys/dev/usb/if_axe.c
1443
c = &sc->axe_cdata.axe_tx_chain[0];
sys/dev/usb/if_axe.c
1444
usbd_get_xfer_status(c->axe_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_axe.c
1445
axe_txeof(c->axe_xfer, c, stat);
sys/dev/usb/if_axe.c
912
struct axe_chain *c;
sys/dev/usb/if_axe.c
919
c = &cd->axe_rx_chain[i];
sys/dev/usb/if_axe.c
920
c->axe_sc = sc;
sys/dev/usb/if_axe.c
921
c->axe_idx = i;
sys/dev/usb/if_axe.c
922
c->axe_mbuf = NULL;
sys/dev/usb/if_axe.c
923
if (c->axe_xfer == NULL) {
sys/dev/usb/if_axe.c
924
c->axe_xfer = usbd_alloc_xfer(sc->axe_udev);
sys/dev/usb/if_axe.c
925
if (c->axe_xfer == NULL)
sys/dev/usb/if_axe.c
927
c->axe_buf = usbd_alloc_buffer(c->axe_xfer,
sys/dev/usb/if_axe.c
929
if (c->axe_buf == NULL) {
sys/dev/usb/if_axe.c
930
usbd_free_xfer(c->axe_xfer);
sys/dev/usb/if_axe.c
943
struct axe_chain *c;
sys/dev/usb/if_axe.c
950
c = &cd->axe_tx_chain[i];
sys/dev/usb/if_axe.c
951
c->axe_sc = sc;
sys/dev/usb/if_axe.c
952
c->axe_idx = i;
sys/dev/usb/if_axe.c
953
c->axe_mbuf = NULL;
sys/dev/usb/if_axe.c
954
if (c->axe_xfer == NULL) {
sys/dev/usb/if_axe.c
955
c->axe_xfer = usbd_alloc_xfer(sc->axe_udev);
sys/dev/usb/if_axe.c
956
if (c->axe_xfer == NULL)
sys/dev/usb/if_axe.c
958
c->axe_buf = usbd_alloc_buffer(c->axe_xfer,
sys/dev/usb/if_axe.c
960
if (c->axe_buf == NULL) {
sys/dev/usb/if_axe.c
961
usbd_free_xfer(c->axe_xfer);
sys/dev/usb/if_axe.c
977
struct axe_chain *c = (struct axe_chain *)priv;
sys/dev/usb/if_axe.c
978
struct axe_softc *sc = c->axe_sc;
sys/dev/usb/if_axe.c
981
u_char *buf = c->axe_buf;
sys/dev/usb/if_axen.c
1064
memset(c->axen_buf, 0, sc->axen_bufsz);
sys/dev/usb/if_axen.c
1068
c, c->axen_buf, sc->axen_bufsz,
sys/dev/usb/if_axen.c
1084
struct axen_chain *c;
sys/dev/usb/if_axen.c
1088
c = priv;
sys/dev/usb/if_axen.c
1089
sc = c->axen_sc;
sys/dev/usb/if_axen.c
1114
m_freem(c->axen_mbuf);
sys/dev/usb/if_axen.c
1115
c->axen_mbuf = NULL;
sys/dev/usb/if_axen.c
1173
struct axen_chain *c;
sys/dev/usb/if_axen.c
1178
c = &sc->axen_cdata.axen_tx_chain[idx];
sys/dev/usb/if_axen.c
1198
memcpy(c->axen_buf, &hdr, sizeof(hdr));
sys/dev/usb/if_axen.c
1201
m_copydata(m, 0, m->m_pkthdr.len, c->axen_buf + length);
sys/dev/usb/if_axen.c
1207
memcpy(c->axen_buf + length, &hdr, sizeof(hdr));
sys/dev/usb/if_axen.c
1211
c->axen_mbuf = m;
sys/dev/usb/if_axen.c
1213
usbd_setup_xfer(c->axen_xfer, sc->axen_ep[AXEN_ENDPT_TX],
sys/dev/usb/if_axen.c
1214
c, c->axen_buf, length, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_axen.c
1218
err = usbd_transfer(c->axen_xfer);
sys/dev/usb/if_axen.c
1220
c->axen_mbuf = NULL;
sys/dev/usb/if_axen.c
1276
struct axen_chain *c;
sys/dev/usb/if_axen.c
1343
c = &sc->axen_cdata.axen_rx_chain[i];
sys/dev/usb/if_axen.c
1344
usbd_setup_xfer(c->axen_xfer, sc->axen_ep[AXEN_ENDPT_RX],
sys/dev/usb/if_axen.c
1345
c, c->axen_buf, sc->axen_bufsz,
sys/dev/usb/if_axen.c
1348
usbd_transfer(c->axen_xfer);
sys/dev/usb/if_axen.c
1419
struct axen_chain *c;
sys/dev/usb/if_axen.c
1429
c = &sc->axen_cdata.axen_tx_chain[0];
sys/dev/usb/if_axen.c
1430
usbd_get_xfer_status(c->axen_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_axen.c
1431
axen_txeof(c->axen_xfer, c, stat);
sys/dev/usb/if_axen.c
826
struct axen_chain *c;
sys/dev/usb/if_axen.c
833
c = &cd->axen_rx_chain[i];
sys/dev/usb/if_axen.c
834
c->axen_sc = sc;
sys/dev/usb/if_axen.c
835
c->axen_idx = i;
sys/dev/usb/if_axen.c
836
c->axen_mbuf = NULL;
sys/dev/usb/if_axen.c
837
if (c->axen_xfer == NULL) {
sys/dev/usb/if_axen.c
838
c->axen_xfer = usbd_alloc_xfer(sc->axen_udev);
sys/dev/usb/if_axen.c
839
if (c->axen_xfer == NULL)
sys/dev/usb/if_axen.c
841
c->axen_buf = usbd_alloc_buffer(c->axen_xfer,
sys/dev/usb/if_axen.c
843
if (c->axen_buf == NULL) {
sys/dev/usb/if_axen.c
844
usbd_free_xfer(c->axen_xfer);
sys/dev/usb/if_axen.c
857
struct axen_chain *c;
sys/dev/usb/if_axen.c
864
c = &cd->axen_tx_chain[i];
sys/dev/usb/if_axen.c
865
c->axen_sc = sc;
sys/dev/usb/if_axen.c
866
c->axen_idx = i;
sys/dev/usb/if_axen.c
867
c->axen_mbuf = NULL;
sys/dev/usb/if_axen.c
868
if (c->axen_xfer == NULL) {
sys/dev/usb/if_axen.c
869
c->axen_xfer = usbd_alloc_xfer(sc->axen_udev);
sys/dev/usb/if_axen.c
870
if (c->axen_xfer == NULL)
sys/dev/usb/if_axen.c
872
c->axen_buf = usbd_alloc_buffer(c->axen_xfer,
sys/dev/usb/if_axen.c
874
if (c->axen_buf == NULL) {
sys/dev/usb/if_axen.c
875
usbd_free_xfer(c->axen_xfer);
sys/dev/usb/if_axen.c
891
struct axen_chain *c = (struct axen_chain *)priv;
sys/dev/usb/if_axen.c
892
struct axen_softc *sc = c->axen_sc;
sys/dev/usb/if_axen.c
894
u_char *buf = c->axen_buf;
sys/dev/usb/if_cdce.c
309
int c = UGETW(eaddr_str.bString[i]);
sys/dev/usb/if_cdce.c
311
if ('0' <= c && c <= '9')
sys/dev/usb/if_cdce.c
312
c -= '0';
sys/dev/usb/if_cdce.c
313
else if ('A' <= c && c <= 'F')
sys/dev/usb/if_cdce.c
314
c -= 'A' - 10;
sys/dev/usb/if_cdce.c
315
else if ('a' <= c && c <= 'f')
sys/dev/usb/if_cdce.c
316
c -= 'a' - 10;
sys/dev/usb/if_cdce.c
317
c &= 0xf;
sys/dev/usb/if_cdce.c
319
c <<= 4;
sys/dev/usb/if_cdce.c
320
sc->cdce_arpcom.ac_enaddr[i / 2] |= c;
sys/dev/usb/if_cdce.c
399
struct cdce_chain *c;
sys/dev/usb/if_cdce.c
403
c = &sc->cdce_cdata.cdce_tx_chain[idx];
sys/dev/usb/if_cdce.c
405
m_copydata(m, 0, m->m_pkthdr.len, c->cdce_buf);
sys/dev/usb/if_cdce.c
410
crc = ether_crc32_le(c->cdce_buf, m->m_pkthdr.len) ^ ~0U;
sys/dev/usb/if_cdce.c
411
bcopy(&crc, c->cdce_buf + m->m_pkthdr.len, 4);
sys/dev/usb/if_cdce.c
414
c->cdce_mbuf = m;
sys/dev/usb/if_cdce.c
416
usbd_setup_xfer(c->cdce_xfer, sc->cdce_bulkout_pipe, c, c->cdce_buf,
sys/dev/usb/if_cdce.c
419
err = usbd_transfer(c->cdce_xfer);
sys/dev/usb/if_cdce.c
421
c->cdce_mbuf = NULL;
sys/dev/usb/if_cdce.c
549
struct cdce_chain *c;
sys/dev/usb/if_cdce.c
602
c = &sc->cdce_cdata.cdce_rx_chain[i];
sys/dev/usb/if_cdce.c
603
usbd_setup_xfer(c->cdce_xfer, sc->cdce_bulkin_pipe, c,
sys/dev/usb/if_cdce.c
604
c->cdce_buf, CDCE_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_cdce.c
606
usbd_transfer(c->cdce_xfer);
sys/dev/usb/if_cdce.c
616
cdce_newbuf(struct cdce_softc *sc, struct cdce_chain *c, struct mbuf *m)
sys/dev/usb/if_cdce.c
642
c->cdce_mbuf = m_new;
sys/dev/usb/if_cdce.c
650
struct cdce_chain *c;
sys/dev/usb/if_cdce.c
655
c = &cd->cdce_rx_chain[i];
sys/dev/usb/if_cdce.c
656
c->cdce_sc = sc;
sys/dev/usb/if_cdce.c
657
c->cdce_idx = i;
sys/dev/usb/if_cdce.c
658
if (cdce_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_cdce.c
660
if (c->cdce_xfer == NULL) {
sys/dev/usb/if_cdce.c
661
c->cdce_xfer = usbd_alloc_xfer(sc->cdce_udev);
sys/dev/usb/if_cdce.c
662
if (c->cdce_xfer == NULL)
sys/dev/usb/if_cdce.c
664
c->cdce_buf = usbd_alloc_buffer(c->cdce_xfer,
sys/dev/usb/if_cdce.c
666
if (c->cdce_buf == NULL)
sys/dev/usb/if_cdce.c
678
struct cdce_chain *c;
sys/dev/usb/if_cdce.c
683
c = &cd->cdce_tx_chain[i];
sys/dev/usb/if_cdce.c
684
c->cdce_sc = sc;
sys/dev/usb/if_cdce.c
685
c->cdce_idx = i;
sys/dev/usb/if_cdce.c
686
c->cdce_mbuf = NULL;
sys/dev/usb/if_cdce.c
687
if (c->cdce_xfer == NULL) {
sys/dev/usb/if_cdce.c
688
c->cdce_xfer = usbd_alloc_xfer(sc->cdce_udev);
sys/dev/usb/if_cdce.c
689
if (c->cdce_xfer == NULL)
sys/dev/usb/if_cdce.c
691
c->cdce_buf = usbd_alloc_buffer(c->cdce_xfer,
sys/dev/usb/if_cdce.c
693
if (c->cdce_buf == NULL)
sys/dev/usb/if_cdce.c
704
struct cdce_chain *c = priv;
sys/dev/usb/if_cdce.c
705
struct cdce_softc *sc = c->cdce_sc;
sys/dev/usb/if_cdce.c
741
m = c->cdce_mbuf;
sys/dev/usb/if_cdce.c
742
memcpy(mtod(m, char *), c->cdce_buf, total_len);
sys/dev/usb/if_cdce.c
752
if (cdce_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_cdce.c
763
usbd_setup_xfer(c->cdce_xfer, sc->cdce_bulkin_pipe, c, c->cdce_buf,
sys/dev/usb/if_cdce.c
766
usbd_transfer(c->cdce_xfer);
sys/dev/usb/if_cdce.c
772
struct cdce_chain *c = priv;
sys/dev/usb/if_cdce.c
773
struct cdce_softc *sc = c->cdce_sc;
sys/dev/usb/if_cdce.c
800
usbd_get_xfer_status(c->cdce_xfer, NULL, NULL, NULL, &err);
sys/dev/usb/if_cdce.c
802
if (c->cdce_mbuf != NULL) {
sys/dev/usb/if_cdce.c
803
m_freem(c->cdce_mbuf);
sys/dev/usb/if_cdce.c
804
c->cdce_mbuf = NULL;
sys/dev/usb/if_cue.c
1016
c = &sc->cue_cdata.cue_rx_chain[i];
sys/dev/usb/if_cue.c
1017
usbd_setup_xfer(c->cue_xfer, sc->cue_ep[CUE_ENDPT_RX],
sys/dev/usb/if_cue.c
1018
c, c->cue_buf, CUE_BUFSZ,
sys/dev/usb/if_cue.c
1021
usbd_transfer(c->cue_xfer);
sys/dev/usb/if_cue.c
1084
struct cue_chain *c;
sys/dev/usb/if_cue.c
1097
c = &sc->cue_cdata.cue_tx_chain[0];
sys/dev/usb/if_cue.c
1098
usbd_get_xfer_status(c->cue_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_cue.c
1099
cue_txeof(c->cue_xfer, c, stat);
sys/dev/usb/if_cue.c
566
cue_newbuf(struct cue_softc *sc, struct cue_chain *c, struct mbuf *m)
sys/dev/usb/if_cue.c
593
c->cue_mbuf = m_new;
sys/dev/usb/if_cue.c
602
struct cue_chain *c;
sys/dev/usb/if_cue.c
607
c = &cd->cue_rx_chain[i];
sys/dev/usb/if_cue.c
608
c->cue_sc = sc;
sys/dev/usb/if_cue.c
609
c->cue_idx = i;
sys/dev/usb/if_cue.c
610
if (cue_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_cue.c
612
if (c->cue_xfer == NULL) {
sys/dev/usb/if_cue.c
613
c->cue_xfer = usbd_alloc_xfer(sc->cue_udev);
sys/dev/usb/if_cue.c
614
if (c->cue_xfer == NULL)
sys/dev/usb/if_cue.c
616
c->cue_buf = usbd_alloc_buffer(c->cue_xfer, CUE_BUFSZ);
sys/dev/usb/if_cue.c
617
if (c->cue_buf == NULL) {
sys/dev/usb/if_cue.c
618
usbd_free_xfer(c->cue_xfer);
sys/dev/usb/if_cue.c
631
struct cue_chain *c;
sys/dev/usb/if_cue.c
636
c = &cd->cue_tx_chain[i];
sys/dev/usb/if_cue.c
637
c->cue_sc = sc;
sys/dev/usb/if_cue.c
638
c->cue_idx = i;
sys/dev/usb/if_cue.c
639
c->cue_mbuf = NULL;
sys/dev/usb/if_cue.c
640
if (c->cue_xfer == NULL) {
sys/dev/usb/if_cue.c
641
c->cue_xfer = usbd_alloc_xfer(sc->cue_udev);
sys/dev/usb/if_cue.c
642
if (c->cue_xfer == NULL)
sys/dev/usb/if_cue.c
644
c->cue_buf = usbd_alloc_buffer(c->cue_xfer, CUE_BUFSZ);
sys/dev/usb/if_cue.c
645
if (c->cue_buf == NULL) {
sys/dev/usb/if_cue.c
646
usbd_free_xfer(c->cue_xfer);
sys/dev/usb/if_cue.c
662
struct cue_chain *c = priv;
sys/dev/usb/if_cue.c
663
struct cue_softc *sc = c->cue_sc;
sys/dev/usb/if_cue.c
697
memcpy(mtod(c->cue_mbuf, char *), c->cue_buf, total_len);
sys/dev/usb/if_cue.c
699
m = c->cue_mbuf;
sys/dev/usb/if_cue.c
714
if (cue_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_cue.c
725
usbd_setup_xfer(c->cue_xfer, sc->cue_ep[CUE_ENDPT_RX],
sys/dev/usb/if_cue.c
726
c, c->cue_buf, CUE_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_cue.c
728
usbd_transfer(c->cue_xfer);
sys/dev/usb/if_cue.c
741
struct cue_chain *c = priv;
sys/dev/usb/if_cue.c
742
struct cue_softc *sc = c->cue_sc;
sys/dev/usb/if_cue.c
771
m_freem(c->cue_mbuf);
sys/dev/usb/if_cue.c
772
c->cue_mbuf = NULL;
sys/dev/usb/if_cue.c
822
struct cue_chain *c;
sys/dev/usb/if_cue.c
825
c = &sc->cue_cdata.cue_tx_chain[idx];
sys/dev/usb/if_cue.c
831
m_copydata(m, 0, m->m_pkthdr.len, c->cue_buf + 2);
sys/dev/usb/if_cue.c
832
c->cue_mbuf = m;
sys/dev/usb/if_cue.c
840
c->cue_buf[0] = (u_int8_t)m->m_pkthdr.len;
sys/dev/usb/if_cue.c
841
c->cue_buf[1] = (u_int8_t)(m->m_pkthdr.len >> 8);
sys/dev/usb/if_cue.c
844
usbd_setup_xfer(c->cue_xfer, sc->cue_ep[CUE_ENDPT_TX],
sys/dev/usb/if_cue.c
845
c, c->cue_buf, total_len, USBD_NO_COPY, 10000, cue_txeof);
sys/dev/usb/if_cue.c
848
err = usbd_transfer(c->cue_xfer);
sys/dev/usb/if_cue.c
994
struct cue_chain *c;
sys/dev/usb/if_kue.c
1057
struct kue_chain *c;
sys/dev/usb/if_kue.c
1070
c = &sc->kue_cdata.kue_tx_chain[0];
sys/dev/usb/if_kue.c
1071
usbd_get_xfer_status(c->kue_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_kue.c
1072
kue_txeof(c->kue_xfer, c, stat);
sys/dev/usb/if_kue.c
573
kue_newbuf(struct kue_softc *sc, struct kue_chain *c, struct mbuf *m)
sys/dev/usb/if_kue.c
601
c->kue_mbuf = m_new;
sys/dev/usb/if_kue.c
610
struct kue_chain *c;
sys/dev/usb/if_kue.c
617
c = &cd->kue_rx_chain[i];
sys/dev/usb/if_kue.c
618
c->kue_sc = sc;
sys/dev/usb/if_kue.c
619
c->kue_idx = i;
sys/dev/usb/if_kue.c
620
if (kue_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_kue.c
622
if (c->kue_xfer == NULL) {
sys/dev/usb/if_kue.c
623
c->kue_xfer = usbd_alloc_xfer(sc->kue_udev);
sys/dev/usb/if_kue.c
624
if (c->kue_xfer == NULL)
sys/dev/usb/if_kue.c
626
c->kue_buf = usbd_alloc_buffer(c->kue_xfer, KUE_BUFSZ);
sys/dev/usb/if_kue.c
627
if (c->kue_buf == NULL)
sys/dev/usb/if_kue.c
639
struct kue_chain *c;
sys/dev/usb/if_kue.c
646
c = &cd->kue_tx_chain[i];
sys/dev/usb/if_kue.c
647
c->kue_sc = sc;
sys/dev/usb/if_kue.c
648
c->kue_idx = i;
sys/dev/usb/if_kue.c
649
c->kue_mbuf = NULL;
sys/dev/usb/if_kue.c
650
if (c->kue_xfer == NULL) {
sys/dev/usb/if_kue.c
651
c->kue_xfer = usbd_alloc_xfer(sc->kue_udev);
sys/dev/usb/if_kue.c
652
if (c->kue_xfer == NULL)
sys/dev/usb/if_kue.c
654
c->kue_buf = usbd_alloc_buffer(c->kue_xfer, KUE_BUFSZ);
sys/dev/usb/if_kue.c
655
if (c->kue_buf == NULL)
sys/dev/usb/if_kue.c
670
struct kue_chain *c = priv;
sys/dev/usb/if_kue.c
671
struct kue_softc *sc = c->kue_sc;
sys/dev/usb/if_kue.c
706
UGETW(mtod(c->kue_mbuf, u_int8_t *))));
sys/dev/usb/if_kue.c
711
m = c->kue_mbuf;
sys/dev/usb/if_kue.c
713
memcpy(mtod(m, char *), c->kue_buf, total_len);
sys/dev/usb/if_kue.c
727
if (kue_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_kue.c
739
usbd_setup_xfer(c->kue_xfer, sc->kue_ep[KUE_ENDPT_RX],
sys/dev/usb/if_kue.c
740
c, c->kue_buf, KUE_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_kue.c
742
usbd_transfer(c->kue_xfer);
sys/dev/usb/if_kue.c
756
struct kue_chain *c = priv;
sys/dev/usb/if_kue.c
757
struct kue_softc *sc = c->kue_sc;
sys/dev/usb/if_kue.c
786
m_freem(c->kue_mbuf);
sys/dev/usb/if_kue.c
787
c->kue_mbuf = NULL;
sys/dev/usb/if_kue.c
799
struct kue_chain *c;
sys/dev/usb/if_kue.c
804
c = &sc->kue_cdata.kue_tx_chain[idx];
sys/dev/usb/if_kue.c
810
m_copydata(m, 0, m->m_pkthdr.len, c->kue_buf + 2);
sys/dev/usb/if_kue.c
811
c->kue_mbuf = m;
sys/dev/usb/if_kue.c
818
c->kue_buf[0] = (u_int8_t)m->m_pkthdr.len;
sys/dev/usb/if_kue.c
819
c->kue_buf[1] = (u_int8_t)(m->m_pkthdr.len >> 8);
sys/dev/usb/if_kue.c
821
usbd_setup_xfer(c->kue_xfer, sc->kue_ep[KUE_ENDPT_TX],
sys/dev/usb/if_kue.c
822
c, c->kue_buf, total_len, USBD_NO_COPY, USBD_DEFAULT_TIMEOUT,
sys/dev/usb/if_kue.c
826
err = usbd_transfer(c->kue_xfer);
sys/dev/usb/if_kue.c
830
c->kue_mbuf = NULL;
sys/dev/usb/if_kue.c
952
struct kue_chain *c;
sys/dev/usb/if_kue.c
976
c = &sc->kue_cdata.kue_rx_chain[i];
sys/dev/usb/if_kue.c
977
usbd_setup_xfer(c->kue_xfer, sc->kue_ep[KUE_ENDPT_RX],
sys/dev/usb/if_kue.c
978
c, c->kue_buf, KUE_BUFSZ,
sys/dev/usb/if_kue.c
983
usbd_transfer(c->kue_xfer);
sys/dev/usb/if_mos.c
1009
m_freem(c->mos_mbuf);
sys/dev/usb/if_mos.c
1010
c->mos_mbuf = NULL;
sys/dev/usb/if_mos.c
1079
struct mos_chain *c;
sys/dev/usb/if_mos.c
1083
c = &sc->mos_cdata.mos_tx_chain[idx];
sys/dev/usb/if_mos.c
1085
m_copydata(m, 0, m->m_pkthdr.len, c->mos_buf);
sys/dev/usb/if_mos.c
1088
c->mos_mbuf = m;
sys/dev/usb/if_mos.c
1090
usbd_setup_xfer(c->mos_xfer, sc->mos_ep[MOS_ENDPT_TX],
sys/dev/usb/if_mos.c
1091
c, c->mos_buf, length, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_mos.c
1095
err = usbd_transfer(c->mos_xfer);
sys/dev/usb/if_mos.c
1097
c->mos_mbuf = NULL;
sys/dev/usb/if_mos.c
1155
struct mos_chain *c;
sys/dev/usb/if_mos.c
1224
c = &sc->mos_cdata.mos_rx_chain[i];
sys/dev/usb/if_mos.c
1225
usbd_setup_xfer(c->mos_xfer, sc->mos_ep[MOS_ENDPT_RX],
sys/dev/usb/if_mos.c
1226
c, c->mos_buf, sc->mos_bufsz,
sys/dev/usb/if_mos.c
1229
usbd_transfer(c->mos_xfer);
sys/dev/usb/if_mos.c
1292
struct mos_chain *c;
sys/dev/usb/if_mos.c
1302
c = &sc->mos_cdata.mos_tx_chain[0];
sys/dev/usb/if_mos.c
1303
usbd_get_xfer_status(c->mos_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_mos.c
1304
mos_txeof(c->mos_xfer, c, stat);
sys/dev/usb/if_mos.c
814
struct mos_chain *c;
sys/dev/usb/if_mos.c
821
c = &cd->mos_rx_chain[i];
sys/dev/usb/if_mos.c
822
c->mos_sc = sc;
sys/dev/usb/if_mos.c
823
c->mos_idx = i;
sys/dev/usb/if_mos.c
824
c->mos_mbuf = NULL;
sys/dev/usb/if_mos.c
825
if (c->mos_xfer == NULL) {
sys/dev/usb/if_mos.c
826
c->mos_xfer = usbd_alloc_xfer(sc->mos_udev);
sys/dev/usb/if_mos.c
827
if (c->mos_xfer == NULL)
sys/dev/usb/if_mos.c
829
c->mos_buf = usbd_alloc_buffer(c->mos_xfer,
sys/dev/usb/if_mos.c
831
if (c->mos_buf == NULL) {
sys/dev/usb/if_mos.c
832
usbd_free_xfer(c->mos_xfer);
sys/dev/usb/if_mos.c
845
struct mos_chain *c;
sys/dev/usb/if_mos.c
852
c = &cd->mos_tx_chain[i];
sys/dev/usb/if_mos.c
853
c->mos_sc = sc;
sys/dev/usb/if_mos.c
854
c->mos_idx = i;
sys/dev/usb/if_mos.c
855
c->mos_mbuf = NULL;
sys/dev/usb/if_mos.c
856
if (c->mos_xfer == NULL) {
sys/dev/usb/if_mos.c
857
c->mos_xfer = usbd_alloc_xfer(sc->mos_udev);
sys/dev/usb/if_mos.c
858
if (c->mos_xfer == NULL)
sys/dev/usb/if_mos.c
860
c->mos_buf = usbd_alloc_buffer(c->mos_xfer,
sys/dev/usb/if_mos.c
862
if (c->mos_buf == NULL) {
sys/dev/usb/if_mos.c
863
usbd_free_xfer(c->mos_xfer);
sys/dev/usb/if_mos.c
879
struct mos_chain *c = (struct mos_chain *)priv;
sys/dev/usb/if_mos.c
880
struct mos_softc *sc = c->mos_sc;
sys/dev/usb/if_mos.c
882
u_char *buf = c->mos_buf;
sys/dev/usb/if_mos.c
956
memset(c->mos_buf, 0, sc->mos_bufsz);
sys/dev/usb/if_mos.c
960
c, c->mos_buf, sc->mos_bufsz,
sys/dev/usb/if_mos.c
979
struct mos_chain *c;
sys/dev/usb/if_mos.c
983
c = priv;
sys/dev/usb/if_mos.c
984
sc = c->mos_sc;
sys/dev/usb/if_mtw.c
2632
mtw_set_chan(struct mtw_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_mtw.c
2637
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_mtw.c
2786
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_mtw.c
2789
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/usb/if_mtw.c
2790
u_int chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_mue.c
1053
struct mue_chain *c = (struct mue_chain *)priv;
sys/dev/usb/if_mue.c
1054
struct mue_softc *sc = c->mue_sc;
sys/dev/usb/if_mue.c
1059
u_char *buf = c->mue_buf;
sys/dev/usb/if_mue.c
1130
memset(c->mue_buf, 0, sc->mue_bufsz);
sys/dev/usb/if_mue.c
1134
c, c->mue_buf, sc->mue_bufsz, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_mue.c
1144
struct mue_chain *c = priv;
sys/dev/usb/if_mue.c
1145
struct mue_softc *sc = c->mue_sc;
sys/dev/usb/if_mue.c
1174
m_freem(c->mue_mbuf);
sys/dev/usb/if_mue.c
1175
c->mue_mbuf = NULL;
sys/dev/usb/if_mue.c
1278
struct mue_chain *c;
sys/dev/usb/if_mue.c
1286
c = &sc->mue_cdata.mue_tx_chain[0];
sys/dev/usb/if_mue.c
1287
usbd_get_xfer_status(c->mue_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_mue.c
1288
mue_txeof(c->mue_xfer, c, stat);
sys/dev/usb/if_mue.c
872
struct mue_chain *c;
sys/dev/usb/if_mue.c
879
c = &cd->mue_rx_chain[i];
sys/dev/usb/if_mue.c
880
c->mue_sc = sc;
sys/dev/usb/if_mue.c
881
c->mue_idx = i;
sys/dev/usb/if_mue.c
882
c->mue_mbuf = NULL;
sys/dev/usb/if_mue.c
883
if (c->mue_xfer == NULL) {
sys/dev/usb/if_mue.c
884
c->mue_xfer = usbd_alloc_xfer(sc->mue_udev);
sys/dev/usb/if_mue.c
885
if (c->mue_xfer == NULL)
sys/dev/usb/if_mue.c
887
c->mue_buf = usbd_alloc_buffer(c->mue_xfer,
sys/dev/usb/if_mue.c
889
if (c->mue_buf == NULL) {
sys/dev/usb/if_mue.c
890
usbd_free_xfer(c->mue_xfer);
sys/dev/usb/if_mue.c
903
struct mue_chain *c;
sys/dev/usb/if_mue.c
910
c = &cd->mue_tx_chain[i];
sys/dev/usb/if_mue.c
911
c->mue_sc = sc;
sys/dev/usb/if_mue.c
912
c->mue_idx = i;
sys/dev/usb/if_mue.c
913
c->mue_mbuf = NULL;
sys/dev/usb/if_mue.c
914
if (c->mue_xfer == NULL) {
sys/dev/usb/if_mue.c
915
c->mue_xfer = usbd_alloc_xfer(sc->mue_udev);
sys/dev/usb/if_mue.c
916
if (c->mue_xfer == NULL)
sys/dev/usb/if_mue.c
918
c->mue_buf = usbd_alloc_buffer(c->mue_xfer,
sys/dev/usb/if_mue.c
920
if (c->mue_buf == NULL) {
sys/dev/usb/if_mue.c
921
usbd_free_xfer(c->mue_xfer);
sys/dev/usb/if_mue.c
933
struct mue_chain *c;
sys/dev/usb/if_mue.c
955
c = &sc->mue_cdata.mue_rx_chain[i];
sys/dev/usb/if_mue.c
956
usbd_setup_xfer(c->mue_xfer, sc->mue_ep[MUE_ENDPT_RX],
sys/dev/usb/if_mue.c
957
c, c->mue_buf, sc->mue_bufsz,
sys/dev/usb/if_mue.c
960
usbd_transfer(c->mue_xfer);
sys/dev/usb/if_mue.c
969
struct mue_chain *c;
sys/dev/usb/if_mue.c
974
c = &sc->mue_cdata.mue_tx_chain[idx];
sys/dev/usb/if_mue.c
980
memcpy(c->mue_buf, &hdr, sizeof(hdr));
sys/dev/usb/if_mue.c
983
m_copydata(m, 0, m->m_pkthdr.len, c->mue_buf + length);
sys/dev/usb/if_mue.c
986
c->mue_mbuf = m;
sys/dev/usb/if_mue.c
988
usbd_setup_xfer(c->mue_xfer, sc->mue_ep[MUE_ENDPT_TX],
sys/dev/usb/if_mue.c
989
c, c->mue_buf, length, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_mue.c
993
err = usbd_transfer(c->mue_xfer);
sys/dev/usb/if_mue.c
995
c->mue_mbuf = NULL;
sys/dev/usb/if_otus.c
1722
otus_set_board_values(struct otus_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_otus.c
1727
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/usb/if_otus.c
1783
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/usb/if_otus.c
1813
otus_program_phy(struct otus_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_otus.c
1819
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/usb/if_otus.c
1828
if ((error = otus_set_board_values(sc, c)) != 0)
sys/dev/usb/if_otus.c
1843
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/usb/if_otus.c
1861
otus_set_rf_bank4(struct otus_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_otus.c
1868
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/usb/if_otus.c
1869
chansel = (c->ic_freq - 4800) / 5;
sys/dev/usb/if_otus.c
1876
if (c->ic_freq == 2484) { /* CH 14 */
sys/dev/usb/if_otus.c
1878
chansel = 10 + (c->ic_freq - 2274) / 5;
sys/dev/usb/if_otus.c
1880
chansel = 16 + (c->ic_freq - 2272) / 5;
sys/dev/usb/if_otus.c
1920
otus_set_chan(struct otus_softc *sc, struct ieee80211_channel *c, int assoc)
sys/dev/usb/if_otus.c
1930
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_otus.c
1931
DPRINTF(("setting channel %d (%dMHz)\n", chan, c->ic_freq));
sys/dev/usb/if_otus.c
1933
tmp = IEEE80211_IS_CHAN_2GHZ(c) ? 0x105 : 0x104;
sys/dev/usb/if_otus.c
1949
if (sc->bb_reset || c->ic_flags != sc->sc_curchan->ic_flags) {
sys/dev/usb/if_otus.c
1961
if ((error = otus_program_phy(sc, c)) != 0) {
sys/dev/usb/if_otus.c
1968
if (IEEE80211_IS_CHAN_5GHZ(c))
sys/dev/usb/if_otus.c
1984
if ((error = otus_set_rf_bank4(sc, c)) != 0)
sys/dev/usb/if_otus.c
1993
cmd.freq = htole32((uint32_t)c->ic_freq * 1000);
sys/dev/usb/if_otus.c
1997
coeff = (100 << 24) / c->ic_freq;
sys/dev/usb/if_otus.c
2031
sc->sc_curchan = c;
sys/dev/usb/if_ral.c
1506
ural_set_chan(struct ural_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_ral.c
1512
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_rum.c
1590
rum_select_band(struct rum_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_rum.c
1598
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/usb/if_rum.c
1602
if ((IEEE80211_IS_CHAN_2GHZ(c) && sc->ext_2ghz_lna) ||
sys/dev/usb/if_rum.c
1603
(IEEE80211_IS_CHAN_5GHZ(c) && sc->ext_5ghz_lna)) {
sys/dev/usb/if_rum.c
1612
if ((IEEE80211_IS_CHAN_2GHZ(c) && sc->ext_2ghz_lna) ||
sys/dev/usb/if_rum.c
1613
(IEEE80211_IS_CHAN_5GHZ(c) && sc->ext_5ghz_lna)) {
sys/dev/usb/if_rum.c
1625
if (IEEE80211_IS_CHAN_2GHZ(c))
sys/dev/usb/if_rum.c
1632
sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10;
sys/dev/usb/if_rum.c
1636
rum_set_chan(struct rum_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_rum.c
1644
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_rum.c
1669
if (c->ic_flags != sc->sc_curchan->ic_flags) {
sys/dev/usb/if_rum.c
1670
rum_select_band(sc, c);
sys/dev/usb/if_rum.c
1673
sc->sc_curchan = c;
sys/dev/usb/if_run.c
3624
run_set_chan(struct run_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_run.c
3629
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_run.c
3783
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_run.c
3786
if (IEEE80211_IS_CHAN_5GHZ(c)) {
sys/dev/usb/if_run.c
3787
u_int chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_smsc.c
1164
struct smsc_chain *c = (struct smsc_chain *)priv;
sys/dev/usb/if_smsc.c
1165
struct smsc_softc *sc = c->sc_sc;
sys/dev/usb/if_smsc.c
1167
u_char *buf = c->sc_buf;
sys/dev/usb/if_smsc.c
1247
memset(c->sc_buf, 0, sc->sc_bufsz);
sys/dev/usb/if_smsc.c
1251
c, c->sc_buf, sc->sc_bufsz,
sys/dev/usb/if_smsc.c
1263
struct smsc_chain *c;
sys/dev/usb/if_smsc.c
1267
c = priv;
sys/dev/usb/if_smsc.c
1268
sc = c->sc_sc;
sys/dev/usb/if_smsc.c
1293
m_freem(c->sc_mbuf);
sys/dev/usb/if_smsc.c
1294
c->sc_mbuf = NULL;
sys/dev/usb/if_smsc.c
1306
struct smsc_chain *c;
sys/dev/usb/if_smsc.c
1311
c = &cd->tx_chain[i];
sys/dev/usb/if_smsc.c
1312
c->sc_sc = sc;
sys/dev/usb/if_smsc.c
1313
c->sc_idx = i;
sys/dev/usb/if_smsc.c
1314
c->sc_mbuf = NULL;
sys/dev/usb/if_smsc.c
1315
if (c->sc_xfer == NULL) {
sys/dev/usb/if_smsc.c
1316
c->sc_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_smsc.c
1317
if (c->sc_xfer == NULL)
sys/dev/usb/if_smsc.c
1319
c->sc_buf = usbd_alloc_buffer(c->sc_xfer,
sys/dev/usb/if_smsc.c
1321
if (c->sc_buf == NULL) {
sys/dev/usb/if_smsc.c
1322
usbd_free_xfer(c->sc_xfer);
sys/dev/usb/if_smsc.c
1335
struct smsc_chain *c;
sys/dev/usb/if_smsc.c
1340
c = &cd->rx_chain[i];
sys/dev/usb/if_smsc.c
1341
c->sc_sc = sc;
sys/dev/usb/if_smsc.c
1342
c->sc_idx = i;
sys/dev/usb/if_smsc.c
1343
c->sc_mbuf = NULL;
sys/dev/usb/if_smsc.c
1344
if (c->sc_xfer == NULL) {
sys/dev/usb/if_smsc.c
1345
c->sc_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_smsc.c
1346
if (c->sc_xfer == NULL)
sys/dev/usb/if_smsc.c
1348
c->sc_buf = usbd_alloc_buffer(c->sc_xfer,
sys/dev/usb/if_smsc.c
1350
if (c->sc_buf == NULL) {
sys/dev/usb/if_smsc.c
1351
usbd_free_xfer(c->sc_xfer);
sys/dev/usb/if_smsc.c
1363
struct smsc_chain *c;
sys/dev/usb/if_smsc.c
1368
c = &sc->sc_cdata.tx_chain[idx];
sys/dev/usb/if_smsc.c
1377
memcpy(c->sc_buf, &txhdr, sizeof(txhdr));
sys/dev/usb/if_smsc.c
1381
memcpy(c->sc_buf + 4, &txhdr, sizeof(txhdr));
sys/dev/usb/if_smsc.c
1386
m_copydata(m, 0, m->m_pkthdr.len, c->sc_buf + frm_len);
sys/dev/usb/if_smsc.c
1389
c->sc_mbuf = m;
sys/dev/usb/if_smsc.c
1391
usbd_setup_xfer(c->sc_xfer, sc->sc_ep[SMSC_ENDPT_TX],
sys/dev/usb/if_smsc.c
1392
c, c->sc_buf, frm_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_smsc.c
1395
err = usbd_transfer(c->sc_xfer);
sys/dev/usb/if_smsc.c
1397
c->sc_mbuf = NULL;
sys/dev/usb/if_smsc.c
568
struct smsc_chain *c;
sys/dev/usb/if_smsc.c
618
c = &sc->sc_cdata.rx_chain[i];
sys/dev/usb/if_smsc.c
619
usbd_setup_xfer(c->sc_xfer, sc->sc_ep[SMSC_ENDPT_RX],
sys/dev/usb/if_smsc.c
620
c, c->sc_buf, sc->sc_bufsz,
sys/dev/usb/if_smsc.c
623
usbd_transfer(c->sc_xfer);
sys/dev/usb/if_uaq.c
1080
struct uaq_chain *c = (struct uaq_chain *)priv;
sys/dev/usb/if_uaq.c
1081
struct uaq_softc *sc = c->uc_sc;
sys/dev/usb/if_uaq.c
1186
memset(c->uc_buf, 0, UAQ_RX_BUFSZ);
sys/dev/usb/if_uaq.c
1188
usbd_setup_xfer(xfer, sc->sc_ep[UAQ_ENDPT_RX], c, c->uc_buf,
sys/dev/usb/if_uaq.c
1199
struct uaq_chain *c;
sys/dev/usb/if_uaq.c
1218
c = &sc->sc_cdata.uaq_tx_chain[i];
sys/dev/usb/if_uaq.c
1219
if (c->uc_cnt > 0) {
sys/dev/usb/if_uaq.c
1220
usbd_get_xfer_status(c->uc_xfer, NULL, NULL, NULL,
sys/dev/usb/if_uaq.c
1222
uaq_txeof(c->uc_xfer, c, err);
sys/dev/usb/if_uaq.c
1235
struct uaq_chain *c;
sys/dev/usb/if_uaq.c
1239
c = priv;
sys/dev/usb/if_uaq.c
1240
sc = c->uc_sc;
sys/dev/usb/if_uaq.c
1248
__func__, c->uc_idx, usbd_errstr(status)));
sys/dev/usb/if_uaq.c
1254
c->uc_cnt = 0;
sys/dev/usb/if_uaq.c
1255
c->uc_buflen = 0;
sys/dev/usb/if_uaq.c
1257
SLIST_INSERT_HEAD(&sc->sc_cdata.uaq_tx_free, c, uc_list);
sys/dev/usb/if_uaq.c
1287
struct uaq_chain *c;
sys/dev/usb/if_uaq.c
1299
c = SLIST_FIRST(&cd->uaq_tx_free);
sys/dev/usb/if_uaq.c
1300
while (c != NULL) {
sys/dev/usb/if_uaq.c
1308
if (mlen + sizeof(uint64_t) >= c->uc_bufmax) {
sys/dev/usb/if_uaq.c
1316
mlen = uaq_encap_txpkt(sc, m, c->uc_buf + c->uc_buflen,
sys/dev/usb/if_uaq.c
1317
c->uc_bufmax - c->uc_buflen);
sys/dev/usb/if_uaq.c
1324
c->uc_cnt += 1;
sys/dev/usb/if_uaq.c
1325
c->uc_buflen += mlen;
sys/dev/usb/if_uaq.c
1335
if (c != NULL) {
sys/dev/usb/if_uaq.c
1337
if (c->uc_buflen > 0 && c->uc_cnt > 0) {
sys/dev/usb/if_uaq.c
1339
if (uaq_encap_xfer(sc, c)) {
sys/dev/usb/if_uaq.c
1340
SLIST_INSERT_HEAD(&cd->uaq_tx_free, c,
sys/dev/usb/if_uaq.c
1343
c = SLIST_FIRST(&cd->uaq_tx_free);
sys/dev/usb/if_uaq.c
1346
if (c == NULL)
sys/dev/usb/if_uaq.c
1383
uaq_encap_xfer(struct uaq_softc *sc, struct uaq_chain *c)
sys/dev/usb/if_uaq.c
1387
usbd_setup_xfer(c->uc_xfer, sc->sc_ep[UAQ_ENDPT_TX], c, c->uc_buf,
sys/dev/usb/if_uaq.c
1388
c->uc_buflen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, 10000,
sys/dev/usb/if_uaq.c
1391
err = usbd_transfer(c->uc_xfer);
sys/dev/usb/if_uaq.c
1393
c->uc_cnt = 0;
sys/dev/usb/if_uaq.c
1394
c->uc_buflen = 0;
sys/dev/usb/if_uaq.c
716
struct uaq_chain *c;
sys/dev/usb/if_uaq.c
765
c = &sc->sc_cdata.uaq_rx_chain[i];
sys/dev/usb/if_uaq.c
766
usbd_setup_xfer(c->uc_xfer, sc->sc_ep[UAQ_ENDPT_RX],
sys/dev/usb/if_uaq.c
767
c, c->uc_buf, c->uc_bufmax,
sys/dev/usb/if_uaq.c
770
usbd_transfer(c->uc_xfer);
sys/dev/usb/if_uaq.c
846
struct uaq_chain *c;
sys/dev/usb/if_uaq.c
850
c = &ch[i];
sys/dev/usb/if_uaq.c
851
c->uc_sc = sc;
sys/dev/usb/if_uaq.c
852
c->uc_idx = i;
sys/dev/usb/if_uaq.c
853
c->uc_buflen = 0;
sys/dev/usb/if_uaq.c
854
c->uc_bufmax = bufsize;
sys/dev/usb/if_uaq.c
855
c->uc_cnt = 0;
sys/dev/usb/if_uaq.c
856
if (c->uc_xfer == NULL) {
sys/dev/usb/if_uaq.c
857
c->uc_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_uaq.c
858
if (c->uc_xfer == NULL)
sys/dev/usb/if_uaq.c
861
c->uc_buf = usbd_alloc_buffer(c->uc_xfer, c->uc_bufmax);
sys/dev/usb/if_uaq.c
862
if (c->uc_buf == NULL) {
sys/dev/usb/if_uaq.c
863
usbd_free_xfer(c->uc_xfer);
sys/dev/usb/if_uaq.c
864
c->uc_xfer = NULL;
sys/dev/usb/if_uath.c
1678
uath_set_chan(struct uath_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_uath.c
1684
chan.freq = htobe32(c->ic_freq);
sys/dev/usb/if_uath.c
1690
ieee80211_chan2ieee(&sc->sc_ic, c)));
sys/dev/usb/if_uath.c
1780
uath_switch_channel(struct uath_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_uath.c
1786
if ((error = uath_set_chan(sc, c)) != 0) {
sys/dev/usb/if_udav.c
1026
m_freem(c->udav_mbuf);
sys/dev/usb/if_udav.c
1027
c->udav_mbuf = NULL;
sys/dev/usb/if_udav.c
1038
struct udav_chain *c = priv;
sys/dev/usb/if_udav.c
1039
struct udav_softc *sc = c->udav_sc;
sys/dev/usb/if_udav.c
1078
h = (struct udav_rx_hdr *)c->udav_buf;
sys/dev/usb/if_udav.c
1097
m = c->udav_mbuf;
sys/dev/usb/if_udav.c
1098
memcpy(mtod(m, char *), c->udav_buf + UDAV_RX_HDRLEN, total_len);
sys/dev/usb/if_udav.c
1103
if (udav_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_udav.c
1114
usbd_setup_xfer(xfer, sc->sc_pipe_rx, c, c->udav_buf, UDAV_BUFSZ,
sys/dev/usb/if_udav.c
1181
struct udav_chain *c;
sys/dev/usb/if_udav.c
1191
c = &sc->sc_cdata.udav_tx_chain[0];
sys/dev/usb/if_udav.c
1192
usbd_get_xfer_status(c->udav_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_udav.c
1193
udav_txeof(c->udav_xfer, c, stat);
sys/dev/usb/if_udav.c
736
struct udav_chain *c;
sys/dev/usb/if_udav.c
784
c = &sc->sc_cdata.udav_rx_chain[i];
sys/dev/usb/if_udav.c
785
usbd_setup_xfer(c->udav_xfer, sc->sc_pipe_rx,
sys/dev/usb/if_udav.c
786
c, c->udav_buf, UDAV_BUFSZ,
sys/dev/usb/if_udav.c
789
(void)usbd_transfer(c->udav_xfer);
sys/dev/usb/if_udav.c
802
udav_newbuf(struct udav_softc *sc, struct udav_chain *c, struct mbuf *m)
sys/dev/usb/if_udav.c
830
c->udav_mbuf = m_new;
sys/dev/usb/if_udav.c
840
struct udav_chain *c;
sys/dev/usb/if_udav.c
847
c = &cd->udav_rx_chain[i];
sys/dev/usb/if_udav.c
848
c->udav_sc = sc;
sys/dev/usb/if_udav.c
849
c->udav_idx = i;
sys/dev/usb/if_udav.c
850
if (udav_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_udav.c
852
if (c->udav_xfer == NULL) {
sys/dev/usb/if_udav.c
853
c->udav_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_udav.c
854
if (c->udav_xfer == NULL)
sys/dev/usb/if_udav.c
856
c->udav_buf = usbd_alloc_buffer(c->udav_xfer, UDAV_BUFSZ);
sys/dev/usb/if_udav.c
857
if (c->udav_buf == NULL) {
sys/dev/usb/if_udav.c
858
usbd_free_xfer(c->udav_xfer);
sys/dev/usb/if_udav.c
871
struct udav_chain *c;
sys/dev/usb/if_udav.c
878
c = &cd->udav_tx_chain[i];
sys/dev/usb/if_udav.c
879
c->udav_sc = sc;
sys/dev/usb/if_udav.c
880
c->udav_idx = i;
sys/dev/usb/if_udav.c
881
c->udav_mbuf = NULL;
sys/dev/usb/if_udav.c
882
if (c->udav_xfer == NULL) {
sys/dev/usb/if_udav.c
883
c->udav_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_udav.c
884
if (c->udav_xfer == NULL)
sys/dev/usb/if_udav.c
886
c->udav_buf = usbd_alloc_buffer(c->udav_xfer, UDAV_BUFSZ);
sys/dev/usb/if_udav.c
887
if (c->udav_buf == NULL) {
sys/dev/usb/if_udav.c
888
usbd_free_xfer(c->udav_xfer);
sys/dev/usb/if_udav.c
942
struct udav_chain *c;
sys/dev/usb/if_udav.c
947
c = &sc->sc_cdata.udav_tx_chain[idx];
sys/dev/usb/if_udav.c
951
m_copydata(m, 0, m->m_pkthdr.len, c->udav_buf + 2);
sys/dev/usb/if_udav.c
952
c->udav_mbuf = m;
sys/dev/usb/if_udav.c
955
memset(c->udav_buf + 2 + total_len, 0,
sys/dev/usb/if_udav.c
961
c->udav_buf[0] = (u_int8_t)total_len;
sys/dev/usb/if_udav.c
962
c->udav_buf[1] = (u_int8_t)(total_len >> 8);
sys/dev/usb/if_udav.c
965
usbd_setup_xfer(c->udav_xfer, sc->sc_pipe_tx, c, c->udav_buf, total_len,
sys/dev/usb/if_udav.c
971
err = usbd_transfer(c->udav_xfer);
sys/dev/usb/if_udav.c
993
struct udav_chain *c = priv;
sys/dev/usb/if_udav.c
994
struct udav_softc *sc = c->udav_sc;
sys/dev/usb/if_ugl.c
301
ugl_newbuf(struct ugl_softc *sc, struct ugl_chain *c, struct mbuf *m)
sys/dev/usb/if_ugl.c
329
c->ugl_mbuf = m_new;
sys/dev/usb/if_ugl.c
338
struct ugl_chain *c;
sys/dev/usb/if_ugl.c
345
c = &cd->ugl_rx_chain[i];
sys/dev/usb/if_ugl.c
346
c->ugl_sc = sc;
sys/dev/usb/if_ugl.c
347
c->ugl_idx = i;
sys/dev/usb/if_ugl.c
348
if (ugl_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_ugl.c
350
if (c->ugl_xfer == NULL) {
sys/dev/usb/if_ugl.c
351
c->ugl_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_ugl.c
352
if (c->ugl_xfer == NULL)
sys/dev/usb/if_ugl.c
354
c->ugl_buf = usbd_alloc_buffer(c->ugl_xfer, UGL_BUFSZ);
sys/dev/usb/if_ugl.c
355
if (c->ugl_buf == NULL) {
sys/dev/usb/if_ugl.c
356
usbd_free_xfer(c->ugl_xfer);
sys/dev/usb/if_ugl.c
369
struct ugl_chain *c;
sys/dev/usb/if_ugl.c
376
c = &cd->ugl_tx_chain[i];
sys/dev/usb/if_ugl.c
377
c->ugl_sc = sc;
sys/dev/usb/if_ugl.c
378
c->ugl_idx = i;
sys/dev/usb/if_ugl.c
379
c->ugl_mbuf = NULL;
sys/dev/usb/if_ugl.c
380
if (c->ugl_xfer == NULL) {
sys/dev/usb/if_ugl.c
381
c->ugl_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_ugl.c
382
if (c->ugl_xfer == NULL)
sys/dev/usb/if_ugl.c
384
c->ugl_buf = usbd_alloc_buffer(c->ugl_xfer, UGL_BUFSZ);
sys/dev/usb/if_ugl.c
385
if (c->ugl_buf == NULL) {
sys/dev/usb/if_ugl.c
386
usbd_free_xfer(c->ugl_xfer);
sys/dev/usb/if_ugl.c
402
struct ugl_chain *c = priv;
sys/dev/usb/if_ugl.c
403
struct ugl_softc *sc = c->ugl_sc;
sys/dev/usb/if_ugl.c
444
packet_count = UGETDW(c->ugl_buf->pkt_count);
sys/dev/usb/if_ugl.c
453
packet_len = UGETDW(c->ugl_buf->pkt_length);
sys/dev/usb/if_ugl.c
462
m = c->ugl_mbuf;
sys/dev/usb/if_ugl.c
463
memcpy(mtod(c->ugl_mbuf, char *), c->ugl_buf->pkt_data, packet_len);
sys/dev/usb/if_ugl.c
468
if (ugl_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_ugl.c
479
usbd_setup_xfer(c->ugl_xfer, sc->sc_ep[UGL_ENDPT_RX],
sys/dev/usb/if_ugl.c
480
c, c->ugl_buf, UGL_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_ugl.c
482
usbd_transfer(c->ugl_xfer);
sys/dev/usb/if_ugl.c
495
struct ugl_chain *c = priv;
sys/dev/usb/if_ugl.c
496
struct ugl_softc *sc = c->ugl_sc;
sys/dev/usb/if_ugl.c
525
m_freem(c->ugl_mbuf);
sys/dev/usb/if_ugl.c
526
c->ugl_mbuf = NULL;
sys/dev/usb/if_ugl.c
538
struct ugl_chain *c;
sys/dev/usb/if_ugl.c
541
c = &sc->sc_cdata.ugl_tx_chain[idx];
sys/dev/usb/if_ugl.c
547
USETDW(c->ugl_buf->pkt_count, UGL_TX_FRAMES);
sys/dev/usb/if_ugl.c
548
USETDW(c->ugl_buf->pkt_length, m->m_pkthdr.len);
sys/dev/usb/if_ugl.c
549
m_copydata(m, 0, m->m_pkthdr.len, c->ugl_buf->pkt_data);
sys/dev/usb/if_ugl.c
550
c->ugl_mbuf = m;
sys/dev/usb/if_ugl.c
557
usbd_setup_xfer(c->ugl_xfer, sc->sc_ep[UGL_ENDPT_TX],
sys/dev/usb/if_ugl.c
558
c, c->ugl_buf, total_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_ugl.c
562
err = usbd_transfer(c->ugl_xfer);
sys/dev/usb/if_ugl.c
566
c->ugl_mbuf = NULL;
sys/dev/usb/if_ugl.c
661
struct ugl_chain *c;
sys/dev/usb/if_ugl.c
692
c = &sc->sc_cdata.ugl_rx_chain[i];
sys/dev/usb/if_ugl.c
693
usbd_setup_xfer(c->ugl_xfer, sc->sc_ep[UGL_ENDPT_RX],
sys/dev/usb/if_ugl.c
694
c, c->ugl_buf, UGL_BUFSZ,
sys/dev/usb/if_ugl.c
697
usbd_transfer(c->ugl_xfer);
sys/dev/usb/if_umb.c
116
#define umb_regstate(c) umb_val2descr(umb_regstates, (c))
sys/dev/usb/if_umb.c
117
#define umb_dataclass(c) umb_val2descr(umb_dataclasses, (c))
sys/dev/usb/if_umb.c
121
#define umb_cid2str(c) umb_val2descr(umb_cids, (c))
sys/dev/usb/if_umb.c
2653
struct mbim_h2f_cmd *c = data;
sys/dev/usb/if_umb.c
2654
if (letoh32(c->op) == MBIM_CMDOP_SET)
sys/dev/usb/if_umb.c
2658
str = umb_cid2str(letoh32(c->cid));
sys/dev/usb/if_umb.c
2837
struct mbim_cid_connect *c;
sys/dev/usb/if_umb.c
2841
c = malloc(sizeof (*c), M_USBDEV, M_WAIT|M_ZERO);
sys/dev/usb/if_umb.c
2842
c->sessionid = htole32(umb_session_id);
sys/dev/usb/if_umb.c
2843
c->command = htole32(command);
sys/dev/usb/if_umb.c
2845
if (!umb_addstr(c, sizeof (*c), &off, sc->sc_info.apn,
sys/dev/usb/if_umb.c
2846
sc->sc_info.apnlen, &c->access_offs, &c->access_size))
sys/dev/usb/if_umb.c
2849
c->user_offs = htole32(0);
sys/dev/usb/if_umb.c
2850
c->user_size = htole32(0);
sys/dev/usb/if_umb.c
2851
c->passwd_offs = htole32(0);
sys/dev/usb/if_umb.c
2852
c->passwd_size = htole32(0);
sys/dev/usb/if_umb.c
2853
c->authprot = htole32(MBIM_AUTHPROT_NONE);
sys/dev/usb/if_umb.c
2854
c->compression = htole32(MBIM_COMPRESSION_NONE);
sys/dev/usb/if_umb.c
2855
c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4);
sys/dev/usb/if_umb.c
2860
c->iptype = htole32(MBIM_CONTEXT_IPTYPE_IPV4V6);
sys/dev/usb/if_umb.c
2862
memcpy(c->context, umb_uuid_context_internet, sizeof (c->context));
sys/dev/usb/if_umb.c
2863
umb_cmd(sc, MBIM_CID_CONNECT, MBIM_CMDOP_SET, c, off);
sys/dev/usb/if_umb.c
2865
free(c, M_USBDEV, sizeof (*c));
sys/dev/usb/if_umb.c
3230
uint8_t *c = buf;
sys/dev/usb/if_umb.c
3240
addlog(" %02x", *c);
sys/dev/usb/if_umb.c
3241
c++;
sys/dev/usb/if_upl.c
308
upl_newbuf(struct upl_softc *sc, struct upl_chain *c, struct mbuf *m)
sys/dev/usb/if_upl.c
336
c->upl_mbuf = m_new;
sys/dev/usb/if_upl.c
345
struct upl_chain *c;
sys/dev/usb/if_upl.c
352
c = &cd->upl_rx_chain[i];
sys/dev/usb/if_upl.c
353
c->upl_sc = sc;
sys/dev/usb/if_upl.c
354
c->upl_idx = i;
sys/dev/usb/if_upl.c
355
if (upl_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_upl.c
357
if (c->upl_xfer == NULL) {
sys/dev/usb/if_upl.c
358
c->upl_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_upl.c
359
if (c->upl_xfer == NULL)
sys/dev/usb/if_upl.c
361
c->upl_buf = usbd_alloc_buffer(c->upl_xfer, UPL_BUFSZ);
sys/dev/usb/if_upl.c
362
if (c->upl_buf == NULL) {
sys/dev/usb/if_upl.c
363
usbd_free_xfer(c->upl_xfer);
sys/dev/usb/if_upl.c
376
struct upl_chain *c;
sys/dev/usb/if_upl.c
383
c = &cd->upl_tx_chain[i];
sys/dev/usb/if_upl.c
384
c->upl_sc = sc;
sys/dev/usb/if_upl.c
385
c->upl_idx = i;
sys/dev/usb/if_upl.c
386
c->upl_mbuf = NULL;
sys/dev/usb/if_upl.c
387
if (c->upl_xfer == NULL) {
sys/dev/usb/if_upl.c
388
c->upl_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_upl.c
389
if (c->upl_xfer == NULL)
sys/dev/usb/if_upl.c
391
c->upl_buf = usbd_alloc_buffer(c->upl_xfer, UPL_BUFSZ);
sys/dev/usb/if_upl.c
392
if (c->upl_buf == NULL) {
sys/dev/usb/if_upl.c
393
usbd_free_xfer(c->upl_xfer);
sys/dev/usb/if_upl.c
409
struct upl_chain *c = priv;
sys/dev/usb/if_upl.c
410
struct upl_softc *sc = c->upl_sc;
sys/dev/usb/if_upl.c
443
m = c->upl_mbuf;
sys/dev/usb/if_upl.c
444
memcpy(mtod(c->upl_mbuf, char *), c->upl_buf, total_len);
sys/dev/usb/if_upl.c
449
if (upl_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_upl.c
460
usbd_setup_xfer(c->upl_xfer, sc->sc_ep[UPL_ENDPT_RX],
sys/dev/usb/if_upl.c
461
c, c->upl_buf, UPL_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_upl.c
463
usbd_transfer(c->upl_xfer);
sys/dev/usb/if_upl.c
477
struct upl_chain *c = priv;
sys/dev/usb/if_upl.c
478
struct upl_softc *sc = c->upl_sc;
sys/dev/usb/if_upl.c
507
m_freem(c->upl_mbuf);
sys/dev/usb/if_upl.c
508
c->upl_mbuf = NULL;
sys/dev/usb/if_upl.c
520
struct upl_chain *c;
sys/dev/usb/if_upl.c
523
c = &sc->sc_cdata.upl_tx_chain[idx];
sys/dev/usb/if_upl.c
529
m_copydata(m, 0, m->m_pkthdr.len, c->upl_buf);
sys/dev/usb/if_upl.c
530
c->upl_mbuf = m;
sys/dev/usb/if_upl.c
537
usbd_setup_xfer(c->upl_xfer, sc->sc_ep[UPL_ENDPT_TX],
sys/dev/usb/if_upl.c
538
c, c->upl_buf, total_len, USBD_NO_COPY, USBD_DEFAULT_TIMEOUT,
sys/dev/usb/if_upl.c
542
err = usbd_transfer(c->upl_xfer);
sys/dev/usb/if_upl.c
546
c->upl_mbuf = NULL;
sys/dev/usb/if_upl.c
641
struct upl_chain *c;
sys/dev/usb/if_upl.c
674
c = &sc->sc_cdata.upl_rx_chain[i];
sys/dev/usb/if_upl.c
675
usbd_setup_xfer(c->upl_xfer, sc->sc_ep[UPL_ENDPT_RX],
sys/dev/usb/if_upl.c
676
c, c->upl_buf, UPL_BUFSZ,
sys/dev/usb/if_upl.c
679
usbd_transfer(c->upl_xfer);
sys/dev/usb/if_ure.c
1008
struct ure_chain *c;
sys/dev/usb/if_ure.c
1075
c = &sc->ure_cdata.ure_rx_chain[i];
sys/dev/usb/if_ure.c
1076
usbd_setup_xfer(c->uc_xfer, sc->ure_ep[URE_ENDPT_RX],
sys/dev/usb/if_ure.c
1077
c, c->uc_buf, c->uc_bufmax,
sys/dev/usb/if_ure.c
1080
usbd_transfer(c->uc_xfer);
sys/dev/usb/if_ure.c
1100
struct ure_chain *c;
sys/dev/usb/if_ure.c
1113
c = SLIST_FIRST(&cd->ure_tx_free);
sys/dev/usb/if_ure.c
1114
while (c != NULL) {
sys/dev/usb/if_ure.c
1124
if (mlen + descsize >= c->uc_bufmax) {
sys/dev/usb/if_ure.c
1135
new_buflen = roundup(c->uc_buflen,
sys/dev/usb/if_ure.c
1138
if (new_buflen + descsize + mlen >= c->uc_bufmax) {
sys/dev/usb/if_ure.c
1141
if (ure_encap_xfer(ifp, sc, c)) {
sys/dev/usb/if_ure.c
1142
SLIST_INSERT_HEAD(&cd->ure_tx_free, c,
sys/dev/usb/if_ure.c
1146
c = SLIST_FIRST(&cd->ure_tx_free);
sys/dev/usb/if_ure.c
1151
mlen = ure_encap_txpkt(sc, m, c->uc_buf + new_buflen,
sys/dev/usb/if_ure.c
1152
c->uc_bufmax - new_buflen);
sys/dev/usb/if_ure.c
1159
c->uc_cnt += 1;
sys/dev/usb/if_ure.c
1160
c->uc_buflen = new_buflen + mlen;
sys/dev/usb/if_ure.c
1170
if (c != NULL) {
sys/dev/usb/if_ure.c
1172
if (c->uc_buflen > 0 && c->uc_cnt > 0) {
sys/dev/usb/if_ure.c
1174
if (ure_encap_xfer(ifp, sc, c)) {
sys/dev/usb/if_ure.c
1175
SLIST_INSERT_HEAD(&cd->ure_tx_free, c,
sys/dev/usb/if_ure.c
1178
c = SLIST_FIRST(&cd->ure_tx_free);
sys/dev/usb/if_ure.c
1183
if (c == NULL)
sys/dev/usb/if_ure.c
1246
struct ure_chain *c;
sys/dev/usb/if_ure.c
1250
c = &ch[i];
sys/dev/usb/if_ure.c
1251
c->uc_sc = sc;
sys/dev/usb/if_ure.c
1252
c->uc_idx = i;
sys/dev/usb/if_ure.c
1253
c->uc_buflen = 0;
sys/dev/usb/if_ure.c
1254
c->uc_bufmax = bufsize;
sys/dev/usb/if_ure.c
1255
c->uc_cnt = 0;
sys/dev/usb/if_ure.c
1256
if (c->uc_xfer == NULL) {
sys/dev/usb/if_ure.c
1257
c->uc_xfer = usbd_alloc_xfer(sc->ure_udev);
sys/dev/usb/if_ure.c
1258
if (c->uc_xfer == NULL)
sys/dev/usb/if_ure.c
1260
c->uc_buf = usbd_alloc_buffer(c->uc_xfer, c->uc_bufmax);
sys/dev/usb/if_ure.c
1261
if (c->uc_buf == NULL) {
sys/dev/usb/if_ure.c
1262
usbd_free_xfer(c->uc_xfer);
sys/dev/usb/if_ure.c
1263
c->uc_xfer = NULL;
sys/dev/usb/if_ure.c
2428
struct ure_chain *c = (struct ure_chain *)priv;
sys/dev/usb/if_ure.c
2429
struct ure_softc *sc = c->uc_sc;
sys/dev/usb/if_ure.c
2454
ure_decap(sc, c, total_len);
sys/dev/usb/if_ure.c
2457
usbd_setup_xfer(xfer, sc->ure_ep[URE_ENDPT_RX], c, c->uc_buf,
sys/dev/usb/if_ure.c
2467
struct ure_chain *c;
sys/dev/usb/if_ure.c
2471
c = priv;
sys/dev/usb/if_ure.c
2472
sc = c->uc_sc;
sys/dev/usb/if_ure.c
2480
__func__, c->uc_idx, usbd_errstr(status)));
sys/dev/usb/if_ure.c
2484
c->uc_cnt = 0;
sys/dev/usb/if_ure.c
2485
c->uc_buflen = 0;
sys/dev/usb/if_ure.c
2487
SLIST_INSERT_HEAD(&sc->ure_cdata.ure_tx_free, c, uc_list);
sys/dev/usb/if_ure.c
2513
ure_decap(struct ure_softc *sc, struct ure_chain *c, uint32_t len)
sys/dev/usb/if_ure.c
2516
u_char *buf = c->uc_buf;
sys/dev/usb/if_ure.c
2577
memset(c->uc_buf, 0, sc->ure_rxbufsz);
sys/dev/usb/if_ure.c
2626
ure_encap_xfer(struct ifnet *ifp, struct ure_softc *sc, struct ure_chain *c)
sys/dev/usb/if_ure.c
2630
usbd_setup_xfer(c->uc_xfer, sc->ure_ep[URE_ENDPT_TX], c, c->uc_buf,
sys/dev/usb/if_ure.c
2631
c->uc_buflen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, 10000,
sys/dev/usb/if_ure.c
2634
err = usbd_transfer(c->uc_xfer);
sys/dev/usb/if_ure.c
2636
c->uc_cnt = 0;
sys/dev/usb/if_ure.c
2637
c->uc_buflen = 0;
sys/dev/usb/if_ure.c
972
struct ure_chain *c;
sys/dev/usb/if_ure.c
991
c = &sc->ure_cdata.ure_tx_chain[i];
sys/dev/usb/if_ure.c
992
if (c->uc_cnt > 0) {
sys/dev/usb/if_ure.c
993
usbd_get_xfer_status(c->uc_xfer, NULL, NULL, NULL,
sys/dev/usb/if_ure.c
995
ure_txeof(c->uc_xfer, c, err);
sys/dev/usb/if_url.c
1041
struct url_chain *c;
sys/dev/usb/if_url.c
1051
c = &sc->sc_cdata.url_tx_chain[0];
sys/dev/usb/if_url.c
1052
usbd_get_xfer_status(c->url_xfer, NULL, NULL, NULL, &stat);
sys/dev/usb/if_url.c
1053
url_txeof(c->url_xfer, c, stat);
sys/dev/usb/if_url.c
602
struct url_chain *c;
sys/dev/usb/if_url.c
650
c = &sc->sc_cdata.url_rx_chain[i];
sys/dev/usb/if_url.c
651
usbd_setup_xfer(c->url_xfer, sc->sc_pipe_rx,
sys/dev/usb/if_url.c
652
c, c->url_buf, URL_BUFSZ,
sys/dev/usb/if_url.c
655
(void)usbd_transfer(c->url_xfer);
sys/dev/usb/if_url.c
668
url_newbuf(struct url_softc *sc, struct url_chain *c, struct mbuf *m)
sys/dev/usb/if_url.c
696
c->url_mbuf = m_new;
sys/dev/usb/if_url.c
706
struct url_chain *c;
sys/dev/usb/if_url.c
713
c = &cd->url_rx_chain[i];
sys/dev/usb/if_url.c
714
c->url_sc = sc;
sys/dev/usb/if_url.c
715
c->url_idx = i;
sys/dev/usb/if_url.c
716
if (url_newbuf(sc, c, NULL) == ENOBUFS)
sys/dev/usb/if_url.c
718
if (c->url_xfer == NULL) {
sys/dev/usb/if_url.c
719
c->url_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_url.c
720
if (c->url_xfer == NULL)
sys/dev/usb/if_url.c
722
c->url_buf = usbd_alloc_buffer(c->url_xfer, URL_BUFSZ);
sys/dev/usb/if_url.c
723
if (c->url_buf == NULL) {
sys/dev/usb/if_url.c
724
usbd_free_xfer(c->url_xfer);
sys/dev/usb/if_url.c
737
struct url_chain *c;
sys/dev/usb/if_url.c
744
c = &cd->url_tx_chain[i];
sys/dev/usb/if_url.c
745
c->url_sc = sc;
sys/dev/usb/if_url.c
746
c->url_idx = i;
sys/dev/usb/if_url.c
747
c->url_mbuf = NULL;
sys/dev/usb/if_url.c
748
if (c->url_xfer == NULL) {
sys/dev/usb/if_url.c
749
c->url_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_url.c
750
if (c->url_xfer == NULL)
sys/dev/usb/if_url.c
752
c->url_buf = usbd_alloc_buffer(c->url_xfer, URL_BUFSZ);
sys/dev/usb/if_url.c
753
if (c->url_buf == NULL) {
sys/dev/usb/if_url.c
754
usbd_free_xfer(c->url_xfer);
sys/dev/usb/if_url.c
808
struct url_chain *c;
sys/dev/usb/if_url.c
813
c = &sc->sc_cdata.url_tx_chain[idx];
sys/dev/usb/if_url.c
816
m_copydata(m, 0, m->m_pkthdr.len, c->url_buf);
sys/dev/usb/if_url.c
817
c->url_mbuf = m;
sys/dev/usb/if_url.c
821
bzero(c->url_buf + total_len, URL_MIN_FRAME_LEN - total_len);
sys/dev/usb/if_url.c
824
usbd_setup_xfer(c->url_xfer, sc->sc_pipe_tx, c, c->url_buf, total_len,
sys/dev/usb/if_url.c
830
err = usbd_transfer(c->url_xfer);
sys/dev/usb/if_url.c
852
struct url_chain *c = priv;
sys/dev/usb/if_url.c
853
struct url_softc *sc = c->url_sc;
sys/dev/usb/if_url.c
885
m_freem(c->url_mbuf);
sys/dev/usb/if_url.c
886
c->url_mbuf = NULL;
sys/dev/usb/if_url.c
897
struct url_chain *c = priv;
sys/dev/usb/if_url.c
898
struct url_softc *sc = c->url_sc;
sys/dev/usb/if_url.c
932
memcpy(mtod(c->url_mbuf, char *), c->url_buf, total_len);
sys/dev/usb/if_url.c
939
memcpy(&rxhdr, c->url_buf + total_len - ETHER_CRC_LEN, sizeof(rxhdr));
sys/dev/usb/if_url.c
956
m = c->url_mbuf;
sys/dev/usb/if_url.c
960
if (url_newbuf(sc, c, NULL) == ENOBUFS) {
sys/dev/usb/if_url.c
974
usbd_setup_xfer(xfer, sc->sc_pipe_rx, c, c->url_buf, URL_BUFSZ,
sys/dev/usb/if_urndis.c
1108
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
1110
c = &sc->sc_data.sc_rx_chain[i];
sys/dev/usb/if_urndis.c
1111
usbd_setup_xfer(c->sc_xfer, sc->sc_bulkin_pipe, c,
sys/dev/usb/if_urndis.c
1112
c->sc_buf, RNDIS_BUFSZ,
sys/dev/usb/if_urndis.c
1115
usbd_transfer(c->sc_xfer);
sys/dev/usb/if_urndis.c
1220
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
1225
c = priv;
sys/dev/usb/if_urndis.c
1226
sc = c->sc_softc;
sys/dev/usb/if_urndis.c
1248
urndis_decap(sc, c, total_len);
sys/dev/usb/if_urndis.c
1252
usbd_setup_xfer(c->sc_xfer, sc->sc_bulkin_pipe, c, c->sc_buf,
sys/dev/usb/if_urndis.c
1255
usbd_transfer(c->sc_xfer);
sys/dev/usb/if_urndis.c
1263
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
1269
c = priv;
sys/dev/usb/if_urndis.c
1270
sc = c->sc_softc;
sys/dev/usb/if_urndis.c
1297
usbd_get_xfer_status(c->sc_xfer, NULL, NULL, NULL, &err);
sys/dev/usb/if_urndis.c
1299
if (c->sc_mbuf != NULL) {
sys/dev/usb/if_urndis.c
1300
m_freem(c->sc_mbuf);
sys/dev/usb/if_urndis.c
1301
c->sc_mbuf = NULL;
sys/dev/usb/if_urndis.c
767
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
771
c = &sc->sc_data.sc_tx_chain[idx];
sys/dev/usb/if_urndis.c
773
msg = (struct rndis_packet_msg *)c->sc_buf;
sys/dev/usb/if_urndis.c
792
c->sc_mbuf = m;
sys/dev/usb/if_urndis.c
794
usbd_setup_xfer(c->sc_xfer, sc->sc_bulkout_pipe, c, c->sc_buf,
sys/dev/usb/if_urndis.c
799
err = usbd_transfer(c->sc_xfer);
sys/dev/usb/if_urndis.c
801
c->sc_mbuf = NULL;
sys/dev/usb/if_urndis.c
812
urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, u_int32_t len)
sys/dev/usb/if_urndis.c
825
msg = (struct rndis_packet_msg *)((char*)c->sc_buf + offset);
sys/dev/usb/if_urndis.c
826
m = c->sc_mbuf;
sys/dev/usb/if_urndis.c
905
if (urndis_newbuf(sc, c) == ENOBUFS) {
sys/dev/usb/if_urndis.c
923
urndis_newbuf(struct urndis_softc *sc, struct urndis_chain *c)
sys/dev/usb/if_urndis.c
943
c->sc_mbuf = m_new;
sys/dev/usb/if_urndis.c
951
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
956
c = &cd->sc_rx_chain[i];
sys/dev/usb/if_urndis.c
957
c->sc_softc = sc;
sys/dev/usb/if_urndis.c
958
c->sc_idx = i;
sys/dev/usb/if_urndis.c
960
if (urndis_newbuf(sc, c) == ENOBUFS)
sys/dev/usb/if_urndis.c
963
if (c->sc_xfer == NULL) {
sys/dev/usb/if_urndis.c
964
c->sc_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_urndis.c
965
if (c->sc_xfer == NULL)
sys/dev/usb/if_urndis.c
967
c->sc_buf = usbd_alloc_buffer(c->sc_xfer,
sys/dev/usb/if_urndis.c
969
if (c->sc_buf == NULL)
sys/dev/usb/if_urndis.c
981
struct urndis_chain *c;
sys/dev/usb/if_urndis.c
986
c = &cd->sc_tx_chain[i];
sys/dev/usb/if_urndis.c
987
c->sc_softc = sc;
sys/dev/usb/if_urndis.c
988
c->sc_idx = i;
sys/dev/usb/if_urndis.c
989
c->sc_mbuf = NULL;
sys/dev/usb/if_urndis.c
990
if (c->sc_xfer == NULL) {
sys/dev/usb/if_urndis.c
991
c->sc_xfer = usbd_alloc_xfer(sc->sc_udev);
sys/dev/usb/if_urndis.c
992
if (c->sc_xfer == NULL)
sys/dev/usb/if_urndis.c
994
c->sc_buf = usbd_alloc_buffer(c->sc_xfer,
sys/dev/usb/if_urndis.c
996
if (c->sc_buf == NULL)
sys/dev/usb/if_urtw.c
2934
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_urtw.c
2951
if (IEEE80211_IS_CHAN_G(c)) {
sys/dev/usb/if_urtw.c
3362
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_urtw.c
3380
if (IEEE80211_IS_CHAN_G(c)) {
sys/dev/usb/if_urtw.c
3395
urtw_set_chan(struct urtw_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_urtw.c
3403
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/if_urtw.c
3509
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_urtw.c
3515
if (IEEE80211_IS_CHAN_G(c))
sys/dev/usb/if_urtw.c
3748
struct ieee80211_channel *c = ic->ic_ibss_chan;
sys/dev/usb/if_urtw.c
3755
if (IEEE80211_IS_CHAN_G(c)) {
sys/dev/usb/if_wi_usb.c
1008
err = usbd_transfer(c->wi_usb_xfer);
sys/dev/usb/if_wi_usb.c
1040
struct wi_usb_chain *c = priv;
sys/dev/usb/if_wi_usb.c
1041
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1083
struct wi_usb_chain *c = priv;
sys/dev/usb/if_wi_usb.c
1084
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1133
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
1139
c = &sc->wi_usb_rx_chain[i];
sys/dev/usb/if_wi_usb.c
1140
c->wi_usb_sc = sc;
sys/dev/usb/if_wi_usb.c
1141
c->wi_usb_idx = i;
sys/dev/usb/if_wi_usb.c
1142
if (c->wi_usb_xfer != NULL) {
sys/dev/usb/if_wi_usb.c
1145
if (c->wi_usb_xfer == NULL) {
sys/dev/usb/if_wi_usb.c
1146
c->wi_usb_xfer = usbd_alloc_xfer(sc->wi_usb_udev);
sys/dev/usb/if_wi_usb.c
1147
if (c->wi_usb_xfer == NULL)
sys/dev/usb/if_wi_usb.c
1149
c->wi_usb_buf = usbd_alloc_buffer(c->wi_usb_xfer,
sys/dev/usb/if_wi_usb.c
1151
if (c->wi_usb_buf == NULL)
sys/dev/usb/if_wi_usb.c
1162
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
1168
c = &sc->wi_usb_tx_chain[i];
sys/dev/usb/if_wi_usb.c
1169
c->wi_usb_sc = sc;
sys/dev/usb/if_wi_usb.c
1170
c->wi_usb_idx = i;
sys/dev/usb/if_wi_usb.c
1171
c->wi_usb_mbuf = NULL;
sys/dev/usb/if_wi_usb.c
1172
if (c->wi_usb_xfer != NULL) {
sys/dev/usb/if_wi_usb.c
1175
if (c->wi_usb_xfer == NULL) {
sys/dev/usb/if_wi_usb.c
1176
c->wi_usb_xfer = usbd_alloc_xfer(sc->wi_usb_udev);
sys/dev/usb/if_wi_usb.c
1177
if (c->wi_usb_xfer == NULL)
sys/dev/usb/if_wi_usb.c
1179
c->wi_usb_buf = usbd_alloc_buffer(c->wi_usb_xfer,
sys/dev/usb/if_wi_usb.c
1181
if (c->wi_usb_buf == NULL)
sys/dev/usb/if_wi_usb.c
1194
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
1234
c = &sc->wi_usb_rx_chain[i];
sys/dev/usb/if_wi_usb.c
1235
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_RX],
sys/dev/usb/if_wi_usb.c
1236
c, c->wi_usb_buf, WI_USB_BUFSZ,
sys/dev/usb/if_wi_usb.c
1241
usbd_transfer(c->wi_usb_xfer);
sys/dev/usb/if_wi_usb.c
1301
struct wi_usb_chain *c = priv;
sys/dev/usb/if_wi_usb.c
1302
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1347
uin = (wi_usb_usbin *)(c->wi_usb_buf);
sys/dev/usb/if_wi_usb.c
1353
wi_dump_data(c->wi_usb_buf, total_len);
sys/dev/usb/if_wi_usb.c
1372
wi_usb_infofrm(c, total_len);
sys/dev/usb/if_wi_usb.c
1375
wi_usb_cmdresp(c);
sys/dev/usb/if_wi_usb.c
1378
wi_usb_wridresp(c);
sys/dev/usb/if_wi_usb.c
1381
wi_usb_rridresp(c);
sys/dev/usb/if_wi_usb.c
1403
wi_dump_data(c->wi_usb_buf, total_len);
sys/dev/usb/if_wi_usb.c
1409
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_RX],
sys/dev/usb/if_wi_usb.c
1410
c, c->wi_usb_buf, WI_USB_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY,
sys/dev/usb/if_wi_usb.c
1413
usbd_transfer(c->wi_usb_xfer);
sys/dev/usb/if_wi_usb.c
1447
wi_usb_cmdresp(struct wi_usb_chain *c)
sys/dev/usb/if_wi_usb.c
1449
struct wi_cmdresp *presp = (struct wi_cmdresp *)(c->wi_usb_buf);
sys/dev/usb/if_wi_usb.c
1451
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1478
wi_usb_rridresp(struct wi_usb_chain *c)
sys/dev/usb/if_wi_usb.c
1480
struct wi_rridresp *presp = (struct wi_rridresp *)(c->wi_usb_buf);
sys/dev/usb/if_wi_usb.c
1482
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1531
wi_usb_wridresp(struct wi_usb_chain *c)
sys/dev/usb/if_wi_usb.c
1533
struct wi_wridresp *presp = (struct wi_wridresp *)(c->wi_usb_buf);
sys/dev/usb/if_wi_usb.c
1534
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1548
wi_usb_infofrm(struct wi_usb_chain *c, int len)
sys/dev/usb/if_wi_usb.c
1550
struct wi_usb_softc *sc = c->wi_usb_sc;
sys/dev/usb/if_wi_usb.c
1555
sc->wi_info = ((char *)c->wi_usb_buf) + 2;
sys/dev/usb/if_wi_usb.c
437
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
442
c = &sc->wi_usb_tx_chain[0];
sys/dev/usb/if_wi_usb.c
467
bcopy(wibuf, c->wi_usb_buf, total_len);
sys/dev/usb/if_wi_usb.c
469
bzero(((char *)c->wi_usb_buf)+total_len,
sys/dev/usb/if_wi_usb.c
480
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_TX],
sys/dev/usb/if_wi_usb.c
481
c, c->wi_usb_buf, rnd_len,
sys/dev/usb/if_wi_usb.c
485
err = usbd_transfer(c->wi_usb_xfer);
sys/dev/usb/if_wi_usb.c
510
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
547
c = &sc->wi_usb_tx_chain[0];
sys/dev/usb/if_wi_usb.c
548
pcmd = c->wi_usb_buf;
sys/dev/usb/if_wi_usb.c
571
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_TX],
sys/dev/usb/if_wi_usb.c
572
c, c->wi_usb_buf, rnd_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_wi_usb.c
575
err = wi_usb_do_transmit_sync(sc, c, &sc->cmdresperr);
sys/dev/usb/if_wi_usb.c
596
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
62
int wi_usb_do_transmit_sync(struct wi_usb_softc *wsc, struct wi_usb_chain *c,
sys/dev/usb/if_wi_usb.c
630
c = &sc->wi_usb_tx_chain[0];
sys/dev/usb/if_wi_usb.c
631
prid = c->wi_usb_buf;
sys/dev/usb/if_wi_usb.c
652
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_TX],
sys/dev/usb/if_wi_usb.c
653
c, c->wi_usb_buf, rnd_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_wi_usb.c
659
err = wi_usb_do_transmit_sync(sc, c, &sc->ridresperr);
sys/dev/usb/if_wi_usb.c
725
struct wi_usb_chain *c;
sys/dev/usb/if_wi_usb.c
76
void wi_usb_cmdresp(struct wi_usb_chain *c);
sys/dev/usb/if_wi_usb.c
77
void wi_usb_rridresp(struct wi_usb_chain *c);
sys/dev/usb/if_wi_usb.c
78
void wi_usb_wridresp(struct wi_usb_chain *c);
sys/dev/usb/if_wi_usb.c
79
void wi_usb_infofrm(struct wi_usb_chain *c, int len);
sys/dev/usb/if_wi_usb.c
843
c = &sc->wi_usb_tx_chain[0];
sys/dev/usb/if_wi_usb.c
845
prid = c->wi_usb_buf;
sys/dev/usb/if_wi_usb.c
865
usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_TX],
sys/dev/usb/if_wi_usb.c
866
c, c->wi_usb_buf, rnd_len, USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
sys/dev/usb/if_wi_usb.c
869
err = wi_usb_do_transmit_sync(sc, c, &sc->ridresperr);
sys/dev/usb/if_wi_usb.c
999
wi_usb_do_transmit_sync(struct wi_usb_softc *sc, struct wi_usb_chain *c,
sys/dev/usb/if_zyd.c
1752
zyd_set_chan(struct zyd_softc *sc, struct ieee80211_channel *c)
sys/dev/usb/if_zyd.c
1759
chan = ieee80211_chan2ieee(ic, c);
sys/dev/usb/uaudio.c
4539
int c;
sys/dev/usb/uaudio.c
4563
while ((c = *product++) != 0) {
sys/dev/usb/uaudio.c
4564
if (c < ' ' || c > '~')
sys/dev/usb/uaudio.c
4567
*p = c;
sys/dev/usb/ucom.c
1157
int (*rint)(int c, struct tty *tp) = LINESW(tp, l_rint);
sys/dev/usb/udl.c
1310
uint16_t c;
sys/dev/usb/udl.c
1334
c = UGETW(us.bString[i]);
sys/dev/usb/udl.c
1336
if ((c & 0xff00) == 0)
sys/dev/usb/udl.c
1337
*s++ = c;
sys/dev/usb/udl.c
1338
else if ((c & 0x00ff) == 0)
sys/dev/usb/udl.c
1339
*s++ = c >> 8;
sys/dev/usb/ugold.c
273
int c;
sys/dev/usb/ugold.c
275
for (start = dst, end = start + siz - 1; (c = *src) && dst < end; ) {
sys/dev/usb/ugold.c
276
if (c >= 0x20 && c <= 0x7f) {
sys/dev/usb/ugold.c
277
if (c == '\\') {
sys/dev/usb/ugold.c
283
*dst++ = c;
sys/dev/usb/ugold.c
288
*dst++ = ((u_char)c >> 6 & 07) + '0';
sys/dev/usb/ugold.c
289
*dst++ = ((u_char)c >> 3 & 07) + '0';
sys/dev/usb/ugold.c
290
*dst++ = ((u_char)c & 07) + '0';
sys/dev/usb/umass.c
1778
u_int8_t *c = cbw->CBWCDB;
sys/dev/usb/umass.c
1786
c[0], c[1], c[2], c[3], c[4], c[5],
sys/dev/usb/umass.c
1787
c[6], c[7], c[8], c[9],
sys/dev/usb/uow.c
87
#define uow_ctlcmd(s, c, p) uow_cmd((s), DS2490_CONTROL_CMD, (c), (p))
sys/dev/usb/uow.c
88
#define uow_commcmd(s, c, p) uow_cmd((s), DS2490_COMM_CMD, (c), (p))
sys/dev/usb/uow.c
89
#define uow_modecmd(s, c, p) uow_cmd((s), DS2490_MODE_CMD, (c), (p))
sys/dev/usb/usb_subr.c
158
u_int16_t c;
sys/dev/usb/usb_subr.c
183
c = UGETW(us.bString[i]);
sys/dev/usb/usb_subr.c
185
if ((c & 0xff00) == 0)
sys/dev/usb/usb_subr.c
186
*s++ = c;
sys/dev/usb/usb_subr.c
187
else if ((c & 0x00ff) == 0 && swap)
sys/dev/usb/usb_subr.c
188
*s++ = c >> 8;
sys/dev/wscons/wsdisplay.c
2109
char c = i;
sys/dev/wscons/wsdisplay.c
2123
(void)(*dc->wsemul->output)(dc->wsemulcookie, &c, 1, 1);
sys/dev/wscons/wsdisplayvar.h
74
int (*cursor)(void *c, int on, int row, int col);
sys/dev/wscons/wsdisplayvar.h
76
int (*putchar)(void *c, int row, int col, u_int uc, uint32_t attr);
sys/dev/wscons/wsdisplayvar.h
77
int (*copycols)(void *c, int row, int srccol, int dstcol,
sys/dev/wscons/wsdisplayvar.h
79
int (*erasecols)(void *c, int row, int startcol, int ncols,
sys/dev/wscons/wsdisplayvar.h
81
int (*copyrows)(void *c, int srcrow, int dstrow, int nrows);
sys/dev/wscons/wsdisplayvar.h
82
int (*eraserows)(void *c, int row, int nrows, uint32_t attr);
sys/dev/wscons/wsdisplayvar.h
83
int (*pack_attr)(void *c, int fg, int bg, int flags,
sys/dev/wscons/wsdisplayvar.h
85
void (*unpack_attr)(void *c, uint32_t attr, int *fg, int *bg,
sys/dev/wscons/wsemul_dumb.c
132
u_char c;
sys/dev/wscons/wsemul_dumb.c
140
c = *data++;
sys/dev/wscons/wsemul_dumb.c
141
if (c == ASCII_BEL)
sys/dev/wscons/wsemul_dumb.c
145
(edp->emulcookie, 0, 0, c, 0));
sys/dev/wscons/wsemul_dumb.c
181
c = *data++;
sys/dev/wscons/wsemul_dumb.c
182
switch (c) {
sys/dev/wscons/wsemul_dumb.c
223
(edp->emulcookie, edp->crow, edp->ccol, c,
sys/dev/wscons/wsemul_dumb.c
253
if (c != ASCII_LF)
sys/dev/wscons/wsemul_sun.c
155
#define ARG(n,c) \
sys/dev/wscons/wsemul_sun.c
156
((n) >= edp->nargs ? 0 : edp->args[(n) + MAX(0, edp->nargs - (c))])
sys/dev/wscons/wsemul_vt100.c
353
u_char c;
sys/dev/wscons/wsemul_vt100.c
364
c = instate->inchar & 0xff;
sys/dev/wscons/wsemul_vt100.c
365
if (c & 0x80) {
sys/dev/wscons/wsemul_vt100.c
366
c &= 0x7f;
sys/dev/wscons/wsemul_vt100.c
375
dc = ct ? ct[c] : c;
sys/dev/wscons/wsemul_vt100_chars.c
106
u_int16_t c[12];
sys/dev/wscons/wsemul_vt100_chars.c
160
(*edp->emulops->mapchar)(edp->emulcookie, nrctable[nrc].c[i],
sys/dev/wscons/wsemul_vt100_subr.c
232
u_char c;
sys/dev/wscons/wsemul_vt100_subr.c
236
c = 0x00; /* cause the switch below to end in default: */
sys/dev/wscons/wsemul_vt100_subr.c
238
c = (u_char)instate->inchar;
sys/dev/wscons/wsemul_vt100_subr.c
240
#define A3(a, b, c) (((a) << 16) | ((b) << 8) | (c))
sys/dev/wscons/wsemul_vt100_subr.c
241
switch (A3(edp->modif1, edp->modif2, c)) {
sys/dev/wscons/wsemul_vt100_subr.c
504
if (c == 'L')
sys/dev/wscons/wsemul_vt100_subr.c
873
char c = edp->dcsarg[i];
sys/dev/wscons/wsemul_vt100_subr.c
874
switch (c) {
sys/dev/wscons/wsemul_vt100_subr.c
878
pos = pos * 10 + (c - '0');
sys/dev/wscons/wsemul_vt100_subr.c
889
printf("unknown char %c in DCS\n", c);
sys/dev/wscons/wsmoused.h
100
#define IS_SPACE(c) ((c) == ' ')
sys/dev/wscons/wsmoused.h
99
#define IS_ALPHANUM(c) ((c) != ' ')
sys/dev/wsfont/wsfont.c
139
#define BUILTIN_FONT(f, c) \
sys/dev/wsfont/wsfont.c
140
{ .font = &(f), .cookie = (c), .lockcount = 0, \
sys/dev/wsfont/wsfont.c
736
wsfont_map_unichar(struct wsdisplay_font *font, int c)
sys/dev/wsfont/wsfont.c
739
return (c);
sys/dev/wsfont/wsfont.c
743
int hi = (c >> 8), lo = c & 255;
sys/dev/wsfont/wsfont.c
757
c = (((u_int8_t *)map2->chars)[lo]);
sys/dev/wsfont/wsfont.c
760
c = (((u_int16_t *)map2->chars)[lo]);
sys/dev/wsfont/wsfont.c
763
c = (((u_int32_t *)map2->chars)[lo]);
sys/dev/wsfont/wsfont.c
767
if (c != 0 || lo == 0)
sys/dev/wsfont/wsfont.c
768
return (c);
sys/dev/x86emu/x86emu.c
5257
hw_cpuid(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
sys/dev/x86emu/x86emu.c
5261
"=c" (*c), "=d" (*d)
sys/dev/x86emu/x86emu.c
5262
: "a" (*a), "c" (*c)
sys/isofs/cd9660/cd9660_rrip.c
558
u_char c;
sys/isofs/cd9660/cd9660_rrip.c
568
isochar(isodir->name, pwhead, ana->imp->joliet_level, &c);
sys/isofs/cd9660/cd9660_rrip.c
571
if (c != 0 || isonum_733(isodir->extent) != ana->imp->root_extent)
sys/isofs/cd9660/cd9660_rrip.c
706
u_char c;
sys/isofs/cd9660/cd9660_rrip.c
718
imp->joliet_level, &c);
sys/isofs/cd9660/cd9660_rrip.c
720
if (c == 0 || c == 1) {
sys/isofs/cd9660/cd9660_util.c
104
u_char c;
sys/isofs/cd9660/cd9660_util.c
110
isofn += isochar(isofn, isoend, joliet_level, &c);
sys/isofs/cd9660/cd9660_util.c
111
if (c == ';') {
sys/isofs/cd9660/cd9660_util.c
119
for (j = 0; isofn != isoend; j = j * 10 + c - '0')
sys/isofs/cd9660/cd9660_util.c
121
joliet_level, &c);
sys/isofs/cd9660/cd9660_util.c
124
if (((u_char) c) != *fn) {
sys/isofs/cd9660/cd9660_util.c
125
if (c >= 'A' && c <= 'Z') {
sys/isofs/cd9660/cd9660_util.c
126
if (c + ('a' - 'A') != *fn) {
sys/isofs/cd9660/cd9660_util.c
128
return *fn - ('a' - 'A') - c;
sys/isofs/cd9660/cd9660_util.c
130
return *fn - c;
sys/isofs/cd9660/cd9660_util.c
133
return *fn - c;
sys/isofs/cd9660/cd9660_util.c
137
isofn += isochar(isofn, isoend, joliet_level, &c);
sys/isofs/cd9660/cd9660_util.c
138
switch (c) {
sys/isofs/cd9660/cd9660_util.c
140
return -c;
sys/isofs/cd9660/cd9660_util.c
143
isochar(isofn, isoend, joliet_level, &c);
sys/isofs/cd9660/cd9660_util.c
144
if (c == ';')
sys/isofs/cd9660/cd9660_util.c
163
u_char c, d = '\0', *infnend = infn + infnlen;
sys/isofs/cd9660/cd9660_util.c
170
infn += isochar(infn, infnend, joliet_level, &c);
sys/isofs/cd9660/cd9660_util.c
172
if (!original && c == ';') {
sys/isofs/cd9660/cd9660_util.c
176
*outfn++ = c;
sys/isofs/cd9660/cd9660_util.c
177
d = c;
sys/isofs/cd9660/cd9660_util.c
70
isochar(const u_char *isofn, const u_char *isoend, int joliet_level, u_char *c)
sys/isofs/cd9660/cd9660_util.c
72
*c = *isofn++;
sys/isofs/cd9660/cd9660_util.c
78
switch (*c) {
sys/isofs/cd9660/cd9660_util.c
80
*c = '?';
sys/isofs/cd9660/cd9660_util.c
83
*c = *isofn;
sys/isofs/cd9660/cd9660_util.c
89
*c = cd9660_wchar2char((*(isofn - 1) << 8) | *isofn);
sys/kern/kern_smr.c
283
struct cond c = COND_INITIALIZER();
sys/kern/kern_smr.c
293
smr_call_impl(&smr, cond_signal_handler, &c, expedite);
sys/kern/kern_smr.c
294
cond_wait(&c, "smrbar");
sys/kern/kern_subr.c
170
ureadc(int c, struct uio *uio)
sys/kern/kern_subr.c
197
char tmp = c;
sys/kern/kern_subr.c
205
*(char *)iov->iov_base = c;
sys/kern/kern_synch.c
1002
wait = atomic_load_int(&c->c_wait);
sys/kern/kern_synch.c
1004
sleep_setup(c, PWAIT, wmesg);
sys/kern/kern_synch.c
1005
wait = atomic_load_int(&c->c_wait);
sys/kern/kern_synch.c
982
cond_init(struct cond *c)
sys/kern/kern_synch.c
984
atomic_store_int(&c->c_wait, 1);
sys/kern/kern_synch.c
990
struct cond *c = arg;
sys/kern/kern_synch.c
992
atomic_store_int(&c->c_wait, 0);
sys/kern/kern_synch.c
994
wakeup_one(c);
sys/kern/kern_synch.c
998
cond_wait(struct cond *c, const char *wmesg)
sys/kern/kern_timeout.c
511
struct cond c;
sys/kern/kern_timeout.c
517
timeout_set_flags(&barrier, cond_signal_handler, &c, KCLOCK_NONE,
sys/kern/kern_timeout.c
520
cond_init(&c);
sys/kern/kern_timeout.c
549
cond_wait(&c, "tmobar");
sys/kern/kern_unveil.c
338
char c;
sys/kern/kern_unveil.c
341
while ((c = permissions[i++]) != '\0') {
sys/kern/kern_unveil.c
342
switch (c) {
sys/kern/subr_disk.c
1378
char c;
sys/kern/subr_disk.c
1382
c = str[len-1];
sys/kern/subr_disk.c
1383
part = DL_PARTNAME2NUM(c);
sys/kern/subr_disk.c
1751
char c, part;
sys/kern/subr_disk.c
1787
c = path[i];
sys/kern/subr_disk.c
1788
if (c >= '0' && c <= '9')
sys/kern/subr_disk.c
1789
c -= '0';
sys/kern/subr_disk.c
1790
else if (c >= 'a' && c <= 'f')
sys/kern/subr_disk.c
1791
c -= ('a' - 10);
sys/kern/subr_disk.c
1796
uid[i / 2] |= c & 0xf;
sys/kern/subr_extent.c
61
#define tsleep_nsec(c, p, s, t) (EWOULDBLOCK)
sys/kern/subr_extent.c
68
#define pool_init(a, b, c, d, e, f, g) do { (a)->pr_size = (b); } while (0)
sys/kern/subr_log.c
172
msgbuf_putchar(struct msgbuf *mbp, const char c)
sys/kern/subr_log.c
179
msgbuf_putchar_locked(mbp, c);
sys/kern/subr_log.c
184
msgbuf_putchar_locked(struct msgbuf *mbp, const char c)
sys/kern/subr_log.c
186
mbp->msg_bufc[mbp->msg_bufx++] = c;
sys/kern/subr_pool.c
1218
char c;
sys/kern/subr_pool.c
1220
while ((c = *modif++) != '\0') {
sys/kern/subr_pool.c
1221
if (c == 'p')
sys/kern/subr_prf.c
1091
int putchar(int c);
sys/kern/subr_prf.c
1102
putchar(int c)
sys/kern/subr_prf.c
1104
printf("%c", c);
sys/kern/subr_prf.c
1106
return (c);
sys/kern/subr_prf.c
349
kputchar(int c, int flags, struct tty *tp)
sys/kern/subr_prf.c
360
if ((flags & TOTTY) && tp && tputchar(c, tp) < 0 &&
sys/kern/subr_prf.c
364
c != '\0' && c != '\r' && c != 0177 && msgbufmapped)
sys/kern/subr_prf.c
365
msgbuf_putchar(msgbufp, c);
sys/kern/subr_prf.c
366
if ((flags & TOCONS) && (constty == NULL || db_active) && c != '\0')
sys/kern/subr_prf.c
367
(*v_putc)(c);
sys/kern/subr_prf.c
370
db_putchar(c);
sys/kern/subr_prf.c
639
#define to_digit(c) ((c) - '0')
sys/kern/subr_prf.c
640
#define is_digit(c) ((unsigned)to_digit(c) <= 9)
sys/kern/subr_userconf.c
1004
c = userconf_argbuf;
sys/kern/subr_userconf.c
1005
while (*c == ' ' || *c == '\t' || *c == '\n')
sys/kern/subr_userconf.c
1006
c++;
sys/kern/subr_userconf.c
1008
if (*c != '\0') {
sys/kern/subr_userconf.c
1009
if (userconf_number(c, &a, INT_MAX) == 0) {
sys/kern/subr_userconf.c
1021
} else if (*c == '?') {
sys/kern/subr_userconf.c
1024
} else if (*c == 'q' || *c == 'Q') {
sys/kern/subr_userconf.c
1182
char *c, *v;
sys/kern/subr_userconf.c
1187
c = cmd;
sys/kern/subr_userconf.c
1188
while (*c == ' ' || *c == '\t')
sys/kern/subr_userconf.c
1189
c++;
sys/kern/subr_userconf.c
1190
v = c;
sys/kern/subr_userconf.c
1191
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
sys/kern/subr_userconf.c
1192
c++;
sys/kern/subr_userconf.c
1205
while (*c == ' ' || *c == '\t' || *c == '\n')
sys/kern/subr_userconf.c
1206
c++;
sys/kern/subr_userconf.c
1214
if (*c == '\0')
sys/kern/subr_userconf.c
1216
else if (userconf_number(c, &a, INT_MAX) == 0)
sys/kern/subr_userconf.c
1222
if (*c == '\0')
sys/kern/subr_userconf.c
1224
else if (userconf_device(c, &a, &unit, &state) == 0)
sys/kern/subr_userconf.c
1225
userconf_add(c, a, unit, state);
sys/kern/subr_userconf.c
1230
if (*c == '\0')
sys/kern/subr_userconf.c
1232
else if (userconf_number(c, &a, INT_MAX) == 0) {
sys/kern/subr_userconf.c
1242
if (*c == '\0')
sys/kern/subr_userconf.c
1244
else if (userconf_number(c, &a, INT_MAX) == 0)
sys/kern/subr_userconf.c
1246
else if (userconf_device(c, &a, &unit, &state) == 0)
sys/kern/subr_userconf.c
1247
userconf_common_dev(c, a, unit, state, UC_CHANGE);
sys/kern/subr_userconf.c
1257
if (*c == '\0')
sys/kern/subr_userconf.c
1259
else if (userconf_attr(c, &a) == 0)
sys/kern/subr_userconf.c
1260
userconf_common_attr(c, a, UC_DISABLE);
sys/kern/subr_userconf.c
1261
else if (userconf_number(c, &a, INT_MAX) == 0)
sys/kern/subr_userconf.c
1263
else if (userconf_device(c, &a, &unit, &state) == 0)
sys/kern/subr_userconf.c
1264
userconf_common_dev(c, a, unit, state, UC_DISABLE);
sys/kern/subr_userconf.c
1269
if (*c == '\0')
sys/kern/subr_userconf.c
1271
else if (userconf_attr(c, &a) == 0)
sys/kern/subr_userconf.c
1272
userconf_common_attr(c, a, UC_ENABLE);
sys/kern/subr_userconf.c
1273
else if (userconf_number(c, &a, INT_MAX) == 0)
sys/kern/subr_userconf.c
1275
else if (userconf_device(c, &a, &unit, &state) == 0)
sys/kern/subr_userconf.c
1276
userconf_common_dev(c, a, unit, state, UC_ENABLE);
sys/kern/subr_userconf.c
1281
if (*c == '\0')
sys/kern/subr_userconf.c
1283
else if (userconf_number(c, &a, INT_MAX) == 0)
sys/kern/subr_userconf.c
1285
else if (userconf_device(c, &a, &unit, &state) == 0)
sys/kern/subr_userconf.c
1286
userconf_common_dev(c, a, unit, state, UC_FIND);
sys/kern/subr_userconf.c
1294
if (*c == '\0')
sys/kern/subr_userconf.c
1306
if (*c == '\0')
sys/kern/subr_userconf.c
1309
userconf_show_attr(c);
sys/kern/subr_userconf.c
145
char c = '\0';
sys/kern/subr_userconf.c
150
c = cngetc();
sys/kern/subr_userconf.c
155
if (c == 'q' || c == 'Q')
sys/kern/subr_userconf.c
247
char c;
sys/kern/subr_userconf.c
275
c = ' ';
sys/kern/subr_userconf.c
280
printf("%c", c);
sys/kern/subr_userconf.c
282
c = '|';
sys/kern/subr_userconf.c
308
userconf_number(char *c, long *val, long limit)
sys/kern/subr_userconf.c
314
if (*c == '-') {
sys/kern/subr_userconf.c
316
c++;
sys/kern/subr_userconf.c
318
if (*c == '0') {
sys/kern/subr_userconf.c
320
c++;
sys/kern/subr_userconf.c
321
if (*c == 'x' || *c == 'X') {
sys/kern/subr_userconf.c
323
c++;
sys/kern/subr_userconf.c
326
while (*c != '\n' && *c != '\t' && *c != ' ' && *c != '\0') {
sys/kern/subr_userconf.c
327
u_char cc = *c;
sys/kern/subr_userconf.c
341
c++;
sys/kern/subr_userconf.c
355
char *c;
sys/kern/subr_userconf.c
357
c = cmd;
sys/kern/subr_userconf.c
358
while (*c >= 'a' && *c <= 'z') {
sys/kern/subr_userconf.c
360
c++;
sys/kern/subr_userconf.c
362
if (*c == '*') {
sys/kern/subr_userconf.c
364
c++;
sys/kern/subr_userconf.c
366
while (*c >= '0' && *c <= '9') {
sys/kern/subr_userconf.c
368
u = u*10 + *c - '0';
sys/kern/subr_userconf.c
369
c++;
sys/kern/subr_userconf.c
372
while (*c == ' ' || *c == '\t' || *c == '\n')
sys/kern/subr_userconf.c
373
c++;
sys/kern/subr_userconf.c
375
if (*c == '\0') {
sys/kern/subr_userconf.c
388
char *c;
sys/kern/subr_userconf.c
391
c = cmd;
sys/kern/subr_userconf.c
392
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
sys/kern/subr_userconf.c
393
c++;
sys/kern/subr_userconf.c
419
char *c;
sys/kern/subr_userconf.c
429
c = userconf_argbuf;
sys/kern/subr_userconf.c
430
while (*c == ' ' || *c == '\t' || *c == '\n') c++;
sys/kern/subr_userconf.c
432
if (*c != '\0') {
sys/kern/subr_userconf.c
433
if (userconf_number(c, &a, limit) == 0) {
sys/kern/subr_userconf.c
449
char c = '\0';
sys/kern/subr_userconf.c
456
while (c != 'y' && c != 'Y' && c != 'n' && c != 'N') {
sys/kern/subr_userconf.c
458
c = cngetc();
sys/kern/subr_userconf.c
462
if (c == 'y' || c == 'Y') {
sys/kern/subr_userconf.c
533
while (c != 'y' && c != 'Y' && c != 'n' && c != 'N') {
sys/kern/subr_userconf.c
535
c = cngetc();
sys/kern/subr_userconf.c
539
if (c == 'y' || c == 'Y') {
sys/kern/subr_userconf.c
836
char *c;
sys/kern/subr_userconf.c
840
c = cmd;
sys/kern/subr_userconf.c
841
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
sys/kern/subr_userconf.c
842
c++;
sys/kern/subr_userconf.c
845
while (*c == ' ' || *c == '\t' || *c == '\n') {
sys/kern/subr_userconf.c
846
c++;
sys/kern/subr_userconf.c
862
if (*c == '\0') {
sys/kern/subr_userconf.c
865
if (userconf_number(c, &a, INT_MAX) == 0) {
sys/kern/subr_userconf.c
965
char *c;
sys/kern/subr_userconf.c
969
c = cmd;
sys/kern/subr_userconf.c
970
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
sys/kern/subr_userconf.c
971
c++;
sys/kern/subr_userconf.c
974
while (*c == ' ' || *c == '\t' || *c == '\n')
sys/kern/subr_userconf.c
975
c++;
sys/kern/subr_userconf.c
977
if (*c == '\0') {
sys/kern/subr_userconf.c
982
if (userconf_number(c, &a, INT_MAX) == 0) {
sys/kern/subr_userconf.c
994
char *c;
sys/kern/tty.c
102
#define ISALPHA(c) (char_type[(c) & TTY_CHARMASK] & ALPHA)
sys/kern/tty.c
105
#define CCLASS(c) (char_type[c] & CCLASSMASK)
sys/kern/tty.c
1458
int c;
sys/kern/tty.c
1467
while ((c = getc(&tq)) >= 0)
sys/kern/tty.c
1468
ttyinput(c, tp);
sys/kern/tty.c
1496
int c;
sys/kern/tty.c
1608
while ((c = getc(qp)) >= 0) {
sys/kern/tty.c
1612
if (CCEQ(cc[VDSUSP], c) &&
sys/kern/tty.c
1627
if (CCEQ(cc[VEOF], c) && ISSET(lflag, ICANON))
sys/kern/tty.c
163
#define islower(c) ((c) >= 'a' && (c) <= 'z')
sys/kern/tty.c
1632
error = ureadc(c, uio);
sys/kern/tty.c
164
#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
sys/kern/tty.c
1641
if (ISSET(lflag, ICANON) && TTBREAKC(c, lflag))
sys/kern/tty.c
166
#define tolower(c) ((c) - 'A' + 'a')
sys/kern/tty.c
167
#define toupper(c) ((c) - 'a' + 'A')
sys/kern/tty.c
1806
char c = cp[i];
sys/kern/tty.c
1807
if (c != '\0' && c != '\r' && c != 0177)
sys/kern/tty.c
1808
msgbuf_putchar(consbufp, c);
sys/kern/tty.c
1913
ttyrub(int c, struct tty *tp)
sys/kern/tty.c
1929
if (c == ('\t' | TTY_QUOTE) || c == ('\n' | TTY_QUOTE))
sys/kern/tty.c
1932
CLR(c, ~TTY_CHARMASK);
sys/kern/tty.c
1933
switch (CCLASS(c)) {
sys/kern/tty.c
1970
(void)printf(PANICSTR "\n", c, CCLASS(c));
sys/kern/tty.c
1972
panic(PANICSTR, c, CCLASS(c));
sys/kern/tty.c
1981
ttyecho(c, tp);
sys/kern/tty.c
2011
int s, c, cc;
sys/kern/tty.c
2020
for (cp = firstc(&tp->t_canq, &c, &cc); cp;
sys/kern/tty.c
2021
cp = nextc(&tp->t_canq, cp, &c, &cc))
sys/kern/tty.c
2022
ttyecho(c, tp);
sys/kern/tty.c
2023
for (cp = firstc(&tp->t_rawq, &c, &cc); cp;
sys/kern/tty.c
2024
cp = nextc(&tp->t_rawq, cp, &c, &cc))
sys/kern/tty.c
2025
ttyecho(c, tp);
sys/kern/tty.c
2038
ttyecho(int c, struct tty *tp)
sys/kern/tty.c
2044
(!ISSET(tp->t_lflag, ECHONL) || c != '\n')) ||
sys/kern/tty.c
2048
(ISSET(c, TTY_CHARMASK) <= 037 && c != '\t' && c != '\n')) ||
sys/kern/tty.c
2049
ISSET(c, TTY_CHARMASK) == 0177)) {
sys/kern/tty.c
2051
CLR(c, ~TTY_CHARMASK);
sys/kern/tty.c
2052
if (c == 0177)
sys/kern/tty.c
2053
c = '?';
sys/kern/tty.c
2055
c += 'A' - 1;
sys/kern/tty.c
2057
(void)ttyoutput(c, tp);
sys/kern/tty.c
223
#define TTBREAKC(c, lflag) \
sys/kern/tty.c
224
((c) == '\n' || (((c) == cc[VEOF] || (c) == cc[VEOL] || \
sys/kern/tty.c
225
((c) == cc[VEOL2] && (lflag & IEXTEN))) && (c) != _POSIX_VDISABLE))
sys/kern/tty.c
2288
tputchar(int c, struct tty *tp)
sys/kern/tty.c
2298
if (c == '\n')
sys/kern/tty.c
2300
(void)ttyoutput(c, tp);
sys/kern/tty.c
233
ttyinput(int c, struct tty *tp)
sys/kern/tty.c
240
enqueue_randomness(tp->t_dev << 8 | c);
sys/kern/tty.c
270
if ((error = (ISSET(c, TTY_ERRORMASK))) != 0) {
sys/kern/tty.c
271
CLR(c, TTY_ERRORMASK);
sys/kern/tty.c
272
if (ISSET(error, TTY_FE) && !c) { /* Break. */
sys/kern/tty.c
288
if (ISSET(iflag, ISTRIP) || c != 0377)
sys/kern/tty.c
290
(void)putc(c | TTY_QUOTE, &tp->t_rawq);
sys/kern/tty.c
293
c = 0;
sys/kern/tty.c
296
if (c == 0377 && !ISSET(iflag, ISTRIP) && ISSET(iflag, PARMRK))
sys/kern/tty.c
305
CLR(c, 0x80);
sys/kern/tty.c
311
SET(c, TTY_QUOTE);
sys/kern/tty.c
327
if (CCEQ(cc[VLNEXT], c)) {
sys/kern/tty.c
333
ttyecho(c, tp);
sys/kern/tty.c
338
if (CCEQ(cc[VDISCARD], c)) {
sys/kern/tty.c
343
ttyecho(c, tp);
sys/kern/tty.c
355
if (CCEQ(cc[VINTR], c) || CCEQ(cc[VQUIT], c)) {
sys/kern/tty.c
358
ttyecho(c, tp);
sys/kern/tty.c
360
CCEQ(cc[VINTR], c) ? SIGINT : SIGQUIT, 1);
sys/kern/tty.c
363
if (CCEQ(cc[VSUSP], c)) {
sys/kern/tty.c
366
ttyecho(c, tp);
sys/kern/tty.c
375
if (CCEQ(cc[VSTOP], c)) {
sys/kern/tty.c
382
if (!CCEQ(cc[VSTART], c))
sys/kern/tty.c
389
if (CCEQ(cc[VSTART], c))
sys/kern/tty.c
395
if (c == '\r') {
sys/kern/tty.c
399
c = '\n';
sys/kern/tty.c
400
} else if (c == '\n' && ISSET(iflag, INLCR))
sys/kern/tty.c
401
c = '\r';
sys/kern/tty.c
414
switch (c) {
sys/kern/tty.c
416
c = '`';
sys/kern/tty.c
419
c = '|';
sys/kern/tty.c
422
c = '~';
sys/kern/tty.c
425
c = '{';
sys/kern/tty.c
428
c = '}';
sys/kern/tty.c
432
else if (c == '\\') {
sys/kern/tty.c
436
else if (isupper(c))
sys/kern/tty.c
437
c = tolower(c);
sys/kern/tty.c
439
else if (ISSET(iflag, IUCLC) && isupper(c))
sys/kern/tty.c
440
c = tolower(c);
sys/kern/tty.c
444
if (CCEQ(cc[VERASE], c)) {
sys/kern/tty.c
452
if (CCEQ(cc[VKILL], c)) {
sys/kern/tty.c
460
ttyecho(c, tp);
sys/kern/tty.c
473
if (CCEQ(cc[VWERASE], c) && ISSET(lflag, IEXTEN)) {
sys/kern/tty.c
480
while ((c = unputc(&tp->t_rawq)) == ' ' || c == '\t')
sys/kern/tty.c
481
if (ttyrub(c, tp))
sys/kern/tty.c
483
if (c == -1)
sys/kern/tty.c
489
if (ttyrub(c, tp))
sys/kern/tty.c
491
c = unputc(&tp->t_rawq);
sys/kern/tty.c
492
if (c == -1)
sys/kern/tty.c
494
if (c == ' ' || c == '\t') {
sys/kern/tty.c
495
(void)putc(c, &tp->t_rawq);
sys/kern/tty.c
498
ctype = ISALPHA(c);
sys/kern/tty.c
503
if (ttyrub(c, tp))
sys/kern/tty.c
505
c = unputc(&tp->t_rawq);
sys/kern/tty.c
506
if (c == -1)
sys/kern/tty.c
508
} while (c != ' ' && c != '\t' &&
sys/kern/tty.c
509
(alt == 0 || ISALPHA(c) == ctype));
sys/kern/tty.c
510
(void)putc(c, &tp->t_rawq);
sys/kern/tty.c
516
if (CCEQ(cc[VREPRINT], c) && ISSET(lflag, IEXTEN)) {
sys/kern/tty.c
523
if (CCEQ(cc[VSTATUS], c) && ISSET(lflag, IEXTEN)) {
sys/kern/tty.c
546
if (putc(c, &tp->t_rawq) >= 0) {
sys/kern/tty.c
549
ttyecho(c, tp);
sys/kern/tty.c
552
if (TTBREAKC(c, lflag)) {
sys/kern/tty.c
566
ttyecho(c, tp);
sys/kern/tty.c
567
if (CCEQ(cc[VEOF], c) && ISSET(lflag, ECHO)) {
sys/kern/tty.c
600
ttyoutput(int c, struct tty *tp)
sys/kern/tty.c
609
if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
sys/kern/tty.c
610
return (c);
sys/kern/tty.c
619
CLR(c, ~TTY_CHARMASK);
sys/kern/tty.c
620
if (c == '\t' &&
sys/kern/tty.c
622
c = 8 - (tp->t_column & 7);
sys/kern/tty.c
627
notout = b_to_q(" ", c, &tp->t_outq);
sys/kern/tty.c
628
c -= notout;
sys/kern/tty.c
629
tk_nout += c;
sys/kern/tty.c
630
tp->t_outcc += c;
sys/kern/tty.c
633
tp->t_column += c;
sys/kern/tty.c
636
if (c == CEOT && ISSET(oflag, ONOEOT))
sys/kern/tty.c
644
if (c == '\n' && ISSET(tp->t_oflag, ONLCR)) {
sys/kern/tty.c
648
return (c);
sys/kern/tty.c
651
else if (c == '\r' && ISSET(tp->t_oflag, OCRNL))
sys/kern/tty.c
652
c = '\n';
sys/kern/tty.c
654
if (ISSET(tp->t_oflag, OLCUC) && islower(c))
sys/kern/tty.c
655
c = toupper(c);
sys/kern/tty.c
657
c2 = c;
sys/kern/tty.c
658
switch (c) {
sys/kern/tty.c
675
if (c == '\\' || isupper(c) || c != c2) {
sys/kern/tty.c
679
return (c);
sys/kern/tty.c
680
c = c2;
sys/kern/tty.c
683
if (ISSET(tp->t_oflag, ONOCR) && c == '\r' && tp->t_column == 0)
sys/kern/tty.c
688
if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
sys/kern/tty.c
689
return (c);
sys/kern/tty.c
692
switch (CCLASS(c)) {
sys/kern/tty.c
99
#define PARITY(c) (char_type[c] & O)
sys/kern/tty_conf.c
53
#define ttyerrinput ((int (*)(int c, struct tty *))enodev)
sys/kern/tty_endrun.c
183
endruninput(int c, struct tty *tp)
sys/kern/tty_endrun.c
194
np->cbuf[np->pos++] = c; /* TFOM char */
sys/kern/tty_endrun.c
230
} else if (c == '\n') {
sys/kern/tty_endrun.c
239
np->cbuf[np->pos++] = c;
sys/kern/tty_endrun.c
244
return linesw[TTYDISC].l_rint(c, tp);
sys/kern/tty_msts.c
144
mstsinput(int c, struct tty *tp)
sys/kern/tty_msts.c
151
switch (c) {
sys/kern/tty_msts.c
199
np->cbuf[np->pos++] = c;
sys/kern/tty_msts.c
203
return linesw[TTYDISC].l_rint(c, tp);
sys/kern/tty_nmea.c
183
nmeainput(int c, struct tty *tp)
sys/kern/tty_nmea.c
190
switch (c) {
sys/kern/tty_nmea.c
247
np->cbuf[np->pos++] = c;
sys/kern/tty_nmea.c
251
return (linesw[TTYDISC].l_rint(c, tp));
sys/kern/tty_subr.c
101
c |= TTY_QUOTE;
sys/kern/tty_subr.c
110
return c;
sys/kern/tty_subr.c
230
putc(int c, struct clist *clp)
sys/kern/tty_subr.c
247
*clp->c_cl = c & 0xff;
sys/kern/tty_subr.c
250
if (c & TTY_QUOTE)
sys/kern/tty_subr.c
357
nextc(struct clist *clp, u_char *cp, int *c, int *ccp)
sys/kern/tty_subr.c
372
*c = *cp & 0xff;
sys/kern/tty_subr.c
375
*c |= TTY_QUOTE;
sys/kern/tty_subr.c
391
firstc(struct clist *clp, int *c, int *ccp)
sys/kern/tty_subr.c
399
*c = *cp & 0xff;
sys/kern/tty_subr.c
402
*c |= TTY_QUOTE;
sys/kern/tty_subr.c
413
unsigned int c = -1;
sys/kern/tty_subr.c
426
c = *clp->c_cl & 0xff;
sys/kern/tty_subr.c
430
c |= TTY_QUOTE;
sys/kern/tty_subr.c
437
return c;
sys/kern/tty_subr.c
446
int c;
sys/kern/tty_subr.c
470
while ((c = getc(from)) != -1)
sys/kern/tty_subr.c
471
putc(c, to);
sys/kern/tty_subr.c
90
int c = -1;
sys/kern/tty_subr.c
97
c = *clp->c_cf & 0xff;
sys/kern/vfs_lookup.c
483
{ char c = *cp;
sys/kern/vfs_lookup.c
486
*cp = c; }
sys/kern/vfs_syscalls.c
1002
if (*c == '\0')
sys/kern/vfs_syscalls.c
957
char *pathname, *c;
sys/kern/vfs_syscalls.c
998
for (c = pathname; *c != '\0'; c++) {
sys/kern/vfs_syscalls.c
999
if (*c != '/')
sys/lib/libkern/getsn.c
36
int c;
sys/lib/libkern/getsn.c
40
c = cngetc();
sys/lib/libkern/getsn.c
41
switch (c) {
sys/lib/libkern/getsn.c
63
c = ' ';
sys/lib/libkern/getsn.c
65
if (len + 1 >= size || c < ' ') {
sys/lib/libkern/getsn.c
69
printf("%c", c);
sys/lib/libkern/getsn.c
71
*lp++ = c;
sys/lib/libkern/libkern.h
150
void *memset(void *, int c, size_t len);
sys/lib/libkern/memchr.c
39
memchr(const void *s, int c, size_t n)
sys/lib/libkern/memchr.c
45
if (*p++ == (unsigned char)c)
sys/lib/libkern/memset.c
58
#define WIDEVAL c
sys/lib/libkern/memset.c
66
u_int c;
sys/lib/libkern/memset.c
93
if ((c = (u_char)c0) != 0) { /* Fill the word. */
sys/lib/libkern/memset.c
94
c = (c << 8) | c; /* u_int is 16 bits. */
sys/lib/libkern/memset.c
96
c = (c << 16) | c; /* u_int is 32 bits. */
sys/lib/libkern/memset.c
99
c = (c << 32) | c; /* u_int is 64 bits. */
sys/lib/libkern/strchr.c
38
strchr(const char *s, int c)
sys/lib/libkern/strchr.c
41
if (*s == c)
sys/lib/libkern/strnstr.c
46
char c, sc;
sys/lib/libkern/strnstr.c
49
if ((c = *find++) != '\0') {
sys/lib/libkern/strnstr.c
55
} while (sc != c);
sys/lib/libkern/strrchr.c
37
strrchr(const char *s, int c)
sys/lib/libkern/strrchr.c
42
if (*s == c)
sys/lib/libsa/blowfish.c
108
Blowfish_initstate(blf_ctx *c)
sys/lib/libsa/blowfish.c
383
*c = initstate;
sys/lib/libsa/blowfish.c
408
Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
sys/lib/libsa/blowfish.c
421
c->P[i] = c->P[i] ^ temp;
sys/lib/libsa/blowfish.c
428
Blowfish_encipher(c, &datal, &datar);
sys/lib/libsa/blowfish.c
430
c->P[i] = datal;
sys/lib/libsa/blowfish.c
431
c->P[i + 1] = datar;
sys/lib/libsa/blowfish.c
436
Blowfish_encipher(c, &datal, &datar);
sys/lib/libsa/blowfish.c
438
c->S[i][k] = datal;
sys/lib/libsa/blowfish.c
439
c->S[i][k + 1] = datar;
sys/lib/libsa/blowfish.c
445
Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
sys/lib/libsa/blowfish.c
459
c->P[i] = c->P[i] ^ temp;
sys/lib/libsa/blowfish.c
468
Blowfish_encipher(c, &datal, &datar);
sys/lib/libsa/blowfish.c
470
c->P[i] = datal;
sys/lib/libsa/blowfish.c
471
c->P[i + 1] = datar;
sys/lib/libsa/blowfish.c
478
Blowfish_encipher(c, &datal, &datar);
sys/lib/libsa/blowfish.c
480
c->S[i][k] = datal;
sys/lib/libsa/blowfish.c
481
c->S[i][k + 1] = datar;
sys/lib/libsa/blowfish.c
488
blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
sys/lib/libsa/blowfish.c
491
Blowfish_initstate(c);
sys/lib/libsa/blowfish.c
494
Blowfish_expand0state(c, k, len);
sys/lib/libsa/blowfish.c
498
blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
sys/lib/libsa/blowfish.c
505
Blowfish_encipher(c, d, d + 1);
sys/lib/libsa/blowfish.c
511
blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
sys/lib/libsa/blowfish.c
518
Blowfish_decipher(c, d, d + 1);
sys/lib/libsa/blowfish.c
524
blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
sys/lib/libsa/blowfish.c
532
Blowfish_encipher(c, &l, &r);
sys/lib/libsa/blowfish.c
546
blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
sys/lib/libsa/blowfish.c
554
Blowfish_decipher(c, &l, &r);
sys/lib/libsa/blowfish.c
568
blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
sys/lib/libsa/blowfish.c
578
Blowfish_encipher(c, &l, &r);
sys/lib/libsa/blowfish.c
58
Blowfish_encipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
sys/lib/libsa/blowfish.c
593
blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
sys/lib/libsa/blowfish.c
604
Blowfish_decipher(c, &l, &r);
sys/lib/libsa/blowfish.c
62
u_int32_t *s = c->S[0];
sys/lib/libsa/blowfish.c
620
Blowfish_decipher(c, &l, &r);
sys/lib/libsa/blowfish.c
63
u_int32_t *p = c->P;
sys/lib/libsa/blowfish.c
646
blf_ctx c;
sys/lib/libsa/blowfish.c
660
blf_key(&c, (u_int8_t *) key, 5);
sys/lib/libsa/blowfish.c
661
blf_enc(&c, data, 5);
sys/lib/libsa/blowfish.c
662
blf_dec(&c, data, 1);
sys/lib/libsa/blowfish.c
663
blf_dec(&c, data + 2, 4);
sys/lib/libsa/blowfish.c
668
blf_key(&c, (u_int8_t *) key2, strlen(key2));
sys/lib/libsa/blowfish.c
669
blf_enc(&c, data2, 1);
sys/lib/libsa/blowfish.c
672
blf_dec(&c, data2, 1);
sys/lib/libsa/blowfish.c
83
Blowfish_decipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr)
sys/lib/libsa/blowfish.c
87
u_int32_t *s = c->S[0];
sys/lib/libsa/blowfish.c
88
u_int32_t *p = c->P;
sys/lib/libsa/bootparam.c
366
u_char c[4];
sys/lib/libsa/bootparam.c
374
cp = uia.c;
sys/lib/libsa/bootparam.c
397
u_char c[4];
sys/lib/libsa/bootparam.c
409
cp = uia.c;
sys/lib/libsa/cons.c
110
cnputc(int c)
sys/lib/libsa/cons.c
112
if (cn_tab != NULL && c) {
sys/lib/libsa/cons.c
113
(*cn_tab->cn_putc)(cn_tab->cn_dev, c);
sys/lib/libsa/cons.c
114
if (c == '\n')
sys/lib/libsa/cread.c
119
int c;
sys/lib/libsa/cread.c
123
c = get_byte(s);
sys/lib/libsa/cread.c
124
if (c == EOF)
sys/lib/libsa/cread.c
126
x += ((unsigned long)c)<<24;
sys/lib/libsa/cread.c
136
int c;
sys/lib/libsa/cread.c
140
c = get_byte(s);
sys/lib/libsa/cread.c
141
if (c != gz_magic[len]) {
sys/lib/libsa/cread.c
146
if (c != EOF) {
sys/lib/libsa/cread.c
176
while ((c = get_byte(s)) != 0 && c != EOF)
sys/lib/libsa/cread.c
180
while ((c = get_byte(s)) != 0 && c != EOF)
sys/lib/libsa/getchar.c
42
int c = cngetc();
sys/lib/libsa/getchar.c
44
if (c == '\r')
sys/lib/libsa/getchar.c
45
c = '\n';
sys/lib/libsa/getchar.c
47
if ((c < ' ' && c != '\n') || c == '\177')
sys/lib/libsa/getchar.c
48
return c;
sys/lib/libsa/getchar.c
50
putchar(c);
sys/lib/libsa/getchar.c
52
return c;
sys/lib/libsa/getln.c
40
int c;
sys/lib/libsa/getln.c
48
switch (c = getchar() & 0177) {
sys/lib/libsa/getln.c
88
*lp++ = c;
sys/lib/libsa/getln.c
89
putchar(c);
sys/lib/libsa/memset.c
38
memset(void *s1, int c, size_t n)
sys/lib/libsa/memset.c
43
*p++ = c;
sys/lib/libsa/net.c
124
char c;
sys/lib/libsa/net.c
135
while ((c = *cp) != '\0') {
sys/lib/libsa/net.c
136
if (c >= '0' && c <= '9') {
sys/lib/libsa/net.c
137
val = (val * 10) + (c - '0');
sys/lib/libsa/nfs.c
369
int nlinks = 0, error = 0, c;
sys/lib/libsa/nfs.c
413
while ((c = *cp) != '\0' && c != '/') {
sys/lib/libsa/nfs.c
425
*cp = c;
sys/lib/libsa/printf.c
66
#define to_digit(c) ((c) - '0')
sys/lib/libsa/printf.c
67
#define is_digit(c) ((unsigned)to_digit(c) <= 9)
sys/lib/libsa/putchar.c
42
putchar(int c)
sys/lib/libsa/putchar.c
44
switch (c) {
sys/lib/libsa/putchar.c
60
cnputc(c);
sys/lib/libsa/putchar.c
64
cnputc(c);
sys/lib/libsa/sha1.c
101
a = b = c = d = e = 0;
sys/lib/libsa/sha1.c
51
u_int32_t a, b, c, d, e;
sys/lib/libsa/sha1.c
53
unsigned char c[64];
sys/lib/libsa/sha1.c
68
c = state[2];
sys/lib/libsa/sha1.c
73
R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
sys/lib/libsa/sha1.c
74
R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
sys/lib/libsa/sha1.c
75
R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
sys/lib/libsa/sha1.c
76
R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
sys/lib/libsa/sha1.c
77
R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
sys/lib/libsa/sha1.c
78
R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
sys/lib/libsa/sha1.c
79
R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
sys/lib/libsa/sha1.c
80
R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
sys/lib/libsa/sha1.c
81
R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
sys/lib/libsa/sha1.c
82
R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
sys/lib/libsa/sha1.c
83
R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
sys/lib/libsa/sha1.c
84
R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
sys/lib/libsa/sha1.c
85
R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
sys/lib/libsa/sha1.c
86
R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
sys/lib/libsa/sha1.c
87
R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
sys/lib/libsa/sha1.c
88
R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
sys/lib/libsa/sha1.c
89
R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
sys/lib/libsa/sha1.c
90
R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
sys/lib/libsa/sha1.c
91
R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
sys/lib/libsa/sha1.c
92
R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
sys/lib/libsa/sha1.c
97
state[2] += c;
sys/lib/libsa/sha2.c
350
#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) do { \
sys/lib/libsa/sha2.c
355
(h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
sys/lib/libsa/sha2.c
359
#define ROUND256(a,b,c,d,e,f,g,h) do { \
sys/lib/libsa/sha2.c
367
(h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
sys/lib/libsa/sha2.c
374
u_int32_t a, b, c, d, e, f, g, h, s0, s1;
sys/lib/libsa/sha2.c
381
c = state[2];
sys/lib/libsa/sha2.c
391
ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
sys/lib/libsa/sha2.c
392
ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
sys/lib/libsa/sha2.c
393
ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
sys/lib/libsa/sha2.c
394
ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
sys/lib/libsa/sha2.c
395
ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
sys/lib/libsa/sha2.c
396
ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
sys/lib/libsa/sha2.c
397
ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
sys/lib/libsa/sha2.c
398
ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
sys/lib/libsa/sha2.c
403
ROUND256(a,b,c,d,e,f,g,h);
sys/lib/libsa/sha2.c
404
ROUND256(h,a,b,c,d,e,f,g);
sys/lib/libsa/sha2.c
405
ROUND256(g,h,a,b,c,d,e,f);
sys/lib/libsa/sha2.c
406
ROUND256(f,g,h,a,b,c,d,e);
sys/lib/libsa/sha2.c
407
ROUND256(e,f,g,h,a,b,c,d);
sys/lib/libsa/sha2.c
408
ROUND256(d,e,f,g,h,a,b,c);
sys/lib/libsa/sha2.c
409
ROUND256(c,d,e,f,g,h,a,b);
sys/lib/libsa/sha2.c
410
ROUND256(b,c,d,e,f,g,h,a);
sys/lib/libsa/sha2.c
416
state[2] += c;
sys/lib/libsa/sha2.c
424
a = b = c = d = e = f = g = h = T1 = 0;
sys/lib/libsa/sha2.c
432
u_int32_t a, b, c, d, e, f, g, h, s0, s1;
sys/lib/libsa/sha2.c
439
c = state[2];
sys/lib/libsa/sha2.c
452
T2 = Sigma0_256(a) + Maj(a, b, c);
sys/lib/libsa/sha2.c
457
d = c;
sys/lib/libsa/sha2.c
458
c = b;
sys/lib/libsa/sha2.c
475
T2 = Sigma0_256(a) + Maj(a, b, c);
sys/lib/libsa/sha2.c
480
d = c;
sys/lib/libsa/sha2.c
481
c = b;
sys/lib/libsa/sha2.c
491
state[2] += c;
sys/lib/libsa/sha2.c
499
a = b = c = d = e = f = g = h = T1 = T2 = 0;
sys/lib/libsa/sha2.c
625
#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) do { \
sys/lib/libsa/sha2.c
630
(h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
sys/lib/libsa/sha2.c
635
#define ROUND512(a,b,c,d,e,f,g,h) do { \
sys/lib/libsa/sha2.c
643
(h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
sys/lib/libsa/sha2.c
650
u_int64_t a, b, c, d, e, f, g, h, s0, s1;
sys/lib/libsa/sha2.c
657
c = state[2];
sys/lib/libsa/sha2.c
667
ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
sys/lib/libsa/sha2.c
668
ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
sys/lib/libsa/sha2.c
669
ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
sys/lib/libsa/sha2.c
670
ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
sys/lib/libsa/sha2.c
671
ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
sys/lib/libsa/sha2.c
672
ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
sys/lib/libsa/sha2.c
673
ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
sys/lib/libsa/sha2.c
674
ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
sys/lib/libsa/sha2.c
679
ROUND512(a,b,c,d,e,f,g,h);
sys/lib/libsa/sha2.c
680
ROUND512(h,a,b,c,d,e,f,g);
sys/lib/libsa/sha2.c
681
ROUND512(g,h,a,b,c,d,e,f);
sys/lib/libsa/sha2.c
682
ROUND512(f,g,h,a,b,c,d,e);
sys/lib/libsa/sha2.c
683
ROUND512(e,f,g,h,a,b,c,d);
sys/lib/libsa/sha2.c
684
ROUND512(d,e,f,g,h,a,b,c);
sys/lib/libsa/sha2.c
685
ROUND512(c,d,e,f,g,h,a,b);
sys/lib/libsa/sha2.c
686
ROUND512(b,c,d,e,f,g,h,a);
sys/lib/libsa/sha2.c
692
state[2] += c;
sys/lib/libsa/sha2.c
700
a = b = c = d = e = f = g = h = T1 = 0;
sys/lib/libsa/sha2.c
708
u_int64_t a, b, c, d, e, f, g, h, s0, s1;
sys/lib/libsa/sha2.c
715
c = state[2];
sys/lib/libsa/sha2.c
728
T2 = Sigma0_512(a) + Maj(a, b, c);
sys/lib/libsa/sha2.c
733
d = c;
sys/lib/libsa/sha2.c
734
c = b;
sys/lib/libsa/sha2.c
751
T2 = Sigma0_512(a) + Maj(a, b, c);
sys/lib/libsa/sha2.c
756
d = c;
sys/lib/libsa/sha2.c
757
c = b;
sys/lib/libsa/sha2.c
767
state[2] += c;
sys/lib/libsa/sha2.c
775
a = b = c = d = e = f = g = h = T1 = T2 = 0;
sys/lib/libsa/snprintf.c
48
sputchar(int c)
sys/lib/libsa/snprintf.c
51
*sbuf = c;
sys/lib/libsa/softraid.c
147
int c, i;
sys/lib/libsa/softraid.c
158
c = cngetc();
sys/lib/libsa/softraid.c
159
if (c == '\r' || c == '\n') {
sys/lib/libsa/softraid.c
161
} else if (c == '\b') {
sys/lib/libsa/softraid.c
165
passphrase[i] = (c & 0xff);
sys/lib/libsa/stand.h
116
#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
sys/lib/libsa/stand.h
117
#define islower(c) ((c) >= 'a' && (c) <= 'z')
sys/lib/libsa/stand.h
118
#define isalpha(c) (isupper(c)||islower(c))
sys/lib/libsa/stand.h
119
#define tolower(c) (isupper(c)?((c) - 'A' + 'a'):(c))
sys/lib/libsa/stand.h
120
#define toupper(c) (islower(c)?((c) - 'a' + 'A'):(c))
sys/lib/libsa/stand.h
121
#define isspace(c) ((c) == ' ' || (c) == '\t')
sys/lib/libsa/stand.h
122
#define isdigit(c) ((c) >= '0' && (c) <= '9')
sys/lib/libsa/stand.h
124
#define btochs(b,c,h,s,nh,ns) \
sys/lib/libsa/stand.h
125
c = (b) / ((nh) * (ns)); \
sys/lib/libsa/strtol.c
102
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
sys/lib/libsa/strtol.c
103
if (c >= '0' && c <= '9')
sys/lib/libsa/strtol.c
104
c -= '0';
sys/lib/libsa/strtol.c
105
else if (c >= 'A' && c <= 'Z')
sys/lib/libsa/strtol.c
106
c -= 'A' - 10;
sys/lib/libsa/strtol.c
107
else if (c >= 'a' && c <= 'z')
sys/lib/libsa/strtol.c
108
c -= 'a' - 10;
sys/lib/libsa/strtol.c
111
if (c >= base)
sys/lib/libsa/strtol.c
116
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
sys/lib/libsa/strtol.c
122
acc -= c;
sys/lib/libsa/strtol.c
125
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
sys/lib/libsa/strtol.c
131
acc += c;
sys/lib/libsa/strtol.c
46
int c;
sys/lib/libsa/strtol.c
56
c = (unsigned char) *s++;
sys/lib/libsa/strtol.c
57
} while (c <= ' ' || c >= 0x7f);
sys/lib/libsa/strtol.c
58
if (c == '-') {
sys/lib/libsa/strtol.c
60
c = *s++;
sys/lib/libsa/strtol.c
63
if (c == '+')
sys/lib/libsa/strtol.c
64
c = *s++;
sys/lib/libsa/strtol.c
67
c == '0' && (*s == 'x' || *s == 'X')) {
sys/lib/libsa/strtol.c
68
c = s[1];
sys/lib/libsa/strtol.c
73
base = c == '0' ? 8 : 10;
sys/lib/libsa/strtoll.c
103
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
sys/lib/libsa/strtoll.c
104
if (isdigit(c))
sys/lib/libsa/strtoll.c
105
c -= '0';
sys/lib/libsa/strtoll.c
106
else if (isalpha(c))
sys/lib/libsa/strtoll.c
107
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
sys/lib/libsa/strtoll.c
110
if (c >= base)
sys/lib/libsa/strtoll.c
115
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
sys/lib/libsa/strtoll.c
121
acc -= c;
sys/lib/libsa/strtoll.c
124
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
sys/lib/libsa/strtoll.c
130
acc += c;
sys/lib/libsa/strtoll.c
46
int c;
sys/lib/libsa/strtoll.c
56
c = (unsigned char) *s++;
sys/lib/libsa/strtoll.c
57
} while (isspace(c));
sys/lib/libsa/strtoll.c
58
if (c == '-') {
sys/lib/libsa/strtoll.c
60
c = *s++;
sys/lib/libsa/strtoll.c
63
if (c == '+')
sys/lib/libsa/strtoll.c
64
c = *s++;
sys/lib/libsa/strtoll.c
67
c == '0' && (*s == 'x' || *s == 'X')) {
sys/lib/libsa/strtoll.c
68
c = s[1];
sys/lib/libsa/strtoll.c
73
base = c == '0' ? 8 : 10;
sys/lib/libsa/ufs.c
411
int rc, c, nlinks = 0;
sys/lib/libsa/ufs.c
484
while ((c = *cp) != '\0' && c != '/') {
sys/lib/libsa/ufs.c
501
*cp = c;
sys/lib/libsa/ufs2.c
407
int rc, c, nlinks = 0;
sys/lib/libsa/ufs2.c
480
while ((c = *cp) != '\0' && c != '/') {
sys/lib/libsa/ufs2.c
497
*cp = c;
sys/lib/libz/deflate.c
137
#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask)
sys/lib/libz/deflate.h
291
#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
sys/lib/libz/deflate.h
337
# define _tr_tally_lit(s, c, flush) \
sys/lib/libz/deflate.h
338
{ uch cc = (c); \
sys/lib/libz/deflate.h
355
# define _tr_tally_lit(s, c, flush) \
sys/lib/libz/deflate.h
356
{ uch cc = (c); \
sys/lib/libz/deflate.h
376
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
sys/lib/libz/trees.c
237
# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
sys/lib/libz/trees.c
241
# define send_code(s, c, tree) \
sys/lib/libz/trees.c
242
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
sys/lib/libz/trees.c
243
send_bits(s, tree[c].Code, tree[c].Len); }
sys/lib/libz/zlib.h
1607
ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
sys/lib/libz/zlib.h
1630
ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
sys/lib/libz/zutil.h
250
# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
sys/lib/libz/zutil.h
251
# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
sys/lib/libz/zutil.h
257
# define Tracec(c,x)
sys/lib/libz/zutil.h
258
# define Tracecv(c,x)
sys/msdosfs/msdosfs_conv.c
359
u_char c;
sys/msdosfs/msdosfs_conv.c
368
c = dos2unix[0xe5];
sys/msdosfs/msdosfs_conv.c
370
c = dos2unix[*dn];
sys/msdosfs/msdosfs_conv.c
371
*un++ = lower ? u2l[c] : c;
sys/msdosfs/msdosfs_conv.c
378
c = dos2unix[*dn++];
sys/msdosfs/msdosfs_conv.c
379
*un++ = lower ? u2l[c] : c;
sys/msdosfs/msdosfs_conv.c
392
c = dos2unix[*dn++];
sys/msdosfs/msdosfs_conv.c
393
*un++ = lower ? u2l[c] : c;
sys/net/bsd-comp.c
459
u_char c;
sys/net/bsd-comp.c
557
c = *rptr++;
sys/net/bsd-comp.c
558
fcode = BSD_KEY(ent, c);
sys/net/bsd-comp.c
559
hval = BSD_HASH(ent, c, hshift);
sys/net/bsd-comp.c
605
ent = c;
sys/net/bsd-comp.c
668
u_char c;
sys/net/bsd-comp.c
702
c = *rptr++;
sys/net/bsd-comp.c
703
fcode = BSD_KEY(ent, c);
sys/net/bsd-comp.c
704
hval = BSD_HASH(ent, c, hshift);
sys/net/bsd-comp.c
751
ent = c;
sys/net/if_ethersubr.c
756
u_int32_t c, carry;
sys/net/if_ethersubr.c
760
c = buf[i];
sys/net/if_ethersubr.c
762
carry = ((crc & 0x01) ? 1 : 0) ^ (c & 0x01);
sys/net/if_ethersubr.c
764
c >>= 1;
sys/net/if_ethersubr.c
776
u_int32_t c, carry;
sys/net/if_ethersubr.c
780
c = buf[i];
sys/net/if_ethersubr.c
782
carry = ((crc & 0x80000000U) ? 1 : 0) ^ (c & 0x01);
sys/net/if_ethersubr.c
784
c >>= 1;
sys/net/if_pflow.c
72
pflowstat_inc(enum pflowstat_counters c)
sys/net/if_pflow.c
74
counters_inc(pflow_counters, c);
sys/net/if_pfsync.c
234
pfsyncstat_inc(enum pfsync_counters c)
sys/net/if_pfsync.c
236
counters_inc(pfsynccounters, c);
sys/net/if_ppp.c
631
(*sc->sc_xcomp->comp_stat)(sc->sc_xc_state, &pcp->c);
sys/net/if_spppsubr.c
4914
u_char c;
sys/net/if_spppsubr.c
4917
c = *p++;
sys/net/if_spppsubr.c
4921
if (c < ' ' || c > '~')
sys/net/if_spppsubr.c
4922
addlog("\\x%x", c);
sys/net/if_spppsubr.c
4924
addlog("%c", c);
sys/net/if_veb.c
1058
enum veb_port_counters c;
sys/net/if_veb.c
1066
c = veb_c_hairpin;
sys/net/if_veb.c
1070
c = veb_c_protected;
sys/net/if_veb.c
1075
c = veb_c_pvlan;
sys/net/if_veb.c
1088
c = veb_c_pvptags_out;
sys/net/if_veb.c
1100
c = veb_c_tagged_filter_out;
sys/net/if_veb.c
1107
c = veb_c_rule_out;
sys/net/if_veb.c
1113
c = veb_c_blocknonip_out;
sys/net/if_veb.c
1144
veb_port_count(tp, c);
sys/net/if_veb.c
1194
enum veb_port_counters c;
sys/net/if_veb.c
1245
c = veb_c_double_tag;
sys/net/if_veb.c
1256
c = veb_c_tagged_filter_in;
sys/net/if_veb.c
1283
c = veb_c_untagged_none;
sys/net/if_veb.c
1308
c = veb_c_pvptags_in;
sys/net/if_veb.c
1323
c = veb_c_locked;
sys/net/if_veb.c
1343
c = veb_c_bpfilter;
sys/net/if_veb.c
1353
c = veb_c_blocknonip_in;
sys/net/if_veb.c
1359
c = veb_c_svlan;
sys/net/if_veb.c
1365
c = veb_c_rule_in;
sys/net/if_veb.c
1421
veb_port_count(p, c);
sys/net/if_veb.c
1741
struct veb_port_cpu *c;
sys/net/if_veb.c
1787
p->p_percpu = cpumem_malloc(sizeof(*c), M_DEVBUF);
sys/net/if_veb.c
1788
CPUMEM_FOREACH(c, &cmi, p->p_percpu) {
sys/net/if_veb.c
1791
refcnt_init(&c->c_refs);
sys/net/if_veb.c
1793
pc_lock_init(&c->c_lock);
sys/net/if_veb.c
1868
cpumem_free(p->p_percpu, M_DEVBUF, sizeof(*c));
sys/net/if_veb.c
3205
struct veb_port_cpu *c;
sys/net/if_veb.c
3208
CPUMEM_FOREACH(c, &cmi, p->p_percpu)
sys/net/if_veb.c
3209
veb_ep_brport_rele(c, p);
sys/net/if_veb.c
3218
cpumem_free(p->p_percpu, M_DEVBUF, sizeof(*c));
sys/net/if_veb.c
3345
struct veb_port_cpu *c;
sys/net/if_veb.c
3347
c = cpumem_enter(p->p_percpu);
sys/net/if_veb.c
3348
refcnt_take(&c->c_refs);
sys/net/if_veb.c
3349
cpumem_leave(p->p_percpu, c);
sys/net/if_veb.c
3351
return (c);
sys/net/if_veb.c
3357
struct veb_port_cpu *c = cpu;
sys/net/if_veb.c
3359
if (refcnt_rele(&c->c_refs))
sys/net/if_veb.c
3411
struct veb_port_cpu *c;
sys/net/if_veb.c
3419
CPUMEM_FOREACH(c, &cmi, p->p_percpu) {
sys/net/if_veb.c
3420
pc_cons_enter(&c->c_lock, &gen);
sys/net/if_veb.c
3423
counters[i] = c->c_counters[i];
sys/net/if_veb.c
3424
} while (pc_cons_leave(&c->c_lock, &gen) != 0);
sys/net/if_veb.c
919
struct veb_port_cpu *c;
sys/net/if_veb.c
922
c = cpumem_enter(p->p_percpu);
sys/net/if_veb.c
923
gen = pc_sprod_enter(&c->c_lock);
sys/net/if_veb.c
924
c->c_counters[counter]++;
sys/net/if_veb.c
925
pc_sprod_leave(&c->c_lock, gen);
sys/net/if_veb.c
926
cpumem_leave(p->p_percpu, c);
sys/net/ifq.c
188
struct cond c = COND_INITIALIZER();
sys/net/ifq.c
189
struct task t = TASK_INITIALIZER(cond_signal_handler, &c);
sys/net/ifq.c
198
cond_wait(&c, "ifqbar");
sys/net/pf_if.c
62
#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
sys/net/pf_if.c
63
#define islower(c) ((c) >= 'a' && (c) <= 'z')
sys/net/pf_if.c
64
#define isalpha(c) (isupper(c)||islower(c))
sys/net/pf_ruleset.c
88
int c = strcmp(a->path, b->path);
sys/net/pf_ruleset.c
90
return (c ? (c < 0 ? -1 : 1) : 0);
sys/net/pfkeyv2_parsemessage.c
664
char *c =
sys/net/pfkeyv2_parsemessage.c
675
j = PADUP(strlen(c) + 1) +
sys/net/pfvar.h
259
#define PF_AEQ(a, b, c) \
sys/net/pfvar.h
260
((c == AF_INET && (a)->addr32[0] == (b)->addr32[0]) || \
sys/net/pfvar.h
261
(c == AF_INET6 && \
sys/net/pfvar.h
267
#define PF_ANEQ(a, b, c) \
sys/net/pfvar.h
268
((c == AF_INET && (a)->addr32[0] != (b)->addr32[0]) || \
sys/net/pfvar.h
269
(c == AF_INET6 && \
sys/net/pfvar.h
275
#define PF_AZERO(a, c) \
sys/net/pfvar.h
276
((c == AF_INET && !(a)->addr32[0]) || \
sys/net/pfvar.h
277
(c == AF_INET6 && \
sys/net/pipex_local.h
329
#define GETCHAR(c, cp) do { \
sys/net/pipex_local.h
330
(c) = *(cp)++; \
sys/net/ppp_defs.h
157
struct compstat c; /* packet compression statistics */
sys/net/ppp_defs.h
89
#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
sys/net/ppp_tty.c
1011
*sc->sc_pktp++ = c;
sys/net/ppp_tty.c
1012
sc->sc_fcs = PPP_FCS(sc->sc_fcs, c);
sys/net/ppp_tty.c
1023
ppplogchar(sc, c);
sys/net/ppp_tty.c
1031
ppplogchar(struct ppp_softc *sc, int c)
sys/net/ppp_tty.c
1033
if (c >= 0)
sys/net/ppp_tty.c
1034
sc->sc_rawin[sc->sc_rawin_count++] = c;
sys/net/ppp_tty.c
1036
|| (c < 0 && sc->sc_rawin_count > 0)) {
sys/net/ppp_tty.c
142
#define ESCAPE_P(c) (sc->sc_asyncmap[(c) >> 5] & (1 << ((c) & 0x1F)))
sys/net/ppp_tty.c
584
int c;
sys/net/ppp_tty.c
591
c = ~sc->sc_outfcs & 0xFF;
sys/net/ppp_tty.c
592
if (ESCAPE_P(c)) {
sys/net/ppp_tty.c
594
*p++ = c ^ PPP_TRANS;
sys/net/ppp_tty.c
596
*p++ = c;
sys/net/ppp_tty.c
597
c = (~sc->sc_outfcs >> 8) & 0xFF;
sys/net/ppp_tty.c
598
if (ESCAPE_P(c)) {
sys/net/ppp_tty.c
600
*p++ = c ^ PPP_TRANS;
sys/net/ppp_tty.c
602
*p++ = c;
sys/net/ppp_tty.c
789
pppinput(int c, struct tty *tp)
sys/net/ppp_tty.c
802
if (c & TTY_FE) {
sys/net/ppp_tty.c
805
printf("%s: bad char %x\n", sc->sc_if.if_xname, c);
sys/net/ppp_tty.c
809
c &= 0xff;
sys/net/ppp_tty.c
815
if (c == tp->t_cc[VSTOP] && tp->t_cc[VSTOP] != _POSIX_VDISABLE) {
sys/net/ppp_tty.c
822
if (c == tp->t_cc[VSTART] && tp->t_cc[VSTART] != _POSIX_VDISABLE) {
sys/net/ppp_tty.c
831
if (c & 0x80)
sys/net/ppp_tty.c
835
if (paritytab[c >> 5] & (1 << (c & 0x1F)))
sys/net/ppp_tty.c
842
ppplogchar(sc, c);
sys/net/ppp_tty.c
844
if (c == PPP_FLAG) {
sys/net/ppp_tty.c
913
ppplogchar(sc, c);
sys/net/ppp_tty.c
917
if (c < 0x20 && (sc->sc_rasyncmap & (1 << c)))
sys/net/ppp_tty.c
923
c ^= PPP_TRANS;
sys/net/ppp_tty.c
924
} else if (c == PPP_ESCAPE) {
sys/net/ppp_tty.c
955
if (c != PPP_ALLSTATIONS) {
sys/net/ppp_tty.c
959
sc->sc_if.if_xname, c);
sys/net/ppp_tty.c
968
if (sc->sc_ilen == 1 && c != PPP_UI) {
sys/net/ppp_tty.c
971
sc->sc_if.if_xname, c);
sys/net/ppp_tty.c
974
if (sc->sc_ilen == 2 && (c & 1) == 1) {
sys/net/ppp_tty.c
980
if (sc->sc_ilen == 3 && (c & 1) == 0) {
sys/net/ppp_tty.c
983
(sc->sc_pktp[-1] << 8) + c);
sys/net/route.c
398
#define mix(a, b, c) do { \
sys/net/route.c
399
a -= b; a -= c; a ^= (c >> 13); \
sys/net/route.c
400
b -= c; b -= a; b ^= (a << 8); \
sys/net/route.c
401
c -= a; c -= b; c ^= (b >> 13); \
sys/net/route.c
402
a -= b; a -= c; a ^= (c >> 12); \
sys/net/route.c
403
b -= c; b -= a; b ^= (a << 16); \
sys/net/route.c
404
c -= a; c -= b; c ^= (b >> 5); \
sys/net/route.c
405
a -= b; a -= c; a ^= (c >> 3); \
sys/net/route.c
406
b -= c; b -= a; b ^= (a << 10); \
sys/net/route.c
407
c -= a; c -= b; c ^= (b >> 15); \
sys/net/route.c
413
uint32_t a, b, c;
sys/net/route.c
419
c = rt_hashjitter;
sys/net/route.c
432
mix(a, b, c);
sys/net/route.c
446
c += src[0];
sys/net/route.c
447
mix(a, b, c);
sys/net/route.c
450
c += src[1];
sys/net/route.c
451
mix(a, b, c);
sys/net/route.c
454
c += src[2];
sys/net/route.c
455
mix(a, b, c);
sys/net/route.c
458
c += src[3];
sys/net/route.c
459
mix(a, b, c);
sys/net/route.c
465
return (c & 0xffff);
sys/net/route.h
422
rtstat_inc(enum rtstat_counters c)
sys/net/route.h
426
counters_inc(rtcounters, c);
sys/net/wg_noise.c
783
noise_kdf(uint8_t *a, uint8_t *b, uint8_t *c, const uint8_t *x,
sys/net/wg_noise.c
792
KASSERT(!(b || b_len || c || c_len) || (a && a_len));
sys/net/wg_noise.c
793
KASSERT(!(c || c_len) || (b && b_len));
sys/net/wg_noise.c
815
if (c == NULL || c_len == 0)
sys/net/wg_noise.c
822
memcpy(c, out, c_len);
sys/net80211/ieee80211.c
1128
const struct ieee80211_channel *c;
sys/net80211/ieee80211.c
114
struct ieee80211_channel *c;
sys/net80211/ieee80211.c
1149
c = &ic->ic_channels[i];
sys/net80211/ieee80211.c
1151
if (c->ic_flags != 0)
sys/net80211/ieee80211.c
1153
} else if (c->ic_flags != 0 &&
sys/net80211/ieee80211.c
1154
(c->ic_flags & modeflags) == modeflags &&
sys/net80211/ieee80211.c
1155
(c->ic_xflags & modexflags) == modexflags)
sys/net80211/ieee80211.c
1168
c = &ic->ic_channels[i];
sys/net80211/ieee80211.c
1170
if (c->ic_flags != 0)
sys/net80211/ieee80211.c
1172
} else if ((c->ic_flags & modeflags) == modeflags)
sys/net80211/ieee80211.c
125
c = &ic->ic_channels[i];
sys/net80211/ieee80211.c
126
if (c->ic_flags) {
sys/net80211/ieee80211.c
130
if (i != ieee80211_chan2ieee(ic, c)) {
sys/net80211/ieee80211.c
133
ifp->if_xname, c->ic_freq, c->ic_flags,
sys/net80211/ieee80211.c
135
c->ic_flags = 0; /* NB: remove */
sys/net80211/ieee80211.c
142
if (IEEE80211_IS_CHAN_A(c))
sys/net80211/ieee80211.c
144
if (IEEE80211_IS_CHAN_B(c))
sys/net80211/ieee80211.c
146
if (IEEE80211_IS_CHAN_PUREG(c))
sys/net80211/ieee80211.c
148
if (IEEE80211_IS_CHAN_N(c))
sys/net80211/ieee80211.c
150
if (IEEE80211_IS_CHAN_AC(c))
sys/net80211/ieee80211.c
152
if (IEEE80211_CHAN_HE(c))
sys/net80211/ieee80211.c
256
ieee80211_chan2ieee(struct ieee80211com *ic, const struct ieee80211_channel *c)
sys/net80211/ieee80211.c
259
if (ic->ic_channels <= c && c <= &ic->ic_channels[IEEE80211_CHAN_MAX])
sys/net80211/ieee80211.c
260
return c - ic->ic_channels;
sys/net80211/ieee80211.c
261
else if (c == IEEE80211_CHAN_ANYC)
sys/netinet/icmp6.h
580
icmp6stat_inc(enum icmp6stat_counters c)
sys/netinet/icmp6.h
582
counters_inc(icmp6counters, c);
sys/netinet/icmp_var.h
105
icmpstat_inc(enum icmpstat_counters c)
sys/netinet/icmp_var.h
107
counters_inc(icmpcounters, c);
sys/netinet/igmp_var.h
96
igmpstat_inc(enum igmpstat_counters c)
sys/netinet/igmp_var.h
98
counters_inc(igmpcounters, c);
sys/netinet/in4_cksum.c
100
u_int8_t c[2];
sys/netinet/in4_cksum.c
146
s_util.c[1] = *(u_int8_t *)w;
sys/netinet/in4_cksum.c
163
s_util.c[0] = *(u_int8_t *)w;
sys/netinet/in4_cksum.c
196
s_util.c[1] = *(u_int8_t *)w;
sys/netinet/in4_cksum.c
202
s_util.c[0] = *(u_int8_t *)w;
sys/netinet/in4_cksum.c
210
s_util.c[1] = 0;
sys/netinet/in_cksum.c
127
s_util.c[1] = *(uint8_t *)w;
sys/netinet/in_cksum.c
133
s_util.c[0] = *(uint8_t *)w;
sys/netinet/in_cksum.c
141
s_util.c[1] = 0;
sys/netinet/in_cksum.c
57
uint8_t c[2];
sys/netinet/in_cksum.c
78
s_util.c[1] = *(uint8_t *)w;
sys/netinet/in_cksum.c
94
s_util.c[0] = *(uint8_t *)w;
sys/netinet/ip_ah.h
120
ahstat_inc(enum ahstat_counters c)
sys/netinet/ip_ah.h
122
counters_inc(ahcounters, c);
sys/netinet/ip_ah.h
126
ahstat_add(enum ahstat_counters c, uint64_t v)
sys/netinet/ip_ah.h
128
counters_add(ahcounters, c, v);
sys/netinet/ip_carp.h
192
carpstat_inc(enum carpstat_counters c)
sys/netinet/ip_carp.h
194
counters_inc(carpcounters, c);
sys/netinet/ip_divert.h
65
divstat_inc(enum divstat_counters c)
sys/netinet/ip_divert.h
67
counters_inc(divcounters, c);
sys/netinet/ip_esp.h
125
espstat_inc(enum espstat_counters c)
sys/netinet/ip_esp.h
127
counters_inc(espcounters, c);
sys/netinet/ip_esp.h
131
espstat_add(enum espstat_counters c, uint64_t v)
sys/netinet/ip_esp.h
133
counters_add(espcounters, c, v);
sys/netinet/ip_ether.h
100
counters_add(etheripcounters, c, v);
sys/netinet/ip_ether.h
92
etheripstat_inc(enum etheripstat_counters c)
sys/netinet/ip_ether.h
94
counters_inc(etheripcounters, c);
sys/netinet/ip_ether.h
98
etheripstat_add(enum etheripstat_counters c, uint64_t v)
sys/netinet/ip_ipcomp.h
112
ipcompstat_inc(enum ipcomp_counters c)
sys/netinet/ip_ipcomp.h
114
counters_inc(ipcompcounters, c);
sys/netinet/ip_ipcomp.h
118
ipcompstat_add(enum ipcomp_counters c, uint64_t v)
sys/netinet/ip_ipcomp.h
120
counters_add(ipcompcounters, c, v);
sys/netinet/ip_ipip.h
102
ipipstat_add(enum ipipstat_counters c, uint64_t v)
sys/netinet/ip_ipip.h
104
counters_add(ipipcounters, c, v);
sys/netinet/ip_ipip.h
96
ipipstat_inc(enum ipipstat_counters c)
sys/netinet/ip_ipip.h
98
counters_inc(ipipcounters, c);
sys/netinet/ip_ipsp.h
188
ipsecstat_inc(enum ipsec_counters c)
sys/netinet/ip_ipsp.h
190
counters_inc(ipseccounters, c);
sys/netinet/ip_ipsp.h
194
ipsecstat_dec(enum ipsec_counters c)
sys/netinet/ip_ipsp.h
196
counters_dec(ipseccounters, c);
sys/netinet/ip_ipsp.h
200
ipsecstat_add(enum ipsec_counters c, uint64_t v)
sys/netinet/ip_ipsp.h
202
counters_add(ipseccounters, c, v);
sys/netinet/ip_ipsp.h
469
tdbstat_inc(struct tdb *tdb, enum tdb_counters c)
sys/netinet/ip_ipsp.h
471
counters_inc(tdb->tdb_counters, c);
sys/netinet/ip_ipsp.h
475
tdbstat_add(struct tdb *tdb, enum tdb_counters c, uint64_t v)
sys/netinet/ip_ipsp.h
477
counters_add(tdb->tdb_counters, c, v);
sys/netinet/ip_ipsp.h
621
#define gettdb(a,b,c,d) gettdb_dir((a),(b),(c),(d),0)
sys/netinet/ip_ipsp.h
622
#define gettdb_rev(a,b,c,d) gettdb_dir((a),(b),(c),(d),1)
sys/netinet/ip_ipsp.h
631
#define gettdbbysrcdst(a,b,c,d,e) gettdbbysrcdst_dir((a),(b),(c),(d),(e),0)
sys/netinet/ip_ipsp.h
632
#define gettdbbysrcdst_rev(a,b,c,d,e) gettdbbysrcdst_dir((a),(b),(c),(d),(e),1)
sys/netinet/ip_mroute.h
196
mrtstat_inc(enum mrtstat_counters c)
sys/netinet/ip_mroute.h
198
counters_inc(mrtcounters, c);
sys/netinet/ip_var.h
149
ipstat_inc(enum ipstat_counters c)
sys/netinet/ip_var.h
151
counters_inc(ipcounters, c);
sys/netinet/ip_var.h
155
ipstat_add(enum ipstat_counters c, uint64_t v)
sys/netinet/ip_var.h
157
counters_add(ipcounters, c, v);
sys/netinet/tcp_var.h
642
tcpstat_inc(enum tcpstat_counters c)
sys/netinet/tcp_var.h
645
counters_inc(tcpcounters, c);
sys/netinet/tcp_var.h
650
tcpstat_add(enum tcpstat_counters c, uint64_t v)
sys/netinet/tcp_var.h
653
counters_add(tcpcounters, c, v);
sys/netinet/udp_var.h
121
udpstat_inc(enum udpstat_counters c)
sys/netinet/udp_var.h
123
counters_inc(udpcounters, c);
sys/netinet6/icmp6.c
152
enum icmp6stat_counters c = icp6s_ounknown;
sys/netinet6/icmp6.c
158
c = icp6s_odst_unreach_noroute;
sys/netinet6/icmp6.c
161
c = icp6s_odst_unreach_admin;
sys/netinet6/icmp6.c
164
c = icp6s_odst_unreach_beyondscope;
sys/netinet6/icmp6.c
167
c = icp6s_odst_unreach_addr;
sys/netinet6/icmp6.c
170
c = icp6s_odst_unreach_noport;
sys/netinet6/icmp6.c
175
c = icp6s_opacket_too_big;
sys/netinet6/icmp6.c
180
c = icp6s_otime_exceed_transit;
sys/netinet6/icmp6.c
183
c = icp6s_otime_exceed_reassembly;
sys/netinet6/icmp6.c
190
c = icp6s_oparamprob_header;
sys/netinet6/icmp6.c
193
c = icp6s_oparamprob_nextheader;
sys/netinet6/icmp6.c
196
c = icp6s_oparamprob_option;
sys/netinet6/icmp6.c
201
c = icp6s_oredirect;
sys/netinet6/icmp6.c
205
icmp6stat_inc(c);
sys/netinet6/in6_cksum.c
104
uint8_t c[2];
sys/netinet6/in6_cksum.c
175
s_util.c[0] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
208
s_util.c[1] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
214
s_util.c[0] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
235
s_util.c[1] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
251
s_util.c[0] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
284
s_util.c[1] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
290
s_util.c[0] = *(uint8_t *)w;
sys/netinet6/in6_cksum.c
299
s_util.c[1] = 0;
sys/netinet6/ip6_mroute.h
217
mrt6stat_inc(enum mrt6stat_counters c)
sys/netinet6/ip6_mroute.h
219
counters_inc(mrt6counters, c);
sys/netinet6/ip6_var.h
246
ip6stat_inc(enum ip6stat_counters c)
sys/netinet6/ip6_var.h
248
counters_inc(ip6counters, c);
sys/netinet6/ip6_var.h
252
ip6stat_add(enum ip6stat_counters c, uint64_t v)
sys/netinet6/ip6_var.h
254
counters_add(ip6counters, c, v);
sys/netinet6/raw_ip6.h
79
rip6stat_inc(enum rip6stat_counters c)
sys/netinet6/raw_ip6.h
81
counters_inc(rip6counters, c);
sys/ntfs/ntfs_conv.c
60
int c;
sys/ntfs/ntfs_conv.c
64
c = _utf_count[(s[0] >> 4) & 0xf];
sys/ntfs/ntfs_conv.c
65
if (c == 0) {
sys/ntfs/ntfs_conv.c
66
c = 1;
sys/ntfs/ntfs_conv.c
70
switch (c) {
sys/ntfs/ntfs_conv.c
88
*str = *str + c;
sys/scsi/ch.c
219
#define PLURAL(c) (c) == 1 ? "" : "s"
sys/scsi/ch.c
502
char c = voltag->vif[i];
sys/scsi/ch.c
503
if (c && c != ' ')
sys/scsi/ch.c
504
uvoltag->cv_volid[i] = c;
sys/stand/boot/cmd.c
37
#define CTRL(c) ((c)&0x1f)
sys/sys/_time.h
44
#define __CLOCK_TYPE(c) ((c) & 0xfff)
sys/sys/_time.h
45
#define __CLOCK_PTID(c) (((c) >> 12) & 0xfffff)
sys/sys/conf.h
106
#define dev_size_init(c,n) (c > 0 ? __CONCAT(n,size) : 0)
sys/sys/conf.h
112
#define bdev_disk_init(c,n) { \
sys/sys/conf.h
113
dev_init(c,n,open), dev_init(c,n,close), \
sys/sys/conf.h
114
dev_init(c,n,strategy), dev_init(c,n,ioctl), \
sys/sys/conf.h
115
dev_init(c,n,dump), dev_size_init(c,n), D_DISK }
sys/sys/conf.h
117
#define bdev_swap_init(c,n) { \
sys/sys/conf.h
119
dev_init(c,n,strategy), (dev_type_ioctl((*))) enodev, \
sys/sys/conf.h
169
#define cdev_disk_init(c,n) { \
sys/sys/conf.h
170
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
171
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
176
#define cdev_tape_init(c,n) { \
sys/sys/conf.h
177
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
178
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
183
#define cdev_tty_init(c,n) { \
sys/sys/conf.h
184
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
185
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
sys/sys/conf.h
186
dev_init(c,n,tty), (dev_type_mmap((*))) enodev, \
sys/sys/conf.h
190
#define cdev_mouse_init(c,n) { \
sys/sys/conf.h
191
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
192
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
194
(dev_type_mmap((*))) enodev , 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
203
#define cdev_cn_init(c,n) { \
sys/sys/conf.h
204
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
205
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
sys/sys/conf.h
207
D_TTY, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
210
#define cdev_ctty_init(c,n) { \
sys/sys/conf.h
211
dev_init(c,n,open), (dev_type_close((*))) nullop, dev_init(c,n,read), \
sys/sys/conf.h
212
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
sys/sys/conf.h
214
D_TTY, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
217
#define cdev_mm_init(c,n) { \
sys/sys/conf.h
218
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
219
dev_init(c,n,write), dev_init(c,n,ioctl), \
sys/sys/conf.h
220
(dev_type_stop((*))) enodev, 0, dev_init(c,n,mmap), \
sys/sys/conf.h
224
#define cdev_ptc_init(c,n) { \
sys/sys/conf.h
225
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
226
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
sys/sys/conf.h
227
dev_init(c,n,tty), (dev_type_mmap((*))) enodev, \
sys/sys/conf.h
228
D_TTY, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
231
#define cdev_ptm_init(c,n) { \
sys/sys/conf.h
232
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
233
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
237
#define cdev_log_init(c,n) { \
sys/sys/conf.h
238
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
239
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
241
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
244
#define cdev_fd_init(c,n) { \
sys/sys/conf.h
245
dev_init(c,n,open), (dev_type_close((*))) enodev, \
sys/sys/conf.h
251
#define cdev_tun_init(c,n) { \
sys/sys/conf.h
252
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
253
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
255
0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
258
#define cdev_vscsi_init(c,n) { \
sys/sys/conf.h
259
dev_init(c,n,open), dev_init(c,n,close), \
sys/sys/conf.h
261
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
263
0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
266
#define cdev_pppx_init(c,n) { \
sys/sys/conf.h
267
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
268
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
270
0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
273
#define cdev_bpf_init(c,n) { \
sys/sys/conf.h
274
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
275
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
277
0, D_CLONE, dev_init(c,n,kqfilter) }
sys/sys/conf.h
280
#define cdev_ch_init(c,n) { \
sys/sys/conf.h
281
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
282
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
287
#define cdev_uk_init(c,n) { \
sys/sys/conf.h
288
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
289
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
294
#define cdev_audio_init(c,n) { \
sys/sys/conf.h
295
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
296
dev_init(c,n,write), dev_init(c,n,ioctl), \
sys/sys/conf.h
298
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
301
#define cdev_midi_init(c,n) { \
sys/sys/conf.h
302
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
303
dev_init(c,n,write), dev_init(c,n,ioctl), \
sys/sys/conf.h
305
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
308
#define cdev_ksyms_init(c,n) { \
sys/sys/conf.h
309
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
315
#define cdev_kstat_init(c,n) { \
sys/sys/conf.h
316
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
317
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
322
#define cdev_wsdisplay_init(c,n) { \
sys/sys/conf.h
323
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
324
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
sys/sys/conf.h
325
dev_init(c,n,tty), dev_init(c,n,mmap), \
sys/sys/conf.h
326
D_TTY, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
329
#define cdev_random_init(c,n) { \
sys/sys/conf.h
330
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
331
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
333
0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
336
#define cdev_usb_init(c,n) { \
sys/sys/conf.h
337
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
338
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
343
#define cdev_ulpt_init(c,n) { \
sys/sys/conf.h
344
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
345
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
sys/sys/conf.h
349
#define cdev_pf_init(c,n) { \
sys/sys/conf.h
350
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
351
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
356
#define cdev_usbdev_init(c,n) { \
sys/sys/conf.h
357
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
358
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
360
dev_init(c,n,kqfilter) }
sys/sys/conf.h
363
#define cdev_fido_init(c,n) { \
sys/sys/conf.h
364
dev_init(c,n,open), dev_init(c,uhid,close), dev_init(c,uhid,read), \
sys/sys/conf.h
365
dev_init(c,uhid,write), dev_init(c,fido,ioctl), \
sys/sys/conf.h
367
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,uhid,kqfilter) }
sys/sys/conf.h
370
#define cdev_ujoy_init(c,n) { \
sys/sys/conf.h
371
dev_init(c,n,open), dev_init(c,uhid,close), dev_init(c,uhid,read), \
sys/sys/conf.h
372
dev_init(c,uhid,write), dev_init(c,ujoy,ioctl), \
sys/sys/conf.h
374
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,uhid,kqfilter) }
sys/sys/conf.h
377
#define cdev_pci_init(c,n) { \
sys/sys/conf.h
378
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
379
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
384
#define cdev_radio_init(c,n) { \
sys/sys/conf.h
385
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
386
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
391
#define cdev_video_init(c,n) { \
sys/sys/conf.h
392
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
393
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
395
dev_init(c,n,mmap), 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
398
#define cdev_spkr_init(c,n) { \
sys/sys/conf.h
399
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
400
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
sys/sys/conf.h
405
#define cdev_lpt_init(c,n) { \
sys/sys/conf.h
406
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
407
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
sys/sys/conf.h
412
#define cdev_bktr_init(c, n) { \
sys/sys/conf.h
413
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
414
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
415
(dev_type_stop((*))) enodev, 0, dev_init(c,n,mmap), \
sys/sys/conf.h
419
#define cdev_hotplug_init(c,n) { \
sys/sys/conf.h
420
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
421
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
423
(dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) }
sys/sys/conf.h
426
#define cdev_gpio_init(c,n) { \
sys/sys/conf.h
427
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
428
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
433
#define cdev_bio_init(c,n) { \
sys/sys/conf.h
434
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
435
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
440
#define cdev_drm_init(c,n) { \
sys/sys/conf.h
441
dev_init(c,n,open), dev_init(c,n,close), dev_init(c, n, read), \
sys/sys/conf.h
442
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
444
dev_init(c,n,mmap), 0, D_CLONE, dev_init(c,n,kqfilter) }
sys/sys/conf.h
447
#define cdev_amdmsr_init(c,n) { \
sys/sys/conf.h
448
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
449
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
454
#define cdev_fuse_init(c,n) { \
sys/sys/conf.h
455
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
456
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
sys/sys/conf.h
458
(dev_type_mmap((*))) enodev, 0, D_CLONE, dev_init(c,n,kqfilter) }
sys/sys/conf.h
461
#define cdev_pvbus_init(c,n) { \
sys/sys/conf.h
462
dev_init(c,n,open), dev_init(c,n,close), \
sys/sys/conf.h
465
dev_init(c,n,ioctl), \
sys/sys/conf.h
470
#define cdev_ipmi_init(c,n) { \
sys/sys/conf.h
471
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
472
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
477
#define cdev_efi_init(c,n) { \
sys/sys/conf.h
478
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
479
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
484
#define cdev_kcov_init(c,n) { \
sys/sys/conf.h
485
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
sys/sys/conf.h
486
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
488
(dev_init(c,n,mmap)), 0, D_CLONE }
sys/sys/conf.h
491
#define cdev_dt_init(c,n) { \
sys/sys/conf.h
492
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
sys/sys/conf.h
493
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
sys/sys/conf.h
511
int (*l_rint)(int c, struct tty *tp);
sys/sys/conf.h
74
#define dev_init(c,n,t) \
sys/sys/conf.h
75
((c) > 0 ? __CONCAT(n,t) : (__CONCAT(dev_type_,t)((*))) enxio)
sys/sys/core.h
46
#define CORE_GETMAGIC(c) ( ntohl(((c).c_midmag)) & 0xffff )
sys/sys/core.h
47
#define CORE_GETMID(c) ( (ntohl(((c).c_midmag)) >> 16) & 0x03ff )
sys/sys/core.h
48
#define CORE_GETFLAG(c) ( (ntohl(((c).c_midmag)) >> 26) & 0x03f )
sys/sys/core.h
49
#define CORE_SETMAGIC(c,mag,mid,flag) ( (c).c_midmag = htonl ( \
sys/sys/event.h
47
#define EV_SET(kevp, a, b, c, d, e, f) do { \
sys/sys/event.h
51
(__kevp)->flags = (c); \
sys/sys/ktrace.h
240
#define ktrfds(p, s, c) \
sys/sys/ktrace.h
241
ktrstruct(p, "fds", s, (c) * sizeof(int))
sys/sys/ktrace.h
246
#define ktriovec(p, s, c) \
sys/sys/ktrace.h
247
ktrstruct(p, "iovec", s, (c) * sizeof(struct iovec))
sys/sys/ktrace.h
250
#define ktrevent(p, s, c) \
sys/sys/ktrace.h
251
ktrstruct(p, "kevent", s, (c) * sizeof(struct kevent))
sys/sys/ktrace.h
256
#define ktrpollfd(p, s, c) \
sys/sys/ktrace.h
257
ktrstruct(p, "pollfd", s, (c) * sizeof(struct pollfd))
sys/sys/mbuf.h
479
mbstat_inc(enum mbstat_counters c)
sys/sys/mbuf.h
482
counters_inc(mbstat, c);
sys/sys/msgbuf.h
57
void msgbuf_putchar(struct msgbuf *, const char c);
sys/sys/percpu.h
123
ref->c = cpumem_enter(cm);
sys/sys/percpu.h
125
ref->g = ++(*ref->c); /* make the generation number odd */
sys/sys/percpu.h
127
return (ref->c + 1);
sys/sys/percpu.h
129
return (ref->c);
sys/sys/percpu.h
138
(*ref->c) = ++ref->g; /* make the generation number even again */
sys/sys/percpu.h
140
cpumem_leave(cm, ref->c);
sys/sys/percpu.h
144
counters_inc(struct cpumem *cm, unsigned int c)
sys/sys/percpu.h
150
counters[c]++;
sys/sys/percpu.h
155
counters_dec(struct cpumem *cm, unsigned int c)
sys/sys/percpu.h
161
counters[c]--;
sys/sys/percpu.h
166
counters_add(struct cpumem *cm, unsigned int c, uint64_t v)
sys/sys/percpu.h
172
counters[c] += v;
sys/sys/percpu.h
177
counters_pkt(struct cpumem *cm, unsigned int c, unsigned int b, uint64_t v)
sys/sys/percpu.h
183
counters[c]++;
sys/sys/percpu.h
44
uint64_t *c;
sys/sys/srp.h
181
struct _type *c, *n; \
sys/sys/srp.h
184
while ((c = srp_get_locked(ref)) != (_e)) \
sys/sys/srp.h
185
ref = &c->_ENTRY.se_next; \
sys/sys/srp.h
187
n = SRPL_NEXT_LOCKED(c, _ENTRY); \
sys/sys/srp.h
191
srp_update_locked(&(_rc)->srpl_gc, &c->_ENTRY.se_next, NULL); \
sys/sys/systm.h
273
cond_signal(struct cond *c)
sys/sys/systm.h
275
cond_signal_handler(c);
sys/sys/systm.h
285
#define wakeup_one(c) wakeup_n((c), 1)
sys/sys/systm.h
406
#define memset(b, c, n) __builtin_memset((b), (c), (n))
sys/sys/termios.h
84
#define CCEQ(val, c) (c == val ? val != _POSIX_VDISABLE : 0)
sys/sys/tty.h
260
u_char *firstc(struct clist *clp, int *c, int *cc);
sys/sys/tty.h
261
u_char *nextc(struct clist *q, u_char *cp, int *c, int *cc);
sys/sys/tty.h
262
int putc(int c, struct clist *q);
sys/sys/tty.h
267
int tputchar(int c, struct tty *tp);
sys/sys/tty.h
284
int ttyinput(int c, struct tty *tp);
sys/sys/tty.h
288
int ttyoutput(int c, struct tty *tp);
sys/sys/tty.h
291
int ttyrub(int c, struct tty *tp);
sys/sys/tty.h
315
int pppinput(int c, struct tty *);
sys/sys/uio.h
97
int ureadc(int c, struct uio *);
sys/sys/videoio.h
3718
#define v4l2_fourcc(a, b, c, d)\
sys/sys/videoio.h
3719
((u_int32_t)(a) | ((u_int32_t)(b) << 8) | ((u_int32_t)(c) << 16) | ((u_int32_t)(d) << 24))
sys/sys/videoio.h
3720
#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31))
sys/sys/videoio.h
4902
struct v4l2_rect c;
sys/sys/videoio.h
4953
struct v4l2_rect c;
sys/ufs/ffs/fs.h
468
#define cgbase(fs, c) ((daddr_t)(fs)->fs_fpg * (c))
sys/ufs/ffs/fs.h
469
#define cgdata(fs, c) (cgdmin(fs, c) + (fs)->fs_minfree) /* data zone */
sys/ufs/ffs/fs.h
470
#define cgmeta(fs, c) (cgdmin(fs, c)) /* meta data */
sys/ufs/ffs/fs.h
471
#define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */
sys/ufs/ffs/fs.h
472
#define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */
sys/ufs/ffs/fs.h
473
#define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */
sys/ufs/ffs/fs.h
474
#define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */
sys/ufs/ffs/fs.h
475
#define cgstart(fs, c) \
sys/ufs/ffs/fs.h
476
(cgbase(fs, c) + (fs)->fs_cgoffset * ((c) & ~((fs)->fs_cgmask)))
sys/ufs/ufs/quota.h
128
#define ufs_quota_alloc_blocks(i, c, cr) ufs_quota_alloc_blocks2(i, c, cr, 0)
sys/ufs/ufs/quota.h
129
#define ufs_quota_free_blocks(i, c, cr) ufs_quota_free_blocks2(i, c, cr, 0)
sys/uvm/uvm_map.c
3977
int c;
sys/uvm/uvm_map.c
3980
c = atomic_dec_int_nv(&map->ref_count);
sys/uvm/uvm_map.c
3981
if (c > 0) {
usr.bin/arch/arch.c
41
int short_form = 0, c;
usr.bin/arch/arch.c
53
while ((c = getopt(argc, argv, opts)) != -1) {
usr.bin/arch/arch.c
54
switch (c) {
usr.bin/aucat/aucat.c
1327
int n_flag, c;
usr.bin/aucat/aucat.c
1352
while ((c = getopt(argc, argv,
usr.bin/aucat/aucat.c
1354
switch (c) {
usr.bin/aucat/aucat.c
866
unsigned char c;
usr.bin/aucat/aucat.c
869
c = *idata++;
usr.bin/aucat/aucat.c
870
if (c >= 0xf8) {
usr.bin/aucat/aucat.c
872
} else if (c == SYSEX_END) {
usr.bin/aucat/aucat.c
874
dev_msg[dev_midx++] = c;
usr.bin/aucat/aucat.c
879
} else if (c >= 0xf0) {
usr.bin/aucat/aucat.c
880
dev_msg[0] = c;
usr.bin/aucat/aucat.c
881
dev_mlen = common_len[c & 7];
usr.bin/aucat/aucat.c
882
dev_mst = c;
usr.bin/aucat/aucat.c
884
} else if (c >= 0x80) {
usr.bin/aucat/aucat.c
885
dev_msg[0] = c;
usr.bin/aucat/aucat.c
886
dev_mlen = voice_len[(c >> 4) & 7];
usr.bin/aucat/aucat.c
887
dev_mst = c;
usr.bin/aucat/aucat.c
892
dev_msg[dev_midx++] = c;
usr.bin/aucat/dsp.c
236
#define IS_SEP(c) \
usr.bin/aucat/dsp.c
237
(((c) < 'a' || (c) > 'z') && \
usr.bin/aucat/dsp.c
238
((c) < 'A' || (c) > 'Z') && \
usr.bin/aucat/dsp.c
239
((c) < '0' || (c) > '9'))
usr.bin/aucat/dsp.c
383
unsigned int c;
usr.bin/aucat/dsp.c
417
for (c = nch; c > 0; c--) {
usr.bin/aucat/dsp.c
427
for (c = 0; c < nch; c++)
usr.bin/aucat/dsp.c
428
f[c] = 0;
usr.bin/aucat/dsp.c
440
for (c = 0; c < nch; c++) {
usr.bin/aucat/dsp.c
441
f[c] += (int64_t)ctx[n] * s;
usr.bin/aucat/dsp.c
448
for (c = 0; c < nch; c++) {
usr.bin/aucat/dsp.c
449
s = f[c] >> RESAMP_BITS;
usr.bin/audioctl/audioctl.c
279
int c;
usr.bin/audioctl/audioctl.c
281
while ((c = getopt(argc, argv, "anf:qw:")) != -1) {
usr.bin/audioctl/audioctl.c
282
switch (c) {
usr.bin/awk/b.c
1112
int (xisblank)(int c)
usr.bin/awk/b.c
1114
return c==' ' || c=='\t';
usr.bin/awk/b.c
1258
int c, n;
usr.bin/awk/b.c
1279
switch (c = *prestr++) {
usr.bin/awk/b.c
1288
return c;
usr.bin/awk/b.c
1291
return c;
usr.bin/awk/b.c
1295
return c;
usr.bin/awk/b.c
1298
rlxval = c;
usr.bin/awk/b.c
1304
rlxval = c;
usr.bin/awk/b.c
1325
if ((c = *prestr++) == '\\') {
usr.bin/awk/b.c
1327
if ((c = *prestr++) == '\0')
usr.bin/awk/b.c
1329
*bp++ = c;
usr.bin/awk/b.c
1332
} else if (c == '[' && *prestr == ':') {
usr.bin/awk/b.c
1363
*bp++ = c;
usr.bin/awk/b.c
1364
} else if (c == '[' && *prestr == '.') {
usr.bin/awk/b.c
1381
} else if (c == '[' && *prestr == '=') {
usr.bin/awk/b.c
1398
} else if (c == '\0') {
usr.bin/awk/b.c
1401
*bp++ = c;
usr.bin/awk/b.c
1402
} else if (c == ']') {
usr.bin/awk/b.c
1410
*bp++ = c;
usr.bin/awk/b.c
1422
rlxval = c;
usr.bin/awk/b.c
1426
if ((c = *prestr++) == '}') {
usr.bin/awk/b.c
1462
} else if (c == '\0') {
usr.bin/awk/b.c
1465
} else if (isdigit(c)) {
usr.bin/awk/b.c
1466
num = 10 * num + c - '0';
usr.bin/awk/b.c
1471
} else if (c == ',') {
usr.bin/awk/b.c
1489
int cgoto(fa *f, int s, int c)
usr.bin/awk/b.c
1506
if ((k == CHAR && c == ptoi(f->re[p[i]].lval.np))
usr.bin/awk/b.c
1507
|| (k == DOT && c != 0 && c != HAT)
usr.bin/awk/b.c
1508
|| (k == ALL && c != 0)
usr.bin/awk/b.c
1509
|| (k == EMPTYRE && c != 0)
usr.bin/awk/b.c
1510
|| (k == CCL && member(c, (int *) f->re[p[i]].lval.rp))
usr.bin/awk/b.c
1511
|| (k == NCCL && !member(c, (int *) f->re[p[i]].lval.rp) && c != 0 && c != HAT)) {
usr.bin/awk/b.c
1542
if (c != HAT)
usr.bin/awk/b.c
1543
set_gototab(f, s, c, i);
usr.bin/awk/b.c
1556
if (c != HAT)
usr.bin/awk/b.c
1557
set_gototab(f, s, c, f->curstat);
usr.bin/awk/b.c
365
#define isoctdigit(c) ((c) >= '0' && (c) <= '7') /* multiple use of arg */
usr.bin/awk/b.c
371
int c;
usr.bin/awk/b.c
375
switch ((c = *p++)) {
usr.bin/awk/b.c
377
c = '\t';
usr.bin/awk/b.c
380
c = '\n';
usr.bin/awk/b.c
383
c = '\f';
usr.bin/awk/b.c
386
c = '\r';
usr.bin/awk/b.c
389
c = '\b';
usr.bin/awk/b.c
392
c = '\v';
usr.bin/awk/b.c
395
c = '\a';
usr.bin/awk/b.c
398
c = '\\';
usr.bin/awk/b.c
401
c = hexstr(&p, 2); /* this adds a null if number is invalid */
usr.bin/awk/b.c
404
c = hexstr(&p, 8);
usr.bin/awk/b.c
407
if (isoctdigit(c)) { /* \d \dd \ddd */
usr.bin/awk/b.c
408
int n = c - '0';
usr.bin/awk/b.c
414
c = n;
usr.bin/awk/b.c
419
return c;
usr.bin/awk/b.c
424
int i, c, c2;
usr.bin/awk/b.c
435
n = u8_rune(&c, (const char *) p);
usr.bin/awk/b.c
437
if (c == '\\') {
usr.bin/awk/b.c
438
c = quoted(&p);
usr.bin/awk/b.c
439
} else if (c == '-' && i > 0 && bp[-1] != 0) {
usr.bin/awk/b.c
441
c = bp[-1];
usr.bin/awk/b.c
447
if (c > c2) { /* empty; ignore */
usr.bin/awk/b.c
452
while (c < c2) {
usr.bin/awk/b.c
460
*bp++ = ++c;
usr.bin/awk/b.c
473
*bp++ = c;
usr.bin/awk/b.c
605
int member(int c, int *sarg) /* is c in s? */
usr.bin/awk/b.c
610
if (c == *s++)
usr.bin/awk/b.c
868
int c, n, ns, s;
usr.bin/awk/b.c
907
*k++ = (c = getc(f)) != EOF ? c : 0;
usr.bin/awk/b.c
908
if (c == EOF) {
usr.bin/awk/b.c
916
j += u8_rune(&c, j);
usr.bin/awk/b.c
918
if ((ns = get_gototab(pfa, s, c)) != 0)
usr.bin/awk/b.c
921
s = cgoto(pfa, s, c);
usr.bin/awk/b.c
926
if (c == 0) /* don't count $ */
usr.bin/awk/b.c
930
if (c && s != 1)
usr.bin/awk/b.c
936
i += u8_rune(&c, i);
usr.bin/awk/b.c
937
if (c == 0)
usr.bin/awk/lex.c
107
int c = input();
usr.bin/awk/lex.c
108
unput(c);
usr.bin/awk/lex.c
109
return c;
usr.bin/awk/lex.c
114
int c, retc;
usr.bin/awk/lex.c
119
c = input();
usr.bin/awk/lex.c
120
if (c == 0)
usr.bin/awk/lex.c
122
buf[0] = c;
usr.bin/awk/lex.c
124
if (!isalnum(c) && c != '.' && c != '_')
usr.bin/awk/lex.c
125
return c;
usr.bin/awk/lex.c
127
*bp++ = c;
usr.bin/awk/lex.c
128
if (isalpha(c) || c == '_') { /* it's a varname */
usr.bin/awk/lex.c
129
for ( ; (c = input()) != 0; ) {
usr.bin/awk/lex.c
133
if (isalnum(c) || c == '_')
usr.bin/awk/lex.c
134
*bp++ = c;
usr.bin/awk/lex.c
137
unput(c);
usr.bin/awk/lex.c
146
for ( ; (c = input()) != 0; ) {
usr.bin/awk/lex.c
150
if (isdigit(c) || c == 'e' || c == 'E'
usr.bin/awk/lex.c
151
|| c == '.' || c == '+' || c == '-')
usr.bin/awk/lex.c
152
*bp++ = c;
usr.bin/awk/lex.c
154
unput(c);
usr.bin/awk/lex.c
183
int c;
usr.bin/awk/lex.c
198
c = gettok(&buf, &bufsize);
usr.bin/awk/lex.c
199
if (c == 0)
usr.bin/awk/lex.c
201
if (isalpha(c) || c == '_')
usr.bin/awk/lex.c
203
if (isdigit(c)) {
usr.bin/awk/lex.c
216
yylval.i = c;
usr.bin/awk/lex.c
217
switch (c) {
usr.bin/awk/lex.c
226
while ((c = input()) != '\n' && c != 0)
usr.bin/awk/lex.c
228
unput(c);
usr.bin/awk/lex.c
240
RET(c);
usr.bin/awk/lex.c
324
c = gettok(&buf, &bufsize);
usr.bin/awk/lex.c
325
if (isalpha(c)) {
usr.bin/awk/lex.c
330
c = peek();
usr.bin/awk/lex.c
331
if (c == '(' || c == '[' || (infunc && isarg(buf) >= 0)) {
usr.bin/awk/lex.c
337
} else if (c == 0) { /* */
usr.bin/awk/lex.c
372
RET(c);
usr.bin/awk/lex.c
379
int c, n;
usr.bin/awk/lex.c
386
for (bp = buf; (c = input()) != '"'; ) {
usr.bin/awk/lex.c
389
switch (c) {
usr.bin/awk/lex.c
395
if (c == 0) /* hopeless */
usr.bin/awk/lex.c
400
c = input();
usr.bin/awk/lex.c
401
switch (c) {
usr.bin/awk/lex.c
415
n = c - '0';
usr.bin/awk/lex.c
416
if ((c = peek()) >= '0' && c < '8') {
usr.bin/awk/lex.c
418
if ((c = peek()) >= '0' && c < '8')
usr.bin/awk/lex.c
429
unput(c);
usr.bin/awk/lex.c
434
c = input();
usr.bin/awk/lex.c
435
if (c == 0)
usr.bin/awk/lex.c
437
if (isxdigit(c)) {
usr.bin/awk/lex.c
438
c = tolower(c);
usr.bin/awk/lex.c
440
if (isdigit(c))
usr.bin/awk/lex.c
441
n += (c - '0');
usr.bin/awk/lex.c
443
n += 10 + (c - 'a');
usr.bin/awk/lex.c
445
unput(c);
usr.bin/awk/lex.c
460
c = input();
usr.bin/awk/lex.c
461
if (!isxdigit(c) || c == 0)
usr.bin/awk/lex.c
463
c = tolower(c);
usr.bin/awk/lex.c
465
if (isdigit(c))
usr.bin/awk/lex.c
466
n += (c - '0');
usr.bin/awk/lex.c
468
n += 10 + (c - 'a');
usr.bin/awk/lex.c
470
unput(c);
usr.bin/awk/lex.c
476
*bp++ = c;
usr.bin/awk/lex.c
481
*bp++ = c;
usr.bin/awk/lex.c
515
int c, n;
usr.bin/awk/lex.c
541
c = peek(); /* look for '(' */
usr.bin/awk/lex.c
542
if (c != '(' && infunc && (n=isarg(w)) >= 0) {
usr.bin/awk/lex.c
547
if (c == '(') {
usr.bin/awk/lex.c
562
int c, openclass = 0;
usr.bin/awk/lex.c
570
for ( ; ((c = input()) != '/' || openclass > 0) && c != 0; ) {
usr.bin/awk/lex.c
573
if (c == '\n') {
usr.bin/awk/lex.c
578
} else if (c == '\\') {
usr.bin/awk/lex.c
588
if (c == '[') {
usr.bin/awk/lex.c
595
} else if (c == ']' && openclass > 0) {
usr.bin/awk/lex.c
605
*bp++ = c;
usr.bin/awk/lex.c
609
if (c == 0)
usr.bin/awk/lex.c
626
int c;
usr.bin/awk/lex.c
630
c = (uschar)*--yysptr;
usr.bin/awk/lex.c
632
if ((c = (uschar)*lexprog) != 0)
usr.bin/awk/lex.c
635
c = pgetc();
usr.bin/awk/lex.c
636
if (c == EOF)
usr.bin/awk/lex.c
637
c = 0;
usr.bin/awk/lex.c
640
*ep = c;
usr.bin/awk/lex.c
641
if (c != 0) {
usr.bin/awk/lex.c
644
return (c);
usr.bin/awk/lex.c
647
void unput(int c) /* put lexical character back on input */
usr.bin/awk/lex.c
651
*yysptr++ = c;
usr.bin/awk/lib.c
141
int c;
usr.bin/awk/lib.c
176
c = readrec(&buf, &bufsize, infile, innew);
usr.bin/awk/lib.c
179
if (c != 0 || buf[0] != '\0') { /* normal record */
usr.bin/awk/lib.c
225
int sep, c, isrec; // POTENTIAL BUG? isrec is a macro in awk.h
usr.bin/awk/lib.c
231
c = readcsvrec(&buf, &bufsize, inf, newflag);
usr.bin/awk/lib.c
232
isrec = (c == EOF && rr == buf) ? false : true;
usr.bin/awk/lib.c
252
while ((c=getc(inf)) == '\n' && c != EOF) /* skip leading \n's */
usr.bin/awk/lib.c
254
if (c != EOF)
usr.bin/awk/lib.c
255
ungetc(c, inf);
usr.bin/awk/lib.c
258
for (; (c=getc(inf)) != sep && c != EOF; ) {
usr.bin/awk/lib.c
263
*rr++ = c;
usr.bin/awk/lib.c
265
if (*rs == sep || c == EOF)
usr.bin/awk/lib.c
267
if ((c = getc(inf)) == '\n' || c == EOF) /* 2 in a row */
usr.bin/awk/lib.c
273
*rr++ = c;
usr.bin/awk/lib.c
278
isrec = (c == EOF && rr == buf) ? false : true;
usr.bin/awk/lib.c
296
int sep, c;
usr.bin/awk/lib.c
303
while ((c = getc(inf)) != EOF) {
usr.bin/awk/lib.c
304
if (c == sep) {
usr.bin/awk/lib.c
315
*rr++ = c;
usr.bin/awk/lib.c
316
if (c == '"')
usr.bin/awk/lib.c
319
if (c == '\n' && rr > buf && rr[-1] == '\r') // remove \r if was \r\n
usr.bin/awk/lib.c
327
DPRINTF("readcsvrec saw <%s>, returns %d\n", buf, c);
usr.bin/awk/lib.c
328
return c;
usr.bin/awk/lib.c
705
int c;
usr.bin/awk/lib.c
710
while ((c = input()) != EOF && c != '\0')
usr.bin/awk/lib.c
711
bclass(c);
usr.bin/awk/lib.c
784
int c;
usr.bin/awk/lib.c
809
while ((c = input()) != '\n' && c != '\0' && c != EOF) {
usr.bin/awk/lib.c
810
putc(c, stderr);
usr.bin/awk/lib.c
811
bclass(c);
usr.bin/awk/lib.c
817
void bclass(int c)
usr.bin/awk/lib.c
819
switch (c) {
usr.bin/awk/main.c
309
int c;
usr.bin/awk/main.c
321
if ((c = getc(yyin)) != EOF)
usr.bin/awk/main.c
322
return c;
usr.bin/awk/maketab.c
120
char c;
usr.bin/awk/maketab.c
142
n = sscanf(buf, "%1c %199s %199s %d", &c, def, name,
usr.bin/awk/maketab.c
144
if (n == 4 && c == '#' && strcmp(def, "define") == 0) {
usr.bin/awk/parse.c
104
x->narg[1] = c;
usr.bin/awk/parse.c
120
Node *stat2(int a, Node *b, Node *c)
usr.bin/awk/parse.c
124
x = node2(a,b,c);
usr.bin/awk/parse.c
129
Node *stat3(int a, Node *b, Node *c, Node *d)
usr.bin/awk/parse.c
133
x = node3(a,b,c,d);
usr.bin/awk/parse.c
138
Node *stat4(int a, Node *b, Node *c, Node *d, Node *e)
usr.bin/awk/parse.c
142
x = node4(a,b,c,d,e);
usr.bin/awk/parse.c
156
Node *op2(int a, Node *b, Node *c)
usr.bin/awk/parse.c
160
x = node2(a,b,c);
usr.bin/awk/parse.c
165
Node *op3(int a, Node *b, Node *c, Node *d)
usr.bin/awk/parse.c
169
x = node3(a,b,c,d);
usr.bin/awk/parse.c
174
Node *op4(int a, Node *b, Node *c, Node *d, Node *e)
usr.bin/awk/parse.c
178
x = node4(a,b,c,d,e);
usr.bin/awk/parse.c
183
Node *op5(int a, Node *b, Node *c, Node *d, Node *e, Node *f)
usr.bin/awk/parse.c
187
x = node5(a,b,c,d,e,f);
usr.bin/awk/parse.c
230
Node *pa2stat(Node *a, Node *b, Node *c) /* pat, pat {...} */
usr.bin/awk/parse.c
234
x = node4(PASTAT2, a, b, c, itonp(paircnt));
usr.bin/awk/parse.c
243
Node *c;
usr.bin/awk/parse.c
251
for (c = a; c->nnext != NULL; c = c->nnext)
usr.bin/awk/parse.c
253
c->nnext = b;
usr.bin/awk/parse.c
61
Node *node2(int a, Node *b, Node *c)
usr.bin/awk/parse.c
68
x->narg[1] = c;
usr.bin/awk/parse.c
72
Node *node3(int a, Node *b, Node *c, Node *d)
usr.bin/awk/parse.c
79
x->narg[1] = c;
usr.bin/awk/parse.c
84
Node *node4(int a, Node *b, Node *c, Node *d, Node *e)
usr.bin/awk/parse.c
91
x->narg[1] = c;
usr.bin/awk/parse.c
97
Node *node5(int a, Node *b, Node *c, Node *d, Node *e, Node *f)
usr.bin/awk/proto.h
206
extern int runetochar(char *str, int c);
usr.bin/awk/run.c
1788
#define ISWS(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
usr.bin/awk/run.c
607
unsigned char c;
usr.bin/awk/run.c
609
c = s[0];
usr.bin/awk/run.c
610
if (c < 128 || awk_mb_cur_max == 1) {
usr.bin/awk/run.c
612
} else if (((c>>5) & 0x7) == 0x6 && (s[1] & 0xC0) == 0x80) {
usr.bin/awk/run.c
614
} else if (((c>>4) & 0xF) == 0xE && (s[1] & 0xC0) == 0x80
usr.bin/awk/run.c
617
} else if (((c>>3) & 0x1F) == 0x1E && (s[1] & 0xC0) == 0x80
usr.bin/awk/run.c
632
unsigned char c;
usr.bin/awk/run.c
634
c = s[0];
usr.bin/awk/run.c
635
if (c < 128 || awk_mb_cur_max == 1) {
usr.bin/awk/run.c
636
*rune = c;
usr.bin/awk/run.c
641
if (n >= 2 && ((c>>5) & 0x7) == 0x6 && (s[1] & 0xC0) == 0x80) {
usr.bin/awk/run.c
642
*rune = ((c & 0x1F) << 6) | (s[1] & 0x3F); /* 110xxxxx 10xxxxxx */
usr.bin/awk/run.c
644
} else if (n >= 3 && ((c>>4) & 0xF) == 0xE && (s[1] & 0xC0) == 0x80
usr.bin/awk/run.c
646
*rune = ((c & 0xF) << 12) | ((s[1] & 0x3F) << 6) | (s[2] & 0x3F);
usr.bin/awk/run.c
649
} else if (n >= 4 && ((c>>3) & 0x1F) == 0x1E && (s[1] & 0xC0) == 0x80
usr.bin/awk/run.c
651
*rune = ((c & 0x7) << 18) | ((s[1] & 0x3F) << 12) | ((s[2] & 0x3F) << 6) | (s[3] & 0x3F);
usr.bin/awk/run.c
655
*rune = c;
usr.bin/awk/run.c
676
unsigned char c;
usr.bin/awk/run.c
681
c = s[i];
usr.bin/awk/run.c
682
if (c < 128 || awk_mb_cur_max == 1) {
usr.bin/awk/run.c
758
int runetochar(char *str, int c)
usr.bin/awk/run.c
761
if (c <= Rune1) {
usr.bin/awk/run.c
762
str[0] = c;
usr.bin/awk/run.c
767
if (c <= Rune2) {
usr.bin/awk/run.c
768
str[0] = T2 | (c >> 1*Bitx);
usr.bin/awk/run.c
769
str[1] = Tx | (c & Maskx);
usr.bin/awk/run.c
774
if (c > Runemax)
usr.bin/awk/run.c
775
c = Runeerror;
usr.bin/awk/run.c
776
if (c <= Rune3) {
usr.bin/awk/run.c
777
str[0] = T3 | (c >> 2*Bitx);
usr.bin/awk/run.c
778
str[1] = Tx | ((c >> 1*Bitx) & Maskx);
usr.bin/awk/run.c
779
str[2] = Tx | (c & Maskx);
usr.bin/awk/run.c
784
str[0] = T4 | (c >> 3*Bitx);
usr.bin/awk/run.c
785
str[1] = Tx | ((c >> 2*Bitx) & Maskx);
usr.bin/awk/run.c
786
str[2] = Tx | ((c >> 1*Bitx) & Maskx);
usr.bin/awk/run.c
787
str[3] = Tx | (c & Maskx);
usr.bin/awk/tran.c
550
Cell *c;
usr.bin/awk/tran.c
567
c = setsymtab(newbuf, p, 0.0, CON|STR|DONTFREE, symtab);
usr.bin/awk/tran.c
570
return c;
usr.bin/awk/tran.c
575
int c, n;
usr.bin/awk/tran.c
581
for (bp = buf; (c = *s) != delim; s++) {
usr.bin/awk/tran.c
582
if (c == '\n')
usr.bin/awk/tran.c
584
else if (c != '\\')
usr.bin/awk/tran.c
585
*bp++ = c;
usr.bin/awk/tran.c
587
c = *++s;
usr.bin/awk/tran.c
588
if (c == 0) { /* \ at end */
usr.bin/awk/tran.c
592
switch (c) {
usr.bin/awk/tran.c
602
if (!isdigit(c)) {
usr.bin/awk/tran.c
603
*bp++ = c;
usr.bin/awk/tran.c
606
n = c - '0';
usr.bin/banner/banner.c
111
char outbuf[LINELEN+1], *sp, c, cc;
usr.bin/banner/banner.c
124
c = TRC(cc);
usr.bin/banner/banner.c
125
d = dropit(c);
usr.bin/banner/banner.c
130
strp = scnline(scnkey[(int)c][scnhgt-1-d], strp, cc);
usr.bin/banner/banner.c
65
scnline(int key, char *p, int c)
usr.bin/banner/banner.c
74
c = '#';
usr.bin/banner/banner.c
78
*p++ = key & 0200 ? c : BACKGND;
usr.bin/banner/banner.c
87
dropit(int c)
usr.bin/banner/banner.c
89
switch(c) {
usr.bin/bc/bc.y
116
#define ENCODE(c) ((c) < '[' ? (c) : (c) + 3);
usr.bin/bgplg/bgplg.c
158
u_int i, c = 1;
usr.bin/bgplg/bgplg.c
171
c++;
usr.bin/bgplg/bgplg.c
176
if ((argv = calloc(c + 1, sizeof(char *))) == NULL) {
usr.bin/bgplg/bgplg.c
181
argv[c] = NULL;
usr.bin/bgplg/bgplg.c
182
*argc = c;
usr.bin/bgplg/bgplg.c
185
for (i = c = 0; i < len; i++) {
usr.bin/bgplg/bgplg.c
189
argv[c++] = ptr;
usr.bin/bgplg/bgplg.c
200
int i, c = 0;
usr.bin/bgplg/bgplg.c
204
c++;
usr.bin/bgplg/bgplg.c
207
if ((new_argv = calloc(c + argc + 1, sizeof(char *))) == NULL) {
usr.bin/bgplg/bgplg.c
213
for (i = c = 0; cmdp->earg[i] != NULL; i++)
usr.bin/bgplg/bgplg.c
214
new_argv[c++] = cmdp->earg[i];
usr.bin/bgplg/bgplg.c
218
new_argv[c++] = argv[i];
usr.bin/bgplg/bgplg.c
220
new_argv[c] = NULL;
usr.bin/bgplg/bgplg.c
59
size_t i, c, len;
usr.bin/bgplg/bgplg.c
65
i = c = 0;
usr.bin/bgplg/bgplg.c
77
str[c++] = result;
usr.bin/bgplg/bgplg.c
80
str[c++] = '%';
usr.bin/bgplg/bgplg.c
86
if (c != i)
usr.bin/bgplg/bgplg.c
87
str[c] = str[i];
usr.bin/bgplg/bgplg.c
88
c++;
usr.bin/bgplg/bgplg.c
92
str[c] = 0x0;
usr.bin/bgplg/bgplgsh.c
105
if ((argv = calloc(c + 1, sizeof(char *))) == NULL) {
usr.bin/bgplg/bgplgsh.c
110
argv[c] = NULL;
usr.bin/bgplg/bgplgsh.c
111
*argc = c;
usr.bin/bgplg/bgplgsh.c
114
for (i = c = 0; i < len; i++) {
usr.bin/bgplg/bgplgsh.c
118
argv[c++] = ptr;
usr.bin/bgplg/bgplgsh.c
129
int i, c = 0, n;
usr.bin/bgplg/bgplgsh.c
136
c++;
usr.bin/bgplg/bgplgsh.c
139
if ((new_argv = calloc(c + n + 1, sizeof(char *))) == NULL) {
usr.bin/bgplg/bgplgsh.c
145
for (i = c = 0; cmdp->earg[i] != NULL; i++)
usr.bin/bgplg/bgplgsh.c
146
new_argv[c++] = cmdp->earg[i];
usr.bin/bgplg/bgplgsh.c
150
new_argv[c++] = argv[i];
usr.bin/bgplg/bgplgsh.c
152
new_argv[c] = NULL;
usr.bin/bgplg/bgplgsh.c
82
u_int i, c = 1;
usr.bin/bgplg/bgplgsh.c
98
c++;
usr.bin/cal/cal.c
273
int a, b, c, s, e, f, g, d, n;
usr.bin/cal/cal.c
277
c = (a-1)/4 - (a-1)/100 + (a-1)/400;
usr.bin/cal/cal.c
278
s = b - c;
usr.bin/calendar/paskha.c
39
int a, b, c, d, e;
usr.bin/calendar/paskha.c
46
c = R % 7;
usr.bin/calendar/paskha.c
48
e = (2*b + 4*c + 6*d + y) % 7;
usr.bin/cap_mkdb/cap_mkdb.c
76
int c;
usr.bin/cap_mkdb/cap_mkdb.c
82
while ((c = getopt(argc, argv, "f:iv")) != -1) {
usr.bin/cap_mkdb/cap_mkdb.c
83
switch(c) {
usr.bin/cdio/cdio.c
1536
struct cmdtab *c;
usr.bin/cdio/cdio.c
1566
for (c=cmdtab; c->name; ++c) {
usr.bin/cdio/cdio.c
1568
if (!strcasecmp(buf, c->name)) {
usr.bin/cdio/cdio.c
1569
*cmd = c->command;
usr.bin/cdio/cdio.c
1574
if (len >= c->min && ! strncasecmp(buf, c->name, len)) {
usr.bin/cdio/cdio.c
1575
if (*cmd != -1 && *cmd != c->command) {
usr.bin/cdio/cdio.c
1579
*cmd = c->command;
usr.bin/cdio/cdio.c
204
struct cmdtab *c;
usr.bin/cdio/cdio.c
208
for (c = cmdtab; c->name; ++c) {
usr.bin/cdio/cdio.c
209
if (!c->args)
usr.bin/cdio/cdio.c
212
for (i = c->min, s = c->name; *s; s++, i--) {
usr.bin/cdio/cdio.c
219
if (*c->args)
usr.bin/cdio/cdio.c
220
printf(" %s", c->args);
usr.bin/cdio/cdio.c
691
char c;
usr.bin/cdio/cdio.c
727
if (2 != sscanf(arg, "#%u%u%c", &blk, &len, &c) &&
usr.bin/cdio/cdio.c
728
1 != sscanf(arg, "#%u%c", &blk, &c)) {
usr.bin/cdio/cdio.c
748
if (4 == sscanf(arg, "%u.%u%u.%u%c", &tr1, &i1, &tr2, &i2, &c))
usr.bin/cdio/cdio.c
752
if (3 == sscanf(arg, "%u.%u%u%c", &tr1, &i1, &tr2, &c))
usr.bin/cdio/cdio.c
756
if (3 == sscanf(arg, "%u%u.%u%c", &tr1, &tr2, &i2, &c))
usr.bin/cdio/cdio.c
761
if (2 == sscanf(arg, "%u.%u%c", &tr1, &i1, &c))
usr.bin/cdio/cdio.c
765
if (2 == sscanf(arg, "%u%u%c", &tr1, &tr2, &c))
usr.bin/cdio/cdio.c
770
if (1 == sscanf(arg, "%u%c", &tr1, &c))
usr.bin/cdio/cdio.c
824
&tr1, &m1, &s1, &f1, &tr2, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
830
&tr1, &m1, &s1, &tr2, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
836
&tr1, &m1, &s1, &f1, &tr2, &m2, &s2, &c))
usr.bin/cdio/cdio.c
842
&m1, &s1, &f1, &tr2, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
848
&tr1, &m1, &s1, &f1, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
854
&m1, &s1, &tr2, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
860
&m1, &s1, &f1, &tr2, &m2, &s2, &c))
usr.bin/cdio/cdio.c
866
&m1, &s1, &f1, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
872
&tr1, &m1, &s1, &f1, &m2, &s2, &c))
usr.bin/cdio/cdio.c
878
&tr1, &m1, &s1, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
884
&tr1, &m1, &s1, &tr2, &m2, &s2, &c))
usr.bin/cdio/cdio.c
889
if (5 == sscanf(arg, "%u:%u%u%u:%u%c", &m1, &s1, &tr2, &m2, &s2, &c))
usr.bin/cdio/cdio.c
894
if (5 == sscanf(arg, "%u%u:%u%u:%u%c", &tr1, &m1, &s1, &m2, &s2, &c))
usr.bin/cdio/cdio.c
899
if (5 == sscanf(arg, "%u:%u%u:%u.%u%c", &m1, &s1, &m2, &s2, &f2, &c))
usr.bin/cdio/cdio.c
904
if (5 == sscanf(arg, "%u:%u.%u%u:%u%c", &m1, &s1, &f1, &m2, &s2, &c))
usr.bin/cdio/cdio.c
909
if (5 == sscanf(arg, "%u%u:%u.%u%u%c", &tr1, &m1, &s1, &f1, &tr2, &c))
usr.bin/cdio/cdio.c
914
if (4 == sscanf(arg, "%u:%u%u:%u%c", &m1, &s1, &m2, &s2, &c))
usr.bin/cdio/cdio.c
919
if (4 == sscanf(arg, "%u%u:%u.%u%c", &tr1, &m1, &s1, &f1, &c))
usr.bin/cdio/cdio.c
924
if (4 == sscanf(arg, "%u%u:%u%u%c", &tr1, &m1, &s1, &tr2, &c))
usr.bin/cdio/cdio.c
929
if (4 == sscanf(arg, "%u%u:%u%u%c", &m1, &s1, &f1, &tr2, &c))
usr.bin/cdio/cdio.c
934
if (3 == sscanf(arg, "%u:%u.%u%c", &m1, &s1, &f1, &c))
usr.bin/cdio/cdio.c
939
if (3 == sscanf(arg, "%u%u:%u%c", &tr1, &m1, &s1, &c))
usr.bin/cdio/cdio.c
944
if (3 == sscanf(arg, "%u:%u%u%c", &m1, &s1, &tr2, &c))
usr.bin/cdio/cdio.c
949
if (2 == sscanf(arg, "%u:%u%c", &m1, &s1, &c))
usr.bin/col/col.c
104
CHAR *c;
usr.bin/col/col.c
284
c = &l->l_line[l->l_line_len++];
usr.bin/col/col.c
285
c->c_char = ch;
usr.bin/col/col.c
286
c->c_set = cur_set;
usr.bin/col/col.c
287
c->c_column = cur_col;
usr.bin/col/col.c
385
CHAR *c, *endc;
usr.bin/col/col.c
411
for (i = nchars, c = l->l_line; i-- > 0; c++)
usr.bin/col/col.c
412
count[c->c_column]++;
usr.bin/col/col.c
424
for (i = nchars, c = l->l_line; i-- > 0; c++)
usr.bin/col/col.c
425
sorted[count[c->c_column]++] = *c;
usr.bin/col/col.c
426
c = sorted;
usr.bin/col/col.c
428
c = l->l_line;
usr.bin/col/col.c
430
this_col = c->c_column;
usr.bin/col/col.c
431
endc = c;
usr.bin/col/col.c
438
c = endc - 1;
usr.bin/col/col.c
460
if (c->c_set != last_set) {
usr.bin/col/col.c
461
switch (c->c_set) {
usr.bin/col/col.c
468
last_set = c->c_set;
usr.bin/col/col.c
470
PUTC(c->c_char);
usr.bin/col/col.c
471
if (++c >= endc)
usr.bin/compress/gzopen.c
187
int c;
usr.bin/compress/gzopen.c
192
c = get_byte(s);
usr.bin/compress/gzopen.c
193
if (c != gz_magic[len]) {
usr.bin/compress/gzopen.c
227
while ((c = get_byte(s)) != EOF) {
usr.bin/compress/gzopen.c
229
if (c == '\0')
usr.bin/compress/gzopen.c
232
*name++ = c;
usr.bin/compress/gzopen.c
239
while ((c = get_byte(s)) != EOF) {
usr.bin/compress/gzopen.c
241
if (c == '\0')
usr.bin/compress/zipopen.c
128
int c, got_mtime = 0;
usr.bin/compress/zipopen.c
175
if ((c = get_byte(s)) == EOF)
usr.bin/compress/zipopen.c
178
if (c == '\0')
usr.bin/compress/zipopen.c
181
*name++ = c;
usr.bin/compress/zipopen.c
209
if ((c = get_byte(s)) == EOF)
usr.bin/compress/zipopen.c
214
if (c & 1) {
usr.bin/compress/zopen.c
214
int c, disp;
usr.bin/compress/zopen.c
266
c = *bp++;
usr.bin/compress/zopen.c
268
zs->zs_fcode = (long)(((long)c << zs->zs_maxbits) +
usr.bin/compress/zopen.c
271
i = ((c << zs->zs_hshift) ^ zs->zs_ent);
usr.bin/compress/zopen.c
294
zs->zs_ent = c;
usr.bin/ctags/C.c
107
(void)skip_string(c);
usr.bin/ctags/C.c
117
skip_comment(c);
usr.bin/ctags/C.c
119
} else if (c == '/') {
usr.bin/ctags/C.c
120
skip_comment(c);
usr.bin/ctags/C.c
123
(void)ungetc(c, inf);
usr.bin/ctags/C.c
124
c = '/';
usr.bin/ctags/C.c
143
} while (iswhite(c));
usr.bin/ctags/C.c
144
if (c == '*')
usr.bin/ctags/C.c
147
ungetc(c, inf);
usr.bin/ctags/C.c
208
if (c == ' ' || c == '\t') {
usr.bin/ctags/C.c
209
int save = c;
usr.bin/ctags/C.c
210
while (GETC(!=, EOF) && (c == ' ' || c == '\t'))
usr.bin/ctags/C.c
212
if (c == EOF)
usr.bin/ctags/C.c
214
(void)ungetc(c, inf);
usr.bin/ctags/C.c
215
c = save;
usr.bin/ctags/C.c
217
storec: if (!intoken(c)) {
usr.bin/ctags/C.c
238
if (str_entry(c))
usr.bin/ctags/C.c
245
else if (sp != tok || begtoken(c)) {
usr.bin/ctags/C.c
250
*sp++ = c;
usr.bin/ctags/C.c
268
int c; /* current character */
usr.bin/ctags/C.c
280
switch (c) {
usr.bin/ctags/C.c
284
skip_string(c);
usr.bin/ctags/C.c
289
skip_comment(c);
usr.bin/ctags/C.c
290
else if (c == '/')
usr.bin/ctags/C.c
291
skip_comment(c);
usr.bin/ctags/C.c
313
while (GETC(!=, EOF) && iswhite(c))
usr.bin/ctags/C.c
314
if (c == '\n')
usr.bin/ctags/C.c
316
if (c == EOF)
usr.bin/ctags/C.c
323
if (intoken(c)) {
usr.bin/ctags/C.c
324
*anext++ = c;
usr.bin/ctags/C.c
328
if (intoken(c)) {
usr.bin/ctags/C.c
330
*anext++ = c;
usr.bin/ctags/C.c
337
(void)ungetc(c, inf);
usr.bin/ctags/C.c
343
if (intoken(c) || c == '{')
usr.bin/ctags/C.c
345
if (c == '/' && GETC(==, '*'))
usr.bin/ctags/C.c
346
skip_comment(c);
usr.bin/ctags/C.c
347
else if (c == '/')
usr.bin/ctags/C.c
348
skip_comment(c);
usr.bin/ctags/C.c
350
(void)ungetc(c, inf);
usr.bin/ctags/C.c
354
if (c != '{')
usr.bin/ctags/C.c
366
int c; /* character read */
usr.bin/ctags/C.c
375
while (GETC(!=, EOF) && (c == ' ' || c == '\t'))
usr.bin/ctags/C.c
377
(void)ungetc(c, inf);
usr.bin/ctags/C.c
383
if (iswhite(c))
usr.bin/ctags/C.c
389
*sp++ = c;
usr.bin/ctags/C.c
397
if (!iswhite(c))
usr.bin/ctags/C.c
405
*sp++ = c;
usr.bin/ctags/C.c
412
if (!intoken(c))
usr.bin/ctags/C.c
416
if (dflag || c == '(') { /* only want macros */
usr.bin/ctags/C.c
420
skip: if (c == '\n') { /* get rid of rest of define */
usr.bin/ctags/C.c
433
str_entry(int c)
usr.bin/ctags/C.c
440
while (iswhite(c))
usr.bin/ctags/C.c
443
if (c == '{') /* it was "struct {" */
usr.bin/ctags/C.c
450
*sp++ = c;
usr.bin/ctags/C.c
453
if (!intoken(c))
usr.bin/ctags/C.c
456
switch (c) {
usr.bin/ctags/C.c
465
if (!iswhite(c))
usr.bin/ctags/C.c
467
if (c != '{') {
usr.bin/ctags/C.c
468
(void)ungetc(c, inf);
usr.bin/ctags/C.c
484
int c; /* character read */
usr.bin/ctags/C.c
488
switch(c) {
usr.bin/ctags/C.c
502
ungetc(c, inf);
usr.bin/ctags/C.c
51
int c; /* current character */
usr.bin/ctags/C.c
520
int c,
usr.bin/ctags/C.c
524
switch (c) {
usr.bin/ctags/C.c
532
if (c == key && !skip)
usr.bin/ctags/C.c
545
int c,
usr.bin/ctags/C.c
550
switch(c) {
usr.bin/ctags/C.c
561
skip_string(c);
usr.bin/ctags/C.c
566
skip_comment(c);
usr.bin/ctags/C.c
568
} else if (c == '/') {
usr.bin/ctags/C.c
569
skip_comment(c);
usr.bin/ctags/C.c
572
(void)ungetc(c, inf);
usr.bin/ctags/C.c
573
c = '/';
usr.bin/ctags/C.c
580
if (c == key && !skip)
usr.bin/ctags/C.c
62
switch (c) {
usr.bin/ctags/ctags.c
196
int c;
usr.bin/ctags/ctags.c
201
if (!iswhite(c)) {
usr.bin/ctags/ctags.c
207
/* lisp */ if (strchr(LISPCHR, c)) {
usr.bin/ctags/ctags.h
45
#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
usr.bin/ctags/print.c
50
int c;
usr.bin/ctags/print.c
57
for (cp = lbuf; GETC(!=, EOF) && c != '\n'; *cp++ = c)
usr.bin/ctags/print.c
65
if (c == '\\') { /* backslashes */
usr.bin/ctags/print.c
71
else if (c == (int)searchar) { /* search character */
usr.bin/ctags/print.c
74
*cp++ = '\\'; *cp++ = c;
usr.bin/ctags/print.c
77
else if (c == '\n') { /* end of keep */
usr.bin/ctags/print.c
82
*cp++ = c;
usr.bin/ctags/yacc.c
103
if (c == ':') {
usr.bin/ctags/yacc.c
108
(void)ungetc(c, inf);
usr.bin/ctags/yacc.c
119
int c; /* read character */
usr.bin/ctags/yacc.c
130
switch (c) {
usr.bin/ctags/yacc.c
47
int c;
usr.bin/ctags/yacc.c
55
switch (c) {
usr.bin/ctags/yacc.c
70
if (skip_key(c))
usr.bin/ctags/yacc.c
76
(void)ungetc(c, inf);
usr.bin/ctags/yacc.c
82
(void)ungetc(c, inf);
usr.bin/ctags/yacc.c
89
if (in_rule || (!isalpha(c) && c != '.' && c != '_'))
usr.bin/ctags/yacc.c
92
*sp++ = c;
usr.bin/ctags/yacc.c
93
while (GETC(!=, EOF) && (intoken(c) || c == '.'))
usr.bin/ctags/yacc.c
94
*sp++ = c;
usr.bin/ctags/yacc.c
97
while (iswhite(c)) {
usr.bin/ctags/yacc.c
98
if (c == '\n')
usr.bin/cu/command.c
225
do_command(char c)
usr.bin/cu/command.c
229
if (restricted && strchr("CRX$>", c) != NULL) {
usr.bin/cu/command.c
230
cu_warnx("~%c command is not allowed in restricted mode", c);
usr.bin/cu/command.c
234
switch (c) {
usr.bin/cu/command.c
273
if ((u_char)c == escape_char)
usr.bin/cu/command.c
274
bufferevent_write(line_ev, &c, 1);
usr.bin/cu/input.c
51
char c, *cp, *out = NULL;
usr.bin/cu/input.c
69
n = read(STDIN_FILENO, &c, 1);
usr.bin/cu/input.c
74
if (c == '\n') {
usr.bin/cu/input.c
78
if (!iscntrl((u_char)c))
usr.bin/cu/input.c
79
*cp++ = c;
usr.bin/cu/xmodem.c
112
u_char buf[3 + XMODEM_BLOCK + 2], c;
usr.bin/cu/xmodem.c
144
if (xmodem_read(&c) != 0)
usr.bin/cu/xmodem.c
146
if (c == XMODEM_C)
usr.bin/cu/xmodem.c
148
else if (c == XMODEM_NAK)
usr.bin/cu/xmodem.c
151
cu_warnx("%s: unexpected response \\%03hho", file, c);
usr.bin/cu/xmodem.c
188
if (xmodem_read(&c) != 0)
usr.bin/cu/xmodem.c
190
if (c == XMODEM_ACK)
usr.bin/cu/xmodem.c
192
if (c != XMODEM_NAK) {
usr.bin/cu/xmodem.c
194
file, c);
usr.bin/cu/xmodem.c
45
int xmodem_read(char *c);
usr.bin/cu/xmodem.c
73
xmodem_read(char *c)
usr.bin/cu/xmodem.c
76
switch (read(line_fd, c, 1)) {
usr.bin/cvs/buf.c
146
buf_putc(BUF *b, int c)
usr.bin/cvs/buf.c
153
*bp = (u_char)c;
usr.bin/cvs/date.y
734
char c, *p, buff[20];
usr.bin/cvs/date.y
741
if (isdigit(c = *yyInput) || c == '-' || c == '+') {
usr.bin/cvs/date.y
742
if (c == '-' || c == '+') {
usr.bin/cvs/date.y
743
sign = c == '-' ? -1 : 1;
usr.bin/cvs/date.y
751
for (yylval.Number = 0; isdigit(c = *yyInput++); )
usr.bin/cvs/date.y
752
yylval.Number = 10 * yylval.Number + c - '0';
usr.bin/cvs/date.y
759
if (isalpha(c)) {
usr.bin/cvs/date.y
760
for (p = buff; isalpha(c = *yyInput++) || c == '.'; )
usr.bin/cvs/date.y
762
*p++ = c;
usr.bin/cvs/date.y
767
if (c != '(')
usr.bin/cvs/date.y
772
c = *yyInput++;
usr.bin/cvs/date.y
773
if (c == '\0')
usr.bin/cvs/date.y
774
return (c);
usr.bin/cvs/date.y
775
if (c == '(')
usr.bin/cvs/date.y
777
else if (c == ')')
usr.bin/cvs/diff3.c
440
int a, b, c, d;
usr.bin/cvs/diff3.c
457
c = d = number(&p);
usr.bin/cvs/diff3.c
465
c++;
usr.bin/cvs/diff3.c
470
(*dd)[i].new.from = c;
usr.bin/cvs/diff3.c
733
int c,d;
usr.bin/cvs/diff3.c
744
c = getc(fp[0]);
usr.bin/cvs/diff3.c
746
if (c == -1 && d == -1)
usr.bin/cvs/diff3.c
748
if (c == -1 || d== -1)
usr.bin/cvs/diff3.c
751
if (c != d) {
usr.bin/cvs/diff3.c
755
} while (c != '\n');
usr.bin/cvs/diff_internals.c
1023
c > context_vec_ptr->d + (2 * diff_context) + 1) {
usr.bin/cvs/diff_internals.c
1036
context_vec_ptr->c = c;
usr.bin/cvs/diff_internals.c
1047
diff_output("%c", a > b ? 'a' : c > d ? 'd' : 'c');
usr.bin/cvs/diff_internals.c
1049
range(c, d, ",");
usr.bin/cvs/diff_internals.c
1054
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/cvs/diff_internals.c
1058
if (!(c > d)) /* add changed lines */
usr.bin/cvs/diff_internals.c
1059
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/cvs/diff_internals.c
1065
if (a <= b && c <= d && diff_format == D_NORMAL)
usr.bin/cvs/diff_internals.c
1068
fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, flags);
usr.bin/cvs/diff_internals.c
1079
int i, c, col;
usr.bin/cvs/diff_internals.c
1120
if ((c = getc(lb)) == EOF) {
usr.bin/cvs/diff_internals.c
1129
if (c == '\t' && (flags & D_EXPANDTABS)) {
usr.bin/cvs/diff_internals.c
1134
diff_output("%c", c);
usr.bin/cvs/diff_internals.c
1274
int a, b, c, d;
usr.bin/cvs/diff_internals.c
1283
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/cvs/diff_internals.c
1312
c = cvp->c;
usr.bin/cvs/diff_internals.c
1315
if (a <= b && c <= d)
usr.bin/cvs/diff_internals.c
1339
if (cvp->c <= cvp->d) {
usr.bin/cvs/diff_internals.c
1348
c = cvp->c;
usr.bin/cvs/diff_internals.c
1351
if (a <= b && c <= d)
usr.bin/cvs/diff_internals.c
1359
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/cvs/diff_internals.c
1360
fetch(ixnew, c, d, f2,
usr.bin/cvs/diff_internals.c
1377
int a, b, c, d;
usr.bin/cvs/diff_internals.c
1386
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/cvs/diff_internals.c
1408
c = cvp->c;
usr.bin/cvs/diff_internals.c
1416
if (a <= b && c <= d)
usr.bin/cvs/diff_internals.c
1425
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/cvs/diff_internals.c
1432
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/cvs/diff_internals.c
1433
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/cvs/diff_internals.c
173
int c; /* start line in new file */
usr.bin/cvs/diff_internals.c
496
equiv(struct line *a, int n, struct line *b, int m, int *c)
usr.bin/cvs/diff_internals.c
514
c[j] = -b[j].serial;
usr.bin/cvs/diff_internals.c
517
c[j] = b[j].serial;
usr.bin/cvs/diff_internals.c
520
c[j] = -1;
usr.bin/cvs/diff_internals.c
543
stone(int *a, int n, int *b, int *c, int flags)
usr.bin/cvs/diff_internals.c
557
c[0] = newcand(0, 0, 0);
usr.bin/cvs/diff_internals.c
564
oldc = c[0];
usr.bin/cvs/diff_internals.c
569
l = search(c, k, y);
usr.bin/cvs/diff_internals.c
571
oldc = c[l - 1];
usr.bin/cvs/diff_internals.c
573
if (clist[c[l]].y <= y)
usr.bin/cvs/diff_internals.c
575
tc = c[l];
usr.bin/cvs/diff_internals.c
576
c[l] = newcand(i, y, oldc);
usr.bin/cvs/diff_internals.c
581
c[l] = newcand(i, y, oldc);
usr.bin/cvs/diff_internals.c
607
search(int *c, int k, int y)
usr.bin/cvs/diff_internals.c
611
if (clist[c[k]].y < y) /* quick look for typical case */
usr.bin/cvs/diff_internals.c
619
t = clist[c[l]].y;
usr.bin/cvs/diff_internals.c
652
int i, j, jackpot, c, d;
usr.bin/cvs/diff_internals.c
672
c = getc(f1);
usr.bin/cvs/diff_internals.c
679
((c == EOF && d == '\n') ||
usr.bin/cvs/diff_internals.c
680
(c == '\n' && d == EOF))) {
usr.bin/cvs/diff_internals.c
685
if ((flags & D_FOLDBLANKS) && isspace(c) &&
usr.bin/cvs/diff_internals.c
688
if (c == '\n')
usr.bin/cvs/diff_internals.c
691
} while (isspace(c = getc(f1)));
usr.bin/cvs/diff_internals.c
698
while (isspace(c) && c != '\n') {
usr.bin/cvs/diff_internals.c
699
c = getc(f1);
usr.bin/cvs/diff_internals.c
707
if (chrtran[c] != chrtran[d]) {
usr.bin/cvs/diff_internals.c
710
if (c != '\n' && c != EOF)
usr.bin/cvs/diff_internals.c
712
if (d != '\n' && c != EOF)
usr.bin/cvs/diff_internals.c
716
if (c == '\n' || c == EOF)
usr.bin/cvs/diff_internals.c
723
if ((c = getc(f1)) != (d = getc(f2))) {
usr.bin/cvs/diff_internals.c
726
if (c != '\n' && c != EOF)
usr.bin/cvs/diff_internals.c
728
if (d != '\n' && c != EOF)
usr.bin/cvs/diff_internals.c
732
if (c == '\n' || c == EOF)
usr.bin/cvs/diff_internals.c
797
int i, c;
usr.bin/cvs/diff_internals.c
799
for (i = 1; (c = getc(f)) != '\n' && c != EOF; i++)
usr.bin/cvs/diff_internals.c
830
if ((c = getc(f1)) == EOF)
usr.bin/cvs/diff_internals.c
832
diff_output("%c", c);
usr.bin/cvs/diff_internals.c
967
change(FILE *f1, FILE *f2, int a, int b, int c, int d, int flags)
usr.bin/cvs/diff_internals.c
972
if (diff_format != D_IFDEF && a > b && c > d)
usr.bin/cvs/diff_internals.c
989
if (a > b || c <= d) { /* Changes and inserts. */
usr.bin/cvs/diff_internals.c
990
for (i = c; i <= d; i++) {
usr.bin/cvs/file.c
49
#define CVS_CHAR_ISMETA(c) ((c == '*') || (c == '?') || (c == '['))
usr.bin/cvs/logmsg.c
246
c = getc(stdin);
usr.bin/cvs/logmsg.c
247
if (c == EOF || c == '\n' || c == 'a' || c == 'A') {
usr.bin/cvs/logmsg.c
249
} else if (c == 'c' || c == 'C') {
usr.bin/cvs/logmsg.c
254
} else if (c == 'e' || c == 'E') {
usr.bin/cvs/logmsg.c
256
} else if (c == '!') {
usr.bin/cvs/logmsg.c
99
int c, fd, rd, saved_errno;
usr.bin/cvs/rcs.c
2185
const u_char *c, *start, *fin, *end;
usr.bin/cvs/rcs.c
2200
c = line->l_line;
usr.bin/cvs/rcs.c
2203
fin = c + len - 1;
usr.bin/cvs/rcs.c
2214
for (; c < fin; c++) {
usr.bin/cvs/rcs.c
2215
if (*c != '$')
usr.bin/cvs/rcs.c
2219
start = c;
usr.bin/cvs/rcs.c
2222
c++;
usr.bin/cvs/rcs.c
2223
if (!isalpha(*c)) {
usr.bin/cvs/rcs.c
2224
c = start;
usr.bin/cvs/rcs.c
2229
clen = fin - c + 1;
usr.bin/cvs/rcs.c
2240
memcmp(c, rcs_expkw[j].kw_str, kwlen) == 0 &&
usr.bin/cvs/rcs.c
2241
(c[kwlen] == '$' || c[kwlen] == ':')) {
usr.bin/cvs/rcs.c
2245
c += kwlen;
usr.bin/cvs/rcs.c
2253
memcmp(c, cvs_tagname, kwlen) == 0 &&
usr.bin/cvs/rcs.c
2254
(c[kwlen] == '$' || c[kwlen] == ':')) {
usr.bin/cvs/rcs.c
2258
c += kwlen;
usr.bin/cvs/rcs.c
2264
c = start;
usr.bin/cvs/rcs.c
2273
if (*c == ':') {
usr.bin/cvs/rcs.c
2274
for (; c <= fin; ++c) {
usr.bin/cvs/rcs.c
2275
if (*c == '$' || *c == '\n')
usr.bin/cvs/rcs.c
2279
if (*c != '$') {
usr.bin/cvs/rcs.c
2280
c = start;
usr.bin/cvs/rcs.c
2284
end = c + 1;
usr.bin/cvs/rcs.c
2523
c = buf_get(tmpbuf) + tlen;
usr.bin/cvs/rcsparse.c
837
int c;
usr.bin/cvs/rcsparse.c
848
c = getc(rfp->rf_file);
usr.bin/cvs/rcsparse.c
849
if (c == '@') {
usr.bin/cvs/rcsparse.c
850
c = getc(rfp->rf_file);
usr.bin/cvs/rcsparse.c
851
if (c == EOF) {
usr.bin/cvs/rcsparse.c
853
} else if (c != '@') {
usr.bin/cvs/rcsparse.c
854
ungetc(c, rfp->rf_file);
usr.bin/cvs/rcsparse.c
859
if (c == EOF) {
usr.bin/cvs/rcsparse.c
861
} else if (c == '\n')
usr.bin/cvs/rcsparse.c
864
RBUF_PUTC(c);
usr.bin/cvs/rcsparse.c
885
int c, pre, ret, type;
usr.bin/cvs/rcsparse.c
900
c = EOF;
usr.bin/cvs/rcsparse.c
902
pre = c;
usr.bin/cvs/rcsparse.c
903
c = getc(rfp->rf_file);
usr.bin/cvs/rcsparse.c
904
if (c == EOF) {
usr.bin/cvs/rcsparse.c
913
} else if (c == '\n')
usr.bin/cvs/rcsparse.c
915
} while (isspace(c));
usr.bin/cvs/rcsparse.c
919
switch (c) {
usr.bin/cvs/rcsparse.c
932
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/cvs/rcsparse.c
939
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/cvs/rcsparse.c
946
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/cvs/rcsparse.c
950
if (!isgraph(c)) {
usr.bin/cvs/rcsparse.c
951
rcsparse_warnx(rfp, "unexpected character 0x%.2X", c);
usr.bin/cvs/rcsparse.c
963
if (c == EOF) {
usr.bin/cvs/rcsparse.c
969
} else if (c == '\n')
usr.bin/cvs/rcsparse.c
972
RBUF_PUTC(c);
usr.bin/cvs/rcsparse.c
974
c = getc(rfp->rf_file);
usr.bin/cvs/rcsparse.c
976
if (isspace(c)) {
usr.bin/cvs/rcsparse.c
977
if (c == '\n')
usr.bin/cvs/rcsparse.c
981
} else if (c == ';' || c == ':' || c == ',') {
usr.bin/cvs/rcsparse.c
982
ungetc(c, rfp->rf_file);
usr.bin/cvs/rcsparse.c
985
} else if (!isgraph(c)) {
usr.bin/cvs/rcsparse.c
986
rcsparse_warnx(rfp, "unexpected character 0x%.2X", c);
usr.bin/cvs/util.c
705
u_char *p, *c;
usr.bin/cvs/util.c
716
p = c = data;
usr.bin/cvs/util.c
719
tlen = p - c + 1;
usr.bin/cvs/util.c
721
lp->l_line = c;
usr.bin/cvs/util.c
725
c = p + 1;
usr.bin/cvs/util.c
860
int c, ret;
usr.bin/cvs/util.c
867
if ((c = getchar()) != 'y' && c != 'Y')
usr.bin/cvs/util.c
870
while (c != EOF && c != '\n')
usr.bin/cvs/util.c
871
c = getchar();
usr.bin/dc/bcode.c
696
const uint64_t c = 1292913986; /* floor(2^32 * log_10(2)) */
usr.bin/dc/bcode.c
715
d = (c * bits) >> 32;
usr.bin/dc/bcode.c
718
if (d != (c * (bits - 1)) >> 32) {
usr.bin/deroff/deroff.c
101
#define SKIP_TO_COM SKIP; SKIP; pc=c; while (C != '.' || pc != '\n' || C > 'Z')pc=c
usr.bin/deroff/deroff.c
1057
if (c == '\n')
usr.bin/deroff/deroff.c
1125
for (C; c == ' ' || c == '\t'; C)
usr.bin/deroff/deroff.c
1128
if (c == '<') { /* ".PS < file" -- don't expect a .PE */
usr.bin/deroff/deroff.c
1213
putchar(c);
usr.bin/deroff/deroff.c
1238
putchar(c);
usr.bin/deroff/deroff.c
1239
putchar(c);
usr.bin/deroff/deroff.c
1243
putchar(c);
usr.bin/deroff/deroff.c
1248
putchar(c);
usr.bin/deroff/deroff.c
1277
putchar(c);
usr.bin/deroff/deroff.c
142
int c;
usr.bin/deroff/deroff.c
1446
while (C == ' ' || c == '\t')
usr.bin/deroff/deroff.c
1449
if ((c1 = c) == '\n')
usr.bin/deroff/deroff.c
371
while ((c = getc(infile)) != rdelim) {
usr.bin/deroff/deroff.c
372
if (c == EOF)
usr.bin/deroff/deroff.c
373
c = eof();
usr.bin/deroff/deroff.c
374
else if (c == '"') {
usr.bin/deroff/deroff.c
375
while ((c = getc(infile)) != '"') {
usr.bin/deroff/deroff.c
376
if (c == EOF ||
usr.bin/deroff/deroff.c
377
(c == '\\' && (c = getc(infile)) == EOF))
usr.bin/deroff/deroff.c
378
c = eof();
usr.bin/deroff/deroff.c
383
return((c = 'x'));
usr.bin/deroff/deroff.c
384
return((c = ' '));
usr.bin/deroff/deroff.c
428
for (p = fname ; p - fname < sizeof(fname) && (*p = c) != '\n' &&
usr.bin/deroff/deroff.c
429
c != ' ' && c != '\t' && c != '\\'; ++p)
usr.bin/deroff/deroff.c
432
while (c != '\n')
usr.bin/deroff/deroff.c
470
printf("Starting work with `%c'\n", c);
usr.bin/deroff/deroff.c
472
if (c == '.' || c == '\'')
usr.bin/deroff/deroff.c
483
line[0] = c;
usr.bin/deroff/deroff.c
494
if (c == '\\') {
usr.bin/deroff/deroff.c
498
if (c == '\n')
usr.bin/deroff/deroff.c
500
if (intable && c == 'T') {
usr.bin/deroff/deroff.c
502
if (c == '{' || c == '}') {
usr.bin/deroff/deroff.c
524
if (c != '\n')
usr.bin/deroff/deroff.c
549
if (c != 'T' || C != 'E') {
usr.bin/deroff/deroff.c
551
pc = c;
usr.bin/deroff/deroff.c
553
pc = c;
usr.bin/deroff/deroff.c
569
if (C1 == '.' || c == '\'') {
usr.bin/deroff/deroff.c
570
while (C1 == ' ' || c == '\t')
usr.bin/deroff/deroff.c
572
if (c == 'E' && C1 == 'N') {
usr.bin/deroff/deroff.c
584
} else if (c == 'd') {
usr.bin/deroff/deroff.c
591
if ((c1 = c) == '\n' ||
usr.bin/deroff/deroff.c
604
if (c != '\n')
usr.bin/deroff/deroff.c
606
if (chars[c] == PUNCT)
usr.bin/deroff/deroff.c
607
last = c;
usr.bin/deroff/deroff.c
608
else if (c != ' ')
usr.bin/deroff/deroff.c
630
while (C >= '0' && c <= '9')
usr.bin/deroff/deroff.c
632
ungetc(c, infile);
usr.bin/deroff/deroff.c
633
c = '0';
usr.bin/deroff/deroff.c
652
else if (c != '\n')
usr.bin/deroff/deroff.c
674
while (C != '\n' && c != bdelim)
usr.bin/deroff/deroff.c
675
if (c == '\\')
usr.bin/deroff/deroff.c
696
*ap = c;
usr.bin/deroff/deroff.c
713
if (c == '0') {
usr.bin/deroff/deroff.c
721
} else if (c == 'P' || C == 'P') {
usr.bin/deroff/deroff.c
722
if (c != '\n')
usr.bin/deroff/deroff.c
725
} else if (c != '\n')
usr.bin/deroff/deroff.c
750
c2 = c;
usr.bin/deroff/deroff.c
768
c = '\n';
usr.bin/deroff/deroff.c
770
c1 = c;
usr.bin/deroff/deroff.c
773
if (c == '\n')
usr.bin/deroff/deroff.c
777
c = '\n';
usr.bin/deroff/deroff.c
782
if (c == '\n')
usr.bin/deroff/deroff.c
786
c = '\n';
usr.bin/deroff/deroff.c
793
else if (c == '\"') {
usr.bin/deroff/deroff.c
795
if (c == '\\') {
usr.bin/deroff/deroff.c
798
ungetc(c, infile);
usr.bin/deroff/deroff.c
803
*p1++ = c;
usr.bin/deroff/deroff.c
808
else if (c == '\n' && p1 != line) {
usr.bin/deroff/deroff.c
89
#define Cget ( (c=getc(infile)) == EOF ? eof() : ((c==ldelim)&&(filesp==files) ? skeqn() : c) )
usr.bin/deroff/deroff.c
90
#define C1get ( (c=getc(infile)) == EOF ? eof() : c)
usr.bin/diff/diffreg.c
1021
c > context_vec_ptr->d + (2 * diff_context) + 1) {
usr.bin/diff/diffreg.c
1034
context_vec_ptr->c = c;
usr.bin/diff/diffreg.c
1046
diff_output("%c", a > b ? 'a' : c > d ? 'd' : 'c');
usr.bin/diff/diffreg.c
1048
range(c, d, ",");
usr.bin/diff/diffreg.c
1052
diff_output("%c", a > b ? 'a' : c > d ? 'd' : 'c');
usr.bin/diff/diffreg.c
1058
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/diff/diffreg.c
1061
if (!(c > d))
usr.bin/diff/diffreg.c
1063
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/diff/diffreg.c
1069
if (a <= b && c <= d && diff_format == D_NORMAL)
usr.bin/diff/diffreg.c
1072
i = fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags);
usr.bin/diff/diffreg.c
1085
c += i;
usr.bin/diff/diffreg.c
1088
if ((diff_format == D_EDIT || diff_format == D_REVERSE) && c <= d)
usr.bin/diff/diffreg.c
1099
int i, j, c, lastc, col, nc;
usr.bin/diff/diffreg.c
1138
for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
usr.bin/diff/diffreg.c
1139
if ((c = getc(lb)) == EOF) {
usr.bin/diff/diffreg.c
1148
if (c == '\t' && (flags & D_EXPANDTABS)) {
usr.bin/diff/diffreg.c
1153
if (diff_format == D_EDIT && j == 1 && c == '\n'
usr.bin/diff/diffreg.c
1165
diff_output("%c", c);
usr.bin/diff/diffreg.c
1303
int a, b, c, d;
usr.bin/diff/diffreg.c
1312
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/diff/diffreg.c
1341
c = cvp->c;
usr.bin/diff/diffreg.c
1344
if (a <= b && c <= d)
usr.bin/diff/diffreg.c
1368
if (cvp->c <= cvp->d) {
usr.bin/diff/diffreg.c
1377
c = cvp->c;
usr.bin/diff/diffreg.c
1380
if (a <= b && c <= d)
usr.bin/diff/diffreg.c
1388
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/diff/diffreg.c
1389
fetch(ixnew, c, d, f2,
usr.bin/diff/diffreg.c
1406
int a, b, c, d;
usr.bin/diff/diffreg.c
1415
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/diff/diffreg.c
1437
c = cvp->c;
usr.bin/diff/diffreg.c
1445
if (a <= b && c <= d)
usr.bin/diff/diffreg.c
1454
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/diff/diffreg.c
1461
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/diff/diffreg.c
1462
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/diff/diffreg.c
175
int c; /* start line in new file */
usr.bin/diff/diffreg.c
545
equiv(struct line *a, int n, struct line *b, int m, int *c)
usr.bin/diff/diffreg.c
563
c[j] = -b[j].serial;
usr.bin/diff/diffreg.c
566
c[j] = b[j].serial;
usr.bin/diff/diffreg.c
569
c[j] = -1;
usr.bin/diff/diffreg.c
592
stone(int *a, int n, int *b, int *c, int flags)
usr.bin/diff/diffreg.c
606
c[0] = newcand(0, 0, 0);
usr.bin/diff/diffreg.c
613
oldc = c[0];
usr.bin/diff/diffreg.c
618
l = search(c, k, y);
usr.bin/diff/diffreg.c
620
oldc = c[l - 1];
usr.bin/diff/diffreg.c
622
if (clist[c[l]].y <= y)
usr.bin/diff/diffreg.c
624
tc = c[l];
usr.bin/diff/diffreg.c
625
c[l] = newcand(i, y, oldc);
usr.bin/diff/diffreg.c
630
c[l] = newcand(i, y, oldc);
usr.bin/diff/diffreg.c
656
search(int *c, int k, int y)
usr.bin/diff/diffreg.c
660
if (clist[c[k]].y < y) /* quick look for typical case */
usr.bin/diff/diffreg.c
668
t = clist[c[l]].y;
usr.bin/diff/diffreg.c
701
int i, j, jackpot, c, d;
usr.bin/diff/diffreg.c
721
c = getc(f1);
usr.bin/diff/diffreg.c
728
if (c == EOF && d == '\n') {
usr.bin/diff/diffreg.c
731
} else if (c == '\n' && d == EOF) {
usr.bin/diff/diffreg.c
738
if ((flags & D_FOLDBLANKS) && isspace(c) &&
usr.bin/diff/diffreg.c
741
if (c == '\n')
usr.bin/diff/diffreg.c
744
} while (isspace(c = getc(f1)));
usr.bin/diff/diffreg.c
751
while (isspace(c) && c != '\n') {
usr.bin/diff/diffreg.c
752
c = getc(f1);
usr.bin/diff/diffreg.c
760
if (chrtran[c] != chrtran[d]) {
usr.bin/diff/diffreg.c
763
if (c != '\n' && c != EOF)
usr.bin/diff/diffreg.c
765
if (d != '\n' && c != EOF)
usr.bin/diff/diffreg.c
769
if (c == '\n' || c == EOF)
usr.bin/diff/diffreg.c
776
if ((c = getc(f1)) != (d = getc(f2))) {
usr.bin/diff/diffreg.c
779
if (c != '\n' && c != EOF)
usr.bin/diff/diffreg.c
781
if (d != '\n' && c != EOF)
usr.bin/diff/diffreg.c
785
if (c == '\n' || c == EOF)
usr.bin/diff/diffreg.c
850
int i, c;
usr.bin/diff/diffreg.c
852
for (i = 1; (c = getc(f)) != '\n' && c != EOF; i++)
usr.bin/diff/diffreg.c
897
if ((c = getc(f1)) == EOF)
usr.bin/diff/diffreg.c
899
diff_output("%c", c);
usr.bin/diff/diffreg.c
963
change(char *file1, FILE *f1, char *file2, FILE *f2, int a, int b, int c, int d,
usr.bin/diff/diffreg.c
970
if (diff_format != D_IFDEF && a > b && c > d)
usr.bin/diff/diffreg.c
987
if (a > b || c <= d) { /* Changes and inserts. */
usr.bin/diff/diffreg.c
988
for (i = c; i <= d; i++) {
usr.bin/diff3/diff3prog.c
206
int a, b, c, d, i;
usr.bin/diff3/diff3prog.c
221
c = d = number(&p);
usr.bin/diff3/diff3prog.c
229
c++;
usr.bin/diff3/diff3prog.c
234
(*dd)[i].new.from = c;
usr.bin/diff3/diff3prog.c
484
int c,d;
usr.bin/diff3/diff3prog.c
495
c = getc(fp[0]);
usr.bin/diff3/diff3prog.c
497
if (c == -1 && d == -1)
usr.bin/diff3/diff3prog.c
499
if (c == -1 || d== -1)
usr.bin/diff3/diff3prog.c
502
if (c != d) {
usr.bin/diff3/diff3prog.c
506
} while (c != '\n');
usr.bin/dig/host.c
562
int c;
usr.bin/dig/host.c
564
while ((c = getopt(argc, argv, optstring)) != -1) {
usr.bin/dig/host.c
565
switch (c) {
usr.bin/dig/host.c
613
int c;
usr.bin/dig/host.c
627
while ((c = getopt(argc, argv, optstring)) != -1) {
usr.bin/dig/host.c
628
switch (c) {
usr.bin/dig/lib/dns/gen.c
116
char c;
usr.bin/dig/lib/dns/gen.c
119
while ((c = *s++)) {
usr.bin/dig/lib/dns/gen.c
120
*b++ = (c == '-') ? '_' : c;
usr.bin/dig/lib/dns/gen.c
335
int c, n;
usr.bin/dig/lib/dns/gen.c
344
while ((c = getopt(argc, argv, "cdits:F:P:S:")) != -1)
usr.bin/dig/lib/dns/gen.c
345
switch (c) {
usr.bin/dig/lib/dns/name.c
1010
c = *ndata;
usr.bin/dig/lib/dns/name.c
1011
switch (c) {
usr.bin/dig/lib/dns/name.c
1027
CONVERTFROMASCII(c);
usr.bin/dig/lib/dns/name.c
1028
*tdata++ = c;
usr.bin/dig/lib/dns/name.c
103
#define CONVERTTOASCII(c)
usr.bin/dig/lib/dns/name.c
1035
if (c > 0x20 && c < 0x7f) {
usr.bin/dig/lib/dns/name.c
1038
CONVERTFROMASCII(c);
usr.bin/dig/lib/dns/name.c
1039
*tdata++ = c;
usr.bin/dig/lib/dns/name.c
104
#define CONVERTFROMASCII(c)
usr.bin/dig/lib/dns/name.c
1048
((c / 100) % 10);
usr.bin/dig/lib/dns/name.c
1050
((c / 10) % 10);
usr.bin/dig/lib/dns/name.c
1051
*tdata++ = 0x30 + (c % 10);
usr.bin/dig/lib/dns/name.c
1209
unsigned int c;
usr.bin/dig/lib/dns/name.c
1276
c = *cdata++;
usr.bin/dig/lib/dns/name.c
1283
if (c < 64) {
usr.bin/dig/lib/dns/name.c
1286
if (nused + c + 1 > nmax)
usr.bin/dig/lib/dns/name.c
1288
nused += c + 1;
usr.bin/dig/lib/dns/name.c
1289
*ndata++ = c;
usr.bin/dig/lib/dns/name.c
1290
if (c == 0)
usr.bin/dig/lib/dns/name.c
1292
n = c;
usr.bin/dig/lib/dns/name.c
1294
} else if (c >= 128 && c < 192) {
usr.bin/dig/lib/dns/name.c
1301
} else if (c >= 192) {
usr.bin/dig/lib/dns/name.c
1308
new_current = c & 0x3F;
usr.bin/dig/lib/dns/name.c
1315
c = maptolower[c];
usr.bin/dig/lib/dns/name.c
1316
*ndata++ = c;
usr.bin/dig/lib/dns/name.c
1323
new_current += c;
usr.bin/dig/lib/dns/name.c
403
unsigned char c;
usr.bin/dig/lib/dns/name.c
443
c = maptolower[label1[0]];
usr.bin/dig/lib/dns/name.c
444
if (c != maptolower[label2[0]])
usr.bin/dig/lib/dns/name.c
446
c = maptolower[label1[1]];
usr.bin/dig/lib/dns/name.c
447
if (c != maptolower[label2[1]])
usr.bin/dig/lib/dns/name.c
449
c = maptolower[label1[2]];
usr.bin/dig/lib/dns/name.c
450
if (c != maptolower[label2[2]])
usr.bin/dig/lib/dns/name.c
452
c = maptolower[label1[3]];
usr.bin/dig/lib/dns/name.c
453
if (c != maptolower[label2[3]])
usr.bin/dig/lib/dns/name.c
460
c = maptolower[*label1++];
usr.bin/dig/lib/dns/name.c
461
if (c != maptolower[*label2++])
usr.bin/dig/lib/dns/name.c
689
char c;
usr.bin/dig/lib/dns/name.c
742
c = *tdata++;
usr.bin/dig/lib/dns/name.c
751
if (c == '.') {
usr.bin/dig/lib/dns/name.c
761
if (c == '@' && tlen == 0) {
usr.bin/dig/lib/dns/name.c
773
if (c == '\\') {
usr.bin/dig/lib/dns/name.c
782
if (c == '.') {
usr.bin/dig/lib/dns/name.c
797
} else if (c == '\\') {
usr.bin/dig/lib/dns/name.c
803
CONVERTTOASCII(c);
usr.bin/dig/lib/dns/name.c
805
c = maptolower[c & 0xff];
usr.bin/dig/lib/dns/name.c
806
*ndata++ = c;
usr.bin/dig/lib/dns/name.c
812
if (c == '[') {
usr.bin/dig/lib/dns/name.c
823
if (!isdigit(c & 0xff)) {
usr.bin/dig/lib/dns/name.c
827
CONVERTTOASCII(c);
usr.bin/dig/lib/dns/name.c
829
c = maptolower[c & 0xff];
usr.bin/dig/lib/dns/name.c
830
*ndata++ = c;
usr.bin/dig/lib/dns/name.c
841
if (!isdigit(c & 0xff))
usr.bin/dig/lib/dns/name.c
844
value += digitvalue[c & 0xff];
usr.bin/dig/lib/dns/name.c
894
c = *label++;
usr.bin/dig/lib/dns/name.c
896
c = maptolower[c & 0xff];
usr.bin/dig/lib/dns/name.c
897
*ndata++ = c;
usr.bin/dig/lib/dns/name.c
939
unsigned char c;
usr.bin/dig/lib/dns/rdata.c
1405
static isc_result_t byte_btoa(int c, isc_buffer_t *, struct state *state);
usr.bin/dig/lib/dns/rdata.c
1412
byte_btoa(int c, isc_buffer_t *target, struct state *state) {
usr.bin/dig/lib/dns/rdata.c
1416
Ceor ^= c;
usr.bin/dig/lib/dns/rdata.c
1417
Csum += c;
usr.bin/dig/lib/dns/rdata.c
1425
Crot += c;
usr.bin/dig/lib/dns/rdata.c
1428
word |= c;
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
146
unsigned char c;
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
171
c = sr.base[1];
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
172
if (c != 0)
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
173
if ((c&0xf) > 9 || ((c>>4)&0xf) > 9 || ((c>>4)&0xf) == 0)
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
179
c = sr.base[2];
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
180
if (c != 0)
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
181
if ((c&0xf) > 9 || ((c>>4)&0xf) > 9 || ((c>>4)&0xf) == 0)
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
187
c = sr.base[3];
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
188
if (c != 0)
usr.bin/dig/lib/dns/rdata/generic/loc_29.c
189
if ((c&0xf) > 9 || ((c>>4)&0xf) > 9 || ((c>>4)&0xf) == 0)
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
108
*cp++ = c;
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
39
unsigned char c;
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
63
c = *txt++;
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
64
if (c == 0)
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
66
if (c == delim && !replace) {
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
69
} else if (c == delim && !flags) {
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
72
} else if (c == delim)
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
78
switch (c) {
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
86
*cp++ = c;
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
87
if (c == '\\') {
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
90
c = *txt++;
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
91
if (c == 0)
usr.bin/dig/lib/dns/rdata/generic/naptr_35.c
95
switch (c) {
usr.bin/dig/lib/isc/base32.c
139
base32_decode_char(base32_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/base32.c
145
if ((s = strchr(ctx->base, c)) == NULL)
usr.bin/dig/lib/isc/base32.c
260
int c = *source->base;
usr.bin/dig/lib/isc/base32.c
261
RETERR(base32_decode_char(&ctx, c));
usr.bin/dig/lib/isc/base64.c
108
base64_decode_char(base64_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/base64.c
113
if ((s = strchr(base64, c)) == NULL)
usr.bin/dig/lib/isc/base64.c
173
int c = *cstr++;
usr.bin/dig/lib/isc/base64.c
174
if (c == '\0')
usr.bin/dig/lib/isc/base64.c
176
if (c == ' ' || c == '\t' || c == '\n' || c== '\r')
usr.bin/dig/lib/isc/base64.c
178
RETERR(base64_decode_char(&ctx, c));
usr.bin/dig/lib/isc/hex.c
122
int c = *cstr++;
usr.bin/dig/lib/isc/hex.c
123
if (c == '\0')
usr.bin/dig/lib/isc/hex.c
125
if (c == ' ' || c == '\t' || c == '\n' || c== '\r')
usr.bin/dig/lib/isc/hex.c
127
RETERR(hex_decode_char(&ctx, c));
usr.bin/dig/lib/isc/hex.c
85
hex_decode_char(hex_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/hex.c
88
if ((s = strchr(hex, toupper(c))) == NULL)
usr.bin/dig/lib/isc/lex.c
242
pushback(inputsource *source, int c) {
usr.bin/dig/lib/isc/lex.c
244
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
249
if (c == '\n')
usr.bin/dig/lib/isc/lex.c
254
pushandgrow(inputsource *source, int c) {
usr.bin/dig/lib/isc/lex.c
272
isc_buffer_putuint8(source->pushback, (uint8_t)c);
usr.bin/dig/lib/isc/lex.c
279
int c;
usr.bin/dig/lib/isc/lex.c
338
c = getc_unlocked(stream);
usr.bin/dig/lib/isc/lex.c
339
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
351
c = EOF;
usr.bin/dig/lib/isc/lex.c
354
c = *((unsigned char *)buffer->base +
usr.bin/dig/lib/isc/lex.c
359
if (c != EOF) {
usr.bin/dig/lib/isc/lex.c
360
source->result = pushandgrow(source, c);
usr.bin/dig/lib/isc/lex.c
373
c = isc_buffer_getuint8(source->pushback);
usr.bin/dig/lib/isc/lex.c
375
c = EOF;
usr.bin/dig/lib/isc/lex.c
378
if (c == '\n')
usr.bin/dig/lib/isc/lex.c
382
if (c == '/' &&
usr.bin/dig/lib/isc/lex.c
390
} else if (c == '#' &&
usr.bin/dig/lib/isc/lex.c
404
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
412
} else if (c == ' ' || c == '\t') {
usr.bin/dig/lib/isc/lex.c
414
} else if (c == '\n') {
usr.bin/dig/lib/isc/lex.c
416
} else if (c == '\r') {
usr.bin/dig/lib/isc/lex.c
418
} else if (c == '"' &&
usr.bin/dig/lib/isc/lex.c
423
} else if (lex->specials[c]) {
usr.bin/dig/lib/isc/lex.c
426
tokenp->value.as_char = c;
usr.bin/dig/lib/isc/lex.c
439
if (c == '\r' || c == '\n' || c == EOF ||
usr.bin/dig/lib/isc/lex.c
441
(c == ' ' || c == '\t' || lex->specials[c]))) {
usr.bin/dig/lib/isc/lex.c
442
pushback(source, c);
usr.bin/dig/lib/isc/lex.c
462
*curr++ = c;
usr.bin/dig/lib/isc/lex.c
467
if (c == '*' &&
usr.bin/dig/lib/isc/lex.c
471
} else if (c == '/' &&
usr.bin/dig/lib/isc/lex.c
476
pushback(source, c);
usr.bin/dig/lib/isc/lex.c
477
c = '/';
usr.bin/dig/lib/isc/lex.c
482
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
486
if (c == '*')
usr.bin/dig/lib/isc/lex.c
490
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
494
if (c == '/') {
usr.bin/dig/lib/isc/lex.c
501
c = ' ';
usr.bin/dig/lib/isc/lex.c
505
} else if (c != '*')
usr.bin/dig/lib/isc/lex.c
509
if ((c == '\n') || (c == EOF)) {
usr.bin/dig/lib/isc/lex.c
516
if (c == EOF) {
usr.bin/dig/lib/isc/lex.c
520
if (c == '"') {
usr.bin/dig/lib/isc/lex.c
539
if (c == '\n' && !escaped &&
usr.bin/dig/lib/isc/lex.c
541
pushback(source, c);
usr.bin/dig/lib/isc/lex.c
545
if (c == '\\' && !escaped)
usr.bin/dig/lib/isc/lex.c
557
*curr++ = c;
usr.bin/dig/lib/isc/regex.c
102
++c;
usr.bin/dig/lib/isc/regex.c
114
++c;
usr.bin/dig/lib/isc/regex.c
123
++c;
usr.bin/dig/lib/isc/regex.c
131
++c;
usr.bin/dig/lib/isc/regex.c
137
++c;
usr.bin/dig/lib/isc/regex.c
148
++c;
usr.bin/dig/lib/isc/regex.c
155
++c;
usr.bin/dig/lib/isc/regex.c
160
switch (*c) {
usr.bin/dig/lib/isc/regex.c
164
low = low * 10 + *c - '0';
usr.bin/dig/lib/isc/regex.c
169
high = high * 10 + *c - '0';
usr.bin/dig/lib/isc/regex.c
173
++c;
usr.bin/dig/lib/isc/regex.c
179
++c;
usr.bin/dig/lib/isc/regex.c
189
++c;
usr.bin/dig/lib/isc/regex.c
194
switch (*c) {
usr.bin/dig/lib/isc/regex.c
198
++c;
usr.bin/dig/lib/isc/regex.c
206
++c;
usr.bin/dig/lib/isc/regex.c
209
++c;
usr.bin/dig/lib/isc/regex.c
210
switch (*c) {
usr.bin/dig/lib/isc/regex.c
213
++c;
usr.bin/dig/lib/isc/regex.c
220
++c;
usr.bin/dig/lib/isc/regex.c
227
ccname = c;
usr.bin/dig/lib/isc/regex.c
228
++c;
usr.bin/dig/lib/isc/regex.c
235
if (!c[1] && !seen_char)
usr.bin/dig/lib/isc/regex.c
239
++c;
usr.bin/dig/lib/isc/regex.c
247
if (range == 2 && (*c & 0xff) < range_start)
usr.bin/dig/lib/isc/regex.c
25
isc_regex_validate(const char *c) {
usr.bin/dig/lib/isc/regex.c
251
range_start = *c & 0xff;
usr.bin/dig/lib/isc/regex.c
252
++c;
usr.bin/dig/lib/isc/regex.c
257
switch (*c) {
usr.bin/dig/lib/isc/regex.c
259
++c;
usr.bin/dig/lib/isc/regex.c
260
switch (*c) {
usr.bin/dig/lib/isc/regex.c
264
++c;
usr.bin/dig/lib/isc/regex.c
280
range_start = *c;
usr.bin/dig/lib/isc/regex.c
282
++c;
usr.bin/dig/lib/isc/regex.c
287
switch (*c) {
usr.bin/dig/lib/isc/regex.c
289
++c;
usr.bin/dig/lib/isc/regex.c
290
switch (*c) {
usr.bin/dig/lib/isc/regex.c
294
++c;
usr.bin/dig/lib/isc/regex.c
304
++c;
usr.bin/dig/lib/isc/regex.c
309
switch (*c) {
usr.bin/dig/lib/isc/regex.c
311
++c;
usr.bin/dig/lib/isc/regex.c
312
switch (*c) {
usr.bin/dig/lib/isc/regex.c
323
(unsigned int)(c - ccname))
usr.bin/dig/lib/isc/regex.c
331
++c;
usr.bin/dig/lib/isc/regex.c
340
++c;
usr.bin/dig/lib/isc/regex.c
53
if (c == NULL || *c == 0)
usr.bin/dig/lib/isc/regex.c
56
while (c != NULL && *c != 0) {
usr.bin/dig/lib/isc/regex.c
59
switch (*c) {
usr.bin/dig/lib/isc/regex.c
61
++c;
usr.bin/dig/lib/isc/regex.c
62
switch (*c) {
usr.bin/dig/lib/isc/regex.c
66
if ((*c - '0') > sub)
usr.bin/dig/lib/isc/regex.c
76
++c;
usr.bin/dig/lib/isc/regex.c
79
++c;
usr.bin/dig/lib/isc/regex.c
86
switch (c[1]) {
usr.bin/dig/lib/isc/symtab.c
110
int c;
usr.bin/dig/lib/isc/symtab.c
123
c = *s;
usr.bin/dig/lib/isc/symtab.c
124
c = tolower((unsigned char)c);
usr.bin/dig/lib/isc/symtab.c
125
h += (h << 3) + c;
usr.bin/doas/parse.y
228
int c, quoted = 0, quotes = 0, qerr = 0, escape = 0, nonkw = 0;
usr.bin/doas/parse.y
237
for (c = getc(yyfp); c == ' ' || c == '\t'; c = getc(yyfp))
usr.bin/doas/parse.y
241
switch (c) {
usr.bin/doas/parse.y
248
return c;
usr.bin/doas/parse.y
251
while ((c = getc(yyfp)) != '\n')
usr.bin/doas/parse.y
252
if (c == EOF)
usr.bin/doas/parse.y
256
return c;
usr.bin/doas/parse.y
262
for (;; c = getc(yyfp), yylval.colno++) {
usr.bin/doas/parse.y
263
switch (c) {
usr.bin/doas/parse.y
316
*p++ = c;
usr.bin/doas/parse.y
326
if (c != EOF)
usr.bin/doas/parse.y
327
ungetc(c, yyfp);
usr.bin/doas/parse.y
334
if (c == EOF)
usr.bin/expand/expand.c
123
putchar(c);
usr.bin/expand/expand.c
128
putchar(c);
usr.bin/expand/expand.c
51
int c, column;
usr.bin/expand/expand.c
64
while ((c = getopt (argc, argv, "t:")) != -1) {
usr.bin/expand/expand.c
65
switch (c) {
usr.bin/expand/expand.c
84
while ((c = getchar()) != EOF) {
usr.bin/expand/expand.c
85
switch (c) {
usr.bin/file/magic-load.c
35
magic_odigit(u_char c)
usr.bin/file/magic-load.c
37
if (c >= '0' && c <= '7')
usr.bin/file/magic-load.c
38
return (c - '0');
usr.bin/file/magic-load.c
418
char *start, *cp, c;
usr.bin/file/magic-load.c
428
switch (c = *++cp) {
usr.bin/file/magic-load.c
43
magic_xdigit(u_char c)
usr.bin/file/magic-load.c
45
if (c >= '0' && c <= '9')
usr.bin/file/magic-load.c
46
return (c - '0');
usr.bin/file/magic-load.c
47
if (c >= 'a' && c <= 'f')
usr.bin/file/magic-load.c
48
return (10 + c - 'a');
usr.bin/file/magic-load.c
49
if (c >= 'A' && c <= 'F')
usr.bin/file/magic-load.c
50
return (10 + c - 'A');
usr.bin/file/magic-load.c
510
*out++ = c;
usr.bin/file/text.c
102
text_is_extended(u_char c)
usr.bin/file/text.c
104
if (c >= 128)
usr.bin/file/text.c
106
return (text_is_ascii(c));
usr.bin/file/text.c
82
text_is_ascii(u_char c)
usr.bin/file/text.c
86
if (c == '\0')
usr.bin/file/text.c
88
if (strchr(cc, c) != NULL)
usr.bin/file/text.c
90
return (c > 31 && c < 127);
usr.bin/file/text.c
94
text_is_latin1(u_char c)
usr.bin/file/text.c
96
if (c >= 160)
usr.bin/file/text.c
98
return (text_is_ascii(c));
usr.bin/find/function.c
593
u_int c, bufsize;
usr.bin/find/function.c
620
for (argv = *argvp, c = 0, cnt = 0;
usr.bin/find/function.c
623
c += strlen(*argv) + 1;
usr.bin/find/function.c
626
if (arg_max < 4 * 1024 + c)
usr.bin/find/function.c
628
bufsize = arg_max - 4 * 1024 - c;
usr.bin/finger/net.c
121
while ((c = getc(fp)) != EOF) {
usr.bin/finger/net.c
122
c &= 0x7f;
usr.bin/finger/net.c
123
if (c == '\r') {
usr.bin/finger/net.c
126
c = '\n';
usr.bin/finger/net.c
129
if (!isprint(c) && !isspace(c))
usr.bin/finger/net.c
130
c |= 0x40;
usr.bin/finger/net.c
131
if (lastc != '\r' || c != '\n')
usr.bin/finger/net.c
132
lastc = c;
usr.bin/finger/net.c
138
putchar(c);
usr.bin/finger/net.c
51
int c, lastc;
usr.bin/fold/fold.c
263
isu8cont(unsigned char c)
usr.bin/fold/fold.c
265
return MB_CUR_MAX > 1 && (c & (0x80 | 0x40)) == 0x80;
usr.bin/ftp/cmds.c
1314
struct cmd *c;
usr.bin/ftp/cmds.c
1323
c = getcmd(argv[1]);
usr.bin/ftp/cmds.c
1324
if (c == (struct cmd *) -1) {
usr.bin/ftp/cmds.c
1330
if (c == 0) {
usr.bin/ftp/cmds.c
1336
if (!c->c_proxy) {
usr.bin/ftp/cmds.c
1348
if (c->c_conn && !connected) {
usr.bin/ftp/cmds.c
1359
(*c->c_handler)(argc-1, argv+1);
usr.bin/ftp/cmds.c
1511
int c;
usr.bin/ftp/cmds.c
1534
if ((c = getchar()) == EOF) {
usr.bin/ftp/cmds.c
1539
if ((*tmp = c) == '\n') {
usr.bin/ftp/cmds.c
1555
while ((c = getchar()) != '\n' && c != EOF)
usr.bin/ftp/cmds.c
1557
if (c == EOF || getchar() == '\n') {
usr.bin/ftp/cmdtab.c
180
{ "proxy", H(proxyhelp), 0, 0, 1, CMPL(c) doproxy },
usr.bin/ftp/complete.c
127
struct cmd *c;
usr.bin/ftp/complete.c
135
for (c = cmdtab; c->c_name != NULL; c++) {
usr.bin/ftp/complete.c
136
if (wordlen > strlen(c->c_name))
usr.bin/ftp/complete.c
138
if (strncmp(word, c->c_name, wordlen) == 0)
usr.bin/ftp/complete.c
139
sl_add(words, c->c_name);
usr.bin/ftp/complete.c
286
struct cmd *c;
usr.bin/ftp/complete.c
317
c = getcmd(margv[0]);
usr.bin/ftp/complete.c
318
if (c == (struct cmd *)-1 || c == 0)
usr.bin/ftp/complete.c
320
celems = strlen(c->c_complete);
usr.bin/ftp/complete.c
324
&& isupper((unsigned char)c->c_complete[celems - 1]))
usr.bin/ftp/complete.c
330
switch (c->c_complete[cursor_argc - 1]) {
usr.bin/ftp/domacro.c
112
c = getcmd(margv[0]);
usr.bin/ftp/domacro.c
113
if (c == (struct cmd *)-1) {
usr.bin/ftp/domacro.c
116
} else if (c == 0) {
usr.bin/ftp/domacro.c
119
} else if (c->c_conn && !connected) {
usr.bin/ftp/domacro.c
127
(*c->c_handler)(margc, margv);
usr.bin/ftp/domacro.c
128
if (bell && c->c_bell) {
usr.bin/ftp/domacro.c
47
struct cmd *c;
usr.bin/ftp/fetch.c
120
const unsigned char *c = (const unsigned char *)c0;
usr.bin/ftp/fetch.c
126
return (iscntrl(*c) || !isascii(*c) ||
usr.bin/ftp/fetch.c
132
strchr(excluded_chars, *c) != NULL ||
usr.bin/ftp/fetch.c
133
(*c == '%' && (!isxdigit(c[1]) || !isxdigit(c[2]))));
usr.bin/ftp/fetch.c
1565
char *ret, c;
usr.bin/ftp/fetch.c
1573
c = str[i];
usr.bin/ftp/fetch.c
1574
if (c == '+') {
usr.bin/ftp/fetch.c
1582
if (c == '%' && isxdigit((unsigned char)str[i + 1]) &&
usr.bin/ftp/fetch.c
1588
*ret = c;
usr.bin/ftp/fetch.c
1618
unsigned char c, ret;
usr.bin/ftp/fetch.c
1620
c = str[0];
usr.bin/ftp/fetch.c
1621
ret = c;
usr.bin/ftp/fetch.c
1622
if (isalpha(c))
usr.bin/ftp/fetch.c
1623
ret -= isupper(c) ? 'A' - 10 : 'a' - 10;
usr.bin/ftp/fetch.c
1628
c = str[1];
usr.bin/ftp/fetch.c
1629
ret += c;
usr.bin/ftp/fetch.c
1630
if (isalpha(c))
usr.bin/ftp/fetch.c
1631
ret -= isupper(c) ? 'A' - 10 : 'a' - 10;
usr.bin/ftp/ftp.c
1063
while ((c = read(fileno(din), buf, bufsize)) > 0) {
usr.bin/ftp/ftp.c
1065
size_t rd = c;
usr.bin/ftp/ftp.c
1077
} while (d < c);
usr.bin/ftp/ftp.c
1080
bytes += c;
usr.bin/ftp/ftp.c
1089
if (c == -1 || d < c)
usr.bin/ftp/ftp.c
1097
if (c < 0) {
usr.bin/ftp/ftp.c
1102
if (d < c) {
usr.bin/ftp/ftp.c
1139
while ((c = fgetc(din)) != EOF) {
usr.bin/ftp/ftp.c
1141
if (c == '\n')
usr.bin/ftp/ftp.c
1143
while (c == '\r') {
usr.bin/ftp/ftp.c
1151
if ((c = fgetc(din)) != '\n' || tcrflag) {
usr.bin/ftp/ftp.c
1155
if (c == '\0') {
usr.bin/ftp/ftp.c
1159
if (c == EOF)
usr.bin/ftp/ftp.c
1163
(void)putc(c, fout);
usr.bin/ftp/ftp.c
440
int c, n, lineno;
usr.bin/ftp/ftp.c
452
while ((c = fgetc(cin)) != '\n') {
usr.bin/ftp/ftp.c
453
if (c == IAC) { /* handle telnet commands */
usr.bin/ftp/ftp.c
454
switch (c = fgetc(cin)) {
usr.bin/ftp/ftp.c
457
c = fgetc(cin);
usr.bin/ftp/ftp.c
458
fprintf(cout, "%c%c%c", IAC, DONT, c);
usr.bin/ftp/ftp.c
463
c = fgetc(cin);
usr.bin/ftp/ftp.c
464
fprintf(cout, "%c%c%c", IAC, WONT, c);
usr.bin/ftp/ftp.c
473
if (c == EOF) {
usr.bin/ftp/ftp.c
488
if (c != '\r' && (verbose > 0 ||
usr.bin/ftp/ftp.c
490
(((!n && c < '5') || (n && n < '5')) ||
usr.bin/ftp/ftp.c
495
(void)putc(c, ttyout);
usr.bin/ftp/ftp.c
497
if (dig < 4 && isdigit(c))
usr.bin/ftp/ftp.c
498
code = code * 10 + (c - '0');
usr.bin/ftp/ftp.c
503
if (dig > 4 && pflag == 1 && isdigit(c))
usr.bin/ftp/ftp.c
506
if (c != '\r' && c != ')') {
usr.bin/ftp/ftp.c
508
*pt++ = c;
usr.bin/ftp/ftp.c
514
if (pflag == 100 && c == '(')
usr.bin/ftp/ftp.c
516
if (dig == 4 && c == '-') {
usr.bin/ftp/ftp.c
522
n = c;
usr.bin/ftp/ftp.c
524
*cp++ = c;
usr.bin/ftp/ftp.c
528
(void)putc(c, ttyout);
usr.bin/ftp/ftp.c
579
int c, d;
usr.bin/ftp/ftp.c
746
while ((c = read(fileno(fin), buf, sizeof(buf))) > 0) {
usr.bin/ftp/ftp.c
748
bytes += c;
usr.bin/ftp/ftp.c
749
for (bufp = buf; c > 0; c -= d, bufp += d)
usr.bin/ftp/ftp.c
750
if ((d = write(fileno(dout), bufp, (size_t)c))
usr.bin/ftp/ftp.c
761
if (c == -1 || d == -1)
usr.bin/ftp/ftp.c
769
if (c < 0)
usr.bin/ftp/ftp.c
779
while ((c = fgetc(fin)) != EOF) {
usr.bin/ftp/ftp.c
781
if (c == '\n') {
usr.bin/ftp/ftp.c
793
(void)putc(c, dout);
usr.bin/ftp/ftp.c
873
int c, d, serrno;
usr.bin/ftp/main.c
1028
struct cmd *c;
usr.bin/ftp/main.c
1036
for (c = cmdtab; c < &cmdtab[NCMDS]; c++)
usr.bin/ftp/main.c
1037
if (c->c_name && (!proxy || c->c_proxy))
usr.bin/ftp/main.c
1038
sl_add(buf, c->c_name);
usr.bin/ftp/main.c
1050
c = getcmd(arg);
usr.bin/ftp/main.c
1051
if (c == (struct cmd *)-1)
usr.bin/ftp/main.c
1053
else if (c == NULL)
usr.bin/ftp/main.c
1057
c->c_name, c->c_help);
usr.bin/ftp/main.c
737
struct cmd *c;
usr.bin/ftp/main.c
789
c = getcmd(margv[0]);
usr.bin/ftp/main.c
790
if (c == (struct cmd *)-1) {
usr.bin/ftp/main.c
794
if (c == 0) {
usr.bin/ftp/main.c
805
if (c->c_conn && !connected) {
usr.bin/ftp/main.c
810
(*c->c_handler)(margc, margv);
usr.bin/ftp/main.c
811
if (bell && c->c_bell)
usr.bin/ftp/main.c
813
if (c->c_handler != help)
usr.bin/ftp/main.c
824
struct cmd *c, *found;
usr.bin/ftp/main.c
833
for (c = cmdtab; (p = c->c_name) != NULL; c++) {
usr.bin/ftp/main.c
836
return (c);
usr.bin/ftp/main.c
841
found = c;
usr.bin/ftp/ruserpass.c
188
while ((c = fgetc(cfile)) != EOF)
usr.bin/ftp/ruserpass.c
189
if (c != ' ' && c != '\t')
usr.bin/ftp/ruserpass.c
191
if (c == EOF || c == '\n') {
usr.bin/ftp/ruserpass.c
201
*tmp++ = c;
usr.bin/ftp/ruserpass.c
202
for (i=0; i < 8 && (c = fgetc(cfile)) != EOF &&
usr.bin/ftp/ruserpass.c
203
!isspace(c); ++i) {
usr.bin/ftp/ruserpass.c
204
*tmp++ = c;
usr.bin/ftp/ruserpass.c
206
if (c == EOF) {
usr.bin/ftp/ruserpass.c
212
if (c != '\n') {
usr.bin/ftp/ruserpass.c
213
while ((c = fgetc(cfile)) != EOF && c != '\n');
usr.bin/ftp/ruserpass.c
215
if (c == EOF) {
usr.bin/ftp/ruserpass.c
229
if ((c = fgetc(cfile)) == EOF) {
usr.bin/ftp/ruserpass.c
234
*tmp = c;
usr.bin/ftp/ruserpass.c
273
int c;
usr.bin/ftp/ruserpass.c
278
while ((c = fgetc(cfile)) != EOF &&
usr.bin/ftp/ruserpass.c
279
(c == '\n' || c == '\t' || c == ' ' || c == ','))
usr.bin/ftp/ruserpass.c
281
if (c == EOF)
usr.bin/ftp/ruserpass.c
284
if (c == '"') {
usr.bin/ftp/ruserpass.c
285
while ((c = fgetc(cfile)) != EOF && c != '"') {
usr.bin/ftp/ruserpass.c
286
if (c == '\\' && (c = fgetc(cfile)) == EOF)
usr.bin/ftp/ruserpass.c
288
*cp++ = c;
usr.bin/ftp/ruserpass.c
295
*cp++ = c;
usr.bin/ftp/ruserpass.c
296
while ((c = fgetc(cfile)) != EOF
usr.bin/ftp/ruserpass.c
297
&& c != '\n' && c != '\t' && c != ' ' && c != ',') {
usr.bin/ftp/ruserpass.c
298
if (c == '\\' && (c = fgetc(cfile)) == EOF)
usr.bin/ftp/ruserpass.c
300
*cp++ = c;
usr.bin/ftp/ruserpass.c
80
int t, i, c, usedefault = 0;
usr.bin/ftp/util.c
178
char *cp, c;
usr.bin/ftp/util.c
179
c = 0;
usr.bin/ftp/util.c
186
c = *cp;
usr.bin/ftp/util.c
192
*cp = c;
usr.bin/gencat/gencat.c
135
int c;
usr.bin/gencat/gencat.c
140
while ((c = getopt(argc, argv, "")) != -1) {
usr.bin/gencat/gencat.c
141
switch (c) {
usr.bin/gencat/gencat.c
69
#define ISSPACE(c) \
usr.bin/gencat/gencat.c
70
(isascii((unsigned char)c) && isspace((unsigned char)c))
usr.bin/getopt/getopt.c
18
int c;
usr.bin/getopt/getopt.c
25
while ((c = getopt(argc, argv, argv[1])) != -1)
usr.bin/getopt/getopt.c
26
switch (c) {
usr.bin/getopt/getopt.c
32
printf(" -%c %s", c, optarg);
usr.bin/getopt/getopt.c
34
printf(" -%c", c);
usr.bin/gprof/elf.c
160
const char *c = strtab + sym->st_name;
usr.bin/gprof/elf.c
161
if (c[0] == '$')
usr.bin/grep/file.c
62
int c;
usr.bin/grep/file.c
65
c = gzgetc(f);
usr.bin/grep/file.c
66
if (c == -1) {
usr.bin/grep/file.c
83
if (c == '\n')
usr.bin/grep/file.c
85
lnbuf[n] = c;
usr.bin/grep/grep.c
250
int c, lastc, prevoptind, newarg, i, needpattern, exprs, expr_sz;
usr.bin/grep/grep.c
288
while ((c = getopt_long(argc, argv, optstr,
usr.bin/grep/grep.c
290
switch (c) {
usr.bin/grep/grep.c
297
Aflag = Bflag = (Aflag * 10) + (c - '0');
usr.bin/grep/grep.c
304
if (c == 'A')
usr.bin/grep/grep.c
450
lastc = c;
usr.bin/grep/grep.c
504
c = regcomp(&r_pattern[i], pattern[i], cflags);
usr.bin/grep/grep.c
505
if (c != 0) {
usr.bin/grep/grep.c
506
regerror(c, &r_pattern[i], re_error,
usr.bin/grep/grep.c
524
c = grep_tree(argv);
usr.bin/grep/grep.c
526
for (c = 0; argc--; ++argv)
usr.bin/grep/grep.c
527
c |= procfile(*argv);
usr.bin/grep/grep.c
529
exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1));
usr.bin/grep/util.c
101
return c;
usr.bin/grep/util.c
110
unsigned long long c;
usr.bin/grep/util.c
146
for (c = 0; c == 0 || !(lflag || qflag); ) {
usr.bin/grep/util.c
162
if (ULLONG_MAX - c < (unsigned long long)t)
usr.bin/grep/util.c
165
c += t;
usr.bin/grep/util.c
176
printf("%llu%s\n", c, overflow ? "+" : "");
usr.bin/grep/util.c
178
if (lflag && c != 0)
usr.bin/grep/util.c
180
if (Lflag && c == 0)
usr.bin/grep/util.c
182
if (c && !cflag && !lflag && !Lflag &&
usr.bin/grep/util.c
186
return overflow || c != 0;
usr.bin/grep/util.c
200
int c, i, r, counted;
usr.bin/grep/util.c
209
c = 0;
usr.bin/grep/util.c
213
c = 1;
usr.bin/grep/util.c
243
c = 1;
usr.bin/grep/util.c
250
return c;
usr.bin/grep/util.c
253
c = !c;
usr.bin/grep/util.c
257
mcount -= c;
usr.bin/grep/util.c
261
if (c && binbehave == BIN_FILE_BIN && nottext)
usr.bin/grep/util.c
262
return c; /* Binary file */
usr.bin/grep/util.c
264
if ((tail > 0 || c) && !cflag && !qflag) {
usr.bin/grep/util.c
265
if (c) {
usr.bin/grep/util.c
284
return c;
usr.bin/grep/util.c
63
int c, fts_flags;
usr.bin/grep/util.c
646
char c;
usr.bin/grep/util.c
649
c = str[i];
usr.bin/grep/util.c
651
str[len - i - 1] = c;
usr.bin/grep/util.c
71
c = 0;
usr.bin/grep/util.c
94
c |= procfile(path);
usr.bin/htpasswd/htpasswd.c
53
int c, fd, loginlen, batch = 0;
usr.bin/htpasswd/htpasswd.c
60
while ((c = getopt(argc, argv, "I")) != -1) {
usr.bin/htpasswd/htpasswd.c
61
switch (c) {
usr.bin/indent/indent.c
1228
int c;
usr.bin/indent/indent.c
1230
while ((c = getc(input)) == '\n');
usr.bin/indent/indent.c
1231
ungetc(c, input);
usr.bin/infocmp/infocmp.c
1539
int c;
usr.bin/infocmp/infocmp.c
1571
while ((c = getopt(argc,
usr.bin/infocmp/infocmp.c
1574
switch (c) {
usr.bin/ipcrm/ipcrm.c
114
int c, result, errflg, target_id;
usr.bin/ipcrm/ipcrm.c
120
while ((c = getopt(argc, argv, ":q:m:s:Q:M:S:")) != -1) {
usr.bin/ipcrm/ipcrm.c
122
switch (c) {
usr.bin/ipcrm/ipcrm.c
128
errx(1, "-%c %s: %s\n", c, optarg, errstr);
usr.bin/ipcrm/ipcrm.c
129
if (c == 'q')
usr.bin/ipcrm/ipcrm.c
131
else if (c == 'm')
usr.bin/ipcrm/ipcrm.c
139
IPC_TO_STR(toupper(c)), target_id);
usr.bin/ipcrm/ipcrm.c
142
IPC_TO_STRING(toupper(c)));
usr.bin/ipcrm/ipcrm.c
150
warnx("can't remove private %ss", IPC_TO_STRING(c));
usr.bin/ipcrm/ipcrm.c
153
if (c == 'Q')
usr.bin/ipcrm/ipcrm.c
155
else if (c == 'M')
usr.bin/ipcrm/ipcrm.c
162
warn("%skey(%ld)", IPC_TO_STR(c),
usr.bin/ipcrm/ipcrm.c
166
IPC_TO_STRING(c));
usr.bin/kdump/kdump.c
1275
unsigned char c;
usr.bin/kdump/kdump.c
1316
c = dp[i+j];
usr.bin/kdump/kdump.c
1317
if (!isprint(c))
usr.bin/kdump/kdump.c
1318
c = '.';
usr.bin/kdump/kdump.c
1319
putchar(c);
usr.bin/lam/lam.c
241
int c, width;
usr.bin/lam/lam.c
245
for (p = s; (c = fgetc(ip->fp)) != EOF && p < end; p++)
usr.bin/lam/lam.c
246
if ((*p = c) == ip->eol)
usr.bin/lam/lam.c
249
if (c == EOF) {
usr.bin/ldap/aldap.c
1343
isu8cont(unsigned char c)
usr.bin/ldap/aldap.c
1345
return (c & (0x80 | 0x40)) == 0x80;
usr.bin/ldap/aldap.c
255
struct ber_element *root = NULL, *ber, *c;
usr.bin/ldap/aldap.c
268
c = ber;
usr.bin/ldap/aldap.c
290
aldap_create_page_control(c, 100, page);
usr.bin/ldap/aldap.c
314
struct ber c;
usr.bin/ldap/aldap.c
317
c.br_wbuf = NULL;
usr.bin/ldap/aldap.c
330
if ((len = ober_write_elements(&c, ber)) < 1)
usr.bin/ldap/aldap.c
333
c.br_wbuf, (size_t)len) == NULL)
usr.bin/ldap/aldap.c
337
ober_free(&c);
usr.bin/ldap/aldap.c
342
ober_free(&c);
usr.bin/leave/leave.c
61
char c, *cp;
usr.bin/leave/leave.c
91
for (hours = 0; (c = *cp) && c != '\n'; ++cp) {
usr.bin/leave/leave.c
92
if (!isdigit((unsigned char)c))
usr.bin/leave/leave.c
94
hours = hours * 10 + (c - '0');
usr.bin/less/brac.c
30
int c;
usr.bin/less/brac.c
53
if ((c = ch_forw_get()) == '\n' || c == EOI) {
usr.bin/less/brac.c
60
} while (c != obrac || --n > 0);
usr.bin/less/brac.c
76
while ((c = (*chget)()) != EOI) {
usr.bin/less/brac.c
77
if (c == obrac) {
usr.bin/less/brac.c
81
} else if (c == cbrac && --nest < 0) {
usr.bin/less/ch.c
341
ch_ungetchar(int c)
usr.bin/less/ch.c
343
if (c != -1 && ch_ungotchar != -1)
usr.bin/less/ch.c
345
ch_ungotchar = c;
usr.bin/less/ch.c
554
int c;
usr.bin/less/ch.c
558
c = ch_get();
usr.bin/less/ch.c
559
if (c == EOI)
usr.bin/less/ch.c
567
return (c);
usr.bin/less/charset.c
173
control_char(LWCHAR c)
usr.bin/less/charset.c
175
c &= 0377;
usr.bin/less/charset.c
177
return (iscntrl((unsigned char)c));
usr.bin/less/charset.c
178
return (iscntrl((unsigned char)c) || !isprint((unsigned char)c));
usr.bin/less/charset.c
186
prchar(LWCHAR c)
usr.bin/less/charset.c
191
c &= 0377;
usr.bin/less/charset.c
192
if ((c < 128 || !utf_mode) && !control_char(c))
usr.bin/less/charset.c
193
(void) snprintf(buf, sizeof (buf), "%c", (int)c);
usr.bin/less/charset.c
194
else if (c == ESC)
usr.bin/less/charset.c
196
else if (c < 128 && !control_char(c ^ 0100))
usr.bin/less/charset.c
197
(void) snprintf(buf, sizeof (buf), "^%c", (int)(c ^ 0100));
usr.bin/less/charset.c
199
(void) snprintf(buf, sizeof (buf), binfmt, c);
usr.bin/less/charset.c
33
char c;
usr.bin/less/charset.c
46
while ((c = *s++) != 0) {
usr.bin/less/charset.c
47
if (!isascii(c) || !isprint(c)) {
usr.bin/less/charset.c
50
if (c != '%') {
usr.bin/less/charset.h
12
#define IS_UTF8_TRAIL(c) (((c) & 0xC0) == 0x80)
usr.bin/less/charset.h
13
#define IS_UTF8_INVALID(c) (((c) & 0xFE) == 0xFE)
usr.bin/less/charset.h
14
#define IS_UTF8_LEAD(c) (((c) & 0xC0) == 0xC0 && !IS_UTF8_INVALID(c))
usr.bin/less/cmdbuf.c
1050
cmd_char(int c)
usr.bin/less/cmdbuf.c
1056
cmd_mbc_buf[0] = c & 0xff;
usr.bin/less/cmdbuf.c
1063
*cmd_mbc_buf = c & 0xff;
usr.bin/less/cmdbuf.c
1064
if (isascii((unsigned char)c))
usr.bin/less/cmdbuf.c
1066
else if (IS_UTF8_LEAD(c)) {
usr.bin/less/cmdbuf.c
1067
cmd_mbc_buf_len = utf_len(c);
usr.bin/less/cmdbuf.c
1074
} else if (IS_UTF8_TRAIL(c)) {
usr.bin/less/cmdbuf.c
1075
cmd_mbc_buf[cmd_mbc_buf_index++] = c & 0xff;
usr.bin/less/cmdbuf.c
1111
action = cmd_edit(c);
usr.bin/less/cmdbuf.c
708
cmd_edit(int c)
usr.bin/less/cmdbuf.c
730
action = editchar(c, flags);
usr.bin/less/cmdbuf.c
899
char c;
usr.bin/less/cmdbuf.c
925
c = *cp;
usr.bin/less/cmdbuf.c
937
*cp = c;
usr.bin/less/command.c
1004
if (cmd_char(c) == CC_QUIT || len_cmdbuf() == 0)
usr.bin/less/command.c
1016
tbuf[0] = (char)c;
usr.bin/less/command.c
1307
c = getcc();
usr.bin/less/command.c
1319
c = getcc();
usr.bin/less/command.c
1325
c = getcc();
usr.bin/less/command.c
1397
c = getcc();
usr.bin/less/command.c
1521
c = getcc();
usr.bin/less/command.c
1531
c = getcc();
usr.bin/less/command.c
1539
c = getcc();
usr.bin/less/command.c
1549
c = getcc();
usr.bin/less/command.c
1550
if (c == erase_char || c == erase2_char ||
usr.bin/less/command.c
1551
c == kill_char || c == '\n' || c == '\r')
usr.bin/less/command.c
1553
setmark(c);
usr.bin/less/command.c
1561
c = getcc();
usr.bin/less/command.c
1562
if (c == erase_char || c == erase2_char ||
usr.bin/less/command.c
1563
c == kill_char || c == '\n' || c == '\r')
usr.bin/less/command.c
1566
gomark(c);
usr.bin/less/command.c
1575
c = getcc();
usr.bin/less/command.c
1576
if (c == erase_char || c == erase2_char ||
usr.bin/less/command.c
1577
c == kill_char)
usr.bin/less/command.c
1579
if (c == '\n' || c == '\r')
usr.bin/less/command.c
1580
c = '.';
usr.bin/less/command.c
1581
if (badmark(c))
usr.bin/less/command.c
1583
pipec = c;
usr.bin/less/command.c
1585
c = getcc();
usr.bin/less/command.c
1591
c = getcc();
usr.bin/less/command.c
1626
(void) cmd_char(c);
usr.bin/less/command.c
1628
c = getcc();
usr.bin/less/command.c
255
is_erase_char(int c)
usr.bin/less/command.c
257
return (c == erase_char || c == erase2_char || c == kill_char);
usr.bin/less/command.c
264
mca_opt_first_char(int c)
usr.bin/less/command.c
269
switch (c) {
usr.bin/less/command.c
277
switch (c) {
usr.bin/less/command.c
312
mca_opt_nonfirst_char(int c)
usr.bin/less/command.c
322
if (is_erase_char(c))
usr.bin/less/command.c
330
if (cmd_char(c) == CC_QUIT)
usr.bin/less/command.c
344
c = *p;
usr.bin/less/command.c
345
if (!opt_lower && islower(c))
usr.bin/less/command.c
346
c = toupper(c);
usr.bin/less/command.c
347
if (cmd_char(c) != CC_OK)
usr.bin/less/command.c
358
mca_opt_char(int c)
usr.bin/less/command.c
368
int ret = mca_opt_first_char(c);
usr.bin/less/command.c
374
if (c != '\n' && c != '\r')
usr.bin/less/command.c
375
return (mca_opt_nonfirst_char(c));
usr.bin/less/command.c
384
if (is_erase_char(c))
usr.bin/less/command.c
389
curropt = findopt(c);
usr.bin/less/command.c
391
parg.p_string = propt(c);
usr.bin/less/command.c
403
toggle_option(curropt, islower(c), "", optflag);
usr.bin/less/command.c
417
mca_search_char(int c)
usr.bin/less/command.c
431
switch (c) {
usr.bin/less/command.c
467
mca_char(int c)
usr.bin/less/command.c
492
if (!((c >= '0' && c <= '9') || c == '.') && editchar(c,
usr.bin/less/command.c
508
ret = mca_opt_char(c);
usr.bin/less/command.c
516
ret = mca_search_char(c);
usr.bin/less/command.c
529
if (c == '\n' || c == '\r') {
usr.bin/less/command.c
540
if (cmd_char(c) == CC_QUIT)
usr.bin/less/command.c
747
int c = ug->ug_char;
usr.bin/less/command.c
751
return (c);
usr.bin/less/command.c
760
ungetcc(int c)
usr.bin/less/command.c
764
ug->ug_char = c;
usr.bin/less/command.c
917
int c = 0;
usr.bin/less/command.c
956
c = getcc();
usr.bin/less/command.c
972
switch (mca_char(c)) {
usr.bin/less/command.c
977
c = getcc();
usr.bin/less/decode.c
567
int c;
usr.bin/less/decode.c
581
c = *p++;
usr.bin/less/decode.c
582
switch (c) {
usr.bin/less/decode.c
709
editchar(int c, int flags)
usr.bin/less/decode.c
723
if (c == erase_char || c == erase2_char)
usr.bin/less/decode.c
725
if (c == kill_char)
usr.bin/less/decode.c
735
c = getcc();
usr.bin/less/decode.c
736
usercmd[nch] = (char)c;
usr.bin/less/edit.c
586
int c;
usr.bin/less/edit.c
588
while ((c = ch_forw_get()) != EOI)
usr.bin/less/edit.c
589
putchr(c);
usr.bin/less/filename.c
103
metachar(char c)
usr.bin/less/filename.c
105
return (strchr(metachars(), c) != NULL);
usr.bin/less/filename.c
112
must_quote(char c)
usr.bin/less/filename.c
114
return (c == '\n');
usr.bin/less/filename.c
244
#define fchar_ifile(c) \
usr.bin/less/filename.c
245
((c) == '%' ? curr_ifile : (c) == '#' ? old_ifile : NULL)
usr.bin/less/input.c
103
c = ch_forw_get();
usr.bin/less/input.c
104
backchars = pappend(c, new_pos);
usr.bin/less/input.c
119
c = ch_forw_get();
usr.bin/less/input.c
120
if (c == EOI) {
usr.bin/less/input.c
124
blankline = (c == '\n' || c == '\r');
usr.bin/less/input.c
134
if (c == '\n' || c == EOI) {
usr.bin/less/input.c
147
if (c != '\r')
usr.bin/less/input.c
153
backchars = pappend(c, ch_tell()-1);
usr.bin/less/input.c
166
c = ch_forw_get();
usr.bin/less/input.c
167
} while (c != '\n' && c != EOI);
usr.bin/less/input.c
177
c = ch_forw_get();
usr.bin/less/input.c
200
while ((c = ch_forw_get()) == '\n' || c == '\r')
usr.bin/less/input.c
205
if (c != EOI)
usr.bin/less/input.c
224
int c;
usr.bin/less/input.c
246
c = ch_forw_get(); /* First char of "current" line */
usr.bin/less/input.c
250
if (c == '\n' || c == '\r') {
usr.bin/less/input.c
256
while ((c = ch_back_get()) == '\n' || c == '\r')
usr.bin/less/input.c
261
if (c == EOI) {
usr.bin/less/input.c
277
c = ch_back_get();
usr.bin/less/input.c
278
if (c == '\n') {
usr.bin/less/input.c
286
if (c == EOI) {
usr.bin/less/input.c
319
c = ch_forw_get();
usr.bin/less/input.c
320
if (c == EOI || abort_sigs()) {
usr.bin/less/input.c
325
if (c == '\n') {
usr.bin/less/input.c
334
backchars = pappend(c, ch_tell()-1);
usr.bin/less/input.c
380
int c;
usr.bin/less/input.c
386
c = ch_forw_get();
usr.bin/less/input.c
387
if (c == EOI)
usr.bin/less/input.c
389
if (c != '\n' && c != '\r')
usr.bin/less/input.c
396
c = ch_forw_get();
usr.bin/less/input.c
398
if (c == EOI || c == '\n' || c == '\r')
usr.bin/less/input.c
47
int c;
usr.bin/less/input.c
81
c = ch_back_get();
usr.bin/less/input.c
82
if (c == EOI)
usr.bin/less/input.c
84
if (c == '\n') {
usr.bin/less/jump.c
142
int c;
usr.bin/less/jump.c
148
while ((c = ch_back_get()) != '\n' && c != EOI)
usr.bin/less/jump.c
150
if (c == '\n')
usr.bin/less/less.h
151
#define CONTROL(c) ((c)&037)
usr.bin/less/less.h
38
#define IS_SPACE(c) isspace((unsigned char)(c))
usr.bin/less/less.h
39
#define IS_DIGIT(c) isdigit((unsigned char)(c))
usr.bin/less/lesskey.c
497
add_cmd_char(int c)
usr.bin/less/lesskey.c
503
*(currtable->pbuffer)++ = (char)c;
usr.bin/less/lesskey.c
562
char c;
usr.bin/less/lesskey.c
569
c = val % KRADIX;
usr.bin/less/lesskey.c
570
(void) fwrite(&c, sizeof (char), 1, fd);
usr.bin/less/lesskey.c
571
c = val / KRADIX;
usr.bin/less/lesskey.c
572
(void) fwrite(&c, sizeof (char), 1, fd);
usr.bin/less/lesskey.c
605
char c;
usr.bin/less/lesskey.c
636
c = *p;
usr.bin/less/lesskey.c
647
*p = c;
usr.bin/less/line.c
1027
int c;
usr.bin/less/line.c
1031
(c = ch_forw_get()) == EOI)
usr.bin/less/line.c
1036
if (c == '\n' || c == EOI || abort_sigs()) {
usr.bin/less/line.c
1050
linebuf[n++] = (char)c;
usr.bin/less/line.c
1051
c = ch_forw_get();
usr.bin/less/line.c
1069
int c;
usr.bin/less/line.c
1078
c = ch_back_get();
usr.bin/less/line.c
1079
if (c == '\n' || abort_sigs()) {
usr.bin/less/line.c
1087
if (c == EOI) {
usr.bin/less/line.c
1112
linebuf[--n] = c;
usr.bin/less/line.c
218
unsigned char c; /* First byte of current character. */
usr.bin/less/line.c
231
c = linebuf[from];
usr.bin/less/line.c
232
if (ctldisp == OPT_ONPLUS && c == ESC) {
usr.bin/less/line.c
234
linebuf[to] = c;
usr.bin/less/line.c
244
if (utf_mode && !isascii(c)) {
usr.bin/less/line.c
260
if (c == '\b')
usr.bin/less/line.c
264
width = iscntrl(c) ? 0 : 1;
usr.bin/less/line.c
600
store_prchar(char c, off_t pos)
usr.bin/less/line.c
607
s = prchar(c);
usr.bin/less/line.c
642
pappend(char c, off_t pos)
usr.bin/less/line.c
659
if (c == '\r' && bs_mode == BS_SPECIAL) {
usr.bin/less/line.c
673
pendc = c;
usr.bin/less/line.c
679
r = do_append((LWCHAR) c, NULL, pos);
usr.bin/less/line.c
684
mbc_buf[mbc_buf_index++] = c;
usr.bin/less/line.c
701
r = store_prchar(c, pos);
usr.bin/less/line.c
973
set_status_col(char c)
usr.bin/less/line.c
975
linebuf[0] = c;
usr.bin/less/lsystem.c
153
pipe_mark(int c, char *cmd)
usr.bin/less/lsystem.c
162
mpos = markpos(c);
usr.bin/less/lsystem.c
170
if (c == '.')
usr.bin/less/lsystem.c
188
int c;
usr.bin/less/lsystem.c
216
c = EOI;
usr.bin/less/lsystem.c
221
c = ch_forw_get();
usr.bin/less/lsystem.c
222
if (c == EOI)
usr.bin/less/lsystem.c
224
if (putc(c, f) == EOF)
usr.bin/less/lsystem.c
231
while (c != '\n' && c != EOI) {
usr.bin/less/lsystem.c
232
c = ch_forw_get();
usr.bin/less/lsystem.c
233
if (c == EOI)
usr.bin/less/lsystem.c
235
if (putc(c, f) == EOF)
usr.bin/less/main.c
341
int c;
usr.bin/less/main.c
346
c = *ps;
usr.bin/less/main.c
348
if (len == 0 && islower(c))
usr.bin/less/main.c
350
c = tolower(c);
usr.bin/less/main.c
355
if (c != sc)
usr.bin/less/mark.c
115
m = getumark(c);
usr.bin/less/mark.c
131
badmark(int c)
usr.bin/less/mark.c
133
return (getmark(c) == NULL);
usr.bin/less/mark.c
140
setmark(int c)
usr.bin/less/mark.c
145
m = getumark(c);
usr.bin/less/mark.c
174
gomark(int c)
usr.bin/less/mark.c
179
m = getmark(c);
usr.bin/less/mark.c
219
markpos(int c)
usr.bin/less/mark.c
223
m = getmark(c);
usr.bin/less/mark.c
51
getumark(int c)
usr.bin/less/mark.c
53
if (c >= 'a' && c <= 'z')
usr.bin/less/mark.c
54
return (&marks[c-'a']);
usr.bin/less/mark.c
56
if (c >= 'A' && c <= 'Z')
usr.bin/less/mark.c
57
return (&marks[c-'A'+26]);
usr.bin/less/mark.c
69
getmark(int c)
usr.bin/less/mark.c
74
switch (c) {
usr.bin/less/option.c
56
propt(int c)
usr.bin/less/option.c
60
(void) snprintf(buf, sizeof (buf), "-%s", prchar(c));
usr.bin/less/opttbl.c
454
findopt(int c)
usr.bin/less/opttbl.c
459
if (o->oletter == c)
usr.bin/less/opttbl.c
462
(toupper((unsigned char)o->oletter) == c))
usr.bin/less/opttbl.c
472
is_optchar(unsigned char c)
usr.bin/less/opttbl.c
474
if (isupper(c) || islower(c) || c == '-')
usr.bin/less/output.c
102
putchr(int c)
usr.bin/less/output.c
114
*ob++ = (char)c;
usr.bin/less/output.c
115
return (c);
usr.bin/less/output.c
227
int c;
usr.bin/less/output.c
229
c = getchr();
usr.bin/less/output.c
230
if (c != '\n' && c != '\r' && c != ' ' && c != READ_INTR)
usr.bin/less/output.c
231
ungetcc(c);
usr.bin/less/output.c
309
int c;
usr.bin/less/output.c
316
c = getchr();
usr.bin/less/output.c
320
return (c);
usr.bin/less/output.c
328
return (c);
usr.bin/less/output.c
35
int c;
usr.bin/less/output.c
47
for (i = 0; (c = gline(i, &a)) != '\0'; i++) {
usr.bin/less/output.c
49
if (c == '\b')
usr.bin/less/output.c
52
(void) putchr(c);
usr.bin/less/prompt.c
106
ap_char(char c)
usr.bin/less/prompt.c
110
buf[0] = c;
usr.bin/less/prompt.c
171
cond(char c, int where)
usr.bin/less/prompt.c
175
switch (c) {
usr.bin/less/prompt.c
220
protochar(int c, int where)
usr.bin/less/prompt.c
232
switch (c) {
usr.bin/less/prompt.c
437
int c;
usr.bin/less/prompt.c
455
if ((c = *++p) == '\0') {
usr.bin/less/prompt.c
460
if (!cond(c, where))
usr.bin/less/prompt.c
470
if ((c = *++p) == '\0') {
usr.bin/less/prompt.c
475
protochar(c, where);
usr.bin/less/screen.c
456
inc_costcount(int c)
usr.bin/less/screen.c
459
return (c);
usr.bin/less/tags.c
14
#define WHITESP(c) ((c) == ' ' || (c) == '\t')
usr.bin/less/ttyin.c
44
unsigned char c;
usr.bin/less/ttyin.c
48
result = iread(tty, &c, sizeof (char));
usr.bin/less/ttyin.c
63
if (c == '\0')
usr.bin/less/ttyin.c
64
c = 0340;
usr.bin/less/ttyin.c
67
return (c & 0xFF);
usr.bin/lex/FlexLexer.h
141
void yyunput( int c, char* buf_ptr );
usr.bin/lex/ccl.c
305
reverse_case(int c)
usr.bin/lex/ccl.c
307
return isupper(c) ? tolower(c) : (islower(c) ? toupper(c) : c);
usr.bin/lex/ccl.c
312
has_case(int c)
usr.bin/lex/ccl.c
314
return (isupper(c) || islower(c)) ? true : false;
usr.bin/lex/flexdef.h
1099
#define b_isalnum(c) (isalnum(c)?true:false)
usr.bin/lex/flexdef.h
1100
#define b_isalpha(c) (isalpha(c)?true:false)
usr.bin/lex/flexdef.h
1101
#define b_isascii(c) (isascii(c)?true:false)
usr.bin/lex/flexdef.h
1102
#define b_isblank(c) (isblank(c)?true:false)
usr.bin/lex/flexdef.h
1103
#define b_iscntrl(c) (iscntrl(c)?true:false)
usr.bin/lex/flexdef.h
1104
#define b_isdigit(c) (isdigit(c)?true:false)
usr.bin/lex/flexdef.h
1105
#define b_isgraph(c) (isgraph(c)?true:false)
usr.bin/lex/flexdef.h
1106
#define b_islower(c) (islower(c)?true:false)
usr.bin/lex/flexdef.h
1107
#define b_isprint(c) (isprint(c)?true:false)
usr.bin/lex/flexdef.h
1108
#define b_ispunct(c) (ispunct(c)?true:false)
usr.bin/lex/flexdef.h
1109
#define b_isspace(c) (isspace(c)?true:false)
usr.bin/lex/flexdef.h
1110
#define b_isupper(c) (isupper(c)?true:false)
usr.bin/lex/flexdef.h
1111
#define b_isxdigit(c) (isxdigit(c)?true:false)
usr.bin/lex/flexdef.h
1114
bool has_case(int c);
usr.bin/lex/flexdef.h
1117
int reverse_case(int c);
usr.bin/lex/flexdef.h
119
#define isascii(c) ((c) <= 0177)
usr.bin/lex/flexdef.h
815
extern void check_char PROTO ((int c));
usr.bin/lex/misc.c
210
check_char(int c)
usr.bin/lex/misc.c
212
if (c >= CSIZE)
usr.bin/lex/misc.c
214
readable_form(c));
usr.bin/lex/misc.c
216
if (c >= csize)
usr.bin/lex/misc.c
219
readable_form(c));
usr.bin/lex/misc.c
227
clower(int c)
usr.bin/lex/misc.c
229
return (u_char) ((isascii(c) && isupper(c)) ? tolower(c) : c);
usr.bin/lex/misc.c
266
u_char *c;
usr.bin/lex/misc.c
270
for (c = str; *c; ++c);
usr.bin/lex/misc.c
272
copy = allocate_Character_array(c - str + 1);
usr.bin/lex/misc.c
274
for (c = copy; (*c++ = *str++) != 0;);
usr.bin/lex/misc.c
556
u_char c, esc_char;
usr.bin/lex/misc.c
602
c = array[sptr];
usr.bin/lex/misc.c
607
array[sptr] = c;
usr.bin/lex/misc.c
625
c = array[sptr];
usr.bin/lex/misc.c
630
array[sptr] = c;
usr.bin/lex/misc.c
700
outc(int c)
usr.bin/lex/misc.c
702
fputc(c, stdout);
usr.bin/lex/misc.c
731
readable_form(int c)
usr.bin/lex/misc.c
735
if ((c >= 0 && c < 32) || c >= 127) {
usr.bin/lex/misc.c
736
switch (c) {
usr.bin/lex/misc.c
756
snprintf(rform, sizeof(rform), "\\%.3o", (unsigned int) c);
usr.bin/lex/misc.c
759
} else if (c == ' ')
usr.bin/lex/misc.c
763
rform[0] = c;
usr.bin/lex/parse.y
100
int c; \
usr.bin/lex/parse.y
101
for ( c = 0; c < csize; ++c ) \
usr.bin/lex/parse.y
102
if ( !func(c) ) \
usr.bin/lex/parse.y
103
ccladd( currccl, c ); \
usr.bin/lex/parse.y
91
int c; \
usr.bin/lex/parse.y
92
for ( c = 0; c < csize; ++c ) \
usr.bin/lex/parse.y
93
if ( isascii(c) && func(c) ) \
usr.bin/lex/parse.y
94
ccladd( currccl, c ); \
usr.bin/locale/locale.c
44
char c;
usr.bin/locale/locale.c
51
while ((c = *value++) != '\0')
usr.bin/locale/locale.c
52
switch (c) {
usr.bin/locale/locale.c
60
putchar(c);
usr.bin/locate/locate/fastfind.c
112
int c, cc;
usr.bin/locate/locate/fastfind.c
128
for (c = 0, p = bigram1, s = bigram2; c < NBG; c++, len-= 2) {
usr.bin/locate/locate/fastfind.c
129
p[c] = check_bigram_char(*paddr++);
usr.bin/locate/locate/fastfind.c
130
s[c] = check_bigram_char(*paddr++);
usr.bin/locate/locate/fastfind.c
155
c = (u_char)*paddr++; len--;
usr.bin/locate/locate/fastfind.c
159
if (c == SWITCH) { /* big step, an integer */
usr.bin/locate/locate/fastfind.c
166
count += c - OFFSET;
usr.bin/locate/locate/fastfind.c
175
c = (u_char)*paddr++;
usr.bin/locate/locate/fastfind.c
185
if (c < PARITY) {
usr.bin/locate/locate/fastfind.c
186
if (c <= UMLAUT) {
usr.bin/locate/locate/fastfind.c
187
if (c == UMLAUT && len > 0) {
usr.bin/locate/locate/fastfind.c
188
c = (u_char)*paddr++;
usr.bin/locate/locate/fastfind.c
195
if (tolower(c) == cc)
usr.bin/locate/locate/fastfind.c
197
if (c == cc)
usr.bin/locate/locate/fastfind.c
200
*p++ = c;
usr.bin/locate/locate/fastfind.c
203
c &= ASCII_MAX;
usr.bin/locate/locate/fastfind.c
205
if (tolower(bigram1[c]) == cc ||
usr.bin/locate/locate/fastfind.c
206
tolower(bigram2[c]) == cc)
usr.bin/locate/locate/fastfind.c
208
if (bigram1[c] == cc ||
usr.bin/locate/locate/fastfind.c
209
bigram2[c] == cc)
usr.bin/locate/locate/fastfind.c
213
*p++ = bigram1[c];
usr.bin/locate/locate/fastfind.c
214
*p++ = bigram2[c];
usr.bin/locate/locate/fastfind.c
44
int c;
usr.bin/locate/locate/fastfind.c
48
for (c = 0, p = bigram1, s = bigram2; c < NBG; c++) {
usr.bin/locate/locate/fastfind.c
49
p[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
50
s[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
56
for (c = getc(fp), count = 0; c != EOF; size++) {
usr.bin/locate/locate/fastfind.c
57
if (c == SWITCH) {
usr.bin/locate/locate/fastfind.c
62
count += c - OFFSET;
usr.bin/locate/locate/fastfind.c
65
for (p = path + count; (c = getc(fp)) > SWITCH; size++)
usr.bin/locate/locate/fastfind.c
66
if (c < PARITY) {
usr.bin/locate/locate/fastfind.c
67
if (c == UMLAUT) {
usr.bin/locate/locate/fastfind.c
68
c = getc(fp);
usr.bin/locate/locate/util.c
105
if (ch == c)
usr.bin/locate/locate/util.c
109
slen = ch - c;
usr.bin/locate/locate/util.c
113
bcopy(c, p, slen);
usr.bin/locate/locate/util.c
123
c = ch + 1;
usr.bin/locate/locate/util.c
80
char *c, *ch, *p;
usr.bin/locate/locate/util.c
99
for (ch = c = path; ; ch++) {
usr.bin/logger/logger.c
165
CODE *c;
usr.bin/logger/logger.c
174
for (c = codetab; c->c_name; c++)
usr.bin/logger/logger.c
175
if (!strcasecmp(name, c->c_name))
usr.bin/logger/logger.c
176
return (c->c_val);
usr.bin/m4/eval.c
122
int c, n;
usr.bin/m4/eval.c
453
while ((c = gpbc()) != '\n' && c != EOF)
usr.bin/m4/eval.c
735
int c;
usr.bin/m4/eval.c
740
while ((c = getc(pf)) != EOF)
usr.bin/m4/eval.c
741
putc(c, active);
usr.bin/m4/extern.h
122
#define PUSHBACK(c) \
usr.bin/m4/extern.h
126
*bp++ = (c); \
usr.bin/m4/extern.h
129
#define CHRSAVE(c) \
usr.bin/m4/extern.h
133
*ep++ = (c); \
usr.bin/m4/gnum4.c
197
addchars(const char *c, size_t n)
usr.bin/m4/gnum4.c
211
memcpy(buffer+current, c, n);
usr.bin/m4/gnum4.c
216
addchar(int c)
usr.bin/m4/gnum4.c
225
buffer[current++] = c;
usr.bin/m4/gnum4.c
674
int c;
usr.bin/m4/gnum4.c
680
while ((c = getc(f))!= EOF)
usr.bin/m4/gnum4.c
681
putc(c, active);
usr.bin/m4/main.c
170
int c;
usr.bin/m4/main.c
191
while ((c = getopt(argc, argv, "gst:d:D:EU:o:I:P")) != -1)
usr.bin/m4/main.c
192
switch(c) {
usr.bin/m4/main.c
536
reallyputchar(int c)
usr.bin/m4/main.c
538
putc(c, active);
usr.bin/m4/main.c
539
if (synch_lines && c == '\n') {
usr.bin/m4/main.c
551
inspect(int c, char *tp)
usr.bin/m4/main.c
557
*tp++ = c;
usr.bin/m4/main.c
559
while ((isalnum(c = gpbc()) || c == '_') && tp < etp)
usr.bin/m4/main.c
560
*tp++ = c;
usr.bin/m4/main.c
561
if (c != EOF)
usr.bin/m4/main.c
562
PUSHBACK(c);
usr.bin/m4/main.c
568
while (isalnum(c = gpbc()) || c == '_') {
usr.bin/m4/main.c
570
reallyputchar(c);
usr.bin/m4/main.c
572
CHRSAVE(c);
usr.bin/m4/mdef.h
159
int c;
usr.bin/m4/misc.c
216
chrsave(int c)
usr.bin/m4/misc.c
220
*ep++ = c;
usr.bin/m4/misc.c
229
int c;
usr.bin/m4/misc.c
234
while ((c = getc(outfile[n])) != EOF)
usr.bin/m4/misc.c
235
putc(c, active);
usr.bin/m4/misc.c
393
if (f->c == EOF)
usr.bin/m4/misc.c
396
f->c = fgetc(f->file);
usr.bin/m4/misc.c
397
if (f->c == '\n')
usr.bin/m4/misc.c
400
return f->c;
usr.bin/m4/misc.c
408
f->c = 0;
usr.bin/m4/misc.c
428
f->c = EOF;
usr.bin/m4/misc.c
83
pushback(int c)
usr.bin/m4/misc.c
85
if (c == EOF)
usr.bin/m4/misc.c
89
*bp++ = c;
usr.bin/m4/stdd.h
45
#define iswhite(c) ((c) == ' ' || (c) == '\t')
usr.bin/m4/trace.c
67
letter_to_flag(int c)
usr.bin/m4/trace.c
69
switch(c) {
usr.bin/mail/cmd1.c
406
int c, topl, lines, lineb;
usr.bin/mail/cmd1.c
425
c = mp->m_lines;
usr.bin/mail/cmd1.c
428
for (lines = 0; lines < c && lines <= topl; lines++) {
usr.bin/mail/cmd3.c
712
int c;
usr.bin/mail/cmd3.c
714
c = argcount(namelist) + 1;
usr.bin/mail/cmd3.c
715
if (c == 1) {
usr.bin/mail/cmd3.c
725
if ((altnames = calloc(c, sizeof(char *))) == NULL)
usr.bin/mail/collect.c
111
c = readline(stdin, linebuf, LINESIZE, &sig);
usr.bin/mail/collect.c
136
if (c < 0) {
usr.bin/mail/collect.c
145
longline = (c == LINESIZE - 1);
usr.bin/mail/collect.c
158
c = (unsigned char)linebuf[1];
usr.bin/mail/collect.c
159
switch (c) {
usr.bin/mail/collect.c
165
if (c == escape) {
usr.bin/mail/collect.c
312
if (forward(linebuf + 2, collf, tempname, c) < 0)
usr.bin/mail/collect.c
351
mesedit(collf, c);
usr.bin/mail/collect.c
391
int c;
usr.bin/mail/collect.c
411
while ((c = getc(fp)) != EOF) {
usr.bin/mail/collect.c
413
if (c == '\n')
usr.bin/mail/collect.c
415
(void)putc(c, of);
usr.bin/mail/collect.c
433
mesedit(FILE *fp, int c)
usr.bin/mail/collect.c
440
nf = run_editor(fp, (off_t)-1, c, 0);
usr.bin/mail/collect.c
582
int c;
usr.bin/mail/collect.c
588
c = umask(077);
usr.bin/mail/collect.c
590
(void)umask(c);
usr.bin/mail/collect.c
593
while ((c = getc(fp)) != EOF)
usr.bin/mail/collect.c
594
(void)putc(c, dbuf);
usr.bin/mail/collect.c
60
int lc, cc, fd, c, t, lastlong, rc, sig;
usr.bin/mail/edit.c
117
while ((c = getc(fp)) != EOF) {
usr.bin/mail/edit.c
118
if (c == '\n') {
usr.bin/mail/edit.c
123
if (putc(c, otf) == EOF)
usr.bin/mail/edit.c
79
int nl = 0, c, i;
usr.bin/mail/fio.c
142
if ((c = (unsigned char)*cp2++) == 0) {
usr.bin/mail/fio.c
147
while ((c = (unsigned char)*cp++) != '\0')
usr.bin/mail/fio.c
148
if (c == 'R')
usr.bin/mail/fio.c
150
else if (c == 'O')
usr.bin/mail/fio.c
155
if (*cp != c && *cp != toupper(c))
usr.bin/mail/fio.c
174
int c;
usr.bin/mail/fio.c
176
c = strlen(linebuf);
usr.bin/mail/fio.c
177
(void)fwrite(linebuf, sizeof(*linebuf), c, obuf);
usr.bin/mail/fio.c
180
c++;
usr.bin/mail/fio.c
184
return(c);
usr.bin/mail/fio.c
68
int c, count;
usr.bin/mail/fio.c
77
if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL)
usr.bin/mail/head.c
248
int c;
usr.bin/mail/head.c
254
while ((c = (unsigned char)*wp++) && c != ' ' && c != '\t') {
usr.bin/mail/head.c
255
*wbuf++ = c;
usr.bin/mail/head.c
256
if (c == '"') {
usr.bin/mail/head.c
257
while ((c = (unsigned char)*wp++) && c != '"')
usr.bin/mail/head.c
258
*wbuf++ = c;
usr.bin/mail/head.c
259
if (c == '"')
usr.bin/mail/head.c
260
*wbuf++ = c;
usr.bin/mail/head.c
266
for (; c == ' ' || c == '\t'; c = (unsigned char)*wp++)
usr.bin/mail/head.c
268
if (c == 0)
usr.bin/mail/lex.c
288
int c, muvec[2];
usr.bin/mail/lex.c
382
if ((c = getmsglist(cp, msgvec, com->c_msgflag)) < 0)
usr.bin/mail/lex.c
391
c = 0; /* no message list */
usr.bin/mail/lex.c
394
if (c == 0) {
usr.bin/mail/lex.c
422
if ((c = getmsglist(cp, msgvec, com->c_msgflag)) < 0)
usr.bin/mail/lex.c
424
if (c == 0) {
usr.bin/mail/lex.c
464
if ((c = getrawlist(cp, arglist,
usr.bin/mail/lex.c
467
if (c < com->c_minargs) {
usr.bin/mail/lex.c
472
if (c > com->c_maxargs) {
usr.bin/mail/list.c
375
char c, *cp, *cp2, quotec;
usr.bin/mail/list.c
396
while ((c = *cp) != '\0') {
usr.bin/mail/list.c
409
if (c == quotec)
usr.bin/mail/list.c
411
else if (c == '\\')
usr.bin/mail/list.c
412
switch (c = *cp++) {
usr.bin/mail/list.c
419
c -= '0';
usr.bin/mail/list.c
421
c = c * 8 + *cp++ - '0';
usr.bin/mail/list.c
423
c = c * 8 + *cp++ - '0';
usr.bin/mail/list.c
424
*cp2++ = c;
usr.bin/mail/list.c
445
*cp2++ = c;
usr.bin/mail/list.c
447
else if (c == '^') {
usr.bin/mail/list.c
448
c = *cp++;
usr.bin/mail/list.c
449
if (c == '?')
usr.bin/mail/list.c
452
else if ((c >= 'A' && c <= '_') ||
usr.bin/mail/list.c
453
(c >= 'a' && c <= 'z'))
usr.bin/mail/list.c
454
*cp2++ = c & 037;
usr.bin/mail/list.c
460
*cp2++ = c;
usr.bin/mail/list.c
461
} else if (c == '"' || c == '\'')
usr.bin/mail/list.c
462
quotec = c;
usr.bin/mail/list.c
463
else if (c == ' ' || c == '\t')
usr.bin/mail/list.c
466
*cp2++ = c;
usr.bin/mail/list.c
501
int c;
usr.bin/mail/list.c
512
c = (unsigned char)*cp++;
usr.bin/mail/list.c
517
while (c == ' ' || c == '\t')
usr.bin/mail/list.c
518
c = (unsigned char)*cp++;
usr.bin/mail/list.c
524
if (c == '\0') {
usr.bin/mail/list.c
534
if (isdigit(c)) {
usr.bin/mail/list.c
536
while (isdigit(c)) {
usr.bin/mail/list.c
537
lexnumber = lexnumber*10 + c - '0';
usr.bin/mail/list.c
539
*cp2++ = c;
usr.bin/mail/list.c
540
c = (unsigned char)*cp++;
usr.bin/mail/list.c
552
if (c == lp->l_char) {
usr.bin/mail/list.c
553
lexstring[0] = c;
usr.bin/mail/list.c
567
if (c == '\'' || c == '"') {
usr.bin/mail/list.c
568
quotec = c;
usr.bin/mail/list.c
569
c = (unsigned char)*cp++;
usr.bin/mail/list.c
571
while (c != '\0') {
usr.bin/mail/list.c
572
if (c == quotec) {
usr.bin/mail/list.c
576
if (quotec == 0 && (c == ' ' || c == '\t'))
usr.bin/mail/list.c
579
*cp2++ = c;
usr.bin/mail/list.c
580
c = (unsigned char)*cp++;
usr.bin/mail/list.c
582
if (quotec && c == 0) {
usr.bin/mail/list.c
757
int c, m;
usr.bin/mail/list.c
760
c = meta;
usr.bin/mail/list.c
761
switch (c) {
usr.bin/mail/list.c
794
printf("Unknown metachar (%c)\n", c);
usr.bin/mail/names.c
206
int c, ispipe;
usr.bin/mail/names.c
256
while ((c = getc(fo)) != EOF)
usr.bin/mail/names.c
257
(void)putc(c, fout);
usr.bin/mail/names.c
314
while ((c = getc(fin)) != EOF)
usr.bin/mail/names.c
315
(void)putc(c, fout);
usr.bin/mail/names.c
573
int c;
usr.bin/mail/names.c
575
for (c = 0; np != NULL; np = np->n_flink)
usr.bin/mail/names.c
577
c++;
usr.bin/mail/names.c
578
return(c);
usr.bin/mail/quit.c
118
while ((c = getc(fbuf)) != EOF)
usr.bin/mail/quit.c
119
(void)putc(c, rbuf);
usr.bin/mail/quit.c
123
c = getc(fbuf);
usr.bin/mail/quit.c
124
if (c == EOF)
usr.bin/mail/quit.c
126
(void)putc(c, rbuf);
usr.bin/mail/quit.c
157
for (c = 0, p = 0, mp = &message[0]; mp < &message[msgCount]; mp++) {
usr.bin/mail/quit.c
159
c++;
usr.bin/mail/quit.c
172
if (c == 0) {
usr.bin/mail/quit.c
189
mcount = c;
usr.bin/mail/quit.c
212
while ((c = getc(abuf)) != EOF)
usr.bin/mail/quit.c
213
(void)putc(c, obuf);
usr.bin/mail/quit.c
261
c = getc(ibuf);
usr.bin/mail/quit.c
262
while (c != EOF) {
usr.bin/mail/quit.c
263
(void)putc(c, obuf);
usr.bin/mail/quit.c
266
c = getc(ibuf);
usr.bin/mail/quit.c
305
while ((c = getc(rbuf)) != EOF)
usr.bin/mail/quit.c
306
(void)putc(c, abuf);
usr.bin/mail/quit.c
339
int p, c;
usr.bin/mail/quit.c
349
while ((c = getc(res)) != EOF)
usr.bin/mail/quit.c
350
(void)putc(c, obuf);
usr.bin/mail/quit.c
363
while ((c = getc(res)) != EOF)
usr.bin/mail/quit.c
364
(void)putc(c, obuf);
usr.bin/mail/quit.c
391
int gotcha, c;
usr.bin/mail/quit.c
432
while ((c = getc(ibuf)) != EOF)
usr.bin/mail/quit.c
433
(void)putc(c, obuf);
usr.bin/mail/quit.c
452
c = 0;
usr.bin/mail/quit.c
456
c++;
usr.bin/mail/quit.c
463
gotcha = (c == 0 && ibuf == NULL);
usr.bin/mail/quit.c
465
while ((c = getc(ibuf)) != EOF)
usr.bin/mail/quit.c
466
(void)putc(c, obuf);
usr.bin/mail/quit.c
69
int c, fd;
usr.bin/mail/send.c
134
(c = (unsigned char)*cp++) && c != ':' && !isspace(c); )
usr.bin/mail/send.c
176
*cp2 = c; /* restore */
usr.bin/mail/send.c
211
c = 0;
usr.bin/mail/send.c
214
count -= c = strlen(line);
usr.bin/mail/send.c
220
if (c > 1)
usr.bin/mail/send.c
238
(void)fwrite(line, sizeof(*line), c, obuf);
usr.bin/mail/send.c
242
if (doign == ignoreall && c > 0 && line[c - 1] != '\n')
usr.bin/mail/send.c
244
if ((c = getc(ibuf)) != EOF && putc(c, obuf) == EOF)
usr.bin/mail/send.c
468
int c, fd;
usr.bin/mail/send.c
486
c = getc(fi);
usr.bin/mail/send.c
487
while (c != EOF) {
usr.bin/mail/send.c
488
(void)putc(c, nfo);
usr.bin/mail/send.c
489
c = getc(fi);
usr.bin/mail/send.c
61
int c = 0;
usr.bin/mail/tty.c
177
int c, done;
usr.bin/mail/tty.c
208
c = tty_getc(&tty);
usr.bin/mail/tty.c
219
if (c == 0) {
usr.bin/mail/tty.c
221
} else if (c == '\n') {
usr.bin/mail/tty.c
222
tty_putc(&tty, c);
usr.bin/mail/tty.c
225
done = tty_insert(&tty, c, 0);
usr.bin/mail/tty.c
295
int c;
usr.bin/mail/tty.c
303
c = t->buf[--t->cursor];
usr.bin/mail/tty.c
304
if (c == '\t')
usr.bin/mail/tty.c
306
else if (iscntrl(c))
usr.bin/mail/tty.c
325
unsigned char c;
usr.bin/mail/tty.c
330
n = read(t->fdin, &c, 1);
usr.bin/mail/tty.c
338
return c & 0x7f;
usr.bin/mail/tty.c
343
tty_insert(struct tty *t, int c, int nocntrl)
usr.bin/mail/tty.c
347
if (CCEQ(t->keys[VERASE], c)) {
usr.bin/mail/tty.c
352
} else if (CCEQ(t->keys[VWERASE], c)) {
usr.bin/mail/tty.c
365
} else if (CCEQ(t->keys[VKILL], c)) {
usr.bin/mail/tty.c
372
t->buf[t->len++] = c;
usr.bin/mail/tty.c
379
tty_putc(struct tty *t, int c)
usr.bin/mail/tty.c
381
unsigned char cc = c;
usr.bin/mail/tty.c
394
tty_visc(struct tty *t, int c)
usr.bin/mail/tty.c
398
if (c == '\t') {
usr.bin/mail/tty.c
401
} else if (iscntrl(c)) {
usr.bin/mail/tty.c
403
if (c == 0x7F)
usr.bin/mail/tty.c
406
tty_putc(t, (c | 0x40));
usr.bin/mail/tty.c
408
tty_putc(t, c);
usr.bin/mail/util.c
157
int c;
usr.bin/mail/util.c
162
if ((c = readline(f, linebuf, LINESIZE, NULL)) <= 0)
usr.bin/mail/util.c
175
cp = linebuf + c;
usr.bin/mail/util.c
182
ungetc(c = getc(f), f);
usr.bin/mail/util.c
183
if (c != ' ' && c != '\t')
usr.bin/mail/util.c
185
if ((c = readline(f, line2, LINESIZE, NULL)) < 0)
usr.bin/mail/util.c
190
c -= cp2 - line2;
usr.bin/mail/util.c
191
if (cp + c >= linebuf + LINESIZE - 2)
usr.bin/mail/util.c
194
(void)memcpy(cp, cp2, c);
usr.bin/mail/util.c
195
cp += c;
usr.bin/mail/util.c
411
int c, gotlt, lastsp;
usr.bin/mail/util.c
425
for (cp = name, cp2 = bufend; (c = (unsigned char)*cp++) != '\0'; ) {
usr.bin/mail/util.c
426
switch (c) {
usr.bin/mail/util.c
437
while ((c = (unsigned char)*cp) != '\0') {
usr.bin/mail/util.c
439
if (c == '"')
usr.bin/mail/util.c
441
if (c != '\\')
usr.bin/mail/util.c
442
*cp2++ = c;
usr.bin/mail/util.c
443
else if ((c = (unsigned char)*cp) != '\0') {
usr.bin/mail/util.c
444
*cp2++ = c;
usr.bin/mail/util.c
470
while ((c = (unsigned char)*cp) && c != ',') {
usr.bin/mail/util.c
472
if (c == '(')
usr.bin/mail/util.c
474
else if (c == '"')
usr.bin/mail/util.c
475
while ((c = (unsigned char)*cp) != '\0') {
usr.bin/mail/util.c
477
if (c == '"')
usr.bin/mail/util.c
479
if (c == '\\' && *cp)
usr.bin/mail/util.c
493
*cp2++ = c;
usr.bin/mail/util.c
494
if (c == ',' && *cp == ' ' && !gotlt) {
usr.bin/mail/util.c
576
charcount(char *str, int c)
usr.bin/mail/util.c
582
if (*cp == c)
usr.bin/make/defines.h
100
#define ISUPPER(c) (isupper((unsigned char)(c)))
usr.bin/make/defines.h
101
#define ISDIGIT(c) (isdigit((unsigned char)(c)))
usr.bin/make/defines.h
102
#define ISXDIGIT(c) (isxdigit((unsigned char)(c)))
usr.bin/make/defines.h
103
#define ISSPACE(c) (isspace((unsigned char)(c)))
usr.bin/make/defines.h
104
#define TOUPPER(c) (toupper((unsigned char)(c)))
usr.bin/make/defines.h
105
#define TOLOWER(c) (tolower((unsigned char)(c)))
usr.bin/make/defines.h
99
#define ISLOWER(c) (islower((unsigned char)(c)))
usr.bin/make/engine.c
220
char c;
usr.bin/make/engine.c
229
if (read(fd, &c, 1) == 1) {
usr.bin/make/engine.c
231
(void)write(fd, &c, 1);
usr.bin/make/lowparse.c
256
int c;
usr.bin/make/lowparse.c
259
c = read_char();
usr.bin/make/lowparse.c
260
} while (c != '\n' && c != EOF);
usr.bin/make/lowparse.c
261
return c;
usr.bin/make/lowparse.c
269
int c;
usr.bin/make/lowparse.c
272
while ((c = read_char()) != '.') {
usr.bin/make/lowparse.c
273
for (;c != '\n'; c = read_char()) {
usr.bin/make/lowparse.c
274
if (c == '\\') {
usr.bin/make/lowparse.c
275
c = read_char();
usr.bin/make/lowparse.c
276
if (c == '\n')
usr.bin/make/lowparse.c
279
if (c == EOF)
usr.bin/make/lowparse.c
291
read_logical_line(Buffer linebuf, int c)
usr.bin/make/lowparse.c
294
if (c == '\n') {
usr.bin/make/lowparse.c
298
if (c == EOF)
usr.bin/make/lowparse.c
300
Buf_AddChar(linebuf, c);
usr.bin/make/lowparse.c
301
c = read_char();
usr.bin/make/lowparse.c
302
while (c == '\\') {
usr.bin/make/lowparse.c
303
c = read_char();
usr.bin/make/lowparse.c
304
if (c == '\n') {
usr.bin/make/lowparse.c
308
c = read_char();
usr.bin/make/lowparse.c
309
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
312
if (c == '\\') {
usr.bin/make/lowparse.c
314
c = read_char();
usr.bin/make/lowparse.c
325
int c;
usr.bin/make/lowparse.c
328
c = read_char();
usr.bin/make/lowparse.c
329
if (c == EOF) {
usr.bin/make/lowparse.c
335
while (c == '\\') {
usr.bin/make/lowparse.c
336
c = read_char();
usr.bin/make/lowparse.c
337
if (c == '\n') {
usr.bin/make/lowparse.c
340
c = read_char();
usr.bin/make/lowparse.c
341
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
344
if (c == '\\') {
usr.bin/make/lowparse.c
346
c = read_char();
usr.bin/make/lowparse.c
351
read_logical_line(linebuf, c);
usr.bin/make/lowparse.c
361
int c; /* the current character */
usr.bin/make/lowparse.c
365
c = read_char();
usr.bin/make/lowparse.c
367
if (c == ' ') {
usr.bin/make/lowparse.c
369
c = read_char();
usr.bin/make/lowparse.c
370
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
371
while (c == '\\') {
usr.bin/make/lowparse.c
372
c = read_char();
usr.bin/make/lowparse.c
373
if (c == '\n') {
usr.bin/make/lowparse.c
376
c = read_char();
usr.bin/make/lowparse.c
377
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
380
if (c == '\\') {
usr.bin/make/lowparse.c
382
c = read_char();
usr.bin/make/lowparse.c
384
if (c == EOF)
usr.bin/make/lowparse.c
387
return c;
usr.bin/make/lowparse.c
390
assert(c != '\t');
usr.bin/make/lowparse.c
392
if (c == '#')
usr.bin/make/lowparse.c
393
c = skip_to_end_of_line();
usr.bin/make/lowparse.c
397
if (c == '\t') {
usr.bin/make/lowparse.c
400
c = read_char();
usr.bin/make/lowparse.c
401
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
402
while (c == '\\') {
usr.bin/make/lowparse.c
403
c = read_char();
usr.bin/make/lowparse.c
404
if (c == '\n') {
usr.bin/make/lowparse.c
407
c = read_char();
usr.bin/make/lowparse.c
408
} while (c == ' ' || c == '\t');
usr.bin/make/lowparse.c
411
if (c == '\\') {
usr.bin/make/lowparse.c
413
c = read_char();
usr.bin/make/lowparse.c
415
if (c == EOF)
usr.bin/make/lowparse.c
418
return c;
usr.bin/make/lowparse.c
422
if (c == '\n')
usr.bin/make/lowparse.c
425
return c;
usr.bin/make/lowparse.c
442
int c; /* the current character */
usr.bin/make/lowparse.c
444
c = skip_empty_lines_and_read_char(linebuf);
usr.bin/make/lowparse.c
446
if (c == EOF)
usr.bin/make/lowparse.c
449
read_logical_line(linebuf, c);
usr.bin/make/main.c
117
record_option(int c, const char *arg)
usr.bin/make/main.c
122
opt[1] = c;
usr.bin/make/main.c
136
posixParseOptLetter(int c)
usr.bin/make/main.c
138
switch(c) {
usr.bin/make/main.c
176
record_option(c, NULL);
usr.bin/make/main.c
193
int c, optend;
usr.bin/make/main.c
214
c = optend ? -1 : getopt(argc, argv, OPTFLAGS);
usr.bin/make/main.c
215
switch (c) {
usr.bin/make/main.c
220
record_option(c, optarg);
usr.bin/make/main.c
224
record_option(c, optarg);
usr.bin/make/main.c
228
record_option(c, optarg);
usr.bin/make/main.c
311
record_option(c, optarg);
usr.bin/make/main.c
328
record_option(c, optarg);
usr.bin/make/main.c
333
record_option(c, optarg);
usr.bin/make/main.c
346
posixParseOptLetter(c);
usr.bin/make/main.c
354
int c, optend, oldopterr;
usr.bin/make/main.c
371
c = optend ? -1 : getopt(argc, argv, OPTFLAGS);
usr.bin/make/main.c
372
switch (c) {
usr.bin/make/make.c
616
print_unlink_cycle(struct growableArray *l, GNode *c)
usr.bin/make/make.c
626
if (gn == c)
usr.bin/make/make.c
630
printf("%s)\n", c->name);
usr.bin/make/make.c
636
if (gn2 == c) {
usr.bin/make/make.c
655
GNode *c;
usr.bin/make/make.c
658
c = find_cycle(t, &cycle);
usr.bin/make/make.c
659
if (c)
usr.bin/make/make.c
660
print_unlink_cycle(&cycle, c);
usr.bin/make/make.c
683
GNode *c;
usr.bin/make/make.c
687
c = find_cycle(&gn->children, cycle);
usr.bin/make/make.c
689
if (c)
usr.bin/make/make.c
690
return c;
usr.bin/make/str.c
267
range_match(char c, const char **ppat, const char *epattern)
usr.bin/make/str.c
270
if (c == '[')
usr.bin/make/str.c
277
return !range_match(c, ppat, epattern);
usr.bin/make/str.c
284
if (**ppat == c)
usr.bin/make/str.c
289
if (**ppat < c && c <= (*ppat)[2])
usr.bin/make/str.c
291
if ((*ppat)[2] <= c && c < **ppat)
usr.bin/make/str.c
475
Str_rchri(const char *begin, const char *end, int c)
usr.bin/make/str.c
479
if (*--end == c)
usr.bin/make/targequiv.c
141
Targ_setdirs(const char *c, const char *o)
usr.bin/make/targequiv.c
143
curdir = c;
usr.bin/make/var.c
764
find_pos(int c)
usr.bin/make/var.c
766
switch(c) {
usr.bin/make/var.c
773
"Wrong character in variable spec %c (can't happen)", c);
usr.bin/mandoc/cgi.c
144
html_putchar(char c)
usr.bin/mandoc/cgi.c
147
switch (c) {
usr.bin/mandoc/cgi.c
161
putchar((unsigned char)c);
usr.bin/mandoc/cgi.c
297
int c;
usr.bin/mandoc/cgi.c
308
if (1 != sscanf(hex, "%x", &c))
usr.bin/mandoc/cgi.c
310
if ('\0' == c)
usr.bin/mandoc/cgi.c
313
*q = (char)c;
usr.bin/mandoc/dba_write.c
97
dba_char_write(int c)
usr.bin/mandoc/dba_write.c
99
if (putc(c, ofp) == EOF)
usr.bin/mandoc/html.c
1012
print_byte(struct html *h, char c)
usr.bin/mandoc/html.c
1015
putchar(c);
usr.bin/mandoc/html.c
1021
h->buf[h->bufcol++] = c;
usr.bin/mandoc/html.c
1031
putchar(c);
usr.bin/mandoc/html.c
436
print_escape(struct html *h, char c)
usr.bin/mandoc/html.c
439
switch (c) {
usr.bin/mandoc/html.c
472
int c, len, breakline, nospace;
usr.bin/mandoc/html.c
549
c = mchars_num2uc(seq + 1, len - 1);
usr.bin/mandoc/html.c
552
c = mchars_num2char(seq, len);
usr.bin/mandoc/html.c
553
if (c < 0)
usr.bin/mandoc/html.c
557
c = mchars_spec2cp(seq, len);
usr.bin/mandoc/html.c
558
if (c <= 0)
usr.bin/mandoc/html.c
562
c = *seq;
usr.bin/mandoc/html.c
577
c = seq[len - 1];
usr.bin/mandoc/html.c
582
if ((c < 0x20 && c != 0x09) ||
usr.bin/mandoc/html.c
583
(c > 0x7E && c < 0xA0))
usr.bin/mandoc/html.c
584
c = 0xFFFD;
usr.bin/mandoc/html.c
585
if (c > 0x7E) {
usr.bin/mandoc/html.c
586
(void)snprintf(numbuf, sizeof(numbuf), "&#x%.4X;", c);
usr.bin/mandoc/html.c
588
} else if (print_escape(h, c) == 0)
usr.bin/mandoc/html.c
589
print_byte(h, c);
usr.bin/mandoc/main.c
152
int c;
usr.bin/mandoc/main.c
199
while ((c = getopt(argc, argv,
usr.bin/mandoc/main.c
201
if (c == 'i' && search.argmode == ARG_EXPR) {
usr.bin/mandoc/main.c
205
switch (c) {
usr.bin/mandoc/main.c
472
c = pledge("stdio rpath", NULL);
usr.bin/mandoc/main.c
474
c = pledge("stdio rpath cpath tty proc exec", NULL);
usr.bin/mandoc/main.c
475
if (c == -1) {
usr.bin/mandoc/man_term.c
921
int c;
usr.bin/mandoc/man_term.c
990
c = 1;
usr.bin/mandoc/man_term.c
992
c = (*act->pre)(p, mt, n, meta);
usr.bin/mandoc/man_term.c
994
if (c && n->child != NULL)
usr.bin/mandoc/mdoc.c
167
char *c, *ws, *end;
usr.bin/mandoc/mdoc.c
195
for (c = end = buf + offs; *c; c++) {
usr.bin/mandoc/mdoc.c
196
switch (*c) {
usr.bin/mandoc/mdoc.c
199
ws = c;
usr.bin/mandoc/mdoc.c
208
ws = c;
usr.bin/mandoc/mdoc.c
218
if (c[1])
usr.bin/mandoc/mdoc.c
219
c++;
usr.bin/mandoc/mdoc.c
225
end = c + 1;
usr.bin/mandoc/mdoc.c
254
mandoc_msg(MANDOCERR_FI_BLANK, line, (int)(c - buf), NULL);
usr.bin/mandoc/mdoc.c
277
for (c = buf + offs; c != NULL; c = strchr(c + 1, '.')) {
usr.bin/mandoc/mdoc.c
278
if (c - buf < offs + 2)
usr.bin/mandoc/mdoc.c
280
if (end - c < 3)
usr.bin/mandoc/mdoc.c
282
if (c[1] != ' ' ||
usr.bin/mandoc/mdoc.c
283
isalnum((unsigned char)c[-2]) == 0 ||
usr.bin/mandoc/mdoc.c
284
isalnum((unsigned char)c[-1]) == 0 ||
usr.bin/mandoc/mdoc.c
285
(c[-2] == 'n' && c[-1] == 'c') ||
usr.bin/mandoc/mdoc.c
286
(c[-2] == 'v' && c[-1] == 's'))
usr.bin/mandoc/mdoc.c
288
c += 2;
usr.bin/mandoc/mdoc.c
289
if (*c == ' ')
usr.bin/mandoc/mdoc.c
290
c++;
usr.bin/mandoc/mdoc.c
291
if (*c == ' ')
usr.bin/mandoc/mdoc.c
292
c++;
usr.bin/mandoc/mdoc.c
293
if (isupper((unsigned char)(*c)))
usr.bin/mandoc/mdoc.c
294
mandoc_msg(MANDOCERR_EOS, line, (int)(c - buf), NULL);
usr.bin/mandoc/mdoc_markdown.c
378
md_stack(char c)
usr.bin/mandoc/mdoc_markdown.c
384
switch (c) {
usr.bin/mandoc/mdoc_markdown.c
396
stack[cur] = c;
usr.bin/mandoc/mdoc_markdown.c
518
char c;
usr.bin/mandoc/mdoc_markdown.c
538
while ((c = *s++) != '\0') {
usr.bin/mandoc/mdoc_markdown.c
540
switch(c) {
usr.bin/mandoc/mdoc_markdown.c
543
c = ' ';
usr.bin/mandoc/mdoc_markdown.c
546
c = '\0';
usr.bin/mandoc/mdoc_markdown.c
551
c = '-';
usr.bin/mandoc/mdoc_markdown.c
578
c = '\0';
usr.bin/mandoc/mdoc_markdown.c
584
c = '\0';
usr.bin/mandoc/mdoc_markdown.c
590
c = '\0';
usr.bin/mandoc/mdoc_markdown.c
669
c = '\0';
usr.bin/mandoc/mdoc_markdown.c
680
md_char(c);
usr.bin/mandoc/mdoc_markdown.c
713
md_char(unsigned char c)
usr.bin/mandoc/mdoc_markdown.c
715
if (c != '\0') {
usr.bin/mandoc/mdoc_markdown.c
716
putchar(c);
usr.bin/mandoc/mdoc_markdown.c
717
if (c == '*')
usr.bin/mandoc/mdoc_markdown.c
723
if (c != ']')
usr.bin/mandoc/mdoc_markdown.c
725
if (c == ' ' || c == '\t' || c == '>')
usr.bin/mandoc/mdoc_markdown.c
727
if (isdigit(c) == 0)
usr.bin/mandoc/read.c
161
unsigned char c;
usr.bin/mandoc/read.c
213
c = blk.buf[i];
usr.bin/mandoc/read.c
214
if (c & 0x80) {
usr.bin/mandoc/read.c
218
curp->line, pos, "0x%x", c);
usr.bin/mandoc/read.c
229
if (c == 0x7f || (c < 0x20 && c != 0x09)) {
usr.bin/mandoc/read.c
230
mandoc_msg(c == 0x00 || c == 0x04 ||
usr.bin/mandoc/read.c
231
c > 0x0a ? MANDOCERR_CHAR_BAD :
usr.bin/mandoc/read.c
233
curp->line, pos, "0x%x", c);
usr.bin/mandoc/read.c
235
if (c != '\r')
usr.bin/mandoc/roff.c
4117
char *c;
usr.bin/mandoc/roff.c
4162
c = n->val.p + (int)oldch;
usr.bin/mandoc/roff.c
4173
*c++ = string[i++];
usr.bin/mandoc/roff.c
4178
*c++ = '\n';
usr.bin/mandoc/roff.c
4180
*c = '\0';
usr.bin/mandoc/roff.c
4181
n->val.sz = (int)(c - n->val.p);
usr.bin/mandoc/roff_escape.c
455
c = 0;
usr.bin/mandoc/roff_escape.c
457
c = 10 * c + (buf[i] - '0');
usr.bin/mandoc/roff_escape.c
458
if (c < 0x21 || (c > 0x7e && c < 0xa0) || c > 0xff) {
usr.bin/mandoc/roff_escape.c
78
int c, i; /* for \[char...] parsing */
usr.bin/mandoc/tbl_layout.c
215
enum tbl_cellt c;
usr.bin/mandoc/tbl_layout.c
249
c = keys[i].key;
usr.bin/mandoc/tbl_layout.c
253
if (c == TBL_CELL_SPAN) {
usr.bin/mandoc/tbl_layout.c
258
c = rp->last->pos;
usr.bin/mandoc/tbl_layout.c
259
} else if (c == TBL_CELL_DOWN && rp == tbl->first_row)
usr.bin/mandoc/tbl_layout.c
266
mods(tbl, cell_alloc(tbl, rp, c), ln, p, pos);
usr.bin/mandoc/tbl_term.c
827
tbl_fill_char(struct termp *tp, char c, size_t *coloff, size_t len)
usr.bin/mandoc/tbl_term.c
831
cp[0] = c;
usr.bin/mandoc/tbl_term.c
841
tbl_fill_border(struct termp *tp, int c, size_t *coloff, size_t len)
usr.bin/mandoc/tbl_term.c
845
if ((c = borders_locale[c]) > 127) {
usr.bin/mandoc/tbl_term.c
846
(void)snprintf(buf, sizeof(buf), "\\[u%04x]", c);
usr.bin/mandoc/tbl_term.c
849
tbl_fill_char(tp, c, coloff, len);
usr.bin/mandoc/tbl_term.c
857
tbl_direct_border(struct termp *tp, int c, size_t len)
usr.bin/mandoc/tbl_term.c
863
c = borders_locale[c];
usr.bin/mandoc/tbl_term.c
864
sz = (*tp->getwidth)(tp, c);
usr.bin/mandoc/tbl_term.c
868
(*tp->letter)(tp, c);
usr.bin/mandoc/term.c
820
adjbuf(struct termp_col *c, size_t sz)
usr.bin/mandoc/term.c
822
if (c->maxcols == 0)
usr.bin/mandoc/term.c
823
c->maxcols = 1024;
usr.bin/mandoc/term.c
824
while (c->maxcols <= sz)
usr.bin/mandoc/term.c
825
c->maxcols <<= 2;
usr.bin/mandoc/term.c
826
c->buf = mandoc_reallocarray(c->buf, c->maxcols, sizeof(*c->buf));
usr.bin/mandoc/term.c
830
bufferc(struct termp *p, char c)
usr.bin/mandoc/term.c
833
(*p->letter)(p, c);
usr.bin/mandoc/term.c
838
if (p->tcol->lastcol <= p->col || (c != ' ' && c != ASCII_NBRSP))
usr.bin/mandoc/term.c
839
p->tcol->buf[p->col] = c;
usr.bin/mandoc/term.c
858
encode1(struct termp *p, int c)
usr.bin/mandoc/term.c
863
(*p->letter)(p, c);
usr.bin/mandoc/term.c
870
f = (c == ASCII_HYPH || c > 127 || isgraph(c)) ?
usr.bin/mandoc/term.c
886
if (c == ASCII_HYPH)
usr.bin/mandoc/term.c
889
p->tcol->buf[p->col++] = c;
usr.bin/mandoc/term.c
892
if (p->tcol->lastcol <= p->col || (c != ' ' && c != ASCII_NBRSP))
usr.bin/mandoc/term.c
893
p->tcol->buf[p->col] = c;
usr.bin/mandoc/term.c
974
cond_width(const struct termp *p, int c, int *skip)
usr.bin/mandoc/term.c
980
return (*p->getwidth)(p, c);
usr.bin/mandoc/term_ascii.c
180
ascii_getwidth(const struct termp *p, int c)
usr.bin/mandoc/term_ascii.c
182
switch (c) {
usr.bin/mandoc/term_ascii.c
199
ascii_letter(struct termp *p, int c)
usr.bin/mandoc/term_ascii.c
201
putchar(c);
usr.bin/mandoc/term_ascii.c
369
locale_getwidth(const struct termp *p, int c)
usr.bin/mandoc/term_ascii.c
373
if (c == ASCII_NBRSP)
usr.bin/mandoc/term_ascii.c
374
c = ' ';
usr.bin/mandoc/term_ascii.c
375
rc = wcwidth(c);
usr.bin/mandoc/term_ascii.c
420
locale_letter(struct termp *p, int c)
usr.bin/mandoc/term_ascii.c
422
putwchar(c);
usr.bin/mandoc/term_ps.c
1011
switch (c) {
usr.bin/mandoc/term_ps.c
1025
if (c <= 32 || c - 32 >= MAXCHAR)
usr.bin/mandoc/term_ps.c
1026
c = 32;
usr.bin/mandoc/term_ps.c
1028
ps_putchar(p, (char)c);
usr.bin/mandoc/term_ps.c
1029
c -= 32;
usr.bin/mandoc/term_ps.c
1030
p->ps->pscol += (size_t)fonts[f].gly[c].wx;
usr.bin/mandoc/term_ps.c
1105
char c;
usr.bin/mandoc/term_ps.c
1107
c = arg >= 128 || arg <= 0 ? '?' : arg;
usr.bin/mandoc/term_ps.c
1115
if (c == '\b') {
usr.bin/mandoc/term_ps.c
1137
p->ps->last = c;
usr.bin/mandoc/term_ps.c
1141
if (p->ps->last == c) {
usr.bin/mandoc/term_ps.c
1178
p->ps->last = c;
usr.bin/mandoc/term_ps.c
1285
ps_getwidth(const struct termp *p, int c)
usr.bin/mandoc/term_ps.c
1288
if (c <= 32 || c - 32 >= MAXCHAR)
usr.bin/mandoc/term_ps.c
1289
c = 0;
usr.bin/mandoc/term_ps.c
1291
c -= 32;
usr.bin/mandoc/term_ps.c
1293
return (size_t)fonts[(int)TERMFONT_NONE].gly[c].wx;
usr.bin/mandoc/term_ps.c
691
ps_putchar(struct termp *p, char c)
usr.bin/mandoc/term_ps.c
698
putchar(c);
usr.bin/mandoc/term_ps.c
706
p->ps->psmarg[pos++] = c;
usr.bin/mandoc/term_ps.c
954
ps_pletter(struct termp *p, int c)
usr.bin/mg/basic.c
274
int c, i, col = 0;
usr.bin/mg/basic.c
278
c = lgetc(dlp, i);
usr.bin/mg/basic.c
279
if (c == '\t') {
usr.bin/mg/basic.c
281
} else if (ISCTRL(c) != FALSE) {
usr.bin/mg/basic.c
283
} else if (isprint(c))
usr.bin/mg/basic.c
286
col += snprintf(tmp, sizeof(tmp), "\\%o", c);
usr.bin/mg/chrdef.h
14
#define CHARMASK(c) ((unsigned char) (c))
usr.bin/mg/chrdef.h
29
#define ISWORD(c) ((cinfo[CHARMASK(c)]&_MG_W)!=0)
usr.bin/mg/chrdef.h
30
#define ISCTRL(c) ((cinfo[CHARMASK(c)]&_MG_C)!=0)
usr.bin/mg/chrdef.h
31
#define ISUPPER(c) ((cinfo[CHARMASK(c)]&_MG_U)!=0)
usr.bin/mg/chrdef.h
32
#define ISLOWER(c) ((cinfo[CHARMASK(c)]&_MG_L)!=0)
usr.bin/mg/chrdef.h
33
#define ISEOSP(c) ((cinfo[CHARMASK(c)]&_MG_P)!=0)
usr.bin/mg/chrdef.h
34
#define ISDIGIT(c) ((cinfo[CHARMASK(c)]&_MG_D)!=0)
usr.bin/mg/chrdef.h
35
#define TOUPPER(c) ((c)-0x20)
usr.bin/mg/chrdef.h
36
#define TOLOWER(c) ((c)+0x20)
usr.bin/mg/cmode.c
225
int c = '\0'; /* current char */
usr.bin/mg/cmode.c
245
if (!isspace(c = lgetc(lp, lo)))
usr.bin/mg/cmode.c
247
if (c == '\t')
usr.bin/mg/cmode.c
260
c = lgetc(lp, co);
usr.bin/mg/cmode.c
262
if (!firstnwsp && !isspace(c)) {
usr.bin/mg/cmode.c
263
if (c == '#')
usr.bin/mg/cmode.c
267
if (c == '\\')
usr.bin/mg/cmode.c
270
if (!escp && (c == '"' || c == '\'')) {
usr.bin/mg/cmode.c
272
if (getmatch(c, lastc))
usr.bin/mg/cmode.c
275
} else if (c == '"' || c == '\'') {
usr.bin/mg/cmode.c
277
lastc = c;
usr.bin/mg/cmode.c
278
} else if (c == '(') {
usr.bin/mg/cmode.c
280
} else if (c == ')') {
usr.bin/mg/cmode.c
282
} else if (c == '{') {
usr.bin/mg/cmode.c
285
} else if (c == '}') {
usr.bin/mg/cmode.c
287
} else if (c == '?') {
usr.bin/mg/cmode.c
289
} else if (c == ':') {
usr.bin/mg/cmode.c
293
} else if (c == '/') {
usr.bin/mg/cmode.c
302
} else if (c == '*') {
usr.bin/mg/cmode.c
313
if (c != '\\')
usr.bin/mg/cmode.c
315
if (c != '*')
usr.bin/mg/cmode.c
317
if (c != '/')
usr.bin/mg/cmode.c
358
getmatch(int c, int mc)
usr.bin/mg/cmode.c
362
switch (c) {
usr.bin/mg/cmode.c
404
int col, i, c;
usr.bin/mg/cmode.c
411
c = lgetc(lp, i);
usr.bin/mg/cmode.c
412
if (c == '\t') {
usr.bin/mg/cmode.c
414
} else if (ISCTRL(c) != FALSE)
usr.bin/mg/cmode.c
416
else if (isprint(c)) {
usr.bin/mg/cmode.c
419
col += snprintf(tmp, sizeof(tmp), "\\%o", c);
usr.bin/mg/cmode.c
439
int c;
usr.bin/mg/cmode.c
455
if (!isspace(c = lgetc(lp, lo))) {
usr.bin/mg/cmode.c
457
if (c == '*')
usr.bin/mg/cmode.c
459
else if (astp && c == '/') {
usr.bin/mg/cmode.c
465
if (c == '/')
usr.bin/mg/cmode.c
467
else if (slashp && c == '*')
usr.bin/mg/cmode.c
495
int c; /* char being read */
usr.bin/mg/cmode.c
499
if (!isspace(c = lgetc(lp, lo))) {
usr.bin/mg/cmode.c
503
if (c == '#' || (slashp && c == '/')) {
usr.bin/mg/cmode.c
506
} else if (!slashp && c == '/') {
usr.bin/mg/def.h
153
#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
usr.bin/mg/dired.c
726
int c;
usr.bin/mg/dired.c
728
while ((c = getc(fin)) != EOF &&
usr.bin/mg/dired.c
729
c != *bp->b_nlchr)
usr.bin/mg/display.c
311
vtputc(int c, struct mgwin *wp)
usr.bin/mg/display.c
316
c &= 0xff;
usr.bin/mg/display.c
321
else if (c == '\t') {
usr.bin/mg/display.c
326
} else if (ISCTRL(c)) {
usr.bin/mg/display.c
328
vtputc(CCHR(c), wp);
usr.bin/mg/display.c
329
} else if (isprint(c))
usr.bin/mg/display.c
330
vp->v_text[vtcol++] = c;
usr.bin/mg/display.c
334
snprintf(bf, sizeof(bf), "\\%o", c);
usr.bin/mg/display.c
345
vtpute(int c, struct mgwin *wp)
usr.bin/mg/display.c
350
c &= 0xff;
usr.bin/mg/display.c
355
else if (c == '\t') {
usr.bin/mg/display.c
360
} else if (ISCTRL(c) != FALSE) {
usr.bin/mg/display.c
362
vtpute(CCHR(c), wp);
usr.bin/mg/display.c
363
} else if (isprint(c)) {
usr.bin/mg/display.c
365
vp->v_text[vtcol] = c;
usr.bin/mg/display.c
370
snprintf(bf, sizeof(bf), "\\%o", c);
usr.bin/mg/display.c
407
int c, i, j;
usr.bin/mg/display.c
514
c = lgetc(lp, i++);
usr.bin/mg/display.c
515
if (c == '\t') {
usr.bin/mg/display.c
517
} else if (ISCTRL(c) != FALSE)
usr.bin/mg/display.c
519
else if (isprint(c))
usr.bin/mg/display.c
524
snprintf(bf, sizeof(bf), "\\%o", c);
usr.bin/mg/echo.c
191
int c, i, y;
usr.bin/mg/echo.c
235
c = getkey(FALSE);
usr.bin/mg/echo.c
236
if ((flag & EFAUTO) != 0 && c == CCHR('I')) {
usr.bin/mg/echo.c
240
} else if (complt(flag, c, buf, nbuf, epos, &i) == TRUE) {
usr.bin/mg/echo.c
251
if (ml == esc && key_left[ml] && c == key_left[ml]) {
usr.bin/mg/echo.c
254
c = CCHR('B');
usr.bin/mg/echo.c
258
if (mr == esc && key_right[mr] && c == key_right[mr]) {
usr.bin/mg/echo.c
261
c = CCHR('F');
usr.bin/mg/echo.c
275
switch (c) {
usr.bin/mg/echo.c
367
c = CCHR('M');
usr.bin/mg/echo.c
377
if (complt(flag, c, buf, nbuf, epos, &i)
usr.bin/mg/echo.c
482
c = getkey(FALSE);
usr.bin/mg/echo.c
500
buf[cpos++] = (char)c;
usr.bin/mg/echo.c
502
eputc((char)c);
usr.bin/mg/echo.c
544
complt(int flags, int c, char *buf, size_t nbuf, int cpos, int *nx)
usr.bin/mg/echo.c
565
if (c == ' ')
usr.bin/mg/echo.c
567
else if (c != '\t' && c != CCHR('M'))
usr.bin/mg/echo.c
597
if (nxtra < 0 && nhits > 1 && c == ' ')
usr.bin/mg/echo.c
607
if (nxtra < 0 && c != CCHR('M')) /* exact */
usr.bin/mg/echo.c
859
int c;
usr.bin/mg/echo.c
861
while ((c = *fp++) != '\0') {
usr.bin/mg/echo.c
862
if (c != '%')
usr.bin/mg/echo.c
863
eputc(c);
usr.bin/mg/echo.c
865
c = *fp++;
usr.bin/mg/echo.c
866
switch (c) {
usr.bin/mg/echo.c
874
for (cp = kname, c = 0; c < key.k_count; c++) {
usr.bin/mg/echo.c
875
if (c)
usr.bin/mg/echo.c
878
(cp - kname) - 1, key.k_chars[c]);
usr.bin/mg/echo.c
903
c = *fp++;
usr.bin/mg/echo.c
904
switch (c) {
usr.bin/mg/echo.c
909
eputc(c);
usr.bin/mg/echo.c
915
eputc(c);
usr.bin/mg/echo.c
961
int c;
usr.bin/mg/echo.c
963
while ((c = *s++) != '\0')
usr.bin/mg/echo.c
964
eputc(c);
usr.bin/mg/echo.c
972
eputc(char c)
usr.bin/mg/echo.c
975
if (ISCTRL(c)) {
usr.bin/mg/echo.c
977
c = CCHR(c);
usr.bin/mg/echo.c
979
ttputc(c);
usr.bin/mg/extend.c
102
n1 = c - (ele - 1)->k_num;
usr.bin/mg/extend.c
107
n2 = ele->k_base - c;
usr.bin/mg/extend.c
112
if ((pfp = calloc(c - ele->k_base + 1,
usr.bin/mg/extend.c
122
ele->k_num = c;
usr.bin/mg/extend.c
125
if ((pfp = calloc(ele->k_num - c + 1,
usr.bin/mg/extend.c
135
ele->k_base = c;
usr.bin/mg/extend.c
154
ele->k_base = c;
usr.bin/mg/extend.c
155
ele->k_num = c;
usr.bin/mg/extend.c
167
ele->k_funcp[c - ele->k_base] =
usr.bin/mg/extend.c
178
n1 = c - ele->k_base;
usr.bin/mg/extend.c
196
ele->k_funcp[c - ele->k_base] =
usr.bin/mg/extend.c
220
if ((pfp = calloc(ele->k_num - c + !n2,
usr.bin/mg/extend.c
234
ele->k_num = c - !n2;
usr.bin/mg/extend.c
235
(ele + 1)->k_base = c + n2;
usr.bin/mg/extend.c
244
ele->k_funcp[c - ele->k_base] =
usr.bin/mg/extend.c
326
int c, s, n;
usr.bin/mg/extend.c
337
if (doscan(curmap, c = CHARMASK(maclcur->l_text[s]), &curmap)
usr.bin/mg/extend.c
339
if (remap(curmap, c, NULL, NULL)
usr.bin/mg/extend.c
344
(void)doscan(curmap, c = maclcur->l_text[s], NULL);
usr.bin/mg/extend.c
355
(pep - bprompt), c = getkey(FALSE));
usr.bin/mg/extend.c
356
if (doscan(curmap, c, &curmap) != NULL)
usr.bin/mg/extend.c
375
return (remap(curmap, c, funct, pref_map));
usr.bin/mg/extend.c
39
int count, c;
usr.bin/mg/extend.c
390
int c;
usr.bin/mg/extend.c
401
if (doscan(curmap, c = *keys++, &curmap) != NULL) {
usr.bin/mg/extend.c
402
if (remap(curmap, c, NULL, NULL) != TRUE)
usr.bin/mg/extend.c
411
(void)doscan(curmap, c = *keys, NULL);
usr.bin/mg/extend.c
412
return (remap(curmap, c, funct, pref_map));
usr.bin/mg/extend.c
44
if ((((c = maclcur->l_text[count]) ==
usr.bin/mg/extend.c
46
? lnewline() : linsert(1, c)) != TRUE)
usr.bin/mg/extend.c
680
int status, c, f, n;
usr.bin/mg/extend.c
771
c = *argp++;
usr.bin/mg/extend.c
776
c = CCHR('I');
usr.bin/mg/extend.c
780
c = CCHR('J');
usr.bin/mg/extend.c
784
c = CCHR('M');
usr.bin/mg/extend.c
788
c = CCHR('[');
usr.bin/mg/extend.c
795
c = CHARMASK(*++argp);
usr.bin/mg/extend.c
796
c = ISLOWER(c) ?
usr.bin/mg/extend.c
797
CCHR(TOUPPER(c)) : CCHR(c);
usr.bin/mg/extend.c
807
c = *argp - '0';
usr.bin/mg/extend.c
810
c <<= 3;
usr.bin/mg/extend.c
811
c += *++argp - '0';
usr.bin/mg/extend.c
814
c <<= 3;
usr.bin/mg/extend.c
815
c += *++argp
usr.bin/mg/extend.c
822
c = *++argp - '0';
usr.bin/mg/extend.c
824
c *= 10;
usr.bin/mg/extend.c
825
c += *++argp - '0';
usr.bin/mg/extend.c
827
c += KFIRST;
usr.bin/mg/extend.c
830
c = CHARMASK(*argp);
usr.bin/mg/extend.c
836
key.k_chars[key.k_count++] = c;
usr.bin/mg/extend.c
838
lp->l_text[lp->l_used++] = c;
usr.bin/mg/extend.c
92
remap(KEYMAP *curmap, int c, PF funct, KEYMAP *pref_map)
usr.bin/mg/extend.c
99
if (ele >= &curmap->map_element[curmap->map_num] || c < ele->k_base) {
usr.bin/mg/fileio.c
184
int c, i;
usr.bin/mg/fileio.c
187
while ((c = getc(ffp)) != EOF && c != *curbp->b_nlchr) {
usr.bin/mg/fileio.c
188
buf[i++] = c;
usr.bin/mg/fileio.c
192
if (c == EOF && ferror(ffp) != FALSE) {
usr.bin/mg/fileio.c
198
return (c == EOF ? FIOEOF : FIOSUC);
usr.bin/mg/fileio.c
608
const char *c;
usr.bin/mg/fileio.c
611
c = fn;
usr.bin/mg/fileio.c
614
while (*c != '\0') {
usr.bin/mg/fileio.c
620
if (*c == '/') {
usr.bin/mg/fileio.c
622
} else if (*c == '!') {
usr.bin/mg/fileio.c
628
fname[i] = *c;
usr.bin/mg/fileio.c
630
c++;
usr.bin/mg/fileio.c
645
const char *c = _PATH_MG_DIR;
usr.bin/mg/fileio.c
649
p = adjustname(c, TRUE);
usr.bin/mg/grep.c
122
int c;
usr.bin/mg/grep.c
132
c = lgetc(curwp->w_dotp, i);
usr.bin/mg/grep.c
133
if (isalnum(c) || c == '_')
usr.bin/mg/grep.c
141
c = lgetc(curwp->w_dotp, i - 1);
usr.bin/mg/grep.c
142
if (!isalnum(c) && c != '_')
usr.bin/mg/grep.c
148
c = lgetc(curwp->w_dotp, i);
usr.bin/mg/grep.c
149
if (!isalnum(c) && c != '_')
usr.bin/mg/grep.c
151
cprompt[j] = c;
usr.bin/mg/help.c
131
int c;
usr.bin/mg/help.c
137
for (c = 0; c < 256; c++) {
usr.bin/mg/help.c
138
fun = doscan(map, c, &newmap);
usr.bin/mg/help.c
141
getkeyname(buf, sizeof(buf), c);
usr.bin/mg/help.c
214
int c;
usr.bin/mg/help.c
217
for (c = 0; c < 256; c++) {
usr.bin/mg/help.c
218
nfun = doscan(map, c, &newmap);
usr.bin/mg/help.c
220
getkeyname(buf, len, c);
usr.bin/mg/help.c
225
getkeyname(keybuf, sizeof(keybuf), c);
usr.bin/mg/help.c
32
int c, m, i, num;
usr.bin/mg/help.c
51
key.k_chars[key.k_count++] = c = getkey(FALSE));
usr.bin/mg/help.c
52
if ((funct = doscan(curmap, c, &curmap)) != NULL)
usr.bin/mg/kbd.c
100
if (c == CCHR('H'))
usr.bin/mg/kbd.c
101
c = CCHR('?');
usr.bin/mg/kbd.c
102
else if (c == CCHR('?'))
usr.bin/mg/kbd.c
103
c = CCHR('H');
usr.bin/mg/kbd.c
105
if (use_metakey && (c & METABIT)) {
usr.bin/mg/kbd.c
106
pushedc = c & ~METABIT;
usr.bin/mg/kbd.c
108
c = CCHR('[');
usr.bin/mg/kbd.c
112
sizeof(prompt) - (promptp - prompt) - 1, c);
usr.bin/mg/kbd.c
116
return (c);
usr.bin/mg/kbd.c
125
doscan(KEYMAP *map, int c, KEYMAP **newmap)
usr.bin/mg/kbd.c
131
while (elec < last && c > elec->k_num)
usr.bin/mg/kbd.c
136
if (elec >= last || c < elec->k_base)
usr.bin/mg/kbd.c
139
ret = elec->k_funcp[c - elec->k_base];
usr.bin/mg/kbd.c
173
int c;
usr.bin/mg/kbd.c
181
c = TOLOWER(key.k_chars[key.k_count - 1]);
usr.bin/mg/kbd.c
189
if ((fp = doscan(curmap, c, NULL)) == NULL)
usr.bin/mg/kbd.c
229
int c, nn = 4;
usr.bin/mg/kbd.c
234
key.k_chars[0] = c = getkey(TRUE);
usr.bin/mg/kbd.c
236
if (c == '-')
usr.bin/mg/kbd.c
238
if (c >= '0' && c <= '9')
usr.bin/mg/kbd.c
241
while ((funct = doscan(curmap, c, &curmap)) == NULL) {
usr.bin/mg/kbd.c
242
key.k_chars[key.k_count++] = c = getkey(TRUE);
usr.bin/mg/kbd.c
262
int nn, c;
usr.bin/mg/kbd.c
266
c = getkey(TRUE);
usr.bin/mg/kbd.c
267
if (c < '0' || c > '9')
usr.bin/mg/kbd.c
270
nn += c - '0';
usr.bin/mg/kbd.c
272
key.k_chars[0] = c;
usr.bin/mg/kbd.c
275
while ((funct = doscan(curmap, c, &curmap)) == NULL) {
usr.bin/mg/kbd.c
276
key.k_chars[key.k_count++] = c = getkey(TRUE);
usr.bin/mg/kbd.c
294
int c;
usr.bin/mg/kbd.c
298
c = getkey(TRUE);
usr.bin/mg/kbd.c
299
if (c < '0' || c > '9')
usr.bin/mg/kbd.c
302
nn += c - '0';
usr.bin/mg/kbd.c
308
key.k_chars[0] = c;
usr.bin/mg/kbd.c
311
while ((funct = doscan(curmap, c, &curmap)) == NULL) {
usr.bin/mg/kbd.c
312
key.k_chars[key.k_count++] = c = getkey(TRUE);
usr.bin/mg/kbd.c
333
int c;
usr.bin/mg/kbd.c
340
c = key.k_chars[key.k_count - 1];
usr.bin/mg/kbd.c
359
maclcur->l_text[count] = c;
usr.bin/mg/kbd.c
369
lp->l_text[count] = c;
usr.bin/mg/kbd.c
373
if (c == *curbp->b_nlchr) {
usr.bin/mg/kbd.c
384
lputc(curwp->w_dotp, curwp->w_doto++, c);
usr.bin/mg/kbd.c
388
return (linsert(n, c));
usr.bin/mg/kbd.c
401
char *c, cbuf[2];
usr.bin/mg/kbd.c
403
if ((c = eread("Insert a character: ", cbuf, sizeof(cbuf),
usr.bin/mg/kbd.c
404
EFNEW)) == NULL || (c[0] == '\0'))
usr.bin/mg/kbd.c
407
key.k_chars[0] = *c;
usr.bin/mg/kbd.c
420
int c;
usr.bin/mg/kbd.c
425
if ((c = getkey(TRUE)) >= '0' && c <= '7') {
usr.bin/mg/kbd.c
427
key.k_chars[0] += c - '0';
usr.bin/mg/kbd.c
428
if ((c = getkey(TRUE)) >= '0' && c <= '7') {
usr.bin/mg/kbd.c
430
key.k_chars[0] += c - '0';
usr.bin/mg/kbd.c
432
ungetkey(c);
usr.bin/mg/kbd.c
434
ungetkey(c);
usr.bin/mg/kbd.c
68
ungetkey(int c)
usr.bin/mg/kbd.c
70
if (use_metakey && pushed && c == CCHR('['))
usr.bin/mg/kbd.c
73
pushedc = c;
usr.bin/mg/kbd.c
80
int c;
usr.bin/mg/kbd.c
94
c = pushedc;
usr.bin/mg/kbd.c
97
c = ttgetc();
usr.bin/mg/line.c
159
linsert(int n, int c)
usr.bin/mg/line.c
205
lp2->l_text[i] = c;
usr.bin/mg/line.c
232
lp1->l_text[doto + i] = c;
usr.bin/mg/match.c
102
c = *curbp->b_nlchr; /* end of line */
usr.bin/mg/match.c
104
c = lgetc(clp, cbo); /* somewhere in middle */
usr.bin/mg/match.c
112
if (c == lbal) {
usr.bin/mg/match.c
120
if (c == rbal)
usr.bin/mg/match.c
138
int c;
usr.bin/mg/match.c
175
c = lgetc(clp, cp);
usr.bin/mg/match.c
176
if (c != '\t') {
usr.bin/mg/match.c
177
if (ISCTRL(c)) {
usr.bin/mg/match.c
181
buf[bufo++] = CCHR(c);
usr.bin/mg/match.c
183
buf[bufo++] = c;
usr.bin/mg/match.c
71
int c, i, depth;
usr.bin/mg/paragraph.c
130
int c; /* current char during scan */
usr.bin/mg/paragraph.c
172
c = ' ';
usr.bin/mg/paragraph.c
176
c = lgetc(curwp->w_dotp, curwp->w_doto);
usr.bin/mg/paragraph.c
185
if (c != ' ' && c != '\t') {
usr.bin/mg/paragraph.c
187
wbuf[wordlen++] = c;
usr.bin/mg/paragraph.c
210
(c = lgetc(curwp->w_dotp, curwp->w_doto)) == ' '
usr.bin/mg/paragraph.c
211
|| c == '\t') && (ISEOSP(wbuf[wordlen - 1]) ||
usr.bin/mg/paragraph.c
408
char c;
usr.bin/mg/paragraph.c
414
c = lgetc(curwp->w_dotp, i);
usr.bin/mg/paragraph.c
415
if (c == '\t')
usr.bin/mg/paragraph.c
417
else if (ISCTRL(c) != FALSE)
usr.bin/mg/paragraph.c
427
if ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && c != '\t')
usr.bin/mg/paragraph.c
430
} while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' &&
usr.bin/mg/paragraph.c
431
c != '\t' && curwp->w_doto > 0);
usr.bin/mg/paragraph.c
436
} while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' &&
usr.bin/mg/paragraph.c
437
c != '\t' && curwp->w_doto < llength(curwp->w_dotp));
usr.bin/mg/region.c
118
int loffs, c, s;
usr.bin/mg/region.c
141
c = lgetc(linep, loffs);
usr.bin/mg/region.c
142
if (ISUPPER(c) != FALSE)
usr.bin/mg/region.c
143
lputc(linep, loffs, TOLOWER(c));
usr.bin/mg/region.c
161
int loffs, c, s;
usr.bin/mg/region.c
183
c = lgetc(linep, loffs);
usr.bin/mg/region.c
184
if (ISLOWER(c) != FALSE)
usr.bin/mg/region.c
185
lputc(linep, loffs, TOUPPER(c));
usr.bin/mg/search.c
170
int c;
usr.bin/mg/search.c
202
switch (c = getkey(FALSE)) {
usr.bin/mg/search.c
211
ungetkey(c);
usr.bin/mg/search.c
327
c = lgetc(clp, cbo++);
usr.bin/mg/search.c
328
if ((!firstc && !isalnum(c)))
usr.bin/mg/search.c
336
if (!xcase && ISUPPER(c))
usr.bin/mg/search.c
337
c = TOLOWER(c);
usr.bin/mg/search.c
339
pat[pptr++] = c;
usr.bin/mg/search.c
359
c = (char)getkey(FALSE);
usr.bin/mg/search.c
362
if (ISCTRL(c)) {
usr.bin/mg/search.c
363
ungetkey(c);
usr.bin/mg/search.c
382
pat[pptr++] = c;
usr.bin/mg/search.c
388
is_cpush(c);
usr.bin/mg/search.c
682
int cbo, tbo, c, i, xcase = 0;
usr.bin/mg/search.c
698
c = CCHR('J');
usr.bin/mg/search.c
700
c = lgetc(clp, cbo++);
usr.bin/mg/search.c
701
if (eq(c, pat[0], xcase) != FALSE) {
usr.bin/mg/search.c
711
c = CCHR('J');
usr.bin/mg/search.c
712
if (eq(c, *pp++, xcase) == FALSE)
usr.bin/mg/search.c
716
c = lgetc(tlp, tbo++);
usr.bin/mg/search.c
717
if (eq(c, *pp++, xcase) == FALSE)
usr.bin/mg/search.c
742
int cbo, tbo, c, i, xcase = 0;
usr.bin/mg/search.c
762
c = CCHR('J');
usr.bin/mg/search.c
764
c = lgetc(clp, cbo);
usr.bin/mg/search.c
765
if (eq(c, *epp, xcase) != FALSE) {
usr.bin/mg/search.c
779
c = CCHR('J');
usr.bin/mg/search.c
781
c = lgetc(tlp, tbo);
usr.bin/mg/search.c
782
if (eq(c, *--pp, xcase) == FALSE) {
usr.bin/mg/tags.c
343
char *l, *c;
usr.bin/mg/tags.c
366
if ((c = strstr(l, ";\"")) != NULL)
usr.bin/mg/tags.c
367
*c = '\0';
usr.bin/mg/tags.c
432
char c;
usr.bin/mg/tags.c
439
c = cinfo['_'];
usr.bin/mg/tags.c
474
cinfo['_'] = c;
usr.bin/mg/tty.c
443
fakec(int c)
usr.bin/mg/ttyio.c
126
ttputc(int c)
usr.bin/mg/ttyio.c
130
obuf[nobuf++] = c;
usr.bin/mg/ttyio.c
131
return (c);
usr.bin/mg/ttyio.c
165
char c;
usr.bin/mg/ttyio.c
169
ret = read(STDIN_FILENO, &c, 1);
usr.bin/mg/ttyio.c
180
return ((int) c) & 0xFF;
usr.bin/mg/util.c
107
int col, i, c;
usr.bin/mg/util.c
114
c = lgetc(wp->w_dotp, i);
usr.bin/mg/util.c
115
if (c == '\t') {
usr.bin/mg/util.c
117
} else if (ISCTRL(c) != FALSE)
usr.bin/mg/util.c
119
else if (isprint(c)) {
usr.bin/mg/util.c
122
col += snprintf(tmp, sizeof(tmp), "\\%o", c);
usr.bin/mg/util.c
375
int c, i, nicol;
usr.bin/mg/util.c
385
c = lgetc(curwp->w_dotp, i);
usr.bin/mg/util.c
386
if (c != ' ' && c != '\t')
usr.bin/mg/util.c
388
if (c == '\t')
usr.bin/mg/word.c
237
int c, s;
usr.bin/mg/word.c
259
c = lgetc(curwp->w_dotp, curwp->w_doto);
usr.bin/mg/word.c
260
if (ISLOWER(c) != FALSE) {
usr.bin/mg/word.c
261
c = TOUPPER(c);
usr.bin/mg/word.c
262
lputc(curwp->w_dotp, curwp->w_doto, c);
usr.bin/mg/word.c
279
int c, s;
usr.bin/mg/word.c
300
c = lgetc(curwp->w_dotp, curwp->w_doto);
usr.bin/mg/word.c
301
if (ISUPPER(c) != FALSE) {
usr.bin/mg/word.c
302
c = TOLOWER(c);
usr.bin/mg/word.c
303
lputc(curwp->w_dotp, curwp->w_doto, c);
usr.bin/mg/word.c
322
int c, s;
usr.bin/mg/word.c
344
c = lgetc(curwp->w_dotp, curwp->w_doto);
usr.bin/mg/word.c
345
if (ISLOWER(c) != FALSE) {
usr.bin/mg/word.c
346
c = TOUPPER(c);
usr.bin/mg/word.c
347
lputc(curwp->w_dotp, curwp->w_doto, c);
usr.bin/mg/word.c
353
c = lgetc(curwp->w_dotp, curwp->w_doto);
usr.bin/mg/word.c
354
if (ISUPPER(c) != FALSE) {
usr.bin/mg/word.c
355
c = TOLOWER(c);
usr.bin/mg/word.c
356
lputc(curwp->w_dotp, curwp->w_doto, c);
usr.bin/mg/yank.c
156
int i, c;
usr.bin/mg/yank.c
164
if ((c = lgetc(curwp->w_dotp, i)) != ' ' && c != '\t')
usr.bin/mg/yank.c
226
int c, i, nline;
usr.bin/mg/yank.c
239
while ((c = kremove(i)) >= 0) {
usr.bin/mg/yank.c
240
if (c == *curbp->b_nlchr) {
usr.bin/mg/yank.c
245
if (linsert(1, c) == FALSE)
usr.bin/mg/yank.c
50
kinsert(int c, int dir)
usr.bin/mg/yank.c
59
kbufp[kused++] = c;
usr.bin/mg/yank.c
61
kbufp[--kstart] = c;
usr.bin/midicat/midicat.c
35
int dump, c, i, len, n, sep, mode;
usr.bin/midicat/midicat.c
42
while ((c = getopt(argc, argv, "di:o:q:")) != -1) {
usr.bin/midicat/midicat.c
43
switch (c) {
usr.bin/nc/netcat.c
1365
char c = '\0';
usr.bin/nc/netcat.c
1385
iov.iov_base = &c;
usr.bin/nice/nice.c
51
int c;
usr.bin/nice/nice.c
66
while ((c = getopt (argc, argv, "n:")) != -1) {
usr.bin/nice/nice.c
67
switch (c) {
usr.bin/nl/nl.c
113
int c;
usr.bin/nl/nl.c
124
while ((c = getopt(argc, argv, "pb:d:f:h:i:l:n:s:v:w:")) != -1) {
usr.bin/nl/nl.c
125
switch (c) {
usr.bin/openssl/apps.c
953
char c;
usr.bin/openssl/apps.c
956
c = arg[0];
usr.bin/openssl/apps.c
957
if (c == '-') {
usr.bin/openssl/apps.c
958
c = 0;
usr.bin/openssl/apps.c
960
} else if (c == '+') {
usr.bin/openssl/apps.c
961
c = 1;
usr.bin/openssl/apps.c
964
c = 1;
usr.bin/openssl/apps.c
969
if (c)
usr.bin/openssl/dhparam.c
431
char c = '*';
usr.bin/openssl/dhparam.c
434
c = '.';
usr.bin/openssl/dhparam.c
436
c = '+';
usr.bin/openssl/dhparam.c
438
c = '*';
usr.bin/openssl/dhparam.c
440
c = '\n';
usr.bin/openssl/dhparam.c
441
BIO_write(BN_GENCB_get_arg(cb), &c, 1);
usr.bin/openssl/dsaparam.c
299
char c = '*';
usr.bin/openssl/dsaparam.c
302
c = '.';
usr.bin/openssl/dsaparam.c
304
c = '+';
usr.bin/openssl/dsaparam.c
306
c = '*';
usr.bin/openssl/dsaparam.c
308
c = '\n';
usr.bin/openssl/dsaparam.c
309
BIO_write(BN_GENCB_get_arg(cb), &c, 1);
usr.bin/openssl/gendh.c
205
char c = '*';
usr.bin/openssl/gendh.c
208
c = '.';
usr.bin/openssl/gendh.c
210
c = '+';
usr.bin/openssl/gendh.c
212
c = '*';
usr.bin/openssl/gendh.c
214
c = '\n';
usr.bin/openssl/gendh.c
215
BIO_write(BN_GENCB_get_arg(cb), &c, 1);
usr.bin/openssl/genpkey.c
403
char c = '*';
usr.bin/openssl/genpkey.c
408
c = '.';
usr.bin/openssl/genpkey.c
410
c = '+';
usr.bin/openssl/genpkey.c
412
c = '*';
usr.bin/openssl/genpkey.c
414
c = '\n';
usr.bin/openssl/genpkey.c
415
BIO_write(b, &c, 1);
usr.bin/openssl/genrsa.c
377
char c = '*';
usr.bin/openssl/genrsa.c
380
c = '.';
usr.bin/openssl/genrsa.c
382
c = '+';
usr.bin/openssl/genrsa.c
384
c = '*';
usr.bin/openssl/genrsa.c
386
c = '\n';
usr.bin/openssl/genrsa.c
387
BIO_write(BN_GENCB_get_arg(cb), &c, 1);
usr.bin/openssl/openssl.c
651
list_cipher_fn(const EVP_CIPHER * c, const char *from, const char *to,
usr.bin/openssl/openssl.c
654
if (c)
usr.bin/openssl/openssl.c
655
BIO_printf(arg, "%s\n", EVP_CIPHER_name(c));
usr.bin/openssl/passwd.c
250
char *c = (strchr(passwd, '\n'));
usr.bin/openssl/passwd.c
251
if (c != NULL)
usr.bin/openssl/passwd.c
252
*c = 0; /* truncate at newline */
usr.bin/openssl/req.c
1718
char c = '*';
usr.bin/openssl/req.c
1723
c = '.';
usr.bin/openssl/req.c
1725
c = '+';
usr.bin/openssl/req.c
1727
c = '*';
usr.bin/openssl/req.c
1729
c = '\n';
usr.bin/openssl/req.c
1730
BIO_write(b, &c, 1);
usr.bin/openssl/s_client.c
1666
const SSL_CIPHER *c;
usr.bin/openssl/s_client.c
1759
c = SSL_get_current_cipher(s);
usr.bin/openssl/s_client.c
1761
SSL_CIPHER_get_version(c),
usr.bin/openssl/s_client.c
1762
SSL_CIPHER_get_name(c));
usr.bin/openssl/s_server.c
1901
const SSL_CIPHER *c;
usr.bin/openssl/s_server.c
2008
c = sk_SSL_CIPHER_value(sk, i);
usr.bin/openssl/s_server.c
2010
SSL_CIPHER_get_version(c),
usr.bin/openssl/s_server.c
2011
SSL_CIPHER_get_name(c));
usr.bin/openssl/s_server.c
2039
c = SSL_get_current_cipher(con);
usr.bin/openssl/s_server.c
2041
SSL_CIPHER_get_version(c),
usr.bin/openssl/s_server.c
2042
SSL_CIPHER_get_name(c));
usr.bin/patch/backupfile.c
30
#define ISDIGIT(c) (isascii (c) && isdigit (c))
usr.bin/patch/pch.c
1511
char c;
usr.bin/patch/pch.c
1521
c = *p;
usr.bin/patch/pch.c
1529
*p = c;
usr.bin/patch/pch.c
478
int c;
usr.bin/patch/pch.c
480
c = fgetc(pfp);
usr.bin/patch/pch.c
481
if (c == '\\') {
usr.bin/patch/pch.c
483
c = fgetc(pfp);
usr.bin/patch/pch.c
484
} while (c != EOF && c != '\n');
usr.bin/patch/pch.c
488
if (c != EOF)
usr.bin/pkgconf/cli/getopt_long.c
135
int c;
usr.bin/pkgconf/cli/getopt_long.c
137
c = a % b;
usr.bin/pkgconf/cli/getopt_long.c
138
while (c != 0) {
usr.bin/pkgconf/cli/getopt_long.c
140
b = c;
usr.bin/pkgconf/cli/getopt_long.c
141
c = a % b;
usr.bin/pkgconf/libpkgconf/fileio.c
100
pkgconf_buffer_push_byte(buffer, c);
usr.bin/pkgconf/libpkgconf/fileio.c
112
return !(c == EOF || ferror(stream));
usr.bin/pkgconf/libpkgconf/fileio.c
23
int c = '\0', c2;
usr.bin/pkgconf/libpkgconf/fileio.c
25
while ((c = getc(stream)) != EOF)
usr.bin/pkgconf/libpkgconf/fileio.c
27
if (c == '\\' && !quoted)
usr.bin/pkgconf/libpkgconf/fileio.c
32
else if (c == '#')
usr.bin/pkgconf/libpkgconf/fileio.c
37
c = getc(stream);
usr.bin/pkgconf/libpkgconf/fileio.c
38
} while (c != '\n' && c != EOF);
usr.bin/pkgconf/libpkgconf/fileio.c
39
pkgconf_buffer_push_byte(buffer, c);
usr.bin/pkgconf/libpkgconf/fileio.c
43
pkgconf_buffer_push_byte(buffer, c);
usr.bin/pkgconf/libpkgconf/fileio.c
48
else if (c == '\n')
usr.bin/pkgconf/libpkgconf/fileio.c
64
pkgconf_buffer_push_byte(buffer, c);
usr.bin/pkgconf/libpkgconf/fileio.c
69
else if (c == '\r')
usr.bin/pkgconf/libpkgconf/libpkgconf.h
269
#define PKGCONF_IS_MODULE_SEPARATOR(c) ((c) == ',' || isspace ((unsigned char)(c)))
usr.bin/pkgconf/libpkgconf/libpkgconf.h
270
#define PKGCONF_IS_OPERATOR_CHAR(c) ((c) == '<' || (c) == '>' || (c) == '!' || (c) == '=')
usr.bin/pkgconf/libpkgconf/personality.c
153
const char *c = triplet;
usr.bin/pkgconf/libpkgconf/personality.c
155
for (; *c; c++)
usr.bin/pkgconf/libpkgconf/personality.c
156
if (!isalnum((unsigned char)*c) && *c != '-' && *c != '_')
usr.bin/pr/pr.c
1726
int c;
usr.bin/pr/pr.c
1736
while ((c = egetopt(argc, argv, "#adfFmrte?h:i?l:n?o:s?w:")) != -1) {
usr.bin/pr/pr.c
1737
switch (c) {
usr.bin/printf/printf.c
238
int c;
usr.bin/printf/printf.c
250
for (c = 3, value = 0; c-- && isodigit(*str); str++) {
usr.bin/printf/printf.c
279
int c;
usr.bin/printf/printf.c
286
for (c = 3; c-- && isodigit(*str); str++) {
usr.bin/printf/printf.c
296
for (c = 2; c-- && isxdigit((unsigned char)*str); str++) {
usr.bin/printf/printf.c
57
#define isodigit(c) ((c) >= '0' && (c) <= '7')
usr.bin/printf/printf.c
58
#define octtobin(c) ((c) - '0')
usr.bin/printf/printf.c
59
#define hextobin(c) ((c) >= 'A' && (c) <= 'F' ? c - 'A' + 10 : (c) >= 'a' && (c) <= 'f' ? c - 'a' + 10 : c - '0')
usr.bin/quota/quota.c
682
int c;
usr.bin/quota/quota.c
684
c = (unsigned char)*s++;
usr.bin/quota/quota.c
686
if (!isdigit(c))
usr.bin/quota/quota.c
688
} while ((c = (unsigned char)*s++));
usr.bin/rcs/buf.c
182
buf_putc(BUF *b, int c)
usr.bin/rcs/buf.c
189
*bp = (u_char)c;
usr.bin/rcs/ci.c
849
unsigned char *c, *end, *start;
usr.bin/rcs/ci.c
855
for (c = buf_get(data);
usr.bin/rcs/ci.c
856
c <= end && (c = memchr(c, '$', left)) != NULL;
usr.bin/rcs/ci.c
857
left = end - c + 1) {
usr.bin/rcs/ci.c
860
start = c;
usr.bin/rcs/ci.c
861
c++;
usr.bin/rcs/ci.c
862
if (!isalpha(*c))
usr.bin/rcs/ci.c
870
if (memcmp(c, rcs_expkw[j].kw_str, len) != 0) {
usr.bin/rcs/ci.c
880
c += len;
usr.bin/rcs/ci.c
881
if (c > end) {
usr.bin/rcs/ci.c
885
if (*c != ':') {
usr.bin/rcs/ci.c
891
while (++c <= end) {
usr.bin/rcs/ci.c
892
if (*c == '\n') {
usr.bin/rcs/ci.c
894
++c;
usr.bin/rcs/ci.c
897
if (*c == '$')
usr.bin/rcs/ci.c
901
len = c - start + 1;
usr.bin/rcs/date.y
739
char c, *p, buff[20];
usr.bin/rcs/date.y
746
if (isdigit(c = *yyInput) || c == '-' || c == '+') {
usr.bin/rcs/date.y
747
if (c == '-' || c == '+') {
usr.bin/rcs/date.y
748
sign = c == '-' ? -1 : 1;
usr.bin/rcs/date.y
756
for (yylval.Number = 0; isdigit(c = *yyInput++); )
usr.bin/rcs/date.y
757
yylval.Number = 10 * yylval.Number + c - '0';
usr.bin/rcs/date.y
764
if (isalpha(c)) {
usr.bin/rcs/date.y
765
for (p = buff; isalpha(c = *yyInput++) || c == '.'; )
usr.bin/rcs/date.y
767
*p++ = c;
usr.bin/rcs/date.y
772
if (c != '(')
usr.bin/rcs/date.y
777
c = *yyInput++;
usr.bin/rcs/date.y
778
if (c == '\0')
usr.bin/rcs/date.y
779
return (c);
usr.bin/rcs/date.y
780
if (c == '(')
usr.bin/rcs/date.y
782
else if (c == ')')
usr.bin/rcs/diff.c
1000
if (a <= b && c <= d && diff_format == D_NORMAL)
usr.bin/rcs/diff.c
1003
fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, flags);
usr.bin/rcs/diff.c
1014
int i, c, col;
usr.bin/rcs/diff.c
1051
if ((c = getc(lb)) == EOF) {
usr.bin/rcs/diff.c
1059
if (c == '\t' && (flags & D_EXPANDTABS)) {
usr.bin/rcs/diff.c
1064
diff_output("%c", c);
usr.bin/rcs/diff.c
1201
int a, b, c, d;
usr.bin/rcs/diff.c
1210
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/rcs/diff.c
1239
c = cvp->c;
usr.bin/rcs/diff.c
1242
if (a <= b && c <= d)
usr.bin/rcs/diff.c
1266
if (cvp->c <= cvp->d) {
usr.bin/rcs/diff.c
1275
c = cvp->c;
usr.bin/rcs/diff.c
1278
if (a <= b && c <= d)
usr.bin/rcs/diff.c
1286
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/rcs/diff.c
1287
fetch(ixnew, c, d, f2,
usr.bin/rcs/diff.c
1304
int a, b, c, d;
usr.bin/rcs/diff.c
1313
lowc = MAXIMUM(1, cvp->c - diff_context);
usr.bin/rcs/diff.c
1335
c = cvp->c;
usr.bin/rcs/diff.c
1343
if (a <= b && c <= d)
usr.bin/rcs/diff.c
1352
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/rcs/diff.c
1359
fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags);
usr.bin/rcs/diff.c
1360
fetch(ixnew, c, d, f2, '+', 0, flags);
usr.bin/rcs/diff.c
173
int c; /* start line in new file */
usr.bin/rcs/diff.c
478
equiv(struct line *a, int n, struct line *b, int m, int *c)
usr.bin/rcs/diff.c
496
c[j] = -b[j].serial;
usr.bin/rcs/diff.c
499
c[j] = b[j].serial;
usr.bin/rcs/diff.c
502
c[j] = -1;
usr.bin/rcs/diff.c
525
stone(int *a, int n, int *b, int *c, int flags)
usr.bin/rcs/diff.c
539
c[0] = newcand(0, 0, 0);
usr.bin/rcs/diff.c
546
oldc = c[0];
usr.bin/rcs/diff.c
551
l = search(c, k, y);
usr.bin/rcs/diff.c
553
oldc = c[l - 1];
usr.bin/rcs/diff.c
555
if (clist[c[l]].y <= y)
usr.bin/rcs/diff.c
557
tc = c[l];
usr.bin/rcs/diff.c
558
c[l] = newcand(i, y, oldc);
usr.bin/rcs/diff.c
563
c[l] = newcand(i, y, oldc);
usr.bin/rcs/diff.c
589
search(int *c, int k, int y)
usr.bin/rcs/diff.c
593
if (clist[c[k]].y < y) /* quick look for typical case */
usr.bin/rcs/diff.c
601
t = clist[c[l]].y;
usr.bin/rcs/diff.c
634
int i, j, jackpot, c, d;
usr.bin/rcs/diff.c
654
c = getc(f1);
usr.bin/rcs/diff.c
661
((c == EOF && d == '\n') ||
usr.bin/rcs/diff.c
662
(c == '\n' && d == EOF))) {
usr.bin/rcs/diff.c
667
if ((flags & D_FOLDBLANKS) && isspace(c) &&
usr.bin/rcs/diff.c
670
if (c == '\n')
usr.bin/rcs/diff.c
673
} while (isspace(c = getc(f1)));
usr.bin/rcs/diff.c
680
while (isspace(c) && c != '\n') {
usr.bin/rcs/diff.c
681
c = getc(f1);
usr.bin/rcs/diff.c
689
if (chrtran[c] != chrtran[d]) {
usr.bin/rcs/diff.c
692
if (c != '\n' && c != EOF)
usr.bin/rcs/diff.c
694
if (d != '\n' && c != EOF)
usr.bin/rcs/diff.c
698
if (c == '\n' || c == EOF)
usr.bin/rcs/diff.c
705
if ((c = getc(f1)) != (d = getc(f2))) {
usr.bin/rcs/diff.c
708
if (c != '\n' && c != EOF)
usr.bin/rcs/diff.c
710
if (d != '\n' && c != EOF)
usr.bin/rcs/diff.c
714
if (c == '\n' || c == EOF)
usr.bin/rcs/diff.c
779
int i, c;
usr.bin/rcs/diff.c
781
for (i = 1; (c = getc(f)) != '\n' && c != EOF; i++)
usr.bin/rcs/diff.c
812
if ((c = getc(f1)) == EOF)
usr.bin/rcs/diff.c
814
diff_output("%c", c);
usr.bin/rcs/diff.c
876
change(FILE *f1, FILE *f2, int a, int b, int c, int d, int flags)
usr.bin/rcs/diff.c
883
if (diff_format != D_IFDEF && a > b && c > d)
usr.bin/rcs/diff.c
900
if (a > b || c <= d) { /* Changes and inserts. */
usr.bin/rcs/diff.c
901
for (i = c; i <= d; i++) {
usr.bin/rcs/diff.c
958
c > context_vec_ptr->d + (2 * diff_context) + 1) {
usr.bin/rcs/diff.c
971
context_vec_ptr->c = c;
usr.bin/rcs/diff.c
982
diff_output("%c", a > b ? 'a' : c > d ? 'd' : 'c');
usr.bin/rcs/diff.c
984
range(c, d, ",");
usr.bin/rcs/diff.c
989
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/rcs/diff.c
993
if (!(c > d)) /* add changed lines */
usr.bin/rcs/diff.c
994
diff_output("a%d %d\n", b, d - c + 1);
usr.bin/rcs/diff3.c
536
int a, b, c, d;
usr.bin/rcs/diff3.c
552
c = d = number(&p);
usr.bin/rcs/diff3.c
560
c++;
usr.bin/rcs/diff3.c
565
(*dd)[i].new.from = c;
usr.bin/rcs/diff3.c
828
int c,d;
usr.bin/rcs/diff3.c
839
c = getc(fp[0]);
usr.bin/rcs/diff3.c
841
if (c == -1 && d == -1)
usr.bin/rcs/diff3.c
843
if (c == -1 || d== -1)
usr.bin/rcs/diff3.c
846
if (c != d) {
usr.bin/rcs/diff3.c
850
} while (c != '\n');
usr.bin/rcs/ident.c
100
for (c = 0; c != EOF; c = getc(fp)) {
usr.bin/rcs/ident.c
103
if (c == KEYDELIM)
usr.bin/rcs/ident.c
117
int c;
usr.bin/rcs/ident.c
123
while ((c = getc(fp)) != VALDELIM) {
usr.bin/rcs/ident.c
124
if (c == EOF)
usr.bin/rcs/ident.c
127
if (isalpha(c))
usr.bin/rcs/ident.c
128
buf_putc(bp, c);
usr.bin/rcs/ident.c
135
while ((c = getc(fp)) != KEYDELIM) {
usr.bin/rcs/ident.c
136
if (c == EOF)
usr.bin/rcs/ident.c
139
if (c == '\n')
usr.bin/rcs/ident.c
142
buf_putc(bp, c);
usr.bin/rcs/ident.c
150
buf_putc(bp, c);
usr.bin/rcs/ident.c
93
int c;
usr.bin/rcs/rcs.c
1485
u_char *c, *kw, *fin;
usr.bin/rcs/rcs.c
1509
c = buf_get(bp);
usr.bin/rcs/rcs.c
1510
fin = c + buf_len(bp);
usr.bin/rcs/rcs.c
1514
while (c < fin) {
usr.bin/rcs/rcs.c
1515
kw = memchr(c, '$', fin - c);
usr.bin/rcs/rcs.c
1521
buf_append(newbuf, c, kw - c);
usr.bin/rcs/rcs.c
1523
c = kw;
usr.bin/rcs/rcs.c
1525
if (c == fin)
usr.bin/rcs/rcs.c
1527
if (!isalpha(*c)) /* all valid keywords start with a letter */
usr.bin/rcs/rcs.c
1538
if (c + kwlen < fin &&
usr.bin/rcs/rcs.c
1539
memcmp(c , rcs_expkw[i].kw_str, kwlen) == 0 &&
usr.bin/rcs/rcs.c
1540
(c[kwlen] == '$' || c[kwlen] == ':')) {
usr.bin/rcs/rcs.c
1541
c += kwlen;
usr.bin/rcs/rcs.c
1554
if (*c == ':') {
usr.bin/rcs/rcs.c
1555
for (; c < fin; ++c) {
usr.bin/rcs/rcs.c
1556
if (*c == '$' || *c == '\n')
usr.bin/rcs/rcs.c
1560
if (*c != '$') {
usr.bin/rcs/rcs.c
1562
buf_append(newbuf, kw, c - kw);
usr.bin/rcs/rcs.c
1566
++c;
usr.bin/rcs/rcs.c
1682
for (j = 0; c + j < fin; ++j) {
usr.bin/rcs/rcs.c
1683
if (c[j] != ' ')
usr.bin/rcs/rcs.c
1686
if (c + j == fin || c[j] == '\n')
usr.bin/rcs/rcs.c
1687
c += j;
usr.bin/rcs/rcs.c
1692
buf_append(newbuf, c, fin - c);
usr.bin/rcs/rcsparse.c
837
int c;
usr.bin/rcs/rcsparse.c
848
c = getc(rfp->rf_file);
usr.bin/rcs/rcsparse.c
849
if (c == '@') {
usr.bin/rcs/rcsparse.c
850
c = getc(rfp->rf_file);
usr.bin/rcs/rcsparse.c
851
if (c == EOF) {
usr.bin/rcs/rcsparse.c
853
} else if (c != '@') {
usr.bin/rcs/rcsparse.c
854
ungetc(c, rfp->rf_file);
usr.bin/rcs/rcsparse.c
859
if (c == EOF) {
usr.bin/rcs/rcsparse.c
861
} else if (c == '\n')
usr.bin/rcs/rcsparse.c
864
RBUF_PUTC(c);
usr.bin/rcs/rcsparse.c
885
int c, pre, ret, type;
usr.bin/rcs/rcsparse.c
900
c = EOF;
usr.bin/rcs/rcsparse.c
902
pre = c;
usr.bin/rcs/rcsparse.c
903
c = getc(rfp->rf_file);
usr.bin/rcs/rcsparse.c
904
if (c == EOF) {
usr.bin/rcs/rcsparse.c
913
} else if (c == '\n')
usr.bin/rcs/rcsparse.c
915
} while (isspace(c));
usr.bin/rcs/rcsparse.c
918
switch (c) {
usr.bin/rcs/rcsparse.c
931
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/rcs/rcsparse.c
938
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/rcs/rcsparse.c
945
rcsparse_warnx(rfp, "unexpected token \"%c\"", c);
usr.bin/rcs/rcsparse.c
949
if (!isgraph(c)) {
usr.bin/rcs/rcsparse.c
950
rcsparse_warnx(rfp, "unexpected character 0x%.2X", c);
usr.bin/rcs/rcsparse.c
962
if (c == EOF) {
usr.bin/rcs/rcsparse.c
968
} else if (c == '\n')
usr.bin/rcs/rcsparse.c
971
RBUF_PUTC(c);
usr.bin/rcs/rcsparse.c
973
c = getc(rfp->rf_file);
usr.bin/rcs/rcsparse.c
975
if (isspace(c)) {
usr.bin/rcs/rcsparse.c
976
if (c == '\n')
usr.bin/rcs/rcsparse.c
980
} else if (c == ';' || c == ':' || c == ',') {
usr.bin/rcs/rcsparse.c
981
ungetc(c, rfp->rf_file);
usr.bin/rcs/rcsparse.c
984
} else if (!isgraph(c)) {
usr.bin/rcs/rcsparse.c
985
rcsparse_warnx(rfp, "unexpected character 0x%.2X", c);
usr.bin/rcs/rcsutil.c
106
for (c = optstr; *c != '\0'; c++) {
usr.bin/rcs/rcsutil.c
107
if (*c == opt) {
usr.bin/rcs/rcsutil.c
111
if (*(c + 1) == ':') {
usr.bin/rcs/rcsutil.c
112
if (*(c + 2) == ':') {
usr.bin/rcs/rcsutil.c
475
u_char *c, *p;
usr.bin/rcs/rcsutil.c
487
p = c = data;
usr.bin/rcs/rcsutil.c
490
tlen = p - c + 1;
usr.bin/rcs/rcsutil.c
492
lp->l_line = c;
usr.bin/rcs/rcsutil.c
496
c = p + 1;
usr.bin/rcs/rcsutil.c
556
int c, ret;
usr.bin/rcs/rcsutil.c
562
if (isalpha(c = getchar()))
usr.bin/rcs/rcsutil.c
563
c = tolower(c);
usr.bin/rcs/rcsutil.c
564
if (c == defc || c == '\n' || (c == EOF && feof(stdin)))
usr.bin/rcs/rcsutil.c
567
ret = c;
usr.bin/rcs/rcsutil.c
569
while (c != EOF && c != '\n')
usr.bin/rcs/rcsutil.c
570
c = getchar();
usr.bin/rcs/rcsutil.c
90
const char *c;
usr.bin/rdist/common.c
349
int c, left = space;
usr.bin/rdist/common.c
358
if ((c = remc()) < -1) { /* error */
usr.bin/rdist/common.c
366
if (c == -1) { /* got EOF */
usr.bin/rdist/common.c
376
if (c == '\n') {
usr.bin/rdist/common.c
392
*p++ = c;
usr.bin/rdist/docmd.c
1009
if ((strcmp(c->c_name, nlptr->n_name) == 0) ||
usr.bin/rdist/docmd.c
1010
((cp = strchr(c->c_name, '@')) &&
usr.bin/rdist/docmd.c
1012
docmd(c, argc, argv);
usr.bin/rdist/docmd.c
1016
docmd(c, argc, argv);
usr.bin/rdist/docmd.c
308
char c = *cp;
usr.bin/rdist/docmd.c
312
*cp = c;
usr.bin/rdist/docmd.c
591
int c, isbad;
usr.bin/rdist/docmd.c
594
c = *cp;
usr.bin/rdist/docmd.c
595
if (c & 0200)
usr.bin/rdist/docmd.c
597
if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-')
usr.bin/rdist/docmd.c
947
struct cmd *c;
usr.bin/rdist/docmd.c
966
for (found = FALSE, c = cmds; c != NULL; c = c->c_next) {
usr.bin/rdist/docmd.c
967
if (c->c_label && argv[i] &&
usr.bin/rdist/docmd.c
968
strcmp(c->c_label, argv[i]) == 0) {
usr.bin/rdist/docmd.c
983
for (c = cmds; c != NULL; c = c->c_next) {
usr.bin/rdist/docmd.c
984
checkcmd(c);
usr.bin/rdist/docmd.c
990
if (strcmp(c->c_name, currenthost) != 0)
usr.bin/rdist/docmd.c
992
} else if (c->c_flags & CMD_ASSIGNED) {
usr.bin/rdist/docmd.c
995
c->c_name);
usr.bin/rdist/expand.c
101
*pathp++ = c;
usr.bin/rdist/expand.c
481
int c;
usr.bin/rdist/expand.c
489
c = amatch(s, p);
usr.bin/rdist/expand.c
492
return (c);
usr.bin/rdist/expand.c
502
int c, cc;
usr.bin/rdist/expand.c
507
switch (c = *p++) {
usr.bin/rdist/expand.c
551
if (c != scc)
usr.bin/rdist/expand.c
95
addpath(int c)
usr.bin/rdist/gram.y
232
int c;
usr.bin/rdist/gram.y
237
switch (c = getc(fin)) {
usr.bin/rdist/gram.y
242
while ((c = getc(fin)) != EOF && c != '\n')
usr.bin/rdist/gram.y
244
if (c == EOF)
usr.bin/rdist/gram.y
256
return(c);
usr.bin/rdist/gram.y
260
return(c);
usr.bin/rdist/gram.y
264
return(c);
usr.bin/rdist/gram.y
267
if ((c = getc(fin)) == '>')
usr.bin/rdist/gram.y
269
(void) ungetc(c, fin);
usr.bin/rdist/gram.y
270
c = '-';
usr.bin/rdist/gram.y
281
c = getc(fin);
usr.bin/rdist/gram.y
282
if (c == EOF || c == '"')
usr.bin/rdist/gram.y
284
if (c == '\\') {
usr.bin/rdist/gram.y
285
if ((c = getc(fin)) == EOF) {
usr.bin/rdist/gram.y
290
if (c == '\n') {
usr.bin/rdist/gram.y
292
c = ' '; /* can't send '\n' */
usr.bin/rdist/gram.y
294
*cp1++ = c;
usr.bin/rdist/gram.y
296
if (c != '"')
usr.bin/rdist/gram.y
303
if ((c = getc(fin)) == ':')
usr.bin/rdist/gram.y
305
(void) ungetc(c, fin);
usr.bin/rdist/gram.y
315
if (c == '\\') {
usr.bin/rdist/gram.y
316
if ((c = getc(fin)) != EOF) {
usr.bin/rdist/gram.y
317
if (any(c, quotechars))
usr.bin/rdist/gram.y
324
*cp1++ = c;
usr.bin/rdist/gram.y
325
c = getc(fin);
usr.bin/rdist/gram.y
326
if (c == EOF || any(c, " \"'\t()=;:\n")) {
usr.bin/rdist/gram.y
327
(void) ungetc(c, fin);
usr.bin/rdist/gram.y
375
c = INSTALL;
usr.bin/rdist/gram.y
377
c = NOTIFY;
usr.bin/rdist/gram.y
379
c = EXCEPT;
usr.bin/rdist/gram.y
381
c = PATTERN;
usr.bin/rdist/gram.y
383
c = SPECIAL;
usr.bin/rdist/gram.y
385
c = CMDSPECIAL;
usr.bin/rdist/gram.y
390
yylval.subcmd = makesubcmd(c);
usr.bin/rdist/gram.y
391
return(c);
usr.bin/rdist/gram.y
398
int any(int c, char *str)
usr.bin/rdist/gram.y
401
if (c == *str++)
usr.bin/rdist/gram.y
413
struct cmd *c, *prev, *nc;
usr.bin/rdist/gram.y
427
for (prev = NULL, c = cmds; c!=NULL; prev = c, c = c->c_next) {
usr.bin/rdist/gram.y
428
if (strcmp(c->c_name, h->n_name) == 0) {
usr.bin/rdist/gram.y
430
prev = c;
usr.bin/rdist/gram.y
431
c = c->c_next;
usr.bin/rdist/gram.y
432
} while (c != NULL &&
usr.bin/rdist/gram.y
433
strcmp(c->c_name, h->n_name) == 0);
usr.bin/rdist/gram.y
447
nc->c_next = c;
usr.bin/rdist/gram.y
453
if (c == NULL)
usr.bin/rdist/gram.y
465
struct cmd *c;
usr.bin/rdist/gram.y
467
c = ALLOC(cmd);
usr.bin/rdist/gram.y
468
c->c_type = DCOLON;
usr.bin/rdist/gram.y
469
c->c_name = stamp;
usr.bin/rdist/gram.y
470
c->c_label = label;
usr.bin/rdist/gram.y
471
c->c_files = expand(files, E_ALL);
usr.bin/rdist/gram.y
472
c->c_cmds = scmds;
usr.bin/rdist/gram.y
473
c->c_next = NULL;
usr.bin/rdist/gram.y
475
cmds = last_cmd = c;
usr.bin/rdist/gram.y
477
last_cmd->c_next = c;
usr.bin/rdist/gram.y
478
last_cmd = c;
usr.bin/rdist/rdist.c
123
while ((c = getopt(argc, argv, optchars)) != -1)
usr.bin/rdist/rdist.c
124
switch (c) {
usr.bin/rdist/rdist.c
144
if (c == 'a') {
usr.bin/rdist/rdist.c
151
else if (c == 'A') {
usr.bin/rdist/rdist.c
158
else if (c == 'M')
usr.bin/rdist/rdist.c
160
else if (c == 't')
usr.bin/rdist/rdist.c
95
int c;
usr.bin/rdistd/rdistd.c
61
int c;
usr.bin/rdistd/rdistd.c
68
while ((c = getopt(argc, argv, "SDV")) != -1)
usr.bin/rdistd/rdistd.c
69
switch (c) {
usr.bin/rdistd/server.c
801
int c;
usr.bin/rdistd/server.c
818
while ((c = getc(f1)) == getc(f2))
usr.bin/rdistd/server.c
819
if (c == EOF) {
usr.bin/rev/rev.c
83
isu8cont(unsigned char c)
usr.bin/rev/rev.c
85
return (c & (0x80 | 0x40)) == 0x80;
usr.bin/rpcgen/rpc_main.c
864
char c, flag[(1 << 8 * sizeof(char))];
usr.bin/rpcgen/rpc_main.c
892
c = argv[i][j];
usr.bin/rpcgen/rpc_main.c
893
switch (c) {
usr.bin/rpcgen/rpc_main.c
905
if (flag[(unsigned char)c])
usr.bin/rpcgen/rpc_main.c
907
flag[(unsigned char)c] = 1;
usr.bin/rpcgen/rpc_main.c
915
c = argv[i][++j]; /* get next char */
usr.bin/rpcgen/rpc_main.c
916
if (c == 's')
usr.bin/rpcgen/rpc_main.c
917
c = 'S';
usr.bin/rpcgen/rpc_main.c
918
else if (c == 'c')
usr.bin/rpcgen/rpc_main.c
919
c = 'C';
usr.bin/rpcgen/rpc_main.c
923
if (flag[(unsigned char)c])
usr.bin/rpcgen/rpc_main.c
925
flag[(unsigned char)c] = 1;
usr.bin/rpcgen/rpc_main.c
967
flag[(unsigned char)c] = 1;
usr.bin/rpcgen/rpc_main.c
970
if (c == 's') {
usr.bin/rpcgen/rpc_main.c
974
} else if (c == 'o') {
usr.bin/rpcgen/rpc_util.c
233
char c;
usr.bin/rpcgen/rpc_util.c
239
while ((c = *str++))
usr.bin/rpcgen/rpc_util.c
240
*p++ = (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
usr.bin/rpcgen/rpc_util.c
400
char c;
usr.bin/rpcgen/rpc_util.c
406
for (i = 0; (c = curline[i]); i++) {
usr.bin/rpcgen/rpc_util.c
407
if (c == '\t') {
usr.bin/rpcgen/rpc_util.c
409
c = ' ';
usr.bin/rpcgen/rpc_util.c
414
(void) fputc(c, stderr);
usr.bin/rpcgen/rpc_util.c
423
char c;
usr.bin/rpcgen/rpc_util.c
428
c = curline[i];
usr.bin/rpcgen/rpc_util.c
429
if (c == '\t') {
usr.bin/rpcinfo/rpcinfo.c
107
while ((c = getopt(argc, argv, "ptubdsn:")) != -1) {
usr.bin/rpcinfo/rpcinfo.c
108
switch (c) {
usr.bin/rpcinfo/rpcinfo.c
87
int c;
usr.bin/rsync/copy.c
35
const unsigned char *c = b;
usr.bin/rsync/copy.c
38
if (*c++ != '\0')
usr.bin/rsync/downloader.c
297
int c;
usr.bin/rsync/downloader.c
481
if ((c = io_read_check(p->fdin)) < 0) {
usr.bin/rsync/downloader.c
484
} else if (c > 0)
usr.bin/rsync/downloader.c
519
if ((c = io_read_check(p->fdin)) < 0) {
usr.bin/rsync/downloader.c
522
} else if (c > 0)
usr.bin/rsync/flist.c
1170
int rc = 0, c, flag;
usr.bin/rsync/flist.c
1228
c = asprintf(&cargv[j], "%s/%s", root, wfl[i].wpath);
usr.bin/rsync/flist.c
1229
if (c == -1) {
usr.bin/rsync/io.c
109
int c;
usr.bin/rsync/io.c
112
c = io_write_nonblocking(fd, buf, sz, &wsz);
usr.bin/rsync/io.c
113
if (!c) {
usr.bin/rsync/io.c
137
int c;
usr.bin/rsync/io.c
140
c = io_write_blocking(fd, buf, sz);
usr.bin/rsync/io.c
142
return c;
usr.bin/rsync/io.c
192
int c;
usr.bin/rsync/io.c
204
if ((c = poll(&pfd, 1, poll_timeout)) == -1) {
usr.bin/rsync/io.c
207
} else if (c == 0) {
usr.bin/rsync/io.c
242
int c;
usr.bin/rsync/io.c
245
c = io_read_nonblocking(fd, buf, sz, &rsz);
usr.bin/rsync/io.c
246
if (!c) {
usr.bin/rsync/io.c
342
int c;
usr.bin/rsync/io.c
348
c = io_read_blocking(fd, buf, sz);
usr.bin/rsync/io.c
350
return c;
usr.bin/rsync/io.c
61
int c;
usr.bin/rsync/io.c
73
if ((c = poll(&pfd, 1, poll_timeout)) == -1) {
usr.bin/rsync/io.c
76
} else if (c == 0) {
usr.bin/rsync/main.c
358
int fds[2], sd = -1, rc, c, st, i, lidx;
usr.bin/rsync/main.c
373
while ((c = getopt_long(argc, argv, "aDe:ghIJlnOoprtVvxz",
usr.bin/rsync/main.c
375
switch (c) {
usr.bin/rsync/receiver.c
178
int rc = 0, dfd = -1, phase = 0, c;
usr.bin/rsync/receiver.c
309
if ((c = poll(pfd, PFD__MAX, poll_timeout)) == -1) {
usr.bin/rsync/receiver.c
312
} else if (c == 0) {
usr.bin/rsync/receiver.c
353
c = rsync_uploader(ul,
usr.bin/rsync/receiver.c
356
if (c < 0) {
usr.bin/rsync/receiver.c
373
c = rsync_downloader(dl, sess,
usr.bin/rsync/receiver.c
375
if (c < 0) {
usr.bin/rsync/receiver.c
378
} else if (c == 0) {
usr.bin/rsync/rmatch.c
101
char c, c2;
usr.bin/rsync/rmatch.c
119
c = *pattern++;
usr.bin/rsync/rmatch.c
121
if (c == '[') {
usr.bin/rsync/rmatch.c
133
if (c == '\\')
usr.bin/rsync/rmatch.c
134
c = *pattern++;
usr.bin/rsync/rmatch.c
135
if (c == '\0')
usr.bin/rsync/rmatch.c
138
if (c == '/')
usr.bin/rsync/rmatch.c
147
if (c <= test && test <= c2)
usr.bin/rsync/rmatch.c
149
} else if (c == test)
usr.bin/rsync/rmatch.c
151
} while ((c = *pattern++) != ']');
usr.bin/rsync/rmatch.c
166
char c;
usr.bin/rsync/rmatch.c
169
switch (c = *pattern++) {
usr.bin/rsync/rmatch.c
195
if ((c = *pattern++) == '\0') {
usr.bin/rsync/rmatch.c
196
c = '\\';
usr.bin/rsync/rmatch.c
202
if (c != in)
usr.bin/rsync/sender.c
362
int rc = 0, c;
usr.bin/rsync/sender.c
448
if ((c = poll(pfd, 3, poll_timeout)) == -1) {
usr.bin/rsync/sender.c
451
} else if (c == 0) {
usr.bin/rsync/sender.c
477
c = io_read_check(fdin);
usr.bin/rsync/sender.c
478
if (c < 0) {
usr.bin/rsync/sender.c
481
} else if (c > 0)
usr.bin/rsync/sender.c
504
c = io_read_check(fdin);
usr.bin/rsync/sender.c
505
if (c < 0) {
usr.bin/rsync/sender.c
508
} else if (c > 0)
usr.bin/rsync/socket.c
105
if ((c = connect(*sd, (const struct sockaddr *)&src->sa, src->salen))
usr.bin/rsync/socket.c
109
switch (c = poll(&pfd, 1, poll_contimeout)) {
usr.bin/rsync/socket.c
112
if ((c = getsockopt(*sd, SOL_SOCKET, SO_ERROR, &optval,
usr.bin/rsync/socket.c
116
c = -1;
usr.bin/rsync/socket.c
128
if (c == -1) {
usr.bin/rsync/socket.c
294
int c, rc = 1;
usr.bin/rsync/socket.c
333
c = inet_connect(sd, &src[i], f->host, bsrc, bsrcsz);
usr.bin/rsync/socket.c
334
if (c < 0) {
usr.bin/rsync/socket.c
337
} else if (c > 0)
usr.bin/rsync/socket.c
376
int c, rc = 1;
usr.bin/rsync/socket.c
442
if ((c = protocol_line(&sess, f->host, buf)) < 0) {
usr.bin/rsync/socket.c
445
} else if (c > 0)
usr.bin/rsync/socket.c
81
int c;
usr.bin/rsync/uploader.c
875
int c;
usr.bin/rsync/uploader.c
904
c = io_write_buf(sess, u->fdout,
usr.bin/rsync/uploader.c
906
if (c == 0) {
usr.bin/rsync/uploader.c
939
c = pre_dir(u, sess);
usr.bin/rsync/uploader.c
941
c = pre_symlink(u, sess);
usr.bin/rsync/uploader.c
943
c = pre_file(u, fileinfd, &filesize, sess);
usr.bin/rsync/uploader.c
946
c = pre_dev(u, sess);
usr.bin/rsync/uploader.c
948
c = pre_fifo(u, sess);
usr.bin/rsync/uploader.c
950
c = pre_sock(u, sess);
usr.bin/rsync/uploader.c
952
c = 0;
usr.bin/rsync/uploader.c
954
if (c < 0)
usr.bin/rsync/uploader.c
956
else if (c > 0)
usr.bin/sdiff/sdiff.c
618
char c, cmd;
usr.bin/sdiff/sdiff.c
628
c = *p;
usr.bin/sdiff/sdiff.c
635
if (c == ',') {
usr.bin/sdiff/sdiff.c
641
c = *p;
usr.bin/sdiff/sdiff.c
652
cmd = c;
usr.bin/sdiff/sdiff.c
661
c = *p;
usr.bin/sdiff/sdiff.c
671
if (c != ',' && c != '\0')
usr.bin/sdiff/sdiff.c
672
errx(2, "invalid line range in file2: %c: %s", c, line);
usr.bin/sdiff/sdiff.c
674
if (c == ',') {
usr.bin/sed/compile.c
174
#define addrchar(c) (strchr("0123456789/\\$", (c)))
usr.bin/sed/compile.c
217
link = &cmd->u.c;
usr.bin/sed/compile.c
355
char c;
usr.bin/sed/compile.c
357
c = *p++;
usr.bin/sed/compile.c
358
if (c == '\0')
usr.bin/sed/compile.c
360
else if (c == '\\')
usr.bin/sed/compile.c
362
else if (c == '\n')
usr.bin/sed/compile.c
367
if (p[0] == c) {
usr.bin/sed/compile.c
373
if (p[1] == c) {
usr.bin/sed/compile.c
406
int c, d;
usr.bin/sed/compile.c
417
for (c = *s; (*t = *s) != ']' || c != d; s++, t++)
usr.bin/sed/compile.c
418
if ((c = *s) == '\0')
usr.bin/sed/compile.c
474
char c, *text, *op, *sp;
usr.bin/sed/compile.c
477
c = *p++; /* Terminator character */
usr.bin/sed/compile.c
478
if (c == '\0')
usr.bin/sed/compile.c
528
} else if (*p == c) {
usr.bin/sed/compile.c
794
cp->u.c = NULL;
usr.bin/sed/compile.c
797
if ((cp->u.c = findlabel(cp->t)) == NULL)
usr.bin/sed/compile.c
803
fixuplabel(cp->u.c, cp->next);
usr.bin/sed/compile.c
816
u_int h, c;
usr.bin/sed/compile.c
818
for (h = 0, p = (u_char *)cp->t; (c = *p) != 0; p++)
usr.bin/sed/compile.c
819
h = (h << 5) + h + c;
usr.bin/sed/compile.c
841
u_int h, c;
usr.bin/sed/compile.c
843
for (h = 0, p = (u_char *)name; (c = *p) != 0; p++)
usr.bin/sed/compile.c
844
h = (h << 5) + h + c;
usr.bin/sed/defs.h
82
struct s_command *c; /* Command(s) for b t { */
usr.bin/sed/main.c
115
int c, fflag;
usr.bin/sed/main.c
120
while ((c = getopt(argc, argv, "Eae:f:i::nru")) != -1)
usr.bin/sed/main.c
121
switch (c) {
usr.bin/sed/main.c
346
int c, fd;
usr.bin/sed/main.c
364
if (infile != NULL && (c = getc(infile)) != EOF) {
usr.bin/sed/main.c
365
(void)ungetc(c, infile);
usr.bin/sed/process.c
105
cp = cp->u.c;
usr.bin/sed/process.c
120
cp = cp->u.c;
usr.bin/sed/process.c
219
cp = cp->u.c;
usr.bin/sed/process.c
321
for (cp = prog; cp; cp = cp->code == '{' ? cp->u.c : cp->next)
usr.bin/sed/process.c
549
char c, *dst;
usr.bin/sed/process.c
560
while ((c = *src++) != '\0') {
usr.bin/sed/process.c
561
if (c == '&')
usr.bin/sed/process.c
563
else if (c == '\\' && isdigit((unsigned char)*src))
usr.bin/sed/process.c
568
if (c == '\\' && (*src == '\\' || *src == '&'))
usr.bin/sed/process.c
569
c = *src++;
usr.bin/sed/process.c
571
*dst++ = c;
usr.bin/sed/process.c
631
cfclose(cp->u.c, cp->next);
usr.bin/sendbug/sendbug.c
169
c = prompt();
usr.bin/sendbug/sendbug.c
170
switch (c) {
usr.bin/sendbug/sendbug.c
304
int c, ret;
usr.bin/sendbug/sendbug.c
313
c = getchar();
usr.bin/sendbug/sendbug.c
314
} while (c != EOF && c != '\n');
usr.bin/sendbug/sendbug.c
83
int ch, c, fd, ret = 1;
usr.bin/seq/seq.c
114
(c = getopt_long(argc, argv, "+f:s:w", long_opts, NULL)) != -1) {
usr.bin/seq/seq.c
116
switch (c) {
usr.bin/seq/seq.c
48
#define ISSIGN(c) ((int)(c) == '-' || (int)(c) == '+')
usr.bin/seq/seq.c
49
#define ISEXP(c) ((int)(c) == 'e' || (int)(c) == 'E')
usr.bin/seq/seq.c
50
#define ISODIGIT(c) ((int)(c) >= '0' && (int)(c) <= '7')
usr.bin/seq/seq.c
87
int c = 0;
usr.bin/signify/mod_ge25519.c
100
fe25519_add(&g, &d, &c); /* G = D+C */
usr.bin/signify/mod_ge25519.c
110
fe25519 a, b, c, d, t;
usr.bin/signify/mod_ge25519.c
118
fe25519_mul(&c, &p->t, &q->t); /* C = T1*k*T2 */
usr.bin/signify/mod_ge25519.c
119
fe25519_mul(&c, &c, &ge25519_ec2d);
usr.bin/signify/mod_ge25519.c
123
fe25519_sub(&r->t, &d, &c); /* F = D-C */
usr.bin/signify/mod_ge25519.c
124
fe25519_add(&r->z, &d, &c); /* G = D+C */
usr.bin/signify/mod_ge25519.c
131
fe25519 a,b,c,d;
usr.bin/signify/mod_ge25519.c
134
fe25519_square(&c, &p->z);
usr.bin/signify/mod_ge25519.c
135
fe25519_add(&c, &c, &c);
usr.bin/signify/mod_ge25519.c
143
fe25519_sub(&r->t, &r->z, &c);
usr.bin/signify/mod_ge25519.c
155
static unsigned char equal(signed char b,signed char c)
usr.bin/signify/mod_ge25519.c
158
unsigned char uc = c;
usr.bin/signify/mod_ge25519.c
86
fe25519 a,b,t1,t2,c,d,e,f,g,h,qt;
usr.bin/signify/mod_ge25519.c
96
fe25519_mul(&c, &r->t, &qt); /* C = T1*k*T2 */
usr.bin/signify/mod_ge25519.c
97
fe25519_mul(&c, &c, &ge25519_ec2d);
usr.bin/signify/mod_ge25519.c
99
fe25519_sub(&f, &d, &c); /* F = D-C */
usr.bin/signify/signify.c
631
verifychecksum(struct checksum *c, int quiet)
usr.bin/signify/signify.c
635
if (strcmp(c->algo, "SHA256") == 0) {
usr.bin/signify/signify.c
636
recodehash(c->hash, SHA256_DIGEST_STRING_LENGTH-1);
usr.bin/signify/signify.c
637
if (!SHA256File(c->file, buf))
usr.bin/signify/signify.c
639
} else if (strcmp(c->algo, "SHA512") == 0) {
usr.bin/signify/signify.c
640
recodehash(c->hash, SHA512_DIGEST_STRING_LENGTH-1);
usr.bin/signify/signify.c
641
if (!SHA512File(c->file, buf))
usr.bin/signify/signify.c
644
errx(1, "can't handle algorithm %s", c->algo);
usr.bin/signify/signify.c
646
if (strcmp(c->hash, buf) != 0)
usr.bin/signify/signify.c
649
printf("%s: OK\n", c->file);
usr.bin/signify/signify.c
658
struct checksum c;
usr.bin/signify/signify.c
682
c.algo, c.file, c.hash);
usr.bin/signify/signify.c
687
slot = ohash_qlookup(&myh, c.file);
usr.bin/signify/signify.c
690
if (verifychecksum(&c, quiet) != 0)
usr.bin/signify/signify.c
694
if (verifychecksum(&c, quiet) == 0) {
usr.bin/signify/signify.c
695
slot = ohash_qlookup(&myh, c.file);
usr.bin/signify/signify.c
698
if (!(e = strdup(c.file)))
usr.bin/sndioctl/sndioctl.c
1004
while ((c = getopt(argc, argv, "df:imnqv")) != -1) {
usr.bin/sndioctl/sndioctl.c
1005
switch (c) {
usr.bin/sndioctl/sndioctl.c
330
print_node(struct sioctl_node *c, int mono)
usr.bin/sndioctl/sndioctl.c
332
printf("%s", c->name);
usr.bin/sndioctl/sndioctl.c
333
if (!mono && c->unit >= 0)
usr.bin/sndioctl/sndioctl.c
334
printf("[%d]", c->unit);
usr.bin/sndioctl/sndioctl.c
345
unsigned int c;
usr.bin/sndioctl/sndioctl.c
349
while ((c = *s++) != 0) {
usr.bin/sndioctl/sndioctl.c
350
if (c == '(' || c == ')' || c < ' ')
usr.bin/sndioctl/sndioctl.c
352
*d++ = c;
usr.bin/sndioctl/sndioctl.c
74
isname(int c)
usr.bin/sndioctl/sndioctl.c
76
return (c == '_') ||
usr.bin/sndioctl/sndioctl.c
77
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
usr.bin/sndioctl/sndioctl.c
78
(c >= '0' && c <= '9');
usr.bin/sndioctl/sndioctl.c
999
int i, c, d_flag = 0;
usr.bin/sndiod/dev.c
1730
struct ctl *c;
usr.bin/sndiod/dev.c
1751
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
1752
if (!ctlslot_visible(s, c))
usr.bin/sndiod/dev.c
1754
c->refs_mask |= s->self;
usr.bin/sndiod/dev.c
1765
struct ctl *c, **pc;
usr.bin/sndiod/dev.c
1768
while ((c = *pc) != NULL) {
usr.bin/sndiod/dev.c
1769
c->refs_mask &= ~s->self;
usr.bin/sndiod/dev.c
1770
if (c->refs_mask == 0) {
usr.bin/sndiod/dev.c
1771
*pc = c->next;
usr.bin/sndiod/dev.c
1772
xfree(c);
usr.bin/sndiod/dev.c
1774
pc = &c->next;
usr.bin/sndiod/dev.c
1784
ctlslot_visible(struct ctlslot *s, struct ctl *c)
usr.bin/sndiod/dev.c
1786
switch (c->scope) {
usr.bin/sndiod/dev.c
1792
if (strcmp(c->node0.name, "server") == 0 &&
usr.bin/sndiod/dev.c
1793
strcmp(c->func, "device") == 0)
usr.bin/sndiod/dev.c
1797
return (s->opt != NULL && s->opt->dev == c->u.any.arg0);
usr.bin/sndiod/dev.c
1800
return (s->opt != NULL && s->opt == c->u.any.arg0);
usr.bin/sndiod/dev.c
1802
return (s->opt != NULL && s->opt == c->u.app_level.opt);
usr.bin/sndiod/dev.c
1805
return (s->midithru == c->u.midi.midithru);
usr.bin/sndiod/dev.c
1814
struct ctl *c;
usr.bin/sndiod/dev.c
1816
c = ctl_list;
usr.bin/sndiod/dev.c
1818
if (c == NULL)
usr.bin/sndiod/dev.c
1820
if (c->type != CTL_NONE && c->addr == addr)
usr.bin/sndiod/dev.c
1822
c = c->next;
usr.bin/sndiod/dev.c
1824
if (!ctlslot_visible(s, c))
usr.bin/sndiod/dev.c
1826
return c;
usr.bin/sndiod/dev.c
1832
struct ctl *c;
usr.bin/sndiod/dev.c
1835
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
1836
if (c->type == CTL_NONE)
usr.bin/sndiod/dev.c
1838
refs_mask = ctlslot_visible(s, c) ? s->self : 0;
usr.bin/sndiod/dev.c
1841
if (((c->refs_mask & s->self) ^ refs_mask) == 0)
usr.bin/sndiod/dev.c
1845
c->refs_mask |= s->self;
usr.bin/sndiod/dev.c
1847
c->desc_mask |= s->self;
usr.bin/sndiod/dev.c
1854
ctl_node_fmt(char *buf, size_t size, struct ctl_node *c)
usr.bin/sndiod/dev.c
1859
p += snprintf(buf, size, "%s", c->name);
usr.bin/sndiod/dev.c
1861
if (c->unit >= 0)
usr.bin/sndiod/dev.c
1862
p += snprintf(p, p < end ? end - p : 0, "%d", c->unit);
usr.bin/sndiod/dev.c
1868
ctl_scope_fmt(char *buf, size_t size, struct ctl *c)
usr.bin/sndiod/dev.c
1870
switch (c->scope) {
usr.bin/sndiod/dev.c
1873
c->u.hw.dev->name, c->u.hw.addr);
usr.bin/sndiod/dev.c
1876
c->u.dev_master.dev->name);
usr.bin/sndiod/dev.c
1879
c->u.app_level.opt->name, c->u.app_level.app->name);
usr.bin/sndiod/dev.c
1882
c->u.opt_dev.opt->name, c->u.opt_dev.dev->name);
usr.bin/sndiod/dev.c
1885
c->u.opt_mode.opt->name, opt_modes[c->u.opt_mode.idx].name);
usr.bin/sndiod/dev.c
1888
c->u.midi.midithru - midithru_array, c->u.midi.port->num);
usr.bin/sndiod/dev.c
1891
c->u.midi.midithru - midithru_array);
usr.bin/sndiod/dev.c
1898
ctl_fmt(char *buf, size_t size, struct ctl *c)
usr.bin/sndiod/dev.c
1903
p += snprintf(p, size, "%s/", c->group);
usr.bin/sndiod/dev.c
1904
p += ctl_node_fmt(p, p < end ? end - p : 0, &c->node0);
usr.bin/sndiod/dev.c
1905
p += snprintf(p, p < end ? end - p : 0, ".%s", c->func);
usr.bin/sndiod/dev.c
1907
switch (c->type) {
usr.bin/sndiod/dev.c
1912
p += ctl_node_fmt(p, p < end ? end - p : 0, &c->node1);
usr.bin/sndiod/dev.c
1916
if (c->display[0] != 0)
usr.bin/sndiod/dev.c
1917
p += snprintf(p, size, " (%s)", c->display);
usr.bin/sndiod/dev.c
1923
ctl_setval(struct ctl *c, int val)
usr.bin/sndiod/dev.c
1925
if (c->curval == val) {
usr.bin/sndiod/dev.c
1926
logx(3, "ctl%u: already set", c->addr);
usr.bin/sndiod/dev.c
1929
if (val < 0 || val > c->maxval) {
usr.bin/sndiod/dev.c
1930
logx(3, "ctl%u: %d: out of range", c->addr, val);
usr.bin/sndiod/dev.c
1934
switch (c->scope) {
usr.bin/sndiod/dev.c
1936
logx(3, "ctl%u: marked as dirty", c->addr);
usr.bin/sndiod/dev.c
1937
c->curval = val;
usr.bin/sndiod/dev.c
1938
c->dirty = 1;
usr.bin/sndiod/dev.c
1939
return dev_ref(c->u.hw.dev);
usr.bin/sndiod/dev.c
1941
if (!c->u.dev_master.dev->master_enabled)
usr.bin/sndiod/dev.c
1943
dev_master(c->u.dev_master.dev, val);
usr.bin/sndiod/dev.c
1944
dev_midi_master(c->u.dev_master.dev);
usr.bin/sndiod/dev.c
1945
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
1946
c->curval = val;
usr.bin/sndiod/dev.c
1949
opt_appvol(c->u.app_level.opt, c->u.app_level.app, val);
usr.bin/sndiod/dev.c
1950
opt_midi_vol(c->u.app_level.opt, c->u.app_level.app);
usr.bin/sndiod/dev.c
1951
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
1952
c->curval = val;
usr.bin/sndiod/dev.c
1955
if (opt_setdev(c->u.opt_dev.opt, c->u.opt_dev.dev)) {
usr.bin/sndiod/dev.c
1957
opt_setalt(c->u.opt_dev.opt, c->u.opt_dev.dev);
usr.bin/sndiod/dev.c
1961
opt_setmode(c->u.opt_mode.opt, c->u.opt_mode.idx, val);
usr.bin/sndiod/dev.c
1962
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
1963
c->curval = val;
usr.bin/sndiod/dev.c
1966
if (midithru_setport(c->u.midi.midithru, c->u.midi.port, val)) {
usr.bin/sndiod/dev.c
1967
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
1968
c->curval = val;
usr.bin/sndiod/dev.c
1972
if (midithru_setthru(c->u.midi.midithru, val)) {
usr.bin/sndiod/dev.c
1973
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
1974
c->curval = val;
usr.bin/sndiod/dev.c
1978
logx(2, "ctl%u: not writable", c->addr);
usr.bin/sndiod/dev.c
1995
struct ctl *c, **pc;
usr.bin/sndiod/dev.c
2005
for (pc = &ctl_list; (c = *pc) != NULL; pc = &c->next) {
usr.bin/sndiod/dev.c
2006
if (c->addr > addr)
usr.bin/sndiod/dev.c
2007
addr = c->addr;
usr.bin/sndiod/dev.c
2011
c = xmalloc(sizeof(struct ctl));
usr.bin/sndiod/dev.c
2012
c->type = type;
usr.bin/sndiod/dev.c
2013
strlcpy(c->func, func, CTL_NAMEMAX);
usr.bin/sndiod/dev.c
2014
strlcpy(c->group, gstr, CTL_NAMEMAX);
usr.bin/sndiod/dev.c
2015
strlcpy(c->display, display, CTL_DISPLAYMAX);
usr.bin/sndiod/dev.c
2016
strlcpy(c->node0.name, str0, CTL_NAMEMAX);
usr.bin/sndiod/dev.c
2017
c->node0.unit = unit0;
usr.bin/sndiod/dev.c
2018
if (c->type == CTL_VEC || c->type == CTL_LIST || c->type == CTL_SEL) {
usr.bin/sndiod/dev.c
2019
strlcpy(c->node1.name, str1, CTL_NAMEMAX);
usr.bin/sndiod/dev.c
2020
c->node1.unit = unit1;
usr.bin/sndiod/dev.c
2022
memset(&c->node1, 0, sizeof(struct ctl_node));
usr.bin/sndiod/dev.c
2023
c->scope = scope;
usr.bin/sndiod/dev.c
2024
c->u.any.arg0 = arg0;
usr.bin/sndiod/dev.c
2027
c->u.hw.addr = *(unsigned int *)arg1;
usr.bin/sndiod/dev.c
2032
c->u.any.arg1 = arg1;
usr.bin/sndiod/dev.c
2035
c->u.opt_mode.idx = *(int *)arg1;
usr.bin/sndiod/dev.c
2038
c->u.any.arg1 = NULL;
usr.bin/sndiod/dev.c
2040
c->addr = addr;
usr.bin/sndiod/dev.c
2041
c->maxval = maxval;
usr.bin/sndiod/dev.c
2042
c->val_mask = ~0;
usr.bin/sndiod/dev.c
2043
c->desc_mask = ~0;
usr.bin/sndiod/dev.c
2044
c->curval = val;
usr.bin/sndiod/dev.c
2045
c->dirty = 0;
usr.bin/sndiod/dev.c
2046
c->refs_mask = CTL_DEVMASK;
usr.bin/sndiod/dev.c
2050
if (ctlslot_visible(s, c))
usr.bin/sndiod/dev.c
2051
c->refs_mask |= 1 << i;
usr.bin/sndiod/dev.c
2053
c->next = *pc;
usr.bin/sndiod/dev.c
2054
*pc = c;
usr.bin/sndiod/dev.c
2056
logx(2, "ctl%u: %s = %d at %s: added", c->addr,
usr.bin/sndiod/dev.c
2057
(ctl_fmt(ctl_str, sizeof(ctl_str), c), ctl_str), c->curval,
usr.bin/sndiod/dev.c
2058
(ctl_scope_fmt(scope_str, sizeof(scope_str), c), scope_str));
usr.bin/sndiod/dev.c
2060
return c;
usr.bin/sndiod/dev.c
2064
ctl_update(struct ctl *c)
usr.bin/sndiod/dev.c
2073
refs_mask = ctlslot_visible(s, c) ? s->self : 0;
usr.bin/sndiod/dev.c
2076
if (((c->refs_mask & s->self) ^ refs_mask) == 0)
usr.bin/sndiod/dev.c
2080
c->refs_mask |= s->self;
usr.bin/sndiod/dev.c
2082
c->desc_mask |= s->self;
usr.bin/sndiod/dev.c
2088
ctl_match(struct ctl *c, int scope, void *arg0, void *arg1)
usr.bin/sndiod/dev.c
2090
if (c->type == CTL_NONE || c->scope != scope)
usr.bin/sndiod/dev.c
2092
if (arg0 != NULL && c->u.any.arg0 != arg0)
usr.bin/sndiod/dev.c
2096
if (arg1 != NULL && c->u.hw.addr != *(unsigned int *)arg1)
usr.bin/sndiod/dev.c
2102
if (arg1 != NULL && c->u.any.arg1 != arg1)
usr.bin/sndiod/dev.c
2106
if (arg1 != NULL && c->u.opt_mode.idx != *(int *)arg1)
usr.bin/sndiod/dev.c
2116
struct ctl *c;
usr.bin/sndiod/dev.c
2118
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
2119
if (ctl_match(c, scope, arg0, arg1))
usr.bin/sndiod/dev.c
2120
return c;
usr.bin/sndiod/dev.c
2128
struct ctl *c;
usr.bin/sndiod/dev.c
2130
c = ctl_find(scope, arg0, arg1);
usr.bin/sndiod/dev.c
2131
if (c == NULL)
usr.bin/sndiod/dev.c
2133
c->curval = val;
usr.bin/sndiod/dev.c
2134
c->val_mask = ~0U;
usr.bin/sndiod/dev.c
2144
struct ctl *c, **pc;
usr.bin/sndiod/dev.c
2150
c = *pc;
usr.bin/sndiod/dev.c
2151
if (c == NULL)
usr.bin/sndiod/dev.c
2153
if (ctl_match(c, scope, arg0, arg1)) {
usr.bin/sndiod/dev.c
2155
logx(2, "ctl%u: %s: removed", c->addr,
usr.bin/sndiod/dev.c
2156
(ctl_fmt(str, sizeof(str), c), str));
usr.bin/sndiod/dev.c
2159
c->refs_mask &= ~CTL_DEVMASK;
usr.bin/sndiod/dev.c
2160
if (c->refs_mask == 0) {
usr.bin/sndiod/dev.c
2161
*pc = c->next;
usr.bin/sndiod/dev.c
2162
xfree(c);
usr.bin/sndiod/dev.c
2165
c->type = CTL_NONE;
usr.bin/sndiod/dev.c
2166
c->desc_mask = ~0;
usr.bin/sndiod/dev.c
2168
pc = &c->next;
usr.bin/sndiod/dev.c
2175
struct ctl *c;
usr.bin/sndiod/dev.c
2179
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
2180
if (c->scope == CTL_HW &&
usr.bin/sndiod/dev.c
2181
c->u.hw.dev == d &&
usr.bin/sndiod/dev.c
2182
c->type == CTL_SEL &&
usr.bin/sndiod/dev.c
2183
strcmp(c->group, d->name) == 0 &&
usr.bin/sndiod/dev.c
2184
strcmp(c->node0.name, "server") == 0 &&
usr.bin/sndiod/dev.c
2185
strcmp(c->func, "device") == 0 &&
usr.bin/sndiod/dev.c
2186
c->curval == 1)
usr.bin/sndiod/dev.c
2187
display = c->display;
usr.bin/sndiod/dev.c
2195
struct ctl *c;
usr.bin/sndiod/dev.c
2201
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
2202
if (c->scope == CTL_HW &&
usr.bin/sndiod/dev.c
2203
c->u.hw.dev == d &&
usr.bin/sndiod/dev.c
2204
c->type == CTL_NUM &&
usr.bin/sndiod/dev.c
2205
strcmp(c->group, d->name) == 0 &&
usr.bin/sndiod/dev.c
2206
strcmp(c->node0.name, "output") == 0 &&
usr.bin/sndiod/dev.c
2207
strcmp(c->func, "level") == 0)
usr.bin/sndiod/dev.c
2227
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
2228
if (c->scope != CTL_OPT_DEV ||
usr.bin/sndiod/dev.c
2229
c->u.opt_dev.dev != d ||
usr.bin/sndiod/dev.c
2230
strcmp(c->display, display) == 0)
usr.bin/sndiod/dev.c
2232
strlcpy(c->display, display, CTL_DISPLAYMAX);
usr.bin/sndiod/dev.c
2233
c->desc_mask = ~0;
usr.bin/sndiod/dev.c
296
struct ctl *c;
usr.bin/sndiod/dev.c
304
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
305
if (c->type != CTL_NUM ||
usr.bin/sndiod/dev.c
306
strcmp(c->group, d->name) != 0 ||
usr.bin/sndiod/dev.c
307
strcmp(c->node0.name, "output") != 0 ||
usr.bin/sndiod/dev.c
308
strcmp(c->func, "level") != 0)
usr.bin/sndiod/dev.c
310
if (c->u.any.arg0 != d)
usr.bin/sndiod/dev.c
312
v = (c->curval * 127 + c->maxval / 2) / c->maxval;
usr.bin/sndiod/dev.c
722
struct ctl *c;
usr.bin/sndiod/dev.c
732
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev.c
733
if (c->scope != CTL_HW || c->u.hw.dev != d)
usr.bin/sndiod/dev.c
735
if (c->type != CTL_NUM ||
usr.bin/sndiod/dev.c
736
strcmp(c->group, d->name) != 0 ||
usr.bin/sndiod/dev.c
737
strcmp(c->node0.name, "output") != 0 ||
usr.bin/sndiod/dev.c
738
strcmp(c->func, "level") != 0)
usr.bin/sndiod/dev.c
740
v = (master * c->maxval + 64) / 127;
usr.bin/sndiod/dev.c
741
ctl_setval(c, v);
usr.bin/sndiod/dev.c
888
struct ctlslot *c;
usr.bin/sndiod/dev.c
904
for (c = ctlslot_array, i = 0; i < DEV_NCTLSLOT; i++, c++) {
usr.bin/sndiod/dev.c
905
if (c->ops == NULL)
usr.bin/sndiod/dev.c
907
if (c->opt == o) {
usr.bin/sndiod/dev.c
908
c->ops->exit(c->arg);
usr.bin/sndiod/dev.c
909
c->ops = NULL;
usr.bin/sndiod/dev.h
349
int ctl_setval(struct ctl *c, int val);
usr.bin/sndiod/dev_sioctl.c
134
struct ctl *c;
usr.bin/sndiod/dev_sioctl.c
137
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev_sioctl.c
138
if (c->scope == CTL_HW && c->u.hw.dev == d && c->dirty)
usr.bin/sndiod/dev_sioctl.c
161
struct ctl *c;
usr.bin/sndiod/dev_sioctl.c
170
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev_sioctl.c
171
if (c->scope != CTL_HW || c->u.hw.dev != d || !c->dirty)
usr.bin/sndiod/dev_sioctl.c
173
if (!sioctl_setval(d->sioctl.hdl, c->u.hw.addr, c->curval)) {
usr.bin/sndiod/dev_sioctl.c
174
logx(1, "ctl%u: set failed", c->addr);
usr.bin/sndiod/dev_sioctl.c
177
c->dirty = 0;
usr.bin/sndiod/dev_sioctl.c
83
struct ctl *c;
usr.bin/sndiod/dev_sioctl.c
87
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/dev_sioctl.c
88
if (c->scope != CTL_HW || c->u.hw.dev != d ||
usr.bin/sndiod/dev_sioctl.c
89
c->u.hw.addr != addr)
usr.bin/sndiod/dev_sioctl.c
92
logx(2, "ctl%u: %s -> %u", c->addr,
usr.bin/sndiod/dev_sioctl.c
93
(ctl_fmt(str, sizeof(str), c), str), val);
usr.bin/sndiod/dev_sioctl.c
95
c->val_mask = ~0U;
usr.bin/sndiod/dev_sioctl.c
96
c->curval = val;
usr.bin/sndiod/dsp.c
167
#define IS_SEP(c) \
usr.bin/sndiod/dsp.c
168
(((c) < 'a' || (c) > 'z') && \
usr.bin/sndiod/dsp.c
169
((c) < 'A' || (c) > 'Z') && \
usr.bin/sndiod/dsp.c
170
((c) < '0' || (c) > '9'))
usr.bin/sndiod/dsp.c
314
unsigned int c;
usr.bin/sndiod/dsp.c
348
for (c = nch; c > 0; c--) {
usr.bin/sndiod/dsp.c
358
for (c = 0; c < nch; c++)
usr.bin/sndiod/dsp.c
359
f[c] = 0;
usr.bin/sndiod/dsp.c
371
for (c = 0; c < nch; c++) {
usr.bin/sndiod/dsp.c
372
f[c] += (int64_t)ctx[n] * s;
usr.bin/sndiod/dsp.c
379
for (c = 0; c < nch; c++) {
usr.bin/sndiod/dsp.c
380
s = f[c] >> RESAMP_BITS;
usr.bin/sndiod/midi.c
274
unsigned char c;
usr.bin/sndiod/midi.c
277
c = *idata++;
usr.bin/sndiod/midi.c
278
if (c >= 0xf8) {
usr.bin/sndiod/midi.c
279
if (c != MIDI_ACK)
usr.bin/sndiod/midi.c
280
iep->ops->imsg(iep->arg, &c, 1);
usr.bin/sndiod/midi.c
281
} else if (c == SYSEX_END) {
usr.bin/sndiod/midi.c
283
iep->msg[iep->idx++] = c;
usr.bin/sndiod/midi.c
299
} else if (c >= 0xf0) {
usr.bin/sndiod/midi.c
300
iep->msg[0] = c;
usr.bin/sndiod/midi.c
301
iep->len = common_len[c & 7];
usr.bin/sndiod/midi.c
302
iep->st = c;
usr.bin/sndiod/midi.c
304
} else if (c >= 0x80) {
usr.bin/sndiod/midi.c
305
iep->msg[0] = c;
usr.bin/sndiod/midi.c
306
iep->len = voice_len[(c >> 4) & 7];
usr.bin/sndiod/midi.c
307
iep->last_st = iep->st = c;
usr.bin/sndiod/midi.c
312
iep->msg[iep->idx++] = c;
usr.bin/sndiod/midi.c
423
struct port *c;
usr.bin/sndiod/midi.c
425
c = xmalloc(sizeof(struct port));
usr.bin/sndiod/midi.c
426
c->path = path;
usr.bin/sndiod/midi.c
427
c->state = PORT_CFG;
usr.bin/sndiod/midi.c
428
c->hold = hold;
usr.bin/sndiod/midi.c
429
c->refcnt = 0;
usr.bin/sndiod/midi.c
430
c->midi = midi_new(&port_midiops, c, mode);
usr.bin/sndiod/midi.c
431
c->num = midi_portnum++;
usr.bin/sndiod/midi.c
432
c->next = port_list;
usr.bin/sndiod/midi.c
433
port_list = c;
usr.bin/sndiod/midi.c
434
return c;
usr.bin/sndiod/midi.c
441
port_del(struct port *c)
usr.bin/sndiod/midi.c
445
if (c->state != PORT_CFG)
usr.bin/sndiod/midi.c
446
port_close(c);
usr.bin/sndiod/midi.c
447
midi_del(c->midi);
usr.bin/sndiod/midi.c
448
for (p = &port_list; *p != c; p = &(*p)->next) {
usr.bin/sndiod/midi.c
456
*p = c->next;
usr.bin/sndiod/midi.c
457
xfree(c);
usr.bin/sndiod/midi.c
461
port_ref(struct port *c)
usr.bin/sndiod/midi.c
464
logx(3, "midi%u: port requested", c->midi->num);
usr.bin/sndiod/midi.c
466
if (c->state == PORT_CFG && !port_open(c))
usr.bin/sndiod/midi.c
468
c->refcnt++;
usr.bin/sndiod/midi.c
473
port_unref(struct port *c)
usr.bin/sndiod/midi.c
476
logx(3, "midi%u: port released", c->midi->num);
usr.bin/sndiod/midi.c
478
if (--c->refcnt == 0 && c->state == PORT_INIT)
usr.bin/sndiod/midi.c
479
port_drain(c);
usr.bin/sndiod/midi.c
495
port_open(struct port *c)
usr.bin/sndiod/midi.c
497
if (!port_mio_open(c)) {
usr.bin/sndiod/midi.c
498
logx(1, "midi%u: failed to open midi port", c->midi->num);
usr.bin/sndiod/midi.c
501
c->state = PORT_INIT;
usr.bin/sndiod/midi.c
506
port_close(struct port *c)
usr.bin/sndiod/midi.c
509
if (c->state == PORT_CFG) {
usr.bin/sndiod/midi.c
510
logx(0, "midi%u: can't close port (not opened)", c->midi->num);
usr.bin/sndiod/midi.c
514
logx(2, "midi%u: closed", c->midi->num);
usr.bin/sndiod/midi.c
515
c->state = PORT_CFG;
usr.bin/sndiod/midi.c
516
port_mio_close(c);
usr.bin/sndiod/midi.c
521
port_drain(struct port *c)
usr.bin/sndiod/midi.c
523
struct midi *ep = c->midi;
usr.bin/sndiod/midi.c
526
port_close(c);
usr.bin/sndiod/midi.c
528
c->state = PORT_DRAIN;
usr.bin/sndiod/midi.c
530
logx(3, "midi%u: draining", c->midi->num);
usr.bin/sndiod/midi.c
536
port_init(struct port *c)
usr.bin/sndiod/midi.c
538
if (c->hold && !port_ref(c))
usr.bin/sndiod/midi.c
544
port_done(struct port *c)
usr.bin/sndiod/midi.c
546
if (c->state == PORT_INIT)
usr.bin/sndiod/midi.c
547
port_drain(c);
usr.bin/sndiod/midi.c
557
struct ctl *c;
usr.bin/sndiod/midi.c
563
c = ctl_find(CTL_MIDI_PORT, midithru_array + i, p);
usr.bin/sndiod/midi.c
564
if (c != NULL && c->curval != 0) {
usr.bin/sndiod/midi.c
565
c->val_mask = ~0U;
usr.bin/sndiod/midi.c
566
c->curval = 0;
usr.bin/sndiod/midi.c
575
struct port *c;
usr.bin/sndiod/midi.c
583
for (c = port_list; c != NULL; c = c->next) {
usr.bin/sndiod/midi.c
584
c->refcnt++;
usr.bin/sndiod/midi.c
585
if (c->state == DEV_CFG)
usr.bin/sndiod/midi.c
586
port_open(c);
usr.bin/sndiod/midi.c
587
if (c->state == DEV_INIT && (t->prefportmask & c->midi->self))
usr.bin/sndiod/midi.c
588
midithru_addport(t, c);
usr.bin/sndiod/midi.c
589
snprintf(name, sizeof(name), "%u", c->num);
usr.bin/sndiod/midi.c
590
ctl_new(CTL_MIDI_PORT, t, c,
usr.bin/sndiod/midi.c
592
name, -1, 1, !!(t->portmask & c->midi->self));
usr.bin/sndiod/midi.c
594
ctl_new(CTL_MIDI_THRU, t, c,
usr.bin/sndiod/midi.c
602
struct port *c;
usr.bin/sndiod/midi.c
610
for (c = port_list; c != NULL; c = c->next) {
usr.bin/sndiod/midi.c
611
if (ctl_del(CTL_MIDI_PORT, t, c)) {
usr.bin/sndiod/midi.c
612
midithru_rm(t, c->midi);
usr.bin/sndiod/midi.c
613
port_unref(c);
usr.bin/sndiod/midi.c
620
midithru_addport(struct midithru *t, struct port *c)
usr.bin/sndiod/midi.c
624
if (c->state == DEV_INIT) {
usr.bin/sndiod/midi.c
627
midi_link(midi_ep + i, c->midi);
usr.bin/sndiod/midi.c
630
t->portmask |= c->midi->self;
usr.bin/sndiod/midi.c
662
midithru_setport(struct midithru *t, struct port *c, int val)
usr.bin/sndiod/midi.c
665
if (c->state == PORT_CFG && !port_open(c))
usr.bin/sndiod/midi.c
667
midithru_addport(t, c);
usr.bin/sndiod/midi.c
668
t->prefportmask |= c->midi->self;
usr.bin/sndiod/midi.c
670
midithru_rm(t, c->midi);
usr.bin/sndiod/midi.c
671
t->prefportmask &= ~c->midi->self;
usr.bin/sndiod/midi.c
708
struct ctl *c;
usr.bin/sndiod/midi.c
720
c = ctl_find(CTL_MIDI_PORT, midithru_array + i, p);
usr.bin/sndiod/midi.c
721
if (c != NULL && c->curval != 0) {
usr.bin/sndiod/midi.c
722
c->val_mask = ~0U;
usr.bin/sndiod/midi.c
723
c->curval = 1;
usr.bin/sndiod/opt.c
327
char c;
usr.bin/sndiod/opt.c
338
c = name[len];
usr.bin/sndiod/opt.c
339
if ((c < 'a' || c > 'z') &&
usr.bin/sndiod/opt.c
340
(c < 'A' || c > 'Z')) {
usr.bin/sndiod/opt.c
548
struct ctl *c;
usr.bin/sndiod/opt.c
584
c = ctl_find(CTL_OPT_DEV, o, o->dev);
usr.bin/sndiod/opt.c
585
if (c != NULL)
usr.bin/sndiod/opt.c
586
c->curval = 0;
usr.bin/sndiod/opt.c
604
c = ctl_find(CTL_OPT_DEV, o, o->dev);
usr.bin/sndiod/opt.c
605
if (c != NULL) {
usr.bin/sndiod/opt.c
606
c->curval = 1;
usr.bin/sndiod/opt.c
607
c->val_mask = ~0;
usr.bin/sndiod/sndiod.c
342
struct port *c;
usr.bin/sndiod/sndiod.c
344
for (c = port_list; c != NULL; c = c->next) {
usr.bin/sndiod/sndiod.c
345
if (strcmp(c->path, path) == 0)
usr.bin/sndiod/sndiod.c
346
return c;
usr.bin/sndiod/sndiod.c
348
c = port_new(path, MODE_MIDIMASK, hold);
usr.bin/sndiod/sndiod.c
349
if (c == NULL)
usr.bin/sndiod/sndiod.c
351
return c;
usr.bin/sndiod/sndiod.c
457
int c, i, background, unit;
usr.bin/sndiod/sndiod.c
502
while ((c = getopt(argc, argv,
usr.bin/sndiod/sndiod.c
504
switch (c) {
usr.bin/sndiod/sock.c
1078
c = ctl_list;
usr.bin/sndiod/sock.c
1079
while (c != NULL) {
usr.bin/sndiod/sock.c
1080
if (ctlslot_visible(f->ctlslot, c))
usr.bin/sndiod/sock.c
1081
c->desc_mask |= ctl;
usr.bin/sndiod/sock.c
1082
c = c->next;
usr.bin/sndiod/sock.c
1111
c = ctlslot_lookup(f->ctlslot, ntohs(m->u.ctlset.addr));
usr.bin/sndiod/sock.c
1112
if (c == NULL) {
usr.bin/sndiod/sock.c
1119
if (!ctl_setval(c, ntohs(m->u.ctlset.val))) {
usr.bin/sndiod/sock.c
1197
struct ctl *c, **pc;
usr.bin/sndiod/sock.c
1335
while ((c = *pc) != NULL) {
usr.bin/sndiod/sock.c
1336
if ((c->desc_mask & mask) == 0 ||
usr.bin/sndiod/sock.c
1337
(c->refs_mask & mask) == 0) {
usr.bin/sndiod/sock.c
1338
pc = &c->next;
usr.bin/sndiod/sock.c
1344
c->desc_mask &= ~mask;
usr.bin/sndiod/sock.c
1345
c->val_mask &= ~mask;
usr.bin/sndiod/sock.c
1346
type = ctlslot_visible(f->ctlslot, c) ?
usr.bin/sndiod/sock.c
1347
c->type : CTL_NONE;
usr.bin/sndiod/sock.c
1348
strlcpy(desc->group, ctlgroup(f, c), AMSG_CTL_NAMEMAX);
usr.bin/sndiod/sock.c
1349
strlcpy(desc->node0.name, c->node0.name,
usr.bin/sndiod/sock.c
1351
desc->node0.unit = ntohs(c->node0.unit);
usr.bin/sndiod/sock.c
1352
strlcpy(desc->node1.name, c->node1.name,
usr.bin/sndiod/sock.c
1354
desc->node1.unit = ntohs(c->node1.unit);
usr.bin/sndiod/sock.c
1356
strlcpy(desc->func, c->func, AMSG_CTL_NAMEMAX);
usr.bin/sndiod/sock.c
1357
desc->addr = htons(c->addr);
usr.bin/sndiod/sock.c
1358
desc->maxval = htons(c->maxval);
usr.bin/sndiod/sock.c
1359
desc->curval = htons(c->curval);
usr.bin/sndiod/sock.c
136
ctlgroup(struct sock *f, struct ctl *c)
usr.bin/sndiod/sock.c
1364
strlcpy(desc->display, c->display, AMSG_CTL_DISPLAYMAX);
usr.bin/sndiod/sock.c
1371
c->refs_mask &= ~mask;
usr.bin/sndiod/sock.c
1372
if (c->refs_mask == 0) {
usr.bin/sndiod/sock.c
1373
*pc = c->next;
usr.bin/sndiod/sock.c
1374
xfree(c);
usr.bin/sndiod/sock.c
1379
pc = &c->next;
usr.bin/sndiod/sock.c
139
return c->group;
usr.bin/sndiod/sock.c
1395
for (c = ctl_list; c != NULL; c = c->next) {
usr.bin/sndiod/sock.c
1396
if (!ctlslot_visible(f->ctlslot, c))
usr.bin/sndiod/sock.c
1398
if ((c->val_mask & mask) == 0)
usr.bin/sndiod/sock.c
140
if (strcmp(c->group, f->ctlslot->opt->name) == 0)
usr.bin/sndiod/sock.c
1400
c->val_mask &= ~mask;
usr.bin/sndiod/sock.c
1403
f->wmsg.u.ctlset.addr = htons(c->addr);
usr.bin/sndiod/sock.c
1404
f->wmsg.u.ctlset.val = htons(c->curval);
usr.bin/sndiod/sock.c
142
if (strcmp(c->group, f->ctlslot->opt->dev->name) == 0)
usr.bin/sndiod/sock.c
144
return c->group;
usr.bin/sndiod/sock.c
717
struct port *c;
usr.bin/sndiod/sock.c
783
c = port_bynum(devnum);
usr.bin/sndiod/sock.c
784
if (c == NULL)
usr.bin/sndiod/sock.c
808
if (!port_ref(c))
usr.bin/sndiod/sock.c
810
f->port = c;
usr.bin/sndiod/sock.c
811
midi_link(f->midi, c->midi);
usr.bin/sndiod/sock.c
847
struct ctl *c;
usr.bin/snmp/usm.c
628
u_char *c;
usr.bin/snmp/usm.c
642
c = keybuf;
usr.bin/snmp/usm.c
646
*c++ = *pw++;
usr.bin/sort/bwstring.c
1006
wchar_t c;
usr.bin/sort/bwstring.c
1013
c = *src;
usr.bin/sort/bwstring.c
1014
if (iswalnum(c) || iswblank(c)) {
usr.bin/sort/bwstring.c
1015
*dst = c;
usr.bin/sort/bwstring.c
519
int c;
usr.bin/sort/bwstring.c
521
c = fgetc(f);
usr.bin/sort/bwstring.c
523
if (c == EOF) {
usr.bin/sort/bwstring.c
528
if (c == eols)
usr.bin/sort/bwstring.c
538
rb->fgetwln_z_buffer[*len] = c;
usr.bin/sort/bwstring.c
543
wint_t c = 0;
usr.bin/sort/bwstring.c
545
c = fgetwc(f);
usr.bin/sort/bwstring.c
547
if (c == WEOF) {
usr.bin/sort/bwstring.c
552
if (c == eols)
usr.bin/sort/bwstring.c
562
rb->fgetwln_z_buffer[*len] = c;
usr.bin/sort/bwstring.c
934
unsigned char c;
usr.bin/sort/bwstring.c
941
c = *src;
usr.bin/sort/bwstring.c
942
if (isprint(c)) {
usr.bin/sort/bwstring.c
943
*dst = c;
usr.bin/sort/bwstring.c
953
wchar_t c;
usr.bin/sort/bwstring.c
960
c = *src;
usr.bin/sort/bwstring.c
961
if (iswprint(c)) {
usr.bin/sort/bwstring.c
962
*dst = c;
usr.bin/sort/bwstring.c
987
unsigned char c;
usr.bin/sort/bwstring.c
994
c = *src;
usr.bin/sort/bwstring.c
995
if (isalnum(c) || isblank(c)) {
usr.bin/sort/bwstring.c
996
*dst = c;
usr.bin/sort/coll.c
645
setsuffix(wchar_t c, unsigned char *si)
usr.bin/sort/coll.c
647
switch (c){
usr.bin/sort/radixsort.c
165
int c;
usr.bin/sort/radixsort.c
168
c = get_wc_index(sli, sl->level);
usr.bin/sort/radixsort.c
170
if (c == -1)
usr.bin/sort/radixsort.c
173
add_to_sublevel(sl, sli, c);
usr.bin/sort/sort.c
373
check_mutually_exclusive_flags(char c, bool *mef_flags)
usr.bin/sort/sort.c
384
if (mec != c) {
usr.bin/sort/sort.c
389
c, mec);
usr.bin/sort/sort.c
398
c, mutually_exclusive_flags[fo_index]);
usr.bin/sort/sort.c
423
set_sort_modifier(struct sort_mods *sm, int c)
usr.bin/sort/sort.c
425
switch (c) {
usr.bin/sort/sort.c
482
char *c, *f;
usr.bin/sort/sort.c
489
c = f = NULL;
usr.bin/sort/sort.c
532
c = sort_malloc(len + 1);
usr.bin/sort/sort.c
533
memcpy(c, s + pmatch[2].rm_so + 1, len);
usr.bin/sort/sort.c
534
c[len] = '\0';
usr.bin/sort/sort.c
538
ks->c2 = (size_t)strtoul(c, NULL, 10);
usr.bin/sort/sort.c
543
ks->c1 = (size_t)strtoul(c, NULL, 10);
usr.bin/sort/sort.c
576
sort_free(c);
usr.bin/sort/sort.c
634
char *c, *f;
usr.bin/sort/sort.c
641
c = f = NULL;
usr.bin/sort/sort.c
670
c = sort_malloc(len + 1);
usr.bin/sort/sort.c
671
memcpy(c, s + pmatch[2].rm_so + 1, len);
usr.bin/sort/sort.c
672
c[len] = '\0';
usr.bin/sort/sort.c
675
*nc = (size_t)strtoul(c, NULL, 10);
usr.bin/sort/sort.c
693
sort_free(c);
usr.bin/sort/sort.c
796
int c;
usr.bin/sort/sort.c
822
while (((c = getopt_long(argc, argv, OPTIONS, long_options, NULL))
usr.bin/sort/sort.c
825
check_mutually_exclusive_flags(c, mef_flags);
usr.bin/sort/sort.c
827
if (!set_sort_modifier(sm, c)) {
usr.bin/sort/sort.c
828
switch (c) {
usr.bin/sort/vsort.c
40
isdigit_clocale(wchar_t c)
usr.bin/sort/vsort.c
42
return (c >= L'0' && c <= L'9');
usr.bin/sort/vsort.c
46
isalpha_clocale(wchar_t c)
usr.bin/sort/vsort.c
48
return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z'));
usr.bin/sort/vsort.c
52
isalnum_clocale(wchar_t c)
usr.bin/sort/vsort.c
54
return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z') ||
usr.bin/sort/vsort.c
55
(c >= L'0' && c <= L'9'));
usr.bin/sort/vsort.c
65
wchar_t c;
usr.bin/sort/vsort.c
74
while ((si < se) && (c = bws_get_iter_value(si))) {
usr.bin/sort/vsort.c
77
if (!isalpha_clocale(c) && (c != L'~'))
usr.bin/sort/vsort.c
79
} else if (c == L'.') {
usr.bin/sort/vsort.c
85
} else if (!isalnum_clocale(c) && (c != L'~'))
usr.bin/spell/spellprog.c
439
char c = *ep;
usr.bin/spell/spellprog.c
444
ep[-1] = c;
usr.bin/spell/spellprog.c
576
char c;
usr.bin/spell/spellprog.c
578
c = ep[-1];
usr.bin/spell/spellprog.c
579
if (c == 'e')
usr.bin/spell/spellprog.c
581
if (!vowel(c) && vowel(ep[-2])) {
usr.bin/spell/spellprog.c
582
c = *ep;
usr.bin/spell/spellprog.c
587
*ep = c;
usr.bin/spell/spellprog.c
706
vowel(unsigned char c)
usr.bin/spell/spellprog.c
709
switch (tolower(c)) {
usr.bin/spell/spellprog.c
772
char c;
usr.bin/spell/spellprog.c
775
c = *ep;
usr.bin/spell/spellprog.c
784
*ep = c;
usr.bin/ssh/auth-options.c
186
sshbuf_free(c);
usr.bin/ssh/auth-options.c
77
struct sshbuf *c = NULL, *data = NULL;
usr.bin/ssh/auth-options.c
80
if ((c = sshbuf_fromb(oblob)) == NULL) {
usr.bin/ssh/auth-options.c
85
while (sshbuf_len(c) > 0) {
usr.bin/ssh/auth-options.c
88
if ((r = sshbuf_get_cstring(c, &name, NULL)) != 0 ||
usr.bin/ssh/auth-options.c
89
(r = sshbuf_froms(c, &data)) != 0) {
usr.bin/ssh/chacha.c
118
ctarget = c;
usr.bin/ssh/chacha.c
119
c = tmp;
usr.bin/ssh/chacha.c
187
U32TO8_LITTLE(c + 0,x0);
usr.bin/ssh/chacha.c
188
U32TO8_LITTLE(c + 4,x1);
usr.bin/ssh/chacha.c
189
U32TO8_LITTLE(c + 8,x2);
usr.bin/ssh/chacha.c
190
U32TO8_LITTLE(c + 12,x3);
usr.bin/ssh/chacha.c
191
U32TO8_LITTLE(c + 16,x4);
usr.bin/ssh/chacha.c
192
U32TO8_LITTLE(c + 20,x5);
usr.bin/ssh/chacha.c
193
U32TO8_LITTLE(c + 24,x6);
usr.bin/ssh/chacha.c
194
U32TO8_LITTLE(c + 28,x7);
usr.bin/ssh/chacha.c
195
U32TO8_LITTLE(c + 32,x8);
usr.bin/ssh/chacha.c
196
U32TO8_LITTLE(c + 36,x9);
usr.bin/ssh/chacha.c
197
U32TO8_LITTLE(c + 40,x10);
usr.bin/ssh/chacha.c
198
U32TO8_LITTLE(c + 44,x11);
usr.bin/ssh/chacha.c
199
U32TO8_LITTLE(c + 48,x12);
usr.bin/ssh/chacha.c
200
U32TO8_LITTLE(c + 52,x13);
usr.bin/ssh/chacha.c
201
U32TO8_LITTLE(c + 56,x14);
usr.bin/ssh/chacha.c
202
U32TO8_LITTLE(c + 60,x15);
usr.bin/ssh/chacha.c
206
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
usr.bin/ssh/chacha.c
213
c += 64;
usr.bin/ssh/chacha.c
38
#define ROTATE(v,c) (ROTL32(v,c))
usr.bin/ssh/chacha.c
43
#define QUARTERROUND(a,b,c,d) \
usr.bin/ssh/chacha.c
45
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
usr.bin/ssh/chacha.c
47
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
usr.bin/ssh/chacha.c
87
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
usr.bin/ssh/chacha.h
31
u_char *c, u_int bytes)
usr.bin/ssh/channels.c
1004
Channel *c;
usr.bin/ssh/channels.c
1007
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
1008
if (c == NULL || !c->have_remote_id)
usr.bin/ssh/channels.c
1010
switch (c->type) {
usr.bin/ssh/channels.c
1034
fatal_f("bad channel type %d", c->type);
usr.bin/ssh/channels.c
1043
channel_format_extended_usage(const Channel *c)
usr.bin/ssh/channels.c
1045
if (c->efd == -1)
usr.bin/ssh/channels.c
1048
switch (c->extended_usage) {
usr.bin/ssh/channels.c
1061
channel_format_status(const Channel *c)
usr.bin/ssh/channels.c
1067
c->type, c->xctype != NULL ? c->xctype : c->ctype,
usr.bin/ssh/channels.c
1068
c->have_remote_id ? "r" : "nr", c->remote_id,
usr.bin/ssh/channels.c
1069
c->mux_ctx != NULL ? "m" : "nm", c->mux_downstream_id,
usr.bin/ssh/channels.c
1070
c->istate, sshbuf_len(c->input),
usr.bin/ssh/channels.c
1071
c->ostate, sshbuf_len(c->output),
usr.bin/ssh/channels.c
1072
channel_format_extended_usage(c), sshbuf_len(c->extended),
usr.bin/ssh/channels.c
1073
c->rfd, c->wfd, c->efd, c->sock, c->ctl_chan,
usr.bin/ssh/channels.c
1074
c->have_ctl_child_id ? "c" : "nc", c->ctl_child_id,
usr.bin/ssh/channels.c
1075
c->io_want, c->io_ready,
usr.bin/ssh/channels.c
1076
c->isatty ? "T" : (c->remote_has_tty ? "RT" : ""),
usr.bin/ssh/channels.c
1077
c->bulk ? "B" : "I");
usr.bin/ssh/channels.c
1090
Channel *c;
usr.bin/ssh/channels.c
1101
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
1102
if (c == NULL)
usr.bin/ssh/channels.c
1104
switch (c->type) {
usr.bin/ssh/channels.c
1126
cp = channel_format_status(c);
usr.bin/ssh/channels.c
1128
c->self, c->remote_name, cp)) != 0) {
usr.bin/ssh/channels.c
1135
fatal_f("bad channel type %d", c->type);
usr.bin/ssh/channels.c
1161
open_preamble(struct ssh *ssh, const char *where, Channel *c, const char *type)
usr.bin/ssh/channels.c
1167
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/channels.c
1168
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/channels.c
1169
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0) {
usr.bin/ssh/channels.c
1170
fatal_r(r, "%s: channel %i: open", where, c->self);
usr.bin/ssh/channels.c
1177
Channel *c = channel_lookup(ssh, id);
usr.bin/ssh/channels.c
1180
if (c == NULL) {
usr.bin/ssh/channels.c
1185
open_preamble(ssh, __func__, c, c->ctype);
usr.bin/ssh/channels.c
1187
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
1194
Channel *c = channel_lookup(ssh, id);
usr.bin/ssh/channels.c
1197
if (c == NULL) {
usr.bin/ssh/channels.c
1201
if (!c->have_remote_id)
usr.bin/ssh/channels.c
1202
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
1206
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
1209
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
1218
Channel *c;
usr.bin/ssh/channels.c
1220
if ((c = channel_lookup(ssh, id)) == NULL)
usr.bin/ssh/channels.c
1227
TAILQ_INSERT_TAIL(&c->status_confirms, cc, entry);
usr.bin/ssh/channels.c
1234
Channel *c = channel_lookup(ssh, id);
usr.bin/ssh/channels.c
1236
if (c == NULL) {
usr.bin/ssh/channels.c
1240
c->open_confirm = fn;
usr.bin/ssh/channels.c
1241
c->open_confirm_ctx = ctx;
usr.bin/ssh/channels.c
1248
Channel *c = channel_by_id(ssh, id);
usr.bin/ssh/channels.c
1250
if (c == NULL) {
usr.bin/ssh/channels.c
1254
c->detach_user = fn;
usr.bin/ssh/channels.c
1255
c->detach_close = do_close;
usr.bin/ssh/channels.c
1261
Channel *c = channel_by_id(ssh, id);
usr.bin/ssh/channels.c
1263
if (c == NULL) {
usr.bin/ssh/channels.c
1267
c->detach_user = NULL;
usr.bin/ssh/channels.c
1268
c->detach_close = 0;
usr.bin/ssh/channels.c
1275
Channel *c = channel_lookup(ssh, id);
usr.bin/ssh/channels.c
1277
if (c == NULL) {
usr.bin/ssh/channels.c
1281
c->input_filter = ifn;
usr.bin/ssh/channels.c
1282
c->output_filter = ofn;
usr.bin/ssh/channels.c
1283
c->filter_ctx = ctx;
usr.bin/ssh/channels.c
1284
c->filter_cleanup = cfn;
usr.bin/ssh/channels.c
1291
Channel *c = channel_lookup(ssh, id);
usr.bin/ssh/channels.c
1294
if (c == NULL || c->type != SSH_CHANNEL_LARVAL)
usr.bin/ssh/channels.c
1296
if (!c->have_remote_id)
usr.bin/ssh/channels.c
1297
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
1299
channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, is_tty);
usr.bin/ssh/channels.c
1300
c->type = SSH_CHANNEL_OPEN;
usr.bin/ssh/channels.c
1301
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
1302
c->local_window = c->local_window_max = window_max;
usr.bin/ssh/channels.c
1305
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
1306
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/channels.c
1308
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
1312
channel_pre_listener(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1314
c->io_want = SSH_CHAN_IO_SOCK_R;
usr.bin/ssh/channels.c
1318
channel_pre_connecting(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1320
debug3("channel %d: waiting for connection", c->self);
usr.bin/ssh/channels.c
1321
c->io_want = SSH_CHAN_IO_SOCK_W;
usr.bin/ssh/channels.c
1325
channel_pre_open(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1327
c->io_want = 0;
usr.bin/ssh/channels.c
1328
if (c->istate == CHAN_INPUT_OPEN &&
usr.bin/ssh/channels.c
1329
c->remote_window > 0 &&
usr.bin/ssh/channels.c
1330
sshbuf_len(c->input) < c->remote_window &&
usr.bin/ssh/channels.c
1331
sshbuf_check_reserve(c->input, CHAN_RBUF) == 0)
usr.bin/ssh/channels.c
1332
c->io_want |= SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
1333
if (c->ostate == CHAN_OUTPUT_OPEN ||
usr.bin/ssh/channels.c
1334
c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1335
if (sshbuf_len(c->output) > 0) {
usr.bin/ssh/channels.c
1336
c->io_want |= SSH_CHAN_IO_WFD;
usr.bin/ssh/channels.c
1337
} else if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1338
if (CHANNEL_EFD_OUTPUT_ACTIVE(c))
usr.bin/ssh/channels.c
1340
"obuf_empty delayed efd %d/(%zu)", c->self,
usr.bin/ssh/channels.c
1341
c->efd, sshbuf_len(c->extended));
usr.bin/ssh/channels.c
1343
chan_obuf_empty(ssh, c);
usr.bin/ssh/channels.c
1347
if (c->efd != -1 && !(c->istate == CHAN_INPUT_CLOSED &&
usr.bin/ssh/channels.c
1348
c->ostate == CHAN_OUTPUT_CLOSED)) {
usr.bin/ssh/channels.c
1349
if (c->extended_usage == CHAN_EXTENDED_WRITE &&
usr.bin/ssh/channels.c
1350
sshbuf_len(c->extended) > 0)
usr.bin/ssh/channels.c
1351
c->io_want |= SSH_CHAN_IO_EFD_W;
usr.bin/ssh/channels.c
1352
else if (c->efd != -1 && !(c->flags & CHAN_EOF_SENT) &&
usr.bin/ssh/channels.c
1353
(c->extended_usage == CHAN_EXTENDED_READ ||
usr.bin/ssh/channels.c
1354
c->extended_usage == CHAN_EXTENDED_IGNORE) &&
usr.bin/ssh/channels.c
1355
sshbuf_len(c->extended) < c->remote_window)
usr.bin/ssh/channels.c
1356
c->io_want |= SSH_CHAN_IO_EFD_R;
usr.bin/ssh/channels.c
1443
channel_force_close(struct ssh *ssh, Channel *c, int abandon)
usr.bin/ssh/channels.c
1445
debug3_f("channel %d: forcibly closing", c->self);
usr.bin/ssh/channels.c
1446
if (c->istate == CHAN_INPUT_OPEN)
usr.bin/ssh/channels.c
1447
chan_read_failed(ssh, c);
usr.bin/ssh/channels.c
1448
if (c->istate == CHAN_INPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1449
sshbuf_reset(c->input);
usr.bin/ssh/channels.c
1450
chan_ibuf_empty(ssh, c);
usr.bin/ssh/channels.c
1452
if (c->ostate == CHAN_OUTPUT_OPEN ||
usr.bin/ssh/channels.c
1453
c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1454
sshbuf_reset(c->output);
usr.bin/ssh/channels.c
1455
chan_write_failed(ssh, c);
usr.bin/ssh/channels.c
1457
if (c->detach_user)
usr.bin/ssh/channels.c
1458
c->detach_user(ssh, c->self, 1, NULL);
usr.bin/ssh/channels.c
1459
if (c->efd != -1)
usr.bin/ssh/channels.c
1460
channel_close_fd(ssh, c, &c->efd);
usr.bin/ssh/channels.c
1462
c->type = SSH_CHANNEL_ABANDONED;
usr.bin/ssh/channels.c
1464
c->inactive_deadline = 0;
usr.bin/ssh/channels.c
1465
c->lastused = 0;
usr.bin/ssh/channels.c
1469
channel_pre_x11_open(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1471
int ret = x11_open_helper(ssh, c->output);
usr.bin/ssh/channels.c
1476
c->type = SSH_CHANNEL_OPEN;
usr.bin/ssh/channels.c
1477
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
1478
channel_pre_open(ssh, c);
usr.bin/ssh/channels.c
1483
c->self, c->istate, c->ostate);
usr.bin/ssh/channels.c
1484
channel_force_close(ssh, c, 0);
usr.bin/ssh/channels.c
1489
channel_pre_mux_client(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1491
c->io_want = 0;
usr.bin/ssh/channels.c
1492
if (c->istate == CHAN_INPUT_OPEN && !c->mux_pause &&
usr.bin/ssh/channels.c
1493
sshbuf_check_reserve(c->input, CHAN_RBUF) == 0)
usr.bin/ssh/channels.c
1494
c->io_want |= SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
1495
if (c->istate == CHAN_INPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1497
sshbuf_reset(c->input);
usr.bin/ssh/channels.c
1498
chan_ibuf_empty(ssh, c);
usr.bin/ssh/channels.c
1500
chan_rcvd_oclose(ssh, c);
usr.bin/ssh/channels.c
1502
if (c->ostate == CHAN_OUTPUT_OPEN ||
usr.bin/ssh/channels.c
1503
c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
1504
if (sshbuf_len(c->output) > 0)
usr.bin/ssh/channels.c
1505
c->io_want |= SSH_CHAN_IO_WFD;
usr.bin/ssh/channels.c
1506
else if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN)
usr.bin/ssh/channels.c
1507
chan_obuf_empty(ssh, c);
usr.bin/ssh/channels.c
1512
socks_decode_error(Channel *c, int status, const char *func, const char *msg)
usr.bin/ssh/channels.c
1518
func, c->self, msg);
usr.bin/ssh/channels.c
1525
channel_decode_socks4(Channel *c, struct sshbuf *input, struct sshbuf *output)
usr.bin/ssh/channels.c
1540
debug2("channel %d: decode socks4", c->self);
usr.bin/ssh/channels.c
1546
success = socks_decode_error(c, r, __func__, "header");
usr.bin/ssh/channels.c
1556
success = socks_decode_error(c, r, __func__, "host");
usr.bin/ssh/channels.c
1568
fatal_fr(r, "channel %d: consume", c->self);
usr.bin/ssh/channels.c
1572
c->self, socks4a ? "SOCKS4A" : "SOCKS4", user, (int)socks_cmd,
usr.bin/ssh/channels.c
1576
c->self, socks4a ? "SOCKS4A" : "SOCKS4", socks_cmd);
usr.bin/ssh/channels.c
1579
free(c->path);
usr.bin/ssh/channels.c
1580
c->path = host;
usr.bin/ssh/channels.c
1582
c->host_port = dest_port;
usr.bin/ssh/channels.c
1589
fatal_fr(r, "channel %d: compose reply", c->self);
usr.bin/ssh/channels.c
1615
channel_socks5_check_auth(Channel *c, struct sshbuf *b, struct sshbuf *input,
usr.bin/ssh/channels.c
1625
return socks_decode_error(c, r, __func__, "version");
usr.bin/ssh/channels.c
1627
fatal_fr(r, "channel %d: internal error: not socks5", c->self);
usr.bin/ssh/channels.c
1629
return socks_decode_error(c, r, __func__, "methods");
usr.bin/ssh/channels.c
1632
return socks_decode_error(c, r, __func__, "method");
usr.bin/ssh/channels.c
1637
debug("channel %d: didn't request SSH_SOCKS5_NOAUTH", c->self);
usr.bin/ssh/channels.c
1642
fatal_fr(r, "channel %d: consume", c->self);
usr.bin/ssh/channels.c
1647
fatal_fr(r, "channel %d: append reply", c->self);
usr.bin/ssh/channels.c
1649
debug2("channel %d: socks5 auth done", c->self);
usr.bin/ssh/channels.c
1654
channel_decode_socks5(Channel *c, struct sshbuf *input, struct sshbuf *output)
usr.bin/ssh/channels.c
1663
debug2("channel %d: decode socks5 %s", c->self,
usr.bin/ssh/channels.c
1664
(c->flags & SSH_SOCKS5_AUTHDONE) ? "request" : "auth");
usr.bin/ssh/channels.c
1670
if (!(c->flags & SSH_SOCKS5_AUTHDONE)) {
usr.bin/ssh/channels.c
1671
if ((r = channel_socks5_check_auth(c, b, input, output)) != 1) {
usr.bin/ssh/channels.c
1675
c->flags |= SSH_SOCKS5_AUTHDONE;
usr.bin/ssh/channels.c
1681
success = socks_decode_error(c, r, __func__, "version");
usr.bin/ssh/channels.c
1685
fatal_fr(r, "channel %d: internal error: not socks5", c->self);
usr.bin/ssh/channels.c
1688
debug2("channel %d: socks5 post auth", c->self);
usr.bin/ssh/channels.c
1692
success = socks_decode_error(c, r, __func__, "request header");
usr.bin/ssh/channels.c
1699
debug2("channel %d: only socks5 connect supported", c->self);
usr.bin/ssh/channels.c
1710
success = socks_decode_error(c, r, __func__, "addrlen");
usr.bin/ssh/channels.c
1720
debug2("channel %d: bad socks5 atyp %d", c->self, socks_atyp);
usr.bin/ssh/channels.c
1725
success = socks_decode_error(c, r, __func__, "addr/port");
usr.bin/ssh/channels.c
1732
fatal_fr(r, "channel %d: consume", c->self);
usr.bin/ssh/channels.c
1734
free(c->path);
usr.bin/ssh/channels.c
1735
c->path = NULL;
usr.bin/ssh/channels.c
1737
c->path = xstrdup(dest_addr);
usr.bin/ssh/channels.c
1741
c->path = xstrdup(ntop);
usr.bin/ssh/channels.c
1743
c->host_port = dest_port;
usr.bin/ssh/channels.c
1746
c->self, c->path, c->host_port, socks_cmd);
usr.bin/ssh/channels.c
1755
fatal_fr(r, "channel %d: append reply", c->self);
usr.bin/ssh/channels.c
1769
Channel *c;
usr.bin/ssh/channels.c
1773
c = channel_new(ssh, "stdio-forward", SSH_CHANNEL_OPENING, in, out,
usr.bin/ssh/channels.c
1777
c->path = xstrdup(host_to_connect);
usr.bin/ssh/channels.c
1778
c->host_port = port_to_connect;
usr.bin/ssh/channels.c
1779
c->listening_port = 0;
usr.bin/ssh/channels.c
1780
c->force_drain = 1;
usr.bin/ssh/channels.c
1782
channel_register_fds(ssh, c, in, out, -1, 0, 1, 0);
usr.bin/ssh/channels.c
1783
port_open_helper(ssh, c, port_to_connect == PORT_STREAMLOCAL ?
usr.bin/ssh/channels.c
1786
return c;
usr.bin/ssh/channels.c
1791
channel_pre_dynamic(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1797
c->io_want = 0;
usr.bin/ssh/channels.c
1798
have = sshbuf_len(c->input);
usr.bin/ssh/channels.c
1799
debug2("channel %d: pre_dynamic: have %d", c->self, have);
usr.bin/ssh/channels.c
1804
c->io_want |= SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
1808
if ((r = sshbuf_peek_u8(c->input, 0, &ver)) != 0)
usr.bin/ssh/channels.c
1812
ret = channel_decode_socks4(c, c->input, c->output);
usr.bin/ssh/channels.c
1815
ret = channel_decode_socks5(c, c->input, c->output);
usr.bin/ssh/channels.c
1818
debug2_f("channel %d: unknown SOCKS version %u", c->self, ver);
usr.bin/ssh/channels.c
1823
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
1825
debug2("channel %d: pre_dynamic: need more", c->self);
usr.bin/ssh/channels.c
1827
c->io_want |= SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
1828
if (sshbuf_len(c->output))
usr.bin/ssh/channels.c
1829
c->io_want |= SSH_CHAN_IO_WFD;
usr.bin/ssh/channels.c
1832
c->type = SSH_CHANNEL_OPENING;
usr.bin/ssh/channels.c
1833
port_open_helper(ssh, c, "direct-tcpip");
usr.bin/ssh/channels.c
1839
rdynamic_close(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1841
c->type = SSH_CHANNEL_OPEN;
usr.bin/ssh/channels.c
1842
channel_force_close(ssh, c, 0);
usr.bin/ssh/channels.c
1847
channel_before_prepare_io_rdynamic(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1853
have = sshbuf_len(c->output);
usr.bin/ssh/channels.c
1854
debug2("channel %d: pre_rdynamic: have %d", c->self, have);
usr.bin/ssh/channels.c
1857
if (c->flags & CHAN_EOF_RCVD) {
usr.bin/ssh/channels.c
1858
if ((r = sshbuf_consume(c->output, have)) != 0)
usr.bin/ssh/channels.c
1859
fatal_fr(r, "channel %d: consume", c->self);
usr.bin/ssh/channels.c
1860
rdynamic_close(ssh, c);
usr.bin/ssh/channels.c
1867
p = sshbuf_ptr(c->output);
usr.bin/ssh/channels.c
1871
ret = channel_decode_socks4(c, c->output, c->input);
usr.bin/ssh/channels.c
1874
ret = channel_decode_socks5(c, c->output, c->input);
usr.bin/ssh/channels.c
1881
rdynamic_close(ssh, c);
usr.bin/ssh/channels.c
1883
debug2("channel %d: pre_rdynamic: need more", c->self);
usr.bin/ssh/channels.c
1885
len = sshbuf_len(c->input);
usr.bin/ssh/channels.c
1886
if (len > 0 && len < c->remote_window) {
usr.bin/ssh/channels.c
1888
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
1889
(r = sshpkt_put_stringb(ssh, c->input)) != 0 ||
usr.bin/ssh/channels.c
1891
fatal_fr(r, "channel %i: rdynamic", c->self);
usr.bin/ssh/channels.c
1893
if ((r = sshbuf_consume(c->input, len)) != 0)
usr.bin/ssh/channels.c
1894
fatal_fr(r, "channel %d: consume", c->self);
usr.bin/ssh/channels.c
1895
c->remote_window -= len;
usr.bin/ssh/channels.c
1897
} else if (rdynamic_connect_finish(ssh, c) < 0) {
usr.bin/ssh/channels.c
1899
rdynamic_close(ssh, c);
usr.bin/ssh/channels.c
1905
channel_post_x11_listener(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
1913
if ((c->io_ready & SSH_CHAN_IO_SOCK_R) == 0)
usr.bin/ssh/channels.c
1918
newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
usr.bin/ssh/channels.c
1919
if (c->single_connection) {
usr.bin/ssh/channels.c
1922
channel_close_fd(ssh, c, &c->sock);
usr.bin/ssh/channels.c
1923
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
1931
c->notbefore = monotime() + 1;
usr.bin/ssh/channels.c
1942
c->local_window_max, c->local_maxpacket, 0, buf, 1);
usr.bin/ssh/channels.c
1946
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
1949
fatal_fr(r, "channel %i: send", c->self);
usr.bin/ssh/channels.c
1954
port_open_helper(struct ssh *ssh, Channel *c, char *rtype)
usr.bin/ssh/channels.c
1956
char *local_ipaddr = get_local_ipaddr(c->sock);
usr.bin/ssh/channels.c
1957
int local_port = c->sock == -1 ? 65536 : get_local_port(c->sock);
usr.bin/ssh/channels.c
1958
char *remote_ipaddr = get_peer_ipaddr(c->sock);
usr.bin/ssh/channels.c
1959
int remote_port = get_peer_port(c->sock);
usr.bin/ssh/channels.c
1969
free(c->remote_name);
usr.bin/ssh/channels.c
1970
xasprintf(&c->remote_name,
usr.bin/ssh/channels.c
1973
rtype, c->listening_port, c->path, c->host_port,
usr.bin/ssh/channels.c
1976
open_preamble(ssh, __func__, c, rtype);
usr.bin/ssh/channels.c
1979
if ((r = sshpkt_put_cstring(ssh, c->path)) != 0 ||
usr.bin/ssh/channels.c
1980
(r = sshpkt_put_u32(ssh, c->host_port)) != 0)
usr.bin/ssh/channels.c
1981
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
1984
if ((r = sshpkt_put_cstring(ssh, c->path)) != 0)
usr.bin/ssh/channels.c
1985
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
1988
if ((r = sshpkt_put_cstring(ssh, c->path)) != 0)
usr.bin/ssh/channels.c
1989
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
1992
if ((r = sshpkt_put_cstring(ssh, c->path)) != 0 ||
usr.bin/ssh/channels.c
1994
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
1999
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
2004
fatal_fr(r, "channel %i: reply", c->self);
usr.bin/ssh/channels.c
2007
fatal_fr(r, "channel %i: send", c->self);
usr.bin/ssh/channels.c
2022
channel_post_port_listener(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2030
if ((c->io_ready & SSH_CHAN_IO_SOCK_R) == 0)
usr.bin/ssh/channels.c
2034
c->listening_port, c->path, c->host_port);
usr.bin/ssh/channels.c
2036
if (c->type == SSH_CHANNEL_RPORT_LISTENER) {
usr.bin/ssh/channels.c
2039
} else if (c->type == SSH_CHANNEL_RUNIX_LISTENER) {
usr.bin/ssh/channels.c
2042
} else if (c->host_port == PORT_STREAMLOCAL) {
usr.bin/ssh/channels.c
2045
} else if (c->host_port == 0) {
usr.bin/ssh/channels.c
2054
newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
usr.bin/ssh/channels.c
2060
c->notbefore = monotime() + 1;
usr.bin/ssh/channels.c
2063
if (c->host_port != PORT_STREAMLOCAL)
usr.bin/ssh/channels.c
2066
c->local_window_max, c->local_maxpacket, 0, rtype, 1);
usr.bin/ssh/channels.c
2067
nc->listening_port = c->listening_port;
usr.bin/ssh/channels.c
2068
nc->host_port = c->host_port;
usr.bin/ssh/channels.c
2069
if (c->path != NULL)
usr.bin/ssh/channels.c
2070
nc->path = xstrdup(c->path);
usr.bin/ssh/channels.c
2081
channel_post_auth_listener(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2088
if ((c->io_ready & SSH_CHAN_IO_SOCK_R) == 0)
usr.bin/ssh/channels.c
2092
newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
usr.bin/ssh/channels.c
2096
c->notbefore = monotime() + 1;
usr.bin/ssh/channels.c
2101
c->local_window_max, c->local_maxpacket,
usr.bin/ssh/channels.c
2104
c->agent_new ? "agent-connect" : "auth-agent@openssh.com");
usr.bin/ssh/channels.c
2106
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
211
static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype);
usr.bin/ssh/channels.c
2110
channel_post_connecting(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2115
if ((c->io_ready & SSH_CHAN_IO_SOCK_W) == 0)
usr.bin/ssh/channels.c
2117
if (!c->have_remote_id)
usr.bin/ssh/channels.c
2118
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
2120
isopen = (c->type == SSH_CHANNEL_RDYNAMIC_FINISH);
usr.bin/ssh/channels.c
2122
if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) == -1) {
usr.bin/ssh/channels.c
2130
c->self, c->connect_ctx.host, c->connect_ctx.port);
usr.bin/ssh/channels.c
2131
channel_connect_ctx_free(&c->connect_ctx);
usr.bin/ssh/channels.c
2132
c->type = SSH_CHANNEL_OPEN;
usr.bin/ssh/channels.c
2133
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2139
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
2140
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/channels.c
2141
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/channels.c
2142
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0 ||
usr.bin/ssh/channels.c
2144
fatal_fr(r, "channel %i open confirm", c->self);
usr.bin/ssh/channels.c
2152
debug("channel %d: connection failed: %s", c->self, strerror(err));
usr.bin/ssh/channels.c
2155
if ((sock = connect_next(&c->connect_ctx)) == -1) {
usr.bin/ssh/channels.c
2158
c->connect_ctx.host, c->connect_ctx.port);
usr.bin/ssh/channels.c
2159
channel_connect_ctx_free(&c->connect_ctx);
usr.bin/ssh/channels.c
2161
rdynamic_close(ssh, c);
usr.bin/ssh/channels.c
2165
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
2171
fatal_fr(r, "channel %i: failure", c->self);
usr.bin/ssh/channels.c
2172
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2177
close(c->sock);
usr.bin/ssh/channels.c
2178
c->sock = c->rfd = c->wfd = sock;
usr.bin/ssh/channels.c
2182
channel_handle_rfd(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2189
if ((c->io_ready & SSH_CHAN_IO_RFD) == 0)
usr.bin/ssh/channels.c
2191
if ((avail = sshbuf_avail(c->input)) == 0)
usr.bin/ssh/channels.c
2198
if (c->input_filter == NULL && !c->datagram) {
usr.bin/ssh/channels.c
2200
if (c->type == SSH_CHANNEL_OPEN) {
usr.bin/ssh/channels.c
2201
if ((have = sshbuf_len(c->input)) >= c->remote_window)
usr.bin/ssh/channels.c
2203
if (maxlen > c->remote_window - have)
usr.bin/ssh/channels.c
2204
maxlen = c->remote_window - have;
usr.bin/ssh/channels.c
2208
if ((r = sshbuf_read(c->rfd, c->input, maxlen, &nr)) != 0) {
usr.bin/ssh/channels.c
2212
c->self, c->rfd, maxlen, ssh_err(r));
usr.bin/ssh/channels.c
2216
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2220
len = read(c->rfd, buf, sizeof(buf));
usr.bin/ssh/channels.c
2225
c->self, c->rfd, len,
usr.bin/ssh/channels.c
2228
if (c->type != SSH_CHANNEL_OPEN) {
usr.bin/ssh/channels.c
2229
debug2("channel %d: not open", c->self);
usr.bin/ssh/channels.c
2230
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2233
chan_read_failed(ssh, c);
usr.bin/ssh/channels.c
2237
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2238
if (c->input_filter != NULL) {
usr.bin/ssh/channels.c
2239
if (c->input_filter(ssh, c, buf, len) == -1) {
usr.bin/ssh/channels.c
2240
debug2("channel %d: filter stops", c->self);
usr.bin/ssh/channels.c
2241
chan_read_failed(ssh, c);
usr.bin/ssh/channels.c
2243
} else if (c->datagram) {
usr.bin/ssh/channels.c
2244
if ((r = sshbuf_put_string(c->input, buf, len)) != 0)
usr.bin/ssh/channels.c
2245
fatal_fr(r, "channel %i: put datagram", c->self);
usr.bin/ssh/channels.c
2251
channel_handle_wfd(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2258
if ((c->io_ready & SSH_CHAN_IO_WFD) == 0)
usr.bin/ssh/channels.c
2260
if (sshbuf_len(c->output) == 0)
usr.bin/ssh/channels.c
2264
olen = sshbuf_len(c->output);
usr.bin/ssh/channels.c
2265
if (c->output_filter != NULL) {
usr.bin/ssh/channels.c
2266
if ((buf = c->output_filter(ssh, c, &data, &dlen)) == NULL) {
usr.bin/ssh/channels.c
2267
debug2("channel %d: filter stops", c->self);
usr.bin/ssh/channels.c
2268
if (c->type != SSH_CHANNEL_OPEN)
usr.bin/ssh/channels.c
2269
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2271
chan_write_failed(ssh, c);
usr.bin/ssh/channels.c
2274
} else if (c->datagram) {
usr.bin/ssh/channels.c
2275
if ((r = sshbuf_get_string(c->output, &data, &dlen)) != 0)
usr.bin/ssh/channels.c
2276
fatal_fr(r, "channel %i: get datagram", c->self);
usr.bin/ssh/channels.c
2279
buf = data = sshbuf_mutable_ptr(c->output);
usr.bin/ssh/channels.c
2280
dlen = sshbuf_len(c->output);
usr.bin/ssh/channels.c
2283
if (c->datagram) {
usr.bin/ssh/channels.c
2285
len = write(c->wfd, buf, dlen);
usr.bin/ssh/channels.c
2294
len = write(c->wfd, buf, dlen);
usr.bin/ssh/channels.c
2299
if (c->type != SSH_CHANNEL_OPEN) {
usr.bin/ssh/channels.c
2300
debug2("channel %d: not open", c->self);
usr.bin/ssh/channels.c
2301
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2304
chan_write_failed(ssh, c);
usr.bin/ssh/channels.c
2308
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2309
if (c->isatty && dlen >= 1 && buf[0] != '\r') {
usr.bin/ssh/channels.c
2310
if (tcgetattr(c->wfd, &tio) == 0 &&
usr.bin/ssh/channels.c
2320
fatal_fr(r, "channel %i: ignore", c->self);
usr.bin/ssh/channels.c
2323
if ((r = sshbuf_consume(c->output, len)) != 0)
usr.bin/ssh/channels.c
2324
fatal_fr(r, "channel %i: consume", c->self);
usr.bin/ssh/channels.c
2326
c->local_consumed += olen - sshbuf_len(c->output);
usr.bin/ssh/channels.c
2332
channel_handle_efd_write(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2337
if ((c->io_ready & SSH_CHAN_IO_EFD_W) == 0)
usr.bin/ssh/channels.c
2339
if (sshbuf_len(c->extended) == 0)
usr.bin/ssh/channels.c
2342
len = write(c->efd, sshbuf_ptr(c->extended),
usr.bin/ssh/channels.c
2343
sshbuf_len(c->extended));
usr.bin/ssh/channels.c
2344
debug2("channel %d: written %zd to efd %d", c->self, len, c->efd);
usr.bin/ssh/channels.c
2348
debug2("channel %d: closing write-efd %d", c->self, c->efd);
usr.bin/ssh/channels.c
2349
channel_close_fd(ssh, c, &c->efd);
usr.bin/ssh/channels.c
2351
if ((r = sshbuf_consume(c->extended, len)) != 0)
usr.bin/ssh/channels.c
2352
fatal_fr(r, "channel %i: consume", c->self);
usr.bin/ssh/channels.c
2353
c->local_consumed += len;
usr.bin/ssh/channels.c
2354
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2360
channel_handle_efd_read(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2366
if ((c->io_ready & SSH_CHAN_IO_EFD_R) == 0)
usr.bin/ssh/channels.c
2369
len = read(c->efd, buf, sizeof(buf));
usr.bin/ssh/channels.c
2370
debug2("channel %d: read %zd from efd %d", c->self, len, c->efd);
usr.bin/ssh/channels.c
2374
debug2("channel %d: closing read-efd %d", c->self, c->efd);
usr.bin/ssh/channels.c
2375
channel_close_fd(ssh, c, &c->efd);
usr.bin/ssh/channels.c
2378
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
2379
if (c->extended_usage == CHAN_EXTENDED_IGNORE)
usr.bin/ssh/channels.c
2380
debug3("channel %d: discard efd", c->self);
usr.bin/ssh/channels.c
2381
else if ((r = sshbuf_put(c->extended, buf, len)) != 0)
usr.bin/ssh/channels.c
2382
fatal_fr(r, "channel %i: append", c->self);
usr.bin/ssh/channels.c
2387
channel_handle_efd(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2389
if (c->efd == -1)
usr.bin/ssh/channels.c
2394
if (c->extended_usage == CHAN_EXTENDED_WRITE)
usr.bin/ssh/channels.c
2395
return channel_handle_efd_write(ssh, c);
usr.bin/ssh/channels.c
2396
else if (c->extended_usage == CHAN_EXTENDED_READ ||
usr.bin/ssh/channels.c
2397
c->extended_usage == CHAN_EXTENDED_IGNORE)
usr.bin/ssh/channels.c
2398
return channel_handle_efd_read(ssh, c);
usr.bin/ssh/channels.c
2404
channel_check_window(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2408
if (c->type == SSH_CHANNEL_OPEN &&
usr.bin/ssh/channels.c
2409
!(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) &&
usr.bin/ssh/channels.c
2410
((c->local_window_max - c->local_window >
usr.bin/ssh/channels.c
2411
c->local_maxpacket*3) ||
usr.bin/ssh/channels.c
2412
c->local_window < c->local_window_max/2) &&
usr.bin/ssh/channels.c
2413
c->local_consumed > 0) {
usr.bin/ssh/channels.c
2414
if (!c->have_remote_id)
usr.bin/ssh/channels.c
2415
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
2418
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
2419
(r = sshpkt_put_u32(ssh, c->local_consumed)) != 0 ||
usr.bin/ssh/channels.c
2421
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
2423
debug2("channel %d: window %d sent adjust %d", c->self,
usr.bin/ssh/channels.c
2424
c->local_window, c->local_consumed);
usr.bin/ssh/channels.c
2425
c->local_window += c->local_consumed;
usr.bin/ssh/channels.c
2426
c->local_consumed = 0;
usr.bin/ssh/channels.c
2432
channel_post_open(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2434
channel_handle_rfd(ssh, c);
usr.bin/ssh/channels.c
2435
channel_handle_wfd(ssh, c);
usr.bin/ssh/channels.c
2436
channel_handle_efd(ssh, c);
usr.bin/ssh/channels.c
2437
channel_check_window(ssh, c);
usr.bin/ssh/channels.c
2441
read_mux(struct ssh *ssh, Channel *c, u_int need)
usr.bin/ssh/channels.c
2448
if (sshbuf_len(c->input) < need) {
usr.bin/ssh/channels.c
2449
rlen = need - sshbuf_len(c->input);
usr.bin/ssh/channels.c
245
Channel *c;
usr.bin/ssh/channels.c
2450
len = read(c->rfd, buf, MINIMUM(rlen, CHAN_RBUF));
usr.bin/ssh/channels.c
2452
return sshbuf_len(c->input);
usr.bin/ssh/channels.c
2455
c->self, c->rfd, len);
usr.bin/ssh/channels.c
2456
chan_read_failed(ssh, c);
usr.bin/ssh/channels.c
2458
} else if ((r = sshbuf_put(c->input, buf, len)) != 0)
usr.bin/ssh/channels.c
2459
fatal_fr(r, "channel %i: append", c->self);
usr.bin/ssh/channels.c
2461
return sshbuf_len(c->input);
usr.bin/ssh/channels.c
2465
channel_post_mux_client_read(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2469
if ((c->io_ready & SSH_CHAN_IO_RFD) == 0)
usr.bin/ssh/channels.c
2471
if (c->istate != CHAN_INPUT_OPEN && c->istate != CHAN_INPUT_WAIT_DRAIN)
usr.bin/ssh/channels.c
2473
if (c->mux_pause)
usr.bin/ssh/channels.c
2480
if (read_mux(ssh, c, 4) < 4) /* read header */
usr.bin/ssh/channels.c
2483
need = PEEK_U32(sshbuf_ptr(c->input));
usr.bin/ssh/channels.c
2487
c->self, CHANNEL_MUX_MAX_PACKET, need);
usr.bin/ssh/channels.c
2488
chan_rcvd_oclose(ssh, c);
usr.bin/ssh/channels.c
2491
if (read_mux(ssh, c, need + 4) < need + 4) /* read body */
usr.bin/ssh/channels.c
2493
if (c->mux_rcb(ssh, c) != 0) {
usr.bin/ssh/channels.c
2494
debug("channel %d: mux_rcb failed", c->self);
usr.bin/ssh/channels.c
2495
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2501
channel_post_mux_client_write(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2506
if ((c->io_ready & SSH_CHAN_IO_WFD) == 0)
usr.bin/ssh/channels.c
2508
if (sshbuf_len(c->output) == 0)
usr.bin/ssh/channels.c
251
c = ssh->chanctxt->channels[id];
usr.bin/ssh/channels.c
2511
len = write(c->wfd, sshbuf_ptr(c->output), sshbuf_len(c->output));
usr.bin/ssh/channels.c
2515
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
2518
if ((r = sshbuf_consume(c->output, len)) != 0)
usr.bin/ssh/channels.c
2519
fatal_fr(r, "channel %i: consume", c->self);
usr.bin/ssh/channels.c
252
if (c == NULL) {
usr.bin/ssh/channels.c
2523
channel_post_mux_client(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2525
channel_post_mux_client_read(ssh, c);
usr.bin/ssh/channels.c
2526
channel_post_mux_client_write(ssh, c);
usr.bin/ssh/channels.c
2530
channel_post_mux_listener(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2539
if ((c->io_ready & SSH_CHAN_IO_SOCK_R) == 0)
usr.bin/ssh/channels.c
2549
if ((newsock = accept(c->sock, (struct sockaddr*)&addr,
usr.bin/ssh/channels.c
2553
c->notbefore = monotime() + 1;
usr.bin/ssh/channels.c
256
return c;
usr.bin/ssh/channels.c
2569
newsock, newsock, -1, c->local_window_max,
usr.bin/ssh/channels.c
2570
c->local_maxpacket, 0, "mux-control", 1);
usr.bin/ssh/channels.c
2571
nc->mux_rcb = c->mux_rcb;
usr.bin/ssh/channels.c
262
Channel *c;
usr.bin/ssh/channels.c
2621
channel_garbage_collect(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
2623
if (c == NULL)
usr.bin/ssh/channels.c
2625
if (c->detach_user != NULL) {
usr.bin/ssh/channels.c
2626
if (!chan_is_dead(ssh, c, c->detach_close))
usr.bin/ssh/channels.c
2629
debug2("channel %d: gc: notify user", c->self);
usr.bin/ssh/channels.c
2630
c->detach_user(ssh, c->self, 0, NULL);
usr.bin/ssh/channels.c
2632
if (c->detach_user != NULL)
usr.bin/ssh/channels.c
2634
debug2("channel %d: gc: user detached", c->self);
usr.bin/ssh/channels.c
2636
if (!chan_is_dead(ssh, c, 1))
usr.bin/ssh/channels.c
2638
debug2("channel %d: garbage collecting", c->self);
usr.bin/ssh/channels.c
2639
channel_free(ssh, c);
usr.bin/ssh/channels.c
2650
Channel *c;
usr.bin/ssh/channels.c
2655
c = sc->channels[i];
usr.bin/ssh/channels.c
2656
if (c == NULL)
usr.bin/ssh/channels.c
2659
if (c->type == SSH_CHANNEL_OPEN && c->bulk)
usr.bin/ssh/channels.c
266
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
2662
if (ssh_packet_is_rekeying(ssh) && c->type != SSH_CHANNEL_OPEN)
usr.bin/ssh/channels.c
2664
if (c->delayed) {
usr.bin/ssh/channels.c
2666
c->delayed = 0;
usr.bin/ssh/channels.c
267
if (c != NULL && c->have_remote_id && c->remote_id == remote_id)
usr.bin/ssh/channels.c
2670
if (ftab[c->type] != NULL) {
usr.bin/ssh/channels.c
2671
if (table == CHAN_PRE && c->type == SSH_CHANNEL_OPEN &&
usr.bin/ssh/channels.c
2672
channel_get_expiry(ssh, c) != 0 &&
usr.bin/ssh/channels.c
2673
now >= channel_get_expiry(ssh, c)) {
usr.bin/ssh/channels.c
2676
"of inactivity", c->self,
usr.bin/ssh/channels.c
2677
c->inactive_deadline);
usr.bin/ssh/channels.c
2678
channel_force_close(ssh, c, 1);
usr.bin/ssh/channels.c
2679
} else if (c->notbefore <= now) {
usr.bin/ssh/channels.c
268
return c;
usr.bin/ssh/channels.c
2681
(*ftab[c->type])(ssh, c);
usr.bin/ssh/channels.c
2684
c->type == SSH_CHANNEL_OPEN &&
usr.bin/ssh/channels.c
2685
channel_get_expiry(ssh, c) != 0) {
usr.bin/ssh/channels.c
2687
channel_get_expiry(ssh, c));
usr.bin/ssh/channels.c
2695
c->notbefore);
usr.bin/ssh/channels.c
2698
channel_garbage_collect(ssh, c);
usr.bin/ssh/channels.c
2712
Channel *c;
usr.bin/ssh/channels.c
2716
c = sc->channels[i];
usr.bin/ssh/channels.c
2717
if (c == NULL)
usr.bin/ssh/channels.c
2719
if (c->type == SSH_CHANNEL_RDYNAMIC_OPEN)
usr.bin/ssh/channels.c
2720
channel_before_prepare_io_rdynamic(ssh, c);
usr.bin/ssh/channels.c
2725
dump_channel_poll(const char *func, const char *what, Channel *c,
usr.bin/ssh/channels.c
2731
"pfd.ev 0x%02x pfd.rev 0x%02x", func, c->self, what,
usr.bin/ssh/channels.c
2732
c->rfd, c->wfd, c->efd, c->sock,
usr.bin/ssh/channels.c
2733
c->pfds[0], c->pfds[1], c->pfds[2], c->pfds[3],
usr.bin/ssh/channels.c
2734
c->io_want, c->io_ready,
usr.bin/ssh/channels.c
2741
channel_prepare_pollfd(Channel *c, u_int *next_pollfd,
usr.bin/ssh/channels.c
2746
if (c == NULL)
usr.bin/ssh/channels.c
2751
c->self, p, npfd);
usr.bin/ssh/channels.c
2753
c->pfds[0] = c->pfds[1] = c->pfds[2] = c->pfds[3] = -1;
usr.bin/ssh/channels.c
2761
if (c->rfd != -1) {
usr.bin/ssh/channels.c
2763
if ((c->io_want & SSH_CHAN_IO_RFD) != 0)
usr.bin/ssh/channels.c
2766
if (c->wfd == c->rfd) {
usr.bin/ssh/channels.c
2767
if ((c->io_want & SSH_CHAN_IO_WFD) != 0)
usr.bin/ssh/channels.c
2771
if (c->efd == c->rfd) {
usr.bin/ssh/channels.c
2772
if ((c->io_want & SSH_CHAN_IO_EFD_R) != 0)
usr.bin/ssh/channels.c
2774
if ((c->io_want & SSH_CHAN_IO_EFD_W) != 0)
usr.bin/ssh/channels.c
2778
if (c->sock == c->rfd) {
usr.bin/ssh/channels.c
2779
if ((c->io_want & SSH_CHAN_IO_SOCK_R) != 0)
usr.bin/ssh/channels.c
2781
if ((c->io_want & SSH_CHAN_IO_SOCK_W) != 0)
usr.bin/ssh/channels.c
2786
c->pfds[0] = p;
usr.bin/ssh/channels.c
2787
pfd[p].fd = c->rfd;
usr.bin/ssh/channels.c
2789
dump_channel_poll(__func__, "rfd", c, p, &pfd[p]);
usr.bin/ssh/channels.c
2794
if (c->wfd != -1 && c->rfd != c->wfd) {
usr.bin/ssh/channels.c
2796
if ((c->io_want & SSH_CHAN_IO_WFD))
usr.bin/ssh/channels.c
280
Channel *c;
usr.bin/ssh/channels.c
2800
c->pfds[1] = p;
usr.bin/ssh/channels.c
2801
pfd[p].fd = c->wfd;
usr.bin/ssh/channels.c
2803
dump_channel_poll(__func__, "wfd", c, p, &pfd[p]);
usr.bin/ssh/channels.c
2808
if (c->efd != -1 && c->rfd != c->efd) {
usr.bin/ssh/channels.c
2810
if ((c->io_want & SSH_CHAN_IO_EFD_R) != 0)
usr.bin/ssh/channels.c
2812
if ((c->io_want & SSH_CHAN_IO_EFD_W) != 0)
usr.bin/ssh/channels.c
2816
c->pfds[2] = p;
usr.bin/ssh/channels.c
2817
pfd[p].fd = c->efd;
usr.bin/ssh/channels.c
2819
dump_channel_poll(__func__, "efd", c, p, &pfd[p]);
usr.bin/ssh/channels.c
282
if ((c = channel_by_id(ssh, id)) == NULL)
usr.bin/ssh/channels.c
2824
if (c->sock != -1 && c->rfd != c->sock) {
usr.bin/ssh/channels.c
2826
if ((c->io_want & SSH_CHAN_IO_SOCK_R) != 0)
usr.bin/ssh/channels.c
2828
if ((c->io_want & SSH_CHAN_IO_SOCK_W) != 0)
usr.bin/ssh/channels.c
2832
c->pfds[3] = p;
usr.bin/ssh/channels.c
2833
pfd[p].fd = c->sock;
usr.bin/ssh/channels.c
2835
dump_channel_poll(__func__, "sock", c, p, &pfd[p]);
usr.bin/ssh/channels.c
285
switch (c->type) {
usr.bin/ssh/channels.c
2885
fd_ready(Channel *c, int p, struct pollfd *pfds, u_int npfd, int fd,
usr.bin/ssh/channels.c
2893
fatal_f("channel %d: bad pfd %d (max %u)", c->self, p, npfd);
usr.bin/ssh/channels.c
2894
dump_channel_poll(__func__, what, c, p, pfd);
usr.bin/ssh/channels.c
2897
"r%d w%d e%d s%d", c->self, what, fd, p, pfd->fd,
usr.bin/ssh/channels.c
2898
c->rfd, c->wfd, c->efd, c->sock);
usr.bin/ssh/channels.c
2902
c->self, what, p, pfd->fd, c->rfd, c->wfd, c->efd, c->sock);
usr.bin/ssh/channels.c
2905
c->io_ready |= ready & c->io_want;
usr.bin/ssh/channels.c
2918
Channel *c;
usr.bin/ssh/channels.c
2931
c = sc->channels[i];
usr.bin/ssh/channels.c
2932
if (c == NULL)
usr.bin/ssh/channels.c
2935
if (c->rfd != -1 && c->wfd != -1 && c->rfd != c->wfd &&
usr.bin/ssh/channels.c
2936
(c->rfd == c->efd || c->rfd == c->sock)) {
usr.bin/ssh/channels.c
2939
c->self, c->rfd, c->wfd, c->efd, c->sock);
usr.bin/ssh/channels.c
2941
c->io_ready = 0;
usr.bin/ssh/channels.c
2943
if (c->rfd != -1 && (p = c->pfds[0]) != -1) {
usr.bin/ssh/channels.c
2944
fd_ready(c, p, pfd, npfd, c->rfd,
usr.bin/ssh/channels.c
2946
if (c->rfd == c->wfd) {
usr.bin/ssh/channels.c
2947
fd_ready(c, p, pfd, npfd, c->wfd,
usr.bin/ssh/channels.c
2950
if (c->rfd == c->efd) {
usr.bin/ssh/channels.c
2951
fd_ready(c, p, pfd, npfd, c->efd,
usr.bin/ssh/channels.c
2953
fd_ready(c, p, pfd, npfd, c->efd,
usr.bin/ssh/channels.c
2956
if (c->rfd == c->sock) {
usr.bin/ssh/channels.c
2957
fd_ready(c, p, pfd, npfd, c->sock,
usr.bin/ssh/channels.c
2959
fd_ready(c, p, pfd, npfd, c->sock,
usr.bin/ssh/channels.c
296
return c;
usr.bin/ssh/channels.c
2962
dump_channel_poll(__func__, "rfd", c, p, pfd);
usr.bin/ssh/channels.c
2965
if (c->wfd != -1 && c->wfd != c->rfd &&
usr.bin/ssh/channels.c
2966
(p = c->pfds[1]) != -1) {
usr.bin/ssh/channels.c
2967
fd_ready(c, p, pfd, npfd, c->wfd,
usr.bin/ssh/channels.c
2969
dump_channel_poll(__func__, "wfd", c, p, pfd);
usr.bin/ssh/channels.c
2972
if (c->efd != -1 && c->efd != c->rfd &&
usr.bin/ssh/channels.c
2973
(p = c->pfds[2]) != -1) {
usr.bin/ssh/channels.c
2974
fd_ready(c, p, pfd, npfd, c->efd,
usr.bin/ssh/channels.c
2976
fd_ready(c, p, pfd, npfd, c->efd,
usr.bin/ssh/channels.c
2978
dump_channel_poll(__func__, "efd", c, p, pfd);
usr.bin/ssh/channels.c
298
logit("Non-public channel %d, type %d.", id, c->type);
usr.bin/ssh/channels.c
2981
if (c->sock != -1 && c->sock != c->rfd &&
usr.bin/ssh/channels.c
2982
(p = c->pfds[3]) != -1) {
usr.bin/ssh/channels.c
2983
fd_ready(c, p, pfd, npfd, c->sock,
usr.bin/ssh/channels.c
2985
fd_ready(c, p, pfd, npfd, c->sock,
usr.bin/ssh/channels.c
2987
dump_channel_poll(__func__, "sock", c, p, pfd);
usr.bin/ssh/channels.c
2998
channel_output_poll_input_open(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
3004
if ((len = sshbuf_len(c->input)) == 0) {
usr.bin/ssh/channels.c
3005
if (c->istate == CHAN_INPUT_WAIT_DRAIN) {
usr.bin/ssh/channels.c
3013
if (CHANNEL_EFD_INPUT_ACTIVE(c))
usr.bin/ssh/channels.c
3016
c->self, c->efd, sshbuf_len(c->extended));
usr.bin/ssh/channels.c
3018
chan_ibuf_empty(ssh, c);
usr.bin/ssh/channels.c
3023
if (!c->have_remote_id)
usr.bin/ssh/channels.c
3024
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
3026
if (c->datagram) {
usr.bin/ssh/channels.c
3028
if ((r = sshbuf_get_string_direct(c->input, &pkt, &plen)) != 0)
usr.bin/ssh/channels.c
3029
fatal_fr(r, "channel %i: get datagram", c->self);
usr.bin/ssh/channels.c
3035
if (plen > c->remote_window || plen > c->remote_maxpacket) {
usr.bin/ssh/channels.c
3036
debug("channel %d: datagram too big", c->self);
usr.bin/ssh/channels.c
3041
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
3044
fatal_fr(r, "channel %i: send datagram", c->self);
usr.bin/ssh/channels.c
3045
c->remote_window -= plen;
usr.bin/ssh/channels.c
3050
if (len > c->remote_window)
usr.bin/ssh/channels.c
3051
len = c->remote_window;
usr.bin/ssh/channels.c
3052
if (len > c->remote_maxpacket)
usr.bin/ssh/channels.c
3053
len = c->remote_maxpacket;
usr.bin/ssh/channels.c
3057
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
3058
(r = sshpkt_put_string(ssh, sshbuf_ptr(c->input), len)) != 0 ||
usr.bin/ssh/channels.c
3060
fatal_fr(r, "channel %i: send data", c->self);
usr.bin/ssh/channels.c
3061
if ((r = sshbuf_consume(c->input, len)) != 0)
usr.bin/ssh/channels.c
3062
fatal_fr(r, "channel %i: consume", c->self);
usr.bin/ssh/channels.c
3063
c->remote_window -= len;
usr.bin/ssh/channels.c
3072
channel_output_poll_extended_read(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
3077
if ((len = sshbuf_len(c->extended)) == 0)
usr.bin/ssh/channels.c
3080
debug2("channel %d: rwin %u elen %zu euse %d", c->self,
usr.bin/ssh/channels.c
3081
c->remote_window, sshbuf_len(c->extended), c->extended_usage);
usr.bin/ssh/channels.c
3082
if (len > c->remote_window)
usr.bin/ssh/channels.c
3083
len = c->remote_window;
usr.bin/ssh/channels.c
3084
if (len > c->remote_maxpacket)
usr.bin/ssh/channels.c
3085
len = c->remote_maxpacket;
usr.bin/ssh/channels.c
3088
if (!c->have_remote_id)
usr.bin/ssh/channels.c
3089
fatal_f("channel %d: no remote id", c->self);
usr.bin/ssh/channels.c
3091
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
3093
(r = sshpkt_put_string(ssh, sshbuf_ptr(c->extended), len)) != 0 ||
usr.bin/ssh/channels.c
3095
fatal_fr(r, "channel %i: data", c->self);
usr.bin/ssh/channels.c
3096
if ((r = sshbuf_consume(c->extended, len)) != 0)
usr.bin/ssh/channels.c
3097
fatal_fr(r, "channel %i: consume", c->self);
usr.bin/ssh/channels.c
3098
c->remote_window -= len;
usr.bin/ssh/channels.c
3099
debug2("channel %d: sent ext data %zu", c->self, len);
usr.bin/ssh/channels.c
3111
Channel *c;
usr.bin/ssh/channels.c
3116
c = sc->channels[i];
usr.bin/ssh/channels.c
3117
if (c == NULL)
usr.bin/ssh/channels.c
3124
if (c->type != SSH_CHANNEL_OPEN)
usr.bin/ssh/channels.c
3126
if ((c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD))) {
usr.bin/ssh/channels.c
3129
c->self);
usr.bin/ssh/channels.c
3134
if (c->istate == CHAN_INPUT_OPEN ||
usr.bin/ssh/channels.c
3135
c->istate == CHAN_INPUT_WAIT_DRAIN)
usr.bin/ssh/channels.c
3136
ret |= channel_output_poll_input_open(ssh, c);
usr.bin/ssh/channels.c
3138
if (!(c->flags & CHAN_EOF_SENT) &&
usr.bin/ssh/channels.c
3139
c->extended_usage == CHAN_EXTENDED_READ)
usr.bin/ssh/channels.c
3140
ret |= channel_output_poll_extended_read(ssh, c);
usr.bin/ssh/channels.c
3188
Channel *c = NULL;
usr.bin/ssh/channels.c
3227
c = channel_new(ssh, "mux-proxy", SSH_CHANNEL_MUX_PROXY,
usr.bin/ssh/channels.c
3229
c->mux_ctx = downstream; /* point to mux client */
usr.bin/ssh/channels.c
3230
c->mux_downstream_id = id; /* original downstream id */
usr.bin/ssh/channels.c
3232
(r = sshbuf_put_u32(modified, c->self)) != 0 ||
usr.bin/ssh/channels.c
3235
channel_free(ssh, c);
usr.bin/ssh/channels.c
3254
c = channel_new(ssh, "mux-proxy", SSH_CHANNEL_MUX_PROXY,
usr.bin/ssh/channels.c
3256
c->mux_ctx = downstream; /* point to mux client */
usr.bin/ssh/channels.c
3257
c->mux_downstream_id = id;
usr.bin/ssh/channels.c
3258
c->remote_id = remote_id;
usr.bin/ssh/channels.c
3259
c->have_remote_id = 1;
usr.bin/ssh/channels.c
3261
(r = sshbuf_put_u32(modified, c->self)) != 0 ||
usr.bin/ssh/channels.c
3264
channel_free(ssh, c);
usr.bin/ssh/channels.c
3300
if ((c = channel_by_remote_id(ssh, remote_id)) != NULL) {
usr.bin/ssh/channels.c
3301
if (c->flags & CHAN_CLOSE_RCVD)
usr.bin/ssh/channels.c
3302
channel_free(ssh, c);
usr.bin/ssh/channels.c
3304
c->flags |= CHAN_CLOSE_SENT;
usr.bin/ssh/channels.c
3339
channel_proxy_upstream(Channel *c, int type, uint32_t seq, struct ssh *ssh)
usr.bin/ssh/channels.c
3353
if (c == NULL || c->type != SSH_CHANNEL_MUX_PROXY)
usr.bin/ssh/channels.c
3355
if ((downstream = c->mux_ctx) == NULL)
usr.bin/ssh/channels.c
3370
debug2_f("channel %u: unsupported type %u", c->self, type);
usr.bin/ssh/channels.c
3386
(r = sshbuf_put_u32(b, c->mux_downstream_id)) != 0 ||
usr.bin/ssh/channels.c
3394
debug3_f("channel %u: up->down: type %u", c->self, type);
usr.bin/ssh/channels.c
3401
c->remote_id = PEEK_U32(cp);
usr.bin/ssh/channels.c
3402
c->have_remote_id = 1;
usr.bin/ssh/channels.c
3406
if (c->flags & CHAN_CLOSE_SENT)
usr.bin/ssh/channels.c
3407
channel_free(ssh, c);
usr.bin/ssh/channels.c
3409
c->flags |= CHAN_CLOSE_RCVD;
usr.bin/ssh/channels.c
3441
Channel *c;
usr.bin/ssh/channels.c
3443
if ((c = channel_lookup(ssh, id)) == NULL) {
usr.bin/ssh/channels.c
3447
return c;
usr.bin/ssh/channels.c
3455
Channel *c = channel_from_packet_id(ssh, __func__, "data");
usr.bin/ssh/channels.c
3458
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3462
if (c->type != SSH_CHANNEL_OPEN &&
usr.bin/ssh/channels.c
3463
c->type != SSH_CHANNEL_RDYNAMIC_OPEN &&
usr.bin/ssh/channels.c
3464
c->type != SSH_CHANNEL_RDYNAMIC_FINISH &&
usr.bin/ssh/channels.c
3465
c->type != SSH_CHANNEL_X11_OPEN)
usr.bin/ssh/channels.c
3471
fatal_fr(r, "channel %i: get data", c->self);
usr.bin/ssh/channels.c
3474
if (c->datagram)
usr.bin/ssh/channels.c
3482
if (c->ostate != CHAN_OUTPUT_OPEN) {
usr.bin/ssh/channels.c
3483
if (win_len > c->local_window)
usr.bin/ssh/channels.c
3484
c->local_window = 0;
usr.bin/ssh/channels.c
3486
c->local_window -= win_len;
usr.bin/ssh/channels.c
3487
c->local_consumed += win_len;
usr.bin/ssh/channels.c
3491
if (win_len > c->local_maxpacket) {
usr.bin/ssh/channels.c
3493
c->self, win_len, c->local_maxpacket);
usr.bin/ssh/channels.c
3496
if (win_len > c->local_window) {
usr.bin/ssh/channels.c
3497
c->local_window_exceeded += win_len - c->local_window;
usr.bin/ssh/channels.c
3499
"(excess %u)", c->self, win_len, c->local_window,
usr.bin/ssh/channels.c
3500
c->local_window_max, c->local_window_exceeded);
usr.bin/ssh/channels.c
3501
c->local_window = 0;
usr.bin/ssh/channels.c
3503
if (c->local_window_exceeded > (c->local_window_max / 10)) {
usr.bin/ssh/channels.c
3505
"channel window", c->self);
usr.bin/ssh/channels.c
3508
c->local_window -= win_len;
usr.bin/ssh/channels.c
3509
c->local_window_exceeded = 0;
usr.bin/ssh/channels.c
3512
if (c->datagram) {
usr.bin/ssh/channels.c
3513
if ((r = sshbuf_put_string(c->output, data, data_len)) != 0)
usr.bin/ssh/channels.c
3514
fatal_fr(r, "channel %i: append datagram", c->self);
usr.bin/ssh/channels.c
3515
} else if ((r = sshbuf_put(c->output, data, data_len)) != 0)
usr.bin/ssh/channels.c
3516
fatal_fr(r, "channel %i: append data", c->self);
usr.bin/ssh/channels.c
3527
Channel *c = channel_from_packet_id(ssh, __func__, "extended data");
usr.bin/ssh/channels.c
3530
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3532
if (c->type != SSH_CHANNEL_OPEN) {
usr.bin/ssh/channels.c
3533
logit("channel %d: ext data for non open", c->self);
usr.bin/ssh/channels.c
3536
if (c->flags & CHAN_EOF_RCVD) {
usr.bin/ssh/channels.c
3539
c->self);
usr.bin/ssh/channels.c
3542
"after EOF on channel %d.", c->self);
usr.bin/ssh/channels.c
3549
if (c->efd == -1 ||
usr.bin/ssh/channels.c
3550
c->extended_usage != CHAN_EXTENDED_WRITE ||
usr.bin/ssh/channels.c
3552
logit("channel %d: bad ext data", c->self);
usr.bin/ssh/channels.c
356
channel_classify(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
3561
if (data_len > c->local_window) {
usr.bin/ssh/channels.c
3563
c->self, data_len, c->local_window);
usr.bin/ssh/channels.c
3566
debug2("channel %d: rcvd ext data %zu", c->self, data_len);
usr.bin/ssh/channels.c
3568
if ((r = sshbuf_put(c->extended, data, data_len)) != 0)
usr.bin/ssh/channels.c
3570
c->local_window -= data_len;
usr.bin/ssh/channels.c
3577
Channel *c = channel_from_packet_id(ssh, __func__, "ieof");
usr.bin/ssh/channels.c
3585
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3587
chan_rcvd_ieof(ssh, c);
usr.bin/ssh/channels.c
359
const char *type = c->xctype == NULL ? c->ctype : c->xctype;
usr.bin/ssh/channels.c
3590
if (c->force_drain && c->istate == CHAN_INPUT_OPEN) {
usr.bin/ssh/channels.c
3591
debug("channel %d: FORCE input drain", c->self);
usr.bin/ssh/channels.c
3592
c->istate = CHAN_INPUT_WAIT_DRAIN;
usr.bin/ssh/channels.c
3593
if (sshbuf_len(c->input) == 0)
usr.bin/ssh/channels.c
3594
chan_ibuf_empty(ssh, c);
usr.bin/ssh/channels.c
360
const int has_tty = c->isatty || c->remote_has_tty;
usr.bin/ssh/channels.c
3602
Channel *c = channel_from_packet_id(ssh, __func__, "oclose");
usr.bin/ssh/channels.c
3605
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3611
chan_rcvd_oclose(ssh, c);
usr.bin/ssh/channels.c
3618
Channel *c = channel_from_packet_id(ssh, __func__, "open confirmation");
usr.bin/ssh/channels.c
3622
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3624
if (c->type != SSH_CHANNEL_OPENING)
usr.bin/ssh/channels.c
3626
"non-opening channel %d.", c->self);
usr.bin/ssh/channels.c
3631
if ((r = sshpkt_get_u32(ssh, &c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
3639
c->have_remote_id = 1;
usr.bin/ssh/channels.c
364
c->bulk = type != NULL && match_pattern_list(type, classifier, 0) == 1;
usr.bin/ssh/channels.c
3640
c->remote_window = remote_window;
usr.bin/ssh/channels.c
3641
c->remote_maxpacket = remote_maxpacket;
usr.bin/ssh/channels.c
3642
c->type = SSH_CHANNEL_OPEN;
usr.bin/ssh/channels.c
3643
if (c->open_confirm) {
usr.bin/ssh/channels.c
3644
debug2_f("channel %d: callback start", c->self);
usr.bin/ssh/channels.c
3645
c->open_confirm(ssh, c->self, 1, c->open_confirm_ctx);
usr.bin/ssh/channels.c
3646
debug2_f("channel %d: callback done", c->self);
usr.bin/ssh/channels.c
3648
channel_set_used_time(ssh, c);
usr.bin/ssh/channels.c
3649
debug2("channel %d: open confirm rwindow %u rmax %u", c->self,
usr.bin/ssh/channels.c
365
debug3("channel %d: classify type \"%s\" (%s) as %s", c->self,
usr.bin/ssh/channels.c
3650
c->remote_window, c->remote_maxpacket);
usr.bin/ssh/channels.c
367
c->bulk ? "bulk" : "interactive");
usr.bin/ssh/channels.c
3673
Channel *c = channel_from_packet_id(ssh, __func__, "open failure");
usr.bin/ssh/channels.c
3678
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3680
if (c->type != SSH_CHANNEL_OPENING)
usr.bin/ssh/channels.c
3682
"non-opening channel %d.", c->self);
usr.bin/ssh/channels.c
3694
logit("channel %d: open failed: %s%s%s", c->self,
usr.bin/ssh/channels.c
3697
if (c->open_confirm) {
usr.bin/ssh/channels.c
3698
debug2_f("channel %d: callback start", c->self);
usr.bin/ssh/channels.c
3699
c->open_confirm(ssh, c->self, 0, c->open_confirm_ctx);
usr.bin/ssh/channels.c
3700
debug2_f("channel %d: callback done", c->self);
usr.bin/ssh/channels.c
3703
chan_mark_dead(ssh, c);
usr.bin/ssh/channels.c
3711
Channel *c;
usr.bin/ssh/channels.c
3716
if ((c = channel_lookup(ssh, id)) == NULL) {
usr.bin/ssh/channels.c
3721
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3728
debug2("channel %d: rcvd adjust %u", c->self, adjust);
usr.bin/ssh/channels.c
3729
if ((new_rwin = c->remote_window + adjust) < c->remote_window) {
usr.bin/ssh/channels.c
3731
c->self, adjust, c->remote_window);
usr.bin/ssh/channels.c
3733
c->remote_window = new_rwin;
usr.bin/ssh/channels.c
3741
Channel *c;
usr.bin/ssh/channels.c
3749
if ((c = channel_lookup(ssh, id)) == NULL) {
usr.bin/ssh/channels.c
3753
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/channels.c
3757
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
usr.bin/ssh/channels.c
3759
cc->cb(ssh, type, c, cc->ctx);
usr.bin/ssh/channels.c
3760
TAILQ_REMOVE(&c->status_confirms, cc, entry);
usr.bin/ssh/channels.c
379
Channel *c;
usr.bin/ssh/channels.c
381
if ((c = channel_by_id(ssh, id)) == NULL)
usr.bin/ssh/channels.c
383
if (c->xctype != NULL)
usr.bin/ssh/channels.c
384
free(c->xctype);
usr.bin/ssh/channels.c
3848
Channel *c;
usr.bin/ssh/channels.c
385
c->xctype = xstrdup(xctype);
usr.bin/ssh/channels.c
387
c->inactive_deadline = lookup_timeout(ssh, c->xctype);
usr.bin/ssh/channels.c
388
channel_classify(ssh, c);
usr.bin/ssh/channels.c
390
c->inactive_deadline);
usr.bin/ssh/channels.c
3975
c = channel_new(ssh, "port-listener", type, sock, sock, -1,
usr.bin/ssh/channels.c
3978
c->path = xstrdup(host);
usr.bin/ssh/channels.c
3979
c->host_port = fwd->connect_port;
usr.bin/ssh/channels.c
398
channel_set_used_time(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
3980
c->listening_addr = addr == NULL ? NULL : xstrdup(addr);
usr.bin/ssh/channels.c
3983
c->listening_port = *allocated_listen_port;
usr.bin/ssh/channels.c
3985
c->listening_port = fwd->listen_port;
usr.bin/ssh/channels.c
4000
Channel *c;
usr.bin/ssh/channels.c
401
if (c != NULL)
usr.bin/ssh/channels.c
402
c->lastused = ssh->chanctxt->lastused;
usr.bin/ssh/channels.c
4058
c = channel_new(ssh, "unix-listener", type, sock, sock, -1,
usr.bin/ssh/channels.c
4061
c->path = xstrdup(path);
usr.bin/ssh/channels.c
4062
c->host_port = port;
usr.bin/ssh/channels.c
4063
c->listening_port = PORT_STREAMLOCAL;
usr.bin/ssh/channels.c
4064
c->listening_addr = xstrdup(fwd->listen_path);
usr.bin/ssh/channels.c
4076
Channel *c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
4077
if (c == NULL || c->type != SSH_CHANNEL_RPORT_LISTENER)
usr.bin/ssh/channels.c
4079
if (strcmp(c->path, host) == 0 && c->listening_port == port) {
usr.bin/ssh/channels.c
4081
channel_free(ssh, c);
usr.bin/ssh/channels.c
4096
Channel *c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
4097
if (c == NULL || c->type != SSH_CHANNEL_RUNIX_LISTENER)
usr.bin/ssh/channels.c
4099
if (c->path == NULL)
usr.bin/ssh/channels.c
410
channel_get_expiry(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
4101
if (strcmp(c->path, path) == 0) {
usr.bin/ssh/channels.c
4103
channel_free(ssh, c);
usr.bin/ssh/channels.c
4133
Channel *c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
4134
if (c == NULL || c->type != SSH_CHANNEL_PORT_LISTENER)
usr.bin/ssh/channels.c
4136
if (c->listening_port != lport)
usr.bin/ssh/channels.c
4140
if (c->host_port == 0)
usr.bin/ssh/channels.c
4143
if (c->host_port != cport)
usr.bin/ssh/channels.c
4146
if ((c->listening_addr == NULL && addr != NULL) ||
usr.bin/ssh/channels.c
4147
(c->listening_addr != NULL && addr == NULL))
usr.bin/ssh/channels.c
4149
if (addr == NULL || strcmp(c->listening_addr, addr) == 0) {
usr.bin/ssh/channels.c
4151
channel_free(ssh, c);
usr.bin/ssh/channels.c
417
if (c->lastused != 0 && c->inactive_deadline != 0) {
usr.bin/ssh/channels.c
4171
Channel *c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
4172
if (c == NULL || c->type != SSH_CHANNEL_UNIX_LISTENER)
usr.bin/ssh/channels.c
4174
if (c->listening_addr == NULL)
usr.bin/ssh/channels.c
4176
if (strcmp(c->listening_addr, path) == 0) {
usr.bin/ssh/channels.c
4178
channel_free(ssh, c);
usr.bin/ssh/channels.c
418
channel_expiry = c->lastused + c->inactive_deadline;
usr.bin/ssh/channels.c
437
channel_register_fds(struct ssh *ssh, Channel *c, int rfd, int wfd, int efd,
usr.bin/ssh/channels.c
449
c->rfd = rfd;
usr.bin/ssh/channels.c
450
c->wfd = wfd;
usr.bin/ssh/channels.c
451
c->sock = (rfd == wfd) ? rfd : -1;
usr.bin/ssh/channels.c
452
c->efd = efd;
usr.bin/ssh/channels.c
453
c->extended_usage = extusage;
usr.bin/ssh/channels.c
455
if ((c->isatty = is_tty) != 0)
usr.bin/ssh/channels.c
456
debug2("channel %d: rfd %d isatty", c->self, c->rfd);
usr.bin/ssh/channels.c
459
c->restore_block = 0;
usr.bin/ssh/channels.c
469
c->restore_flags[0] = val;
usr.bin/ssh/channels.c
470
c->restore_block |= CHANNEL_RESTORE_RFD;
usr.bin/ssh/channels.c
475
c->restore_flags[1] = val;
usr.bin/ssh/channels.c
476
c->restore_block |= CHANNEL_RESTORE_WFD;
usr.bin/ssh/channels.c
4773
Channel *c;
usr.bin/ssh/channels.c
4783
c = channel_new(ssh, ctype, SSH_CHANNEL_CONNECTING, sock, sock, -1,
usr.bin/ssh/channels.c
4785
c->host_port = port;
usr.bin/ssh/channels.c
4786
c->path = xstrdup(host);
usr.bin/ssh/channels.c
4787
c->connect_ctx = cctx;
usr.bin/ssh/channels.c
4789
return c;
usr.bin/ssh/channels.c
481
c->restore_flags[2] = val;
usr.bin/ssh/channels.c
482
c->restore_block |= CHANNEL_RESTORE_EFD;
usr.bin/ssh/channels.c
4854
Channel *c;
usr.bin/ssh/channels.c
4898
c = channel_new(ssh, ctype, SSH_CHANNEL_CONNECTING, sock, sock, -1,
usr.bin/ssh/channels.c
4900
c->host_port = port;
usr.bin/ssh/channels.c
4901
c->path = xstrdup(host);
usr.bin/ssh/channels.c
4902
c->connect_ctx = cctx;
usr.bin/ssh/channels.c
4904
return c;
usr.bin/ssh/channels.c
495
channel_classify(ssh, c);
usr.bin/ssh/channels.c
4975
Channel *c;
usr.bin/ssh/channels.c
4978
c = channel_new(ssh, ctype, SSH_CHANNEL_RDYNAMIC_OPEN, -1, -1, -1,
usr.bin/ssh/channels.c
4980
c->host_port = 0;
usr.bin/ssh/channels.c
4981
c->path = NULL;
usr.bin/ssh/channels.c
4988
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/channels.c
4989
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/channels.c
4990
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/channels.c
4991
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0)
usr.bin/ssh/channels.c
4992
fatal_fr(r, "channel %i; confirm", c->self);
usr.bin/ssh/channels.c
4993
return c;
usr.bin/ssh/channels.c
4998
rdynamic_connect_finish(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
5011
if (open_match(perm, c->path, c->host_port)) {
usr.bin/ssh/channels.c
5023
sock = connect_to_helper(ssh, c->path, c->host_port, SOCK_STREAM, NULL,
usr.bin/ssh/channels.c
5029
c->type = SSH_CHANNEL_RDYNAMIC_FINISH;
usr.bin/ssh/channels.c
5030
c->connect_ctx = cctx;
usr.bin/ssh/channels.c
5031
channel_register_fds(ssh, c, sock, sock, -1, 0, 1, 0);
usr.bin/ssh/channels.c
508
Channel *c;
usr.bin/ssh/channels.c
5327
Channel *c;
usr.bin/ssh/channels.c
5331
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
5332
if (c == NULL || c->ctype == NULL || c->lastused == 0 ||
usr.bin/ssh/channels.c
5333
strcmp(c->ctype, "x11-connection") != 0)
usr.bin/ssh/channels.c
5335
if (c->lastused > lastused)
usr.bin/ssh/channels.c
5336
lastused = c->lastused;
usr.bin/ssh/channels.c
534
c = sc->channels[found] = xcalloc(1, sizeof(Channel));
usr.bin/ssh/channels.c
535
if ((c->input = sshbuf_new()) == NULL ||
usr.bin/ssh/channels.c
536
(c->output = sshbuf_new()) == NULL ||
usr.bin/ssh/channels.c
537
(c->extended = sshbuf_new()) == NULL)
usr.bin/ssh/channels.c
539
if ((r = sshbuf_set_max_size(c->input, CHAN_INPUT_MAX)) != 0)
usr.bin/ssh/channels.c
541
c->ostate = CHAN_OUTPUT_OPEN;
usr.bin/ssh/channels.c
542
c->istate = CHAN_INPUT_OPEN;
usr.bin/ssh/channels.c
543
channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, 0);
usr.bin/ssh/channels.c
544
c->self = found;
usr.bin/ssh/channels.c
545
c->type = type;
usr.bin/ssh/channels.c
546
c->ctype = ctype;
usr.bin/ssh/channels.c
547
c->local_window = window;
usr.bin/ssh/channels.c
548
c->local_window_max = window;
usr.bin/ssh/channels.c
549
c->local_maxpacket = maxpack;
usr.bin/ssh/channels.c
550
c->remote_name = xstrdup(remote_name);
usr.bin/ssh/channels.c
551
c->ctl_chan = -1;
usr.bin/ssh/channels.c
552
c->delayed = 1; /* prevent call to channel_post handler */
usr.bin/ssh/channels.c
553
c->inactive_deadline = lookup_timeout(ssh, c->ctype);
usr.bin/ssh/channels.c
554
TAILQ_INIT(&c->status_confirms);
usr.bin/ssh/channels.c
555
channel_classify(ssh, c);
usr.bin/ssh/channels.c
557
found, c->ctype, remote_name, c->inactive_deadline);
usr.bin/ssh/channels.c
558
return c;
usr.bin/ssh/channels.c
562
channel_set_tty(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
564
c->remote_has_tty = 1;
usr.bin/ssh/channels.c
565
channel_classify(ssh, c);
usr.bin/ssh/channels.c
569
channel_close_fd(struct ssh *ssh, Channel *c, int *fdp)
usr.bin/ssh/channels.c
577
if (*fdp == c->rfd &&
usr.bin/ssh/channels.c
578
(c->restore_block & CHANNEL_RESTORE_RFD) != 0)
usr.bin/ssh/channels.c
579
(void)fcntl(*fdp, F_SETFL, c->restore_flags[0]);
usr.bin/ssh/channels.c
580
else if (*fdp == c->wfd &&
usr.bin/ssh/channels.c
581
(c->restore_block & CHANNEL_RESTORE_WFD) != 0)
usr.bin/ssh/channels.c
582
(void)fcntl(*fdp, F_SETFL, c->restore_flags[1]);
usr.bin/ssh/channels.c
583
else if (*fdp == c->efd &&
usr.bin/ssh/channels.c
584
(c->restore_block & CHANNEL_RESTORE_EFD) != 0)
usr.bin/ssh/channels.c
585
(void)fcntl(*fdp, F_SETFL, c->restore_flags[2]);
usr.bin/ssh/channels.c
587
if (*fdp == c->rfd) {
usr.bin/ssh/channels.c
588
c->io_want &= ~SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
589
c->io_ready &= ~SSH_CHAN_IO_RFD;
usr.bin/ssh/channels.c
590
c->rfd = -1;
usr.bin/ssh/channels.c
591
c->pfds[0] = -1;
usr.bin/ssh/channels.c
593
if (*fdp == c->wfd) {
usr.bin/ssh/channels.c
594
c->io_want &= ~SSH_CHAN_IO_WFD;
usr.bin/ssh/channels.c
595
c->io_ready &= ~SSH_CHAN_IO_WFD;
usr.bin/ssh/channels.c
596
c->wfd = -1;
usr.bin/ssh/channels.c
597
c->pfds[1] = -1;
usr.bin/ssh/channels.c
599
if (*fdp == c->efd) {
usr.bin/ssh/channels.c
600
c->io_want &= ~SSH_CHAN_IO_EFD;
usr.bin/ssh/channels.c
601
c->io_ready &= ~SSH_CHAN_IO_EFD;
usr.bin/ssh/channels.c
602
c->efd = -1;
usr.bin/ssh/channels.c
603
c->pfds[2] = -1;
usr.bin/ssh/channels.c
605
if (*fdp == c->sock) {
usr.bin/ssh/channels.c
606
c->io_want &= ~SSH_CHAN_IO_SOCK;
usr.bin/ssh/channels.c
607
c->io_ready &= ~SSH_CHAN_IO_SOCK;
usr.bin/ssh/channels.c
608
c->sock = -1;
usr.bin/ssh/channels.c
609
c->pfds[3] = -1;
usr.bin/ssh/channels.c
619
channel_close_fds(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
621
int sock = c->sock, rfd = c->rfd, wfd = c->wfd, efd = c->efd;
usr.bin/ssh/channels.c
623
channel_close_fd(ssh, c, &c->sock);
usr.bin/ssh/channels.c
625
channel_close_fd(ssh, c, &c->rfd);
usr.bin/ssh/channels.c
627
channel_close_fd(ssh, c, &c->wfd);
usr.bin/ssh/channels.c
629
channel_close_fd(ssh, c, &c->efd);
usr.bin/ssh/channels.c
727
mux_remove_remote_forwardings(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
737
if (perm->downstream != c)
usr.bin/ssh/channels.c
742
c->self, perm->listen_host, perm->listen_port);
usr.bin/ssh/channels.c
751
fatal_fr(r, "channel %i", c->self);
usr.bin/ssh/channels.c
759
channel_free(struct ssh *ssh, Channel *c)
usr.bin/ssh/channels.c
772
if (c->type == SSH_CHANNEL_MUX_CLIENT &&
usr.bin/ssh/channels.c
774
other->mux_ctx == c) {
usr.bin/ssh/channels.c
781
debug("channel %d: free: %s, nchannels %u", c->self,
usr.bin/ssh/channels.c
782
c->remote_name ? c->remote_name : "???", n);
usr.bin/ssh/channels.c
784
if (c->type == SSH_CHANNEL_MUX_CLIENT) {
usr.bin/ssh/channels.c
785
mux_remove_remote_forwardings(ssh, c);
usr.bin/ssh/channels.c
786
free(c->mux_ctx);
usr.bin/ssh/channels.c
787
c->mux_ctx = NULL;
usr.bin/ssh/channels.c
788
} else if (c->type == SSH_CHANNEL_MUX_LISTENER) {
usr.bin/ssh/channels.c
789
free(c->mux_ctx);
usr.bin/ssh/channels.c
790
c->mux_ctx = NULL;
usr.bin/ssh/channels.c
795
debug3("channel %d: status: %s", c->self, s);
usr.bin/ssh/channels.c
799
channel_close_fds(ssh, c);
usr.bin/ssh/channels.c
800
sshbuf_free(c->input);
usr.bin/ssh/channels.c
801
sshbuf_free(c->output);
usr.bin/ssh/channels.c
802
sshbuf_free(c->extended);
usr.bin/ssh/channels.c
803
c->input = c->output = c->extended = NULL;
usr.bin/ssh/channels.c
804
free(c->remote_name);
usr.bin/ssh/channels.c
805
c->remote_name = NULL;
usr.bin/ssh/channels.c
806
free(c->path);
usr.bin/ssh/channels.c
807
c->path = NULL;
usr.bin/ssh/channels.c
808
free(c->listening_addr);
usr.bin/ssh/channels.c
809
c->listening_addr = NULL;
usr.bin/ssh/channels.c
810
free(c->xctype);
usr.bin/ssh/channels.c
811
c->xctype = NULL;
usr.bin/ssh/channels.c
812
while ((cc = TAILQ_FIRST(&c->status_confirms)) != NULL) {
usr.bin/ssh/channels.c
814
cc->abandon_cb(ssh, c, cc->ctx);
usr.bin/ssh/channels.c
815
TAILQ_REMOVE(&c->status_confirms, cc, entry);
usr.bin/ssh/channels.c
818
if (c->filter_cleanup != NULL && c->filter_ctx != NULL)
usr.bin/ssh/channels.c
819
c->filter_cleanup(ssh, c->self, c->filter_ctx);
usr.bin/ssh/channels.c
820
sc->channels[c->self] = NULL;
usr.bin/ssh/channels.c
821
freezero(c, sizeof(*c));
usr.bin/ssh/channels.c
895
Channel *c;
usr.bin/ssh/channels.c
898
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
899
if (c != NULL) {
usr.bin/ssh/channels.c
900
switch (c->type) {
usr.bin/ssh/channels.c
907
channel_close_fd(ssh, c, &c->sock);
usr.bin/ssh/channels.c
908
channel_free(ssh, c);
usr.bin/ssh/channels.c
92
typedef void chan_fn(struct ssh *, Channel *c);
usr.bin/ssh/channels.c
924
Channel *c;
usr.bin/ssh/channels.c
927
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
928
if (c == NULL || c->type != SSH_CHANNEL_OPEN)
usr.bin/ssh/channels.c
930
if (sshbuf_len(c->output) > maxsize) {
usr.bin/ssh/channels.c
932
c->self, sshbuf_len(c->output), maxsize);
usr.bin/ssh/channels.c
944
Channel *c;
usr.bin/ssh/channels.c
947
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
948
if (c == NULL)
usr.bin/ssh/channels.c
950
switch (c->type) {
usr.bin/ssh/channels.c
975
fatal_f("bad channel type %d", c->type);
usr.bin/ssh/channels.c
987
Channel *c;
usr.bin/ssh/channels.c
990
c = ssh->chanctxt->channels[i];
usr.bin/ssh/channels.c
991
if (c == NULL || c->type != SSH_CHANNEL_OPEN)
usr.bin/ssh/channels.c
993
if (c->client_tty)
usr.bin/ssh/channels.h
276
#define CHANNEL_EFD_INPUT_ACTIVE(c) \
usr.bin/ssh/channels.h
277
(c->extended_usage == CHAN_EXTENDED_READ && \
usr.bin/ssh/channels.h
278
(c->efd != -1 || \
usr.bin/ssh/channels.h
279
sshbuf_len(c->extended) > 0))
usr.bin/ssh/channels.h
280
#define CHANNEL_EFD_OUTPUT_ACTIVE(c) \
usr.bin/ssh/channels.h
281
(c->extended_usage == CHAN_EXTENDED_WRITE && \
usr.bin/ssh/channels.h
282
c->efd != -1 && (!(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD)) || \
usr.bin/ssh/channels.h
283
sshbuf_len(c->extended) > 0))
usr.bin/ssh/cipher-aesctr.c
65
aesctr_encrypt_bytes(aesctr_ctx *x,const u8 *m,u8 *c,u32 bytes)
usr.bin/ssh/cipher-aesctr.c
75
*(c++) = *(m++) ^ buf[n];
usr.bin/ssh/cipher-aesctr.h
33
void aesctr_encrypt_bytes(aesctr_ctx *x,const u8 *m,u8 *c,u32 bytes);
usr.bin/ssh/cipher.c
113
const struct sshcipher *c;
usr.bin/ssh/cipher.c
116
for (c = ciphers; c->name != NULL; c++) {
usr.bin/ssh/cipher.c
117
if ((c->flags & CFLAG_INTERNAL) != 0)
usr.bin/ssh/cipher.c
119
if (auth_only && c->auth_len == 0)
usr.bin/ssh/cipher.c
121
xextendf(&ret, sep_str, "%s", c->name);
usr.bin/ssh/cipher.c
138
cipher_blocksize(const struct sshcipher *c)
usr.bin/ssh/cipher.c
140
return (c->block_size);
usr.bin/ssh/cipher.c
144
cipher_keylen(const struct sshcipher *c)
usr.bin/ssh/cipher.c
146
return (c->key_len);
usr.bin/ssh/cipher.c
150
cipher_seclen(const struct sshcipher *c)
usr.bin/ssh/cipher.c
152
if (strcmp("3des-cbc", c->name) == 0)
usr.bin/ssh/cipher.c
154
return cipher_keylen(c);
usr.bin/ssh/cipher.c
158
cipher_authlen(const struct sshcipher *c)
usr.bin/ssh/cipher.c
160
return (c->auth_len);
usr.bin/ssh/cipher.c
164
cipher_ivlen(const struct sshcipher *c)
usr.bin/ssh/cipher.c
170
return (c->iv_len != 0 || (c->flags & CFLAG_CHACHAPOLY) != 0) ?
usr.bin/ssh/cipher.c
171
c->iv_len : c->block_size;
usr.bin/ssh/cipher.c
175
cipher_is_cbc(const struct sshcipher *c)
usr.bin/ssh/cipher.c
177
return (c->flags & CFLAG_CBC) != 0;
usr.bin/ssh/cipher.c
181
cipher_is_internal(const struct sshcipher *c)
usr.bin/ssh/cipher.c
183
return (c->flags & CFLAG_INTERNAL) != 0;
usr.bin/ssh/cipher.c
195
const struct sshcipher *c;
usr.bin/ssh/cipher.c
196
for (c = ciphers; c->name != NULL; c++)
usr.bin/ssh/cipher.c
197
if (strcmp(c->name, name) == 0)
usr.bin/ssh/cipher.c
198
return c;
usr.bin/ssh/cipher.c
206
const struct sshcipher *c;
usr.bin/ssh/cipher.c
217
c = cipher_by_name(p);
usr.bin/ssh/cipher.c
218
if (c == NULL || (c->flags & CFLAG_INTERNAL) != 0) {
usr.bin/ssh/cipher.c
433
const struct sshcipher *c = cc->cipher;
usr.bin/ssh/cipher.c
459
if (cipher_authlen(c)) {
usr.bin/ssh/clientloop.c
1167
process_escapes(struct ssh *ssh, Channel *c,
usr.bin/ssh/clientloop.c
1178
if (c == NULL || c->filter_ctx == NULL || len <= 0)
usr.bin/ssh/clientloop.c
1181
efc = (struct escape_filter_ctx *)c->filter_ctx;
usr.bin/ssh/clientloop.c
1199
if (c && c->ctl_chan != -1) {
usr.bin/ssh/clientloop.c
1200
channel_force_close(ssh, c, 1);
usr.bin/ssh/clientloop.c
1208
if (c && c->ctl_chan != -1) {
usr.bin/ssh/clientloop.c
1238
channel_request_start(ssh, c->self, "break", 0);
usr.bin/ssh/clientloop.c
1265
if (c && c->ctl_chan != -1)
usr.bin/ssh/clientloop.c
1288
if (c->ctl_chan != -1)
usr.bin/ssh/clientloop.c
1323
(c && c->ctl_chan != -1),
usr.bin/ssh/clientloop.c
1338
if (c && c->ctl_chan != -1)
usr.bin/ssh/clientloop.c
1426
client_simple_escape_filter(struct ssh *ssh, Channel *c, char *buf, int len)
usr.bin/ssh/clientloop.c
1428
if (c->extended_usage != CHAN_EXTENDED_WRITE)
usr.bin/ssh/clientloop.c
1431
return process_escapes(ssh, c, c->input, c->output, c->extended,
usr.bin/ssh/clientloop.c
1715
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1737
c = channel_connect_by_listen_address(ssh,
usr.bin/ssh/clientloop.c
1742
if (c != NULL && c->type == SSH_CHANNEL_MUX_CLIENT) {
usr.bin/ssh/clientloop.c
1758
(r = sshbuf_put_stringb(c->output, b)) != 0) {
usr.bin/ssh/clientloop.c
1768
return c;
usr.bin/ssh/clientloop.c
1775
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1787
c = channel_connect_by_listen_path(ssh, listen_path,
usr.bin/ssh/clientloop.c
1790
return c;
usr.bin/ssh/clientloop.c
1796
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1824
c = channel_new(ssh, "x11-connection",
usr.bin/ssh/clientloop.c
1827
c->force_drain = 1;
usr.bin/ssh/clientloop.c
1828
return c;
usr.bin/ssh/clientloop.c
1834
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1859
c = channel_new(ssh, "agent-connection",
usr.bin/ssh/clientloop.c
1863
c->force_drain = 1;
usr.bin/ssh/clientloop.c
1864
return c;
usr.bin/ssh/clientloop.c
1871
Channel *c;
usr.bin/ssh/clientloop.c
1887
c = channel_new(ssh, "tun-connection", SSH_CHANNEL_OPENING, fd, fd, -1,
usr.bin/ssh/clientloop.c
1889
c->datagram = 1;
usr.bin/ssh/clientloop.c
1892
channel_register_open_confirm(ssh, c->self, cb, cbctx);
usr.bin/ssh/clientloop.c
1896
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/clientloop.c
1897
(r = sshpkt_put_u32(ssh, c->local_window_max)) != 0 ||
usr.bin/ssh/clientloop.c
1898
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0 ||
usr.bin/ssh/clientloop.c
1911
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1928
c = client_request_forwarded_tcpip(ssh, ctype, rchan, rwindow,
usr.bin/ssh/clientloop.c
1931
c = client_request_forwarded_streamlocal(ssh, ctype, rchan);
usr.bin/ssh/clientloop.c
1933
c = client_request_x11(ssh, ctype, rchan);
usr.bin/ssh/clientloop.c
1936
c = client_request_agent(ssh, ctype, rchan);
usr.bin/ssh/clientloop.c
1938
if (c != NULL && c->type == SSH_CHANNEL_MUX_CLIENT) {
usr.bin/ssh/clientloop.c
1940
} else if (c != NULL) {
usr.bin/ssh/clientloop.c
1942
c->remote_id = rchan;
usr.bin/ssh/clientloop.c
1943
c->have_remote_id = 1;
usr.bin/ssh/clientloop.c
1944
c->remote_window = rwindow;
usr.bin/ssh/clientloop.c
1945
c->remote_maxpacket = rmaxpack;
usr.bin/ssh/clientloop.c
1946
if (c->type != SSH_CHANNEL_CONNECTING) {
usr.bin/ssh/clientloop.c
1948
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/clientloop.c
1949
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/clientloop.c
1950
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/clientloop.c
1951
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0 ||
usr.bin/ssh/clientloop.c
1974
Channel *c = NULL;
usr.bin/ssh/clientloop.c
1983
c = channel_lookup(ssh, id);
usr.bin/ssh/clientloop.c
1984
if (channel_proxy_upstream(c, type, seq, ssh))
usr.bin/ssh/clientloop.c
1993
if (c == NULL) {
usr.bin/ssh/clientloop.c
1999
chan_rcvd_eow(ssh, c);
usr.bin/ssh/clientloop.c
2003
if (c->ctl_chan != -1) {
usr.bin/ssh/clientloop.c
2004
mux_exit_message(ssh, c, exitval);
usr.bin/ssh/clientloop.c
2018
if (reply && c != NULL && !(c->flags & CHAN_CLOSE_SENT)) {
usr.bin/ssh/clientloop.c
2019
if (!c->have_remote_id)
usr.bin/ssh/clientloop.c
2020
fatal_f("channel %d: no remote_id", c->self);
usr.bin/ssh/clientloop.c
2023
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/clientloop.c
2707
Channel *c = NULL;
usr.bin/ssh/clientloop.c
2711
if ((c = channel_lookup(ssh, id)) == NULL)
usr.bin/ssh/clientloop.c
2736
c->client_tty = 1;
usr.bin/ssh/clientloop.c
810
client_status_confirm(struct ssh *ssh, int type, Channel *c, void *ctx)
usr.bin/ssh/clientloop.c
827
c->ctl_chan != -1 && c->extended_usage == CHAN_EXTENDED_WRITE;
usr.bin/ssh/clientloop.c
831
cr->request_type, c->self);
usr.bin/ssh/clientloop.c
839
cr->request_type, c->self);
usr.bin/ssh/clientloop.c
842
if (cr->action == CONFIRM_CLOSE && c->self == session_ident)
usr.bin/ssh/clientloop.c
849
debug3_f("channel %d: mux request: %s", c->self,
usr.bin/ssh/clientloop.c
851
if ((r = sshbuf_put(c->extended, errmsg,
usr.bin/ssh/clientloop.c
861
if (c->self == session_ident)
usr.bin/ssh/clientloop.c
864
mux_tty_alloc_failed(ssh, c);
usr.bin/ssh/clientloop.c
866
chan_read_failed(ssh, c);
usr.bin/ssh/clientloop.c
867
chan_write_failed(ssh, c);
usr.bin/ssh/clientloop.c
874
client_abandon_status_confirm(struct ssh *ssh, Channel *c, void *ctx)
usr.bin/ssh/ed25519.c
1672
fe25519 a,b,t1,t2,c,d,e,f,g,h,qt;
usr.bin/ssh/ed25519.c
1682
fe25519_mul(&c, &r->t, &qt); /* C = T1*k*T2 */
usr.bin/ssh/ed25519.c
1683
fe25519_mul(&c, &c, &ge25519_ec2d);
usr.bin/ssh/ed25519.c
1685
fe25519_sub(&f, &d, &c); /* F = D-C */
usr.bin/ssh/ed25519.c
1686
fe25519_add(&g, &d, &c); /* G = D+C */
usr.bin/ssh/ed25519.c
1695
fe25519 a, b, c, d, t;
usr.bin/ssh/ed25519.c
1703
fe25519_mul(&c, &p->t, &q->t); /* C = T1*k*T2 */
usr.bin/ssh/ed25519.c
1704
fe25519_mul(&c, &c, &ge25519_ec2d);
usr.bin/ssh/ed25519.c
1708
fe25519_sub(&r->t, &d, &c); /* F = D-C */
usr.bin/ssh/ed25519.c
1709
fe25519_add(&r->z, &d, &c); /* G = D+C */
usr.bin/ssh/ed25519.c
1716
fe25519 a,b,c,d;
usr.bin/ssh/ed25519.c
1719
fe25519_square(&c, &p->z);
usr.bin/ssh/ed25519.c
1720
fe25519_add(&c, &c, &c);
usr.bin/ssh/ed25519.c
1728
fe25519_sub(&r->t, &r->z, &c);
usr.bin/ssh/ed25519.c
1739
static unsigned char equal(signed char b,signed char c)
usr.bin/ssh/ed25519.c
1742
unsigned char uc = c;
usr.bin/ssh/kex.c
1071
char c = id;
usr.bin/ssh/kex.c
1088
ssh_digest_update(hashctx, &c, 1) != 0 ||
usr.bin/ssh/kex.c
1117
fprintf(stderr, "key '%c'== ", c);
usr.bin/ssh/kex.c
1248
u_char c;
usr.bin/ssh/kex.c
1322
&c, 1);
usr.bin/ssh/kex.c
1333
if (c == '\r') {
usr.bin/ssh/kex.c
1337
if (c == '\n')
usr.bin/ssh/kex.c
1339
if (c == '\0' || expect_nl) {
usr.bin/ssh/kex.c
1344
if ((r = sshbuf_put_u8(peer_version, c)) != 0) {
usr.bin/ssh/kexc25519.c
42
const u_char b[CURVE25519_SIZE], const u_char c[CURVE25519_SIZE])
usr.bin/ssh/libcrux_internal.h
10947
int32_t c
usr.bin/ssh/libcrux_internal.h
10955
* (int64_t)c);
usr.bin/ssh/libcrux_internal.h
21186
libcrux_ml_kem_vector_portable_arithmetic_multiply_by_constant(Eurydice_arr_d6 vec, int16_t c)
usr.bin/ssh/libcrux_internal.h
21192
vec.data[uu____0] *= c;
usr.bin/ssh/libcrux_internal.h
21201
libcrux_ml_kem_vector_portable_multiply_by_constant_b8(Eurydice_arr_d6 vec, int16_t c)
usr.bin/ssh/libcrux_internal.h
21203
return libcrux_ml_kem_vector_portable_arithmetic_multiply_by_constant(vec, c);
usr.bin/ssh/libcrux_internal.h
21318
c =
usr.bin/ssh/libcrux_internal.h
21325
return value_high - c;
usr.bin/ssh/libcrux_internal.h
21351
int16_t c
usr.bin/ssh/libcrux_internal.h
21359
c);
usr.bin/ssh/libcrux_internal.h
21381
int16_t c
usr.bin/ssh/libcrux_internal.h
21388
vec.data[uu____0] &= c;
usr.bin/ssh/libcrux_internal.h
4063
uint64_t c,
usr.bin/ssh/libcrux_internal.h
4068
return (((a ^ b) ^ c) ^ d) ^ e;
usr.bin/ssh/libcrux_internal.h
4075
libcrux_sha3_simd_portable_xor5_d2(uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e)
usr.bin/ssh/libcrux_internal.h
4077
return libcrux_sha3_simd_portable__veor5q_u64(a, b, c, d, e);
usr.bin/ssh/libcrux_internal.h
4106
libcrux_sha3_simd_portable__vbcaxq_u64(uint64_t a, uint64_t b, uint64_t c)
usr.bin/ssh/libcrux_internal.h
4108
return a ^ (b & ~c);
usr.bin/ssh/libcrux_internal.h
4115
libcrux_sha3_simd_portable_and_not_xor_d2(uint64_t a, uint64_t b, uint64_t c)
usr.bin/ssh/libcrux_internal.h
4117
return libcrux_sha3_simd_portable__vbcaxq_u64(a, b, c);
usr.bin/ssh/libcrux_internal.h
4120
static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable__veorq_n_u64(uint64_t a, uint64_t c)
usr.bin/ssh/libcrux_internal.h
4122
return a ^ c;
usr.bin/ssh/libcrux_internal.h
4129
libcrux_sha3_simd_portable_xor_constant_d2(uint64_t a, uint64_t c)
usr.bin/ssh/libcrux_internal.h
4131
return libcrux_sha3_simd_portable__veorq_n_u64(a, c);
usr.bin/ssh/libcrux_internal.h
4321
c =
usr.bin/ssh/libcrux_internal.h
4380
libcrux_sha3_simd_portable_rotate_left1_and_xor_d2(c.data[((size_t)0U + (size_t)4U) %
usr.bin/ssh/libcrux_internal.h
4382
c.data[((size_t)0U + (size_t)1U) % (size_t)5U]),
usr.bin/ssh/libcrux_internal.h
4383
libcrux_sha3_simd_portable_rotate_left1_and_xor_d2(c.data[((size_t)1U + (size_t)4U) %
usr.bin/ssh/libcrux_internal.h
4385
c.data[((size_t)1U + (size_t)1U) % (size_t)5U]),
usr.bin/ssh/libcrux_internal.h
4386
libcrux_sha3_simd_portable_rotate_left1_and_xor_d2(c.data[((size_t)2U + (size_t)4U) %
usr.bin/ssh/libcrux_internal.h
4388
c.data[((size_t)2U + (size_t)1U) % (size_t)5U]),
usr.bin/ssh/libcrux_internal.h
4389
libcrux_sha3_simd_portable_rotate_left1_and_xor_d2(c.data[((size_t)3U + (size_t)4U) %
usr.bin/ssh/libcrux_internal.h
4391
c.data[((size_t)3U + (size_t)1U) % (size_t)5U]),
usr.bin/ssh/libcrux_internal.h
4392
libcrux_sha3_simd_portable_rotate_left1_and_xor_d2(c.data[((size_t)4U + (size_t)4U) %
usr.bin/ssh/libcrux_internal.h
4394
c.data[((size_t)4U + (size_t)1U) % (size_t)5U])
usr.bin/ssh/libcrux_internal.h
9903
c =
usr.bin/ssh/libcrux_internal.h
9908
return value_high - c;
usr.bin/ssh/match.c
309
char *c, *s, *p, *ret, *cp, *sp;
usr.bin/ssh/match.c
312
c = cp = xstrdup(client);
usr.bin/ssh/match.c
331
strlen(c) : (u_int)(cp - c);
usr.bin/ssh/match.c
332
free(c);
usr.bin/ssh/match.c
339
*next = strlen(c);
usr.bin/ssh/match.c
340
free(c);
usr.bin/ssh/misc.c
2120
char c, *ret;
usr.bin/ssh/misc.c
2131
c = argv[i][j];
usr.bin/ssh/misc.c
2132
switch (c) {
usr.bin/ssh/misc.c
2136
r = sshbuf_put_u8(arg, c);
usr.bin/ssh/misc.c
2145
r = sshbuf_put_u8(arg, c);
usr.bin/ssh/misc.c
2374
u_char c, last = '\0';
usr.bin/ssh/misc.c
2388
c = tolower((u_char)name[i]);
usr.bin/ssh/misc.c
2390
name[i] = (char)c;
usr.bin/ssh/misc.c
2391
if (last == '.' && c == '.') {
usr.bin/ssh/misc.c
2396
if (c != '.' && c != '-' && !isalnum(c) &&
usr.bin/ssh/misc.c
2397
c != '_') /* technically invalid, but common */ {
usr.bin/ssh/misc.c
2402
last = c;
usr.bin/ssh/mux.c
1019
debug2_f("channel %d: stdio fwd to %s:%d", c->self, chost, cport);
usr.bin/ssh/mux.c
1023
if ((new_fd[i] = mm_receive_fd(c->sock)) == -1) {
usr.bin/ssh/mux.c
1039
if (c->have_ctl_child_id) {
usr.bin/ssh/mux.c
1070
nc->ctl_chan = c->self; /* link session -> control channel */
usr.bin/ssh/mux.c
1071
c->ctl_child_id = nc->self; /* link control -> session channel */
usr.bin/ssh/mux.c
1072
c->have_ctl_child_id = 1;
usr.bin/ssh/mux.c
1082
c->mux_pause = 1; /* stop handling messages until open_confirm done */
usr.bin/ssh/mux.c
1093
Channel *c, *cc;
usr.bin/ssh/mux.c
1099
if ((c = channel_by_id(ssh, id)) == NULL)
usr.bin/ssh/mux.c
1101
if ((cc = channel_by_id(ssh, c->ctl_chan)) == NULL)
usr.bin/ssh/mux.c
1103
id, c->ctl_chan);
usr.bin/ssh/mux.c
1119
(r = sshbuf_put_u32(reply, c->self)) != 0)
usr.bin/ssh/mux.c
1131
c->open_confirm_ctx = NULL;
usr.bin/ssh/mux.c
1137
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
1139
debug_f("channel %d: stop listening", c->self);
usr.bin/ssh/mux.c
1167
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
1171
debug_f("channel %d: proxy request", c->self);
usr.bin/ssh/mux.c
1183
c->mux_rcb = channel_proxy_downstream;
usr.bin/ssh/mux.c
1193
mux_master_read_cb(struct ssh *ssh, Channel *c)
usr.bin/ssh/mux.c
1195
struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx;
usr.bin/ssh/mux.c
1204
if (c->mux_ctx == NULL) {
usr.bin/ssh/mux.c
1206
c->mux_ctx = state;
usr.bin/ssh/mux.c
1207
channel_register_cleanup(ssh, c->self,
usr.bin/ssh/mux.c
1218
if ((r = sshbuf_put_stringb(c->output, out)) != 0)
usr.bin/ssh/mux.c
1220
debug3_f("channel %d: hello sent", c->self);
usr.bin/ssh/mux.c
1226
if ((r = sshbuf_froms(c->input, &in)) != 0) {
usr.bin/ssh/mux.c
1234
debug3_f("channel %d packet type 0x%08x len %zu", c->self,
usr.bin/ssh/mux.c
1252
c, in, out);
usr.bin/ssh/mux.c
1263
(r = sshbuf_put_stringb(c->output, out)) != 0)
usr.bin/ssh/mux.c
1272
mux_exit_message(struct ssh *ssh, Channel *c, int exitval)
usr.bin/ssh/mux.c
1278
debug3_f("channel %d: exit message, exitval %d", c->self, exitval);
usr.bin/ssh/mux.c
1280
if ((mux_chan = channel_by_id(ssh, c->ctl_chan)) == NULL)
usr.bin/ssh/mux.c
1281
fatal_f("channel %d missing mux %d", c->self, c->ctl_chan);
usr.bin/ssh/mux.c
1287
(r = sshbuf_put_u32(m, c->self)) != 0 ||
usr.bin/ssh/mux.c
1295
mux_tty_alloc_failed(struct ssh *ssh, Channel *c)
usr.bin/ssh/mux.c
1301
debug3_f("channel %d: TTY alloc failed", c->self);
usr.bin/ssh/mux.c
1303
if ((mux_chan = channel_by_id(ssh, c->ctl_chan)) == NULL)
usr.bin/ssh/mux.c
1304
fatal_f("channel %d missing mux %d", c->self, c->ctl_chan);
usr.bin/ssh/mux.c
1310
(r = sshbuf_put_u32(m, c->self)) != 0 ||
usr.bin/ssh/mux.c
1406
Channel *c, *cc;
usr.bin/ssh/mux.c
1412
if ((c = channel_by_id(ssh, id)) == NULL)
usr.bin/ssh/mux.c
1414
if ((cc = channel_by_id(ssh, c->ctl_chan)) == NULL)
usr.bin/ssh/mux.c
1416
id, c->ctl_chan);
usr.bin/ssh/mux.c
1450
cctx->term, &cctx->tio, c->rfd, cctx->cmd, cctx->env);
usr.bin/ssh/mux.c
1456
(r = sshbuf_put_u32(reply, c->self)) != 0)
usr.bin/ssh/mux.c
1468
c->open_confirm_ctx = NULL;
usr.bin/ssh/mux.c
182
Channel *cc, *c = channel_by_id(ssh, cid);
usr.bin/ssh/mux.c
185
if (c == NULL)
usr.bin/ssh/mux.c
187
if (c->ctl_chan != -1) {
usr.bin/ssh/mux.c
188
if ((cc = channel_by_id(ssh, c->ctl_chan)) == NULL)
usr.bin/ssh/mux.c
190
c->self, c->ctl_chan);
usr.bin/ssh/mux.c
191
c->ctl_chan = -1;
usr.bin/ssh/mux.c
196
channel_cancel_cleanup(ssh, c->self);
usr.bin/ssh/mux.c
203
Channel *sc, *c = channel_by_id(ssh, cid);
usr.bin/ssh/mux.c
206
if (c == NULL)
usr.bin/ssh/mux.c
208
if (c->have_ctl_child_id) {
usr.bin/ssh/mux.c
209
if ((sc = channel_by_id(ssh, c->ctl_child_id)) == NULL)
usr.bin/ssh/mux.c
211
c->self, c->ctl_child_id);
usr.bin/ssh/mux.c
212
c->ctl_child_id = 0;
usr.bin/ssh/mux.c
213
c->have_ctl_child_id = 0;
usr.bin/ssh/mux.c
226
channel_cancel_cleanup(ssh, c->self);
usr.bin/ssh/mux.c
256
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
259
struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx;
usr.bin/ssh/mux.c
263
fatal_f("channel %d: c->mux_ctx == NULL", c->self);
usr.bin/ssh/mux.c
277
debug2_f("channel %d client version %u", c->self, ver);
usr.bin/ssh/mux.c
327
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
381
"term \"%s\", cmd \"%s\", env %u", c->self,
usr.bin/ssh/mux.c
394
if ((new_fd[i] = mm_receive_fd(c->sock)) == -1) {
usr.bin/ssh/mux.c
414
if (c->have_ctl_child_id) {
usr.bin/ssh/mux.c
460
nc->ctl_chan = c->self; /* link session -> control channel */
usr.bin/ssh/mux.c
461
c->ctl_child_id = nc->self; /* link control -> session channel */
usr.bin/ssh/mux.c
462
c->have_ctl_child_id = 1;
usr.bin/ssh/mux.c
476
c->mux_pause = 1; /* stop handling messages until open_confirm done */
usr.bin/ssh/mux.c
486
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
490
debug2_f("channel %d: alive check", c->self);
usr.bin/ssh/mux.c
504
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
510
debug2_f("channel %d: info request", c->self);
usr.bin/ssh/mux.c
540
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
542
debug2_f("channel %d: terminate request", c->self);
usr.bin/ssh/mux.c
632
Channel *c;
usr.bin/ssh/mux.c
637
if ((c = channel_by_id(ssh, fctx->cid)) == NULL) {
usr.bin/ssh/mux.c
706
if ((r = sshbuf_put_stringb(c->output, out)) != 0)
usr.bin/ssh/mux.c
709
if (c->mux_pause <= 0)
usr.bin/ssh/mux.c
710
fatal_f("mux_pause %d", c->mux_pause);
usr.bin/ssh/mux.c
711
c->mux_pause = 0; /* start processing messages again */
usr.bin/ssh/mux.c
717
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
761
debug2_f("channel %d: request %s", c->self,
usr.bin/ssh/mux.c
858
fctx->cid = c->self;
usr.bin/ssh/mux.c
864
c->mux_pause = 1; /* wait for mux_confirm_remote_forward */
usr.bin/ssh/mux.c
882
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/mux.c
927
debug2_f("channel %d: request cancel %s", c->self,
usr.bin/ssh/mux.c
994
Channel *c, struct sshbuf *m, struct sshbuf *reply)
usr.bin/ssh/nchan.c
101
if (c->ostate > CHAN_OUTPUT_CLOSED || next > CHAN_OUTPUT_CLOSED)
usr.bin/ssh/nchan.c
102
fatal("chan_set_ostate: bad state %d -> %d", c->ostate, next);
usr.bin/ssh/nchan.c
103
debug2("channel %d: output %s -> %s", c->self, ostates[c->ostate],
usr.bin/ssh/nchan.c
105
c->ostate = next;
usr.bin/ssh/nchan.c
109
chan_read_failed(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
111
debug2("channel %d: read failed", c->self);
usr.bin/ssh/nchan.c
112
switch (c->istate) {
usr.bin/ssh/nchan.c
114
chan_shutdown_read(ssh, c);
usr.bin/ssh/nchan.c
115
chan_set_istate(c, CHAN_INPUT_WAIT_DRAIN);
usr.bin/ssh/nchan.c
119
c->self, c->istate);
usr.bin/ssh/nchan.c
125
chan_ibuf_empty(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
127
debug2("channel %d: ibuf empty", c->self);
usr.bin/ssh/nchan.c
128
if (sshbuf_len(c->input)) {
usr.bin/ssh/nchan.c
130
c->self);
usr.bin/ssh/nchan.c
133
switch (c->istate) {
usr.bin/ssh/nchan.c
135
if (!(c->flags & (CHAN_CLOSE_SENT|CHAN_LOCAL)))
usr.bin/ssh/nchan.c
136
chan_send_eof2(ssh, c);
usr.bin/ssh/nchan.c
137
chan_set_istate(c, CHAN_INPUT_CLOSED);
usr.bin/ssh/nchan.c
141
c->self, c->istate);
usr.bin/ssh/nchan.c
147
chan_obuf_empty(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
149
debug2("channel %d: obuf empty", c->self);
usr.bin/ssh/nchan.c
150
if (sshbuf_len(c->output)) {
usr.bin/ssh/nchan.c
152
c->self);
usr.bin/ssh/nchan.c
155
switch (c->ostate) {
usr.bin/ssh/nchan.c
157
chan_shutdown_write(ssh, c);
usr.bin/ssh/nchan.c
158
chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
usr.bin/ssh/nchan.c
162
c->self, c->ostate);
usr.bin/ssh/nchan.c
168
chan_rcvd_eow(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
170
debug2("channel %d: rcvd eow", c->self);
usr.bin/ssh/nchan.c
171
switch (c->istate) {
usr.bin/ssh/nchan.c
173
chan_shutdown_read(ssh, c);
usr.bin/ssh/nchan.c
174
chan_set_istate(c, CHAN_INPUT_CLOSED);
usr.bin/ssh/nchan.c
180
chan_send_eof2(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
184
debug2("channel %d: send eof", c->self);
usr.bin/ssh/nchan.c
185
switch (c->istate) {
usr.bin/ssh/nchan.c
187
if (!c->have_remote_id)
usr.bin/ssh/nchan.c
188
fatal_f("channel %d: no remote_id", c->self);
usr.bin/ssh/nchan.c
190
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/nchan.c
193
c->flags |= CHAN_EOF_SENT;
usr.bin/ssh/nchan.c
197
c->self, c->istate);
usr.bin/ssh/nchan.c
203
chan_send_close2(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
207
debug2("channel %d: send_close2", c->self);
usr.bin/ssh/nchan.c
208
if (c->ostate != CHAN_OUTPUT_CLOSED ||
usr.bin/ssh/nchan.c
209
c->istate != CHAN_INPUT_CLOSED) {
usr.bin/ssh/nchan.c
211
c->self, c->istate, c->ostate);
usr.bin/ssh/nchan.c
212
} else if (c->flags & CHAN_CLOSE_SENT) {
usr.bin/ssh/nchan.c
213
error("channel %d: already sent close", c->self);
usr.bin/ssh/nchan.c
215
if (!c->have_remote_id)
usr.bin/ssh/nchan.c
216
fatal_f("channel %d: no remote_id", c->self);
usr.bin/ssh/nchan.c
217
debug2("channel %d: send close for remote id %u", c->self,
usr.bin/ssh/nchan.c
218
c->remote_id);
usr.bin/ssh/nchan.c
220
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/nchan.c
223
c->flags |= CHAN_CLOSE_SENT;
usr.bin/ssh/nchan.c
228
chan_send_eow2(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
232
debug2("channel %d: send eow", c->self);
usr.bin/ssh/nchan.c
233
if (c->ostate == CHAN_OUTPUT_CLOSED) {
usr.bin/ssh/nchan.c
235
c->self);
usr.bin/ssh/nchan.c
240
if (!c->have_remote_id)
usr.bin/ssh/nchan.c
241
fatal_f("channel %d: no remote_id", c->self);
usr.bin/ssh/nchan.c
243
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/nchan.c
253
chan_rcvd_ieof(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
255
debug2("channel %d: rcvd eof", c->self);
usr.bin/ssh/nchan.c
256
c->flags |= CHAN_EOF_RCVD;
usr.bin/ssh/nchan.c
257
if (c->ostate == CHAN_OUTPUT_OPEN)
usr.bin/ssh/nchan.c
258
chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN);
usr.bin/ssh/nchan.c
259
if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN &&
usr.bin/ssh/nchan.c
260
sshbuf_len(c->output) == 0 &&
usr.bin/ssh/nchan.c
261
!CHANNEL_EFD_OUTPUT_ACTIVE(c))
usr.bin/ssh/nchan.c
262
chan_obuf_empty(ssh, c);
usr.bin/ssh/nchan.c
266
chan_rcvd_oclose(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
268
debug2("channel %d: rcvd close", c->self);
usr.bin/ssh/nchan.c
269
if (!(c->flags & CHAN_LOCAL)) {
usr.bin/ssh/nchan.c
270
if (c->flags & CHAN_CLOSE_RCVD)
usr.bin/ssh/nchan.c
272
c->self);
usr.bin/ssh/nchan.c
273
c->flags |= CHAN_CLOSE_RCVD;
usr.bin/ssh/nchan.c
275
if (c->type == SSH_CHANNEL_LARVAL) {
usr.bin/ssh/nchan.c
277
chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
usr.bin/ssh/nchan.c
278
chan_set_istate(c, CHAN_INPUT_CLOSED);
usr.bin/ssh/nchan.c
281
switch (c->ostate) {
usr.bin/ssh/nchan.c
287
chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN);
usr.bin/ssh/nchan.c
290
switch (c->istate) {
usr.bin/ssh/nchan.c
292
chan_shutdown_read(ssh, c);
usr.bin/ssh/nchan.c
293
chan_shutdown_extended_read(ssh, c);
usr.bin/ssh/nchan.c
294
chan_set_istate(c, CHAN_INPUT_CLOSED);
usr.bin/ssh/nchan.c
297
if (!(c->flags & CHAN_LOCAL))
usr.bin/ssh/nchan.c
298
chan_send_eof2(ssh, c);
usr.bin/ssh/nchan.c
299
chan_shutdown_extended_read(ssh, c);
usr.bin/ssh/nchan.c
300
chan_set_istate(c, CHAN_INPUT_CLOSED);
usr.bin/ssh/nchan.c
306
chan_write_failed(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
308
debug2("channel %d: write failed", c->self);
usr.bin/ssh/nchan.c
309
switch (c->ostate) {
usr.bin/ssh/nchan.c
312
chan_shutdown_write(ssh, c);
usr.bin/ssh/nchan.c
313
if (strcmp(c->ctype, "session") == 0)
usr.bin/ssh/nchan.c
314
chan_send_eow2(ssh, c);
usr.bin/ssh/nchan.c
315
chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
usr.bin/ssh/nchan.c
319
c->self, c->ostate);
usr.bin/ssh/nchan.c
325
chan_mark_dead(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
327
c->type = SSH_CHANNEL_ZOMBIE;
usr.bin/ssh/nchan.c
331
chan_is_dead(struct ssh *ssh, Channel *c, int do_send)
usr.bin/ssh/nchan.c
333
if (c->type == SSH_CHANNEL_ZOMBIE) {
usr.bin/ssh/nchan.c
334
debug2("channel %d: zombie", c->self);
usr.bin/ssh/nchan.c
337
if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED)
usr.bin/ssh/nchan.c
340
c->extended_usage == CHAN_EXTENDED_WRITE &&
usr.bin/ssh/nchan.c
341
c->efd != -1 &&
usr.bin/ssh/nchan.c
342
sshbuf_len(c->extended) > 0) {
usr.bin/ssh/nchan.c
344
c->self, c->efd, sshbuf_len(c->extended));
usr.bin/ssh/nchan.c
347
if (c->flags & CHAN_LOCAL) {
usr.bin/ssh/nchan.c
348
debug2("channel %d: is dead (local)", c->self);
usr.bin/ssh/nchan.c
351
if (!(c->flags & CHAN_CLOSE_SENT)) {
usr.bin/ssh/nchan.c
353
chan_send_close2(ssh, c);
usr.bin/ssh/nchan.c
356
if (c->flags & CHAN_CLOSE_RCVD) {
usr.bin/ssh/nchan.c
358
c->self);
usr.bin/ssh/nchan.c
363
if ((c->flags & CHAN_CLOSE_SENT) &&
usr.bin/ssh/nchan.c
364
(c->flags & CHAN_CLOSE_RCVD)) {
usr.bin/ssh/nchan.c
365
debug2("channel %d: is dead", c->self);
usr.bin/ssh/nchan.c
373
chan_shutdown_write(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
375
sshbuf_reset(c->output);
usr.bin/ssh/nchan.c
376
if (c->type == SSH_CHANNEL_LARVAL)
usr.bin/ssh/nchan.c
380
c->self, c->istate, c->ostate, c->sock, c->wfd, c->efd,
usr.bin/ssh/nchan.c
381
channel_format_extended_usage(c));
usr.bin/ssh/nchan.c
382
if (c->sock != -1) {
usr.bin/ssh/nchan.c
383
if (shutdown(c->sock, SHUT_WR) == -1) {
usr.bin/ssh/nchan.c
385
"fd %d [i%d o%d]: %.100s", c->self, c->sock,
usr.bin/ssh/nchan.c
386
c->istate, c->ostate, strerror(errno));
usr.bin/ssh/nchan.c
389
if (channel_close_fd(ssh, c, &c->wfd) < 0) {
usr.bin/ssh/nchan.c
391
"fd %d [i%d o%d]: %.100s", c->self, c->wfd,
usr.bin/ssh/nchan.c
392
c->istate, c->ostate, strerror(errno));
usr.bin/ssh/nchan.c
398
chan_shutdown_read(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
400
if (c->type == SSH_CHANNEL_LARVAL)
usr.bin/ssh/nchan.c
403
c->self, c->istate, c->ostate, c->sock, c->rfd, c->efd,
usr.bin/ssh/nchan.c
404
channel_format_extended_usage(c));
usr.bin/ssh/nchan.c
405
if (c->sock != -1) {
usr.bin/ssh/nchan.c
406
if (shutdown(c->sock, SHUT_RD) == -1) {
usr.bin/ssh/nchan.c
408
"fd %d [i%d o%d]: %.100s", c->self, c->sock,
usr.bin/ssh/nchan.c
409
c->istate, c->ostate, strerror(errno));
usr.bin/ssh/nchan.c
412
if (channel_close_fd(ssh, c, &c->rfd) < 0) {
usr.bin/ssh/nchan.c
414
"fd %d [i%d o%d]: %.100s", c->self, c->rfd,
usr.bin/ssh/nchan.c
415
c->istate, c->ostate, strerror(errno));
usr.bin/ssh/nchan.c
421
chan_shutdown_extended_read(struct ssh *ssh, Channel *c)
usr.bin/ssh/nchan.c
423
if (c->type == SSH_CHANNEL_LARVAL || c->efd == -1)
usr.bin/ssh/nchan.c
425
if (c->extended_usage != CHAN_EXTENDED_READ &&
usr.bin/ssh/nchan.c
426
c->extended_usage != CHAN_EXTENDED_IGNORE)
usr.bin/ssh/nchan.c
429
c->self, c->istate, c->ostate, c->sock, c->rfd, c->efd,
usr.bin/ssh/nchan.c
430
channel_format_extended_usage(c));
usr.bin/ssh/nchan.c
431
if (channel_close_fd(ssh, c, &c->efd) < 0) {
usr.bin/ssh/nchan.c
433
"extended fd %d [i%d o%d]: %.100s", c->self, c->efd,
usr.bin/ssh/nchan.c
434
c->istate, c->ostate, strerror(errno));
usr.bin/ssh/nchan.c
89
chan_set_istate(Channel *c, u_int next)
usr.bin/ssh/nchan.c
91
if (c->istate > CHAN_INPUT_CLOSED || next > CHAN_INPUT_CLOSED)
usr.bin/ssh/nchan.c
92
fatal("chan_set_istate: bad state %d -> %d", c->istate, next);
usr.bin/ssh/nchan.c
93
debug2("channel %d: input %s -> %s", c->self, istates[c->istate],
usr.bin/ssh/nchan.c
95
c->istate = next;
usr.bin/ssh/nchan.c
99
chan_set_ostate(Channel *c, u_int next)
usr.bin/ssh/poly1305.c
39
uint64_t c;
usr.bin/ssh/poly1305.c
92
h0 = (uint32_t)t[0] & 0x3ffffff; c = (t[0] >> 26);
usr.bin/ssh/poly1305.c
93
t[1] += c; h1 = (uint32_t)t[1] & 0x3ffffff; b = (uint32_t)(t[1] >> 26);
usr.bin/ssh/scp.c
2150
int c;
usr.bin/ssh/scp.c
2155
c = (int)*cp;
usr.bin/ssh/scp.c
2156
if (c & 0200)
usr.bin/ssh/scp.c
2158
if (!isalpha(c) && !isdigit((unsigned char)c)) {
usr.bin/ssh/scp.c
2159
switch (c) {
usr.bin/ssh/serverloop.c
413
Channel *c = NULL;
usr.bin/ssh/serverloop.c
442
c = channel_connect_to_port(ssh, target, target_port,
usr.bin/ssh/serverloop.c
455
return c;
usr.bin/ssh/serverloop.c
461
Channel *c = NULL;
usr.bin/ssh/serverloop.c
487
c = channel_connect_to_path(ssh, target,
usr.bin/ssh/serverloop.c
498
return c;
usr.bin/ssh/serverloop.c
504
Channel *c = NULL;
usr.bin/ssh/serverloop.c
543
c = channel_new(ssh, "tun", SSH_CHANNEL_OPEN, sock, sock, -1,
usr.bin/ssh/serverloop.c
545
c->datagram = 1;
usr.bin/ssh/serverloop.c
561
if (c == NULL)
usr.bin/ssh/serverloop.c
563
return c;
usr.bin/ssh/serverloop.c
569
Channel *c;
usr.bin/ssh/serverloop.c
587
c = channel_new(ssh, "session", SSH_CHANNEL_LARVAL,
usr.bin/ssh/serverloop.c
590
if (session_open(the_authctxt, c->self) != 1) {
usr.bin/ssh/serverloop.c
591
debug("session open failed, free channel %d", c->self);
usr.bin/ssh/serverloop.c
592
channel_free(ssh, c);
usr.bin/ssh/serverloop.c
595
channel_register_cleanup(ssh, c->self, session_close_by_channel, 0);
usr.bin/ssh/serverloop.c
596
return c;
usr.bin/ssh/serverloop.c
602
Channel *c = NULL;
usr.bin/ssh/serverloop.c
617
c = server_request_session(ssh);
usr.bin/ssh/serverloop.c
619
c = server_request_direct_tcpip(ssh, &reason, &errmsg);
usr.bin/ssh/serverloop.c
621
c = server_request_direct_streamlocal(ssh);
usr.bin/ssh/serverloop.c
623
c = server_request_tun(ssh);
usr.bin/ssh/serverloop.c
625
if (c != NULL) {
usr.bin/ssh/serverloop.c
627
c->remote_id = rchan;
usr.bin/ssh/serverloop.c
628
c->have_remote_id = 1;
usr.bin/ssh/serverloop.c
629
c->remote_window = rwindow;
usr.bin/ssh/serverloop.c
630
c->remote_maxpacket = rmaxpack;
usr.bin/ssh/serverloop.c
631
if (c->type != SSH_CHANNEL_CONNECTING) {
usr.bin/ssh/serverloop.c
633
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/serverloop.c
634
(r = sshpkt_put_u32(ssh, c->self)) != 0 ||
usr.bin/ssh/serverloop.c
635
(r = sshpkt_put_u32(ssh, c->local_window)) != 0 ||
usr.bin/ssh/serverloop.c
636
(r = sshpkt_put_u32(ssh, c->local_maxpacket)) != 0 ||
usr.bin/ssh/serverloop.c
851
Channel *c;
usr.bin/ssh/serverloop.c
865
if (id >= INT_MAX || (c = channel_lookup(ssh, (int)id)) == NULL) {
usr.bin/ssh/serverloop.c
872
chan_rcvd_eow(ssh, c);
usr.bin/ssh/serverloop.c
873
} else if ((c->type == SSH_CHANNEL_LARVAL ||
usr.bin/ssh/serverloop.c
874
c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0)
usr.bin/ssh/serverloop.c
875
success = session_input_channel_req(ssh, c, rtype);
usr.bin/ssh/serverloop.c
876
if (want_reply && !(c->flags & CHAN_CLOSE_SENT)) {
usr.bin/ssh/serverloop.c
877
if (!c->have_remote_id)
usr.bin/ssh/serverloop.c
878
fatal_f("channel %d: no remote_id", c->self);
usr.bin/ssh/serverloop.c
881
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
usr.bin/ssh/session.c
1844
session_input_channel_req(struct ssh *ssh, Channel *c, const char *rtype)
usr.bin/ssh/session.c
1849
if ((s = session_by_channel(c->self)) == NULL) {
usr.bin/ssh/session.c
1850
logit_f("no session %d req %.100s", c->self, rtype);
usr.bin/ssh/session.c
1859
if (c->type == SSH_CHANNEL_LARVAL) {
usr.bin/ssh/session.c
1972
Channel *c;
usr.bin/ssh/session.c
1974
if ((c = channel_by_id(ssh, id)) == NULL) {
usr.bin/ssh/session.c
1980
if (c->ostate != CHAN_OUTPUT_CLOSED)
usr.bin/ssh/session.c
1981
chan_mark_dead(ssh, c);
usr.bin/ssh/session.c
2020
Channel *c;
usr.bin/ssh/session.c
2024
if ((c = channel_lookup(ssh, s->chanid)) == NULL)
usr.bin/ssh/session.c
2061
channel_register_cleanup(ssh, c->self, session_close_by_channel, 1);
usr.bin/ssh/session.c
2069
if (c->ostate != CHAN_OUTPUT_CLOSED)
usr.bin/ssh/session.c
2070
chan_write_failed(ssh, c);
usr.bin/ssh/session.c
95
#define IS_INTERNAL_SFTP(c) \
usr.bin/ssh/session.c
96
(!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \
usr.bin/ssh/session.c
97
(c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \
usr.bin/ssh/session.c
98
c[sizeof(INTERNAL_SFTP_NAME) - 1] == ' ' || \
usr.bin/ssh/session.c
99
c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\t'))
usr.bin/ssh/sftp-client.c
2019
Attrib a, t, c;
usr.bin/ssh/sftp-client.c
2055
if (sftp_stat(conn, remote_path, 0, &c) != 0) {
usr.bin/ssh/sftp-client.c
2060
if ((off_t)c.size >= sb.st_size) {
usr.bin/ssh/sftp-client.c
2067
if (lseek(local_fd, (off_t)c.size, SEEK_SET) == -1) {
usr.bin/ssh/sftp-client.c
2071
highwater = c.size;
usr.bin/ssh/sftp-client.c
2092
offset = progress_counter = (resume ? c.size : 0);
usr.bin/ssh/sftp.c
1045
if (c >= columns) {
usr.bin/ssh/sftp.c
1047
c = 1;
usr.bin/ssh/sftp.c
1049
c++;
usr.bin/ssh/sftp.c
1054
if (!(lflag & LS_LONG_VIEW) && (c != 1))
usr.bin/ssh/sftp.c
1372
for (i = 0; cmds[i].c != NULL; i++) {
usr.bin/ssh/sftp.c
1373
if (argv[0] != NULL && strcasecmp(cmds[i].c, argv[0]) == 0)
usr.bin/ssh/sftp.c
1377
cmd = cmds[i].c;
usr.bin/ssh/sftp.c
148
const char *c;
usr.bin/ssh/sftp.c
1918
for (y = 0; cmds[y].c; y++)
usr.bin/ssh/sftp.c
1919
list[count++] = xstrdup(cmds[y].c);
usr.bin/ssh/sftp.c
1932
for (y = 0; cmds[y].c; y++) {
usr.bin/ssh/sftp.c
1933
if (!strncasecmp(cmd, cmds[y].c, cmdlen))
usr.bin/ssh/sftp.c
1934
list[count++] = xstrdup(cmds[y].c);
usr.bin/ssh/sftp.c
1989
for (i = 0; cmds[i].c; i++) {
usr.bin/ssh/sftp.c
1990
if (!strncasecmp(cmd, cmds[i].c, strlen(cmds[i].c))) {
usr.bin/ssh/sftp.c
838
u_int c = 1, colspace = 0, columns = 1;
usr.bin/ssh/sftp.c
908
if (c >= columns) {
usr.bin/ssh/sftp.c
910
c = 1;
usr.bin/ssh/sftp.c
912
c++;
usr.bin/ssh/sftp.c
918
if (!(lflag & LS_LONG_VIEW) && (c != 1))
usr.bin/ssh/sftp.c
959
u_int i, j, nentries, *indices = NULL, c = 1;
usr.bin/ssh/sntrup761.c
1988
static void Encrypt(Fq *c, const small *r, const Fq *h) {
usr.bin/ssh/sntrup761.c
1991
Round(c, hr);
usr.bin/ssh/sntrup761.c
1994
static void Decrypt(small *r, const Fq *c, const small *f, const small *ginv) {
usr.bin/ssh/sntrup761.c
1998
Rq_mult_small(cf, c, f);
usr.bin/ssh/sntrup761.c
2068
Fq h[p], c[p];
usr.bin/ssh/sntrup761.c
2070
Encrypt(c, r, h);
usr.bin/ssh/sntrup761.c
2071
Rounded_encode(C, c);
usr.bin/ssh/sntrup761.c
2076
Fq c[p];
usr.bin/ssh/sntrup761.c
2079
Rounded_decode(c, C);
usr.bin/ssh/sntrup761.c
2080
Decrypt(r, c, f, v);
usr.bin/ssh/sntrup761.c
2109
static void Hide(unsigned char *c, unsigned char *r_enc, const Inputs r, const unsigned char *pk, const unsigned char *cache) {
usr.bin/ssh/sntrup761.c
2111
ZEncrypt(c, r, pk);
usr.bin/ssh/sntrup761.c
2112
HashConfirm(c + crypto_kem_sntrup761_CIPHERTEXTBYTES - Confirm_bytes, r_enc, cache);
usr.bin/ssh/sntrup761.c
2115
int crypto_kem_sntrup761_enc(unsigned char *c, unsigned char *k, const unsigned char *pk) {
usr.bin/ssh/sntrup761.c
2120
Hide(c, r_enc, r, pk, cache);
usr.bin/ssh/sntrup761.c
2121
HashSession(k, 1, r_enc, c);
usr.bin/ssh/sntrup761.c
2125
static int Ciphertexts_diff_mask(const unsigned char *c, const unsigned char *c2) {
usr.bin/ssh/sntrup761.c
2128
while (len-- > 0) differentbits |= (*c++) ^ (*c2++);
usr.bin/ssh/sntrup761.c
2132
int crypto_kem_sntrup761_dec(unsigned char *k, const unsigned char *c, const unsigned char *sk) {
usr.bin/ssh/sntrup761.c
2139
ZDecrypt(r, c, sk);
usr.bin/ssh/sntrup761.c
2141
mask = Ciphertexts_diff_mask(c, cnew);
usr.bin/ssh/sntrup761.c
2143
HashSession(k, 1 + mask, r_enc, c);
usr.bin/ssh/ssh-keygen.c
1592
prepare_options_buf(struct sshbuf *c, int which)
usr.bin/ssh/ssh-keygen.c
1601
sshbuf_reset(c);
usr.bin/ssh/ssh-keygen.c
1610
if ((r = sshbuf_put_cstring(c, ext->key)) != 0 ||
usr.bin/ssh/ssh-keygen.c
1611
(r = sshbuf_put_string(c, NULL, 0)) != 0)
usr.bin/ssh/ssh-keygen.c
1617
if ((r = sshbuf_put_cstring(c, ext->key)) != 0 ||
usr.bin/ssh/ssh-keygen.c
1619
(r = sshbuf_put_stringb(c, b)) != 0)
usr.bin/ssh/ssh-keygen.c
566
int c;
usr.bin/ssh/ssh-keygen.c
570
while ((c = fgetc(fp)) != EOF) {
usr.bin/ssh/ssh-keygen.c
573
switch (c) {
usr.bin/ssh/ssh-keygen.c
575
c = fgetc(fp);
usr.bin/ssh/ssh-keygen.c
576
if (c != EOF && c != '\n' && ungetc(c, fp) == EOF)
usr.bin/ssh/ssh-keygen.c
582
line[pos++] = c;
usr.bin/ssh/ssh-keyscan.c
115
static void keyprint(con *c, struct sshkey *key);
usr.bin/ssh/ssh-keyscan.c
187
con *c;
usr.bin/ssh/ssh-keyscan.c
189
if ((c = ssh_get_app_data(ssh)) != NULL)
usr.bin/ssh/ssh-keyscan.c
190
keyprint(c, hostkey);
usr.bin/ssh/ssh-keyscan.c
212
keygrab_ssh2(con *c)
usr.bin/ssh/ssh-keyscan.c
217
switch (c->c_keytype) {
usr.bin/ssh/ssh-keyscan.c
256
fatal("unknown key type %d", c->c_keytype);
usr.bin/ssh/ssh-keyscan.c
259
if ((r = kex_setup(c->c_ssh, myproposal)) != 0) {
usr.bin/ssh/ssh-keyscan.c
260
free(c->c_ssh);
usr.bin/ssh/ssh-keyscan.c
265
c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
266
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
267
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
268
c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
269
c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
270
c->c_ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
usr.bin/ssh/ssh-keyscan.c
271
c->c_ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
usr.bin/ssh/ssh-keyscan.c
272
c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
274
c->c_ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
275
c->c_ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
276
c->c_ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
277
c->c_ssh->kex->kex[KEX_KEM_MLKEM768ECDH_SHA256] = kex_gen_client;
usr.bin/ssh/ssh-keyscan.c
278
ssh_set_verify_host_key_callback(c->c_ssh, key_print_wrapper);
usr.bin/ssh/ssh-keyscan.c
283
ssh_dispatch_run(c->c_ssh, DISPATCH_BLOCK, &c->c_done);
usr.bin/ssh/ssh-keyscan.c
314
keyprint(con *c, struct sshkey *key)
usr.bin/ssh/ssh-keyscan.c
316
char *hosts = c->c_output_name ? c->c_output_name : c->c_name;
usr.bin/ssh/ssh-keyscan.c
428
con *c = &fdcon[s];
usr.bin/ssh/ssh-keyscan.c
431
ret = conalloc(c->c_namelist, c->c_output_name, c->c_keytype);
usr.bin/ssh/ssh-keyscan.c
443
con *c = &fdcon[s];
usr.bin/ssh/ssh-keyscan.c
454
error("write (%s): %s", c->c_name, strerror(errno));
usr.bin/ssh/ssh-keyscan.c
484
error("%s: Connection closed by remote host", c->c_name);
usr.bin/ssh/ssh-keyscan.c
489
error("read (%s): %s", c->c_name, strerror(errno));
usr.bin/ssh/ssh-keyscan.c
496
error("%s: greeting exceeds allowable length", c->c_name);
usr.bin/ssh/ssh-keyscan.c
501
error("%s: bad greeting", c->c_name);
usr.bin/ssh/ssh-keyscan.c
506
if ((c->c_ssh = ssh_packet_set_connection(NULL, s, s)) == NULL)
usr.bin/ssh/ssh-keyscan.c
508
ssh_packet_set_timeout(c->c_ssh, timeout, 1);
usr.bin/ssh/ssh-keyscan.c
509
ssh_set_app_data(c->c_ssh, c); /* back link */
usr.bin/ssh/ssh-keyscan.c
510
c->c_ssh->compat = 0;
usr.bin/ssh/ssh-keyscan.c
513
compat_banner(c->c_ssh, remote_version);
usr.bin/ssh/ssh-keyscan.c
515
debug("%s doesn't support ssh2", c->c_name);
usr.bin/ssh/ssh-keyscan.c
521
c->c_name, ssh_port, chop(buf));
usr.bin/ssh/ssh-keyscan.c
523
keygrab_ssh2(c);
usr.bin/ssh/ssh-keyscan.c
530
con *c = &fdcon[s];
usr.bin/ssh/ssh-keyscan.c
532
if (c->c_status != CS_CON)
usr.bin/ssh/ssh-keyscan.c
533
fatal("conread: invalid status %d", c->c_status);
usr.bin/ssh/ssh-keyscan.c
542
con *c;
usr.bin/ssh/ssh-keyscan.c
546
c = TAILQ_FIRST(&tq);
usr.bin/ssh/ssh-keyscan.c
548
if (c && timespeccmp(&c->c_ts, &now, >))
usr.bin/ssh/ssh-keyscan.c
549
timespecsub(&c->c_ts, &now, &seltime);
usr.bin/ssh/ssh-keyscan.c
566
c = TAILQ_FIRST(&tq);
usr.bin/ssh/ssh-keyscan.c
567
while (c && timespeccmp(&c->c_ts, &now, <)) {
usr.bin/ssh/ssh-keyscan.c
568
int s = c->c_fd;
usr.bin/ssh/ssh-keyscan.c
570
c = TAILQ_NEXT(c, c_link);
usr.bin/ssh/ssh-pkcs11-client.c
177
u_char c, buf[1024];
usr.bin/ssh/ssh-pkcs11-client.c
203
if ((r = sshbuf_get_u8(m, &c)) != 0)
usr.bin/ssh/ssh-pkcs11-client.c
205
return c;
usr.bin/ssh/ssh-pkcs11.c
1691
h2i(char c)
usr.bin/ssh/ssh-pkcs11.c
1693
if (c >= '0' && c <= '9')
usr.bin/ssh/ssh-pkcs11.c
1694
return c - '0';
usr.bin/ssh/ssh-pkcs11.c
1695
else if (c >= 'a' && c <= 'f')
usr.bin/ssh/ssh-pkcs11.c
1696
return c - 'a' + 10;
usr.bin/ssh/ssh-pkcs11.c
1697
else if (c >= 'A' && c <= 'F')
usr.bin/ssh/ssh-pkcs11.c
1698
return c - 'A' + 10;
usr.bin/ssh/ssh.c
1986
Channel *c;
usr.bin/ssh/ssh.c
1998
if ((c = channel_connect_stdio_fwd(ssh, options.stdio_forward_host,
usr.bin/ssh/ssh.c
2002
channel_register_cleanup(ssh, c->self, client_cleanup_stdio_fwd, 0);
usr.bin/ssh/ssh.c
2003
channel_register_open_confirm(ssh, c->self, ssh_stdio_confirm, NULL);
usr.bin/ssh/ssh.c
2175
Channel *c;
usr.bin/ssh/ssh.c
2195
c = channel_new(ssh,
usr.bin/ssh/ssh.c
2200
channel_set_tty(ssh, c);
usr.bin/ssh/ssh.c
2201
debug3_f("channel_new: %d%s", c->self, tty_flag ? " (tty)" : "");
usr.bin/ssh/ssh.c
2203
channel_send_open(ssh, c->self);
usr.bin/ssh/ssh.c
2205
channel_register_open_confirm(ssh, c->self,
usr.bin/ssh/ssh.c
2208
return c->self;
usr.bin/ssh/ssh_api.c
340
u_char c;
usr.bin/ssh/ssh_api.c
351
c = s[j++];
usr.bin/ssh/ssh_api.c
352
if (c == '\r') {
usr.bin/ssh/ssh_api.c
356
if (c == '\n')
usr.bin/ssh/ssh_api.c
360
if ((r = sshbuf_put_u8(banner, c)) != 0)
usr.bin/ssh/sshconnect2.c
1672
struct sshbuf *c = NULL, *data = NULL;
usr.bin/ssh/sshconnect2.c
1676
if (oblob == NULL || (c = sshbuf_fromb(oblob)) == NULL)
usr.bin/ssh/sshconnect2.c
1678
while (sshbuf_len(c) > 0) {
usr.bin/ssh/sshconnect2.c
1683
if ((r = sshbuf_get_cstring(c, &name, NULL)) != 0 ||
usr.bin/ssh/sshconnect2.c
1684
(r = sshbuf_froms(c, &data)) != 0)
usr.bin/ssh/sshconnect2.c
1693
sshbuf_free(c);
usr.bin/ssh/sshd.c
1047
switch (read(children[i].pipefd, &c, sizeof(c))) {
usr.bin/ssh/sshd.c
1072
if (children[i].early && c == '\0') {
usr.bin/ssh/sshd.c
1079
} else if (!children[i].early && c == '\001') {
usr.bin/ssh/sshd.c
1088
(int)c, (long)children[i].pid,
usr.bin/ssh/sshd.c
902
char c = 0;
usr.bin/ssh/umac.c
334
UWORD c = dlen / 32;
usr.bin/ssh/umac.c
355
} while (--c);
usr.bin/ssh/umac.c
367
UWORD c = dlen / 32;
usr.bin/ssh/umac.c
401
} while (--c);
usr.bin/ssh/umac.c
414
UWORD c = dlen / 32;
usr.bin/ssh/umac.c
455
} while (--c);
usr.bin/ssh/umac.c
469
UWORD c = dlen / 32;
usr.bin/ssh/umac.c
518
} while (--c);
usr.bin/stat/stat.c
145
#define addchar(s, c, nl) \
usr.bin/stat/stat.c
147
(void)fputc((c), (s)); \
usr.bin/stat/stat.c
148
(*nl) = ((c) == '\n'); \
usr.bin/systat/cache.h
41
#define COUNTER(c) ((((u_int64_t) ntohl(c[0]))<<32) + ntohl(c[1]))
usr.bin/systat/cpu.c
252
int cur = 0, c, i;
usr.bin/systat/cpu.c
260
for (c = 0; c < cpu_count; c++) {
usr.bin/systat/cpu.c
261
states = cpu_states + (CPUSTATES * c);
usr.bin/systat/cpu.c
266
ADD_LINE_CPU(c, value);
usr.bin/systat/engine.c
1212
struct command * c = command_set(NULL, NULL);
usr.bin/systat/engine.c
1213
c->exec(cmdbuf);
usr.bin/systat/vmstat.c
319
#define PUTRATE(fld, l, c, w) \
usr.bin/systat/vmstat.c
322
putint((int)((float)s.fld/etime + 0.5), l, c, w); \
usr.bin/systat/vmstat.c
336
int i, l, c;
usr.bin/systat/vmstat.c
375
for (c = 0; c < nitems(cpuorder); c++) {
usr.bin/systat/vmstat.c
376
i = cpuorder[c];
usr.bin/systat/vmstat.c
382
putfloat(f1, GRAPHROW, GRAPHCOL + 1 + (10 * c), 5, 1, 0);
usr.bin/systat/vmstat.c
386
addch(cpuchar[c]);
usr.bin/systat/vmstat.c
440
for (i = 0, c = 0; i < cur.dk_ndrive && c < DRIVESPACE; i++)
usr.bin/systat/vmstat.c
441
if (cur.dk_select[i] && (c + strlen(dr_name[i])) < DRIVESPACE) {
usr.bin/systat/vmstat.c
443
mvprintw(DISKROW, DISKCOL + 5 + c,
usr.bin/systat/vmstat.c
445
c += 1 + l;
usr.bin/systat/vmstat.c
446
dinfo(i, c, etime);
usr.bin/systat/vmstat.c
449
l = DRIVESPACE - c;
usr.bin/systat/vmstat.c
451
mvprintw(DISKROW + i, DISKCOL + 5 + c, "%*s", l, "");
usr.bin/systat/vmstat.c
508
putint(int n, int l, int c, int w)
usr.bin/systat/vmstat.c
512
move(l, c);
usr.bin/systat/vmstat.c
528
putintmk(int n, int l, int c, int w)
usr.bin/systat/vmstat.c
532
move(l, c);
usr.bin/systat/vmstat.c
553
putuint64(u_int64_t n, int l, int c, int w)
usr.bin/systat/vmstat.c
557
move(l, c);
usr.bin/systat/vmstat.c
573
putfloat(double f, int l, int c, int w, int d, int nz)
usr.bin/systat/vmstat.c
577
move(l, c);
usr.bin/systat/vmstat.c
669
dinfo(int dn, int c, double etime)
usr.bin/systat/vmstat.c
673
c += DISKCOL;
usr.bin/systat/vmstat.c
682
putint((int)((float)cur.dk_seek[dn]/etime+0.5), DISKROW + 1, c, 5);
usr.bin/systat/vmstat.c
684
DISKROW + 2, c, 5);
usr.bin/systat/vmstat.c
685
putintmk((int)(words/etime + 0.5), DISKROW + 3, c, 5);
usr.bin/systat/vmstat.c
686
putfloat(atime/etime, DISKROW + 4, c, 5, 1, 1);
usr.bin/talk/display.c
103
c = readwin(win->x_win, win->x_line, xcol);
usr.bin/talk/display.c
104
if (c != ' ')
usr.bin/talk/display.c
109
c = readwin(win->x_win, win->x_line, xcol);
usr.bin/talk/display.c
110
if (c == ' ')
usr.bin/talk/display.c
164
int c;
usr.bin/talk/display.c
168
c = winch(win);
usr.bin/talk/display.c
170
return (c);
usr.bin/talk/display.c
98
int endcol, xcol, i, c;
usr.bin/telnet/commands.c
102
} else if (c == '\'') {
usr.bin/telnet/commands.c
105
} else if (isspace((unsigned char)c))
usr.bin/telnet/commands.c
108
*cp2++ = c;
usr.bin/telnet/commands.c
111
if (c == '\0')
usr.bin/telnet/commands.c
1262
struct slclist *c;
usr.bin/telnet/commands.c
1264
for (c = SlcList; c->name; c++) {
usr.bin/telnet/commands.c
1265
if (c->help) {
usr.bin/telnet/commands.c
1266
if (*c->help)
usr.bin/telnet/commands.c
1267
printf("%-15s %s\r\n", c->name, c->help);
usr.bin/telnet/commands.c
128
char c;
usr.bin/telnet/commands.c
1284
struct slclist *c;
usr.bin/telnet/commands.c
1291
c = getslc(argv[1]);
usr.bin/telnet/commands.c
1292
if (c == 0) {
usr.bin/telnet/commands.c
1297
if (Ambiguous(c)) {
usr.bin/telnet/commands.c
1302
(*c->handler)(c->arg);
usr.bin/telnet/commands.c
1346
struct envlist *c;
usr.bin/telnet/commands.c
1348
for (c = EnvList; c->name; c++) {
usr.bin/telnet/commands.c
1349
if (c->help) {
usr.bin/telnet/commands.c
135
c = b | 0x40; /* DEL */
usr.bin/telnet/commands.c
1350
if (*c->help)
usr.bin/telnet/commands.c
1351
printf("%-15s %s\r\n", c->name, c->help);
usr.bin/telnet/commands.c
1368
struct envlist *c;
usr.bin/telnet/commands.c
137
c = b & 0x1f;
usr.bin/telnet/commands.c
1375
c = getenvcmd(argv[1]);
usr.bin/telnet/commands.c
1376
if (c == 0) {
usr.bin/telnet/commands.c
1381
if (Ambiguous(c)) {
usr.bin/telnet/commands.c
1386
if (c->narg + 2 != argc) {
usr.bin/telnet/commands.c
1389
c->narg < argc + 2 ? "only " : "",
usr.bin/telnet/commands.c
1390
c->narg, c->narg == 1 ? "" : "s", c->name);
usr.bin/telnet/commands.c
1393
(*c->handler)(argv[2], argv[3]);
usr.bin/telnet/commands.c
141
c = *s;
usr.bin/telnet/commands.c
144
return c;
usr.bin/telnet/commands.c
152
control(cc_t c)
usr.bin/telnet/commands.c
162
unsigned int uic = (unsigned int)c;
usr.bin/telnet/commands.c
1654
Command *c;
usr.bin/telnet/commands.c
166
if (c == (cc_t)_POSIX_VDISABLE) {
usr.bin/telnet/commands.c
171
buf[1] = ((c>>6)&07) + '0';
usr.bin/telnet/commands.c
1710
c = getcmd(margv[0]);
usr.bin/telnet/commands.c
1711
if (Ambiguous(c)) {
usr.bin/telnet/commands.c
1715
if (c == 0) {
usr.bin/telnet/commands.c
172
buf[2] = ((c>>3)&07) + '0';
usr.bin/telnet/commands.c
1722
if (c->needconnect && !connected) {
usr.bin/telnet/commands.c
1726
(*c->handler)(margc, margv);
usr.bin/telnet/commands.c
173
buf[3] = (c&07) + '0';
usr.bin/telnet/commands.c
176
buf[0] = c;
usr.bin/telnet/commands.c
180
buf[1] = '@'+c;
usr.bin/telnet/commands.c
1987
Command *c;
usr.bin/telnet/commands.c
2027
c = getcmd(margv[0]);
usr.bin/telnet/commands.c
2028
if (Ambiguous(c)) {
usr.bin/telnet/commands.c
2032
if (c == 0) {
usr.bin/telnet/commands.c
2036
if (c->needconnect && !connected) {
usr.bin/telnet/commands.c
2040
if ((*c->handler)(margc, margv)) {
usr.bin/telnet/commands.c
2057
Command *c;
usr.bin/telnet/commands.c
2061
for (c = cmdtab; c->name; c++)
usr.bin/telnet/commands.c
2062
if (c->help) {
usr.bin/telnet/commands.c
2063
printf("%-*s\t%s\r\n", (int)HELPINDENT, c->name,
usr.bin/telnet/commands.c
2064
c->help);
usr.bin/telnet/commands.c
2071
c = getcmd(arg);
usr.bin/telnet/commands.c
2072
if (Ambiguous(c))
usr.bin/telnet/commands.c
2074
else if (c == NULL)
usr.bin/telnet/commands.c
2077
printf("%s\r\n", c->help);
usr.bin/telnet/commands.c
630
struct togglelist *c;
usr.bin/telnet/commands.c
632
for (c = Togglelist; c->name; c++) {
usr.bin/telnet/commands.c
633
if (c->help) {
usr.bin/telnet/commands.c
634
if (*c->help)
usr.bin/telnet/commands.c
635
printf("%-15s toggle %s\r\n", c->name, c->help);
usr.bin/telnet/commands.c
648
struct togglelist *c;
usr.bin/telnet/commands.c
650
for (c = Togglelist; c->name; c++) {
usr.bin/telnet/commands.c
651
if (c->help) {
usr.bin/telnet/commands.c
652
if (*c->help)
usr.bin/telnet/commands.c
653
printf("%-15s %s %s\r\n", c->name, set ? "enable" : "disable",
usr.bin/telnet/commands.c
654
c->help);
usr.bin/telnet/commands.c
669
struct togglelist *c;
usr.bin/telnet/commands.c
680
c = GETTOGGLE(name);
usr.bin/telnet/commands.c
681
if (Ambiguous(c)) {
usr.bin/telnet/commands.c
685
} else if (c == 0) {
usr.bin/telnet/commands.c
689
} else if (!connected && c->needconnect) {
usr.bin/telnet/commands.c
694
if (c->variable) {
usr.bin/telnet/commands.c
695
*c->variable = !*c->variable; /* invert it */
usr.bin/telnet/commands.c
696
if (c->actionexplanation) {
usr.bin/telnet/commands.c
697
printf("%s %s.\r\n", *c->variable? "Will" : "Won't",
usr.bin/telnet/commands.c
698
c->actionexplanation);
usr.bin/telnet/commands.c
70
char *cp, *cp2, c;
usr.bin/telnet/commands.c
701
if (c->handler) {
usr.bin/telnet/commands.c
702
retval &= (*c->handler)(-1);
usr.bin/telnet/commands.c
76
while ((c = *cp)) {
usr.bin/telnet/commands.c
775
struct togglelist *c;
usr.bin/telnet/commands.c
792
c = GETTOGGLE(argv[1]);
usr.bin/telnet/commands.c
793
if (c == 0) {
usr.bin/telnet/commands.c
797
} else if (Ambiguous(c)) {
usr.bin/telnet/commands.c
801
} else if (!connected && c->needconnect) {
usr.bin/telnet/commands.c
807
if (c->variable) {
usr.bin/telnet/commands.c
809
*c->variable = 1;
usr.bin/telnet/commands.c
811
*c->variable = 0;
usr.bin/telnet/commands.c
816
if (c->actionexplanation) {
usr.bin/telnet/commands.c
817
printf("%s %s.\r\n", *c->variable? "Will" : "Won't",
usr.bin/telnet/commands.c
818
c->actionexplanation);
usr.bin/telnet/commands.c
821
if (c->handler)
usr.bin/telnet/commands.c
822
(*c->handler)(1);
usr.bin/telnet/commands.c
83
while (isspace((unsigned char)c))
usr.bin/telnet/commands.c
84
c = *++cp;
usr.bin/telnet/commands.c
85
if (c == '\0')
usr.bin/telnet/commands.c
850
struct togglelist *c;
usr.bin/telnet/commands.c
873
c = GETTOGGLE(name);
usr.bin/telnet/commands.c
874
if (c == 0) {
usr.bin/telnet/commands.c
878
} else if (Ambiguous(c)) {
usr.bin/telnet/commands.c
883
if (c->variable) {
usr.bin/telnet/commands.c
884
*c->variable = 0;
usr.bin/telnet/commands.c
885
if (c->actionexplanation) {
usr.bin/telnet/commands.c
886
printf("%s %s.\r\n", *c->variable? "Will" : "Won't",
usr.bin/telnet/commands.c
887
c->actionexplanation);
usr.bin/telnet/commands.c
89
for (cp2 = cp; c != '\0'; c = *++cp) {
usr.bin/telnet/commands.c
890
if (c->handler)
usr.bin/telnet/commands.c
891
(*c->handler)(0);
usr.bin/telnet/commands.c
91
if (c == inquote) {
usr.bin/telnet/commands.c
951
unsigned char c;
usr.bin/telnet/commands.c
96
if (c == '\\') {
usr.bin/telnet/commands.c
960
c = (linemode | bit);
usr.bin/telnet/commands.c
962
c = (linemode & ~bit);
usr.bin/telnet/commands.c
963
lm_mode(&c, 1, 1);
usr.bin/telnet/commands.c
97
if ((c = *++cp) == '\0')
usr.bin/telnet/commands.c
99
} else if (c == '"') {
usr.bin/telnet/defines.h
46
#define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); }
usr.bin/telnet/defines.h
51
#define TTYADD(c) if (!(SYNCHing||flushout)) { \
usr.bin/telnet/defines.h
52
*ttyoring.supply = c; \
usr.bin/telnet/externs.h
184
int TerminalSpecialChars(int c);
usr.bin/telnet/genget.c
70
char **c, **found;
usr.bin/telnet/genget.c
77
for (c = table; *c != NULL; c = (char **)((char *)c + stlen)) {
usr.bin/telnet/genget.c
78
if ((n = isprefix(name, *c)) == 0)
usr.bin/telnet/genget.c
81
return(c);
usr.bin/telnet/genget.c
84
found = c;
usr.bin/telnet/ring.c
51
#define ring_increment(d,a,c) (((a)+(c) < (d)->top)? \
usr.bin/telnet/ring.c
52
(a)+(c) : (((a)+(c))-(d)->size))
usr.bin/telnet/ring.c
54
#define ring_decrement(d,a,c) (((a)-(c) >= (d)->bottom)? \
usr.bin/telnet/ring.c
55
(a)-(c) : (((a)-(c))-(d)->size))
usr.bin/telnet/sys_bsd.c
102
} else if (c == termSuspChar) {
usr.bin/telnet/sys_bsd.c
105
} else if (c == termFlushChar) {
usr.bin/telnet/sys_bsd.c
109
if (c == termKillChar) {
usr.bin/telnet/sys_bsd.c
112
} else if (c == termEraseChar) {
usr.bin/telnet/sys_bsd.c
495
int c;
usr.bin/telnet/sys_bsd.c
529
if ((c = poll(pfd, TELNET_FD_NUM, dopoll ? 0 : INFTIM)) == -1) {
usr.bin/telnet/sys_bsd.c
548
c = recv(net, netiring.supply, canread, 0);
usr.bin/telnet/sys_bsd.c
549
if (c == -1 && errno == EWOULDBLOCK) {
usr.bin/telnet/sys_bsd.c
550
c = 0;
usr.bin/telnet/sys_bsd.c
551
} else if (c <= 0) {
usr.bin/telnet/sys_bsd.c
555
Dump('<', netiring.supply, c);
usr.bin/telnet/sys_bsd.c
557
if (c)
usr.bin/telnet/sys_bsd.c
558
ring_supplied(&netiring, c);
usr.bin/telnet/sys_bsd.c
566
c = read(tin, ttyiring.supply, ring_empty_consecutive(&ttyiring));
usr.bin/telnet/sys_bsd.c
567
if (c == -1 && errno == EIO)
usr.bin/telnet/sys_bsd.c
568
c = 0;
usr.bin/telnet/sys_bsd.c
569
if (c == -1 && errno == EWOULDBLOCK) {
usr.bin/telnet/sys_bsd.c
570
c = 0;
usr.bin/telnet/sys_bsd.c
573
if ((c == 0) && MODE_LOCAL_CHARS(globalmode) && isatty(tin)) {
usr.bin/telnet/sys_bsd.c
576
c = 1;
usr.bin/telnet/sys_bsd.c
578
if (c <= 0) {
usr.bin/telnet/sys_bsd.c
582
Dump('<', ttyiring.supply, c);
usr.bin/telnet/sys_bsd.c
584
ring_supplied(&ttyiring, c);
usr.bin/telnet/sys_bsd.c
83
TerminalSpecialChars(int c)
usr.bin/telnet/sys_bsd.c
85
if (c == termIntChar) {
usr.bin/telnet/sys_bsd.c
88
} else if (c == termQuitChar) {
usr.bin/telnet/sys_bsd.c
96
} else if (c == termEofChar) {
usr.bin/telnet/telnet.c
1302
char *vp, c;
usr.bin/telnet/telnet.c
1347
while ((c = *ep++)) {
usr.bin/telnet/telnet.c
1348
switch(c&0xff) {
usr.bin/telnet/telnet.c
1359
opt_add(c);
usr.bin/telnet/telnet.c
1408
int c;
usr.bin/telnet/telnet.c
1431
c = *sbp++ & 0xff, scc--; count++;
usr.bin/telnet/telnet.c
1437
if (c == '\0') {
usr.bin/telnet/telnet.c
1440
else if ((c == '\n') && my_want_state_is_dont(TELOPT_ECHO) && !crmod) {
usr.bin/telnet/telnet.c
1441
TTYADD(c);
usr.bin/telnet/telnet.c
1447
if (c == IAC) {
usr.bin/telnet/telnet.c
1458
if ((c == '\r') && my_want_state_is_dont(TELOPT_BINARY)) {
usr.bin/telnet/telnet.c
1460
c = *sbp&0xff;
usr.bin/telnet/telnet.c
1461
if (c == 0) {
usr.bin/telnet/telnet.c
1466
(c == '\n')) {
usr.bin/telnet/telnet.c
1483
TTYADD(c);
usr.bin/telnet/telnet.c
1489
switch (c) {
usr.bin/telnet/telnet.c
1531
printoption("RCVD", IAC, c);
usr.bin/telnet/telnet.c
1538
printoption("RCVD", WILL, c);
usr.bin/telnet/telnet.c
1539
willoption(c);
usr.bin/telnet/telnet.c
1544
printoption("RCVD", WONT, c);
usr.bin/telnet/telnet.c
1545
wontoption(c);
usr.bin/telnet/telnet.c
1550
printoption("RCVD", DO, c);
usr.bin/telnet/telnet.c
1551
dooption(c);
usr.bin/telnet/telnet.c
1552
if (c == TELOPT_NAWS) {
usr.bin/telnet/telnet.c
1554
} else if (c == TELOPT_LFLOW) {
usr.bin/telnet/telnet.c
1563
printoption("RCVD", DONT, c);
usr.bin/telnet/telnet.c
1564
dontoption(c);
usr.bin/telnet/telnet.c
1571
if (c == IAC) {
usr.bin/telnet/telnet.c
1574
SB_ACCUM(c);
usr.bin/telnet/telnet.c
1579
if (c != SE) {
usr.bin/telnet/telnet.c
1580
if (c != IAC) {
usr.bin/telnet/telnet.c
1594
SB_ACCUM(c);
usr.bin/telnet/telnet.c
1598
printoption("In SUBOPTION processing, RCVD", IAC, c);
usr.bin/telnet/telnet.c
1603
SB_ACCUM(c);
usr.bin/telnet/telnet.c
1646
int c;
usr.bin/telnet/telnet.c
1660
c = *tbp++ & 0xff, sc = strip(c), tcc--; count++;
usr.bin/telnet/telnet.c
1670
if (sc == '.' || c == termEofChar) {
usr.bin/telnet/telnet.c
1692
c = sc = rlogin;
usr.bin/telnet/telnet.c
1736
switch (c) {
usr.bin/telnet/telnet.c
1761
NETADD(c);
usr.bin/telnet/telnet.c
1764
} else if (c == IAC) {
usr.bin/telnet/telnet.c
1767
NETADD(c);
usr.bin/telnet/telnet.c
186
send_do(int c, int init)
usr.bin/telnet/telnet.c
189
if (((do_dont_resp[c] == 0) && my_state_is_do(c)) ||
usr.bin/telnet/telnet.c
190
my_want_state_is_do(c))
usr.bin/telnet/telnet.c
192
set_my_want_state_do(c);
usr.bin/telnet/telnet.c
193
do_dont_resp[c]++;
usr.bin/telnet/telnet.c
196
NETADD(c);
usr.bin/telnet/telnet.c
197
printoption("SENT",DO, c);
usr.bin/telnet/telnet.c
201
send_dont(int c, int init)
usr.bin/telnet/telnet.c
204
if (((do_dont_resp[c] == 0) && my_state_is_dont(c)) ||
usr.bin/telnet/telnet.c
205
my_want_state_is_dont(c))
usr.bin/telnet/telnet.c
207
set_my_want_state_dont(c);
usr.bin/telnet/telnet.c
208
do_dont_resp[c]++;
usr.bin/telnet/telnet.c
211
NETADD(c);
usr.bin/telnet/telnet.c
212
printoption("SENT", DONT, c);
usr.bin/telnet/telnet.c
216
send_will(int c, int init)
usr.bin/telnet/telnet.c
219
if (((will_wont_resp[c] == 0) && my_state_is_will(c)) ||
usr.bin/telnet/telnet.c
220
my_want_state_is_will(c))
usr.bin/telnet/telnet.c
222
set_my_want_state_will(c);
usr.bin/telnet/telnet.c
223
will_wont_resp[c]++;
usr.bin/telnet/telnet.c
226
NETADD(c);
usr.bin/telnet/telnet.c
227
printoption("SENT", WILL, c);
usr.bin/telnet/telnet.c
231
send_wont(int c, int init)
usr.bin/telnet/telnet.c
234
if (((will_wont_resp[c] == 0) && my_state_is_wont(c)) ||
usr.bin/telnet/telnet.c
235
my_want_state_is_wont(c))
usr.bin/telnet/telnet.c
237
set_my_want_state_wont(c);
usr.bin/telnet/telnet.c
238
will_wont_resp[c]++;
usr.bin/telnet/telnet.c
241
NETADD(c);
usr.bin/telnet/telnet.c
242
printoption("SENT", WONT, c);
usr.bin/telnet/telnet.c
475
char c, *cp, **argvp, *cp2, **argv, **avt;
usr.bin/telnet/telnet.c
49
#define SB_ACCUM(c) if (subpointer < (subbuffer+sizeof subbuffer)) { \
usr.bin/telnet/telnet.c
50
*subpointer++ = (c); \
usr.bin/telnet/telnet.c
507
for (cp = cp2 = buf; (c = *cp); cp++) {
usr.bin/telnet/telnet.c
508
if (c == '|' || c == ':') {
usr.bin/telnet/telnet.c
523
if (c == ':')
usr.bin/telnet/telnet.c
530
while ((c = *cp) == '|')
usr.bin/telnet/telnet.c
539
#define ISASCII(c) (!((c)&0x80))
usr.bin/telnet/telnet.c
540
if ((c == ' ') || !ISASCII(c))
usr.bin/telnet/telnet.c
543
*cp = toupper((unsigned char)c);
usr.bin/telnet/utilities.c
59
int c;
usr.bin/telnet/utilities.c
61
while ((c = *argument) != '\0')
usr.bin/telnet/utilities.c
62
*argument++ = toupper((unsigned char)c);
usr.bin/tftp/main.c
581
struct cmd *c;
usr.bin/tftp/main.c
594
c = getcmd(margv[0]);
usr.bin/tftp/main.c
595
if (c == (struct cmd *) - 1) {
usr.bin/tftp/main.c
599
if (c == 0) {
usr.bin/tftp/main.c
603
(*c->handler)(margc, margv);
usr.bin/tftp/main.c
611
struct cmd *c, *found;
usr.bin/tftp/main.c
618
for (c = cmdtab; (p = c->name) != NULL; c++) {
usr.bin/tftp/main.c
621
return (c);
usr.bin/tftp/main.c
626
found = c;
usr.bin/tftp/main.c
683
struct cmd *c;
usr.bin/tftp/main.c
687
for (c = cmdtab; c->name != NULL; c++)
usr.bin/tftp/main.c
688
printf("%-*s\t%s\n", (int)HELPINDENT, c->name, c->help);
usr.bin/tftp/main.c
694
c = getcmd(arg);
usr.bin/tftp/main.c
695
if (c == (struct cmd *) - 1)
usr.bin/tftp/main.c
697
else if (c == NULL)
usr.bin/tftp/main.c
700
printf("%s\n", c->help);
usr.bin/tftp/tftpsubs.c
134
int c;
usr.bin/tftp/tftpsubs.c
154
c = '\n'; /* lf to cr, lf */
usr.bin/tftp/tftpsubs.c
156
c = '\0'; /* cr to cr, nul */
usr.bin/tftp/tftpsubs.c
159
c = getc(file);
usr.bin/tftp/tftpsubs.c
160
if (c == EOF)
usr.bin/tftp/tftpsubs.c
162
if (c == '\n' || c == '\r') {
usr.bin/tftp/tftpsubs.c
163
prevchar = c;
usr.bin/tftp/tftpsubs.c
164
c = '\r';
usr.bin/tftp/tftpsubs.c
168
*p++ = c;
usr.bin/tftp/tftpsubs.c
205
int c; /* current character */
usr.bin/tftp/tftpsubs.c
228
c = *p++; /* pick up a character */
usr.bin/tftp/tftpsubs.c
230
if (c == '\n') /* if have cr,lf then just */
usr.bin/tftp/tftpsubs.c
233
else if (c == '\0') /* if have cr,nul then */
usr.bin/tftp/tftpsubs.c
237
putc(c, file);
usr.bin/tftp/tftpsubs.c
239
prevchar = c;
usr.bin/tic/clear_cmd.c
44
putch(int c)
usr.bin/tic/clear_cmd.c
46
return putchar(c);
usr.bin/tic/dump_entry.c
1403
#define isLine(c) (strchr("lmkjtuvwqxn", c) != 0)
usr.bin/tic/progs.priv.h
227
# define isascii(c) (UChar(c) <= 127)
usr.bin/tic/progs.priv.h
229
# define isascii(c) 1 /* not really ascii anyway */
usr.bin/tic/progs.priv.h
233
#define UChar(c) ((unsigned char)(c))
usr.bin/tic/reset_cmd.c
120
out_char(int c)
usr.bin/tic/reset_cmd.c
122
return putc(c, my_file);
usr.bin/tic/reset_cmd.c
470
int c;
usr.bin/tic/reset_cmd.c
477
for (c = init_tabs; c < wide; c += init_tabs) {
usr.bin/tic/tic.c
1074
int c, oldc = '\0';
usr.bin/tic/tic.c
1079
while ((c = fgetc(tmp_fp)) != EOF) {
usr.bin/tic/tic.c
1081
if (c == '#') {
usr.bin/tic/tic.c
1089
&& (in_comment || (oldc == '\n' && c == '\n')))
usr.bin/tic/tic.c
1090
putchar(c);
usr.bin/tic/tic.c
1091
oldc = c;
usr.bin/tic/tic.c
305
put_translate(int c)
usr.bin/tic/tic.c
322
if (c == '\n' || c == '@') {
usr.bin/tic/tic.c
326
putchar(c);
usr.bin/tic/tic.c
328
} else if (c != '>') {
usr.bin/tic/tic.c
329
namebuf[used++] = (char) c;
usr.bin/tic/tic.c
360
if (c == '<') {
usr.bin/tic/tic.c
363
putchar(c);
usr.bin/tmux/alerts.c
296
struct client *c;
usr.bin/tmux/alerts.c
310
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/alerts.c
311
if (c->session != wl->session || c->flags & CLIENT_CONTROL)
usr.bin/tmux/alerts.c
315
tty_putcode(&c->tty, TTYC_BEL);
usr.bin/tmux/alerts.c
318
if (c->session->curw == wl) {
usr.bin/tmux/alerts.c
319
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/alerts.c
322
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/arguments.c
812
state->pi.c = tc;
usr.bin/tmux/arguments.c
813
if (state->pi.c != NULL)
usr.bin/tmux/arguments.c
814
state->pi.c->references++;
usr.bin/tmux/arguments.c
864
if (state->pi.c != NULL)
usr.bin/tmux/arguments.c
865
server_client_unref(state->pi.c);
usr.bin/tmux/cfg.c
122
pi.c = c;
usr.bin/tmux/cfg.c
157
struct client *c, struct cmdq_item *item, struct cmd_find_state *current,
usr.bin/tmux/cfg.c
175
pi.c = c;
usr.bin/tmux/cfg.c
225
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cfg.c
231
if (c != NULL && (c->flags & CLIENT_CONTROL))
usr.bin/tmux/cfg.c
232
control_notify_write(c, "%%config-error %s", cause);
usr.bin/tmux/cfg.c
246
struct client *c = TAILQ_FIRST(&clients);
usr.bin/tmux/cfg.c
255
if (c != NULL && (c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/cfg.c
258
control_notify_write(c, "%%config-error %s", cause);
usr.bin/tmux/cfg.c
265
if (c != NULL && c->session != NULL)
usr.bin/tmux/cfg.c
266
s = c->session;
usr.bin/tmux/cfg.c
68
struct client *c;
usr.bin/tmux/cfg.c
82
cfg_client = c = TAILQ_FIRST(&clients);
usr.bin/tmux/cfg.c
83
if (c != NULL) {
usr.bin/tmux/cfg.c
85
cmdq_append(c, cfg_item);
usr.bin/tmux/cfg.c
91
load_cfg(cfg_files[i], c, NULL, NULL, flags, NULL);
usr.bin/tmux/cfg.c
97
load_cfg(const char *path, struct client *c, struct cmdq_item *item,
usr.bin/tmux/client.c
560
client_file_check_cb(__unused struct client *c, __unused const char *path,
usr.bin/tmux/cmd-attach-session.c
104
cwd = format_single(item, cflag, c, s, wl, wp);
usr.bin/tmux/cmd-attach-session.c
109
server_client_set_flags(c, fflag);
usr.bin/tmux/cmd-attach-session.c
111
if (c->flags & CLIENT_READONLY) {
usr.bin/tmux/cmd-attach-session.c
112
uid = proc_get_peer_uid(c->peer);
usr.bin/tmux/cmd-attach-session.c
118
c->flags |= (CLIENT_READONLY|CLIENT_IGNORESIZE);
usr.bin/tmux/cmd-attach-session.c
121
c->last_session = c->session;
usr.bin/tmux/cmd-attach-session.c
122
if (c->session != NULL) {
usr.bin/tmux/cmd-attach-session.c
129
if (c_loop->session != s || c == c_loop)
usr.bin/tmux/cmd-attach-session.c
135
environ_update(s->options, c->environ, s->environ);
usr.bin/tmux/cmd-attach-session.c
137
server_client_set_session(c, s);
usr.bin/tmux/cmd-attach-session.c
139
server_client_set_key_table(c, NULL);
usr.bin/tmux/cmd-attach-session.c
141
if (server_client_open(c, &cause) != 0) {
usr.bin/tmux/cmd-attach-session.c
153
if (c_loop->session != s || c == c_loop)
usr.bin/tmux/cmd-attach-session.c
159
environ_update(s->options, c->environ, s->environ);
usr.bin/tmux/cmd-attach-session.c
161
server_client_set_session(c, s);
usr.bin/tmux/cmd-attach-session.c
162
server_client_set_key_table(c, NULL);
usr.bin/tmux/cmd-attach-session.c
164
if (~c->flags & CLIENT_CONTROL)
usr.bin/tmux/cmd-attach-session.c
165
proc_send(c->peer, MSG_READY, -1, NULL, 0);
usr.bin/tmux/cmd-attach-session.c
166
events_fire_client("client-attached", c);
usr.bin/tmux/cmd-attach-session.c
167
c->flags |= CLIENT_ATTACHED;
usr.bin/tmux/cmd-attach-session.c
58
struct client *c = cmdq_get_client(item), *c_loop;
usr.bin/tmux/cmd-attach-session.c
71
if (c == NULL)
usr.bin/tmux/cmd-attach-session.c
74
if (server_client_check_nested(c)) {
usr.bin/tmux/cmd-capture-pane.c
413
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-capture-pane.c
441
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/cmd-capture-pane.c
442
control_write(c, "%.*s", (int)len, buf);
usr.bin/tmux/cmd-capture-pane.c
444
if (!file_can_print(c)) {
usr.bin/tmux/cmd-capture-pane.c
449
file_print_buffer(c, buf, len);
usr.bin/tmux/cmd-capture-pane.c
450
file_print(c, "\n");
usr.bin/tmux/cmd-capture-pane.c
86
char c[UTF8_SIZE + 1];
usr.bin/tmux/cmd-capture-pane.c
92
memcpy(c, gc.data.data, gc.data.size);
usr.bin/tmux/cmd-capture-pane.c
93
c[gc.data.size] = '\0';
usr.bin/tmux/cmd-capture-pane.c
94
utf8_stravis(&data, c, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
usr.bin/tmux/cmd-command-prompt.c
198
cmd_command_prompt_callback(struct client *c, void *data, const char *s,
usr.bin/tmux/cmd-command-prompt.c
222
status_prompt_update(c, prompt->prompt,
usr.bin/tmux/cmd-command-prompt.c
240
cmdq_append(c, cmdq_get_error(error));
usr.bin/tmux/cmd-command-prompt.c
244
cmdq_append(c, new_item);
usr.bin/tmux/cmd-confirm-before.c
122
cmd_confirm_before_callback(struct client *c, void *data, const char *s,
usr.bin/tmux/cmd-confirm-before.c
129
if (c->flags & CLIENT_DEAD)
usr.bin/tmux/cmd-confirm-before.c
140
cmdq_append(c, new_item);
usr.bin/tmux/cmd-copy-mode.c
106
tty_window_offset(&c->tty, &tty_ox, &tty_oy, &tty_sx, &tty_sy);
usr.bin/tmux/cmd-copy-mode.c
107
window_copy_scroll(wp, c->tty.mouse_slider_mpos, event->m.y,
usr.bin/tmux/cmd-copy-mode.c
63
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-copy-mode.c
77
if (c == NULL || c->session != s)
usr.bin/tmux/cmd-copy-mode.c
98
window_copy_start_drag(c, &event->m);
usr.bin/tmux/cmd-detach-client.c
62
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-detach-client.c
73
if (c->flags & CLIENT_READONLY) {
usr.bin/tmux/cmd-detach-client.c
74
if (args_has(args, 's') || args_has(args, 'a') || c != tc) {
usr.bin/tmux/cmd-display-message.c
120
c = tc;
usr.bin/tmux/cmd-display-message.c
122
c = cmd_find_best_client(s);
usr.bin/tmux/cmd-display-message.c
124
c = NULL;
usr.bin/tmux/cmd-display-message.c
130
format_defaults(ft, c, s, wl, wp);
usr.bin/tmux/cmd-display-message.c
65
struct client *tc = cmdq_get_target_client(item), *c;
usr.bin/tmux/cmd-find.c
1014
c = cmdq_get_client(item);
usr.bin/tmux/cmd-find.c
1015
if (c == NULL || c->session == NULL) {
usr.bin/tmux/cmd-find.c
1019
fs->wl = c->session->curw;
usr.bin/tmux/cmd-find.c
1020
fs->wp = c->session->curw->window->active;
usr.bin/tmux/cmd-find.c
1021
fs->w = c->session->curw->window;
usr.bin/tmux/cmd-find.c
105
cmd_find_client_better(struct client *c, struct client *than)
usr.bin/tmux/cmd-find.c
109
return (timercmp(&c->activity_time, &than->activity_time, >));
usr.bin/tmux/cmd-find.c
116
struct client *c_loop, *c;
usr.bin/tmux/cmd-find.c
121
c = NULL;
usr.bin/tmux/cmd-find.c
127
if (cmd_find_client_better(c_loop, c))
usr.bin/tmux/cmd-find.c
1277
struct client *c = NULL, *found;
usr.bin/tmux/cmd-find.c
128
c = c_loop;
usr.bin/tmux/cmd-find.c
1283
c = cmdq_get_client(item);
usr.bin/tmux/cmd-find.c
1284
if (c != NULL && c->session != NULL)
usr.bin/tmux/cmd-find.c
1285
return (c);
usr.bin/tmux/cmd-find.c
1288
if (c != NULL && (wp = cmd_find_inside_pane(c)) != NULL) {
usr.bin/tmux/cmd-find.c
130
return (c);
usr.bin/tmux/cmd-find.c
1308
struct client *c;
usr.bin/tmux/cmd-find.c
1323
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/cmd-find.c
1324
if (c->session == NULL)
usr.bin/tmux/cmd-find.c
1326
if (strcmp(copy, c->name) == 0)
usr.bin/tmux/cmd-find.c
1329
if (*c->ttyname == '\0')
usr.bin/tmux/cmd-find.c
1331
if (strcmp(copy, c->ttyname) == 0)
usr.bin/tmux/cmd-find.c
1333
if (strncmp(c->ttyname, _PATH_DEV, (sizeof _PATH_DEV) - 1) != 0)
usr.bin/tmux/cmd-find.c
1335
if (strcmp(copy, c->ttyname + (sizeof _PATH_DEV) - 1) == 0)
usr.bin/tmux/cmd-find.c
1340
if (c == NULL && !quiet)
usr.bin/tmux/cmd-find.c
1344
log_debug("%s: target %s, return %p", __func__, target, c);
usr.bin/tmux/cmd-find.c
1345
return (c);
usr.bin/tmux/cmd-find.c
268
struct client *c;
usr.bin/tmux/cmd-find.c
286
c = cmd_find_client(NULL, session, 1);
usr.bin/tmux/cmd-find.c
287
if (c != NULL && c->session != NULL) {
usr.bin/tmux/cmd-find.c
288
fs->s = c->session;
usr.bin/tmux/cmd-find.c
81
cmd_find_inside_pane(struct client *c)
usr.bin/tmux/cmd-find.c
86
if (c == NULL)
usr.bin/tmux/cmd-find.c
876
cmd_find_from_client(struct cmd_find_state *fs, struct client *c, int flags)
usr.bin/tmux/cmd-find.c
881
if (c == NULL)
usr.bin/tmux/cmd-find.c
885
if (c->session != NULL) {
usr.bin/tmux/cmd-find.c
888
fs->wp = c->session->curw->window->active;
usr.bin/tmux/cmd-find.c
890
cmd_find_from_session(fs, c->session, flags);
usr.bin/tmux/cmd-find.c
893
fs->s = c->session;
usr.bin/tmux/cmd-find.c
90
if (wp->fd != -1 && strcmp(wp->tty, c->ttyname) == 0)
usr.bin/tmux/cmd-find.c
906
wp = cmd_find_inside_pane(c);
usr.bin/tmux/cmd-find.c
94
envent = environ_find(c->environ, "TMUX_PANE");
usr.bin/tmux/cmd-find.c
944
struct client *c;
usr.bin/tmux/cmd-if-shell.c
141
struct client *c = cdata->client;
usr.bin/tmux/cmd-if-shell.c
160
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/cmd-if-shell.c
166
cmdq_append(c, new_item);
usr.bin/tmux/cmd-join-pane.c
273
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-join-pane.c
282
if (wp == NULL || c == NULL || c->session != s)
usr.bin/tmux/cmd-join-pane.c
291
c->tty.mouse_drag_update = cmd_join_pane_mouse_move;
usr.bin/tmux/cmd-join-pane.c
292
cmd_join_pane_mouse_move(c, &event->m);
usr.bin/tmux/cmd-join-pane.c
297
cmd_join_pane_mouse_move(struct client *c, struct mouse_event *m)
usr.bin/tmux/cmd-join-pane.c
307
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/cmd-load-buffer.c
54
cmd_load_buffer_done(__unused struct client *c, const char *path, int error,
usr.bin/tmux/cmd-new-session.c
103
ename = format_single(item, tmp, c, NULL, NULL, NULL);
usr.bin/tmux/cmd-new-session.c
113
ename = format_single(item, tmp, c, NULL, NULL, NULL);
usr.bin/tmux/cmd-new-session.c
166
if (c == NULL)
usr.bin/tmux/cmd-new-session.c
168
else if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/cmd-new-session.c
173
if (c != NULL && c->session != NULL)
usr.bin/tmux/cmd-new-session.c
178
cwd = format_single(item, tmp, c, NULL, NULL, NULL);
usr.bin/tmux/cmd-new-session.c
180
cwd = xstrdup(server_client_get_cwd(c, NULL));
usr.bin/tmux/cmd-new-session.c
193
c->fd != -1 &&
usr.bin/tmux/cmd-new-session.c
194
(~c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/cmd-new-session.c
200
if (tcgetattr(c->fd, &tio) != 0)
usr.bin/tmux/cmd-new-session.c
208
if (server_client_open(c, &cause) != 0) {
usr.bin/tmux/cmd-new-session.c
219
if (c != NULL)
usr.bin/tmux/cmd-new-session.c
220
dsx = c->tty.sx;
usr.bin/tmux/cmd-new-session.c
235
if (c != NULL)
usr.bin/tmux/cmd-new-session.c
236
dsy = c->tty.sy;
usr.bin/tmux/cmd-new-session.c
251
sx = c->tty.sx;
usr.bin/tmux/cmd-new-session.c
252
sy = c->tty.sy;
usr.bin/tmux/cmd-new-session.c
282
if (c != NULL && !args_has(args, 'E'))
usr.bin/tmux/cmd-new-session.c
283
environ_update(global_s_options, c->environ, env);
usr.bin/tmux/cmd-new-session.c
295
sc.tc = c;
usr.bin/tmux/cmd-new-session.c
336
server_client_set_flags(c, args_get(args, 'f'));
usr.bin/tmux/cmd-new-session.c
338
if (~c->flags & CLIENT_CONTROL)
usr.bin/tmux/cmd-new-session.c
339
proc_send(c->peer, MSG_READY, -1, NULL, 0);
usr.bin/tmux/cmd-new-session.c
340
} else if (c->session != NULL)
usr.bin/tmux/cmd-new-session.c
341
c->last_session = c->session;
usr.bin/tmux/cmd-new-session.c
342
server_client_set_session(c, s);
usr.bin/tmux/cmd-new-session.c
344
server_client_set_key_table(c, NULL);
usr.bin/tmux/cmd-new-session.c
351
cp = format_single(item, template, c, s, s->curw, NULL);
usr.bin/tmux/cmd-new-session.c
357
c->flags |= CLIENT_ATTACHED;
usr.bin/tmux/cmd-new-session.c
73
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-new-window.c
112
if (c != NULL && c->session != NULL)
usr.bin/tmux/cmd-new-window.c
113
s->curw->window->latest = c;
usr.bin/tmux/cmd-new-window.c
56
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-new-window.c
82
expanded = format_single(item, name, c, s, NULL, NULL);
usr.bin/tmux/cmd-new-window.c
92
expanded = format_single(item, wname, c, s, NULL, NULL);
usr.bin/tmux/cmd-parse.y
1009
struct client *c, struct cmdq_state *state, char **error)
usr.bin/tmux/cmd-parse.y
1024
cmdq_append(c, item);
usr.bin/tmux/cmd-parse.y
202
struct client *c = pi->c;
usr.bin/tmux/cmd-parse.y
210
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/cmd-parse.y
214
format_defaults(ft, c, fsp->s, fsp->wl, fsp->wp);
usr.bin/tmux/cmd-queue.c
101
if (c == NULL)
usr.bin/tmux/cmd-queue.c
103
if (c->name != NULL)
usr.bin/tmux/cmd-queue.c
104
xsnprintf(s, sizeof s, "<%s>", c->name);
usr.bin/tmux/cmd-queue.c
106
xsnprintf(s, sizeof s, "<%p>", c);
usr.bin/tmux/cmd-queue.c
112
cmdq_get(struct client *c)
usr.bin/tmux/cmd-queue.c
116
if (c == NULL) {
usr.bin/tmux/cmd-queue.c
121
return (c->queue);
usr.bin/tmux/cmd-queue.c
309
cmdq_append(struct client *c, struct cmdq_item *item)
usr.bin/tmux/cmd-queue.c
311
struct cmdq_list *queue = cmdq_get(c);
usr.bin/tmux/cmd-queue.c
318
if (c != NULL)
usr.bin/tmux/cmd-queue.c
319
c->references++;
usr.bin/tmux/cmd-queue.c
320
item->client = c;
usr.bin/tmux/cmd-queue.c
324
log_debug("%s %s: %s", __func__, cmdq_name(c), item->name);
usr.bin/tmux/cmd-queue.c
335
struct client *c = after->client;
usr.bin/tmux/cmd-queue.c
344
if (c != NULL)
usr.bin/tmux/cmd-queue.c
345
c->references++;
usr.bin/tmux/cmd-queue.c
346
item->client = c;
usr.bin/tmux/cmd-queue.c
350
log_debug("%s %s: %s after %s", __func__, cmdq_name(c),
usr.bin/tmux/cmd-queue.c
537
struct client *c = item->client;
usr.bin/tmux/cmd-queue.c
546
if (c != NULL) {
usr.bin/tmux/cmd-queue.c
547
uid = proc_get_peer_uid(c->peer);
usr.bin/tmux/cmd-queue.c
555
if (c->session != NULL && state->event.key != KEYC_NONE) {
usr.bin/tmux/cmd-queue.c
557
server_add_message("%s%s key %s: %s", c->name, user,
usr.bin/tmux/cmd-queue.c
560
server_add_message("%s%s command: %s", c->name, user,
usr.bin/tmux/cmd-queue.c
704
cmdq_next(struct client *c)
usr.bin/tmux/cmd-queue.c
706
struct cmdq_list *queue = cmdq_get(c);
usr.bin/tmux/cmd-queue.c
707
const char *name = cmdq_name(c);
usr.bin/tmux/cmd-queue.c
786
cmdq_running(struct client *c)
usr.bin/tmux/cmd-queue.c
788
struct cmdq_list *queue = cmdq_get(c);
usr.bin/tmux/cmd-queue.c
801
struct client *c = item->client;
usr.bin/tmux/cmd-queue.c
805
if (c != NULL && (c->flags & CLIENT_CONTROL))
usr.bin/tmux/cmd-queue.c
806
control_write_guard(c, guard, t, number, flags);
usr.bin/tmux/cmd-queue.c
839
struct client *c = item->client;
usr.bin/tmux/cmd-queue.c
852
if (c == NULL) {
usr.bin/tmux/cmd-queue.c
855
} else if (c->session == NULL || (c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/cmd-queue.c
856
server_add_message("%s message: %s", c->name, msg);
usr.bin/tmux/cmd-queue.c
857
if (~c->flags & CLIENT_UTF8) {
usr.bin/tmux/cmd-queue.c
862
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/cmd-queue.c
863
control_write(c, "%s", msg);
usr.bin/tmux/cmd-queue.c
865
file_error(c, "%s\n", msg);
usr.bin/tmux/cmd-queue.c
866
c->retval = 1;
usr.bin/tmux/cmd-queue.c
869
status_message_set(c, -1, 1, 0, 0, "%s", msg);
usr.bin/tmux/cmd-queue.c
97
cmdq_name(struct client *c)
usr.bin/tmux/cmd-resize-pane.c
199
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-resize-pane.c
205
if (wp == NULL || c == NULL || c->session != s)
usr.bin/tmux/cmd-resize-pane.c
209
c->tty.mouse_drag_update = cmd_resize_pane_mouse_resize_tiled;
usr.bin/tmux/cmd-resize-pane.c
210
cmd_resize_pane_mouse_resize_tiled(c, &event->m);
usr.bin/tmux/cmd-resize-pane.c
217
c->tty.mouse_drag_update = cmd_resize_pane_mouse_resize_move_floating;
usr.bin/tmux/cmd-resize-pane.c
218
cmd_resize_pane_mouse_resize_move_floating(c, &event->m);
usr.bin/tmux/cmd-resize-pane.c
230
cmd_resize_pane_mouse_resize_move_floating(struct client *c,
usr.bin/tmux/cmd-resize-pane.c
243
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/cmd-resize-pane.c
355
cmd_resize_pane_mouse_resize_tiled(struct client *c, struct mouse_event *m)
usr.bin/tmux/cmd-resize-pane.c
369
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/cmd-run-shell.c
114
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-run-shell.c
158
cdata->client = c;
usr.bin/tmux/cmd-run-shell.c
169
cdata->cwd = xstrdup(server_client_get_cwd(c, s));
usr.bin/tmux/cmd-run-shell.c
196
struct client *c = cdata->client;
usr.bin/tmux/cmd-run-shell.c
213
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/cmd-run-shell.c
229
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/cmd-run-shell.c
235
cmdq_append(c, new_item);
usr.bin/tmux/cmd-save-buffer.c
100
if (c->session != NULL || (c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/cmd-save-buffer.c
60
cmd_save_buffer_done(__unused struct client *c, const char *path, int error,
usr.bin/tmux/cmd-save-buffer.c
77
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-select-pane.c
61
struct client *c;
usr.bin/tmux/cmd-select-pane.c
68
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/cmd-select-pane.c
69
if (c->session == NULL || (c->flags & CLIENT_CONTROL))
usr.bin/tmux/cmd-select-pane.c
71
if (c->session->curw->window == w && tty_window_bigger(&c->tty))
usr.bin/tmux/cmd-select-pane.c
72
server_redraw_client(c);
usr.bin/tmux/cmd-select-pane.c
74
if (c->session->curw->window == w)
usr.bin/tmux/cmd-select-pane.c
75
c->flags |= CLIENT_REDRAWBORDERS;
usr.bin/tmux/cmd-select-pane.c
76
if (session_has(c->session, w))
usr.bin/tmux/cmd-select-pane.c
77
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/cmd-select-window.c
145
if (c != NULL && c->session != NULL)
usr.bin/tmux/cmd-select-window.c
146
s->curw->window->latest = c;
usr.bin/tmux/cmd-select-window.c
88
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-server-access.c
64
struct client *c = cmdq_get_target_client(item);
usr.bin/tmux/cmd-server-access.c
81
arg = format_single(item, args_string(args, 0), c, NULL, NULL, NULL);
usr.bin/tmux/cmd-set-option.c
117
c = cmdq_get_client(item);
usr.bin/tmux/cmd-set-option.c
118
if (c != NULL)
usr.bin/tmux/cmd-set-option.c
119
event_payload_set_client(ep, "client", c);
usr.bin/tmux/cmd-set-option.c
96
struct client *c;
usr.bin/tmux/cmd-show-environment.c
54
char c, *out, *ret;
usr.bin/tmux/cmd-show-environment.c
57
while ((c = *value++) != '\0') {
usr.bin/tmux/cmd-show-environment.c
59
if (c == '$' || c == '`' || c == '"' || c == '\\')
usr.bin/tmux/cmd-show-environment.c
61
*out++ = c;
usr.bin/tmux/cmd-source-file.c
103
cmd_source_file_done(struct client *c, const char *path, int error,
usr.bin/tmux/cmd-source-file.c
120
if (load_cfg_from_buffer(bdata, bsize, path, c, cdata->after,
usr.bin/tmux/cmd-source-file.c
129
file_read(c, cdata->files[n], cmd_source_file_done, cdata);
usr.bin/tmux/cmd-source-file.c
131
cmd_source_file_complete(c, cdata);
usr.bin/tmux/cmd-source-file.c
165
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-source-file.c
173
if (c == NULL) {
usr.bin/tmux/cmd-source-file.c
181
if (c->source_file_depth >= CMD_SOURCE_FILE_DEPTH_LIMIT) {
usr.bin/tmux/cmd-source-file.c
185
c->source_file_depth++;
usr.bin/tmux/cmd-source-file.c
186
log_debug("%s: depth now %u", __func__, c->source_file_depth);
usr.bin/tmux/cmd-source-file.c
196
if (c == NULL || ~c->flags & CLIENT_CONTROL) {
usr.bin/tmux/cmd-source-file.c
202
cwd = cmd_source_file_quote_for_glob(server_client_get_cwd(c, NULL));
usr.bin/tmux/cmd-source-file.c
250
file_read(c, cdata->files[0], cmd_source_file_done, cdata);
usr.bin/tmux/cmd-source-file.c
253
cmd_source_file_complete(c, cdata);
usr.bin/tmux/cmd-source-file.c
67
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-source-file.c
69
if (c == NULL) {
usr.bin/tmux/cmd-source-file.c
73
c->source_file_depth--;
usr.bin/tmux/cmd-source-file.c
74
log_debug("%s: depth now %u", __func__, c->source_file_depth);
usr.bin/tmux/cmd-source-file.c
82
cmd_source_file_complete(struct client *c, struct cmd_source_file_data *cdata)
usr.bin/tmux/cmd-source-file.c
89
c != NULL &&
usr.bin/tmux/cmd-source-file.c
90
c->session == NULL)
usr.bin/tmux/cmd-source-file.c
91
c->retval = 1;
usr.bin/tmux/cmd-split-window.c
336
cmd_split_window_mouse_resize(struct client *c, struct mouse_event *m)
usr.bin/tmux/cmd-split-window.c
345
if (c->tty.mouse_last_pane == -1)
usr.bin/tmux/cmd-split-window.c
347
wp = window_pane_find_by_id(c->tty.mouse_last_pane);
usr.bin/tmux/cmd-split-window.c
349
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/cmd-split-window.c
365
if (x >= (int)c->tty.mouse_drag_x) {
usr.bin/tmux/cmd-split-window.c
366
xoff = c->tty.mouse_drag_x + border;
usr.bin/tmux/cmd-split-window.c
367
sx = x - c->tty.mouse_drag_x + 1;
usr.bin/tmux/cmd-split-window.c
369
sx = c->tty.mouse_drag_x - x + 1;
usr.bin/tmux/cmd-split-window.c
370
xoff = c->tty.mouse_drag_x - sx + 1;
usr.bin/tmux/cmd-split-window.c
374
if (y >= (int)c->tty.mouse_drag_y) {
usr.bin/tmux/cmd-split-window.c
375
yoff = c->tty.mouse_drag_y + border;
usr.bin/tmux/cmd-split-window.c
376
sy = y - c->tty.mouse_drag_y + 1;
usr.bin/tmux/cmd-split-window.c
378
sy = c->tty.mouse_drag_y - y + 1;
usr.bin/tmux/cmd-split-window.c
379
yoff = c->tty.mouse_drag_y - sy + 1;
usr.bin/tmux/cmd-switch-client.c
57
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-switch-client.c
84
uid = proc_get_peer_uid(c->peer);
usr.bin/tmux/cmd-wait-for.c
169
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-wait-for.c
171
if (c == NULL || c->name == NULL)
usr.bin/tmux/cmd-wait-for.c
173
return (c->name);
usr.bin/tmux/cmd-wait-for.c
410
struct client *c = cmdq_get_client(item);
usr.bin/tmux/cmd-wait-for.c
413
if (c == NULL) {
usr.bin/tmux/cmd-wait-for.c
422
log_debug("wait channel %s already woken (%p)", wc->name, c);
usr.bin/tmux/cmd-wait-for.c
426
log_debug("wait channel %s not woken (%p)", wc->name, c);
usr.bin/tmux/colour.c
1152
int c;
usr.bin/tmux/colour.c
1159
c = strtonum(name + 4, 0, 100, &errstr);
usr.bin/tmux/colour.c
1162
c = round(2.55 * c);
usr.bin/tmux/colour.c
1163
if (c < 0 || c > 255)
usr.bin/tmux/colour.c
1165
return (colour_join_rgb(c, c, c));
usr.bin/tmux/colour.c
1169
return (colours[i].c|COLOUR_FLAG_RGB);
usr.bin/tmux/colour.c
1178
double c, m, y, k = 0;
usr.bin/tmux/colour.c
1192
else if ((sscanf(p, "cmyk:%lf/%lf/%lf/%lf", &c, &m, &y, &k) == 4 ||
usr.bin/tmux/colour.c
1193
sscanf(p, "cmy:%lf/%lf/%lf", &c, &m, &y) == 3) &&
usr.bin/tmux/colour.c
1194
c >= 0 && c <= 1 && m >= 0 && m <= 1 &&
usr.bin/tmux/colour.c
1197
(1 - c) * (1 - k) * 255,
usr.bin/tmux/colour.c
1272
colour_palette_set(struct colour_palette *p, int n, int c)
usr.bin/tmux/colour.c
1279
if (c == -1 && p->palette == NULL)
usr.bin/tmux/colour.c
1287
p->palette[n] = c;
usr.bin/tmux/colour.c
1299
int c;
usr.bin/tmux/colour.c
1319
c = ov->number;
usr.bin/tmux/colour.c
1320
p->default_palette[i] = c;
usr.bin/tmux/colour.c
180
colour_split_rgb(int c, u_char *r, u_char *g, u_char *b)
usr.bin/tmux/colour.c
182
*r = (c >> 16) & 0xff;
usr.bin/tmux/colour.c
183
*g = (c >> 8) & 0xff;
usr.bin/tmux/colour.c
184
*b = c & 0xff;
usr.bin/tmux/colour.c
189
colour_force_rgb(int c)
usr.bin/tmux/colour.c
191
if (c & COLOUR_FLAG_RGB)
usr.bin/tmux/colour.c
192
return (c);
usr.bin/tmux/colour.c
193
if (c & COLOUR_FLAG_256)
usr.bin/tmux/colour.c
194
return (colour_256toRGB(c));
usr.bin/tmux/colour.c
195
if (c >= 0 && c <= 7)
usr.bin/tmux/colour.c
196
return (colour_256toRGB(c));
usr.bin/tmux/colour.c
197
if (c >= 90 && c <= 97)
usr.bin/tmux/colour.c
198
return (colour_256toRGB(8 + c - 90));
usr.bin/tmux/colour.c
204
colour_dim(int c, u_int dim)
usr.bin/tmux/colour.c
208
if (dim == 0 || COLOUR_DEFAULT(c) || (c & COLOUR_FLAG_THEME))
usr.bin/tmux/colour.c
209
return (c);
usr.bin/tmux/colour.c
213
c = colour_force_rgb(c);
usr.bin/tmux/colour.c
214
if (c == -1)
usr.bin/tmux/colour.c
216
colour_split_rgb(c, &r, &g, &b);
usr.bin/tmux/colour.c
226
colour_tostring(int c)
usr.bin/tmux/colour.c
231
if (c == -1)
usr.bin/tmux/colour.c
234
if (c & COLOUR_FLAG_THEME) {
usr.bin/tmux/colour.c
235
c &= 0xff;
usr.bin/tmux/colour.c
236
if (c >= 0 && (u_int)c < nitems(colour_theme_table))
usr.bin/tmux/colour.c
237
return (colour_theme_table[c].name);
usr.bin/tmux/colour.c
241
if (c & COLOUR_FLAG_RGB) {
usr.bin/tmux/colour.c
242
colour_split_rgb(c, &r, &g, &b);
usr.bin/tmux/colour.c
247
if (c & COLOUR_FLAG_256) {
usr.bin/tmux/colour.c
248
xsnprintf(s, sizeof s, "colour%u", c & 0xff);
usr.bin/tmux/colour.c
252
switch (c) {
usr.bin/tmux/colour.c
295
colour_toescape(struct client *c, int colour, int bg)
usr.bin/tmux/colour.c
302
if (c != NULL && (c->tty.flags & TTY_OPENED) && c->tty.term != NULL)
usr.bin/tmux/colour.c
303
flags = c->tty.term->flags;
usr.bin/tmux/colour.c
307
if (c != NULL && (u_int)n < COLOUR_THEME_COUNT)
usr.bin/tmux/colour.c
308
colour = c->theme_colours[n];
usr.bin/tmux/colour.c
347
colour_totheme(int c)
usr.bin/tmux/colour.c
351
if (c == -1)
usr.bin/tmux/colour.c
354
if (c & COLOUR_FLAG_RGB) {
usr.bin/tmux/colour.c
355
r = (c >> 16) & 0xff;
usr.bin/tmux/colour.c
356
g = (c >> 8) & 0xff;
usr.bin/tmux/colour.c
357
b = (c >> 0) & 0xff;
usr.bin/tmux/colour.c
365
if (c & COLOUR_FLAG_256)
usr.bin/tmux/colour.c
366
return (colour_totheme(colour_256toRGB(c)));
usr.bin/tmux/colour.c
368
switch (c) {
usr.bin/tmux/colour.c
376
if (c >= 0 && c <= 7)
usr.bin/tmux/colour.c
377
return (colour_totheme(colour_256toRGB(c)));
usr.bin/tmux/colour.c
378
if (c >= 90 && c <= 97)
usr.bin/tmux/colour.c
379
return (colour_totheme(colour_256toRGB(8 + c - 90)));
usr.bin/tmux/colour.c
466
colour_256toRGB(int c)
usr.bin/tmux/colour.c
535
return (table[c & 0xff] | COLOUR_FLAG_RGB);
usr.bin/tmux/colour.c
540
colour_256to16(int c)
usr.bin/tmux/colour.c
561
return (table[c & 0xff]);
usr.bin/tmux/colour.c
570
int c;
usr.bin/tmux/control-notify.c
107
struct client *c;
usr.bin/tmux/control-notify.c
112
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
113
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
116
control_notify_write(c, "%%window-pane-changed @%u %%%u", w->id,
usr.bin/tmux/control-notify.c
126
struct client *c;
usr.bin/tmux/control-notify.c
132
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
133
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
usr.bin/tmux/control-notify.c
135
cs = c->session;
usr.bin/tmux/control-notify.c
138
control_notify_write(c, "%%window-close @%u", w->id);
usr.bin/tmux/control-notify.c
140
control_notify_write(c, "%%unlinked-window-close @%u",
usr.bin/tmux/control-notify.c
151
struct client *c;
usr.bin/tmux/control-notify.c
157
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
158
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
usr.bin/tmux/control-notify.c
160
cs = c->session;
usr.bin/tmux/control-notify.c
163
control_notify_write(c, "%%window-add @%u", w->id);
usr.bin/tmux/control-notify.c
165
control_notify_write(c, "%%unlinked-window-add @%u",
usr.bin/tmux/control-notify.c
176
struct client *c;
usr.bin/tmux/control-notify.c
182
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
183
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
usr.bin/tmux/control-notify.c
185
cs = c->session;
usr.bin/tmux/control-notify.c
188
control_notify_write(c, "%%window-renamed @%u %s",
usr.bin/tmux/control-notify.c
191
control_notify_write(c,
usr.bin/tmux/control-notify.c
203
struct client *c;
usr.bin/tmux/control-notify.c
210
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
211
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
usr.bin/tmux/control-notify.c
214
if (cc == c) {
usr.bin/tmux/control-notify.c
215
control_notify_write(c, "%%session-changed $%u %s",
usr.bin/tmux/control-notify.c
218
control_notify_write(c,
usr.bin/tmux/control-notify.c
231
struct client *c;
usr.bin/tmux/control-notify.c
235
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
236
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
238
control_notify_write(c, "%%client-detached %s", cc->name);
usr.bin/tmux/control-notify.c
248
struct client *c;
usr.bin/tmux/control-notify.c
252
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
253
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
255
control_notify_write(c, "%%session-renamed $%u %s", s->id,
usr.bin/tmux/control-notify.c
265
struct client *c;
usr.bin/tmux/control-notify.c
267
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
268
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
27
#define CONTROL_SHOULD_NOTIFY_CLIENT(c) \
usr.bin/tmux/control-notify.c
270
control_notify_write(c, "%%sessions-changed");
usr.bin/tmux/control-notify.c
279
struct client *c;
usr.bin/tmux/control-notify.c
28
((c) != NULL && \
usr.bin/tmux/control-notify.c
281
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
282
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
284
control_notify_write(c, "%%sessions-changed");
usr.bin/tmux/control-notify.c
29
((c)->flags & CLIENT_CONTROL) && \
usr.bin/tmux/control-notify.c
294
struct client *c;
usr.bin/tmux/control-notify.c
30
(~(c)->flags & CLIENT_EXIT) && \
usr.bin/tmux/control-notify.c
304
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
305
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
307
control_notify_write(c, "%%session-window-changed $%u @%u",
usr.bin/tmux/control-notify.c
31
(c)->control_state != NULL)
usr.bin/tmux/control-notify.c
318
struct client *c;
usr.bin/tmux/control-notify.c
322
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
323
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
325
control_notify_write(c, "%%paste-buffer-changed %s", pbname);
usr.bin/tmux/control-notify.c
335
struct client *c;
usr.bin/tmux/control-notify.c
339
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
340
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
342
control_notify_write(c, "%%paste-buffer-deleted %s", pbname);
usr.bin/tmux/control-notify.c
39
struct client *c;
usr.bin/tmux/control-notify.c
44
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
45
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
47
control_notify_write(c, "%%pane-mode-changed %%%u",
usr.bin/tmux/control-notify.c
56
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
57
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
usr.bin/tmux/control-notify.c
59
control_notify_write(c, "%%pane-mode-changed %s", value);
usr.bin/tmux/control-notify.c
69
struct client *c;
usr.bin/tmux/control-notify.c
92
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/control-notify.c
93
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
usr.bin/tmux/control-notify.c
95
s = c->session;
usr.bin/tmux/control-notify.c
97
control_notify_write(c, "%s", cp);
usr.bin/tmux/control.c
1008
if (~c->flags & CLIENT_CONTROLCONTROL)
usr.bin/tmux/control.c
1012
control_reset_offsets(c);
usr.bin/tmux/control.c
1020
c->control_state = NULL;
usr.bin/tmux/control.c
1026
control_add_sub(struct client *c, const char *name, enum monitor_type type,
usr.bin/tmux/control.c
1029
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
1036
control_remove_sub(struct client *c, const char *name)
usr.bin/tmux/control.c
1038
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
175
control_get_pane(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
177
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
185
control_add_pane(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
187
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
190
cp = control_get_pane(c, wp);
usr.bin/tmux/control.c
207
control_get_window(struct client *c, u_int window)
usr.bin/tmux/control.c
209
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
219
control_set_window_size(struct client *c, u_int window, u_int sx, u_int sy)
usr.bin/tmux/control.c
221
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
226
cw = control_get_window(c, window);
usr.bin/tmux/control.c
238
control_get_window_size(struct client *c, u_int window, u_int *sx, u_int *sy)
usr.bin/tmux/control.c
242
if ((cw = control_get_window(c, window)) == NULL)
usr.bin/tmux/control.c
251
control_clear_window_size(struct client *c, u_int window)
usr.bin/tmux/control.c
253
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
258
cw = control_get_window(c, window);
usr.bin/tmux/control.c
267
control_discard_pane(struct client *c, struct control_pane *cp)
usr.bin/tmux/control.c
269
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
280
control_window_pane(struct client *c, u_int pane)
usr.bin/tmux/control.c
284
if (c->session == NULL)
usr.bin/tmux/control.c
288
if (winlink_find_by_window(&c->session->windows, wp->window) == NULL)
usr.bin/tmux/control.c
295
control_reset_offsets(struct client *c)
usr.bin/tmux/control.c
297
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
301
control_discard_pane(c, cp);
usr.bin/tmux/control.c
312
control_pane_offset(struct client *c, struct window_pane *wp, int *off)
usr.bin/tmux/control.c
314
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
317
if (c->flags & CLIENT_CONTROL_NOOUTPUT) {
usr.bin/tmux/control.c
322
cp = control_get_pane(c, wp);
usr.bin/tmux/control.c
337
control_set_pane_on(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
341
cp = control_get_pane(c, wp);
usr.bin/tmux/control.c
351
control_set_pane_off(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
355
cp = control_add_pane(c, wp);
usr.bin/tmux/control.c
356
control_discard_pane(c, cp);
usr.bin/tmux/control.c
364
control_continue_pane(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
368
cp = control_get_pane(c, wp);
usr.bin/tmux/control.c
373
control_notify_write(c, "%%continue %%%u", wp->id);
usr.bin/tmux/control.c
379
control_pause_pane(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
383
cp = control_add_pane(c, wp);
usr.bin/tmux/control.c
386
control_discard_pane(c, cp);
usr.bin/tmux/control.c
387
control_notify_write(c, "%%pause %%%u", wp->id);
usr.bin/tmux/control.c
393
control_write_line(struct client *c, char *line)
usr.bin/tmux/control.c
395
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
399
log_debug("%s: %s: writing line: %s", __func__, c->name, line);
usr.bin/tmux/control.c
412
log_debug("%s: %s: storing line: %s", __func__, c->name, cb->line);
usr.bin/tmux/control.c
418
control_flush_deferred(struct client *c)
usr.bin/tmux/control.c
420
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
425
control_write_line(c, cl->line);
usr.bin/tmux/control.c
437
control_write(struct client *c, const char *fmt, ...)
usr.bin/tmux/control.c
446
control_write_line(c, line);
usr.bin/tmux/control.c
457
control_write_guard(struct client *c, const char *guard, long t, u_int number,
usr.bin/tmux/control.c
460
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
467
control_write_line(c, line);
usr.bin/tmux/control.c
471
control_flush_deferred(c);
usr.bin/tmux/control.c
480
control_notify_write(struct client *c, const char *fmt, ...)
usr.bin/tmux/control.c
482
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
492
control_write_line(c, line);
usr.bin/tmux/control.c
496
log_debug("%s: %s: deferring notification: %s", __func__, c->name,
usr.bin/tmux/control.c
505
control_check_age(struct client *c, struct window_pane *wp,
usr.bin/tmux/control.c
519
log_debug("%s: %s: %%%u is %llu behind", __func__, c->name, wp->id,
usr.bin/tmux/control.c
522
if (c->flags & CLIENT_CONTROL_PAUSEAFTER) {
usr.bin/tmux/control.c
523
if (age < c->pause_age)
usr.bin/tmux/control.c
526
control_discard_pane(c, cp);
usr.bin/tmux/control.c
527
control_notify_write(c, "%%pause %%%u", wp->id);
usr.bin/tmux/control.c
531
c->exit_message = xstrdup("too far behind");
usr.bin/tmux/control.c
532
c->flags |= CLIENT_EXIT;
usr.bin/tmux/control.c
533
control_discard(c);
usr.bin/tmux/control.c
540
control_write_output(struct client *c, struct window_pane *wp)
usr.bin/tmux/control.c
542
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
547
if (winlink_find_by_window(&c->session->windows, wp->window) == NULL)
usr.bin/tmux/control.c
550
if (c->flags & (CONTROL_IGNORE_FLAGS|CLIENT_EXIT)) {
usr.bin/tmux/control.c
551
cp = control_get_pane(c, wp);
usr.bin/tmux/control.c
556
cp = control_add_pane(c, wp);
usr.bin/tmux/control.c
559
if (control_check_age(c, wp, cp))
usr.bin/tmux/control.c
573
log_debug("%s: %s: new output block of %zu for %%%u", __func__, c->name,
usr.bin/tmux/control.c
577
log_debug("%s: %s: %%%u now pending", __func__, c->name,
usr.bin/tmux/control.c
587
log_debug("%s: %s: ignoring pane %%%u", __func__, c->name, wp->id);
usr.bin/tmux/control.c
596
struct client *c = cmdq_get_client(item);
usr.bin/tmux/control.c
600
control_write(c, "parse error: %s", error);
usr.bin/tmux/control.c
612
struct client *c = data;
usr.bin/tmux/control.c
614
c->flags |= CLIENT_EXIT;
usr.bin/tmux/control.c
621
struct client *c = data;
usr.bin/tmux/control.c
622
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
632
log_debug("%s: %s: %s", __func__, c->name, line);
usr.bin/tmux/control.c
635
c->flags |= CLIENT_EXIT;
usr.bin/tmux/control.c
640
status = cmd_parse_and_append(line, NULL, c, state, &error);
usr.bin/tmux/control.c
642
cmdq_append(c, cmdq_get_callback(control_error, error));
usr.bin/tmux/control.c
651
control_all_done(struct client *c)
usr.bin/tmux/control.c
653
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
709
control_flush_all_blocks(struct client *c)
usr.bin/tmux/control.c
711
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
717
log_debug("%s: %s: flushing line: %s", __func__, c->name,
usr.bin/tmux/control.c
728
control_append_data(struct client *c, struct control_pane *cp, uint64_t age,
usr.bin/tmux/control.c
739
if (c->flags & CLIENT_CONTROL_PAUSEAFTER) {
usr.bin/tmux/control.c
768
control_write_data(struct client *c, struct evbuffer *message)
usr.bin/tmux/control.c
770
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
772
log_debug("%s: %s: %.*s", __func__, c->name,
usr.bin/tmux/control.c
782
control_write_pending(struct client *c, struct control_pane *cp, size_t limit)
usr.bin/tmux/control.c
784
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
791
wp = control_window_pane(c, cp->pane);
usr.bin/tmux/control.c
797
control_flush_all_blocks(c);
usr.bin/tmux/control.c
802
if (control_check_age(c, wp, cp)) {
usr.bin/tmux/control.c
815
"(used %zu/%zu)", __func__, c->name, cb->size,
usr.bin/tmux/control.c
823
message = control_append_data(c, cp, age, message, wp, size);
usr.bin/tmux/control.c
833
control_write_data(c, message);
usr.bin/tmux/control.c
836
control_flush_all_blocks(c);
usr.bin/tmux/control.c
841
control_write_data(c, message);
usr.bin/tmux/control.c
849
struct client *c = data;
usr.bin/tmux/control.c
850
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
855
control_flush_all_blocks(c);
usr.bin/tmux/control.c
862
c->name, space, cs->pending_count);
usr.bin/tmux/control.c
871
if (control_write_pending(c, cp, limit))
usr.bin/tmux/control.c
886
struct client *c = change->c;
usr.bin/tmux/control.c
894
control_notify_write(c,
usr.bin/tmux/control.c
899
control_notify_write(c,
usr.bin/tmux/control.c
903
control_notify_write(c,
usr.bin/tmux/control.c
911
control_start(struct client *c)
usr.bin/tmux/control.c
915
if (c->flags & CLIENT_CONTROLCONTROL) {
usr.bin/tmux/control.c
916
close(c->out_fd);
usr.bin/tmux/control.c
917
c->out_fd = -1;
usr.bin/tmux/control.c
919
setblocking(c->out_fd, 0);
usr.bin/tmux/control.c
920
setblocking(c->fd, 0);
usr.bin/tmux/control.c
922
cs = c->control_state = xcalloc(1, sizeof *cs);
usr.bin/tmux/control.c
928
cs->subs = monitor_create_client(c, control_sub_change, NULL);
usr.bin/tmux/control.c
930
cs->read_event = bufferevent_new(c->fd, control_read_callback,
usr.bin/tmux/control.c
931
control_write_callback, control_error_callback, c);
usr.bin/tmux/control.c
935
if (c->flags & CLIENT_CONTROLCONTROL)
usr.bin/tmux/control.c
938
cs->write_event = bufferevent_new(c->out_fd, NULL,
usr.bin/tmux/control.c
939
control_write_callback, control_error_callback, c);
usr.bin/tmux/control.c
946
if (c->flags & CLIENT_CONTROLCONTROL) {
usr.bin/tmux/control.c
954
control_ready(struct client *c)
usr.bin/tmux/control.c
956
bufferevent_enable(c->control_state->read_event, EV_READ);
usr.bin/tmux/control.c
961
control_discard(struct client *c)
usr.bin/tmux/control.c
963
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
967
control_discard_pane(c, cp);
usr.bin/tmux/control.c
976
control_discard_all(struct client *c)
usr.bin/tmux/control.c
978
struct control_state *cs = c->control_state;
usr.bin/tmux/control.c
982
control_discard(c);
usr.bin/tmux/control.c
990
control_stop(struct client *c)
usr.bin/tmux/control.c
992
struct control_state *cs = c->control_state;
usr.bin/tmux/events-payload.c
329
struct client *c)
usr.bin/tmux/events-payload.c
333
c->references++;
usr.bin/tmux/events-payload.c
337
epi->client = c;
usr.bin/tmux/events.c
118
events_fire_client(const char *name, struct client *c)
usr.bin/tmux/events.c
124
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/events.c
126
event_payload_set_client(ep, "client", c);
usr.bin/tmux/file.c
109
file_create_with_client(struct client *c, int stream, client_file_cb cb,
usr.bin/tmux/file.c
114
if (c != NULL && (c->flags & CLIENT_ATTACHED))
usr.bin/tmux/file.c
115
c = NULL;
usr.bin/tmux/file.c
118
cf->c = c;
usr.bin/tmux/file.c
129
if (cf->c != NULL) {
usr.bin/tmux/file.c
130
cf->peer = cf->c->peer;
usr.bin/tmux/file.c
131
cf->tree = &cf->c->files;
usr.bin/tmux/file.c
132
RB_INSERT(client_files, &cf->c->files, cf);
usr.bin/tmux/file.c
133
cf->c->references++;
usr.bin/tmux/file.c
151
if (cf->c != NULL)
usr.bin/tmux/file.c
152
server_client_unref(cf->c);
usr.bin/tmux/file.c
162
struct client *c = cf->c;
usr.bin/tmux/file.c
165
(cf->closed || c == NULL || (~c->flags & CLIENT_DEAD)))
usr.bin/tmux/file.c
166
cf->cb(c, cf->path, cf->error, 1, cf->buffer, cf->data);
usr.bin/tmux/file.c
182
cf->cb(cf->c, cf->path, cf->error, 0, cf->buffer, cf->data);
usr.bin/tmux/file.c
187
file_can_print(struct client *c)
usr.bin/tmux/file.c
189
if (c == NULL ||
usr.bin/tmux/file.c
190
(c->flags & CLIENT_ATTACHED) ||
usr.bin/tmux/file.c
191
(c->flags & CLIENT_DEAD) ||
usr.bin/tmux/file.c
192
(c->flags & CLIENT_CONTROL))
usr.bin/tmux/file.c
199
file_print(struct client *c, const char *fmt, ...)
usr.bin/tmux/file.c
204
file_vprint(c, fmt, ap);
usr.bin/tmux/file.c
210
file_vprint(struct client *c, const char *fmt, va_list ap)
usr.bin/tmux/file.c
215
if (!file_can_print(c))
usr.bin/tmux/file.c
219
if ((cf = RB_FIND(client_files, &c->files, &find)) == NULL) {
usr.bin/tmux/file.c
220
cf = file_create_with_client(c, 1, NULL, NULL);
usr.bin/tmux/file.c
228
proc_send(c->peer, MSG_WRITE_OPEN, -1, &msg, sizeof msg);
usr.bin/tmux/file.c
237
file_print_buffer(struct client *c, void *data, size_t size)
usr.bin/tmux/file.c
242
if (!file_can_print(c))
usr.bin/tmux/file.c
246
if ((cf = RB_FIND(client_files, &c->files, &find)) == NULL) {
usr.bin/tmux/file.c
247
cf = file_create_with_client(c, 1, NULL, NULL);
usr.bin/tmux/file.c
255
proc_send(c->peer, MSG_WRITE_OPEN, -1, &msg, sizeof msg);
usr.bin/tmux/file.c
264
file_error(struct client *c, const char *fmt, ...)
usr.bin/tmux/file.c
270
if (!file_can_print(c))
usr.bin/tmux/file.c
276
if ((cf = RB_FIND(client_files, &c->files, &find)) == NULL) {
usr.bin/tmux/file.c
277
cf = file_create_with_client(c, 2, NULL, NULL);
usr.bin/tmux/file.c
285
proc_send(c->peer, MSG_WRITE_OPEN, -1, &msg, sizeof msg);
usr.bin/tmux/file.c
296
file_write(struct client *c, const char *path, int flags, const void *bdata,
usr.bin/tmux/file.c
308
cf = file_create_with_client(c, stream, cb, cbdata);
usr.bin/tmux/file.c
312
if (c == NULL ||
usr.bin/tmux/file.c
313
(c->flags & CLIENT_ATTACHED) ||
usr.bin/tmux/file.c
314
(c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/file.c
321
cf = file_create_with_client(c, stream, cb, cbdata);
usr.bin/tmux/file.c
322
cf->path = file_get_path(c, path);
usr.bin/tmux/file.c
324
if (c == NULL || c->flags & CLIENT_ATTACHED) {
usr.bin/tmux/file.c
370
file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata)
usr.bin/tmux/file.c
382
cf = file_create_with_client(c, stream, cb, cbdata);
usr.bin/tmux/file.c
386
if (c == NULL ||
usr.bin/tmux/file.c
387
(c->flags & CLIENT_ATTACHED) ||
usr.bin/tmux/file.c
388
(c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/file.c
395
cf = file_create_with_client(c, stream, cb, cbdata);
usr.bin/tmux/file.c
396
cf->path = file_get_path(c, path);
usr.bin/tmux/file.c
398
if (c == NULL || c->flags & CLIENT_ATTACHED) {
usr.bin/tmux/file.c
45
file_get_path(struct client *c, const char *file)
usr.bin/tmux/file.c
471
if (cf->c == NULL || ~cf->c->flags & CLIENT_DEAD)
usr.bin/tmux/file.c
60
xasprintf(&full_path, "%s/%s", server_client_get_cwd(c, NULL), path);
usr.bin/tmux/file.c
89
cf->c = NULL;
usr.bin/tmux/format.c
1359
if (ft->c == NULL || (~ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1382
if (ft->c == NULL || (~ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1394
sr = status_get_range(ft->c, x, y);
usr.bin/tmux/format.c
1510
if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1511
return (format_printf("%u", ft->c->tty.ypixel));
usr.bin/tmux/format.c
1519
if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1520
return (format_printf("%u", ft->c->tty.xpixel));
usr.bin/tmux/format.c
1531
if (ft->c == NULL || (~ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1533
term = ft->c->tty.term;
usr.bin/tmux/format.c
1555
if (ft->c != NULL) {
usr.bin/tmux/format.c
1556
if (ft->c->flags & CLIENT_CONTROL)
usr.bin/tmux/format.c
1567
if (ft->c != NULL)
usr.bin/tmux/format.c
1568
return (format_printf("%zu", ft->c->discarded));
usr.bin/tmux/format.c
1576
if (ft->c != NULL)
usr.bin/tmux/format.c
1577
return (xstrdup(server_client_get_flags(ft->c)));
usr.bin/tmux/format.c
1585
if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED))
usr.bin/tmux/format.c
1586
return (format_printf("%u", ft->c->tty.sy));
usr.bin/tmux/format.c
1594
if (ft->c != NULL)
usr.bin/tmux/format.c
1595
return (xstrdup(ft->c->keytable->name));
usr.bin/tmux/format.c
1603
if (ft->c != NULL &&
usr.bin/tmux/format.c
1604
ft->c->last_session != NULL &&
usr.bin/tmux/format.c
1605
session_alive(ft->c->last_session))
usr.bin/tmux/format.c
1606
return (xstrdup(ft->c->last_session->name));
usr.bin/tmux/format.c
1614
if (ft->c != NULL)
usr.bin/tmux/format.c
1615
return (xstrdup(ft->c->name));
usr.bin/tmux/format.c
1623
if (ft->c != NULL)
usr.bin/tmux/format.c
1624
return (format_printf("%ld", (long)ft->c->pid));
usr.bin/tmux/format.c
1634
if (ft->c != NULL) {
usr.bin/tmux/format.c
1635
name = server_client_get_key_table(ft->c);
usr.bin/tmux/format.c
1636
if (strcmp(ft->c->keytable->name, name) == 0)
usr.bin/tmux/format.c
1647
if (ft->c != NULL) {
usr.bin/tmux/format.c
1648
if (ft->c->flags & CLIENT_READONLY)
usr.bin/tmux/format.c
1659
if (ft->c != NULL && ft->c->session != NULL)
usr.bin/tmux/format.c
1660
return (xstrdup(ft->c->session->name));
usr.bin/tmux/format.c
1668
if (ft->c != NULL)
usr.bin/tmux/format.c
1669
return (xstrdup(tty_get_features(ft->c->term_features)));
usr.bin/tmux/format.c
1677
if (ft->c != NULL)
usr.bin/tmux/format.c
1678
return (xstrdup(ft->c->term_name));
usr.bin/tmux/format.c
1686
if (ft->c != NULL) {
usr.bin/tmux/format.c
1687
if (ft->c->term_type == NULL)
usr.bin/tmux/format.c
1689
return (xstrdup(ft->c->term_type));
usr.bin/tmux/format.c
1698
if (ft->c != NULL)
usr.bin/tmux/format.c
1699
return (xstrdup(ft->c->ttyname));
usr.bin/tmux/format.c
1709
if (ft->c != NULL) {
usr.bin/tmux/format.c
1710
uid = proc_get_peer_uid(ft->c->peer);
usr.bin/tmux/format.c
172
struct client *c;
usr.bin/tmux/format.c
1724
if (ft->c != NULL) {
usr.bin/tmux/format.c
1725
if (ft->c->user != NULL)
usr.bin/tmux/format.c
1726
return (xstrdup(ft->c->user));
usr.bin/tmux/format.c
1727
uid = proc_get_peer_uid(ft->c->peer);
usr.bin/tmux/format.c
1729
ft->c->user = xstrdup(pw->pw_name);
usr.bin/tmux/format.c
1730
return (xstrdup(ft->c->user));
usr.bin/tmux/format.c
1740
if (ft->c != NULL) {
usr.bin/tmux/format.c
1741
if (ft->c->flags & CLIENT_UTF8)
usr.bin/tmux/format.c
1752
if (ft->c != NULL)
usr.bin/tmux/format.c
1753
return (format_printf("%u", ft->c->tty.sx));
usr.bin/tmux/format.c
1761
if (ft->c != NULL)
usr.bin/tmux/format.c
1762
return (format_printf("%zu", ft->c->written));
usr.bin/tmux/format.c
1770
if (ft->c != NULL) {
usr.bin/tmux/format.c
1771
switch (ft->c->theme) {
usr.bin/tmux/format.c
2029
if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) {
usr.bin/tmux/format.c
2050
if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) {
usr.bin/tmux/format.c
2735
if (ft->s == NULL || ft->c == NULL)
usr.bin/tmux/format.c
2738
if (ft->c->session == ft->s)
usr.bin/tmux/format.c
3013
if (ft->c != NULL) {
usr.bin/tmux/format.c
3014
if (tty_window_offset(&ft->c->tty, &ox, &oy, &sx, &sy))
usr.bin/tmux/format.c
3207
if (ft->c != NULL) {
usr.bin/tmux/format.c
3208
if (tty_window_offset(&ft->c->tty, &ox, &oy, &sx, &sy))
usr.bin/tmux/format.c
3221
if (ft->c != NULL) {
usr.bin/tmux/format.c
3222
if (tty_window_offset(&ft->c->tty, &ox, &oy, &sx, &sy))
usr.bin/tmux/format.c
3335
if (ft->c != NULL)
usr.bin/tmux/format.c
3336
return (&ft->c->activity_time);
usr.bin/tmux/format.c
3344
if (ft->c != NULL)
usr.bin/tmux/format.c
3345
return (&ft->c->creation_time);
usr.bin/tmux/format.c
4132
format_create(struct client *c, struct cmdq_item *item, int tag, int flags)
usr.bin/tmux/format.c
4139
if (c != NULL) {
usr.bin/tmux/format.c
4140
ft->client = c;
usr.bin/tmux/format.c
4745
format_is_end(char c)
usr.bin/tmux/format.c
4747
return (c == ';' || c == ':');
usr.bin/tmux/format.c
4753
const char *c, size_t n, char **argv, int argc)
usr.bin/tmux/format.c
4760
memcpy(fm->modifier, c, n);
usr.bin/tmux/format.c
4786
char c, last[] = "X;:", **argv, *value;
usr.bin/tmux/format.c
4834
c = cp[0];
usr.bin/tmux/format.c
4857
format_add_modifier(&list, count, &c, 1, argv, argc);
usr.bin/tmux/format.c
487
struct client *c;
usr.bin/tmux/format.c
4882
format_add_modifier(&list, count, &c, 1, argv, argc);
usr.bin/tmux/format.c
490
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/format.c
491
if (c->jobs != NULL)
usr.bin/tmux/format.c
492
format_job_tidy(c->jobs, 0);
usr.bin/tmux/format.c
498
format_lost_client(struct client *c)
usr.bin/tmux/format.c
500
if (c->jobs != NULL)
usr.bin/tmux/format.c
501
format_job_tidy(c->jobs, 1);
usr.bin/tmux/format.c
502
free(c->jobs);
usr.bin/tmux/format.c
5079
struct client *c = ft->client;
usr.bin/tmux/format.c
5103
ft->c != NULL &&
usr.bin/tmux/format.c
5104
s->id == ft->c->session->id)
usr.bin/tmux/format.c
5108
nft = format_create(c, item, FORMAT_NONE, ft->flags);
usr.bin/tmux/format.c
5113
format_defaults(nft, ft->c, s, NULL, NULL);
usr.bin/tmux/format.c
5196
struct client *c = ft->client;
usr.bin/tmux/format.c
5231
nft = format_create(c, item, FORMAT_WINDOW|w->id, ft->flags);
usr.bin/tmux/format.c
5250
format_defaults(nft, ft->c, s, wl, NULL);
usr.bin/tmux/format.c
5278
struct client *c = ft->client;
usr.bin/tmux/format.c
5310
nft = format_create(c, item, FORMAT_PANE|wp->id, ft->flags);
usr.bin/tmux/format.c
5315
format_defaults(nft, ft->c, ft->s, ft->wl, wp);
usr.bin/tmux/format.c
5376
format_defaults(nft, ft->c, ft->s, ft->wl, ft->wp);
usr.bin/tmux/format.c
5433
format_defaults(nft, ft->c, ft->s, ft->wl, ft->wp);
usr.bin/tmux/format.c
5532
struct client *c = ft->client;
usr.bin/tmux/format.c
5561
nft = format_create(c, item, FORMAT_NONE, ft->flags);
usr.bin/tmux/format.c
5581
format_defaults(nft, ft->c, ft->s, ft->wl, ft->wp);
usr.bin/tmux/format.c
5608
struct client *c, **l;
usr.bin/tmux/format.c
5623
c = l[i];
usr.bin/tmux/format.c
5624
format_log(es, "client loop: %s", c->name);
usr.bin/tmux/format.c
5625
nft = format_create(c, item, 0, ft->flags);
usr.bin/tmux/format.c
5630
format_defaults(nft, c, ft->s, ft->wl, ft->wp);
usr.bin/tmux/format.c
5795
struct client *c = arg;
usr.bin/tmux/format.c
5797
if (c->message_string == NULL && c->prompt == NULL)
usr.bin/tmux/format.c
5798
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/format.c
5803
format_cycle_start_timer(struct client *c)
usr.bin/tmux/format.c
5810
if (!event_initialized(&c->cycle_timer))
usr.bin/tmux/format.c
5811
evtimer_set(&c->cycle_timer, format_cycle_callback, c);
usr.bin/tmux/format.c
5812
if (!evtimer_pending(&c->cycle_timer, NULL))
usr.bin/tmux/format.c
5813
evtimer_add(&c->cycle_timer, &tv);
usr.bin/tmux/format.c
5875
int j, c;
usr.bin/tmux/format.c
6142
if (ft->c == NULL ||
usr.bin/tmux/format.c
6143
ft->c->tty.term == NULL ||
usr.bin/tmux/format.c
6144
ft->c->flags & CLIENT_UNATTACHEDFLAGS) {
usr.bin/tmux/format.c
6149
if (tty_term_has_name(ft->c->tty.term, copy))
usr.bin/tmux/format.c
6155
if (tty_feature_present(ft->c->tty.term, copy))
usr.bin/tmux/format.c
6161
envent = environ_find(ft->c->environ, copy);
usr.bin/tmux/format.c
6187
c = strtonum(new, 32, 126, &errstr);
usr.bin/tmux/format.c
6191
xasprintf(&value, "%c", c);
usr.bin/tmux/format.c
6202
else if ((c = colour_fromstring(new)) == -1)
usr.bin/tmux/format.c
6206
cp = colour_toescape(ft->c, c, 1);
usr.bin/tmux/format.c
6208
cp = colour_toescape(ft->c, c, 0);
usr.bin/tmux/format.c
6215
c = colour_fromstring(new);
usr.bin/tmux/format.c
6216
if (c == -1 || (c = colour_force_rgb(c)) == -1)
usr.bin/tmux/format.c
6219
xasprintf(&value, "%06x", c & 0xffffff);
usr.bin/tmux/format.c
6748
format_single(struct cmdq_item *item, const char *fmt, struct client *c,
usr.bin/tmux/format.c
6754
ft = format_create_defaults(item, c, s, wl, wp);
usr.bin/tmux/format.c
6763
struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/format.c
6765
return (format_single(item, fmt, c, fs->s, fs->wl, fs->wp));
usr.bin/tmux/format.c
6779
format_create_defaults(struct cmdq_item *item, struct client *c,
usr.bin/tmux/format.c
6788
format_defaults(ft, c, s, wl, wp);
usr.bin/tmux/format.c
6794
format_create_from_state(struct cmdq_item *item, struct client *c,
usr.bin/tmux/format.c
6797
return (format_create_defaults(item, c, fs->s, fs->wl, fs->wp));
usr.bin/tmux/format.c
6811
format_defaults(struct format_tree *ft, struct client *c, struct session *s,
usr.bin/tmux/format.c
6816
if (c != NULL && c->name != NULL)
usr.bin/tmux/format.c
6817
log_debug("%s: c=%s", __func__, c->name);
usr.bin/tmux/format.c
6833
if (c != NULL && s != NULL && c->session != s)
usr.bin/tmux/format.c
6845
if (s == NULL && c != NULL)
usr.bin/tmux/format.c
6846
s = c->session;
usr.bin/tmux/format.c
6852
if (c != NULL)
usr.bin/tmux/format.c
6853
format_defaults_client(ft, c);
usr.bin/tmux/format.c
6875
format_defaults_client(struct format_tree *ft, struct client *c)
usr.bin/tmux/format.c
6878
ft->s = c->session;
usr.bin/tmux/format.c
6879
ft->c = c;
usr.bin/tmux/grid.c
62
u_char c)
usr.bin/tmux/grid.c
75
gce->data.data = c;
usr.bin/tmux/grid.c
812
int c;
usr.bin/tmux/grid.c
816
c = colour_theme_terminal_colour(gc->fg & 0xff);
usr.bin/tmux/grid.c
817
if (c == 8)
usr.bin/tmux/grid.c
820
values[n++] = c + 30;
usr.bin/tmux/grid.c
868
int c;
usr.bin/tmux/grid.c
872
c = colour_theme_terminal_colour(gc->bg & 0xff);
usr.bin/tmux/grid.c
873
if (c == 8)
usr.bin/tmux/grid.c
876
values[n++] = c + 40;
usr.bin/tmux/grid.c
924
int c;
usr.bin/tmux/grid.c
928
c = colour_theme_terminal_colour(gc->us & 0xff);
usr.bin/tmux/grid.c
929
if (c == 8)
usr.bin/tmux/grid.c
934
values[n++] = c;
usr.bin/tmux/hooks.c
206
struct client *c;
usr.bin/tmux/hooks.c
211
c = event_payload_get_client(ep, "client");
usr.bin/tmux/hooks.c
212
ft = format_create(c, item, FORMAT_NONE, FORMAT_NOJOBS);
usr.bin/tmux/hooks.c
223
hd.client = c;
usr.bin/tmux/hooks.c
400
if (change->c != NULL)
usr.bin/tmux/hooks.c
401
event_payload_set_client(ep, "client", change->c);
usr.bin/tmux/input-keys.c
352
input_key_split2(u_int c, u_char *dst)
usr.bin/tmux/input-keys.c
354
if (c > 0x7f) {
usr.bin/tmux/input-keys.c
355
dst[0] = (c >> 6) | 0xc0;
usr.bin/tmux/input-keys.c
356
dst[1] = (c & 0x3f) | 0x80;
usr.bin/tmux/input-keys.c
359
dst[0] = c;
usr.bin/tmux/input.c
104
struct client *c;
usr.bin/tmux/input.c
2204
input_csi_dispatch_sgr_256_do(struct input_ctx *ictx, int fgbg, int c)
usr.bin/tmux/input.c
2208
if (c == -1 || c > 255) {
usr.bin/tmux/input.c
2215
gc->fg = c | COLOUR_FLAG_256;
usr.bin/tmux/input.c
2217
gc->bg = c | COLOUR_FLAG_256;
usr.bin/tmux/input.c
2219
gc->us = c | COLOUR_FLAG_256;
usr.bin/tmux/input.c
2228
int c;
usr.bin/tmux/input.c
2230
c = input_get(ictx, (*i) + 1, 0, -1);
usr.bin/tmux/input.c
2231
if (input_csi_dispatch_sgr_256_do(ictx, fgbg, c))
usr.bin/tmux/input.c
2860
input_osc_colour_reply(struct input_ctx *ictx, int add, u_int n, int idx, int c,
usr.bin/tmux/input.c
2866
if (c != -1)
usr.bin/tmux/input.c
2867
c = colour_force_rgb(c);
usr.bin/tmux/input.c
2868
if (c == -1)
usr.bin/tmux/input.c
2870
colour_split_rgb(c, &r, &g, &b);
usr.bin/tmux/input.c
2894
int c, bad = 0, redraw = 0;
usr.bin/tmux/input.c
2911
c = colour_palette_get(palette, idx|COLOUR_FLAG_256);
usr.bin/tmux/input.c
2912
if (c != -1) {
usr.bin/tmux/input.c
2913
input_osc_colour_reply(ictx, 1, 4, idx, c,
usr.bin/tmux/input.c
2922
if ((c = colour_parseX11(s)) == -1) {
usr.bin/tmux/input.c
2926
if (colour_palette_set(palette, idx, c))
usr.bin/tmux/input.c
3036
int c;
usr.bin/tmux/input.c
3041
c = window_pane_get_fg_control_client(wp);
usr.bin/tmux/input.c
3042
if (c == -1) {
usr.bin/tmux/input.c
3045
c = window_pane_get_fg(wp);
usr.bin/tmux/input.c
3047
c = defaults.fg;
usr.bin/tmux/input.c
3049
input_osc_colour_reply(ictx, 1, 10, 0, c, ictx->input_end);
usr.bin/tmux/input.c
3053
if ((c = colour_parseX11(p)) == -1) {
usr.bin/tmux/input.c
3058
ictx->palette->fg = c;
usr.bin/tmux/input.c
3086
int c;
usr.bin/tmux/input.c
3091
c = window_pane_get_bg(wp);
usr.bin/tmux/input.c
3092
input_osc_colour_reply(ictx, 1, 11, 0, c, ictx->input_end);
usr.bin/tmux/input.c
3096
if ((c = colour_parseX11(p)) == -1) {
usr.bin/tmux/input.c
3101
ictx->palette->bg = c;
usr.bin/tmux/input.c
3129
int c;
usr.bin/tmux/input.c
3133
c = ictx->ctx.s->ccolour;
usr.bin/tmux/input.c
3134
if (c == -1)
usr.bin/tmux/input.c
3135
c = ictx->ctx.s->default_ccolour;
usr.bin/tmux/input.c
3136
input_osc_colour_reply(ictx, 1, 12, 0, c,
usr.bin/tmux/input.c
3142
if ((c = colour_parseX11(p)) == -1) {
usr.bin/tmux/input.c
3146
screen_set_cursor_colour(ictx->ctx.s, c);
usr.bin/tmux/input.c
3391
if (ictx->c == NULL) {
usr.bin/tmux/input.c
3395
tty_set_selection(&ictx->c->tty, clip, out, outlen);
usr.bin/tmux/input.c
3534
if (ir->c != NULL)
usr.bin/tmux/input.c
3535
TAILQ_REMOVE(&ir->c->input_requests, ir, centry);
usr.bin/tmux/input.c
3550
struct client *c = NULL, *loop;
usr.bin/tmux/input.c
3565
if (c == NULL)
usr.bin/tmux/input.c
3566
c = loop;
usr.bin/tmux/input.c
3567
else if (timercmp(&loop->activity_time, &c->activity_time, >))
usr.bin/tmux/input.c
3568
c = loop;
usr.bin/tmux/input.c
3570
if (c == NULL)
usr.bin/tmux/input.c
3574
ir->c = c;
usr.bin/tmux/input.c
3577
TAILQ_INSERT_TAIL(&c->input_requests, ir, centry);
usr.bin/tmux/input.c
3582
tty_puts(&c->tty, s);
usr.bin/tmux/input.c
3585
tty_putcode_ss(&c->tty, TTYC_MS, "", "?");
usr.bin/tmux/input.c
3600
input_osc_colour_reply(ir->ictx, 0, 4, pd->idx, pd->c, ir->end);
usr.bin/tmux/input.c
3630
input_request_reply(struct client *c, enum input_request_type type, void *data)
usr.bin/tmux/input.c
3636
TAILQ_FOREACH_SAFE(ir, &c->input_requests, centry, ir1) {
usr.bin/tmux/input.c
3675
input_cancel_requests(struct client *c)
usr.bin/tmux/input.c
3679
TAILQ_FOREACH_SAFE(ir, &c->input_requests, centry, ir1)
usr.bin/tmux/input.c
62
struct client *c;
usr.bin/tmux/input.c
877
struct colour_palette *palette, struct client *c)
usr.bin/tmux/input.c
885
ictx->c = c;
usr.bin/tmux/key-bindings.c
330
struct client *c;
usr.bin/tmux/key-bindings.c
335
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/key-bindings.c
336
if (c->keytable == table)
usr.bin/tmux/key-bindings.c
337
server_client_set_key_table(c, NULL);
usr.bin/tmux/key-bindings.c
759
struct client *c, struct key_event *event, struct cmd_find_state *fs)
usr.bin/tmux/key-bindings.c
765
if (c == NULL || (~c->flags & CLIENT_READONLY))
usr.bin/tmux/key-bindings.c
782
new_item = cmdq_append(c, new_item);
usr.bin/tmux/menu.c
134
s = format_single_from_state(qitem, cmd, c, fs);
usr.bin/tmux/menu.c
136
s = format_single(qitem, cmd, c, NULL, NULL, NULL);
usr.bin/tmux/menu.c
327
menu_key(struct client *c, struct menu_data *md, struct key_event *event)
usr.bin/tmux/menu.c
530
status = cmd_parse_and_append(item->command, NULL, c, state, &error);
usr.bin/tmux/menu.c
532
cmdq_append(c, cmdq_get_error(error));
usr.bin/tmux/menu.c
56
struct cmdq_item *qitem, struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/menu.c
573
struct cmdq_item *item, u_int px, u_int py, struct client *c,
usr.bin/tmux/menu.c
587
w = c->session->curw->window;
usr.bin/tmux/menu.c
61
menu_add_item(menu, loop, qitem, c, fs);
usr.bin/tmux/menu.c
66
struct cmdq_item *qitem, struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/menu.c
90
s = format_single_from_state(qitem, item->name, c, fs);
usr.bin/tmux/menu.c
92
s = format_single(qitem, item->name, c, NULL, NULL, NULL);
usr.bin/tmux/menu.c
98
max_width = c->tty.sx - 4;
usr.bin/tmux/mode-tree.c
1090
struct client *c = cmdq_get_client(item);
usr.bin/tmux/mode-tree.c
1093
if (mtd->prompt != NULL && c != NULL)
usr.bin/tmux/mode-tree.c
1094
mode_tree_key(mtd, c, &key, NULL, NULL, NULL);
usr.bin/tmux/mode-tree.c
1107
return (mtp->inputcb(mtp->c, mtp->data, s, key));
usr.bin/tmux/mode-tree.c
1125
mode_tree_set_prompt(struct mode_tree_data *mtd, struct client *c,
usr.bin/tmux/mode-tree.c
1134
if (c != NULL && c->session != NULL) {
usr.bin/tmux/mode-tree.c
1135
s = c->session;
usr.bin/tmux/mode-tree.c
1146
mtp->c = c;
usr.bin/tmux/mode-tree.c
1169
if ((flags & PROMPT_SINGLE) && (flags & PROMPT_ACCEPT) && c != NULL) {
usr.bin/tmux/mode-tree.c
1171
cmdq_append(c, cmdq_get_callback(mode_tree_prompt_accept, mtd));
usr.bin/tmux/mode-tree.c
1296
mode_tree_search_callback(__unused struct client *c, void *data, const char *s,
usr.bin/tmux/mode-tree.c
1319
mode_tree_filter_callback(__unused struct client *c, void *data, const char *s,
usr.bin/tmux/mode-tree.c
1367
mtd->menucb(mtd->modedata, mtm->c, key);
usr.bin/tmux/mode-tree.c
1375
mode_tree_display_menu(struct mode_tree_data *mtd, struct client *c, u_int x,
usr.bin/tmux/mode-tree.c
1399
menu_add_items(menu, items, NULL, c, NULL);
usr.bin/tmux/mode-tree.c
1404
mtm->c = c;
usr.bin/tmux/mode-tree.c
1414
if (menu_display(menu, 0, 0, NULL, x, y, c, BOX_LINES_DEFAULT, NULL,
usr.bin/tmux/mode-tree.c
145
struct client *c;
usr.bin/tmux/mode-tree.c
1497
mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,
usr.bin/tmux/mode-tree.c
1520
mtp->c = c;
usr.bin/tmux/mode-tree.c
1542
mtp->c = NULL;
usr.bin/tmux/mode-tree.c
156
struct client *c;
usr.bin/tmux/mode-tree.c
1589
mode_tree_display_menu(mtd, c, x, y, 1);
usr.bin/tmux/mode-tree.c
1603
mode_tree_display_menu(mtd, c, x, y, 0);
usr.bin/tmux/mode-tree.c
1608
mode_tree_display_menu(mtd, c, x, y, 0);
usr.bin/tmux/mode-tree.c
1773
mode_tree_set_prompt(mtd, c, "(search) ", "",
usr.bin/tmux/mode-tree.c
1786
mode_tree_set_prompt(mtd, c, "(filter) ", mtd->filter,
usr.bin/tmux/mode-tree.c
1815
mode_tree_run_command(struct client *c, struct cmd_find_state *fs,
usr.bin/tmux/mode-tree.c
1825
status = cmd_parse_and_append(command, NULL, c, state, &error);
usr.bin/tmux/mode-tree.c
1827
if (c != NULL) {
usr.bin/tmux/mode-tree.c
1829
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/mode-tree.c
539
struct client *c, key_code key, int current)
usr.bin/tmux/mode-tree.c
550
cb(mtd->modedata, mti->itemdata, c, key);
usr.bin/tmux/mode-tree.c
555
cb(mtd->modedata, mti->itemdata, c, key);
usr.bin/tmux/monitor.c
101
monitor_create_formats(struct client *c, struct session *s, struct winlink *wl,
usr.bin/tmux/monitor.c
107
format_defaults(ft, c, s, wl, wp);
usr.bin/tmux/monitor.c
192
change.c = ms->client;
usr.bin/tmux/monitor.c
242
struct client *c = ms->client;
usr.bin/tmux/monitor.c
260
ft = monitor_create_formats(c, s, wl, wp);
usr.bin/tmux/monitor.c
322
struct client *c = ms->client;
usr.bin/tmux/monitor.c
338
ft = monitor_create_formats(c, s, wl, NULL);
usr.bin/tmux/monitor.c
401
struct client *c = ms->client;
usr.bin/tmux/monitor.c
406
ft = monitor_create_formats(c, s, NULL, NULL);
usr.bin/tmux/monitor.c
440
struct client *c = ms->client;
usr.bin/tmux/monitor.c
451
ft = monitor_create_formats(c, s, wl, wp);
usr.bin/tmux/monitor.c
470
struct client *c = ms->client;
usr.bin/tmux/monitor.c
479
ft = monitor_create_formats(c, s, wl, NULL);
usr.bin/tmux/monitor.c
550
monitor_create_client(struct client *c, monitor_cb cb, void *data)
usr.bin/tmux/monitor.c
555
ms->client = c;
usr.bin/tmux/popup.c
108
ft = format_create_defaults(NULL, c, s, s->curw, NULL);
usr.bin/tmux/popup.c
143
pd->c->flags |= CLIENT_REDRAWOVERLAY;
usr.bin/tmux/popup.c
147
popup_set_client_cb(struct tty_ctx *ttyctx, struct client *c)
usr.bin/tmux/popup.c
151
if (c != pd->c)
usr.bin/tmux/popup.c
153
if (pd->c->flags & CLIENT_REDRAWOVERLAY)
usr.bin/tmux/popup.c
158
ttyctx->wsx = c->tty.sx;
usr.bin/tmux/popup.c
159
ttyctx->wsy = c->tty.sy;
usr.bin/tmux/popup.c
187
popup_mode_cb(__unused struct client *c, void *data, u_int *cx, u_int *cy)
usr.bin/tmux/popup.c
203
popup_check_cb(__unused struct client* c, void *data, u_int px, u_int py,
usr.bin/tmux/popup.c
215
popup_draw_cb(struct client *c, void *data)
usr.bin/tmux/popup.c
218
struct tty *tty = &c->tty;
usr.bin/tmux/popup.c
257
c->overlay_check = NULL;
usr.bin/tmux/popup.c
258
c->overlay_data = NULL;
usr.bin/tmux/popup.c
262
c->overlay_check = popup_check_cb;
usr.bin/tmux/popup.c
263
c->overlay_data = pd;
usr.bin/tmux/popup.c
267
popup_free_cb(__unused struct client *c, void *data)
usr.bin/tmux/popup.c
286
popup_resize_cb(__unused struct client *c, void *data)
usr.bin/tmux/popup.c
289
struct tty *tty = &c->tty;
usr.bin/tmux/popup.c
31
struct client *c;
usr.bin/tmux/popup.c
325
popup_handle_drag(struct client *c, struct popup_data *pd,
usr.bin/tmux/popup.c
335
else if (m->x - pd->dx + pd->sx > c->tty.sx)
usr.bin/tmux/popup.c
336
px = c->tty.sx - pd->sx;
usr.bin/tmux/popup.c
341
else if (m->y - pd->dy + pd->sy > c->tty.sy)
usr.bin/tmux/popup.c
342
py = c->tty.sy - pd->sy;
usr.bin/tmux/popup.c
351
server_redraw_client(c);
usr.bin/tmux/popup.c
378
server_redraw_client(c);
usr.bin/tmux/popup.c
383
popup_key_cb(struct client *c, void *data, struct key_event *event)
usr.bin/tmux/popup.c
394
popup_handle_drag(c, pd, m);
usr.bin/tmux/popup.c
468
struct client *c = pd->c;
usr.bin/tmux/popup.c
476
c->overlay_check = NULL;
usr.bin/tmux/popup.c
477
c->overlay_data = NULL;
usr.bin/tmux/popup.c
479
c->overlay_check = popup_check_cb;
usr.bin/tmux/popup.c
480
c->overlay_data = pd;
usr.bin/tmux/popup.c
502
server_client_clear_overlay(pd->c);
usr.bin/tmux/popup.c
506
popup_present(struct client *c)
usr.bin/tmux/popup.c
508
return (c->overlay_draw == popup_draw_cb);
usr.bin/tmux/popup.c
512
popup_modify(struct client *c, const char *title, const char *style,
usr.bin/tmux/popup.c
515
struct popup_data *pd = c->overlay_data;
usr.bin/tmux/popup.c
551
tty_resize(&c->tty);
usr.bin/tmux/popup.c
556
server_redraw_client(c);
usr.bin/tmux/popup.c
563
int argc, char **argv, const char *cwd, const char *title, struct client *c,
usr.bin/tmux/popup.c
575
o = c->session->curw->window->options;
usr.bin/tmux/popup.c
590
if (c->tty.sx < sx || c->tty.sy < sy)
usr.bin/tmux/popup.c
604
pd->c = c;
usr.bin/tmux/popup.c
605
pd->c->references++;
usr.bin/tmux/popup.c
656
pd->ictx = input_init(NULL, job_get_event(pd->job), &pd->palette, c);
usr.bin/tmux/popup.c
658
server_client_set_overlay(c, 0, popup_check_cb, popup_mode_cb,
usr.bin/tmux/popup.c
79
server_client_unref(pd->c);
usr.bin/tmux/popup.c
98
struct client *c = pd->c;
usr.bin/tmux/popup.c
99
struct session *s = c->session;
usr.bin/tmux/resize.c
109
if ((c->flags & CLIENT_CONTROL) &&
usr.bin/tmux/resize.c
110
(~c->flags & CLIENT_SIZECHANGED) &&
usr.bin/tmux/resize.c
111
(~c->flags & CLIENT_WINDOWSIZECHANGED))
usr.bin/tmux/resize.c
132
clients_calculate_size(int type, int current, struct client *c,
usr.bin/tmux/resize.c
170
if (loop != c && ignore_client_size(loop)) {
usr.bin/tmux/resize.c
174
if (loop != c && skip_client(loop, type, current, s, w)) {
usr.bin/tmux/resize.c
231
if (loop != c && ignore_client_size(loop))
usr.bin/tmux/resize.c
233
if (loop != c && skip_client(loop, type, current, s, w))
usr.bin/tmux/resize.c
284
default_window_size(struct client *c, struct session *s, struct window *w,
usr.bin/tmux/resize.c
297
if (type == WINDOW_SIZE_LATEST && c != NULL && !ignore_client_size(c)) {
usr.bin/tmux/resize.c
298
*sx = c->tty.sx;
usr.bin/tmux/resize.c
299
*sy = c->tty.sy - status_line_size(c);
usr.bin/tmux/resize.c
300
*xpixel = c->tty.xpixel;
usr.bin/tmux/resize.c
301
*ypixel = c->tty.ypixel;
usr.bin/tmux/resize.c
303
c->name);
usr.bin/tmux/resize.c
311
if (c != NULL && (c->flags & CLIENT_CONTROL))
usr.bin/tmux/resize.c
312
c = NULL;
usr.bin/tmux/resize.c
318
if (!clients_calculate_size(type, 0, c, s, w,
usr.bin/tmux/resize.c
435
struct client *c;
usr.bin/tmux/resize.c
451
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/resize.c
452
s = c->session;
usr.bin/tmux/resize.c
453
if (s != NULL && !(c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/resize.c
455
if (ignore_client_size(c))
usr.bin/tmux/resize.c
457
if (c->tty.sy <= s->statuslines || (c->flags & CLIENT_CONTROL))
usr.bin/tmux/resize.c
458
c->flags |= CLIENT_STATUSOFF;
usr.bin/tmux/resize.c
460
c->flags &= ~CLIENT_STATUSOFF;
usr.bin/tmux/resize.c
87
ignore_client_size(struct client *c)
usr.bin/tmux/resize.c
91
if (c->session == NULL)
usr.bin/tmux/resize.c
93
if (c->flags & CLIENT_NOSIZEFLAGS)
usr.bin/tmux/resize.c
95
if (c->flags & CLIENT_IGNORESIZE) {
usr.bin/tmux/screen-redraw.c
1032
log_debug("%s: finished building @%u scene", c->name, w->id);
usr.bin/tmux/screen-redraw.c
1079
redraw_get_scene(struct client *c)
usr.bin/tmux/screen-redraw.c
1081
struct redraw_scene *scene = c->redraw_scene;
usr.bin/tmux/screen-redraw.c
1082
struct window *w = c->session->curw->window;
usr.bin/tmux/screen-redraw.c
1086
redraw_get_window_offset(c, &ox, &oy, &sx, &sy);
usr.bin/tmux/screen-redraw.c
1098
log_debug("%s: @%u scene invalid: %s", c->name, w->id, reason);
usr.bin/tmux/screen-redraw.c
1100
scene = redraw_make_scene(c);
usr.bin/tmux/screen-redraw.c
1101
c->redraw_scene = scene;
usr.bin/tmux/screen-redraw.c
1112
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1113
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1136
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1137
struct session *s = c->session;
usr.bin/tmux/screen-redraw.c
1143
ft = format_create_defaults(NULL, c, s, s->curw, NULL);
usr.bin/tmux/screen-redraw.c
1218
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1219
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1246
window_pane_get_border_style(wp, c, &gc);
usr.bin/tmux/screen-redraw.c
1273
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1274
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1295
struct tty *tty = &scene->c->tty;
usr.bin/tmux/screen-redraw.c
1371
struct tty *tty = &scene->c->tty;
usr.bin/tmux/screen-redraw.c
1387
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1388
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1602
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1603
struct session *s = c->session;
usr.bin/tmux/screen-redraw.c
1605
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1615
lines = status_line_size(c);
usr.bin/tmux/screen-redraw.c
1620
if ((c->flags & CLIENT_UTF8) && tty_term_has(tty->term, TTYC_BIDI))
usr.bin/tmux/screen-redraw.c
1629
struct client *c = scene->c;
usr.bin/tmux/screen-redraw.c
1630
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1682
redraw_draw(struct client *c, struct window_pane *wp, int flags)
usr.bin/tmux/screen-redraw.c
1685
struct session *s = c->session;
usr.bin/tmux/screen-redraw.c
1687
struct tty *tty = &c->tty;
usr.bin/tmux/screen-redraw.c
1697
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/screen-redraw.c
1701
if (c->message_string != NULL)
usr.bin/tmux/screen-redraw.c
1702
redraw = status_message_redraw(c);
usr.bin/tmux/screen-redraw.c
1703
else if (c->prompt != NULL)
usr.bin/tmux/screen-redraw.c
1704
redraw = status_prompt_redraw(c);
usr.bin/tmux/screen-redraw.c
1706
redraw = status_redraw(c);
usr.bin/tmux/screen-redraw.c
1715
log_debug("%s: starting @%u redraw (%s)", c->name, w->id,
usr.bin/tmux/screen-redraw.c
1719
scene = redraw_get_scene(c);
usr.bin/tmux/screen-redraw.c
1746
if (window_make_pane_status(loop, c, width, first)) {
usr.bin/tmux/screen-redraw.c
1796
if (c->message_string != NULL || c->prompt != NULL)
usr.bin/tmux/screen-redraw.c
1801
y = c->tty.sy - lines;
usr.bin/tmux/screen-redraw.c
1802
sl = c->status.active;
usr.bin/tmux/screen-redraw.c
1814
if (c->overlay_draw != NULL && (flags & REDRAW_OVERLAY))
usr.bin/tmux/screen-redraw.c
1815
c->overlay_draw(c, c->overlay_data);
usr.bin/tmux/screen-redraw.c
1820
log_debug("%s: finished @%u redraw", c->name, scene->w->id);
usr.bin/tmux/screen-redraw.c
1860
redraw_screen(struct client *c)
usr.bin/tmux/screen-redraw.c
1864
if (c->flags & CLIENT_REDRAWWINDOW) {
usr.bin/tmux/screen-redraw.c
1865
if (c->flags & CLIENT_REDRAWOVERLAY)
usr.bin/tmux/screen-redraw.c
1866
redraw_draw(c, NULL, REDRAW_ALL);
usr.bin/tmux/screen-redraw.c
1868
redraw_draw(c, NULL, REDRAW_ALL & ~REDRAW_OVERLAY);
usr.bin/tmux/screen-redraw.c
1870
if (c->flags & CLIENT_REDRAWBORDERS)
usr.bin/tmux/screen-redraw.c
1872
if (c->flags & CLIENT_REDRAWSTATUS)
usr.bin/tmux/screen-redraw.c
1874
if (c->flags & CLIENT_REDRAWOVERLAY)
usr.bin/tmux/screen-redraw.c
1876
if (c->flags & CLIENT_REDRAWMENU)
usr.bin/tmux/screen-redraw.c
1878
if (c->session->curw->window->menu != NULL)
usr.bin/tmux/screen-redraw.c
1881
redraw_draw(c, NULL, flags);
usr.bin/tmux/screen-redraw.c
1887
redraw_pane(struct client *c, struct window_pane *wp)
usr.bin/tmux/screen-redraw.c
1889
redraw_draw(c, wp, REDRAW_PANE|REDRAW_PANE_SCROLLBAR);
usr.bin/tmux/screen-redraw.c
1890
if (c->session->curw->window->menu != NULL)
usr.bin/tmux/screen-redraw.c
1891
redraw_draw(c, NULL, REDRAW_MENU);
usr.bin/tmux/screen-redraw.c
1896
redraw_pane_scrollbar(struct client *c, struct window_pane *wp)
usr.bin/tmux/screen-redraw.c
1898
redraw_draw(c, wp, REDRAW_PANE_SCROLLBAR);
usr.bin/tmux/screen-redraw.c
197
struct client *c;
usr.bin/tmux/screen-redraw.c
218
struct client *c;
usr.bin/tmux/screen-redraw.c
278
redraw_get_window_offset(struct client *c, u_int *ox, u_int *oy, u_int *sx,
usr.bin/tmux/screen-redraw.c
283
tty_window_offset(&c->tty, ox, oy, sx, sy);
usr.bin/tmux/screen-redraw.c
285
tty_sx = c->tty.sx;
usr.bin/tmux/screen-redraw.c
286
tty_sy = c->tty.sy - status_line_size(c);
usr.bin/tmux/screen-redraw.c
295
redraw_set_context(struct client *c, struct redraw_build_ctx *bctx)
usr.bin/tmux/screen-redraw.c
297
struct session *s = c->session;
usr.bin/tmux/screen-redraw.c
301
bctx->c = c;
usr.bin/tmux/screen-redraw.c
303
redraw_get_window_offset(c, &bctx->ox, &bctx->oy, &bctx->sx, &bctx->sy);
usr.bin/tmux/screen-redraw.c
969
redraw_make_scene(struct client *c)
usr.bin/tmux/screen-redraw.c
971
struct session *s = c->session;
usr.bin/tmux/screen-redraw.c
981
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/screen-redraw.c
984
redraw_set_context(c, &bctx);
usr.bin/tmux/screen-redraw.c
987
c->name, w->id, bctx.sx, bctx.sy, bctx.ox, bctx.oy,
usr.bin/tmux/screen-redraw.c
993
scene->c = c;
usr.bin/tmux/screen-write.c
135
screen_write_set_client_cb(struct tty_ctx *ttyctx, struct client *c)
usr.bin/tmux/screen-write.c
140
if (session_has(c->session, wp->window))
usr.bin/tmux/screen-write.c
145
if (c->session->curw->window != wp->window)
usr.bin/tmux/screen-write.c
152
if (c->flags & CLIENT_REDRAWWINDOW) {
usr.bin/tmux/screen-write.c
163
if (tty_window_offset(&c->tty, &ttyctx->wox, &ttyctx->woy, &ttyctx->wsx,
usr.bin/tmux/screen-write.c
172
if (status_at_line(c) == 0)
usr.bin/tmux/screen-write.c
173
ttyctx->yoff += status_line_size(c);
usr.bin/tmux/screen.c
183
int c;
usr.bin/tmux/screen.c
188
c = options_get_number(oo, "cursor-style");
usr.bin/tmux/screen.c
190
screen_set_cursor_style(c, &s->default_cstyle, &s->default_mode);
usr.bin/tmux/server-acl.c
101
c->exit_message = xstrdup("access not allowed");
usr.bin/tmux/server-acl.c
102
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server-acl.c
104
c->flags |= CLIENT_READONLY;
usr.bin/tmux/server-acl.c
106
c->flags &= ~CLIENT_READONLY;
usr.bin/tmux/server-acl.c
222
server_acl_join(struct client *c)
usr.bin/tmux/server-acl.c
226
entry = server_acl_check(c);
usr.bin/tmux/server-acl.c
230
c->flags |= CLIENT_READONLY;
usr.bin/tmux/server-acl.c
71
server_acl_check(struct client *c)
usr.bin/tmux/server-acl.c
77
uid = proc_get_peer_uid(c->peer);
usr.bin/tmux/server-acl.c
85
gid = proc_get_peer_gid(c->peer);
usr.bin/tmux/server-acl.c
96
struct client *c;
usr.bin/tmux/server-acl.c
98
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-acl.c
99
entry = server_acl_check(c);
usr.bin/tmux/server-client.c
100
evtimer_add(&c->overlay_timer, &tv);
usr.bin/tmux/server-client.c
102
c->overlay_check = checkcb;
usr.bin/tmux/server-client.c
1026
if (loc == KEYC_MOUSE_LOCATION_NOWHERE && c->tty.mouse_scrolling_flag) {
usr.bin/tmux/server-client.c
103
c->overlay_mode = modecb;
usr.bin/tmux/server-client.c
104
c->overlay_draw = drawcb;
usr.bin/tmux/server-client.c
1041
tty_window_offset(&c->tty, &m->ox, &m->oy, &sx, &sy);
usr.bin/tmux/server-client.c
1045
server_client_update_scrollbar_hover(c, type, -1, -1);
usr.bin/tmux/server-client.c
105
c->overlay_key = keycb;
usr.bin/tmux/server-client.c
1053
c->tty.mouse_drag_flag != 0 &&
usr.bin/tmux/server-client.c
106
c->overlay_free = freecb;
usr.bin/tmux/server-client.c
1062
server_client_update_scrollbar_hover(c, type,
usr.bin/tmux/server-client.c
1064
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/server-client.c
1065
c->tty.mouse_drag_release = NULL;
usr.bin/tmux/server-client.c
1066
c->tty.mouse_drag_flag = 0;
usr.bin/tmux/server-client.c
1067
c->tty.mouse_scrolling_flag = 0;
usr.bin/tmux/server-client.c
1068
c->tty.mouse_slider_mpos = -1;
usr.bin/tmux/server-client.c
1069
c->tty.mouse_last_pane = -1;
usr.bin/tmux/server-client.c
107
c->overlay_resize = resizecb;
usr.bin/tmux/server-client.c
1078
server_client_update_scrollbar_hover(c, type, px, py);
usr.bin/tmux/server-client.c
108
c->overlay_data = data;
usr.bin/tmux/server-client.c
110
if (c->overlay_check == NULL)
usr.bin/tmux/server-client.c
111
c->tty.flags |= TTY_FREEZE;
usr.bin/tmux/server-client.c
1118
server_client_update_scrollbar_hover(c, type, -1, -1);
usr.bin/tmux/server-client.c
112
if (c->overlay_mode == NULL)
usr.bin/tmux/server-client.c
1125
(m->b != c->click_button ||
usr.bin/tmux/server-client.c
1126
loc != (enum key_code_mouse_location)c->click_loc ||
usr.bin/tmux/server-client.c
1127
m->wp != c->click_wp)) {
usr.bin/tmux/server-client.c
113
c->tty.flags |= TTY_NOCURSOR;
usr.bin/tmux/server-client.c
1130
c->flags &= ~CLIENT_TRIPLECLICK;
usr.bin/tmux/server-client.c
1131
c->flags |= CLIENT_DOUBLECLICK;
usr.bin/tmux/server-client.c
1135
memcpy(&c->click_event, m, sizeof c->click_event);
usr.bin/tmux/server-client.c
1136
c->click_button = m->b;
usr.bin/tmux/server-client.c
1137
c->click_loc = loc;
usr.bin/tmux/server-client.c
1138
c->click_wp = m->wp;
usr.bin/tmux/server-client.c
114
window_update_focus(c->session->curw->window);
usr.bin/tmux/server-client.c
1143
evtimer_del(&c->click_timer);
usr.bin/tmux/server-client.c
1144
evtimer_add(&c->click_timer, &tv);
usr.bin/tmux/server-client.c
115
server_redraw_client(c);
usr.bin/tmux/server-client.c
1156
c->tty.mouse_drag_flag != 0) {
usr.bin/tmux/server-client.c
1157
if (c->tty.mouse_drag_release != NULL)
usr.bin/tmux/server-client.c
1158
c->tty.mouse_drag_release(c, m);
usr.bin/tmux/server-client.c
1160
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/server-client.c
1161
c->tty.mouse_drag_release = NULL;
usr.bin/tmux/server-client.c
1162
c->tty.mouse_scrolling_flag = 0;
usr.bin/tmux/server-client.c
1169
c->tty.mouse_drag_flag = 0;
usr.bin/tmux/server-client.c
1170
c->tty.mouse_slider_mpos = -1;
usr.bin/tmux/server-client.c
1171
c->tty.mouse_last_pane = -1;
usr.bin/tmux/server-client.c
1187
if (c->tty.mouse_drag_update != NULL)
usr.bin/tmux/server-client.c
1196
if (c->tty.mouse_drag_flag == 0) {
usr.bin/tmux/server-client.c
1197
c->tty.mouse_drag_x = px;
usr.bin/tmux/server-client.c
1198
c->tty.mouse_drag_y = py;
usr.bin/tmux/server-client.c
120
server_client_clear_overlay(struct client *c)
usr.bin/tmux/server-client.c
1200
c->tty.mouse_drag_flag = MOUSE_BUTTONS(b) + 1;
usr.bin/tmux/server-client.c
1206
c->tty.mouse_last_pane = wp->id;
usr.bin/tmux/server-client.c
1208
if (c->tty.mouse_scrolling_flag == 0 &&
usr.bin/tmux/server-client.c
1210
c->tty.mouse_scrolling_flag = 1;
usr.bin/tmux/server-client.c
1212
c->tty.mouse_slider_mpos = sl_mpos +
usr.bin/tmux/server-client.c
1215
c->tty.mouse_slider_mpos = sl_mpos;
usr.bin/tmux/server-client.c
122
if (c->overlay_draw == NULL)
usr.bin/tmux/server-client.c
125
if (event_initialized(&c->overlay_timer))
usr.bin/tmux/server-client.c
1259
server_client_update_theme_colours(struct client *c)
usr.bin/tmux/server-client.c
126
evtimer_del(&c->overlay_timer);
usr.bin/tmux/server-client.c
1268
if (c == NULL)
usr.bin/tmux/server-client.c
1274
c->theme_colours[i] = colour_theme_terminal_colour(i);
usr.bin/tmux/server-client.c
1278
ft = format_create(c, NULL, FORMAT_NONE, FORMAT_NOJOBS);
usr.bin/tmux/server-client.c
1279
format_defaults(ft, c, NULL, NULL, NULL);
usr.bin/tmux/server-client.c
128
if (c->overlay_free != NULL)
usr.bin/tmux/server-client.c
1281
theme = c->theme;
usr.bin/tmux/server-client.c
1283
theme = colour_totheme(c->tty.bg);
usr.bin/tmux/server-client.c
1289
c->theme_colours[i] = 8;
usr.bin/tmux/server-client.c
129
c->overlay_free(c, c->overlay_data);
usr.bin/tmux/server-client.c
1299
c->theme_colours[i] = colour;
usr.bin/tmux/server-client.c
1307
server_client_is_bracket_paste(struct client *c, key_code key)
usr.bin/tmux/server-client.c
131
c->overlay_check = NULL;
usr.bin/tmux/server-client.c
1310
c->flags |= CLIENT_BRACKETPASTING;
usr.bin/tmux/server-client.c
1311
c->paste_time = current_time;
usr.bin/tmux/server-client.c
1312
log_debug("%s: bracket paste on", c->name);
usr.bin/tmux/server-client.c
1317
c->flags &= ~CLIENT_BRACKETPASTING;
usr.bin/tmux/server-client.c
1318
log_debug("%s: bracket paste off", c->name);
usr.bin/tmux/server-client.c
132
c->overlay_mode = NULL;
usr.bin/tmux/server-client.c
1322
return !!(c->flags & CLIENT_BRACKETPASTING);
usr.bin/tmux/server-client.c
1327
server_client_is_assume_paste(struct client *c)
usr.bin/tmux/server-client.c
1329
struct session *s = c->session;
usr.bin/tmux/server-client.c
133
c->overlay_draw = NULL;
usr.bin/tmux/server-client.c
1333
if (c->flags & CLIENT_BRACKETPASTING)
usr.bin/tmux/server-client.c
1337
if (tty_term_has(c->tty.term, TTYC_ENBP))
usr.bin/tmux/server-client.c
134
c->overlay_key = NULL;
usr.bin/tmux/server-client.c
1340
timersub(&c->activity_time, &c->last_activity_time, &tv);
usr.bin/tmux/server-client.c
1342
if (c->flags & CLIENT_ASSUMEPASTING)
usr.bin/tmux/server-client.c
1344
c->flags |= CLIENT_ASSUMEPASTING;
usr.bin/tmux/server-client.c
1345
c->paste_time = current_time;
usr.bin/tmux/server-client.c
1346
log_debug("%s: assume paste on", c->name);
usr.bin/tmux/server-client.c
1349
if (c->flags & CLIENT_ASSUMEPASTING) {
usr.bin/tmux/server-client.c
135
c->overlay_free = NULL;
usr.bin/tmux/server-client.c
1350
c->flags &= ~CLIENT_ASSUMEPASTING;
usr.bin/tmux/server-client.c
1351
log_debug("%s: assume paste off", c->name);
usr.bin/tmux/server-client.c
1358
server_client_update_latest(struct client *c)
usr.bin/tmux/server-client.c
136
c->overlay_resize = NULL;
usr.bin/tmux/server-client.c
1362
if (c->session == NULL)
usr.bin/tmux/server-client.c
1364
w = c->session->curw->window;
usr.bin/tmux/server-client.c
1366
if (w->latest == c)
usr.bin/tmux/server-client.c
1368
w->latest = c;
usr.bin/tmux/server-client.c
137
c->overlay_data = NULL;
usr.bin/tmux/server-client.c
1373
events_fire_client("client-active", c);
usr.bin/tmux/server-client.c
1378
server_client_repeat_time(struct client *c, struct key_binding *bd)
usr.bin/tmux/server-client.c
1380
struct session *s = c->session;
usr.bin/tmux/server-client.c
1388
if ((~c->flags & CLIENT_REPEAT) || bd->key != c->last_key) {
usr.bin/tmux/server-client.c
139
c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR);
usr.bin/tmux/server-client.c
140
if (c->session != NULL)
usr.bin/tmux/server-client.c
1404
struct client *c, *ec = event->client;
usr.bin/tmux/server-client.c
141
window_update_focus(c->session->curw->window);
usr.bin/tmux/server-client.c
142
server_redraw_client(c);
usr.bin/tmux/server-client.c
1420
c = ec;
usr.bin/tmux/server-client.c
1422
c = cmdq_get_client(item);
usr.bin/tmux/server-client.c
1423
s = c->session;
usr.bin/tmux/server-client.c
1426
if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/server-client.c
1431
memcpy(&c->last_activity_time, &c->activity_time,
usr.bin/tmux/server-client.c
1432
sizeof c->last_activity_time);
usr.bin/tmux/server-client.c
1433
if (gettimeofday(&c->activity_time, NULL) != 0)
usr.bin/tmux/server-client.c
1435
session_update_activity(s, &c->activity_time);
usr.bin/tmux/server-client.c
1440
if (c->flags & CLIENT_READONLY)
usr.bin/tmux/server-client.c
1442
key = server_client_check_mouse(c, event);
usr.bin/tmux/server-client.c
1454
c->tty.mouse_drag_update(c, m);
usr.bin/tmux/server-client.c
1462
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
1470
if (server_client_is_bracket_paste (c, key))
usr.bin/tmux/server-client.c
1478
server_client_is_assume_paste(c))
usr.bin/tmux/server-client.c
1485
if (server_client_is_default_key_table(c, c->keytable) &&
usr.bin/tmux/server-client.c
1491
table = c->keytable;
usr.bin/tmux/server-client.c
1505
server_client_set_key_table(c, "prefix");
usr.bin/tmux/server-client.c
1506
server_status_client(c);
usr.bin/tmux/server-client.c
1509
flags = c->flags;
usr.bin/tmux/server-client.c
1517
if (c->flags & CLIENT_REPEAT)
usr.bin/tmux/server-client.c
1529
server_client_key_table_activity_diff(c) > prefix_delay) {
usr.bin/tmux/server-client.c
1535
(c->flags & CLIENT_REPEAT) &&
usr.bin/tmux/server-client.c
1540
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
1541
first = table = c->keytable;
usr.bin/tmux/server-client.c
1542
server_status_client(c);
usr.bin/tmux/server-client.c
1554
if ((c->flags & CLIENT_REPEAT) &&
usr.bin/tmux/server-client.c
1558
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
1559
first = table = c->keytable;
usr.bin/tmux/server-client.c
1560
c->flags &= ~CLIENT_REPEAT;
usr.bin/tmux/server-client.c
1561
server_status_client(c);
usr.bin/tmux/server-client.c
1576
repeat = server_client_repeat_time(c, bd);
usr.bin/tmux/server-client.c
1578
c->flags |= CLIENT_REPEAT;
usr.bin/tmux/server-client.c
1579
c->last_key = bd->key;
usr.bin/tmux/server-client.c
1583
evtimer_del(&c->repeat_timer);
usr.bin/tmux/server-client.c
1584
evtimer_add(&c->repeat_timer, &tv);
usr.bin/tmux/server-client.c
1586
c->flags &= ~CLIENT_REPEAT;
usr.bin/tmux/server-client.c
1587
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
1589
server_status_client(c);
usr.bin/tmux/server-client.c
1592
key_bindings_dispatch(bd, item, c, event, &fs);
usr.bin/tmux/server-client.c
1622
if (!server_client_is_default_key_table(c, table) ||
usr.bin/tmux/server-client.c
1623
(c->flags & CLIENT_REPEAT)) {
usr.bin/tmux/server-client.c
1625
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
1626
table = c->keytable;
usr.bin/tmux/server-client.c
1627
if (c->flags & CLIENT_REPEAT)
usr.bin/tmux/server-client.c
1629
c->flags &= ~CLIENT_REPEAT;
usr.bin/tmux/server-client.c
1630
server_status_client(c);
usr.bin/tmux/server-client.c
1639
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
1640
server_status_client(c);
usr.bin/tmux/server-client.c
1654
if (c->flags & CLIENT_READONLY)
usr.bin/tmux/server-client.c
1657
window_pane_key(wp, c, s, wl, key, m);
usr.bin/tmux/server-client.c
1661
if (c->flags & CLIENT_READONLY)
usr.bin/tmux/server-client.c
1670
server_client_update_latest(c);
usr.bin/tmux/server-client.c
1680
server_client_handle_menu_key(struct client *c, struct key_event *event)
usr.bin/tmux/server-client.c
1682
struct window *w = c->session->curw->window;
usr.bin/tmux/server-client.c
1693
m->statusat = status_at_line(c);
usr.bin/tmux/server-client.c
1694
m->statuslines = status_line_size(c);
usr.bin/tmux/server-client.c
1696
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy);
usr.bin/tmux/server-client.c
1709
if (menu_key(c, w->menu, &new_event) == 1)
usr.bin/tmux/server-client.c
1716
server_client_handle_key0(struct client *c, struct key_event *event,
usr.bin/tmux/server-client.c
1719
struct session *s = c->session;
usr.bin/tmux/server-client.c
1724
if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/server-client.c
1732
server_client_report_theme(c, THEME_LIGHT);
usr.bin/tmux/server-client.c
1736
server_client_report_theme(c, THEME_DARK);
usr.bin/tmux/server-client.c
1745
if (~c->flags & CLIENT_READONLY) {
usr.bin/tmux/server-client.c
1746
if (c->message_string != NULL) {
usr.bin/tmux/server-client.c
1747
if (c->message_ignore_keys)
usr.bin/tmux/server-client.c
1749
status_message_clear(c);
usr.bin/tmux/server-client.c
1752
if (c->overlay_key != NULL) {
usr.bin/tmux/server-client.c
1753
switch (c->overlay_key(c, c->overlay_data, event)) {
usr.bin/tmux/server-client.c
1757
server_client_clear_overlay(c);
usr.bin/tmux/server-client.c
1762
server_client_clear_overlay(c);
usr.bin/tmux/server-client.c
1763
if (server_client_handle_menu_key(c, event))
usr.bin/tmux/server-client.c
1765
if (c->prompt != NULL) {
usr.bin/tmux/server-client.c
1766
switch (status_prompt_key(c, event->key, &event->m)) {
usr.bin/tmux/server-client.c
1787
switch (window_pane_prompt_key(wp, c, event->key,
usr.bin/tmux/server-client.c
1807
event->client = c;
usr.bin/tmux/server-client.c
1808
c->references++;
usr.bin/tmux/server-client.c
1814
cmdq_append(c, item);
usr.bin/tmux/server-client.c
1820
server_client_handle_key(struct client *c, struct key_event *event)
usr.bin/tmux/server-client.c
1822
return (server_client_handle_key0(c, event, NULL, NULL));
usr.bin/tmux/server-client.c
1827
server_client_handle_key_after(struct client *c, struct key_event *event,
usr.bin/tmux/server-client.c
1830
return (server_client_handle_key0(c, event, after, next));
usr.bin/tmux/server-client.c
1837
struct client *c;
usr.bin/tmux/server-client.c
1859
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-client.c
1860
server_client_check_exit(c);
usr.bin/tmux/server-client.c
1861
if (c->session != NULL && c->session->curw != NULL) {
usr.bin/tmux/server-client.c
1862
server_client_check_modes(c);
usr.bin/tmux/server-client.c
1863
server_client_check_redraw(c);
usr.bin/tmux/server-client.c
1864
server_client_reset_state(c);
usr.bin/tmux/server-client.c
1988
struct client *c;
usr.bin/tmux/server-client.c
2001
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-client.c
2002
if (c->session == NULL)
usr.bin/tmux/server-client.c
2006
if (~c->flags & CLIENT_CONTROL) {
usr.bin/tmux/server-client.c
2010
wpo = control_pane_offset(c, wp, &flag);
usr.bin/tmux/server-client.c
2021
__func__, c->name, wpo->used - wp->base_offset, new_size,
usr.bin/tmux/server-client.c
2046
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-client.c
2047
if (c->session == NULL || (~c->flags & CLIENT_CONTROL))
usr.bin/tmux/server-client.c
2049
wpo = control_pane_offset(c, wp, &flag);
usr.bin/tmux/server-client.c
2073
server_client_prompt_cursor(struct client *c, struct window_pane *wp, int *mode,
usr.bin/tmux/server-client.c
2076
struct tty *tty = &c->tty;
usr.bin/tmux/server-client.c
2086
if (status_at_line(c) == 0)
usr.bin/tmux/server-client.c
2100
if (status_at_line(c) == 0)
usr.bin/tmux/server-client.c
2101
*cy += status_line_size(c);
usr.bin/tmux/server-client.c
2117
server_client_reset_state(struct client *c)
usr.bin/tmux/server-client.c
2119
struct tty *tty = &c->tty;
usr.bin/tmux/server-client.c
2120
struct window *w = c->session->curw->window;
usr.bin/tmux/server-client.c
2123
struct options *oo = c->session->options;
usr.bin/tmux/server-client.c
2129
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
usr.bin/tmux/server-client.c
2137
if (c->overlay_draw != NULL) {
usr.bin/tmux/server-client.c
2138
if (c->overlay_mode != NULL)
usr.bin/tmux/server-client.c
2139
s = c->overlay_mode(c, c->overlay_data, &cx, &cy);
usr.bin/tmux/server-client.c
2143
} else if (wp != NULL && c->prompt == NULL)
usr.bin/tmux/server-client.c
2146
s = c->status.active;
usr.bin/tmux/server-client.c
2150
log_debug("%s: client %s mode %s", __func__, c->name,
usr.bin/tmux/server-client.c
2159
if (c->prompt != NULL) {
usr.bin/tmux/server-client.c
216
server_client_check_nested(struct client *c)
usr.bin/tmux/server-client.c
2161
status_prompt_cursor(c, &cx, &cy);
usr.bin/tmux/server-client.c
2162
} else if (wp != NULL && c->overlay_draw == NULL) {
usr.bin/tmux/server-client.c
2171
if (status_at_line(c) == 0)
usr.bin/tmux/server-client.c
2172
cy += status_line_size(c);
usr.bin/tmux/server-client.c
2176
prompt = server_client_prompt_cursor(c, wp, &mode, &cx,
usr.bin/tmux/server-client.c
221
envent = environ_find(c->environ, "TMUX");
usr.bin/tmux/server-client.c
2210
if (status_at_line(c) == 0)
usr.bin/tmux/server-client.c
2211
cy += status_line_size(c);
usr.bin/tmux/server-client.c
2217
} else if (c->overlay_mode == NULL || s == NULL)
usr.bin/tmux/server-client.c
2230
if (c->overlay_draw == NULL && w->menu == NULL) {
usr.bin/tmux/server-client.c
2246
if (c->overlay_draw == NULL && prompt)
usr.bin/tmux/server-client.c
226
if (strcmp(wp->tty, c->ttyname) == 0)
usr.bin/tmux/server-client.c
2262
struct client *c = data;
usr.bin/tmux/server-client.c
2264
if (c->flags & CLIENT_REPEAT) {
usr.bin/tmux/server-client.c
2265
server_client_set_key_table(c, NULL);
usr.bin/tmux/server-client.c
2266
c->flags &= ~CLIENT_REPEAT;
usr.bin/tmux/server-client.c
2267
server_status_client(c);
usr.bin/tmux/server-client.c
2275
struct client *c = data;
usr.bin/tmux/server-client.c
2280
if (c->flags & CLIENT_TRIPLECLICK) {
usr.bin/tmux/server-client.c
2287
memcpy(&event->m, &c->click_event, sizeof event->m);
usr.bin/tmux/server-client.c
2288
if (!server_client_handle_key(c, event)) {
usr.bin/tmux/server-client.c
2293
c->flags &= ~(CLIENT_DOUBLECLICK|CLIENT_TRIPLECLICK);
usr.bin/tmux/server-client.c
2298
server_client_start_exit_timer(struct client *c)
usr.bin/tmux/server-client.c
2302
if (!evtimer_pending(&c->exit_timer, NULL))
usr.bin/tmux/server-client.c
2303
evtimer_add(&c->exit_timer, &tv);
usr.bin/tmux/server-client.c
2310
struct client *c = data;
usr.bin/tmux/server-client.c
2313
if (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED))
usr.bin/tmux/server-client.c
2316
if (c->flags & CLIENT_EXITED) {
usr.bin/tmux/server-client.c
2317
log_debug("%s: %s took too long to exit", __func__, c->name);
usr.bin/tmux/server-client.c
2318
server_client_lost(c);
usr.bin/tmux/server-client.c
2319
} else if (c->flags & CLIENT_EXIT) {
usr.bin/tmux/server-client.c
2320
log_debug("%s: %s took too long to flush", __func__, c->name);
usr.bin/tmux/server-client.c
2321
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
2322
control_discard_all(c);
usr.bin/tmux/server-client.c
2323
RB_FOREACH(cf, client_files, &c->files)
usr.bin/tmux/server-client.c
2325
server_client_check_exit(c);
usr.bin/tmux/server-client.c
2331
server_client_check_exit(struct client *c)
usr.bin/tmux/server-client.c
2334
const char *name = c->exit_session;
usr.bin/tmux/server-client.c
2338
if (c->flags & (CLIENT_DEAD|CLIENT_EXITED))
usr.bin/tmux/server-client.c
234
server_client_set_key_table(struct client *c, const char *name)
usr.bin/tmux/server-client.c
2340
if (~c->flags & CLIENT_EXIT)
usr.bin/tmux/server-client.c
2343
if (c->flags & CLIENT_CONTROL) {
usr.bin/tmux/server-client.c
2344
control_discard(c);
usr.bin/tmux/server-client.c
2345
if (!control_all_done(c)) {
usr.bin/tmux/server-client.c
2346
server_client_start_exit_timer(c);
usr.bin/tmux/server-client.c
2350
RB_FOREACH(cf, client_files, &c->files) {
usr.bin/tmux/server-client.c
2352
server_client_start_exit_timer(c);
usr.bin/tmux/server-client.c
2356
c->flags |= CLIENT_EXITED;
usr.bin/tmux/server-client.c
2358
evtimer_del(&c->exit_timer);
usr.bin/tmux/server-client.c
2359
server_client_start_exit_timer(c);
usr.bin/tmux/server-client.c
2361
switch (c->exit_type) {
usr.bin/tmux/server-client.c
2363
if (c->exit_message != NULL)
usr.bin/tmux/server-client.c
2364
msize = strlen(c->exit_message) + 1;
usr.bin/tmux/server-client.c
2367
size = (sizeof c->retval) + msize;
usr.bin/tmux/server-client.c
2369
memcpy(data, &c->retval, sizeof c->retval);
usr.bin/tmux/server-client.c
237
name = server_client_get_key_table(c);
usr.bin/tmux/server-client.c
2370
if (c->exit_message != NULL)
usr.bin/tmux/server-client.c
2371
memcpy(data + sizeof c->retval, c->exit_message, msize);
usr.bin/tmux/server-client.c
2372
proc_send(c->peer, MSG_EXIT, -1, data, size);
usr.bin/tmux/server-client.c
2376
proc_send(c->peer, MSG_SHUTDOWN, -1, NULL, 0);
usr.bin/tmux/server-client.c
2379
proc_send(c->peer, c->exit_msgtype, -1, name, strlen(name) + 1);
usr.bin/tmux/server-client.c
2382
free(c->exit_session);
usr.bin/tmux/server-client.c
2383
free(c->exit_message);
usr.bin/tmux/server-client.c
239
key_bindings_unref_table(c->keytable);
usr.bin/tmux/server-client.c
2399
server_client_check_modes(struct client *c)
usr.bin/tmux/server-client.c
240
c->keytable = key_bindings_get_table(name, 1);
usr.bin/tmux/server-client.c
2401
struct window *w = c->session->curw->window;
usr.bin/tmux/server-client.c
2405
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
usr.bin/tmux/server-client.c
2407
if (~c->flags & CLIENT_REDRAWSTATUS)
usr.bin/tmux/server-client.c
241
c->keytable->references++;
usr.bin/tmux/server-client.c
2418
server_client_any_pane_redraw(struct client *c)
usr.bin/tmux/server-client.c
242
if (gettimeofday(&c->keytable->activity_time, NULL) != 0)
usr.bin/tmux/server-client.c
2420
struct session *s = c->session;
usr.bin/tmux/server-client.c
2424
if (c->flags & CLIENT_REDRAWWINDOW)
usr.bin/tmux/server-client.c
2435
server_client_check_redraw(struct client *c)
usr.bin/tmux/server-client.c
2437
struct session *s = c->session;
usr.bin/tmux/server-client.c
2438
struct tty *tty = &c->tty;
usr.bin/tmux/server-client.c
2446
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
usr.bin/tmux/server-client.c
2448
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
usr.bin/tmux/server-client.c
2449
log_debug("%s: redraw%s%s%s%s%s", c->name,
usr.bin/tmux/server-client.c
2450
(c->flags & CLIENT_REDRAWWINDOW) ? " window" : "",
usr.bin/tmux/server-client.c
2451
(c->flags & CLIENT_REDRAWSTATUS) ? " status" : "",
usr.bin/tmux/server-client.c
2452
(c->flags & CLIENT_REDRAWBORDERS) ? " borders" : "",
usr.bin/tmux/server-client.c
2453
(c->flags & CLIENT_REDRAWOVERLAY) ? " overlay" : "",
usr.bin/tmux/server-client.c
2454
(c->flags & CLIENT_REDRAWMENU) ? " menu" : "");
usr.bin/tmux/server-client.c
2459
if (c->flags & CLIENT_ALLREDRAWFLAGS)
usr.bin/tmux/server-client.c
2461
else if (server_client_any_pane_redraw(c))
usr.bin/tmux/server-client.c
2464
c->flags &= ~CLIENT_STATUSFORCE;
usr.bin/tmux/server-client.c
247
server_client_key_table_activity_diff(struct client *c)
usr.bin/tmux/server-client.c
2476
log_debug("%s: redraw deferred (%zu left)", c->name, n);
usr.bin/tmux/server-client.c
2478
log_debug("%s: redraw deferred (blocked)", c->name);
usr.bin/tmux/server-client.c
2485
if (server_client_any_pane_redraw(c))
usr.bin/tmux/server-client.c
2486
c->flags |= CLIENT_REDRAWWINDOW;
usr.bin/tmux/server-client.c
2491
log_debug("%s: redraw needed", c->name);
usr.bin/tmux/server-client.c
2499
if (~c->flags & CLIENT_REDRAWWINDOW) {
usr.bin/tmux/server-client.c
2504
redraw_pane(c, wp);
usr.bin/tmux/server-client.c
2508
redraw_pane_scrollbar(c, wp);
usr.bin/tmux/server-client.c
251
timersub(&c->activity_time, &c->keytable->activity_time, &diff);
usr.bin/tmux/server-client.c
2517
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
usr.bin/tmux/server-client.c
2519
server_client_set_title(c);
usr.bin/tmux/server-client.c
2520
server_client_set_path(c);
usr.bin/tmux/server-client.c
2522
server_client_set_progress_bar(c);
usr.bin/tmux/server-client.c
2523
redraw_screen(c);
usr.bin/tmux/server-client.c
2535
c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);
usr.bin/tmux/server-client.c
2536
c->redraw = EVBUFFER_LENGTH(tty->out);
usr.bin/tmux/server-client.c
2537
log_debug("%s: redraw added %zu bytes", c->name, c->redraw);
usr.bin/tmux/server-client.c
2542
server_client_set_title(struct client *c)
usr.bin/tmux/server-client.c
2544
struct session *s = c->session;
usr.bin/tmux/server-client.c
2551
ft = format_create(c, NULL, FORMAT_NONE, 0);
usr.bin/tmux/server-client.c
2552
format_defaults(ft, c, NULL, NULL, NULL);
usr.bin/tmux/server-client.c
2555
if (c->title == NULL || strcmp(title, c->title) != 0) {
usr.bin/tmux/server-client.c
2556
free(c->title);
usr.bin/tmux/server-client.c
2557
c->title = xstrdup(title);
usr.bin/tmux/server-client.c
2558
tty_set_title(&c->tty, c->title);
usr.bin/tmux/server-client.c
2567
server_client_set_path(struct client *c)
usr.bin/tmux/server-client.c
2569
struct session *s = c->session;
usr.bin/tmux/server-client.c
257
server_client_get_key_table(struct client *c)
usr.bin/tmux/server-client.c
2578
if (c->path == NULL || strcmp(path, c->path) != 0) {
usr.bin/tmux/server-client.c
2579
free(c->path);
usr.bin/tmux/server-client.c
2580
c->path = xstrdup(path);
usr.bin/tmux/server-client.c
2581
tty_set_path(&c->tty, c->path);
usr.bin/tmux/server-client.c
2587
server_client_set_progress_bar(struct client *c)
usr.bin/tmux/server-client.c
2589
struct session *s = c->session;
usr.bin/tmux/server-client.c
259
struct session *s = c->session;
usr.bin/tmux/server-client.c
2595
if (pane_pb->state == c->progress_bar.state &&
usr.bin/tmux/server-client.c
2596
pane_pb->progress == c->progress_bar.progress)
usr.bin/tmux/server-client.c
2598
memcpy(&c->progress_bar, pane_pb, sizeof c->progress_bar);
usr.bin/tmux/server-client.c
2599
tty_set_progress_bar(&c->tty, &c->progress_bar);
usr.bin/tmux/server-client.c
2606
struct client *c = arg;
usr.bin/tmux/server-client.c
2611
if (c->flags & CLIENT_DEAD)
usr.bin/tmux/server-client.c
2615
server_client_lost(c);
usr.bin/tmux/server-client.c
2634
if (server_client_dispatch_identify(c, imsg) != 0)
usr.bin/tmux/server-client.c
2638
if (server_client_dispatch_command(c, imsg) != 0)
usr.bin/tmux/server-client.c
2645
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
2647
server_client_update_latest(c);
usr.bin/tmux/server-client.c
2648
old_sx = c->tty.sx;
usr.bin/tmux/server-client.c
2649
old_sy = c->tty.sy;
usr.bin/tmux/server-client.c
2650
tty_resize(&c->tty);
usr.bin/tmux/server-client.c
2651
tty_repeat_requests(&c->tty, 0);
usr.bin/tmux/server-client.c
2653
if (c->overlay_resize == NULL)
usr.bin/tmux/server-client.c
2654
server_client_clear_overlay(c);
usr.bin/tmux/server-client.c
2656
c->overlay_resize(c, c->overlay_data);
usr.bin/tmux/server-client.c
2657
server_redraw_client(c);
usr.bin/tmux/server-client.c
2658
if (c->session != NULL)
usr.bin/tmux/server-client.c
2659
server_client_fire_resized(c, old_sx, old_sy);
usr.bin/tmux/server-client.c
2664
server_client_set_session(c, NULL);
usr.bin/tmux/server-client.c
2666
tty_close(&c->tty);
usr.bin/tmux/server-client.c
2667
proc_send(c->peer, MSG_EXITED, -1, NULL, 0);
usr.bin/tmux/server-client.c
2674
if (!(c->flags & CLIENT_SUSPENDED))
usr.bin/tmux/server-client.c
2676
c->flags &= ~CLIENT_SUSPENDED;
usr.bin/tmux/server-client.c
2678
if (c->fd == -1 || c->session == NULL) /* exited already */
usr.bin/tmux/server-client.c
2680
s = c->session;
usr.bin/tmux/server-client.c
2682
if (gettimeofday(&c->activity_time, NULL) != 0)
usr.bin/tmux/server-client.c
2685
tty_start_tty(&c->tty);
usr.bin/tmux/server-client.c
2686
server_redraw_client(c);
usr.bin/tmux/server-client.c
2690
session_update_activity(s, &c->activity_time);
usr.bin/tmux/server-client.c
2695
if (server_client_dispatch_shell(c) != 0)
usr.bin/tmux/server-client.c
2699
if (file_write_ready(&c->files, imsg) != 0)
usr.bin/tmux/server-client.c
2703
if (file_read_data(&c->files, imsg) != 0)
usr.bin/tmux/server-client.c
2707
if (file_read_done(&c->files, imsg) != 0)
usr.bin/tmux/server-client.c
2715
log_debug("client %p invalid message type %d", c, imsg->hdr.type);
usr.bin/tmux/server-client.c
2716
proc_kill_peer(c->peer);
usr.bin/tmux/server-client.c
273
server_client_is_default_key_table(struct client *c, struct key_table *table)
usr.bin/tmux/server-client.c
2731
struct client *c = cmdq_get_client(item);
usr.bin/tmux/server-client.c
2736
if ((c->flags & CLIENT_READONLY) &&
usr.bin/tmux/server-client.c
2749
struct client *c = cmdq_get_client(item);
usr.bin/tmux/server-client.c
275
return (strcmp(table->name, server_client_get_key_table(c)) == 0);
usr.bin/tmux/server-client.c
2751
if (~c->flags & CLIENT_ATTACHED)
usr.bin/tmux/server-client.c
2752
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server-client.c
2753
else if (~c->flags & CLIENT_EXIT) {
usr.bin/tmux/server-client.c
2754
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
2755
control_ready(c);
usr.bin/tmux/server-client.c
2756
tty_send_requests(&c->tty);
usr.bin/tmux/server-client.c
2763
server_client_dispatch_command(struct client *c, struct imsg *imsg)
usr.bin/tmux/server-client.c
2774
if (c->flags & CLIENT_EXIT)
usr.bin/tmux/server-client.c
2808
if ((c->flags & CLIENT_READONLY) &&
usr.bin/tmux/server-client.c
2816
cmdq_append(c, new_item);
usr.bin/tmux/server-client.c
2817
cmdq_append(c, cmdq_get_callback(server_client_command_done, NULL));
usr.bin/tmux/server-client.c
282
struct client *c;
usr.bin/tmux/server-client.c
2824
cmdq_append(c, cmdq_get_error(cause));
usr.bin/tmux/server-client.c
2827
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server-client.c
2833
server_client_dispatch_identify(struct client *c, struct imsg *imsg)
usr.bin/tmux/server-client.c
2841
if (c->flags & CLIENT_IDENTIFIED)
usr.bin/tmux/server-client.c
2852
c->term_features |= feat;
usr.bin/tmux/server-client.c
2853
log_debug("client %p IDENTIFY_FEATURES %s", c,
usr.bin/tmux/server-client.c
2860
c->flags |= flags;
usr.bin/tmux/server-client.c
2861
log_debug("client %p IDENTIFY_FLAGS %#x", c, flags);
usr.bin/tmux/server-client.c
2867
c->flags |= longflags;
usr.bin/tmux/server-client.c
2868
log_debug("client %p IDENTIFY_LONGFLAGS %#llx", c,
usr.bin/tmux/server-client.c
287
c = xcalloc(1, sizeof *c);
usr.bin/tmux/server-client.c
2874
c->term_name = xstrdup(data);
usr.bin/tmux/server-client.c
2875
log_debug("client %p IDENTIFY_TERM %s", c, data);
usr.bin/tmux/server-client.c
288
c->references = 1;
usr.bin/tmux/server-client.c
2880
c->term_caps = xreallocarray(c->term_caps, c->term_ncaps + 1,
usr.bin/tmux/server-client.c
2881
sizeof *c->term_caps);
usr.bin/tmux/server-client.c
2882
c->term_caps[c->term_ncaps++] = xstrdup(data);
usr.bin/tmux/server-client.c
2883
log_debug("client %p IDENTIFY_TERMINFO %s", c, data);
usr.bin/tmux/server-client.c
2888
c->ttyname = xstrdup(data);
usr.bin/tmux/server-client.c
2889
log_debug("client %p IDENTIFY_TTYNAME %s", c, data);
usr.bin/tmux/server-client.c
289
c->peer = proc_add_peer(server_proc, fd, server_client_dispatch, c);
usr.bin/tmux/server-client.c
2895
c->cwd = xstrdup(data);
usr.bin/tmux/server-client.c
2897
c->cwd = xstrdup(home);
usr.bin/tmux/server-client.c
2899
c->cwd = xstrdup("/");
usr.bin/tmux/server-client.c
2900
log_debug("client %p IDENTIFY_CWD %s", c, data);
usr.bin/tmux/server-client.c
2905
c->fd = imsg_get_fd(imsg);
usr.bin/tmux/server-client.c
2906
log_debug("client %p IDENTIFY_STDIN %d", c, c->fd);
usr.bin/tmux/server-client.c
291
if (gettimeofday(&c->creation_time, NULL) != 0)
usr.bin/tmux/server-client.c
2911
c->out_fd = imsg_get_fd(imsg);
usr.bin/tmux/server-client.c
2912
log_debug("client %p IDENTIFY_STDOUT %d", c, c->out_fd);
usr.bin/tmux/server-client.c
2918
environ_put(c->environ, data, 0);
usr.bin/tmux/server-client.c
2919
log_debug("client %p IDENTIFY_ENVIRON %s", c, data);
usr.bin/tmux/server-client.c
2922
if (datalen != sizeof c->pid)
usr.bin/tmux/server-client.c
2924
memcpy(&c->pid, data, sizeof c->pid);
usr.bin/tmux/server-client.c
2925
log_debug("client %p IDENTIFY_CLIENTPID %ld", c, (long)c->pid);
usr.bin/tmux/server-client.c
293
memcpy(&c->activity_time, &c->creation_time, sizeof c->activity_time);
usr.bin/tmux/server-client.c
2933
c->flags |= CLIENT_IDENTIFIED;
usr.bin/tmux/server-client.c
2935
if (c->term_name == NULL || *c->term_name == '\0') {
usr.bin/tmux/server-client.c
2936
free(c->term_name);
usr.bin/tmux/server-client.c
2937
c->term_name = xstrdup("unknown");
usr.bin/tmux/server-client.c
2940
if (c->ttyname != NULL && *c->ttyname != '\0')
usr.bin/tmux/server-client.c
2941
name = xstrdup(c->ttyname);
usr.bin/tmux/server-client.c
2943
xasprintf(&name, "client-%ld", (long)c->pid);
usr.bin/tmux/server-client.c
2944
c->name = name;
usr.bin/tmux/server-client.c
2945
log_debug("client %p name is %s", c, c->name);
usr.bin/tmux/server-client.c
2947
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
2948
control_start(c);
usr.bin/tmux/server-client.c
2949
else if (c->fd != -1) {
usr.bin/tmux/server-client.c
295
c->environ = environ_create();
usr.bin/tmux/server-client.c
2950
if (tty_init(&c->tty, c) != 0) {
usr.bin/tmux/server-client.c
2951
close(c->fd);
usr.bin/tmux/server-client.c
2952
c->fd = -1;
usr.bin/tmux/server-client.c
2954
tty_resize(&c->tty);
usr.bin/tmux/server-client.c
2955
c->flags |= CLIENT_TERMINAL;
usr.bin/tmux/server-client.c
2957
if (c->out_fd != -1)
usr.bin/tmux/server-client.c
2958
close(c->out_fd);
usr.bin/tmux/server-client.c
2959
c->out_fd = -1;
usr.bin/tmux/server-client.c
2961
if (c->flags & (CLIENT_CONTROL|CLIENT_TERMINAL))
usr.bin/tmux/server-client.c
2962
events_fire_client("client-created", c);
usr.bin/tmux/server-client.c
2965
if (c->flags & (CLIENT_BRACKETPASTING|CLIENT_ASSUMEPASTING) &&
usr.bin/tmux/server-client.c
2966
current_time - c->paste_time > CLIENT_PASTE_TIME_LIMIT) {
usr.bin/tmux/server-client.c
2967
log_debug("%s: paste time limit exceeded", c->name);
usr.bin/tmux/server-client.c
2968
c->flags &= ~(CLIENT_BRACKETPASTING|CLIENT_ASSUMEPASTING);
usr.bin/tmux/server-client.c
297
c->fd = -1;
usr.bin/tmux/server-client.c
2976
if ((~c->flags & CLIENT_EXIT) &&
usr.bin/tmux/server-client.c
2978
c == TAILQ_FIRST(&clients))
usr.bin/tmux/server-client.c
298
c->out_fd = -1;
usr.bin/tmux/server-client.c
2986
server_client_dispatch_shell(struct client *c)
usr.bin/tmux/server-client.c
2993
proc_send(c->peer, MSG_SHELL, -1, shell, strlen(shell) + 1);
usr.bin/tmux/server-client.c
2995
proc_kill_peer(c->peer);
usr.bin/tmux/server-client.c
300
c->queue = cmdq_new();
usr.bin/tmux/server-client.c
3001
server_client_get_cwd(struct client *c, struct session *s)
usr.bin/tmux/server-client.c
3007
if (c != NULL && c->session == NULL && c->cwd != NULL)
usr.bin/tmux/server-client.c
3008
return (c->cwd);
usr.bin/tmux/server-client.c
301
RB_INIT(&c->files);
usr.bin/tmux/server-client.c
3011
if (c != NULL && (s = c->session) != NULL && s->cwd != NULL)
usr.bin/tmux/server-client.c
3020
server_client_control_flags(struct client *c, const char *next)
usr.bin/tmux/server-client.c
3023
c->pause_age = 0;
usr.bin/tmux/server-client.c
3026
if (sscanf(next, "pause-after=%u", &c->pause_age) == 1) {
usr.bin/tmux/server-client.c
3027
c->pause_age *= 1000;
usr.bin/tmux/server-client.c
303
c->tty.sx = 80;
usr.bin/tmux/server-client.c
3039
server_client_set_flags(struct client *c, const char *flags)
usr.bin/tmux/server-client.c
304
c->tty.sy = 24;
usr.bin/tmux/server-client.c
3051
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
3052
flag = server_client_control_flags(c, next);
usr.bin/tmux/server-client.c
3064
log_debug("client %s set flag %s", c->name, next);
usr.bin/tmux/server-client.c
3066
if (c->flags & CLIENT_READONLY)
usr.bin/tmux/server-client.c
3068
c->flags &= ~flag;
usr.bin/tmux/server-client.c
307
c->theme_colours[i] = 8;
usr.bin/tmux/server-client.c
3070
c->flags |= flag;
usr.bin/tmux/server-client.c
3072
control_reset_offsets(c);
usr.bin/tmux/server-client.c
3075
proc_send(c->peer, MSG_FLAGS, -1, &c->flags, sizeof c->flags);
usr.bin/tmux/server-client.c
308
c->theme = THEME_UNKNOWN;
usr.bin/tmux/server-client.c
3080
server_client_get_flags(struct client *c)
usr.bin/tmux/server-client.c
3086
if (c->flags & CLIENT_ATTACHED)
usr.bin/tmux/server-client.c
3088
if (c->flags & CLIENT_FOCUSED)
usr.bin/tmux/server-client.c
3090
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
3092
if (c->flags & CLIENT_IGNORESIZE)
usr.bin/tmux/server-client.c
3094
if (c->flags & CLIENT_NO_DETACH_ON_DESTROY)
usr.bin/tmux/server-client.c
3096
if (c->flags & CLIENT_CONTROL_NOOUTPUT)
usr.bin/tmux/server-client.c
3098
if (c->flags & CLIENT_CONTROL_WAITEXIT)
usr.bin/tmux/server-client.c
310
status_init(c);
usr.bin/tmux/server-client.c
3100
if (c->flags & CLIENT_CONTROL_PAUSEAFTER) {
usr.bin/tmux/server-client.c
3102
c->pause_age / 1000);
usr.bin/tmux/server-client.c
3105
if (c->flags & CLIENT_READONLY)
usr.bin/tmux/server-client.c
3107
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/server-client.c
3109
if (c->flags & CLIENT_UTF8)
usr.bin/tmux/server-client.c
311
c->flags |= CLIENT_FOCUSED;
usr.bin/tmux/server-client.c
3120
struct client *c;
usr.bin/tmux/server-client.c
3122
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-client.c
3123
if (c->tty.mouse_last_pane == (int)wp->id) {
usr.bin/tmux/server-client.c
3124
c->tty.mouse_last_pane = -1;
usr.bin/tmux/server-client.c
3125
c->tty.mouse_drag_update = NULL;
usr.bin/tmux/server-client.c
3126
c->tty.mouse_scrolling_flag = 0;
usr.bin/tmux/server-client.c
313
c->keytable = key_bindings_get_table("root", 1);
usr.bin/tmux/server-client.c
3133
server_client_print(struct client *c, int parse, struct evbuffer *evb)
usr.bin/tmux/server-client.c
314
c->keytable->references++;
usr.bin/tmux/server-client.c
3155
if (c == NULL)
usr.bin/tmux/server-client.c
3158
if (c->session == NULL || (c->flags & CLIENT_CONTROL)) {
usr.bin/tmux/server-client.c
3159
if (~c->flags & CLIENT_UTF8) {
usr.bin/tmux/server-client.c
316
evtimer_set(&c->repeat_timer, server_client_repeat_timer, c);
usr.bin/tmux/server-client.c
3161
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
3162
control_write(c, "%s", sanitized);
usr.bin/tmux/server-client.c
3164
file_print(c, "%s\n", sanitized);
usr.bin/tmux/server-client.c
3167
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
3168
control_write(c, "%s", msg);
usr.bin/tmux/server-client.c
317
evtimer_set(&c->click_timer, server_client_click_timer, c);
usr.bin/tmux/server-client.c
3170
file_print(c, "%s\n", msg);
usr.bin/tmux/server-client.c
3175
wp = c->session->curw->window->active;
usr.bin/tmux/server-client.c
318
evtimer_set(&c->exit_timer, server_client_exit_timer, c);
usr.bin/tmux/server-client.c
320
c->click_wp = -1;
usr.bin/tmux/server-client.c
3203
server_client_report_theme(struct client *c, enum client_theme theme)
usr.bin/tmux/server-client.c
3205
enum client_theme old = c->theme;
usr.bin/tmux/server-client.c
3208
c->theme = THEME_LIGHT;
usr.bin/tmux/server-client.c
3209
events_fire_client("client-light-theme", c);
usr.bin/tmux/server-client.c
3211
c->theme = THEME_DARK;
usr.bin/tmux/server-client.c
3212
events_fire_client("client-dark-theme", c);
usr.bin/tmux/server-client.c
3219
if (c->theme != old) {
usr.bin/tmux/server-client.c
322
TAILQ_INIT(&c->input_requests);
usr.bin/tmux/server-client.c
3220
server_client_update_theme_colours(c);
usr.bin/tmux/server-client.c
3221
if (c->tty.flags & TTY_OPENED)
usr.bin/tmux/server-client.c
3222
tty_invalidate(&c->tty);
usr.bin/tmux/server-client.c
3223
server_redraw_client(c);
usr.bin/tmux/server-client.c
3230
tty_repeat_requests(&c->tty, 1);
usr.bin/tmux/server-client.c
324
TAILQ_INSERT_TAIL(&clients, c, entry);
usr.bin/tmux/server-client.c
325
log_debug("new client %p", c);
usr.bin/tmux/server-client.c
326
return (c);
usr.bin/tmux/server-client.c
331
server_client_open(struct client *c, char **cause)
usr.bin/tmux/server-client.c
335
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
338
if (strcmp(c->ttyname, ttynam) == 0||
usr.bin/tmux/server-client.c
341
strcmp(c->ttyname, ttynam) == 0) ||
usr.bin/tmux/server-client.c
344
strcmp(c->ttyname, ttynam) == 0) ||
usr.bin/tmux/server-client.c
347
strcmp(c->ttyname, ttynam) == 0))) {
usr.bin/tmux/server-client.c
348
xasprintf(cause, "can't use %s", c->ttyname);
usr.bin/tmux/server-client.c
352
if (!(c->flags & CLIENT_TERMINAL)) {
usr.bin/tmux/server-client.c
357
if (tty_open(&c->tty, cause) != 0)
usr.bin/tmux/server-client.c
360
server_client_update_theme_colours(c);
usr.bin/tmux/server-client.c
366
server_client_attached_lost(struct client *c)
usr.bin/tmux/server-client.c
373
log_debug("lost attached client %p", c);
usr.bin/tmux/server-client.c
380
if (w->latest != c)
usr.bin/tmux/server-client.c
386
if (loop == c || s == NULL || s->curw->window != w)
usr.bin/tmux/server-client.c
399
server_client_fire_session_changed(struct client *c, struct session *old)
usr.bin/tmux/server-client.c
405
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
407
event_payload_set_client(ep, "client", c);
usr.bin/tmux/server-client.c
427
server_client_fire_resized(struct client *c, u_int old_sx, u_int old_sy)
usr.bin/tmux/server-client.c
433
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
435
event_payload_set_client(ep, "client", c);
usr.bin/tmux/server-client.c
446
event_payload_set_uint(ep, "width", c->tty.sx);
usr.bin/tmux/server-client.c
447
event_payload_set_uint(ep, "height", c->tty.sy);
usr.bin/tmux/server-client.c
455
server_client_set_session(struct client *c, struct session *s)
usr.bin/tmux/server-client.c
457
struct session *old = c->session;
usr.bin/tmux/server-client.c
459
if (s != NULL && c->session != NULL && c->session != s)
usr.bin/tmux/server-client.c
460
c->last_session = c->session;
usr.bin/tmux/server-client.c
462
c->last_session = NULL;
usr.bin/tmux/server-client.c
463
c->session = s;
usr.bin/tmux/server-client.c
464
c->flags |= CLIENT_FOCUSED;
usr.bin/tmux/server-client.c
469
s->curw->window->latest = c;
usr.bin/tmux/server-client.c
477
tty_update_client_offset(c);
usr.bin/tmux/server-client.c
478
status_timer_start(c);
usr.bin/tmux/server-client.c
479
server_client_fire_session_changed(c, old);
usr.bin/tmux/server-client.c
480
server_redraw_client(c);
usr.bin/tmux/server-client.c
489
server_client_lost(struct client *c)
usr.bin/tmux/server-client.c
493
if (cfg_client == c)
usr.bin/tmux/server-client.c
495
c->flags |= CLIENT_DEAD;
usr.bin/tmux/server-client.c
497
server_client_clear_overlay(c);
usr.bin/tmux/server-client.c
498
status_prompt_clear(c);
usr.bin/tmux/server-client.c
499
status_message_clear(c);
usr.bin/tmux/server-client.c
501
RB_FOREACH_SAFE(cf, client_files, &c->files, cf1) {
usr.bin/tmux/server-client.c
506
TAILQ_REMOVE(&clients, c, entry);
usr.bin/tmux/server-client.c
507
log_debug("lost client %p", c);
usr.bin/tmux/server-client.c
509
if (c->flags & CLIENT_ATTACHED) {
usr.bin/tmux/server-client.c
510
server_client_attached_lost(c);
usr.bin/tmux/server-client.c
511
events_fire_client("client-detached", c);
usr.bin/tmux/server-client.c
513
if (c->name != NULL && (c->flags & (CLIENT_CONTROL|CLIENT_TERMINAL)))
usr.bin/tmux/server-client.c
514
events_fire_client("client-closed", c);
usr.bin/tmux/server-client.c
516
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-client.c
517
control_stop(c);
usr.bin/tmux/server-client.c
518
if (c->flags & CLIENT_TERMINAL)
usr.bin/tmux/server-client.c
519
tty_free(&c->tty);
usr.bin/tmux/server-client.c
520
free(c->ttyname);
usr.bin/tmux/server-client.c
521
free(c->clipboard_panes);
usr.bin/tmux/server-client.c
523
free(c->term_name);
usr.bin/tmux/server-client.c
524
free(c->term_type);
usr.bin/tmux/server-client.c
525
tty_term_free_list(c->term_caps, c->term_ncaps);
usr.bin/tmux/server-client.c
527
status_free(c);
usr.bin/tmux/server-client.c
528
input_cancel_requests(c);
usr.bin/tmux/server-client.c
530
free(c->title);
usr.bin/tmux/server-client.c
531
free((void *)c->cwd);
usr.bin/tmux/server-client.c
533
evtimer_del(&c->repeat_timer);
usr.bin/tmux/server-client.c
534
evtimer_del(&c->click_timer);
usr.bin/tmux/server-client.c
535
evtimer_del(&c->exit_timer);
usr.bin/tmux/server-client.c
536
if (event_initialized(&c->cycle_timer))
usr.bin/tmux/server-client.c
537
evtimer_del(&c->cycle_timer);
usr.bin/tmux/server-client.c
539
key_bindings_unref_table(c->keytable);
usr.bin/tmux/server-client.c
541
free(c->message_string);
usr.bin/tmux/server-client.c
542
if (event_initialized(&c->message_timer))
usr.bin/tmux/server-client.c
543
evtimer_del(&c->message_timer);
usr.bin/tmux/server-client.c
544
prompt_free(c->prompt);
usr.bin/tmux/server-client.c
546
format_lost_client(c);
usr.bin/tmux/server-client.c
547
environ_free(c->environ);
usr.bin/tmux/server-client.c
549
proc_remove_peer(c->peer);
usr.bin/tmux/server-client.c
550
c->peer = NULL;
usr.bin/tmux/server-client.c
552
if (c->out_fd != -1)
usr.bin/tmux/server-client.c
553
close(c->out_fd);
usr.bin/tmux/server-client.c
554
if (c->fd != -1) {
usr.bin/tmux/server-client.c
555
close(c->fd);
usr.bin/tmux/server-client.c
556
c->fd = -1;
usr.bin/tmux/server-client.c
558
server_client_unref(c);
usr.bin/tmux/server-client.c
569
server_client_unref(struct client *c)
usr.bin/tmux/server-client.c
571
log_debug("unref client %p (%d references)", c, c->references);
usr.bin/tmux/server-client.c
573
c->references--;
usr.bin/tmux/server-client.c
574
if (c->references == 0)
usr.bin/tmux/server-client.c
575
event_once(-1, EV_TIMEOUT, server_client_free, c, NULL);
usr.bin/tmux/server-client.c
582
struct client *c = arg;
usr.bin/tmux/server-client.c
584
log_debug("free client %p (%d references)", c, c->references);
usr.bin/tmux/server-client.c
586
redraw_free_scene(c->redraw_scene);
usr.bin/tmux/server-client.c
587
cmdq_free(c->queue);
usr.bin/tmux/server-client.c
589
if (c->references == 0) {
usr.bin/tmux/server-client.c
590
free((void *)c->name);
usr.bin/tmux/server-client.c
591
free((void *)c->user);
usr.bin/tmux/server-client.c
592
free(c);
usr.bin/tmux/server-client.c
598
server_client_suspend(struct client *c)
usr.bin/tmux/server-client.c
600
struct session *s = c->session;
usr.bin/tmux/server-client.c
602
if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/server-client.c
605
tty_stop_tty(&c->tty);
usr.bin/tmux/server-client.c
606
c->flags |= CLIENT_SUSPENDED;
usr.bin/tmux/server-client.c
607
proc_send(c->peer, MSG_SUSPEND, -1, NULL, 0);
usr.bin/tmux/server-client.c
612
server_client_detach(struct client *c, enum msgtype msgtype)
usr.bin/tmux/server-client.c
614
struct session *s = c->session;
usr.bin/tmux/server-client.c
616
if (s == NULL || (c->flags & CLIENT_NODETACHFLAGS))
usr.bin/tmux/server-client.c
619
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server-client.c
621
c->exit_type = CLIENT_EXIT_DETACH;
usr.bin/tmux/server-client.c
622
c->exit_msgtype = msgtype;
usr.bin/tmux/server-client.c
623
c->exit_session = xstrdup(s->name);
usr.bin/tmux/server-client.c
628
server_client_exec(struct client *c, const char *cmd)
usr.bin/tmux/server-client.c
63
struct client *c;
usr.bin/tmux/server-client.c
630
struct session *s = c->session;
usr.bin/tmux/server-client.c
651
proc_send(c->peer, MSG_EXEC, -1, msg, cmdsize + shellsize);
usr.bin/tmux/server-client.c
67
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-client.c
68
if (c->session != NULL && (~c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/server-client.c
686
server_client_update_scrollbar_hover(struct client *c, int type, int px, int py)
usr.bin/tmux/server-client.c
688
struct window *w = c->session->curw->window;
usr.bin/tmux/server-client.c
83
server_client_set_overlay(struct client *c, u_int delay,
usr.bin/tmux/server-client.c
857
server_client_check_mouse(struct client *c, struct key_event *event)
usr.bin/tmux/server-client.c
860
struct session *s = c->session, *fs;
usr.bin/tmux/server-client.c
874
log_debug("%s mouse %02x at %u,%u (last %u,%u) (%d)", c->name, m->b,
usr.bin/tmux/server-client.c
875
m->x, m->y, m->lx, m->ly, c->tty.mouse_drag_flag);
usr.bin/tmux/server-client.c
878
if (c->tty.mouse_last_pane != -1) {
usr.bin/tmux/server-client.c
879
lwp = window_pane_find_by_id(c->tty.mouse_last_pane);
usr.bin/tmux/server-client.c
881
log_debug("%s mouse last pane %%%u", c->name, lwp->id);
usr.bin/tmux/server-client.c
90
if (c->overlay_draw != NULL)
usr.bin/tmux/server-client.c
902
if (c->tty.mouse_drag_flag) {
usr.bin/tmux/server-client.c
91
server_client_clear_overlay(c);
usr.bin/tmux/server-client.c
925
if (c->flags & CLIENT_DOUBLECLICK) {
usr.bin/tmux/server-client.c
926
evtimer_del(&c->click_timer);
usr.bin/tmux/server-client.c
927
c->flags &= ~CLIENT_DOUBLECLICK;
usr.bin/tmux/server-client.c
931
c->flags |= CLIENT_TRIPLECLICK;
usr.bin/tmux/server-client.c
932
} else if (c->flags & CLIENT_TRIPLECLICK) {
usr.bin/tmux/server-client.c
933
evtimer_del(&c->click_timer);
usr.bin/tmux/server-client.c
934
c->flags &= ~CLIENT_TRIPLECLICK;
usr.bin/tmux/server-client.c
946
c->flags |= CLIENT_DOUBLECLICK;
usr.bin/tmux/server-client.c
96
if (event_initialized(&c->overlay_timer))
usr.bin/tmux/server-client.c
961
m->statusat = status_at_line(c);
usr.bin/tmux/server-client.c
962
m->statuslines = status_line_size(c);
usr.bin/tmux/server-client.c
966
sr = status_get_range(c, x, y - m->statusat);
usr.bin/tmux/server-client.c
97
evtimer_del(&c->overlay_timer);
usr.bin/tmux/server-client.c
98
evtimer_set(&c->overlay_timer, server_client_overlay_timer, c);
usr.bin/tmux/server-fn.c
100
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
101
if (c->session == s)
usr.bin/tmux/server-fn.c
102
server_status_client(c);
usr.bin/tmux/server-fn.c
122
struct client *c;
usr.bin/tmux/server-fn.c
124
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
125
if (c->session != NULL &&
usr.bin/tmux/server-fn.c
126
c->session->curw != NULL &&
usr.bin/tmux/server-fn.c
127
c->session->curw->window == w)
usr.bin/tmux/server-fn.c
128
server_redraw_client(c);
usr.bin/tmux/server-fn.c
135
struct client *c;
usr.bin/tmux/server-fn.c
137
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
138
if (c->session != NULL &&
usr.bin/tmux/server-fn.c
139
c->session->curw != NULL &&
usr.bin/tmux/server-fn.c
140
c->session->curw->window == w)
usr.bin/tmux/server-fn.c
141
c->flags |= CLIENT_REDRAWMENU;
usr.bin/tmux/server-fn.c
148
struct client *c;
usr.bin/tmux/server-fn.c
150
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
151
if (c->session != NULL &&
usr.bin/tmux/server-fn.c
152
c->session->curw != NULL &&
usr.bin/tmux/server-fn.c
153
c->session->curw->window == w)
usr.bin/tmux/server-fn.c
154
c->flags |= CLIENT_REDRAWBORDERS;
usr.bin/tmux/server-fn.c
178
struct client *c;
usr.bin/tmux/server-fn.c
180
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
181
if (c->session != NULL)
usr.bin/tmux/server-fn.c
182
server_lock_client(c);
usr.bin/tmux/server-fn.c
189
struct client *c;
usr.bin/tmux/server-fn.c
191
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
192
if (c->session == s)
usr.bin/tmux/server-fn.c
193
server_lock_client(c);
usr.bin/tmux/server-fn.c
198
server_lock_client(struct client *c)
usr.bin/tmux/server-fn.c
202
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/server-fn.c
205
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/server-fn.c
208
cmd = options_get_string(c->session->options, "lock-command");
usr.bin/tmux/server-fn.c
212
tty_stop_tty(&c->tty);
usr.bin/tmux/server-fn.c
213
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_SMCUP));
usr.bin/tmux/server-fn.c
214
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_CLEAR));
usr.bin/tmux/server-fn.c
215
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_E3));
usr.bin/tmux/server-fn.c
217
c->flags |= CLIENT_SUSPENDED;
usr.bin/tmux/server-fn.c
218
proc_send(c->peer, MSG_LOCK, -1, cmd, strlen(cmd) + 1);
usr.bin/tmux/server-fn.c
481
struct client *c;
usr.bin/tmux/server-fn.c
506
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
507
if (c->session != s)
usr.bin/tmux/server-fn.c
510
if (use_s == NULL && (c->flags & CLIENT_NO_DETACH_ON_DESTROY))
usr.bin/tmux/server-fn.c
513
c->session = NULL;
usr.bin/tmux/server-fn.c
514
c->last_session = NULL;
usr.bin/tmux/server-fn.c
515
server_client_set_session(c, use_s);
usr.bin/tmux/server-fn.c
517
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server-fn.c
60
server_redraw_client(struct client *c)
usr.bin/tmux/server-fn.c
62
c->flags |= CLIENT_ALLREDRAWFLAGS;
usr.bin/tmux/server-fn.c
66
server_status_client(struct client *c)
usr.bin/tmux/server-fn.c
68
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/server-fn.c
74
struct client *c;
usr.bin/tmux/server-fn.c
76
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server-fn.c
77
if (c->session == s)
usr.bin/tmux/server-fn.c
78
server_redraw_client(c);
usr.bin/tmux/server-fn.c
98
struct client *c;
usr.bin/tmux/server.c
179
struct client *c = NULL;
usr.bin/tmux/server.c
224
c = server_client_create(fd);
usr.bin/tmux/server.c
235
if (c != NULL) {
usr.bin/tmux/server.c
236
c->exit_message = cause;
usr.bin/tmux/server.c
237
c->retval = 1;
usr.bin/tmux/server.c
238
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server.c
263
struct client *c;
usr.bin/tmux/server.c
270
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server.c
271
if (c->flags & CLIENT_IDENTIFIED)
usr.bin/tmux/server.c
272
items += cmdq_next(c);
usr.bin/tmux/server.c
286
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/server.c
287
if (c->session != NULL)
usr.bin/tmux/server.c
309
struct client *c, *c1;
usr.bin/tmux/server.c
314
TAILQ_FOREACH_SAFE(c, &clients, entry, c1) {
usr.bin/tmux/server.c
315
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/server.c
316
server_client_lost(c);
usr.bin/tmux/server.c
318
c->flags |= CLIENT_EXIT;
usr.bin/tmux/server.c
319
c->exit_type = CLIENT_EXIT_SHUTDOWN;
usr.bin/tmux/server.c
321
c->session = NULL;
usr.bin/tmux/server.c
371
struct client *c;
usr.bin/tmux/server.c
393
c = server_client_create(newfd);
usr.bin/tmux/server.c
394
if (!server_acl_join(c)) {
usr.bin/tmux/server.c
395
c->exit_message = xstrdup("access not allowed");
usr.bin/tmux/server.c
396
c->retval = 1;
usr.bin/tmux/server.c
397
c->flags |= CLIENT_EXIT;
usr.bin/tmux/sort.c
440
struct client *c;
usr.bin/tmux/sort.c
446
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/sort.c
447
if (c->flags & CLIENT_UNATTACHEDFLAGS)
usr.bin/tmux/sort.c
449
if (~c->flags & CLIENT_ATTACHED)
usr.bin/tmux/sort.c
455
l[i++] = c;
usr.bin/tmux/spawn.c
248
struct client *c;
usr.bin/tmux/spawn.c
269
c = cmdq_get_client(item);
usr.bin/tmux/spawn.c
272
c = sc->tc;
usr.bin/tmux/spawn.c
294
cwd = format_single(item, sc->cwd, c, ts, NULL, NULL);
usr.bin/tmux/spawn.c
299
server_client_get_cwd(c, ts),
usr.bin/tmux/spawn.c
305
cwd = xstrdup(server_client_get_cwd(c, ts));
usr.bin/tmux/spawn.c
404
if (c != NULL && c->session == NULL) { /* only unattached clients */
usr.bin/tmux/spawn.c
405
ee = environ_find(c->environ, "PATH");
usr.bin/tmux/spawn.c
667
spawn_editor(struct client *c, const char *buf, size_t len,
usr.bin/tmux/spawn.c
672
struct session *s = c->session;
usr.bin/tmux/spawn.c
726
sc.tc = c;
usr.bin/tmux/status.c
100
status_at_line(struct client *c)
usr.bin/tmux/status.c
102
struct session *s = c->session;
usr.bin/tmux/status.c
104
if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
usr.bin/tmux/status.c
108
return (c->tty.sy - status_line_size(c));
usr.bin/tmux/status.c
113
status_line_size(struct client *c)
usr.bin/tmux/status.c
115
struct session *s = c->session;
usr.bin/tmux/status.c
117
if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
usr.bin/tmux/status.c
126
status_prompt_line_at(struct client *c)
usr.bin/tmux/status.c
128
struct session *s = c->session;
usr.bin/tmux/status.c
131
lines = status_line_size(c);
usr.bin/tmux/status.c
142
status_get_range(struct client *c, u_int x, u_int y)
usr.bin/tmux/status.c
144
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
153
status_push_screen(struct client *c)
usr.bin/tmux/status.c
155
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
159
screen_init(sl->active, c->tty.sx, status_line_size(c), 0);
usr.bin/tmux/status.c
166
status_pop_screen(struct client *c)
usr.bin/tmux/status.c
168
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
179
status_init(struct client *c)
usr.bin/tmux/status.c
181
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
187
screen_init(&sl->screen, c->tty.sx, 1, 0);
usr.bin/tmux/status.c
193
status_free(struct client *c)
usr.bin/tmux/status.c
195
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
215
status_redraw(struct client *c)
usr.bin/tmux/status.c
217
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
219
struct session *s = c->session;
usr.bin/tmux/status.c
222
u_int lines, i, n, width = c->tty.sx;
usr.bin/tmux/status.c
236
lines = status_line_size(c);
usr.bin/tmux/status.c
237
if (c->tty.sy == 0 || lines == 0)
usr.bin/tmux/status.c
242
if (c->flags & CLIENT_STATUSFORCE)
usr.bin/tmux/status.c
244
ft = format_create(c, NULL, FORMAT_NONE, flags);
usr.bin/tmux/status.c
245
format_defaults(ft, c, NULL, NULL, NULL);
usr.bin/tmux/status.c
340
status_message_set(struct client *c, int delay, int ignore_styles,
usr.bin/tmux/status.c
353
if (c == NULL) {
usr.bin/tmux/status.c
359
status_message_clear(c);
usr.bin/tmux/status.c
360
status_push_screen(c);
usr.bin/tmux/status.c
361
c->message_string = s;
usr.bin/tmux/status.c
362
server_add_message("%s message: %s", c->name, s);
usr.bin/tmux/status.c
369
delay = options_get_number(c->session->options, "display-time");
usr.bin/tmux/status.c
374
if (event_initialized(&c->message_timer))
usr.bin/tmux/status.c
375
evtimer_del(&c->message_timer);
usr.bin/tmux/status.c
376
evtimer_set(&c->message_timer, status_message_callback, c);
usr.bin/tmux/status.c
378
evtimer_add(&c->message_timer, &tv);
usr.bin/tmux/status.c
382
c->message_ignore_keys = ignore_keys;
usr.bin/tmux/status.c
383
c->message_ignore_styles = ignore_styles;
usr.bin/tmux/status.c
386
c->tty.flags |= TTY_FREEZE;
usr.bin/tmux/status.c
387
c->tty.flags |= TTY_NOCURSOR;
usr.bin/tmux/status.c
388
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/status.c
393
status_message_clear(struct client *c)
usr.bin/tmux/status.c
395
if (c->message_string == NULL)
usr.bin/tmux/status.c
398
free(c->message_string);
usr.bin/tmux/status.c
399
c->message_string = NULL;
usr.bin/tmux/status.c
40
struct client *c = arg;
usr.bin/tmux/status.c
401
if (c->prompt == NULL)
usr.bin/tmux/status.c
402
c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
usr.bin/tmux/status.c
403
c->flags |= CLIENT_ALLREDRAWFLAGS; /* was frozen and may have changed */
usr.bin/tmux/status.c
405
status_pop_screen(c);
usr.bin/tmux/status.c
41
struct session *s = c->session;
usr.bin/tmux/status.c
413
status_message_area(struct client *c, u_int *area_x, u_int *area_w)
usr.bin/tmux/status.c
415
struct session *s = c->session;
usr.bin/tmux/status.c
423
w = (c->tty.sx * (u_int)sy->width) / 100;
usr.bin/tmux/status.c
427
w = c->tty.sx;
usr.bin/tmux/status.c
428
if (w == 0 || w > c->tty.sx)
usr.bin/tmux/status.c
429
w = c->tty.sx;
usr.bin/tmux/status.c
436
*area_x = (c->tty.sx - w) / 2;
usr.bin/tmux/status.c
439
*area_x = c->tty.sx - w;
usr.bin/tmux/status.c
44
evtimer_del(&c->status.timer);
usr.bin/tmux/status.c
455
struct client *c = data;
usr.bin/tmux/status.c
457
status_message_clear(c);
usr.bin/tmux/status.c
462
status_message_redraw(struct client *c)
usr.bin/tmux/status.c
464
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
466
struct session *s = c->session;
usr.bin/tmux/status.c
475
if (c->tty.sx == 0 || c->tty.sy == 0)
usr.bin/tmux/status.c
479
lines = status_line_size(c);
usr.bin/tmux/status.c
482
screen_init(sl->active, c->tty.sx, lines, 0);
usr.bin/tmux/status.c
484
messageline = status_prompt_line_at(c);
usr.bin/tmux/status.c
488
status_message_area(c, &ax, &aw);
usr.bin/tmux/status.c
49
if (c->message_string == NULL && c->prompt == NULL)
usr.bin/tmux/status.c
490
ft = format_create_defaults(NULL, c, NULL, NULL, NULL);
usr.bin/tmux/status.c
498
if (c->message_ignore_styles) {
usr.bin/tmux/status.c
499
msg = status_message_escape(c->message_string);
usr.bin/tmux/status.c
50
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/status.c
503
format_add(ft, "message", "%s", c->message_string);
usr.bin/tmux/status.c
511
screen_write_fast_copy(&ctx, &sl->screen, 0, 0, c->tty.sx, lines);
usr.bin/tmux/status.c
528
struct client *c;
usr.bin/tmux/status.c
539
struct client *c = spd->c;
usr.bin/tmux/status.c
544
return (inputcb(c, arg, s, key));
usr.bin/tmux/status.c
56
evtimer_add(&c->status.timer, &tv);
usr.bin/tmux/status.c
564
struct client *c = data;
usr.bin/tmux/status.c
566
if (c->prompt != NULL)
usr.bin/tmux/status.c
567
status_prompt_key(c, 'y', NULL);
usr.bin/tmux/status.c
57
log_debug("client %p, status interval %d", c, (int)tv.tv_sec);
usr.bin/tmux/status.c
573
status_prompt_set(struct client *c, struct cmd_find_state *fs,
usr.bin/tmux/status.c
580
server_client_clear_overlay(c);
usr.bin/tmux/status.c
582
status_message_clear(c);
usr.bin/tmux/status.c
583
status_prompt_clear(c);
usr.bin/tmux/status.c
584
status_push_screen(c);
usr.bin/tmux/status.c
587
spd->c = c;
usr.bin/tmux/status.c
593
prompt_set_options(&pd, c->session);
usr.bin/tmux/status.c
602
c->prompt = prompt_create(&pd);
usr.bin/tmux/status.c
605
c->tty.flags |= TTY_FREEZE;
usr.bin/tmux/status.c
606
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/status.c
608
prompt_incremental_start(c->prompt);
usr.bin/tmux/status.c
611
cmdq_append(c, cmdq_get_callback(status_prompt_accept, c));
usr.bin/tmux/status.c
616
status_prompt_clear(struct client *c)
usr.bin/tmux/status.c
618
if (c->prompt == NULL)
usr.bin/tmux/status.c
62
status_timer_start(struct client *c)
usr.bin/tmux/status.c
621
prompt_free(c->prompt);
usr.bin/tmux/status.c
622
c->prompt = NULL;
usr.bin/tmux/status.c
624
c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
usr.bin/tmux/status.c
625
c->flags |= CLIENT_ALLREDRAWFLAGS; /* was frozen and may have changed */
usr.bin/tmux/status.c
627
status_pop_screen(c);
usr.bin/tmux/status.c
632
status_prompt_update(struct client *c, const char *msg, const char *input)
usr.bin/tmux/status.c
634
if (c->prompt == NULL)
usr.bin/tmux/status.c
636
prompt_update(c->prompt, msg, input);
usr.bin/tmux/status.c
637
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/status.c
64
struct session *s = c->session;
usr.bin/tmux/status.c
642
status_prompt_screen_line(struct client *c)
usr.bin/tmux/status.c
644
struct tty *tty = &c->tty;
usr.bin/tmux/status.c
647
if (options_get_number(c->session->options, "status-position") == 0)
usr.bin/tmux/status.c
648
return (status_prompt_line_at(c));
usr.bin/tmux/status.c
649
n = status_line_size(c) - status_prompt_line_at(c);
usr.bin/tmux/status.c
657
status_prompt_redraw(struct client *c)
usr.bin/tmux/status.c
659
struct status_line *sl = &c->status;
usr.bin/tmux/status.c
66
if (event_initialized(&c->status.timer))
usr.bin/tmux/status.c
665
if (c->tty.sx == 0 || c->tty.sy == 0)
usr.bin/tmux/status.c
669
lines = status_line_size(c);
usr.bin/tmux/status.c
67
evtimer_del(&c->status.timer);
usr.bin/tmux/status.c
672
screen_init(sl->active, c->tty.sx, lines, 0);
usr.bin/tmux/status.c
674
promptline = status_prompt_line_at(c);
usr.bin/tmux/status.c
678
status_message_area(c, &ax, &aw);
usr.bin/tmux/status.c
681
screen_write_fast_copy(&ctx, &sl->screen, 0, 0, c->tty.sx, lines);
usr.bin/tmux/status.c
688
prompt_draw(c->prompt, &pdd);
usr.bin/tmux/status.c
69
evtimer_set(&c->status.timer, status_timer_callback, c);
usr.bin/tmux/status.c
702
status_prompt_cursor(struct client *c, u_int *cx, u_int *cy)
usr.bin/tmux/status.c
704
*cy = status_prompt_screen_line(c);
usr.bin/tmux/status.c
705
*cx = c->status.prompt_cx;
usr.bin/tmux/status.c
710
status_prompt_key(struct client *c, key_code key, struct mouse_event *m)
usr.bin/tmux/status.c
719
m->y != status_prompt_screen_line(c))
usr.bin/tmux/status.c
72
status_timer_callback(-1, 0, c);
usr.bin/tmux/status.c
721
status_message_area(c, &ax, &aw);
usr.bin/tmux/status.c
722
result = prompt_mouse(c->prompt, m->x, ax, aw, &redraw);
usr.bin/tmux/status.c
724
result = prompt_key(c->prompt, key, &redraw);
usr.bin/tmux/status.c
725
if (redraw && c->prompt != NULL)
usr.bin/tmux/status.c
726
c->flags |= CLIENT_REDRAWSTATUS;
usr.bin/tmux/status.c
727
if (c->prompt != NULL && prompt_closed(c->prompt))
usr.bin/tmux/status.c
728
status_prompt_clear(c);
usr.bin/tmux/status.c
79
struct client *c;
usr.bin/tmux/status.c
81
TAILQ_FOREACH(c, &clients, entry)
usr.bin/tmux/status.c
82
status_timer_start(c);
usr.bin/tmux/style.c
480
int c;
usr.bin/tmux/style.c
489
if ((c = colour_fromstring(s)) == -1)
usr.bin/tmux/style.c
491
if (c == 8)
usr.bin/tmux/style.c
494
sy->gc.fg = c;
usr.bin/tmux/tmux.h
1212
int c;
usr.bin/tmux/tmux.h
737
#define COLOUR_DEFAULT(c) ((c) == 8 || (c) == 9)
usr.bin/tmux/tty-keys.c
1001
log_debug("%s: complete key %.*s %#llx", c->name, (int)size, buf, key);
usr.bin/tmux/tty-keys.c
1010
c->flags &= ~CLIENT_FOCUSED;
usr.bin/tmux/tty-keys.c
1011
window_update_focus(c->session->curw->window);
usr.bin/tmux/tty-keys.c
1012
events_fire_client("client-focus-out", c);
usr.bin/tmux/tty-keys.c
1014
c->flags |= CLIENT_FOCUSED;
usr.bin/tmux/tty-keys.c
1015
events_fire_client("client-focus-in", c);
usr.bin/tmux/tty-keys.c
1016
window_update_focus(c->session->curw->window);
usr.bin/tmux/tty-keys.c
1029
if (!server_client_handle_key(c, event)) {
usr.bin/tmux/tty-keys.c
1041
log_debug("%s: discard key %.*s %#llx", c->name, (int)size, buf, key);
usr.bin/tmux/tty-keys.c
1070
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1174
log_debug("%s: extended key %.*s is %llx (%s)", c->name,
usr.bin/tmux/tty-keys.c
1191
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1240
log_debug("%s: mouse input: %.*s", c->name, (int)*size, buf);
usr.bin/tmux/tty-keys.c
1283
log_debug("%s: mouse input (SGR): %.*s", c->name, (int)*size,
usr.bin/tmux/tty-keys.c
1334
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1427
input_request_reply(c, INPUT_REQUEST_CLIPBOARD, &cd);
usr.bin/tmux/tty-keys.c
1449
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1450
int *features = &c->term_features;
usr.bin/tmux/tty-keys.c
1505
log_debug("%s: DA feature: %d", c->name, p[i]);
usr.bin/tmux/tty-keys.c
1517
log_debug("%s: received primary DA %.*s", c->name, (int)*size, buf);
usr.bin/tmux/tty-keys.c
1533
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1534
int *features = &c->term_features;
usr.bin/tmux/tty-keys.c
1597
log_debug("%s: received secondary DA %.*s", c->name, (int)*size, buf);
usr.bin/tmux/tty-keys.c
1613
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1614
int *features = &c->term_features;
usr.bin/tmux/tty-keys.c
1670
log_debug("%s: received extended DA %.*s", c->name, (int)*size, buf);
usr.bin/tmux/tty-keys.c
1672
free(c->term_type);
usr.bin/tmux/tty-keys.c
1673
c->term_type = xstrdup(tmp);
usr.bin/tmux/tty-keys.c
1689
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1741
if (c != NULL)
usr.bin/tmux/tty-keys.c
1742
log_debug("%s fg is %s", c->name, colour_tostring(n));
usr.bin/tmux/tty-keys.c
1748
if (c != NULL)
usr.bin/tmux/tty-keys.c
1749
log_debug("%s bg is %s", c->name, colour_tostring(n));
usr.bin/tmux/tty-keys.c
1763
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
1817
pd.c = colour_parseX11(endptr + 1);
usr.bin/tmux/tty-keys.c
1818
if (pd.c == -1)
usr.bin/tmux/tty-keys.c
1821
input_request_reply(c, INPUT_REQUEST_PALETTE, &pd);
usr.bin/tmux/tty-keys.c
621
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
628
log_debug("%s: next key is %zu (%.*s) (expired=%d)", c->name, len,
usr.bin/tmux/tty-keys.c
636
log_debug("%s: keys in list: %#llx", c->name, tk1->key);
usr.bin/tmux/tty-keys.c
666
log_debug("%s: UTF-8 key %.*s %#llx", c->name, (int)ud.size,
usr.bin/tmux/tty-keys.c
678
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
737
log_debug("%s: unrecognized window size sequence: %s", c->name, tmp);
usr.bin/tmux/tty-keys.c
746
struct client *c = tty->client;
usr.bin/tmux/tty-keys.c
761
log_debug("%s: keys are %zu (%.*s)", c->name, len, (int)len, buf);
usr.bin/tmux/tty-keys.c
812
server_client_update_theme_colours(c);
usr.bin/tmux/tty-keys.c
813
session_theme_changed(c->session);
usr.bin/tmux/tty-keys.c
819
server_client_update_theme_colours(c);
usr.bin/tmux/tty-keys.c
820
session_theme_changed(c->session);
usr.bin/tmux/tty-keys.c
930
log_debug("%s: key %#llx is BSpace", c->name, key);
usr.bin/tmux/tty-keys.c
934
log_debug("%s: key %#llx is M-BSpace", c->name, key);
usr.bin/tmux/tty-keys.c
958
log_debug("%s: partial key %.*s", c->name, (int)len, buf);
usr.bin/tmux/tty-keys.c
976
log_debug("%s: increasing delay (partial paste end)", c->name);
usr.bin/tmux/tty-keys.c
983
!TAILQ_EMPTY(&c->input_requests)) {
usr.bin/tmux/tty-keys.c
984
log_debug("%s: increasing delay (active query)", c->name);
usr.bin/tmux/tty-term.c
818
int b, int c)
usr.bin/tmux/tty-term.c
822
s = tiparm_s(3, 0, x, a, b, c);
usr.bin/tmux/tty.c
100
tty_init(struct tty *tty, struct client *c)
usr.bin/tmux/tty.c
1012
c->pan_window = NULL;
usr.bin/tmux/tty.c
102
if (!isatty(c->fd))
usr.bin/tmux/tty.c
1020
struct client *c;
usr.bin/tmux/tty.c
1022
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/tty.c
1023
if (c->session != NULL &&
usr.bin/tmux/tty.c
1024
c->session->curw != NULL &&
usr.bin/tmux/tty.c
1025
c->session->curw->window == w)
usr.bin/tmux/tty.c
1026
tty_update_client_offset(c);
usr.bin/tmux/tty.c
1032
tty_update_client_offset(struct client *c)
usr.bin/tmux/tty.c
1036
if (~c->flags & CLIENT_TERMINAL)
usr.bin/tmux/tty.c
1039
c->tty.oflag = tty_window_offset1(&c->tty, &ox, &oy, &sx, &sy);
usr.bin/tmux/tty.c
1040
if (ox == c->tty.oox &&
usr.bin/tmux/tty.c
1041
oy == c->tty.ooy &&
usr.bin/tmux/tty.c
1042
sx == c->tty.osx &&
usr.bin/tmux/tty.c
1043
sy == c->tty.osy)
usr.bin/tmux/tty.c
1047
__func__, c->name, c->tty.oox, c->tty.ooy, c->tty.osx, c->tty.osy,
usr.bin/tmux/tty.c
1050
c->tty.oox = ox;
usr.bin/tmux/tty.c
1051
c->tty.ooy = oy;
usr.bin/tmux/tty.c
1052
c->tty.osx = sx;
usr.bin/tmux/tty.c
1053
c->tty.osy = sy;
usr.bin/tmux/tty.c
1055
c->flags |= (CLIENT_REDRAWWINDOW|CLIENT_REDRAWSTATUS);
usr.bin/tmux/tty.c
106
tty->client = c;
usr.bin/tmux/tty.c
1091
struct client *c = tty->client;
usr.bin/tmux/tty.c
1099
log_debug("%s: %s large region redraw", __func__, c->name);
usr.bin/tmux/tty.c
1104
log_debug("%s: %s small region redraw (%u-%u)", __func__, c->name,
usr.bin/tmux/tty.c
113
if (tcgetattr(c->fd, &tty->tio) != 0)
usr.bin/tmux/tty.c
1180
struct client *c = tty->client;
usr.bin/tmux/tty.c
1185
log_debug("%s: %s, %u at %u,%u", __func__, c->name, nx, px, py);
usr.bin/tmux/tty.c
1192
if (c->overlay_check == NULL && !tty_fake_bce(tty, defaults, bg)) {
usr.bin/tmux/tty.c
121
struct client *c = tty->client;
usr.bin/tmux/tty.c
1234
struct client *c = tty->client;
usr.bin/tmux/tty.c
1239
log_debug("%s: %s, %u at %u,%u", __func__, c->name, nx, px, py);
usr.bin/tmux/tty.c
125
if (ioctl(c->fd, TIOCGWINSZ, &ws) != -1) {
usr.bin/tmux/tty.c
1320
struct client *c = tty->client;
usr.bin/tmux/tty.c
1325
log_debug("%s: %s, %u,%u at %u,%u", __func__, c->name, nx, ny, px, py);
usr.bin/tmux/tty.c
1335
if (c->overlay_check == NULL && !tty_fake_bce(tty, defaults, bg)) {
usr.bin/tmux/tty.c
1461
int c;
usr.bin/tmux/tty.c
1475
c = tty_acs_reverse_get(tty, gc->data.data, gc->data.size);
usr.bin/tmux/tty.c
1476
if (c != -1) {
usr.bin/tmux/tty.c
1477
utf8_set(&new.data, c);
usr.bin/tmux/tty.c
1508
struct client *c = tty->client;
usr.bin/tmux/tty.c
1510
if (c->overlay_check == NULL) {
usr.bin/tmux/tty.c
1517
return (c->overlay_check(c, c->overlay_data, px, py, nx));
usr.bin/tmux/tty.c
152
log_debug("%s: %s now %ux%u (%ux%u)", __func__, c->name, sx, sy,
usr.bin/tmux/tty.c
1551
tty_client_ready(const struct tty_ctx *ctx, struct client *c)
usr.bin/tmux/tty.c
1553
if (c->session == NULL || c->tty.term == NULL)
usr.bin/tmux/tty.c
1555
if (c->flags & CLIENT_SUSPENDED)
usr.bin/tmux/tty.c
1565
if (c->flags & CLIENT_REDRAWWINDOW)
usr.bin/tmux/tty.c
1567
if (c->tty.flags & TTY_FREEZE)
usr.bin/tmux/tty.c
1576
struct client *c;
usr.bin/tmux/tty.c
1581
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/tty.c
1582
if (tty_client_ready(ctx, c)) {
usr.bin/tmux/tty.c
1583
state = ctx->set_client_cb(ctx, c);
usr.bin/tmux/tty.c
1588
cmdfn(&c->tty, ctx);
usr.bin/tmux/tty.c
1596
struct client *c = tty->client;
usr.bin/tmux/tty.c
1603
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1618
struct client *c = tty->client;
usr.bin/tmux/tty.c
1625
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1648
struct client *c = tty->client;
usr.bin/tmux/tty.c
1657
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1675
struct client *c = tty->client;
usr.bin/tmux/tty.c
1684
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
171
struct client *c = tty->client;
usr.bin/tmux/tty.c
172
const char *name = c->name;
usr.bin/tmux/tty.c
1728
struct client *c = tty->client;
usr.bin/tmux/tty.c
1741
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
176
nread = evbuffer_read(tty->in, c->fd, -1);
usr.bin/tmux/tty.c
1761
struct client *c = tty->client;
usr.bin/tmux/tty.c
1772
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1803
struct client *c = tty->client;
usr.bin/tmux/tty.c
1812
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1842
struct client *c = tty->client;
usr.bin/tmux/tty.c
1852
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
1940
struct client *c = tty->client;
usr.bin/tmux/tty.c
1944
c->overlay_check != NULL) {
usr.bin/tmux/tty.c
196
struct client *c = tty->client;
usr.bin/tmux/tty.c
199
log_debug("%s: %zu discarded", c->name, tty->discarded);
usr.bin/tmux/tty.c
201
c->flags |= CLIENT_ALLREDRAWFLAGS;
usr.bin/tmux/tty.c
202
c->discarded += tty->discarded;
usr.bin/tmux/tty.c
2089
struct client *c = tty->client;
usr.bin/tmux/tty.c
2103
if ((ctx->flags & TTY_CTX_SYNC) || c->overlay_draw != NULL)
usr.bin/tmux/tty.c
216
struct client *c = tty->client;
usr.bin/tmux/tty.c
232
log_debug("%s: can't keep up, %zu discarded", c->name, size);
usr.bin/tmux/tty.c
235
c->discarded += size;
usr.bin/tmux/tty.c
246
struct client *c = tty->client;
usr.bin/tmux/tty.c
2474
tty_dim_default_colour(struct tty *tty, int c, int foreground)
usr.bin/tmux/tty.c
2478
if (!COLOUR_DEFAULT(c))
usr.bin/tmux/tty.c
2479
return (c);
usr.bin/tmux/tty.c
2491
return (c);
usr.bin/tmux/tty.c
250
nwrite = evbuffer_write(tty->out, c->fd);
usr.bin/tmux/tty.c
253
log_debug("%s: wrote %d bytes (of %zu)", c->name, nwrite, size);
usr.bin/tmux/tty.c
255
if (c->redraw > 0) {
usr.bin/tmux/tty.c
256
if ((size_t)nwrite >= c->redraw)
usr.bin/tmux/tty.c
257
c->redraw = 0;
usr.bin/tmux/tty.c
259
c->redraw -= nwrite;
usr.bin/tmux/tty.c
260
log_debug("%s: waiting for redraw, %zu bytes left", c->name,
usr.bin/tmux/tty.c
261
c->redraw);
usr.bin/tmux/tty.c
2678
struct client *c;
usr.bin/tmux/tty.c
2688
if (tty == NULL || (c = tty->client) == NULL)
usr.bin/tmux/tty.c
2691
m = c->theme_colours[n];
usr.bin/tmux/tty.c
2703
int c;
usr.bin/tmux/tty.c
2711
c = gc->fg;
usr.bin/tmux/tty.c
2712
if (c < 8 &&
usr.bin/tmux/tty.c
2715
c += 90;
usr.bin/tmux/tty.c
2716
if ((c = colour_palette_get(palette, c)) != -1)
usr.bin/tmux/tty.c
2717
gc->fg = c;
usr.bin/tmux/tty.c
272
struct client *c = tty->client;
usr.bin/tmux/tty.c
274
tty->term = tty_term_create(tty, c->term_name, c->term_caps,
usr.bin/tmux/tty.c
275
c->term_ncaps, &c->term_features, cause);
usr.bin/tmux/tty.c
2773
int c;
usr.bin/tmux/tty.c
2777
if ((c = colour_palette_get(palette, gc->bg)) != -1)
usr.bin/tmux/tty.c
2778
gc->bg = c;
usr.bin/tmux/tty.c
2824
int c;
usr.bin/tmux/tty.c
2828
if ((c = colour_palette_get(palette, gc->us)) != -1)
usr.bin/tmux/tty.c
2829
gc->us = c;
usr.bin/tmux/tty.c
2835
if ((c = colour_force_rgb (gc->us)) == -1)
usr.bin/tmux/tty.c
2838
gc->us = c;
usr.bin/tmux/tty.c
284
event_set(&tty->event_in, c->fd, EV_PERSIST|EV_READ,
usr.bin/tmux/tty.c
290
event_set(&tty->event_out, c->fd, EV_WRITE, tty_write_callback, tty);
usr.bin/tmux/tty.c
2919
u_int c;
usr.bin/tmux/tty.c
2933
c = gc->us;
usr.bin/tmux/tty.c
2934
if ((~c & COLOUR_FLAG_256) && (c >= 90 && c <= 97))
usr.bin/tmux/tty.c
2935
c -= 82;
usr.bin/tmux/tty.c
2936
tty_putcode_i(tty, TTYC_SETULC1, c & ~COLOUR_FLAG_256);
usr.bin/tmux/tty.c
2945
c = (65536 * r) + (256 * g) + b;
usr.bin/tmux/tty.c
2952
tty_putcode_i(tty, TTYC_SETULC, c);
usr.bin/tmux/tty.c
2955
tty_putcode_i(tty, TTYC_SETAL, c);
usr.bin/tmux/tty.c
309
struct client *c = tty->client;
usr.bin/tmux/tty.c
311
log_debug("%s: start timer fired", c->name);
usr.bin/tmux/tty.c
323
struct client *c = tty->client;
usr.bin/tmux/tty.c
326
log_debug("%s: start timer started", c->name);
usr.bin/tmux/tty.c
334
struct client *c = tty->client;
usr.bin/tmux/tty.c
337
setblocking(c->fd, 0);
usr.bin/tmux/tty.c
348
if (tcsetattr(c->fd, TCSANOW, &tio) == 0)
usr.bin/tmux/tty.c
349
tcflush(c->fd, TCOFLUSH);
usr.bin/tmux/tty.c
357
log_debug("%s: using capabilities for ACS", c->name);
usr.bin/tmux/tty.c
360
log_debug("%s: using UTF-8 for ACS", c->name);
usr.bin/tmux/tty.c
411
struct client *c = tty->client;
usr.bin/tmux/tty.c
419
log_debug("%s: not repeating requests (%u seconds)", c->name,
usr.bin/tmux/tty.c
423
log_debug("%s: %srepeating requests (%u seconds)", c->name,
usr.bin/tmux/tty.c
437
struct client *c = tty->client;
usr.bin/tmux/tty.c
458
if (ioctl(c->fd, TIOCGWINSZ, &ws) == -1)
usr.bin/tmux/tty.c
460
if (tcsetattr(c->fd, TCSANOW, &tty->tio) == -1)
usr.bin/tmux/tty.c
498
setblocking(c->fd, 1);
usr.bin/tmux/tty.c
532
struct client *c = tty->client;
usr.bin/tmux/tty.c
534
if (tty_apply_features(tty->term, c->term_features))
usr.bin/tmux/tty.c
550
server_redraw_client(c);
usr.bin/tmux/tty.c
558
struct client *c = tty->client;
usr.bin/tmux/tty.c
564
n = write(c->fd, s, slen);
usr.bin/tmux/tty.c
599
tty_putcode_iii(struct tty *tty, enum tty_code_code code, int a, int b, int c)
usr.bin/tmux/tty.c
601
if (a < 0 || b < 0 || c < 0)
usr.bin/tmux/tty.c
603
tty_puts(tty, tty_term_string_iii(tty->term, code, a, b, c));
usr.bin/tmux/tty.c
624
struct client *c = tty->client;
usr.bin/tmux/tty.c
632
log_debug("%s: %.*s", c->name, (int)len, buf);
usr.bin/tmux/tty.c
633
c->written += len;
usr.bin/tmux/tty.c
746
tty_force_cursor_colour(struct tty *tty, int c)
usr.bin/tmux/tty.c
751
if (c != -1) {
usr.bin/tmux/tty.c
752
c = tty_map_theme_colour(tty, c);
usr.bin/tmux/tty.c
753
c = colour_force_rgb(c);
usr.bin/tmux/tty.c
755
if (c == tty->ccolour)
usr.bin/tmux/tty.c
757
if (c == -1)
usr.bin/tmux/tty.c
760
colour_split_rgb(c, &r, &g, &b);
usr.bin/tmux/tty.c
764
tty->ccolour = c;
usr.bin/tmux/tty.c
864
struct client *c = tty->client;
usr.bin/tmux/tty.c
877
log_debug("%s: current mode %s", c->name,
usr.bin/tmux/tty.c
879
log_debug("%s: setting mode %s", c->name,
usr.bin/tmux/tty.c
934
struct client *c = tty->client;
usr.bin/tmux/tty.c
935
struct window *w = c->session->curw->window;
usr.bin/tmux/tty.c
937
return (tty->sx < w->sx || tty->sy - status_line_size(c) < w->sy);
usr.bin/tmux/tty.c
956
struct client *c = tty->client;
usr.bin/tmux/tty.c
957
struct window *w = c->session->curw->window;
usr.bin/tmux/tty.c
961
lines = status_line_size(c);
usr.bin/tmux/tty.c
969
c->pan_window = NULL;
usr.bin/tmux/tty.c
976
if (c->pan_window == w) {
usr.bin/tmux/tty.c
978
c->pan_ox = 0;
usr.bin/tmux/tty.c
979
else if (c->pan_ox + *sx > w->sx)
usr.bin/tmux/tty.c
980
c->pan_ox = w->sx - *sx;
usr.bin/tmux/tty.c
981
*ox = c->pan_ox;
usr.bin/tmux/tty.c
983
c->pan_oy = 0;
usr.bin/tmux/tty.c
984
else if (c->pan_oy + *sy > w->sy)
usr.bin/tmux/tty.c
985
c->pan_oy = w->sy - *sy;
usr.bin/tmux/tty.c
986
*oy = c->pan_oy;
usr.bin/tmux/window-border.c
151
window_pane_get_border_style(struct window_pane *wp, struct client *c,
usr.bin/tmux/window-border.c
154
struct session *s = c->session;
usr.bin/tmux/window-border.c
160
if (wp == c->session->curw->window->active) {
usr.bin/tmux/window-border.c
171
ft = format_create_defaults(NULL, c, s, s->curw, wp);
usr.bin/tmux/window-border.c
181
window_make_pane_status(struct window_pane *wp, struct client *c, u_int width,
usr.bin/tmux/window-border.c
199
ft = format_create(c, NULL, FORMAT_PANE|wp->id, FORMAT_STATUS);
usr.bin/tmux/window-border.c
200
format_defaults(ft, c, c->session, c->session->curw, wp);
usr.bin/tmux/window-border.c
210
window_pane_get_border_style(wp, c, &gc);
usr.bin/tmux/window-buffer.c
284
window_buffer_menu(void *modedata, struct client *c, key_code key)
usr.bin/tmux/window-buffer.c
293
window_buffer_key(wme, c, NULL, NULL, key, NULL);
usr.bin/tmux/window-buffer.c
451
__unused struct client *c, __unused key_code key)
usr.bin/tmux/window-buffer.c
473
window_buffer_do_paste(void *modedata, void *itemdata, struct client *c,
usr.bin/tmux/window-buffer.c
480
mode_tree_run_command(c, NULL, data->command, item->name);
usr.bin/tmux/window-buffer.c
593
struct window_buffer_itemdata *item, struct client *c)
usr.bin/tmux/window-buffer.c
611
ed->editor = spawn_editor(c, buf, len, window_buffer_edit_close_cb, ed);
usr.bin/tmux/window-buffer.c
621
window_buffer_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-buffer.c
643
finished = mode_tree_key(mtd, c, &key, m, NULL, NULL);
usr.bin/tmux/window-buffer.c
647
window_buffer_start_edit(data, item, c);
usr.bin/tmux/window-buffer.c
651
window_buffer_do_delete(data, item, c, key);
usr.bin/tmux/window-buffer.c
655
mode_tree_each_tagged(mtd, window_buffer_do_delete, c, key, 0);
usr.bin/tmux/window-buffer.c
659
mode_tree_each_tagged(mtd, window_buffer_do_paste, c, key, 0);
usr.bin/tmux/window-buffer.c
665
window_buffer_do_paste(data, item, c, key);
usr.bin/tmux/window-client.c
167
struct client *c;
usr.bin/tmux/window-client.c
208
server_client_unref(item->c);
usr.bin/tmux/window-client.c
220
struct client *c, **l;
usr.bin/tmux/window-client.c
236
item->c = l[i];
usr.bin/tmux/window-client.c
244
c = item->c;
usr.bin/tmux/window-client.c
247
cp = format_single(NULL, filter, c, NULL, NULL, NULL);
usr.bin/tmux/window-client.c
255
text = format_single(NULL, data->format, c, NULL, NULL, NULL);
usr.bin/tmux/window-client.c
256
mode_tree_add(data->data, NULL, item, (uint64_t)c, c->name,
usr.bin/tmux/window-client.c
267
struct client *c = item->c;
usr.bin/tmux/window-client.c
269
struct window *w = c->session->curw->window;
usr.bin/tmux/window-client.c
275
ft = format_create_defaults(NULL, c, NULL, NULL, NULL);
usr.bin/tmux/window-client.c
302
struct client *c = item->c;
usr.bin/tmux/window-client.c
303
struct session *session = c->session;
usr.bin/tmux/window-client.c
310
if (session == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS))
usr.bin/tmux/window-client.c
325
lines = status_line_size(c);
usr.bin/tmux/window-client.c
328
if (status_at_line(c) == 0)
usr.bin/tmux/window-client.c
349
screen_write_fast_copy(ctx, &c->status.screen, 0, 0, sx, lines);
usr.bin/tmux/window-client.c
353
window_client_menu(void *modedata, struct client *c, key_code key)
usr.bin/tmux/window-client.c
362
window_client_key(wme, c, NULL, NULL, key, NULL);
usr.bin/tmux/window-client.c
375
format_defaults(ft, item->c, NULL, 0, NULL);
usr.bin/tmux/window-client.c
509
__unused struct client *c, key_code key)
usr.bin/tmux/window-client.c
517
server_client_detach(item->c, MSG_DETACH);
usr.bin/tmux/window-client.c
519
server_client_detach(item->c, MSG_DETACHKILL);
usr.bin/tmux/window-client.c
521
server_client_suspend(item->c);
usr.bin/tmux/window-client.c
525
window_client_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-client.c
535
finished = mode_tree_key(mtd, c, &key, m, NULL, NULL);
usr.bin/tmux/window-client.c
541
window_client_do_detach(data, item, c, key);
usr.bin/tmux/window-client.c
547
mode_tree_each_tagged(mtd, window_client_do_detach, c, key, 0);
usr.bin/tmux/window-client.c
560
mode_tree_run_command(c, NULL, data->command, item->ttyname);
usr.bin/tmux/window-clock.c
216
window_clock_key(struct window_mode_entry *wme, __unused struct client *c,
usr.bin/tmux/window-copy.c
1317
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
1322
window_copy_start_drag(c, m);
usr.bin/tmux/window-copy.c
1377
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
1392
prefix = format_single(NULL, arg1, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1394
command = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1397
prefix = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1463
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
1478
prefix = format_single(NULL, arg1, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1480
command = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1483
prefix = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1550
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
1560
prefix = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
1697
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
1702
tty_window_offset(&c->tty, &tty_ox, &tty_oy, &tty_sx, &tty_sy);
usr.bin/tmux/window-copy.c
1703
window_copy_scroll(wp, c->tty.mouse_slider_mpos, m->y, tty_oy,
usr.bin/tmux/window-copy.c
2381
dragging = (cs->c != NULL && cs->c->tty.mouse_drag_flag != 0);
usr.bin/tmux/window-copy.c
2406
dragging = (cs->c != NULL && cs->c->tty.mouse_drag_flag != 0);
usr.bin/tmux/window-copy.c
2438
dragging = (cs->c != NULL && cs->c->tty.mouse_drag_flag != 0);
usr.bin/tmux/window-copy.c
247
struct client *c;
usr.bin/tmux/window-copy.c
2601
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
2612
prefix = format_single(NULL, arg1, c, s, wl, wp);
usr.bin/tmux/window-copy.c
2615
command = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
2648
struct client *c = cs->c;
usr.bin/tmux/window-copy.c
2656
command = format_single(NULL, arg0, c, s, wl, wp);
usr.bin/tmux/window-copy.c
3796
window_copy_command(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-copy.c
3822
cs.c = c;
usr.bin/tmux/window-copy.c
3830
if (c != NULL &&
usr.bin/tmux/window-copy.c
3831
c->flags & CLIENT_READONLY &&
usr.bin/tmux/window-copy.c
3833
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-copy.c
6984
window_copy_start_drag(struct client *c, struct mouse_event *m)
usr.bin/tmux/window-copy.c
6992
if (c == NULL)
usr.bin/tmux/window-copy.c
7007
c->tty.mouse_drag_update = window_copy_drag_update;
usr.bin/tmux/window-copy.c
7008
c->tty.mouse_drag_release = window_copy_drag_release;
usr.bin/tmux/window-copy.c
7049
window_copy_drag_update(c, m);
usr.bin/tmux/window-copy.c
7053
window_copy_drag_update(struct client *c, struct mouse_event *m)
usr.bin/tmux/window-copy.c
7063
if (c == NULL)
usr.bin/tmux/window-copy.c
7099
window_copy_drag_release(struct client *c, struct mouse_event *m)
usr.bin/tmux/window-copy.c
7105
if (c == NULL)
usr.bin/tmux/window-copy.c
7119
window_copy_drag_update(c, m);
usr.bin/tmux/window-customize.c
1539
window_customize_menu(void *modedata, struct client *c, key_code key)
usr.bin/tmux/window-customize.c
1548
window_customize_key(wme, c, NULL, NULL, key, NULL);
usr.bin/tmux/window-customize.c
1694
window_customize_set_option_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
1744
status_message_set(c, -1, 1, 0, 0, "%s", cause);
usr.bin/tmux/window-customize.c
1750
window_customize_set_environment_callback(__unused struct client *c,
usr.bin/tmux/window-customize.c
1777
window_customize_set_environment(struct client *c,
usr.bin/tmux/window-customize.c
1820
mode_tree_set_prompt(data->data, c, prompt,
usr.bin/tmux/window-customize.c
1829
window_customize_add_option_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
1847
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
1856
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
1867
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
1889
window_customize_add_option(struct client *c,
usr.bin/tmux/window-customize.c
1908
mode_tree_set_prompt(data->data, c, prompt, "@", PROMPT_TYPE_COMMAND,
usr.bin/tmux/window-customize.c
1916
window_customize_add_environment_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
1931
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
1939
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
1958
window_customize_add_environment(struct client *c,
usr.bin/tmux/window-customize.c
1971
mode_tree_set_prompt(data->data, c, "New environment: ", "",
usr.bin/tmux/window-customize.c
2047
struct window_customize_itemdata *item, struct client *c)
usr.bin/tmux/window-customize.c
2107
ed->editor = spawn_editor(c, buf, len, window_customize_edit_close_cb,
usr.bin/tmux/window-customize.c
2119
window_customize_set_option(struct client *c,
usr.bin/tmux/window-customize.c
2244
mode_tree_set_prompt(data->data, c, prompt, value,
usr.bin/tmux/window-customize.c
2255
window_customize_set_array_key_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
2296
status_message_set(c, -1, 1, 0, 0, "%s", cause);
usr.bin/tmux/window-customize.c
2302
window_customize_set_array_key(struct client *c,
usr.bin/tmux/window-customize.c
2326
mode_tree_set_prompt(data->data, c, prompt, item->array_key,
usr.bin/tmux/window-customize.c
2387
window_customize_set_command_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
2420
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/window-customize.c
2426
window_customize_set_note_callback(__unused struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
2449
window_customize_set_key(struct client *c,
usr.bin/tmux/window-customize.c
2477
mode_tree_set_prompt(data->data, c, prompt, value,
usr.bin/tmux/window-customize.c
2494
mode_tree_set_prompt(data->data, c, prompt,
usr.bin/tmux/window-customize.c
2504
window_customize_add_key_callback(struct client *c, void *itemdata,
usr.bin/tmux/window-customize.c
2520
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
2529
status_message_set(c, -1, 1, 0, 0,
usr.bin/tmux/window-customize.c
2537
status_message_set(c, -1, 1, 0, 0, "Unknown key: %s", keystr);
usr.bin/tmux/window-customize.c
2561
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/window-customize.c
2567
window_customize_add_key(struct client *c,
usr.bin/tmux/window-customize.c
2582
mode_tree_set_prompt(data->data, c, prompt, "", PROMPT_TYPE_COMMAND,
usr.bin/tmux/window-customize.c
2624
__unused struct client *c, __unused key_code key)
usr.bin/tmux/window-customize.c
2655
window_customize_change_current_callback(__unused struct client *c,
usr.bin/tmux/window-customize.c
2701
window_customize_change_tagged_callback(struct client *c, void *modedata,
usr.bin/tmux/window-customize.c
2711
mode_tree_each_tagged(data->data, window_customize_change_each, c,
usr.bin/tmux/window-customize.c
2721
window_customize_add_current(struct client *c,
usr.bin/tmux/window-customize.c
2734
window_customize_add_option(c, data, WINDOW_CUSTOMIZE_SERVER,
usr.bin/tmux/window-customize.c
2739
window_customize_add_option(c, data, WINDOW_CUSTOMIZE_SESSION,
usr.bin/tmux/window-customize.c
2744
window_customize_add_option(c, data, WINDOW_CUSTOMIZE_PANE,
usr.bin/tmux/window-customize.c
2749
window_customize_add_option(c, data, WINDOW_CUSTOMIZE_SESSION,
usr.bin/tmux/window-customize.c
2754
window_customize_add_option(c, data, WINDOW_CUSTOMIZE_PANE,
usr.bin/tmux/window-customize.c
2759
window_customize_add_environment(c, data,
usr.bin/tmux/window-customize.c
2764
window_customize_add_environment(c, data,
usr.bin/tmux/window-customize.c
2771
window_customize_add_key(c, data, table);
usr.bin/tmux/window-customize.c
2778
window_customize_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-customize.c
2798
finished = mode_tree_key(data->data, c, &key, m, NULL, NULL);
usr.bin/tmux/window-customize.c
2804
window_customize_start_edit(data, item, c);
usr.bin/tmux/window-customize.c
2809
window_customize_set_array_key(c, data, item);
usr.bin/tmux/window-customize.c
2814
if (window_customize_add_current(c, data))
usr.bin/tmux/window-customize.c
2819
window_customize_set_key(c, data, item);
usr.bin/tmux/window-customize.c
2821
window_customize_set_environment(c, data, item, 0);
usr.bin/tmux/window-customize.c
2823
window_customize_set_option(c, data, item, 0, 1);
usr.bin/tmux/window-customize.c
2831
window_customize_set_option(c, data, item, 0, 0);
usr.bin/tmux/window-customize.c
2840
window_customize_set_environment(c, data, item, 1);
usr.bin/tmux/window-customize.c
2842
window_customize_set_option(c, data, item, 1, 0);
usr.bin/tmux/window-customize.c
2856
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-customize.c
2870
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-customize.c
2887
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-customize.c
2901
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-panes.c
1007
cmdq_append(c, cmdq_get_error(error));
usr.bin/tmux/window-panes.c
1011
cmdq_append(c, new_item);
usr.bin/tmux/window-panes.c
1075
window_panes_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-panes.c
1096
window_panes_run_command(data, c, target);
usr.bin/tmux/window-panes.c
997
window_panes_run_command(struct window_panes_modedata *data, struct client *c,
usr.bin/tmux/window-switch.c
430
window_switch_run_command(struct window_switch_modedata *data, struct client *c)
usr.bin/tmux/window-switch.c
471
status = cmd_parse_and_append(command, NULL, c, state, &error);
usr.bin/tmux/window-switch.c
473
if (c != NULL) {
usr.bin/tmux/window-switch.c
475
status_message_set(c, -1, 1, 0, 0, "%s", error);
usr.bin/tmux/window-switch.c
510
window_switch_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-switch.c
552
if (window_switch_run_command(data, c))
usr.bin/tmux/window-switch.c
574
if (window_switch_run_command(data, c))
usr.bin/tmux/window-tree.c
1242
window_tree_command_each(void *modedata, void *itemdata, struct client *c,
usr.bin/tmux/window-tree.c
1252
mode_tree_run_command(c, &fs, data->entered, name);
usr.bin/tmux/window-tree.c
1271
window_tree_command_callback(struct client *c, void *modedata, const char *s,
usr.bin/tmux/window-tree.c
1280
mode_tree_each_tagged(data->data, window_tree_command_each, c,
usr.bin/tmux/window-tree.c
1285
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
usr.bin/tmux/window-tree.c
1300
__unused struct client *c, __unused key_code key)
usr.bin/tmux/window-tree.c
1330
window_tree_kill_current_callback(struct client *c, void *modedata,
usr.bin/tmux/window-tree.c
1341
window_tree_kill_each(data, mode_tree_get_current(mtd), c, KEYC_NONE);
usr.bin/tmux/window-tree.c
1345
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
usr.bin/tmux/window-tree.c
1351
window_tree_kill_tagged_callback(struct client *c, void *modedata,
usr.bin/tmux/window-tree.c
1362
mode_tree_each_tagged(mtd, window_tree_kill_each, c, KEYC_NONE, 1);
usr.bin/tmux/window-tree.c
1366
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
usr.bin/tmux/window-tree.c
1433
window_tree_key(struct window_mode_entry *wme, struct client *c,
usr.bin/tmux/window-tree.c
1449
finished = mode_tree_key(data->data, c, &key, m, &x, &y);
usr.bin/tmux/window-tree.c
1514
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-tree.c
1527
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-tree.c
1541
mode_tree_set_prompt(data->data, c, prompt, "",
usr.bin/tmux/window-tree.c
1550
mode_tree_run_command(c, NULL, data->command, name);
usr.bin/tmux/window-tree.c
962
window_tree_menu(void *modedata, struct client *c, key_code key)
usr.bin/tmux/window-tree.c
971
window_tree_key(wme, c, NULL, NULL, key, NULL);
usr.bin/tmux/window.c
1343
struct client *c;
usr.bin/tmux/window.c
1357
c = cmdq_get_client(item);
usr.bin/tmux/window.c
1358
if (c != NULL && c->session == NULL)
usr.bin/tmux/window.c
1359
c->retval = retval;
usr.bin/tmux/window.c
1489
struct client *c;
usr.bin/tmux/window.c
1500
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/window.c
1501
if (c->session != NULL && (c->flags & CLIENT_CONTROL))
usr.bin/tmux/window.c
1502
control_write_output(c, wp);
usr.bin/tmux/window.c
1705
return (wpp->inputcb(wpp->c, wpp->data, s, key));
usr.bin/tmux/window.c
1726
window_pane_set_prompt(struct window_pane *wp, struct client *c,
usr.bin/tmux/window.c
1735
if (c != NULL)
usr.bin/tmux/window.c
1736
s = c->session;
usr.bin/tmux/window.c
1742
wpp->c = c;
usr.bin/tmux/window.c
1811
window_pane_prompt_key(struct window_pane *wp, struct client *c, key_code key,
usr.bin/tmux/window.c
1824
wpp->c = c;
usr.bin/tmux/window.c
1833
if (c != NULL && status_at_line(c) == 0)
usr.bin/tmux/window.c
1850
wpp->c = NULL;
usr.bin/tmux/window.c
1920
window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
usr.bin/tmux/window.c
1936
if (wme->mode->key != NULL && c != NULL) {
usr.bin/tmux/window.c
1938
wme->mode->key(wme, c, s, wl, key, m);
usr.bin/tmux/window.c
2361
window_pane_input_callback(struct client *c, __unused const char *path,
usr.bin/tmux/window.c
2370
if (cdata->file != NULL && (wp == NULL || c->flags & CLIENT_DEAD)) {
usr.bin/tmux/window.c
2372
c->retval = 1;
usr.bin/tmux/window.c
2373
c->flags |= CLIENT_EXIT;
usr.bin/tmux/window.c
2378
server_client_unref(c);
usr.bin/tmux/window.c
2389
struct client *c = cmdq_get_client(item);
usr.bin/tmux/window.c
2396
if (c->flags & (CLIENT_DEAD|CLIENT_EXITED))
usr.bin/tmux/window.c
2398
if (c->session != NULL)
usr.bin/tmux/window.c
2404
cdata->file = file_read(c, "-", window_pane_input_callback, cdata);
usr.bin/tmux/window.c
2405
c->references++;
usr.bin/tmux/window.c
2549
int c;
usr.bin/tmux/window.c
2552
c = window_pane_get_bg_control_client(wp);
usr.bin/tmux/window.c
2553
if (c == -1) {
usr.bin/tmux/window.c
2556
c = window_get_bg_client(wp);
usr.bin/tmux/window.c
2558
c = defaults.bg;
usr.bin/tmux/window.c
2560
return (c);
usr.bin/tmux/window.c
2589
struct client *c;
usr.bin/tmux/window.c
2594
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/window.c
2595
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/window.c
2630
struct client *c;
usr.bin/tmux/window.c
2635
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/window.c
2636
if (c->flags & CLIENT_CONTROL)
usr.bin/tmux/window.c
667
struct client *c;
usr.bin/tmux/window.c
674
TAILQ_FOREACH(c, &clients, entry) {
usr.bin/tmux/window.c
675
if (c->session != NULL &&
usr.bin/tmux/window.c
676
c->session->attached != 0 &&
usr.bin/tmux/window.c
677
(c->flags & CLIENT_FOCUSED) &&
usr.bin/tmux/window.c
678
c->session->curw->window == wp->window &&
usr.bin/tmux/window.c
679
c->overlay_draw == NULL &&
usr.bin/tmux/window.c
739
window_pane_get_palette(struct window_pane *wp, int c)
usr.bin/tmux/window.c
743
return (colour_palette_get(&wp->palette, c));
usr.bin/tmux/window.c
87
struct client *c;
usr.bin/tput/tput.c
380
int c;
usr.bin/tput/tput.c
400
while ((c = getopt(argc, argv, is_alias ? "T:Vvx" : "ST:Vvx")) != -1) {
usr.bin/tput/tput.c
401
switch (c) {
usr.bin/tset/tset.c
111
#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
usr.bin/tsort/tsort.c
614
find_cycle_from(struct node *i, struct array *c)
usr.bin/tsort/tsort.c
636
c->entries = 0;
usr.bin/tsort/tsort.c
638
c->t[c->entries++] = n;
usr.bin/tsort/tsort.c
643
c->t[c->entries++] = go;
usr.bin/tsort/tsort.c
687
traverse_node(struct node *n, unsigned int o, struct array *c)
usr.bin/tsort/tsort.c
728
if (o - go->mark + 1 > c->entries) {
usr.bin/tsort/tsort.c
732
c->entries = o - go->mark + 1;
usr.bin/tsort/tsort.c
734
c->t[i++] = go;
usr.bin/tsort/tsort.c
736
c->t[i++] = t;
usr.bin/tsort/tsort.c
752
print_cycle(struct array *c)
usr.bin/tsort/tsort.c
758
for (i = c->entries; i != 0;) {
usr.bin/tsort/tsort.c
760
warnx("%s", c->t[i]->k);
usr.bin/tsort/tsort.c
765
find_longest_cycle(struct array *h, struct array *c)
usr.bin/tsort/tsort.c
776
c->entries = 0;
usr.bin/tsort/tsort.c
795
o = traverse_node(n, o, c);
usr.bin/tsort/tsort.c
799
assert(c->entries != 0);
usr.bin/tsort/tsort.c
800
n = c->t[0];
usr.bin/tsort/tsort.c
802
for (i = 0; i < c->entries; i++) {
usr.bin/tsort/tsort.c
803
if (c->t[i]->refs < best) {
usr.bin/tsort/tsort.c
804
n = c->t[i];
usr.bin/tsort/tsort.c
812
find_normal_cycle(struct array *h, struct array *c)
usr.bin/tsort/tsort.c
820
while ((b = find_cycle_from(n, c)) == NULL)
usr.bin/tsort/tsort.c
831
int c;
usr.bin/tsort/tsort.c
843
while ((c = getopt(argc, argv, "h:flqrvw")) != -1) {
usr.bin/tsort/tsort.c
844
switch(c) {
usr.bin/ul/ul.c
102
int c;
usr.bin/ul/ul.c
115
while ((c = getopt(argc, argv, "it:T:")) != -1)
usr.bin/ul/ul.c
116
switch (c) {
usr.bin/ul/ul.c
166
wint_t c;
usr.bin/ul/ul.c
173
switch (c = fgetwc(f)) {
usr.bin/ul/ul.c
234
switch (c = fgetwc(f)) {
usr.bin/ul/ul.c
263
errx(1, "0%o: unknown escape sequence", c);
usr.bin/ul/ul.c
303
if ((w = wcwidth(c)) == -1)
usr.bin/ul/ul.c
307
obuf[col].c_char = c;
usr.bin/ul/ul.c
312
obuf[col].c_char = c;
usr.bin/ul/ul.c
319
} else if (obuf[col].c_char == c)
usr.bin/ul/ul.c
408
char c;
usr.bin/ul/ul.c
417
c = 'g';
usr.bin/ul/ul.c
420
c = '^';
usr.bin/ul/ul.c
423
c = 'v';
usr.bin/ul/ul.c
426
c = '_';
usr.bin/ul/ul.c
429
c = '!';
usr.bin/ul/ul.c
432
c = 'X';
usr.bin/ul/ul.c
440
putwchar(c);
usr.bin/ul/ul.c
530
outchar(int c)
usr.bin/ul/ul.c
532
return (putwchar(c) != WEOF ? c : EOF);
usr.bin/ul/ul.c
538
outc(wchar_t c, int width)
usr.bin/ul/ul.c
542
putwchar(c);
usr.bin/uname/uname.c
56
int c;
usr.bin/uname/uname.c
63
while ((c = getopt(argc, argv, "amnrsvp")) != -1 ) {
usr.bin/uname/uname.c
64
switch (c) {
usr.bin/unifdef/unifdef.c
257
#define endsym(c) (!isalnum((unsigned char)c) && c != '_')
usr.bin/unifdef/unifdef.c
457
const char *c = copyright;
usr.bin/unifdef/unifdef.c
459
while (*++c != '$')
usr.bin/unifdef/unifdef.c
460
if (*c == '\0')
usr.bin/unifdef/unifdef.c
462
while (*++c != '$')
usr.bin/unifdef/unifdef.c
463
putc(*c, stderr);
usr.bin/unvis/unvis.c
79
int offset = 0, c, ret;
usr.bin/unvis/unvis.c
83
while ((c = getc(fp)) != EOF) {
usr.bin/unvis/unvis.c
86
switch(ret = unvis(&outc, (char)c, &state, 0)) {
usr.bin/usbhidaction/usbhidaction.c
221
int c;
usr.bin/usbhidaction/usbhidaction.c
223
c = getc(f);
usr.bin/usbhidaction/usbhidaction.c
224
if (c != EOF)
usr.bin/usbhidaction/usbhidaction.c
225
ungetc(c, f);
usr.bin/usbhidaction/usbhidaction.c
226
return c;
usr.bin/uudecode/uudecode.c
356
#define DEC(c) (((c) - ' ') & 077) /* single character decode */
usr.bin/uudecode/uudecode.c
357
#define IS_DEC(c) ( (((c) - ' ') >= 0) && (((c) - ' ') <= 077 + 1) )
usr.bin/uudecode/uudecode.c
359
#define OUT_OF_RANGE(c) do { \
usr.bin/uudecode/uudecode.c
361
infile, outfile, (unsigned char)(c), 1 + ' ', 077 + ' ' + 1); \
usr.bin/uuencode/uuencode.c
139
#define ENC(c) ((c) ? ((c) & 077) + ' ': '`')
usr.bin/vi/common/key.h
84
CHAR_T c; /* Character. */
usr.bin/vi/common/key.h
94
#define e_c _u_event._e_ch.c
usr.bin/vi/common/util.h
31
#define COL_OFF(c, stop) ((stop) - ((c) % (stop)))
usr.bin/vi/vi/v_increment.c
101
#define isoctal(c) (isdigit(c) && (c) != '8' && (c) != '9')
usr.bin/vi/vi/v_increment.c
99
#define ishex(c) (isdigit(c) || strchr("abcdefABCDEF", (c)))
usr.bin/vi/vi/vi.h
354
#define TAB_OFF(c) COL_OFF((c), O_VAL(sp, O_TABSTOP))
usr.bin/vis/vis.c
133
int c, rachar;
usr.bin/vis/vis.c
137
c = getc(fp);
usr.bin/vis/vis.c
138
while (c != EOF) {
usr.bin/vis/vis.c
142
*cp++ = c;
usr.bin/vis/vis.c
143
if (c == '\\')
usr.bin/vis/vis.c
146
} else if (markeol && c == '\n') {
usr.bin/vis/vis.c
154
(void) vis(buff, (char)c, eflags, (char)rachar);
usr.bin/vis/vis.c
171
c = rachar;
usr.bin/vmstat/vmstat.c
131
int c, todo = 0, reps = 0;
usr.bin/vmstat/vmstat.c
136
while ((c = getopt(argc, argv, "c:fiM:mN:stw:vz")) != -1) {
usr.bin/vmstat/vmstat.c
137
switch (c) {
usr.bin/vmstat/vmstat.c
190
if ((c = kvm_nlist(kd, namelist)) != 0) {
usr.bin/vmstat/vmstat.c
191
if (c > 0) {
usr.bin/vmstat/vmstat.c
194
for (c = 0;
usr.bin/vmstat/vmstat.c
195
c < sizeof(namelist)/sizeof(namelist[0]);
usr.bin/vmstat/vmstat.c
196
c++)
usr.bin/vmstat/vmstat.c
197
if (namelist[c].n_type == 0)
usr.bin/vmstat/vmstat.c
199
namelist[c].n_name);
usr.bin/w/w.c
332
fmt_putc(int c, int *leftp)
usr.bin/w/w.c
339
putchar(c);
usr.bin/wall/wall.c
297
isu8cont(unsigned char c)
usr.bin/wall/wall.c
299
return (c & (0x80 | 0x40)) == 0x80;
usr.bin/watch/watch.c
112
#define ctrl(c) ((c) & 037)
usr.bin/watch/watch.c
558
size_t l = 0, c = 0;
usr.bin/watch/watch.c
571
if (c < MAXCOLUMN)
usr.bin/watch/watch.c
572
(*buf)[l][c] = wc;
usr.bin/watch/watch.c
574
c = 0;
usr.bin/watch/watch.c
579
if (c == MAXCOLUMN)
usr.bin/watch/watch.c
582
(*buf)[l][c++] = ' ';
usr.bin/watch/watch.c
583
while (c & 7 && c < MAXCOLUMN)
usr.bin/watch/watch.c
584
(*buf)[l][c++] = ' ';
usr.bin/watch/watch.c
588
(*buf)[l][c++] = wc;
usr.bin/what/what.c
100
loop: if (c == '$') {
usr.bin/what/what.c
102
if ((c = getchar()) != match[i])
usr.bin/what/what.c
105
while (isprint(c = getchar())) {
usr.bin/what/what.c
106
putchar(c);
usr.bin/what/what.c
107
if (c == '$')
usr.bin/what/what.c
116
if (c != '@')
usr.bin/what/what.c
118
if ((c = getchar()) != '(')
usr.bin/what/what.c
120
if ((c = getchar()) != '#')
usr.bin/what/what.c
122
if ((c = getchar()) != ')')
usr.bin/what/what.c
125
while ((c = getchar()) != EOF && c && c != '"' &&
usr.bin/what/what.c
126
c != '>' && c != '\n' && c != '\\')
usr.bin/what/what.c
127
putchar(c);
usr.bin/what/what.c
58
int c;
usr.bin/what/what.c
64
while ((c = getopt(argc, argv, "s")) != -1) {
usr.bin/what/what.c
65
switch (c) {
usr.bin/what/what.c
96
int c;
usr.bin/what/what.c
99
while ((c = getchar()) != EOF) {
usr.bin/who/who.c
72
int c;
usr.bin/who/who.c
85
while ((c = getopt(argc, argv, "HmqTu")) != -1) {
usr.bin/who/who.c
86
switch (c) {
usr.bin/write/write.c
294
#define PUTC(c) do { if (putchar(c) == EOF) goto err; } while (0)
usr.bin/write/write.c
319
isu8cont(unsigned char c)
usr.bin/write/write.c
321
return (c & (0x80 | 0x40)) == 0x80;
usr.bin/yacc/defs.h
127
#define IS_IDENT(c) (isalnum(c) || (c) == '_' || (c) == '.' || (c) == '$')
usr.bin/yacc/defs.h
128
#define NUMERIC_VALUE(c) ((c) - '0')
usr.bin/yacc/output.c
1074
int c, last;
usr.bin/yacc/output.c
1082
c = (unsigned char)*cptr;
usr.bin/yacc/output.c
1083
if (c == '\n') {
usr.bin/yacc/output.c
1085
if ((c = getc(in)) == EOF)
usr.bin/yacc/output.c
1091
if (c == '\n')
usr.bin/yacc/output.c
1093
putc(c, out);
usr.bin/yacc/output.c
1094
last = c;
usr.bin/yacc/output.c
1101
putc(c, out);
usr.bin/yacc/output.c
1102
} while ((c = (unsigned char)*++cptr) != '\n');
usr.bin/yacc/output.c
1108
while ((c = getc(in)) != EOF) {
usr.bin/yacc/output.c
1109
if (c == '\n')
usr.bin/yacc/output.c
1111
putc(c, out);
usr.bin/yacc/output.c
1112
last = c;
usr.bin/yacc/output.c
1127
int c, last;
usr.bin/yacc/output.c
1132
if ((c = getc(action_file)) == EOF)
usr.bin/yacc/output.c
1136
last = c;
usr.bin/yacc/output.c
1137
if (c == '\n')
usr.bin/yacc/output.c
1139
putc(c, out);
usr.bin/yacc/output.c
1140
while ((c = getc(action_file)) != EOF) {
usr.bin/yacc/output.c
1141
if (c == '\n')
usr.bin/yacc/output.c
1143
putc(c, out);
usr.bin/yacc/output.c
1144
last = c;
usr.bin/yacc/output.c
773
int c;
usr.bin/yacc/output.c
776
c = (unsigned char)*s;
usr.bin/yacc/output.c
777
if (c == '"') {
usr.bin/yacc/output.c
778
c = (unsigned char)*++s;
usr.bin/yacc/output.c
779
if (!isalpha(c) && c != '_' && c != '$')
usr.bin/yacc/output.c
781
while ((c = (unsigned char)*++s) != '"') {
usr.bin/yacc/output.c
782
if (!isalnum(c) && c != '_' && c != '$')
usr.bin/yacc/output.c
788
if (!isalpha(c) && c != '_' && c != '$')
usr.bin/yacc/output.c
790
while ((c = (unsigned char)*++s)) {
usr.bin/yacc/output.c
791
if (!isalnum(c) && c != '_' && c != '$')
usr.bin/yacc/output.c
801
int c, i;
usr.bin/yacc/output.c
810
c = (unsigned char)*s;
usr.bin/yacc/output.c
811
if (c == '"') {
usr.bin/yacc/output.c
812
while ((c = (unsigned char)*++s) != '"') {
usr.bin/yacc/output.c
813
putc(c, code_file);
usr.bin/yacc/output.c
815
putc(c, defines_file);
usr.bin/yacc/output.c
819
putc(c, code_file);
usr.bin/yacc/output.c
821
putc(c, defines_file);
usr.bin/yacc/output.c
822
} while ((c = (unsigned char)*++s));
usr.bin/yacc/output.c
836
while ((c = getc(union_file)) != EOF)
usr.bin/yacc/output.c
837
putc(c, defines_file);
usr.bin/yacc/output.c
849
int c;
usr.bin/yacc/output.c
854
if ((c = getc(in)) == EOF)
usr.bin/yacc/output.c
857
if (c == '\n')
usr.bin/yacc/output.c
859
putc(c, out);
usr.bin/yacc/output.c
860
while ((c = getc(in)) != EOF) {
usr.bin/yacc/output.c
861
if (c == '\n')
usr.bin/yacc/output.c
863
putc(c, out);
usr.bin/yacc/reader.c
1001
else if (c == '\'' || c == '"')
usr.bin/yacc/reader.c
1016
int c;
usr.bin/yacc/reader.c
1019
c = nextc();
usr.bin/yacc/reader.c
1020
if (c == EOF)
usr.bin/yacc/reader.c
1022
if (!isalpha(c) && c != '_' && c != '.' && c != '$')
usr.bin/yacc/reader.c
1036
int c, k;
usr.bin/yacc/reader.c
1044
c = nextc();
usr.bin/yacc/reader.c
1045
if (c == EOF)
usr.bin/yacc/reader.c
1047
if (c != '%')
usr.bin/yacc/reader.c
109
cachec(int c)
usr.bin/yacc/reader.c
1152
int c;
usr.bin/yacc/reader.c
1158
c = nextc();
usr.bin/yacc/reader.c
1159
if (c != '%')
usr.bin/yacc/reader.c
1179
c = nextc();
usr.bin/yacc/reader.c
118
cache[cinc] = c;
usr.bin/yacc/reader.c
1180
if (!isalpha(c) && c != '_' && c != '.' && c != '_')
usr.bin/yacc/reader.c
1189
c = nextc();
usr.bin/yacc/reader.c
1190
if (c == EOF)
usr.bin/yacc/reader.c
1192
if (c != ':')
usr.bin/yacc/reader.c
1268
int c;
usr.bin/yacc/reader.c
127
int c, i;
usr.bin/yacc/reader.c
1272
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
1273
if (c == '\'' || c == '"')
usr.bin/yacc/reader.c
1278
c = nextc();
usr.bin/yacc/reader.c
1279
if (c == ':') {
usr.bin/yacc/reader.c
129
if (saw_eof || (c = getc(f)) == EOF) {
usr.bin/yacc/reader.c
1298
int c, i, n, depth, quote;
usr.bin/yacc/reader.c
1321
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
1322
if (c == '$') {
usr.bin/yacc/reader.c
1330
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
1331
if (c == '$') {
usr.bin/yacc/reader.c
1336
} else if (isdigit(c)) {
usr.bin/yacc/reader.c
1343
} else if (c == '-' && isdigit((unsigned char) cptr[1])) {
usr.bin/yacc/reader.c
1386
if (isalpha(c) || c == '_' || c == '$') {
usr.bin/yacc/reader.c
1388
putc(c, f);
usr.bin/yacc/reader.c
1389
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
1390
} while (isalnum(c) || c == '_' || c == '$');
usr.bin/yacc/reader.c
1393
putc(c, f);
usr.bin/yacc/reader.c
1395
switch (c) {
usr.bin/yacc/reader.c
1427
quote = c;
usr.bin/yacc/reader.c
1429
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
1430
putc(c, f);
usr.bin/yacc/reader.c
1431
if (c == quote) {
usr.bin/yacc/reader.c
1435
if (c == '\n')
usr.bin/yacc/reader.c
1437
if (c == '\\') {
usr.bin/yacc/reader.c
1438
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
1439
putc(c, f);
usr.bin/yacc/reader.c
1440
if (c == '\n') {
usr.bin/yacc/reader.c
1450
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
1451
if (c == '/') {
usr.bin/yacc/reader.c
1453
while ((c = (unsigned char) *++cptr) != '\n') {
usr.bin/yacc/reader.c
1454
if (c == '*' && cptr[1] == '/')
usr.bin/yacc/reader.c
1457
putc(c, f);
usr.bin/yacc/reader.c
1462
if (c == '*') {
usr.bin/yacc/reader.c
1470
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
1471
putc(c, f);
usr.bin/yacc/reader.c
1472
if (c == '*' && *cptr == '/') {
usr.bin/yacc/reader.c
1478
if (c == '\n') {
usr.bin/yacc/reader.c
148
line[i] = c;
usr.bin/yacc/reader.c
149
if (c == '\n') {
usr.bin/yacc/reader.c
1496
int c;
usr.bin/yacc/reader.c
1499
c = (unsigned char) cptr[1];
usr.bin/yacc/reader.c
1500
if (c == '%' || c == '\\') {
usr.bin/yacc/reader.c
1504
if (c == '=')
usr.bin/yacc/reader.c
1506
else if ((c == 'p' || c == 'P') &&
usr.bin/yacc/reader.c
1507
((c = cptr[2]) == 'r' || c == 'R') &&
usr.bin/yacc/reader.c
1508
((c = cptr[3]) == 'e' || c == 'E') &&
usr.bin/yacc/reader.c
1509
((c = cptr[4]) == 'c' || c == 'C') &&
usr.bin/yacc/reader.c
1510
((c = (unsigned char) cptr[5], !IS_IDENT(c))))
usr.bin/yacc/reader.c
1515
c = nextc();
usr.bin/yacc/reader.c
1516
if (isalpha(c) || c == '_' || c == '.' || c == '$')
usr.bin/yacc/reader.c
1518
else if (c == '\'' || c == '"')
usr.bin/yacc/reader.c
1537
int c;
usr.bin/yacc/reader.c
1543
c = nextc();
usr.bin/yacc/reader.c
1544
if (c == EOF)
usr.bin/yacc/reader.c
1546
if (isalpha(c) || c == '_' || c == '.' || c == '$' || c == '\'' ||
usr.bin/yacc/reader.c
1547
c == '"')
usr.bin/yacc/reader.c
1549
else if (c == '{' || c == '=')
usr.bin/yacc/reader.c
1551
else if (c == '|') {
usr.bin/yacc/reader.c
1555
} else if (c == '%') {
usr.bin/yacc/reader.c
159
c = getc(f);
usr.bin/yacc/reader.c
160
if (c == EOF) {
usr.bin/yacc/reader.c
278
int c;
usr.bin/yacc/reader.c
281
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
282
if (isalpha(c)) {
usr.bin/yacc/reader.c
285
if (isalpha(c)) {
usr.bin/yacc/reader.c
286
if (isupper(c))
usr.bin/yacc/reader.c
287
c = tolower(c);
usr.bin/yacc/reader.c
288
cachec(c);
usr.bin/yacc/reader.c
289
} else if (isdigit(c) || c == '_' || c == '.' || c == '$')
usr.bin/yacc/reader.c
290
cachec(c);
usr.bin/yacc/reader.c
293
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
317
if (c == '{')
usr.bin/yacc/reader.c
319
if (c == '%' || c == '\\')
usr.bin/yacc/reader.c
321
if (c == '<')
usr.bin/yacc/reader.c
323
if (c == '>')
usr.bin/yacc/reader.c
325
if (c == '0')
usr.bin/yacc/reader.c
327
if (c == '2')
usr.bin/yacc/reader.c
339
int c;
usr.bin/yacc/reader.c
342
c = nextc();
usr.bin/yacc/reader.c
343
if (c == EOF)
usr.bin/yacc/reader.c
345
if (c != '"')
usr.bin/yacc/reader.c
350
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
351
if (c == '\n') {
usr.bin/yacc/reader.c
355
putc(c, f);
usr.bin/yacc/reader.c
356
if (c == '"') {
usr.bin/yacc/reader.c
368
int c;
usr.bin/yacc/reader.c
385
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
386
switch (c) {
usr.bin/yacc/reader.c
402
quote = c;
usr.bin/yacc/reader.c
403
putc(c, f);
usr.bin/yacc/reader.c
405
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
406
putc(c, f);
usr.bin/yacc/reader.c
407
if (c == quote) {
usr.bin/yacc/reader.c
412
if (c == '\n')
usr.bin/yacc/reader.c
414
if (c == '\\') {
usr.bin/yacc/reader.c
415
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
416
putc(c, f);
usr.bin/yacc/reader.c
417
if (c == '\n') {
usr.bin/yacc/reader.c
427
putc(c, f);
usr.bin/yacc/reader.c
429
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
430
if (c == '/') {
usr.bin/yacc/reader.c
432
while ((c = (unsigned char) *++cptr) != '\n') {
usr.bin/yacc/reader.c
433
if (c == '*' && cptr[1] == '/')
usr.bin/yacc/reader.c
436
putc(c, f);
usr.bin/yacc/reader.c
441
if (c == '*') {
usr.bin/yacc/reader.c
449
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
450
putc(c, f);
usr.bin/yacc/reader.c
451
if (c == '*' && *cptr == '/') {
usr.bin/yacc/reader.c
457
if (c == '\n') {
usr.bin/yacc/reader.c
479
putc(c, f);
usr.bin/yacc/reader.c
489
int c, quote, depth;
usr.bin/yacc/reader.c
512
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
513
putc(c, text_file);
usr.bin/yacc/reader.c
515
putc(c, union_file);
usr.bin/yacc/reader.c
516
switch (c) {
usr.bin/yacc/reader.c
543
quote = c;
usr.bin/yacc/reader.c
545
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
546
putc(c, text_file);
usr.bin/yacc/reader.c
548
putc(c, union_file);
usr.bin/yacc/reader.c
549
if (c == quote) {
usr.bin/yacc/reader.c
553
if (c == '\n')
usr.bin/yacc/reader.c
555
if (c == '\\') {
usr.bin/yacc/reader.c
556
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
557
putc(c, text_file);
usr.bin/yacc/reader.c
559
putc(c, union_file);
usr.bin/yacc/reader.c
560
if (c == '\n') {
usr.bin/yacc/reader.c
571
c = (unsigned char) *cptr;
usr.bin/yacc/reader.c
572
if (c == '/') {
usr.bin/yacc/reader.c
576
while ((c = (unsigned char) *++cptr) != '\n') {
usr.bin/yacc/reader.c
577
if (c == '*' && cptr[1] == '/') {
usr.bin/yacc/reader.c
582
putc(c, text_file);
usr.bin/yacc/reader.c
584
putc(c, union_file);
usr.bin/yacc/reader.c
592
if (c == '*') {
usr.bin/yacc/reader.c
602
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
603
putc(c, text_file);
usr.bin/yacc/reader.c
605
putc(c, union_file);
usr.bin/yacc/reader.c
606
if (c == '*' && *cptr == '/') {
usr.bin/yacc/reader.c
614
if (c == '\n') {
usr.bin/yacc/reader.c
633
int c, quote, i, n;
usr.bin/yacc/reader.c
643
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
644
if (c == quote)
usr.bin/yacc/reader.c
646
if (c == '\n')
usr.bin/yacc/reader.c
648
if (c == '\\') {
usr.bin/yacc/reader.c
652
c = (unsigned char) *cptr++;
usr.bin/yacc/reader.c
653
switch (c) {
usr.bin/yacc/reader.c
672
c = (int) ulval;
usr.bin/yacc/reader.c
680
c = (int) ulval;
usr.bin/yacc/reader.c
685
c = 7;
usr.bin/yacc/reader.c
688
c = '\b';
usr.bin/yacc/reader.c
691
c = '\f';
usr.bin/yacc/reader.c
694
c = '\n';
usr.bin/yacc/reader.c
697
c = '\r';
usr.bin/yacc/reader.c
700
c = '\t';
usr.bin/yacc/reader.c
703
c = '\v';
usr.bin/yacc/reader.c
707
cachec(c);
usr.bin/yacc/reader.c
725
c = ((unsigned char *) s)[i];
usr.bin/yacc/reader.c
726
if (c == '\\' || c == cache[0]) {
usr.bin/yacc/reader.c
728
cachec(c);
usr.bin/yacc/reader.c
729
} else if (isprint(c))
usr.bin/yacc/reader.c
730
cachec(c);
usr.bin/yacc/reader.c
733
switch (c) {
usr.bin/yacc/reader.c
756
cachec(((c >> 6) & 7) + '0');
usr.bin/yacc/reader.c
757
cachec(((c >> 3) & 7) + '0');
usr.bin/yacc/reader.c
758
cachec((c & 7) + '0');
usr.bin/yacc/reader.c
804
int c;
usr.bin/yacc/reader.c
807
for (c = (unsigned char) *cptr; IS_IDENT(c); c = (unsigned char) *++cptr)
usr.bin/yacc/reader.c
808
cachec(c);
usr.bin/yacc/reader.c
835
int c, i;
usr.bin/yacc/reader.c
842
c = nextc();
usr.bin/yacc/reader.c
843
if (c == EOF)
usr.bin/yacc/reader.c
845
if (!isalpha(c) && c != '_' && c != '$')
usr.bin/yacc/reader.c
850
cachec(c);
usr.bin/yacc/reader.c
851
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
852
} while (IS_IDENT(c));
usr.bin/yacc/reader.c
855
c = nextc();
usr.bin/yacc/reader.c
856
if (c == EOF)
usr.bin/yacc/reader.c
858
if (c != '>')
usr.bin/yacc/reader.c
887
int c;
usr.bin/yacc/reader.c
895
c = nextc();
usr.bin/yacc/reader.c
896
if (c == EOF)
usr.bin/yacc/reader.c
898
if (c == '<') {
usr.bin/yacc/reader.c
900
c = nextc();
usr.bin/yacc/reader.c
901
if (c == EOF)
usr.bin/yacc/reader.c
905
if (isalpha(c) || c == '_' || c == '.' || c == '$')
usr.bin/yacc/reader.c
907
else if (c == '\'' || c == '"')
usr.bin/yacc/reader.c
927
c = nextc();
usr.bin/yacc/reader.c
928
if (c == EOF)
usr.bin/yacc/reader.c
930
if (isdigit(c)) {
usr.bin/yacc/reader.c
935
c = nextc();
usr.bin/yacc/reader.c
936
if (c == EOF)
usr.bin/yacc/reader.c
950
int c;
usr.bin/yacc/reader.c
958
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
959
if (c == EOF)
usr.bin/yacc/reader.c
963
if (isdigit(c)) {
usr.bin/yacc/reader.c
972
else if (c == '\n' || isalpha(c) || !isspace(c)) {
usr.bin/yacc/reader.c
975
c = (unsigned char) *++cptr;
usr.bin/yacc/reader.c
976
if (c == EOF)
usr.bin/yacc/reader.c
986
int c;
usr.bin/yacc/reader.c
990
c = nextc();
usr.bin/yacc/reader.c
991
if (c == EOF)
usr.bin/yacc/reader.c
993
if (c != '<')
usr.bin/yacc/reader.c
998
c = nextc();
usr.bin/yacc/reader.c
999
if (isalpha(c) || c == '_' || c == '.' || c == '$')
usr.bin/yacc/symtab.c
55
int c, k;
usr.bin/yacc/symtab.c
60
while ((c = *++s))
usr.bin/yacc/symtab.c
61
k = (31 * k + c) & (TABLE_SIZE - 1);
usr.bin/ypcat/ypcat.c
89
int notrans, c, r, i;
usr.bin/ypcat/ypcat.c
97
while ((c=getopt(argc, argv, "xd:kt")) != -1)
usr.bin/ypcat/ypcat.c
98
switch (c) {
usr.bin/ypmatch/ypmatch.c
75
int c, r, i;
usr.bin/ypmatch/ypmatch.c
79
while ((c=getopt(argc, argv, "xd:kt")) != -1)
usr.bin/ypmatch/ypmatch.c
80
switch (c) {
usr.bin/ypwhich/ypwhich.c
137
int notrans = 0, mode = 0, c, r, i;
usr.bin/ypwhich/ypwhich.c
147
while ((c = getopt(argc, argv, "xd:h:mt")) != -1)
usr.bin/ypwhich/ypwhich.c
148
switch (c) {
usr.sbin/ac/ac.c
200
int c;
usr.sbin/ac/ac.c
206
while ((c = getopt(argc, argv, "Ddpt:w:")) != -1) {
usr.sbin/ac/ac.c
207
switch (c) {
usr.sbin/acme-client/base64.c
85
#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)])
usr.sbin/acme-client/http.c
201
int family, fd, c;
usr.sbin/acme-client/http.c
220
c = inet_pton(AF_INET, addrs[cur].ip,
usr.sbin/acme-client/http.c
227
c = inet_pton(AF_INET6, addrs[cur].ip,
usr.sbin/acme-client/http.c
235
if (c < 0) {
usr.sbin/acme-client/http.c
238
} else if (c == 0) {
usr.sbin/acme-client/http.c
299
int c;
usr.sbin/acme-client/http.c
313
c = asprintf(&req,
usr.sbin/acme-client/http.c
320
c = asprintf(&req,
usr.sbin/acme-client/http.c
327
c = asprintf(&req,
usr.sbin/acme-client/http.c
337
if (c == -1) {
usr.sbin/acme-client/http.c
340
} else if (!http_write(req, c, http)) {
usr.sbin/acme-client/jsmn.c
115
char c = js[parser->pos];
usr.sbin/acme-client/jsmn.c
118
if (c == '\"') {
usr.sbin/acme-client/jsmn.c
135
if (c == '\\' && parser->pos + 1 < len) {
usr.sbin/acme-client/jsmn.c
180
char c;
usr.sbin/acme-client/jsmn.c
183
c = js[parser->pos];
usr.sbin/acme-client/jsmn.c
184
switch (c) {
usr.sbin/acme-client/jsmn.c
199
token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY);
usr.sbin/acme-client/jsmn.c
206
type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
usr.sbin/acme-client/json.c
600
int c;
usr.sbin/acme-client/json.c
603
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
607
if (c == -1) {
usr.sbin/acme-client/json.c
620
int c;
usr.sbin/acme-client/json.c
624
c = asprintf(&cnt, "\"contact\": [ \"%s\" ], ", contact);
usr.sbin/acme-client/json.c
625
if (c == -1) {
usr.sbin/acme-client/json.c
632
c = asprintf(&ecnt, "%s\"externalAccountBinding\": %s, ",
usr.sbin/acme-client/json.c
634
if (c == -1) {
usr.sbin/acme-client/json.c
643
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
648
if (c == -1) {
usr.sbin/acme-client/json.c
661
int c, first;
usr.sbin/acme-client/json.c
673
c = asprintf(&p, "%s%s { \"type\": \"dns\", "
usr.sbin/acme-client/json.c
678
c = asprintf(&p, "%s%s { \"type\": \"ip\", "
usr.sbin/acme-client/json.c
685
if (c == -1) {
usr.sbin/acme-client/json.c
693
c = asprintf(&p, "%s ] }", t);
usr.sbin/acme-client/json.c
695
c = asprintf(&p, "%s ], \"profile\": \"%s\" }", t,
usr.sbin/acme-client/json.c
698
if (c == -1) {
usr.sbin/acme-client/json.c
714
int c;
usr.sbin/acme-client/json.c
717
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
721
if (c == -1) {
usr.sbin/acme-client/json.c
734
int c;
usr.sbin/acme-client/json.c
737
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
741
if (c == -1) {
usr.sbin/acme-client/json.c
754
int c;
usr.sbin/acme-client/json.c
757
c = asprintf(&p, "{\"e\": \"%s\", \"kty\": \"RSA\", \"n\": \"%s\"}",
usr.sbin/acme-client/json.c
759
if (c == -1) {
usr.sbin/acme-client/json.c
772
int c;
usr.sbin/acme-client/json.c
775
c = asprintf(&p, "{\"crv\": \"P-384\", \"kty\": \"EC\","
usr.sbin/acme-client/json.c
778
if (c == -1) {
usr.sbin/acme-client/json.c
792
int c;
usr.sbin/acme-client/json.c
795
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
802
if (c == -1) {
usr.sbin/acme-client/json.c
816
int c;
usr.sbin/acme-client/json.c
819
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
826
if (c == -1) {
usr.sbin/acme-client/json.c
839
int c;
usr.sbin/acme-client/json.c
842
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
848
if (c == -1) {
usr.sbin/acme-client/json.c
864
int c;
usr.sbin/acme-client/json.c
869
c = asprintf(&p, "{\"e\":\"%s\",\"kty\":\"RSA\",\"n\":\"%s\"}",
usr.sbin/acme-client/json.c
871
if (c == -1) {
usr.sbin/acme-client/json.c
887
int c;
usr.sbin/acme-client/json.c
892
c = asprintf(&p, "{\"crv\":\"P-384\",\"kty\":\"EC\",\"x\":\"%s\","
usr.sbin/acme-client/json.c
895
if (c == -1) {
usr.sbin/acme-client/json.c
908
int c;
usr.sbin/acme-client/json.c
911
c = asprintf(&p, "{"
usr.sbin/acme-client/json.c
917
if (c == -1) {
usr.sbin/acme-client/main.c
243
c = netproc(key_fds[1], acct_fds[1],
usr.sbin/acme-client/main.c
247
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
271
c = keyproc(key_fds[0], domain);
usr.sbin/acme-client/main.c
272
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
290
c = acctproc(acct_fds[0], authority->account,
usr.sbin/acme-client/main.c
292
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
309
c = chngproc(chng_fds[0], chngdir);
usr.sbin/acme-client/main.c
310
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
325
c = certproc(cert_fds[0], file_fds[0]);
usr.sbin/acme-client/main.c
326
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
341
c = fileproc(file_fds[1], certdir, domain->cert, domain->chain,
usr.sbin/acme-client/main.c
347
exit(c > 1 ? 2 : (c ? EXIT_SUCCESS : EXIT_FAILURE));
usr.sbin/acme-client/main.c
360
c = dnsproc(dns_fds[0]);
usr.sbin/acme-client/main.c
361
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
373
c = revokeproc(rvk_fds[0], domain->cert != NULL ? domain->cert :
usr.sbin/acme-client/main.c
375
exit(c ? EXIT_SUCCESS : EXIT_FAILURE);
usr.sbin/acme-client/main.c
393
checkexit_ext(&c, pids[COMP_FILE], COMP_FILE) +
usr.sbin/acme-client/main.c
399
return rc != COMP__MAX ? EXIT_FAILURE : (c == 2 ? EXIT_SUCCESS : 2);
usr.sbin/acme-client/main.c
52
int c, rc, revocate = 0;
usr.sbin/acme-client/main.c
65
while ((c = getopt(argc, argv, "Fe:nrvf:")) != -1)
usr.sbin/acme-client/main.c
66
switch (c) {
usr.sbin/acme-client/netproc.c
176
nreq(struct conn *c, const char *addr)
usr.sbin/acme-client/netproc.c
192
if ((ssz = urlresolve(c->dfd, host, src)) < 0) {
usr.sbin/acme-client/netproc.c
237
free(c->buf.buf);
usr.sbin/acme-client/netproc.c
238
c->buf.sz = g->bodypartsz;
usr.sbin/acme-client/netproc.c
239
c->buf.buf = malloc(c->buf.sz);
usr.sbin/acme-client/netproc.c
240
if (c->buf.buf == NULL) {
usr.sbin/acme-client/netproc.c
244
memcpy(c->buf.buf, g->bodypart, c->buf.sz);
usr.sbin/acme-client/netproc.c
255
sreq(struct conn *c, const char *addr, int kid, const char *req, char **loc)
usr.sbin/acme-client/netproc.c
266
if ((host = url2host(c->newnonce, &port, &path)) == NULL)
usr.sbin/acme-client/netproc.c
269
if ((ssz = urlresolve(c->dfd, host, src)) < 0) {
usr.sbin/acme-client/netproc.c
283
warnx("%s: no replay nonce", c->newnonce);
usr.sbin/acme-client/netproc.c
298
if (writeop(c->fd, COMM_ACCT, kid ? ACCT_KID_SIGN : ACCT_SIGN) <= 0) {
usr.sbin/acme-client/netproc.c
301
} else if (writestr(c->fd, COMM_PAY, req) <= 0) {
usr.sbin/acme-client/netproc.c
304
} else if (writestr(c->fd, COMM_NONCE, nonce) <= 0) {
usr.sbin/acme-client/netproc.c
307
} else if (writestr(c->fd, COMM_URL, addr) <= 0) {
usr.sbin/acme-client/netproc.c
313
if (kid && writestr(c->fd, COMM_KID, c->kid) <= 0)
usr.sbin/acme-client/netproc.c
317
if ((reqsn = readstr(c->fd, COMM_REQ)) == NULL)
usr.sbin/acme-client/netproc.c
324
} else if ((ssz = urlresolve(c->dfd, host, src)) < 0) {
usr.sbin/acme-client/netproc.c
343
free(c->buf.buf);
usr.sbin/acme-client/netproc.c
344
c->buf.sz = g->bodypartsz;
usr.sbin/acme-client/netproc.c
345
c->buf.buf = malloc(c->buf.sz);
usr.sbin/acme-client/netproc.c
346
if (c->buf.buf == NULL) {
usr.sbin/acme-client/netproc.c
350
memcpy(c->buf.buf, g->bodypart, c->buf.sz);
usr.sbin/acme-client/netproc.c
356
j = json_parse(c->buf.buf, c->buf.sz);
usr.sbin/acme-client/netproc.c
411
donewacc(struct conn *c, const struct capaths *p, const char *contact,
usr.sbin/acme-client/netproc.c
422
if (writeop(c->fd, COMM_ACCT, ACCT_EAB) <= 0) {
usr.sbin/acme-client/netproc.c
424
} else if (writestr(c->fd, COMM_URL, p->newaccount) <= 0) {
usr.sbin/acme-client/netproc.c
429
if ((eab_json = readstr(c->fd, COMM_REQ)) == NULL) {
usr.sbin/acme-client/netproc.c
436
else if ((lc = sreq(c, p->newaccount, 0, req, &c->kid)) < 0)
usr.sbin/acme-client/netproc.c
439
if ((j = json_parse(c->buf.buf, c->buf.sz)) == NULL)
usr.sbin/acme-client/netproc.c
452
else if (c->buf.buf == NULL || c->buf.sz == 0)
usr.sbin/acme-client/netproc.c
457
if (c->kid != NULL) {
usr.sbin/acme-client/netproc.c
458
if (stravis(&accturi, c->kid, VIS_SAFE) != -1)
usr.sbin/acme-client/netproc.c
464
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
475
dochkacc(struct conn *c, const struct capaths *p, const char *contact,
usr.sbin/acme-client/netproc.c
484
else if ((lc = sreq(c, p->newaccount, 0, req, &c->kid)) < 0)
usr.sbin/acme-client/netproc.c
488
else if (c->buf.buf == NULL || c->buf.sz == 0)
usr.sbin/acme-client/netproc.c
491
rc = donewacc(c, p, contact, eab);
usr.sbin/acme-client/netproc.c
495
if (c->kid == NULL)
usr.sbin/acme-client/netproc.c
498
if (stravis(&accturi, c->kid, VIS_SAFE) != -1)
usr.sbin/acme-client/netproc.c
504
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
513
doneworder(struct conn *c, struct domain_c *domain, struct order *order,
usr.sbin/acme-client/netproc.c
523
else if ((lc = sreq(c, p->neworder, 1, req, &order->uri)) < 0)
usr.sbin/acme-client/netproc.c
527
else if ((j = json_parse(c->buf.buf, c->buf.sz)) == NULL)
usr.sbin/acme-client/netproc.c
537
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
548
doupdorder(struct conn *c, struct order *order)
usr.sbin/acme-client/netproc.c
554
if ((lc = sreq(c, order->uri, 1, "", NULL)) < 0)
usr.sbin/acme-client/netproc.c
558
else if ((j = json_parse(c->buf.buf, c->buf.sz)) == NULL)
usr.sbin/acme-client/netproc.c
566
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
578
dochngreq(struct conn *c, const char *auth, struct chng *chng)
usr.sbin/acme-client/netproc.c
586
if ((lc = sreq(c, auth, 1, "", NULL)) < 0)
usr.sbin/acme-client/netproc.c
590
else if ((j = json_parse(c->buf.buf, c->buf.sz)) == NULL)
usr.sbin/acme-client/netproc.c
598
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
607
dochngresp(struct conn *c, const struct chng *chng)
usr.sbin/acme-client/netproc.c
614
if ((lc = sreq(c, chng->uri, 1, "{}", NULL)) < 0)
usr.sbin/acme-client/netproc.c
622
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
630
docert(struct conn *c, const char *uri, const char *csr)
usr.sbin/acme-client/netproc.c
640
else if ((lc = sreq(c, uri, 1, req, NULL)) < 0)
usr.sbin/acme-client/netproc.c
644
else if (c->buf.sz == 0 || c->buf.buf == NULL)
usr.sbin/acme-client/netproc.c
650
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
659
dogetcert(struct conn *c, const char *uri)
usr.sbin/acme-client/netproc.c
666
if ((lc = sreq(c, uri, 1, "", NULL)) < 0)
usr.sbin/acme-client/netproc.c
670
else if (c->buf.sz == 0 || c->buf.buf == NULL)
usr.sbin/acme-client/netproc.c
676
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
682
dorevoke(struct conn *c, const char *addr, const char *cert)
usr.sbin/acme-client/netproc.c
692
else if ((lc = sreq(c, addr, 1, req, NULL)) < 0)
usr.sbin/acme-client/netproc.c
703
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
712
dodirs(struct conn *c, const char *addr, struct capaths *paths)
usr.sbin/acme-client/netproc.c
720
if ((lc = nreq(c, addr)) < 0)
usr.sbin/acme-client/netproc.c
724
else if ((j = json_parse(c->buf.buf, c->buf.sz)) == NULL)
usr.sbin/acme-client/netproc.c
732
buf_dump(&c->buf);
usr.sbin/acme-client/netproc.c
749
struct conn c;
usr.sbin/acme-client/netproc.c
756
memset(&c, 0, sizeof(struct conn));
usr.sbin/acme-client/netproc.c
814
c.dfd = dfd;
usr.sbin/acme-client/netproc.c
815
c.fd = afd;
usr.sbin/acme-client/netproc.c
820
if (!dodirs(&c, authority->api, &paths))
usr.sbin/acme-client/netproc.c
823
c.newnonce = paths.newnonce;
usr.sbin/acme-client/netproc.c
826
if (!dochkacc(&c, &paths, authority->contact, eab))
usr.sbin/acme-client/netproc.c
840
if (!dorevoke(&c, paths.revokecert, cert))
usr.sbin/acme-client/netproc.c
849
if (!doneworder(&c, domain, &order, &paths))
usr.sbin/acme-client/netproc.c
882
if (!dochngreq(&c, order.auths[i], &chngs[i]))
usr.sbin/acme-client/netproc.c
917
if (!dochngresp(&c, &chngs[i]))
usr.sbin/acme-client/netproc.c
933
if (!docert(&c, order.finalize, cert))
usr.sbin/acme-client/netproc.c
943
if (!doupdorder(&c, &order))
usr.sbin/acme-client/netproc.c
964
dochngreq(&c, order.auths[i], &chngs[i]);
usr.sbin/acme-client/netproc.c
982
if (!dogetcert(&c, order.certificate))
usr.sbin/acme-client/netproc.c
986
else if (writebuf(cfd, COMM_CSR, c.buf.buf, c.buf.sz) <= 0)
usr.sbin/acme-client/netproc.c
998
free(c.kid);
usr.sbin/acme-client/netproc.c
999
free(c.buf.buf);
usr.sbin/acme-client/parse.y
1005
authority_find0(struct acme_conf *c)
usr.sbin/acme-client/parse.y
1007
return (TAILQ_FIRST(&c->authority_list));
usr.sbin/acme-client/parse.y
1011
conf_new_domain(struct acme_conf *c, char *s)
usr.sbin/acme-client/parse.y
1015
d = domain_find_handle(c, s);
usr.sbin/acme-client/parse.y
1020
TAILQ_INSERT_TAIL(&c->domain_list, d, entry);
usr.sbin/acme-client/parse.y
1029
domain_find_handle(struct acme_conf *c, char *s)
usr.sbin/acme-client/parse.y
1033
TAILQ_FOREACH(d, &c->domain_list, entry) {
usr.sbin/acme-client/parse.y
1042
conf_new_keyfile(struct acme_conf *c, char *s)
usr.sbin/acme-client/parse.y
1046
LIST_FOREACH(k, &c->used_key_list, entry) {
usr.sbin/acme-client/parse.y
1054
LIST_INSERT_HEAD(&c->used_key_list, k, entry);
usr.sbin/acme-client/parse.y
550
int c;
usr.sbin/acme-client/parse.y
554
c = file->ungetbuf[--file->ungetpos];
usr.sbin/acme-client/parse.y
556
c = getc(file->stream);
usr.sbin/acme-client/parse.y
558
if (c == START_EXPAND)
usr.sbin/acme-client/parse.y
560
else if (c == DONE_EXPAND)
usr.sbin/acme-client/parse.y
565
return c;
usr.sbin/acme-client/parse.y
571
int c, next;
usr.sbin/acme-client/parse.y
574
if ((c = igetc()) == EOF) {
usr.sbin/acme-client/parse.y
581
return c;
usr.sbin/acme-client/parse.y
584
while ((c = igetc()) == '\\') {
usr.sbin/acme-client/parse.y
587
c = next;
usr.sbin/acme-client/parse.y
594
if (c == EOF) {
usr.sbin/acme-client/parse.y
604
while (c == EOF) {
usr.sbin/acme-client/parse.y
607
c = igetc();
usr.sbin/acme-client/parse.y
610
return c;
usr.sbin/acme-client/parse.y
614
lungetc(int c)
usr.sbin/acme-client/parse.y
616
if (c == EOF)
usr.sbin/acme-client/parse.y
626
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/acme-client/parse.y
632
int c;
usr.sbin/acme-client/parse.y
636
c = lgetc(0);
usr.sbin/acme-client/parse.y
637
if (c == '\n') {
usr.sbin/acme-client/parse.y
641
if (c == EOF)
usr.sbin/acme-client/parse.y
652
int quotec, next, c;
usr.sbin/acme-client/parse.y
657
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/acme-client/parse.y
661
if (c == '#')
usr.sbin/acme-client/parse.y
662
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/acme-client/parse.y
664
if (c == '$' && !expanding) {
usr.sbin/acme-client/parse.y
666
if ((c = lgetc(0)) == EOF)
usr.sbin/acme-client/parse.y
673
if (isalnum(c) || c == '_') {
usr.sbin/acme-client/parse.y
674
*p++ = c;
usr.sbin/acme-client/parse.y
678
lungetc(c);
usr.sbin/acme-client/parse.y
696
switch (c) {
usr.sbin/acme-client/parse.y
699
quotec = c;
usr.sbin/acme-client/parse.y
701
if ((c = lgetc(quotec)) == EOF)
usr.sbin/acme-client/parse.y
703
if (c == '\n') {
usr.sbin/acme-client/parse.y
706
} else if (c == '\\') {
usr.sbin/acme-client/parse.y
711
c = next;
usr.sbin/acme-client/parse.y
717
} else if (c == quotec) {
usr.sbin/acme-client/parse.y
720
} else if (c == '\0') {
usr.sbin/acme-client/parse.y
728
*p++ = c;
usr.sbin/acme-client/parse.y
739
if (c == '-' || isdigit(c)) {
usr.sbin/acme-client/parse.y
741
*p++ = c;
usr.sbin/acme-client/parse.y
746
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/acme-client/parse.y
747
lungetc(c);
usr.sbin/acme-client/parse.y
750
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/acme-client/parse.y
766
c = (unsigned char)*--p;
usr.sbin/acme-client/parse.y
767
if (c == '-')
usr.sbin/acme-client/parse.y
768
return c;
usr.sbin/acme-client/parse.y
778
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/acme-client/parse.y
780
*p++ = c;
usr.sbin/acme-client/parse.y
785
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/acme-client/parse.y
786
lungetc(c);
usr.sbin/acme-client/parse.y
794
if (c == '\n') {
usr.sbin/acme-client/parse.y
798
if (c == EOF)
usr.sbin/acme-client/parse.y
800
return c;
usr.sbin/acme-client/parse.y
976
conf_new_authority(struct acme_conf *c, char *s)
usr.sbin/acme-client/parse.y
980
a = authority_find(c, s);
usr.sbin/acme-client/parse.y
985
TAILQ_INSERT_TAIL(&c->authority_list, a, entry);
usr.sbin/acme-client/parse.y
992
authority_find(struct acme_conf *c, char *s)
usr.sbin/acme-client/parse.y
996
TAILQ_FOREACH(a, &c->authority_list, entry) {
usr.sbin/acme-client/util.c
232
int c, cc;
usr.sbin/acme-client/util.c
235
if (waitpid(pid, &c, 0) == -1) {
usr.sbin/acme-client/util.c
238
} else if (!WIFEXITED(c) && WIFSIGNALED(c)) {
usr.sbin/acme-client/util.c
239
cp = strsignal(WTERMSIG(c));
usr.sbin/acme-client/util.c
242
} else if (!WIFEXITED(c)) {
usr.sbin/acme-client/util.c
245
} else if (WEXITSTATUS(c) != EXIT_SUCCESS) {
usr.sbin/acme-client/util.c
246
cc = WEXITSTATUS(c);
usr.sbin/acme-client/util.c
263
int c;
usr.sbin/acme-client/util.c
268
if (waitpid(pid, &c, 0) == -1) {
usr.sbin/acme-client/util.c
273
if (!WIFEXITED(c) && WIFSIGNALED(c)) {
usr.sbin/acme-client/util.c
274
cp = strsignal(WTERMSIG(c));
usr.sbin/acme-client/util.c
277
} else if (!WIFEXITED(c)) {
usr.sbin/acme-client/util.c
284
if ((*rc = WEXITSTATUS(c)) != EXIT_SUCCESS && *rc != 2) {
usr.sbin/acpidump/acpidump.c
322
int c;
usr.sbin/acpidump/acpidump.c
329
c = *s++;
usr.sbin/acpidump/acpidump.c
330
fputc(c, fhdr);
usr.sbin/acpidump/acpidump.c
677
int c;
usr.sbin/acpidump/acpidump.c
679
while ((c = getopt(argc, argv, "o:q")) != -1) {
usr.sbin/acpidump/acpidump.c
680
switch (c) {
usr.sbin/amd/amd/get_args.c
100
while ((opt_ch = getopt(c, v, "mnprva:c:d:h:k:l:t:w:x:y:C:D:")) != -1)
usr.sbin/amd/amd/get_args.c
224
while (optind <= c-2) {
usr.sbin/amd/amd/get_args.c
234
if (optind == c) {
usr.sbin/amd/amd/get_args.c
93
get_args(int c, char *v[])
usr.sbin/amd/amd/mapc.c
748
int c = 0;
usr.sbin/amd/amd/mapc.c
755
c++;
usr.sbin/amd/amd/mapc.c
759
return c;
usr.sbin/amd/amd/mapc.c
772
int c = mapc_keyiter(root_map, fn, arg);
usr.sbin/amd/amd/mapc.c
777
return c;
usr.sbin/bgpctl/bgpctl.c
1603
uint8_t errcode, subcode, reason_len, c;
usr.sbin/bgpctl/bgpctl.c
1641
if (ibuf_get_n8(b, &c) == -1)
usr.sbin/bgpctl/bgpctl.c
1643
printf(" %02X", c);
usr.sbin/bgpctl/json.c
180
char c;
usr.sbin/bgpctl/json.c
183
c = ']';
usr.sbin/bgpctl/json.c
185
c = '}';
usr.sbin/bgpctl/json.c
191
eb = fprintf(jsonfh, "\n%.*s%c", level, indent, c) < 0;
usr.sbin/bgpctl/json.c
194
eb = fprintf(jsonfh, " %c", c) < 0;
usr.sbin/bgpctl/json.c
227
unsigned char c;
usr.sbin/bgpctl/json.c
233
while ((c = *v++) != '\0' && !eb) {
usr.sbin/bgpctl/json.c
235
switch (c) {
usr.sbin/bgpctl/json.c
258
if (iscntrl(c))
usr.sbin/bgpctl/json.c
259
eb = fprintf(jsonfh, "\\u00%02x", c) < 0;
usr.sbin/bgpctl/json.c
261
eb = putc(c, jsonfh) == EOF;
usr.sbin/bgpctl/ometric.c
291
unsigned char c;
usr.sbin/bgpctl/ometric.c
293
while ((c = *s++) != '\0') {
usr.sbin/bgpctl/ometric.c
294
switch (c) {
usr.sbin/bgpctl/ometric.c
308
if (putc(c, out) == EOF)
usr.sbin/bgpctl/output.c
671
struct community c;
usr.sbin/bgpctl/output.c
676
if (ibuf_get(data, &c, sizeof(c)) == -1) {
usr.sbin/bgpctl/output.c
681
if (type != c.flags) {
usr.sbin/bgpctl/output.c
684
printf(" %s:", fmt_attr(c.flags,
usr.sbin/bgpctl/output.c
686
type = c.flags;
usr.sbin/bgpctl/output.c
689
switch (c.flags) {
usr.sbin/bgpctl/output.c
691
printf(" %s", fmt_community(c.data1, c.data2));
usr.sbin/bgpctl/output.c
695
fmt_large_community(c.data1, c.data2, c.data3));
usr.sbin/bgpctl/output.c
698
ext = (uint64_t)c.data3 << 48;
usr.sbin/bgpctl/output.c
699
switch ((c.data3 >> 8) & EXT_COMMUNITY_VALUE) {
usr.sbin/bgpctl/output.c
703
ext |= ((uint64_t)c.data1 & 0xffff) << 32;
usr.sbin/bgpctl/output.c
704
ext |= (uint64_t)c.data2;
usr.sbin/bgpctl/output.c
708
ext |= (uint64_t)c.data1 << 16;
usr.sbin/bgpctl/output.c
709
ext |= (uint64_t)c.data2 & 0xffff;
usr.sbin/bgpctl/output_json.c
487
struct community c;
usr.sbin/bgpctl/output_json.c
492
if (ibuf_get(data, &c, sizeof(c)) == -1) {
usr.sbin/bgpctl/output_json.c
497
switch (c.flags) {
usr.sbin/bgpctl/output_json.c
501
fmt_community(c.data1, c.data2));
usr.sbin/bgpctl/output_json.c
506
fmt_large_community(c.data1, c.data2, c.data3));
usr.sbin/bgpctl/output_json.c
509
ext = (uint64_t)c.data3 << 48;
usr.sbin/bgpctl/output_json.c
510
switch ((c.data3 >> 8) & EXT_COMMUNITY_VALUE) {
usr.sbin/bgpctl/output_json.c
514
ext |= ((uint64_t)c.data1 & 0xffff) << 32;
usr.sbin/bgpctl/output_json.c
515
ext |= (uint64_t)c.data2;
usr.sbin/bgpctl/output_json.c
519
ext |= (uint64_t)c.data1 << 16;
usr.sbin/bgpctl/output_json.c
520
ext |= (uint64_t)c.data2 & 0xffff;
usr.sbin/bgpctl/parser.c
1177
setcommunity(struct community *c, uint32_t as, uint32_t data,
usr.sbin/bgpctl/parser.c
1180
c->flags = COMMUNITY_TYPE_BASIC;
usr.sbin/bgpctl/parser.c
1181
c->flags |= asflag << 8;
usr.sbin/bgpctl/parser.c
1182
c->flags |= dataflag << 16;
usr.sbin/bgpctl/parser.c
1183
c->data1 = as;
usr.sbin/bgpctl/parser.c
1184
c->data2 = data;
usr.sbin/bgpctl/parser.c
1185
c->data3 = 0;
usr.sbin/bgpctl/parser.c
1189
parsecommunity(struct community *c, char *s)
usr.sbin/bgpctl/parser.c
1196
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1200
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1204
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1208
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1212
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1216
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpctl/parser.c
1227
setcommunity(c, as, data, asflag, dataflag);
usr.sbin/bgpctl/parser.c
1231
parselargecommunity(struct community *c, char *s)
usr.sbin/bgpctl/parser.c
1244
getcommunity(s, 1, &c->data1, &dflag1);
usr.sbin/bgpctl/parser.c
1245
getcommunity(p, 1, &c->data2, &dflag2);
usr.sbin/bgpctl/parser.c
1246
getcommunity(q, 1, &c->data3, &dflag3);
usr.sbin/bgpctl/parser.c
1248
c->flags = COMMUNITY_TYPE_LARGE;
usr.sbin/bgpctl/parser.c
1249
c->flags |= dflag1 << 8;
usr.sbin/bgpctl/parser.c
1250
c->flags |= dflag2 << 16;
usr.sbin/bgpctl/parser.c
1251
c->flags |= dflag3 << 24;
usr.sbin/bgpctl/parser.c
1344
parseextcommunity(struct community *c, const char *t, char *s)
usr.sbin/bgpctl/parser.c
1353
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpctl/parser.c
1354
c->flags |= COMMUNITY_ANY << 24;
usr.sbin/bgpctl/parser.c
1392
c->data1 = uval;
usr.sbin/bgpctl/parser.c
1393
c->data2 = uval2;
usr.sbin/bgpctl/parser.c
1407
c->data1 = ullval >> 32;
usr.sbin/bgpctl/parser.c
1408
c->data2 = ullval;
usr.sbin/bgpctl/parser.c
1413
c->data2 = EXT_COMMUNITY_OVS_VALID;
usr.sbin/bgpctl/parser.c
1416
c->data2 = EXT_COMMUNITY_OVS_INVALID;
usr.sbin/bgpctl/parser.c
1419
c->data2 = EXT_COMMUNITY_OVS_NOTFOUND;
usr.sbin/bgpctl/parser.c
1429
c->data3 = type << 8 | subtype;
usr.sbin/bgpctl/parser.c
1433
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpctl/parser.c
1434
c->flags |= dflag1 << 8;
usr.sbin/bgpctl/parser.c
1441
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpctl/parser.c
1442
c->flags |= dflag1 << 8;
usr.sbin/bgpctl/parser.c
1443
c->flags |= dflag2 << 16;
usr.sbin/bgpctl/parser.c
477
void parsecommunity(struct community *c, char *s);
usr.sbin/bgpctl/parser.c
478
void parselargecommunity(struct community *c, char *s);
usr.sbin/bgpctl/parser.c
479
void parseextcommunity(struct community *c, const char *t, char *s);
usr.sbin/bgpd/carp.c
100
free(c->group);
usr.sbin/bgpd/carp.c
101
free(c);
usr.sbin/bgpd/carp.c
135
struct carpgroup *c;
usr.sbin/bgpd/carp.c
137
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/bgpd/carp.c
142
if (c->changed_by + demote < 0) {
usr.sbin/bgpd/carp.c
147
if (c->do_demote && carp_demote_ioctl(group, demote) == -1)
usr.sbin/bgpd/carp.c
150
c->changed_by += demote;
usr.sbin/bgpd/carp.c
153
if (demote < 0 && c->changed_by == 0)
usr.sbin/bgpd/carp.c
154
c->do_demote = 1;
usr.sbin/bgpd/carp.c
49
struct carpgroup *c;
usr.sbin/bgpd/carp.c
51
TAILQ_FOREACH(c, &carpgroups, entry)
usr.sbin/bgpd/carp.c
52
if (!strcmp(c->group, group))
usr.sbin/bgpd/carp.c
53
return (c);
usr.sbin/bgpd/carp.c
61
struct carpgroup *c;
usr.sbin/bgpd/carp.c
64
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/bgpd/carp.c
65
if ((c = calloc(1, sizeof(struct carpgroup))) == NULL) {
usr.sbin/bgpd/carp.c
69
if ((c->group = strdup(group)) == NULL) {
usr.sbin/bgpd/carp.c
71
free(c);
usr.sbin/bgpd/carp.c
77
free(c->group);
usr.sbin/bgpd/carp.c
78
free(c);
usr.sbin/bgpd/carp.c
82
c->do_demote = 1;
usr.sbin/bgpd/carp.c
84
TAILQ_INSERT_TAIL(&carpgroups, c, entry);
usr.sbin/bgpd/carp.c
93
struct carpgroup *c;
usr.sbin/bgpd/carp.c
95
while ((c = TAILQ_FIRST(&carpgroups)) != NULL) {
usr.sbin/bgpd/carp.c
96
TAILQ_REMOVE(&carpgroups, c, entry);
usr.sbin/bgpd/carp.c
97
if (c->do_demote && c->changed_by > 0)
usr.sbin/bgpd/carp.c
98
carp_demote_ioctl(c->group, -c->changed_by);
usr.sbin/bgpd/chash.c
964
uint64_t c, d;
usr.sbin/bgpd/chash.c
966
c = ch_rotate(b, 37) * mul + a;
usr.sbin/bgpd/chash.c
968
return ch_mix(c, d, mul);
usr.sbin/bgpd/config.c
643
expand_networks(struct bgpd_config *c, struct network_head *nw)
usr.sbin/bgpd/config.c
652
if ((ps = find_prefixset(n->net.psname, &c->prefixsets))
usr.sbin/bgpd/control.c
203
struct ctl_conn *c;
usr.sbin/bgpd/control.c
205
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/bgpd/control.c
206
if (c->imsgbuf.fd == fd)
usr.sbin/bgpd/control.c
210
return (c);
usr.sbin/bgpd/control.c
216
struct ctl_conn *c;
usr.sbin/bgpd/control.c
218
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/bgpd/control.c
219
if (c->imsgbuf.pid == pid)
usr.sbin/bgpd/control.c
223
return (c);
usr.sbin/bgpd/control.c
227
control_close(struct ctl_conn *c)
usr.sbin/bgpd/control.c
229
if (c->terminate && c->imsgbuf.pid)
usr.sbin/bgpd/control.c
230
imsg_ctl_rde_msg(IMSG_CTL_TERMINATE, 0, c->imsgbuf.pid);
usr.sbin/bgpd/control.c
232
imsgbuf_clear(&c->imsgbuf);
usr.sbin/bgpd/control.c
233
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/bgpd/control.c
235
close(c->imsgbuf.fd);
usr.sbin/bgpd/control.c
236
free(c);
usr.sbin/bgpd/control.c
247
struct ctl_conn *c;
usr.sbin/bgpd/control.c
254
if ((c = control_connbyfd(pfd->fd)) == NULL) {
usr.sbin/bgpd/control.c
260
if (imsgbuf_write(&c->imsgbuf) == -1)
usr.sbin/bgpd/control.c
261
return control_close(c);
usr.sbin/bgpd/control.c
262
if (c->throttled &&
usr.sbin/bgpd/control.c
263
imsgbuf_queuelen(&c->imsgbuf) < CTL_MSG_LOW_MARK) {
usr.sbin/bgpd/control.c
264
if (imsg_ctl_rde_msg(IMSG_XON, 0, c->imsgbuf.pid) != -1)
usr.sbin/bgpd/control.c
265
c->throttled = 0;
usr.sbin/bgpd/control.c
272
if (imsgbuf_read(&c->imsgbuf) != 1)
usr.sbin/bgpd/control.c
273
return control_close(c);
usr.sbin/bgpd/control.c
276
if ((n = imsgbuf_get(&c->imsgbuf, &imsg)) == -1)
usr.sbin/bgpd/control.c
277
return control_close(c);
usr.sbin/bgpd/control.c
283
if (c->restricted) {
usr.sbin/bgpd/control.c
300
control_result(c, CTL_RES_DENIED);
usr.sbin/bgpd/control.c
310
c->imsgbuf.pid = pid;
usr.sbin/bgpd/control.c
321
imsg_send_ctl_peer(&c->imsgbuf, p, NULL);
usr.sbin/bgpd/control.c
322
imsg_compose(&c->imsgbuf, IMSG_CTL_END, 0, 0, -1,
usr.sbin/bgpd/control.c
344
imsg_send_ctl_peer(&c->imsgbuf, p,
usr.sbin/bgpd/control.c
352
imsg_compose(&c->imsgbuf,
usr.sbin/bgpd/control.c
359
control_result(c, CTL_RES_NOSUCHPEER);
usr.sbin/bgpd/control.c
363
imsg_compose(&c->imsgbuf, IMSG_CTL_END, 0, 0,
usr.sbin/bgpd/control.c
392
control_result(c, CTL_RES_OK);
usr.sbin/bgpd/control.c
400
control_result(c, CTL_RES_OK);
usr.sbin/bgpd/control.c
418
control_result(c, CTL_RES_OK);
usr.sbin/bgpd/control.c
422
control_result(c,
usr.sbin/bgpd/control.c
425
control_result(c, CTL_RES_OK);
usr.sbin/bgpd/control.c
429
control_result(c,
usr.sbin/bgpd/control.c
432
control_result(c,
usr.sbin/bgpd/control.c
441
control_result(c, CTL_RES_OK);
usr.sbin/bgpd/control.c
449
control_result(c, CTL_RES_NOSUCHPEER);
usr.sbin/bgpd/control.c
476
control_result(c, CTL_RES_NOSUCHPEER);
usr.sbin/bgpd/control.c
483
control_result(c, CTL_RES_PARSE_ERROR);
usr.sbin/bgpd/control.c
487
c->terminate = 1;
usr.sbin/bgpd/control.c
492
c->terminate = 1;
usr.sbin/bgpd/control.c
513
control_result(c, CTL_RES_PARSE_ERROR);
usr.sbin/bgpd/control.c
540
struct ctl_conn *c;
usr.sbin/bgpd/control.c
548
if ((c = control_connbypid(pid)) == NULL)
usr.sbin/bgpd/control.c
562
return imsg_send_ctl_peer(&c->imsgbuf, p, &stats);
usr.sbin/bgpd/control.c
567
c->terminate = 0;
usr.sbin/bgpd/control.c
569
if (!c->throttled &&
usr.sbin/bgpd/control.c
570
imsgbuf_queuelen(&c->imsgbuf) > CTL_MSG_HIGH_MARK) {
usr.sbin/bgpd/control.c
572
c->throttled = 1;
usr.sbin/bgpd/control.c
575
return imsg_forward(&c->imsgbuf, imsg);
usr.sbin/bgpd/control.c
579
control_result(struct ctl_conn *c, u_int code)
usr.sbin/bgpd/control.c
581
imsg_compose(&c->imsgbuf, IMSG_CTL_RESULT, 0, c->imsgbuf.pid, -1,
usr.sbin/bgpd/mrt.c
1235
mrt_get(struct mrt_head *c, struct mrt *m)
usr.sbin/bgpd/mrt.c
1239
LIST_FOREACH(t, c, entry) {
usr.sbin/bgpd/mrt.c
219
mrt_attr_dump(struct ibuf *buf, struct rde_aspath *a, struct rde_community *c,
usr.sbin/bgpd/mrt.c
270
if (community_writebuf(c, ATTR_COMMUNITIES, 0, buf) == -1 ||
usr.sbin/bgpd/mrt.c
271
community_writebuf(c, ATTR_EXT_COMMUNITIES, 0, buf) == -1 ||
usr.sbin/bgpd/mrt.c
272
community_writebuf(c, ATTR_LARGE_COMMUNITIES, 0, buf) == -1)
usr.sbin/bgpd/parse.y
3744
int c;
usr.sbin/bgpd/parse.y
3748
c = file->ungetbuf[--file->ungetpos];
usr.sbin/bgpd/parse.y
3750
c = getc(file->stream);
usr.sbin/bgpd/parse.y
3752
if (c == START_EXPAND)
usr.sbin/bgpd/parse.y
3754
else if (c == DONE_EXPAND)
usr.sbin/bgpd/parse.y
3759
return (c);
usr.sbin/bgpd/parse.y
3765
int c, next;
usr.sbin/bgpd/parse.y
3768
if ((c = igetc()) == EOF) {
usr.sbin/bgpd/parse.y
3775
return (c);
usr.sbin/bgpd/parse.y
3778
while ((c = igetc()) == '\\') {
usr.sbin/bgpd/parse.y
3781
c = next;
usr.sbin/bgpd/parse.y
3788
if (c == EOF) {
usr.sbin/bgpd/parse.y
3798
while (c == EOF) {
usr.sbin/bgpd/parse.y
3801
c = igetc();
usr.sbin/bgpd/parse.y
3804
return (c);
usr.sbin/bgpd/parse.y
3808
lungetc(int c)
usr.sbin/bgpd/parse.y
3810
if (c == EOF)
usr.sbin/bgpd/parse.y
3820
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/bgpd/parse.y
3826
int c;
usr.sbin/bgpd/parse.y
3830
c = lgetc(0);
usr.sbin/bgpd/parse.y
3831
if (c == '\n') {
usr.sbin/bgpd/parse.y
3835
if (c == EOF)
usr.sbin/bgpd/parse.y
3846
int c;
usr.sbin/bgpd/parse.y
3850
if ((c = lgetc('$')) == EOF)
usr.sbin/bgpd/parse.y
3856
if (isalnum(c) || c == '_') {
usr.sbin/bgpd/parse.y
3857
*p++ = c;
usr.sbin/bgpd/parse.y
3861
lungetc(c);
usr.sbin/bgpd/parse.y
3884
int quotec, next, c;
usr.sbin/bgpd/parse.y
3889
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/bgpd/parse.y
3893
if (c == '#')
usr.sbin/bgpd/parse.y
3894
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/bgpd/parse.y
3896
if (c == '$' && !expanding) {
usr.sbin/bgpd/parse.y
3897
c = expand_macro();
usr.sbin/bgpd/parse.y
3898
if (c != 0)
usr.sbin/bgpd/parse.y
3899
return (c);
usr.sbin/bgpd/parse.y
3903
switch (c) {
usr.sbin/bgpd/parse.y
3906
quotec = c;
usr.sbin/bgpd/parse.y
3908
if ((c = lgetc(quotec)) == EOF)
usr.sbin/bgpd/parse.y
3910
if (c == '\n') {
usr.sbin/bgpd/parse.y
3913
} else if (c == '\\') {
usr.sbin/bgpd/parse.y
3918
c = next;
usr.sbin/bgpd/parse.y
3924
} else if (c == quotec) {
usr.sbin/bgpd/parse.y
3927
} else if (c == '\0') {
usr.sbin/bgpd/parse.y
3935
*p++ = c;
usr.sbin/bgpd/parse.y
3966
if (c == '-' || isdigit(c)) {
usr.sbin/bgpd/parse.y
3968
*p++ = c;
usr.sbin/bgpd/parse.y
3973
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/bgpd/parse.y
3974
lungetc(c);
usr.sbin/bgpd/parse.y
3977
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/bgpd/parse.y
3993
c = (unsigned char)*--p;
usr.sbin/bgpd/parse.y
3994
if (c == '-')
usr.sbin/bgpd/parse.y
3995
return (c);
usr.sbin/bgpd/parse.y
4005
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/bgpd/parse.y
4007
if (c == '$' && !expanding) {
usr.sbin/bgpd/parse.y
4008
c = expand_macro();
usr.sbin/bgpd/parse.y
4009
if (c != 0)
usr.sbin/bgpd/parse.y
4010
return (c);
usr.sbin/bgpd/parse.y
4012
*p++ = c;
usr.sbin/bgpd/parse.y
4018
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/bgpd/parse.y
4019
lungetc(c);
usr.sbin/bgpd/parse.y
4026
if (c == '\n') {
usr.sbin/bgpd/parse.y
4030
if (c == EOF)
usr.sbin/bgpd/parse.y
4032
return (c);
usr.sbin/bgpd/parse.y
4106
init_config(struct bgpd_config *c)
usr.sbin/bgpd/parse.y
4110
c->min_holdtime = MIN_HOLDTIME;
usr.sbin/bgpd/parse.y
4111
c->holdtime = INTERVAL_HOLD;
usr.sbin/bgpd/parse.y
4112
c->staletime = INTERVAL_STALE;
usr.sbin/bgpd/parse.y
4113
c->connectretry = INTERVAL_CONNECTRETRY;
usr.sbin/bgpd/parse.y
4114
c->bgpid = get_bgpid();
usr.sbin/bgpd/parse.y
4115
c->fib_priority = kr_default_prio();
usr.sbin/bgpd/parse.y
4116
c->default_tableid = getrtable();
usr.sbin/bgpd/parse.y
4117
if (!ktable_exists(c->default_tableid, &rdomid))
usr.sbin/bgpd/parse.y
4119
c->default_tableid);
usr.sbin/bgpd/parse.y
4120
if (rdomid != c->default_tableid)
usr.sbin/bgpd/parse.y
4122
c->default_tableid);
usr.sbin/bgpd/parse.y
4124
if (asprintf(&c->csock, "%s.%d", SOCKET_NAME, c->default_tableid) == -1)
usr.sbin/bgpd/parse.y
4395
setcommunity(struct community *c, uint32_t as, uint32_t data,
usr.sbin/bgpd/parse.y
4398
c->flags = COMMUNITY_TYPE_BASIC;
usr.sbin/bgpd/parse.y
4399
c->flags |= asflag << 8;
usr.sbin/bgpd/parse.y
4400
c->flags |= dataflag << 16;
usr.sbin/bgpd/parse.y
4401
c->data1 = as;
usr.sbin/bgpd/parse.y
4402
c->data2 = data;
usr.sbin/bgpd/parse.y
4403
c->data3 = 0;
usr.sbin/bgpd/parse.y
4407
parselargecommunity(struct community *c, char *s)
usr.sbin/bgpd/parse.y
4424
if (getcommunity(s, 1, &c->data1, &dflag1) == -1 ||
usr.sbin/bgpd/parse.y
4425
getcommunity(p, 1, &c->data2, &dflag2) == -1 ||
usr.sbin/bgpd/parse.y
4426
getcommunity(q, 1, &c->data3, &dflag3) == -1)
usr.sbin/bgpd/parse.y
4428
c->flags = COMMUNITY_TYPE_LARGE;
usr.sbin/bgpd/parse.y
4429
c->flags |= dflag1 << 8;
usr.sbin/bgpd/parse.y
4430
c->flags |= dflag2 << 16;
usr.sbin/bgpd/parse.y
4431
c->flags |= dflag3 << 24;
usr.sbin/bgpd/parse.y
4436
parsecommunity(struct community *c, int type, char *s)
usr.sbin/bgpd/parse.y
4442
return parselargecommunity(c, s);
usr.sbin/bgpd/parse.y
4446
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4450
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4454
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4458
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4462
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4466
setcommunity(c, COMMUNITY_WELLKNOWN,
usr.sbin/bgpd/parse.y
4480
setcommunity(c, as, data, asflag, dataflag);
usr.sbin/bgpd/parse.y
4584
parseextcommunity(struct community *c, char *t, char *s)
usr.sbin/bgpd/parse.y
4593
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpd/parse.y
4594
c->flags |= COMMUNITY_ANY << 24;
usr.sbin/bgpd/parse.y
4639
c->data1 = uval;
usr.sbin/bgpd/parse.y
4640
c->data2 = uval2;
usr.sbin/bgpd/parse.y
4658
c->data1 = ullval >> 32;
usr.sbin/bgpd/parse.y
4659
c->data2 = ullval;
usr.sbin/bgpd/parse.y
4664
c->data2 = EXT_COMMUNITY_OVS_VALID;
usr.sbin/bgpd/parse.y
4667
c->data2 = EXT_COMMUNITY_OVS_INVALID;
usr.sbin/bgpd/parse.y
4670
c->data2 = EXT_COMMUNITY_OVS_NOTFOUND;
usr.sbin/bgpd/parse.y
4681
c->data3 = type << 8 | subtype;
usr.sbin/bgpd/parse.y
4685
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpd/parse.y
4686
c->flags |= dflag1 << 8;
usr.sbin/bgpd/parse.y
4693
c->flags = COMMUNITY_TYPE_EXT;
usr.sbin/bgpd/parse.y
4694
c->flags |= dflag1 << 8;
usr.sbin/bgpd/parse.y
4695
c->flags |= dflag2 << 16;
usr.sbin/bgpd/parse.y
5083
h2i(char c)
usr.sbin/bgpd/parse.y
5085
if (c >= '0' && c <= '9')
usr.sbin/bgpd/parse.y
5086
return c - '0';
usr.sbin/bgpd/parse.y
5087
else if (c >= 'a' && c <= 'f')
usr.sbin/bgpd/parse.y
5088
return c - 'a' + 10;
usr.sbin/bgpd/parse.y
5089
else if (c >= 'A' && c <= 'F')
usr.sbin/bgpd/parse.y
5090
return c - 'A' + 10;
usr.sbin/bgpd/printconf.c
112
community_type(struct community *c)
usr.sbin/bgpd/printconf.c
114
switch ((uint8_t)c->flags) {
usr.sbin/bgpd/printconf.c
1144
struct community *c = &r->match.community[i];
usr.sbin/bgpd/printconf.c
1145
if (c->flags != 0) {
usr.sbin/bgpd/printconf.c
1146
printf("%s ", community_type(c));
usr.sbin/bgpd/printconf.c
1147
print_community(c);
usr.sbin/bgpd/printconf.c
1226
const char *c;
usr.sbin/bgpd/printconf.c
1242
c = "\t";
usr.sbin/bgpd/printconf.c
1251
c = "";
usr.sbin/bgpd/printconf.c
1253
print_peer(peerlist[i], conf, c);
usr.sbin/bgpd/printconf.c
127
print_community(struct community *c)
usr.sbin/bgpd/printconf.c
133
switch ((uint8_t)c->flags) {
usr.sbin/bgpd/printconf.c
135
switch ((c->flags >> 8) & 0xff) {
usr.sbin/bgpd/printconf.c
146
printf("%u:", c->data1);
usr.sbin/bgpd/printconf.c
149
switch ((c->flags >> 16) & 0xff) {
usr.sbin/bgpd/printconf.c
160
printf("%u ", c->data2);
usr.sbin/bgpd/printconf.c
165
switch ((c->flags >> 8) & 0xff) {
usr.sbin/bgpd/printconf.c
176
printf("%u:", c->data1);
usr.sbin/bgpd/printconf.c
179
switch ((c->flags >> 16) & 0xff) {
usr.sbin/bgpd/printconf.c
190
printf("%u:", c->data2);
usr.sbin/bgpd/printconf.c
193
switch ((c->flags >> 24) & 0xff) {
usr.sbin/bgpd/printconf.c
204
printf("%u ", c->data3);
usr.sbin/bgpd/printconf.c
209
if ((c->flags >> 24 & 0xff) == COMMUNITY_ANY) {
usr.sbin/bgpd/printconf.c
213
type = (int32_t)c->data3 >> 8;
usr.sbin/bgpd/printconf.c
214
subtype = c->data3;
usr.sbin/bgpd/printconf.c
216
if ((c->flags >> 8 & 0xff) == COMMUNITY_ANY) {
usr.sbin/bgpd/printconf.c
226
if ((c->flags >> 8 & 0xff) == COMMUNITY_NEIGHBOR_AS)
usr.sbin/bgpd/printconf.c
228
else if ((c->flags >> 8 & 0xff) == COMMUNITY_LOCAL_AS)
usr.sbin/bgpd/printconf.c
231
printf("%s:", log_as(c->data1));
usr.sbin/bgpd/printconf.c
235
addr.s_addr = htonl(c->data1);
usr.sbin/bgpd/printconf.c
247
if ((c->flags >> 16 & 0xff) == COMMUNITY_ANY)
usr.sbin/bgpd/printconf.c
249
else if ((c->flags >> 16 & 0xff) ==
usr.sbin/bgpd/printconf.c
252
else if ((c->flags >> 16 & 0xff) == COMMUNITY_LOCAL_AS)
usr.sbin/bgpd/printconf.c
255
printf("%u ", c->data2);
usr.sbin/bgpd/printconf.c
259
switch (c->data2) {
usr.sbin/bgpd/printconf.c
272
printf("0x%x%08x ", c->data1 & 0xffff, c->data2);
usr.sbin/bgpd/printconf.c
277
printf("0x%x%08x ", c->data1 & 0xffff, c->data2);
usr.sbin/bgpd/printconf.c
35
const char *community_type(struct community *c);
usr.sbin/bgpd/printconf.c
36
void print_community(struct community *c);
usr.sbin/bgpd/printconf.c
480
print_network(struct network_config *n, const char *c)
usr.sbin/bgpd/printconf.c
484
printf("%snetwork %s static", c, print_af(n->prefix.aid));
usr.sbin/bgpd/printconf.c
487
printf("%snetwork %s connected", c, print_af(n->prefix.aid));
usr.sbin/bgpd/printconf.c
490
printf("%snetwork %s rtlabel \"%s\"", c,
usr.sbin/bgpd/printconf.c
494
printf("%snetwork %s priority %d", c,
usr.sbin/bgpd/printconf.c
498
printf("%snetwork prefix-set %s", c, n->psname);
usr.sbin/bgpd/printconf.c
501
printf("%snetwork %s/%u", c, log_addr(&n->prefix),
usr.sbin/bgpd/printconf.c
592
print_flowspec(struct flowspec_config *fconf, const char *c)
usr.sbin/bgpd/printconf.c
597
printf("%sflowspec %s ", c, print_af(f->aid));
usr.sbin/bgpd/printconf.c
708
print_auth(struct auth_config *auth, const char *c)
usr.sbin/bgpd/printconf.c
713
printf("%s\ttcp md5sig\n", c);
usr.sbin/bgpd/printconf.c
721
printf("%s\tipsec %s in spi %u %s XXXXXX", c, method,
usr.sbin/bgpd/printconf.c
727
printf("%s\tipsec %s out spi %u %s XXXXXX", c, method,
usr.sbin/bgpd/printconf.c
734
printf("%s\tipsec ah ike\n", c);
usr.sbin/bgpd/printconf.c
736
printf("%s\tipsec esp ike\n", c);
usr.sbin/bgpd/printconf.c
757
print_peer(struct peer *peer, struct bgpd_config *conf, const char *c)
usr.sbin/bgpd/printconf.c
764
printf("%sneighbor %s/%u {\n", c, log_addr(&p->remote_addr),
usr.sbin/bgpd/printconf.c
767
printf("%sneighbor %s {\n", c, log_addr(&p->remote_addr));
usr.sbin/bgpd/printconf.c
769
printf("%s\tdescr \"%s\"\n", c, p->descr);
usr.sbin/bgpd/printconf.c
771
printf("%s\trib \"%s\"\n", c, p->rib);
usr.sbin/bgpd/printconf.c
773
printf("%s\tremote-as %s\n", c, log_as(p->remote_as));
usr.sbin/bgpd/printconf.c
775
printf("%s\tlocal-as %s", c, log_as(p->local_as));
usr.sbin/bgpd/printconf.c
781
printf("%s\tdown\n", c);
usr.sbin/bgpd/printconf.c
783
printf("%s\tmultihop %u\n", c, p->distance);
usr.sbin/bgpd/printconf.c
785
printf("%s\tpassive\n", c);
usr.sbin/bgpd/printconf.c
787
printf("%s\tlocal-address %s\n", c,
usr.sbin/bgpd/printconf.c
790
printf("%s\tlocal-address %s\n", c,
usr.sbin/bgpd/printconf.c
793
printf("%s\tport %hu\n", c, p->remote_port);
usr.sbin/bgpd/printconf.c
795
printf("%s\trole %s\n", c, log_policy(p->role));
usr.sbin/bgpd/printconf.c
797
printf("%s\tmax-prefix %u", c, p->max_prefix);
usr.sbin/bgpd/printconf.c
803
printf("%s\tmax-prefix %u out", c, p->max_out_prefix);
usr.sbin/bgpd/printconf.c
809
printf("%s\tholdtime %u\n", c, p->holdtime);
usr.sbin/bgpd/printconf.c
811
printf("%s\tholdtime min %u\n", c, p->min_holdtime);
usr.sbin/bgpd/printconf.c
813
printf("%s\tstaletime %u\n", c, p->staletime);
usr.sbin/bgpd/printconf.c
815
printf("%s\texport none\n", c);
usr.sbin/bgpd/printconf.c
817
printf("%s\texport default-route\n", c);
usr.sbin/bgpd/printconf.c
819
printf("%s\tenforce neighbor-as yes\n", c);
usr.sbin/bgpd/printconf.c
821
printf("%s\tenforce neighbor-as no\n", c);
usr.sbin/bgpd/printconf.c
823
printf("%s\tenforce local-as yes\n", c);
usr.sbin/bgpd/printconf.c
825
printf("%s\tenforce local-as no\n", c);
usr.sbin/bgpd/printconf.c
828
printf("%s\troute-reflector\n", c);
usr.sbin/bgpd/printconf.c
831
printf("%s\troute-reflector %s\n", c,
usr.sbin/bgpd/printconf.c
836
printf("%s\tdemote %s\n", c, p->demote_group);
usr.sbin/bgpd/printconf.c
838
printf("%s\tdepend on \"%s\"\n", c, p->if_depend);
usr.sbin/bgpd/printconf.c
840
printf("%s\ttransparent-as yes\n", c);
usr.sbin/bgpd/printconf.c
844
printf("%s\trde evaluate default\n", c);
usr.sbin/bgpd/printconf.c
847
printf("%s\trde evaluate all\n", c);
usr.sbin/bgpd/printconf.c
852
printf("%s\treject as-set yes\n", c);
usr.sbin/bgpd/printconf.c
855
printf("%s\treject as-set no\n", c);
usr.sbin/bgpd/printconf.c
859
printf("%s\tlog updates\n", c);
usr.sbin/bgpd/printconf.c
861
print_auth(&peer->auth_conf, c);
usr.sbin/bgpd/printconf.c
864
printf("%s\tttl-security yes\n", c);
usr.sbin/bgpd/printconf.c
866
print_announce(p, c);
usr.sbin/bgpd/printconf.c
868
print_mrt(conf, p->id, p->groupid, c, "\t");
usr.sbin/bgpd/printconf.c
870
printf("%s}\n", c);
usr.sbin/bgpd/printconf.c
919
print_announce(struct peer_config *p, const char *c)
usr.sbin/bgpd/printconf.c
926
printf("%s\tannounce %s enforce\n", c, aid2str(aid));
usr.sbin/bgpd/printconf.c
929
printf("%s\tannounce %s\n", c, aid2str(aid));
usr.sbin/bgpd/printconf.c
933
printf("%s\tannounce IPv4 none\n", c);
usr.sbin/bgpd/printconf.c
934
printf("%s\tannounce IPv6 none\n", c);
usr.sbin/bgpd/printconf.c
938
printf("%s\tannounce refresh enforce\n", c);
usr.sbin/bgpd/printconf.c
940
printf("%s\tannounce refresh no\n", c);
usr.sbin/bgpd/printconf.c
943
printf("%s\tannounce enhanced refresh enforce\n", c);
usr.sbin/bgpd/printconf.c
945
printf("%s\tannounce enhanced refresh yes\n", c);
usr.sbin/bgpd/printconf.c
948
printf("%s\tannounce restart enforce\n", c);
usr.sbin/bgpd/printconf.c
950
printf("%s\tannounce restart no\n", c);
usr.sbin/bgpd/printconf.c
954
printf("%s\tannounce graceful notification yes\n", c);
usr.sbin/bgpd/printconf.c
957
printf("%s\tannounce as-4byte yes\n", c);
usr.sbin/bgpd/printconf.c
959
printf("%s\tannounce as-4byte no\n", c);
usr.sbin/bgpd/printconf.c
962
printf("%s\tannounce extended message enforce\n", c);
usr.sbin/bgpd/printconf.c
964
printf("%s\tannounce extended message yes\n", c);
usr.sbin/bgpd/printconf.c
967
printf("%s\tannounce extended nexthop enforce\n", c);
usr.sbin/bgpd/printconf.c
969
printf("%s\tannounce extended nexthop yes\n", c);
usr.sbin/bgpd/printconf.c
972
printf("%s\tannounce add-path recv enforce\n", c);
usr.sbin/bgpd/printconf.c
974
printf("%s\tannounce add-path recv yes\n", c);
usr.sbin/bgpd/printconf.c
977
printf("%s\tannounce add-path send %s", c,
usr.sbin/bgpd/printconf.c
989
printf("%s\tannounce policy enforce\n", c);
usr.sbin/bgpd/printconf.c
991
printf("%s\tannounce policy yes\n", c);
usr.sbin/bgpd/printconf.c
993
printf("%s\tannounce policy no\n", c);
usr.sbin/bgpd/rde_community.c
117
c->data3 = subtype;
usr.sbin/bgpd/rde_community.c
124
c->data3 = type << 8 | subtype;
usr.sbin/bgpd/rde_community.c
132
&c->data1, m ? &m->data1 : NULL))
usr.sbin/bgpd/rde_community.c
135
&c->data2, m ? &m->data2 : NULL))
usr.sbin/bgpd/rde_community.c
145
&c->data1, m ? &m->data1 : NULL))
usr.sbin/bgpd/rde_community.c
148
&c->data2, m ? &m->data2 : NULL))
usr.sbin/bgpd/rde_community.c
151
if (c->data2 > USHRT_MAX)
usr.sbin/bgpd/rde_community.c
160
c->data1 = fc->data1;
usr.sbin/bgpd/rde_community.c
161
c->data2 = fc->data2;
usr.sbin/bgpd/rde_community.c
172
fatalx("%s: unknown type %d", __func__, (uint8_t)c->flags);
usr.sbin/bgpd/rde_community.c
222
insert_community(struct rde_community *comm, const struct community *c)
usr.sbin/bgpd/rde_community.c
242
r = fast_match(comm->communities + l, c);
usr.sbin/bgpd/rde_community.c
250
(comm->nentries - l) * sizeof(*c));
usr.sbin/bgpd/rde_community.c
256
comm->communities[l] = *c;
usr.sbin/bgpd/rde_community.c
262
non_transitive_ext_community(struct community *c)
usr.sbin/bgpd/rde_community.c
264
if ((uint8_t)c->flags != COMMUNITY_TYPE_EXT)
usr.sbin/bgpd/rde_community.c
266
if ((c->data3 >> 8) & EXT_COMMUNITY_NON_TRANSITIVE)
usr.sbin/bgpd/rde_community.c
484
uint64_t c;
usr.sbin/bgpd/rde_community.c
494
if (ibuf_get_n64(buf, &c) == -1)
usr.sbin/bgpd/rde_community.c
497
type = c >> 56;
usr.sbin/bgpd/rde_community.c
506
set.data1 = (c >> 32) & 0xffff;
usr.sbin/bgpd/rde_community.c
507
set.data2 = c;
usr.sbin/bgpd/rde_community.c
511
set.data1 = c >> 16;
usr.sbin/bgpd/rde_community.c
512
set.data2 = c & 0xffff;
usr.sbin/bgpd/rde_community.c
515
set.data3 = c >> 48;
usr.sbin/bgpd/rde_community.c
62
fc2c(const struct community *fc, struct rde_peer *peer, struct community *c,
usr.sbin/bgpd/rde_community.c
68
memset(c, 0, sizeof(*c));
usr.sbin/bgpd/rde_community.c
72
c->flags = (uint8_t)fc->flags;
usr.sbin/bgpd/rde_community.c
74
switch ((uint8_t)c->flags) {
usr.sbin/bgpd/rde_community.c
77
&c->data1, m ? &m->data1 : NULL))
usr.sbin/bgpd/rde_community.c
792
struct community c;
usr.sbin/bgpd/rde_community.c
795
if (fc2c(fc, NULL, &c, NULL) == -1)
usr.sbin/bgpd/rde_community.c
798
switch ((c.data3 >> 8) & EXT_COMMUNITY_VALUE) {
usr.sbin/bgpd/rde_community.c
80
&c->data2, m ? &m->data2 : NULL))
usr.sbin/bgpd/rde_community.c
801
rd |= ((uint64_t)c.data1 & 0xffff) << 32;
usr.sbin/bgpd/rde_community.c
802
rd |= (uint64_t)c.data2;
usr.sbin/bgpd/rde_community.c
806
rd |= (uint64_t)c.data1 << 16;
usr.sbin/bgpd/rde_community.c
807
rd |= (uint64_t)c.data2 & 0xffff;
usr.sbin/bgpd/rde_community.c
811
rd |= (uint64_t)c.data1 << 16;
usr.sbin/bgpd/rde_community.c
812
rd |= (uint64_t)c.data2 & 0xffff;
usr.sbin/bgpd/rde_community.c
84
if (c->data1 > USHRT_MAX || c->data2 > USHRT_MAX)
usr.sbin/bgpd/rde_community.c
89
&c->data1, m ? &m->data1 : NULL))
usr.sbin/bgpd/rde_community.c
92
&c->data2, m ? &m->data2 : NULL))
usr.sbin/bgpd/rde_community.c
95
&c->data3, m ? &m->data3 : NULL))
usr.sbin/bgpd/session.c
1575
getpeerbydesc(struct bgpd_config *c, const char *descr)
usr.sbin/bgpd/session.c
1580
RB_FOREACH(p, peer_head, &c->peers)
usr.sbin/bgpd/session.c
1597
getpeerbyip(struct bgpd_config *c, struct sockaddr *ip)
usr.sbin/bgpd/session.c
1606
RB_FOREACH(p, peer_head, &c->peers)
usr.sbin/bgpd/session.c
1612
RB_FOREACH(p, peer_head, &c->peers)
usr.sbin/bgpd/session.c
1626
if (getpeerbyid(c, id) == NULL) /* we found a free id */
usr.sbin/bgpd/session.c
1635
init_peer(newpeer, c);
usr.sbin/bgpd/session.c
1640
if (RB_INSERT(peer_head, &c->peers, newpeer) != NULL)
usr.sbin/bgpd/session.c
1649
getpeerbyid(struct bgpd_config *c, uint32_t peerid)
usr.sbin/bgpd/session.c
1655
return RB_FIND(peer_head, &c->peers, &lookup);
usr.sbin/bgpd/session.c
1898
merge_peers(struct bgpd_config *c, struct bgpd_config *nc)
usr.sbin/bgpd/session.c
1902
RB_FOREACH(p, peer_head, &c->peers) {
usr.sbin/bgpd/session.c
1915
tcp_md5_del_listener(c, p);
usr.sbin/bgpd/session.c
1917
tcp_md5_add_listener(c, np);
usr.sbin/bgpd/session.c
1955
RB_FOREACH(xp, peer_head, &c->peers) {
usr.sbin/bgpd/session.c
1976
if (RB_INSERT(peer_head, &c->peers, np) != NULL)
usr.sbin/bgpd/session.c
1979
tcp_md5_add_listener(c, np);
usr.sbin/bgpd/session.c
568
init_peer(struct peer *p, struct bgpd_config *c)
usr.sbin/bgpd/session.c
586
p->conf.holdtime = c->holdtime;
usr.sbin/bgpd/session.c
588
p->conf.min_holdtime = c->min_holdtime;
usr.sbin/bgpd/session.c
590
p->conf.connectretry = c->connectretry;
usr.sbin/bgpd/session.c
591
p->local_bgpid = c->bgpid;
usr.sbin/bgplgd/qs.c
112
unsigned char c;
usr.sbin/bgplgd/qs.c
114
while ((c = *str++) != '\0')
usr.sbin/bgplgd/qs.c
115
if (!isalnum(c) && !ispunct(c) && c != ' ')
usr.sbin/bgplgd/qs.c
124
unsigned char c;
usr.sbin/bgplgd/qs.c
127
while ((c = *str++) != '\0') {
usr.sbin/bgplgd/qs.c
129
if (first && c == '0') {
usr.sbin/bgplgd/qs.c
134
if (!isdigit(c))
usr.sbin/bgplgd/qs.c
91
char c;
usr.sbin/bgplgd/qs.c
92
c = hex(s[i + 1]) << 4 | hex(s[i + 2]);
usr.sbin/bgplgd/qs.c
94
if (c == 0)
usr.sbin/bgplgd/qs.c
95
c = ' ';
usr.sbin/bgplgd/qs.c
96
buf[blen++] = c;
usr.sbin/bgplgd/slowcgi.c
1039
c->command_pid = pid;
usr.sbin/bgplgd/slowcgi.c
1040
event_set(&c->script_ev, s_out[0], EV_READ | EV_PERSIST,
usr.sbin/bgplgd/slowcgi.c
1041
script_std_in, c);
usr.sbin/bgplgd/slowcgi.c
1042
event_add(&c->script_ev, NULL);
usr.sbin/bgplgd/slowcgi.c
1043
event_set(&c->script_err_ev, s_err[0], EV_READ | EV_PERSIST,
usr.sbin/bgplgd/slowcgi.c
1044
script_err_in, c);
usr.sbin/bgplgd/slowcgi.c
1045
event_add(&c->script_err_ev, NULL);
usr.sbin/bgplgd/slowcgi.c
1049
script_in(int fd, struct event *ev, struct request *c, uint8_t type)
usr.sbin/bgplgd/slowcgi.c
1062
header->id = htons(c->id);
usr.sbin/bgplgd/slowcgi.c
1082
slowcgi_add_response(c, resp);
usr.sbin/bgplgd/slowcgi.c
1086
c->script_flags |= STDOUT_DONE;
usr.sbin/bgplgd/slowcgi.c
1088
c->script_flags |= STDERR_DONE;
usr.sbin/bgplgd/slowcgi.c
1090
if (c->script_flags == (STDOUT_DONE | STDERR_DONE |
usr.sbin/bgplgd/slowcgi.c
1092
create_end_record(c);
usr.sbin/bgplgd/slowcgi.c
1101
struct request *c = arg;
usr.sbin/bgplgd/slowcgi.c
1102
script_in(fd, &c->script_ev, c, FCGI_STDOUT);
usr.sbin/bgplgd/slowcgi.c
1108
struct request *c = arg;
usr.sbin/bgplgd/slowcgi.c
1109
script_in(fd, &c->script_err_ev, c, FCGI_STDERR);
usr.sbin/bgplgd/slowcgi.c
1113
create_data_record(struct request *c, uint8_t type, const void *buf, size_t len)
usr.sbin/bgplgd/slowcgi.c
1128
header->id = htons(c->id);
usr.sbin/bgplgd/slowcgi.c
1138
slowcgi_add_response(c, resp);
usr.sbin/bgplgd/slowcgi.c
1146
create_end_record(struct request *c)
usr.sbin/bgplgd/slowcgi.c
1159
header->id = htons(c->id);
usr.sbin/bgplgd/slowcgi.c
1166
end_request->app_status = htonl(c->command_status);
usr.sbin/bgplgd/slowcgi.c
1174
slowcgi_add_response(c, resp);
usr.sbin/bgplgd/slowcgi.c
1175
c->request_done = 1;
usr.sbin/bgplgd/slowcgi.c
1179
cleanup_request(struct request *c)
usr.sbin/bgplgd/slowcgi.c
1184
evtimer_del(&c->tmo);
usr.sbin/bgplgd/slowcgi.c
1185
if (event_initialized(&c->ev))
usr.sbin/bgplgd/slowcgi.c
1186
event_del(&c->ev);
usr.sbin/bgplgd/slowcgi.c
1187
if (event_initialized(&c->resp_ev))
usr.sbin/bgplgd/slowcgi.c
1188
event_del(&c->resp_ev);
usr.sbin/bgplgd/slowcgi.c
1189
if (event_initialized(&c->script_ev)) {
usr.sbin/bgplgd/slowcgi.c
1190
close(EVENT_FD(&c->script_ev));
usr.sbin/bgplgd/slowcgi.c
1191
event_del(&c->script_ev);
usr.sbin/bgplgd/slowcgi.c
1193
if (event_initialized(&c->script_err_ev)) {
usr.sbin/bgplgd/slowcgi.c
1194
close(EVENT_FD(&c->script_err_ev));
usr.sbin/bgplgd/slowcgi.c
1195
event_del(&c->script_err_ev);
usr.sbin/bgplgd/slowcgi.c
1198
close(c->fd);
usr.sbin/bgplgd/slowcgi.c
1199
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/bgplgd/slowcgi.c
1200
env_entry = SLIST_FIRST(&c->env);
usr.sbin/bgplgd/slowcgi.c
1201
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/bgplgd/slowcgi.c
1207
while ((resp = TAILQ_FIRST(&c->response_head))) {
usr.sbin/bgplgd/slowcgi.c
1208
TAILQ_REMOVE(&c->response_head, resp, entry);
usr.sbin/bgplgd/slowcgi.c
1211
LIST_REMOVE(c, entry);
usr.sbin/bgplgd/slowcgi.c
1212
if (!c->inflight_fds_accounted)
usr.sbin/bgplgd/slowcgi.c
1214
free(c);
usr.sbin/bgplgd/slowcgi.c
283
int c, fd;
usr.sbin/bgplgd/slowcgi.c
292
for (c=0; c < 3; c++) {
usr.sbin/bgplgd/slowcgi.c
293
if (fstat(c, &sb) == -1) {
usr.sbin/bgplgd/slowcgi.c
295
if (dup2(fd, c) == -1)
usr.sbin/bgplgd/slowcgi.c
297
if (fd > c)
usr.sbin/bgplgd/slowcgi.c
304
while ((c = getopt(argc, argv, "dp:S:s:U:u:V")) != -1) {
usr.sbin/bgplgd/slowcgi.c
305
switch (c) {
usr.sbin/bgplgd/slowcgi.c
455
struct request *c;
usr.sbin/bgplgd/slowcgi.c
462
c = NULL;
usr.sbin/bgplgd/slowcgi.c
482
c = calloc(1, sizeof(*c));
usr.sbin/bgplgd/slowcgi.c
483
if (c == NULL) {
usr.sbin/bgplgd/slowcgi.c
489
c->fd = s;
usr.sbin/bgplgd/slowcgi.c
490
c->buf_pos = 0;
usr.sbin/bgplgd/slowcgi.c
491
c->buf_len = 0;
usr.sbin/bgplgd/slowcgi.c
492
c->request_started = 0;
usr.sbin/bgplgd/slowcgi.c
493
c->inflight_fds_accounted = 0;
usr.sbin/bgplgd/slowcgi.c
494
TAILQ_INIT(&c->response_head);
usr.sbin/bgplgd/slowcgi.c
496
event_set(&c->ev, s, EV_READ | EV_PERSIST, slowcgi_request, c);
usr.sbin/bgplgd/slowcgi.c
497
event_add(&c->ev, NULL);
usr.sbin/bgplgd/slowcgi.c
498
event_set(&c->resp_ev, s, EV_WRITE | EV_PERSIST, slowcgi_response, c);
usr.sbin/bgplgd/slowcgi.c
499
evtimer_set(&c->tmo, slowcgi_timeout, c);
usr.sbin/bgplgd/slowcgi.c
500
evtimer_add(&c->tmo, &timeout);
usr.sbin/bgplgd/slowcgi.c
501
LIST_INSERT_HEAD(&slowcgi_proc.requests, c, entry);
usr.sbin/bgplgd/slowcgi.c
507
struct request *c = arg;
usr.sbin/bgplgd/slowcgi.c
510
if (c->script_flags & SCRIPT_DONE)
usr.sbin/bgplgd/slowcgi.c
513
if (c->command_pid == 0) {
usr.sbin/bgplgd/slowcgi.c
514
c->command_status = SIGALRM;
usr.sbin/bgplgd/slowcgi.c
515
error_response(c, 408);
usr.sbin/bgplgd/slowcgi.c
519
ldebug("timeout fired for pid %d", c->command_pid);
usr.sbin/bgplgd/slowcgi.c
521
if (c->timeout_fired)
usr.sbin/bgplgd/slowcgi.c
524
if (kill(c->command_pid, sig) == -1) {
usr.sbin/bgplgd/slowcgi.c
525
lwarn("kill child %d after timeout", c->command_pid);
usr.sbin/bgplgd/slowcgi.c
526
if (event_initialized(&c->script_ev)) {
usr.sbin/bgplgd/slowcgi.c
527
close(EVENT_FD(&c->script_ev));
usr.sbin/bgplgd/slowcgi.c
528
event_del(&c->script_ev);
usr.sbin/bgplgd/slowcgi.c
530
if (event_initialized(&c->script_err_ev)) {
usr.sbin/bgplgd/slowcgi.c
531
close(EVENT_FD(&c->script_err_ev));
usr.sbin/bgplgd/slowcgi.c
532
event_del(&c->script_err_ev);
usr.sbin/bgplgd/slowcgi.c
535
c->command_status = SIGALRM;
usr.sbin/bgplgd/slowcgi.c
536
c->script_flags = STDOUT_DONE | STDERR_DONE | SCRIPT_DONE;
usr.sbin/bgplgd/slowcgi.c
537
create_end_record(c);
usr.sbin/bgplgd/slowcgi.c
540
if (c->timeout_fired++ == 0)
usr.sbin/bgplgd/slowcgi.c
541
evtimer_add(&c->tmo, &kill_timeout);
usr.sbin/bgplgd/slowcgi.c
547
struct request *c;
usr.sbin/bgplgd/slowcgi.c
557
LIST_FOREACH(c, &p->requests, entry)
usr.sbin/bgplgd/slowcgi.c
558
if (c->command_pid == pid)
usr.sbin/bgplgd/slowcgi.c
560
if (c == NULL) {
usr.sbin/bgplgd/slowcgi.c
566
c->command_status = WTERMSIG(status);
usr.sbin/bgplgd/slowcgi.c
568
c->command_status = WEXITSTATUS(status);
usr.sbin/bgplgd/slowcgi.c
572
c->command_status);
usr.sbin/bgplgd/slowcgi.c
574
c->script_flags |= SCRIPT_DONE;
usr.sbin/bgplgd/slowcgi.c
576
if (c->script_flags == (STDOUT_DONE | STDERR_DONE |
usr.sbin/bgplgd/slowcgi.c
578
create_end_record(c);
usr.sbin/bgplgd/slowcgi.c
590
slowcgi_add_response(struct request *c, struct fcgi_response *resp)
usr.sbin/bgplgd/slowcgi.c
607
TAILQ_INSERT_TAIL(&c->response_head, resp, entry);
usr.sbin/bgplgd/slowcgi.c
608
event_add(&c->resp_ev, NULL);
usr.sbin/bgplgd/slowcgi.c
614
struct request *c;
usr.sbin/bgplgd/slowcgi.c
619
c = arg;
usr.sbin/bgplgd/slowcgi.c
621
while ((resp = TAILQ_FIRST(&c->response_head))) {
usr.sbin/bgplgd/slowcgi.c
630
cleanup_request(c);
usr.sbin/bgplgd/slowcgi.c
636
TAILQ_REMOVE(&c->response_head, resp, entry);
usr.sbin/bgplgd/slowcgi.c
641
if (TAILQ_EMPTY(&c->response_head)) {
usr.sbin/bgplgd/slowcgi.c
642
if (c->request_done)
usr.sbin/bgplgd/slowcgi.c
643
cleanup_request(c);
usr.sbin/bgplgd/slowcgi.c
645
event_del(&c->resp_ev);
usr.sbin/bgplgd/slowcgi.c
652
struct request *c;
usr.sbin/bgplgd/slowcgi.c
655
c = arg;
usr.sbin/bgplgd/slowcgi.c
657
n = read(fd, c->buf + c->buf_pos + c->buf_len,
usr.sbin/bgplgd/slowcgi.c
658
FCGI_RECORD_SIZE - c->buf_pos-c->buf_len);
usr.sbin/bgplgd/slowcgi.c
678
c->buf_len += n;
usr.sbin/bgplgd/slowcgi.c
687
parsed = parse_record(c->buf + c->buf_pos, c->buf_len, c);
usr.sbin/bgplgd/slowcgi.c
690
c->buf_pos += parsed;
usr.sbin/bgplgd/slowcgi.c
691
c->buf_len -= parsed;
usr.sbin/bgplgd/slowcgi.c
692
} while (parsed > 0 && c->buf_len > 0);
usr.sbin/bgplgd/slowcgi.c
695
if (c->buf_len > 0) {
usr.sbin/bgplgd/slowcgi.c
696
memmove(c->buf, c->buf + c->buf_pos, c->buf_len);
usr.sbin/bgplgd/slowcgi.c
697
c->buf_pos = 0;
usr.sbin/bgplgd/slowcgi.c
701
cleanup_request(c);
usr.sbin/bgplgd/slowcgi.c
705
parse_begin_request(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/bgplgd/slowcgi.c
708
if (c->request_started) {
usr.sbin/bgplgd/slowcgi.c
719
c->request_started = 1;
usr.sbin/bgplgd/slowcgi.c
721
c->id = id;
usr.sbin/bgplgd/slowcgi.c
722
SLIST_INIT(&c->env);
usr.sbin/bgplgd/slowcgi.c
723
c->env_count = 0;
usr.sbin/bgplgd/slowcgi.c
727
parse_params(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/bgplgd/slowcgi.c
732
if (!c->request_started) {
usr.sbin/bgplgd/slowcgi.c
737
if (c->id != id) {
usr.sbin/bgplgd/slowcgi.c
747
if (c->command_pid != 0) {
usr.sbin/bgplgd/slowcgi.c
751
exec_cgi(c);
usr.sbin/bgplgd/slowcgi.c
817
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/bgplgd/slowcgi.c
818
ldebug("env[%d], %s=%s", c->env_count, env_entry->key,
usr.sbin/bgplgd/slowcgi.c
820
c->env_count++;
usr.sbin/bgplgd/slowcgi.c
825
parse_stdin(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/bgplgd/slowcgi.c
827
if (c->id != id) {
usr.sbin/bgplgd/slowcgi.c
837
parse_record(uint8_t *buf, size_t n, struct request *c)
usr.sbin/bgplgd/slowcgi.c
861
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/bgplgd/slowcgi.c
865
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/bgplgd/slowcgi.c
869
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/bgplgd/slowcgi.c
881
env_get(struct request *c, const char *key)
usr.sbin/bgplgd/slowcgi.c
885
SLIST_FOREACH(env, &c->env, entry) {
usr.sbin/bgplgd/slowcgi.c
909
error_response(struct request *c, int res)
usr.sbin/bgplgd/slowcgi.c
941
create_data_record(c, FCGI_STDOUT, buf, len);
usr.sbin/bgplgd/slowcgi.c
943
c->script_flags = (STDOUT_DONE | STDERR_DONE | SCRIPT_DONE);
usr.sbin/bgplgd/slowcgi.c
944
create_end_record(c);
usr.sbin/bgplgd/slowcgi.c
954
exec_cgi(struct request *c)
usr.sbin/bgplgd/slowcgi.c
960
res = prep_request(&ctx, env_get(c, "REQUEST_METHOD"),
usr.sbin/bgplgd/slowcgi.c
961
env_get(c, "PATH_INFO"), env_get(c, "QUERY_STRING"));
usr.sbin/bgplgd/slowcgi.c
963
error_response(c, res);
usr.sbin/bgplgd/slowcgi.c
974
c->inflight_fds_accounted = 1;
usr.sbin/bgplgd/slowcgi.c
978
c->command_status = errno;
usr.sbin/bgplgd/slowcgi.c
990
c->script_flags = (STDOUT_DONE | STDERR_DONE | SCRIPT_DONE);
usr.sbin/bgplgd/slowcgi.c
991
create_end_record(c);
usr.sbin/btrace/bt_parse.y
1000
} else if (allowed_to_end_number(c) || c == '[') {
usr.sbin/btrace/bt_parse.y
1006
yyerror("'@%s%c' is an invalid variable name", buf, c);
usr.sbin/btrace/bt_parse.y
1013
while ((c = lgetc()) != EOF) {
usr.sbin/btrace/bt_parse.y
1014
if (c == '"') {
usr.sbin/btrace/bt_parse.y
1016
c = skip();
usr.sbin/btrace/bt_parse.y
1017
if (c == '"')
usr.sbin/btrace/bt_parse.y
1023
if (c == '\\') {
usr.sbin/btrace/bt_parse.y
1024
c = lgetc();
usr.sbin/btrace/bt_parse.y
1025
switch (c) {
usr.sbin/btrace/bt_parse.y
1026
case '\\': c = '\\'; break;
usr.sbin/btrace/bt_parse.y
1027
case '\'': c = '\''; break;
usr.sbin/btrace/bt_parse.y
1028
case '"': c = '"'; break;
usr.sbin/btrace/bt_parse.y
1029
case 'a': c = '\a'; break;
usr.sbin/btrace/bt_parse.y
1030
case 'b': c = '\b'; break;
usr.sbin/btrace/bt_parse.y
1031
case 'e': c = 033; break;
usr.sbin/btrace/bt_parse.y
1032
case 'f': c = '\f'; break;
usr.sbin/btrace/bt_parse.y
1033
case 'n': c = '\n'; break;
usr.sbin/btrace/bt_parse.y
1034
case 'r': c = '\r'; break;
usr.sbin/btrace/bt_parse.y
1035
case 't': c = '\t'; break;
usr.sbin/btrace/bt_parse.y
1036
case 'v': c = '\v'; break;
usr.sbin/btrace/bt_parse.y
1038
yyerror("'%c' unsupported escape", c);
usr.sbin/btrace/bt_parse.y
1042
*p++ = c;
usr.sbin/btrace/bt_parse.y
1048
if (c == EOF) {
usr.sbin/btrace/bt_parse.y
1062
if (isdigit(c)) {
usr.sbin/btrace/bt_parse.y
1064
*p++ = c;
usr.sbin/btrace/bt_parse.y
1069
} while ((c = lgetc()) != EOF &&
usr.sbin/btrace/bt_parse.y
1070
(isxdigit(c) || c == 'x' || c == 'X'));
usr.sbin/btrace/bt_parse.y
1072
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/btrace/bt_parse.y
1091
c = *--p;
usr.sbin/btrace/bt_parse.y
1096
if (allowed_in_string(c)) {
usr.sbin/btrace/bt_parse.y
1099
*p++ = c;
usr.sbin/btrace/bt_parse.y
1104
} while ((c = lgetc()) != EOF && (allowed_in_string(c)));
usr.sbin/btrace/bt_parse.y
1132
if (c == '\n') {
usr.sbin/btrace/bt_parse.y
1136
if (c == EOF)
usr.sbin/btrace/bt_parse.y
1138
return c;
usr.sbin/btrace/bt_parse.y
1145
int c, indent = yylval.colno;
usr.sbin/btrace/bt_parse.y
1150
for (i = 0; line[i] != '\0' && (c = line[i]) != '\n'; i++) {
usr.sbin/btrace/bt_parse.y
1151
if (c == '\t')
usr.sbin/btrace/bt_parse.y
1153
fputc(c, stderr);
usr.sbin/btrace/bt_parse.y
836
int c;
usr.sbin/btrace/bt_parse.y
840
for (c = lgetc(); isspace(c); c = lgetc()) {
usr.sbin/btrace/bt_parse.y
841
if (c == '\n') {
usr.sbin/btrace/bt_parse.y
848
if ((c == '/' && peek() == '/') ||
usr.sbin/btrace/bt_parse.y
849
(yylval.lineno == 1 && yylval.colno == 1 && c == '#' &&
usr.sbin/btrace/bt_parse.y
851
for (c = lgetc(); c != EOF; c = lgetc()) {
usr.sbin/btrace/bt_parse.y
852
if (c == '\n') {
usr.sbin/btrace/bt_parse.y
861
if (c == '/' && peek() == '*') {
usr.sbin/btrace/bt_parse.y
864
for (pc = 0, c = lgetc(); c != EOF; c = lgetc()) {
usr.sbin/btrace/bt_parse.y
865
if (pc == '*' && c == '/')
usr.sbin/btrace/bt_parse.y
867
else if (c == '\n')
usr.sbin/btrace/bt_parse.y
869
pc = c;
usr.sbin/btrace/bt_parse.y
873
return c;
usr.sbin/btrace/bt_parse.y
881
int c;
usr.sbin/btrace/bt_parse.y
887
c = skip();
usr.sbin/btrace/bt_parse.y
889
switch (c) {
usr.sbin/btrace/bt_parse.y
894
return (c == '=') ? OP_EQ : OP_NE;
usr.sbin/btrace/bt_parse.y
896
return c;
usr.sbin/btrace/bt_parse.y
914
return c;
usr.sbin/btrace/bt_parse.y
920
return c;
usr.sbin/btrace/bt_parse.y
938
return c;
usr.sbin/btrace/bt_parse.y
940
c = lgetc();
usr.sbin/btrace/bt_parse.y
941
if (c == '#') {
usr.sbin/btrace/bt_parse.y
944
} else if (isdigit(c)) {
usr.sbin/btrace/bt_parse.y
946
*p++ = c;
usr.sbin/btrace/bt_parse.y
951
} while ((c = lgetc()) != EOF && isdigit(c));
usr.sbin/btrace/bt_parse.y
954
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/btrace/bt_parse.y
967
} else if (isalpha(c)) {
usr.sbin/btrace/bt_parse.y
969
*p++ = c;
usr.sbin/btrace/bt_parse.y
974
} while ((c = lgetc()) != EOF && allowed_in_string(c));
usr.sbin/btrace/bt_parse.y
981
yyerror("'$%s%c' is an invalid variable name", buf, c);
usr.sbin/btrace/bt_parse.y
985
c = lgetc();
usr.sbin/btrace/bt_parse.y
987
if (isalpha(c)) {
usr.sbin/btrace/bt_parse.y
989
*p++ = c;
usr.sbin/btrace/bt_parse.y
994
} while ((c = lgetc()) != EOF && allowed_in_string(c));
usr.sbin/btrace/printf.c
235
int c;
usr.sbin/btrace/printf.c
247
for (c = 3, value = 0; c-- && isodigit(*str); str++) {
usr.sbin/btrace/printf.c
276
int c;
usr.sbin/btrace/printf.c
283
for (c = 3, value = 0; c-- && isodigit(*str); str++) {
usr.sbin/btrace/printf.c
398
int c;
usr.sbin/btrace/printf.c
403
c = ba2long(gargv, gdevt);
usr.sbin/btrace/printf.c
405
return c;
usr.sbin/btrace/printf.c
453
unsigned char c = (unsigned char)str[1];
usr.sbin/btrace/printf.c
454
return c;
usr.sbin/btrace/printf.c
477
unsigned char c = (unsigned char)str[1];
usr.sbin/btrace/printf.c
478
return c;
usr.sbin/btrace/printf.c
501
unsigned char c = (unsigned char)str[1];
usr.sbin/btrace/printf.c
502
return c;
usr.sbin/btrace/printf.c
64
#define isodigit(c) ((c) >= '0' && (c) <= '7')
usr.sbin/btrace/printf.c
65
#define octtobin(c) ((c) - '0')
usr.sbin/btrace/printf.c
66
#define hextobin(c) ((c) >= 'A' && (c) <= 'F' ? c - 'A' + 10 : (c) >= 'a' && (c) <= 'f' ? c - 'a' + 10 : c - '0')
usr.sbin/config/main.c
376
char *p, *low, c;
usr.sbin/config/main.c
387
for (n = name, p = low; (c = *n) != '\0'; n++)
usr.sbin/config/main.c
388
*p++ = isupper((unsigned char)c) ?
usr.sbin/config/main.c
389
tolower((unsigned char)c) : c;
usr.sbin/config/main.c
410
char *p, *low, c;
usr.sbin/config/main.c
434
for (n = name, p = low; (c = *n) != '\0'; n++)
usr.sbin/config/main.c
435
*p++ = isupper((unsigned char)c) ?
usr.sbin/config/main.c
436
tolower((unsigned char)c) : c;
usr.sbin/config/main.c
450
char *p, *low, c;
usr.sbin/config/main.c
458
for (n = name, p = low; (c = *n) != '\0'; n++)
usr.sbin/config/main.c
459
*p++ = isupper((unsigned char)c) ?
usr.sbin/config/main.c
460
tolower((unsigned char)c) : c;
usr.sbin/config/mkheaders.c
197
char *dst, c;
usr.sbin/config/mkheaders.c
202
while ((c = *src++) != 0)
usr.sbin/config/mkheaders.c
203
*dst++ = islower((unsigned char)c) ?
usr.sbin/config/mkheaders.c
204
toupper((unsigned char)c) : c;
usr.sbin/config/sem.c
1001
int c;
usr.sbin/config/sem.c
1007
c = (u_char)name[--l];
usr.sbin/config/sem.c
1008
if (!isdigit((unsigned char)c)) {
usr.sbin/config/sem.c
1009
if (c == '*')
usr.sbin/config/sem.c
1011
else if (c == '?')
usr.sbin/config/sem.c
962
concat(const char *name, int c)
usr.sbin/config/sem.c
969
error("device name `%s%c' too long", name, c);
usr.sbin/config/sem.c
973
buf[len] = c;
usr.sbin/config/ukcutil.c
1363
char *c;
usr.sbin/config/ukcutil.c
1376
c = buf;
usr.sbin/config/ukcutil.c
1378
while (*c != '\0') {
usr.sbin/config/ukcutil.c
1379
switch (*c) {
usr.sbin/config/ukcutil.c
1381
c++;
usr.sbin/config/ukcutil.c
1382
c++;
usr.sbin/config/ukcutil.c
1383
devno = atoi(c);
usr.sbin/config/ukcutil.c
1384
while (*c >= '0' && *c <= '9')
usr.sbin/config/ukcutil.c
1385
c++;
usr.sbin/config/ukcutil.c
1386
c++;
usr.sbin/config/ukcutil.c
1387
unit = atoi(c);
usr.sbin/config/ukcutil.c
1388
if (*c == '-') c++;
usr.sbin/config/ukcutil.c
1389
while (*c >= '0' && *c <= '9')
usr.sbin/config/ukcutil.c
1390
c++;
usr.sbin/config/ukcutil.c
1391
c++;
usr.sbin/config/ukcutil.c
1392
state = atoi(c);
usr.sbin/config/ukcutil.c
1393
if (*c == '-')
usr.sbin/config/ukcutil.c
1394
c++;
usr.sbin/config/ukcutil.c
1395
while (*c >= '0' && *c <= '9')
usr.sbin/config/ukcutil.c
1396
c++;
usr.sbin/config/ukcutil.c
1397
c++;
usr.sbin/config/ukcutil.c
1398
newno = atoi(c);
usr.sbin/config/ukcutil.c
1399
while (*c >= '0' && *c <= '9')
usr.sbin/config/ukcutil.c
1400
c++;
usr.sbin/config/ukcutil.c
1402
while (*c != '\n')
usr.sbin/config/ukcutil.c
1403
c++;
usr.sbin/config/ukcutil.c
1404
c++;
usr.sbin/config/ukcutil.c
1407
c++;
usr.sbin/config/ukcutil.c
1408
c++;
usr.sbin/config/ukcutil.c
1409
devno = atoi(c);
usr.sbin/config/ukcutil.c
1410
while (*c >= '0' && *c <= '9')
usr.sbin/config/ukcutil.c
1411
c++;
usr.sbin/config/ukcutil.c
1412
if (*c == ' ')
usr.sbin/config/ukcutil.c
1413
c++;
usr.sbin/config/ukcutil.c
1414
if (*c != '\n')
usr.sbin/config/ukcutil.c
1415
change_history(devno, c);
usr.sbin/config/ukcutil.c
1416
while (*c != '\n')
usr.sbin/config/ukcutil.c
1417
c++;
usr.sbin/config/ukcutil.c
1418
c++;
usr.sbin/config/ukcutil.c
1421
c++;
usr.sbin/config/ukcutil.c
1422
devno = atoi(c);
usr.sbin/config/ukcutil.c
1424
while (*c != '\n')
usr.sbin/config/ukcutil.c
1425
c++;
usr.sbin/config/ukcutil.c
1426
c++;
usr.sbin/config/ukcutil.c
1429
c++;
usr.sbin/config/ukcutil.c
1430
devno = atoi(c);
usr.sbin/config/ukcutil.c
1432
while (*c != '\n')
usr.sbin/config/ukcutil.c
1433
c++;
usr.sbin/config/ukcutil.c
1434
c++;
usr.sbin/config/ukcutil.c
1437
while (*c != '\0')
usr.sbin/config/ukcutil.c
1438
c++;
usr.sbin/config/ukcutil.c
1441
printf("unknown command %c\n", *c);
usr.sbin/config/ukcutil.c
1442
while (*c != '\0' && *c != '\n')
usr.sbin/config/ukcutil.c
1443
c++;
usr.sbin/config/ukcutil.c
181
char c;
usr.sbin/config/ukcutil.c
211
c = ' ';
usr.sbin/config/ukcutil.c
216
printf("%c", c);
usr.sbin/config/ukcutil.c
218
c = '|';
usr.sbin/config/ukcutil.c
248
numberl(const char *c, long *val)
usr.sbin/config/ukcutil.c
253
*val = strtol(c, &ep, 0);
usr.sbin/config/ukcutil.c
254
if (*c == '\0' || (!isspace((unsigned char)*ep) && *ep != '\0') ||
usr.sbin/config/ukcutil.c
261
number(const char *c, int *val)
usr.sbin/config/ukcutil.c
264
int ret = numberl(c, &v);
usr.sbin/config/ukcutil.c
280
char *c;
usr.sbin/config/ukcutil.c
282
c = cmd;
usr.sbin/config/ukcutil.c
283
while (*c >= 'a' && *c <= 'z') {
usr.sbin/config/ukcutil.c
285
c++;
usr.sbin/config/ukcutil.c
288
if (*c == '*') {
usr.sbin/config/ukcutil.c
290
c++;
usr.sbin/config/ukcutil.c
292
while (*c >= '0' && *c <= '9') {
usr.sbin/config/ukcutil.c
294
u = u*10 + *c - '0';
usr.sbin/config/ukcutil.c
295
c++;
usr.sbin/config/ukcutil.c
298
while (*c == ' ' || *c == '\t' || *c == '\n')
usr.sbin/config/ukcutil.c
299
c++;
usr.sbin/config/ukcutil.c
301
if (*c == '\0') {
usr.sbin/config/ukcutil.c
315
char *c;
usr.sbin/config/ukcutil.c
317
c = cmd;
usr.sbin/config/ukcutil.c
318
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
usr.sbin/config/ukcutil.c
319
c++;
usr.sbin/config/ukcutil.c
388
struct cfdata *cd, *c;
usr.sbin/config/ukcutil.c
406
c = get_cfdata(0);
usr.sbin/config/ukcutil.c
407
for (i = 0; c->cf_driver; i++) {
usr.sbin/config/ukcutil.c
408
if (i != devno && c->cf_loc == cd->cf_loc)
usr.sbin/config/ukcutil.c
410
c++;
usr.sbin/config/ukcutil.c
489
struct cfdata *cd, *c;
usr.sbin/config/ukcutil.c
505
c = get_cfdata(0);
usr.sbin/config/ukcutil.c
506
for (i = 0; c->cf_driver; i++) {
usr.sbin/config/ukcutil.c
507
if (i != devno && c->cf_loc == cd->cf_loc)
usr.sbin/config/ukcutil.c
509
c++;
usr.sbin/config/ukcutil.c
810
char *c;
usr.sbin/config/ukcutil.c
815
c = cmd;
usr.sbin/config/ukcutil.c
816
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
usr.sbin/config/ukcutil.c
817
c++;
usr.sbin/config/ukcutil.c
820
while (*c == ' ' || *c == '\t' || *c == '\n') {
usr.sbin/config/ukcutil.c
821
c++;
usr.sbin/config/ukcutil.c
840
if (*c == '\0') {
usr.sbin/config/ukcutil.c
843
if (number(c, &a) == 0) {
usr.sbin/config/ukcutil.c
953
char *c;
usr.sbin/config/ukcutil.c
957
c = cmd;
usr.sbin/config/ukcutil.c
958
while (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\0') {
usr.sbin/config/ukcutil.c
959
c++;
usr.sbin/config/ukcutil.c
962
while (*c == ' ' || *c == '\t' || *c == '\n') {
usr.sbin/config/ukcutil.c
963
c++;
usr.sbin/config/ukcutil.c
965
if (*c == '\0') {
usr.sbin/config/ukcutil.c
970
if (number(c, &a) == 0) {
usr.sbin/cron/cron.c
56
parse_args(int c, char *v[]);
usr.sbin/cron/crontab.c
61
parse_args(int c, char *v[]),
usr.sbin/cron/env.c
163
char quotechar, *c, *str;
usr.sbin/cron/env.c
176
c = envstr;
usr.sbin/cron/env.c
177
while (state != ERROR && *c) {
usr.sbin/cron/env.c
181
if (*c == '\'' || *c == '"')
usr.sbin/cron/env.c
182
quotechar = *c++;
usr.sbin/cron/env.c
188
if (*c == quotechar) {
usr.sbin/cron/env.c
190
c++;
usr.sbin/cron/env.c
193
if (state == NAME && *c == '=') {
usr.sbin/cron/env.c
199
if (isspace((unsigned char)*c)) {
usr.sbin/cron/env.c
200
c++;
usr.sbin/cron/env.c
204
if (*c == '=') {
usr.sbin/cron/env.c
210
*str++ = *c++;
usr.sbin/cron/env.c
213
if (*c == '=') {
usr.sbin/cron/env.c
218
if (!isspace((unsigned char)*c))
usr.sbin/cron/env.c
221
c++;
usr.sbin/cron/env.c
225
if (isspace((unsigned char)*c))
usr.sbin/cron/env.c
226
c++;
usr.sbin/cron/env.c
239
c = val + strlen(val);
usr.sbin/cron/env.c
240
while (c > val && isspace((unsigned char)c[-1]))
usr.sbin/cron/env.c
241
*(--c) = '\0';
usr.sbin/cron/macros.h
34
#define Skip_Blanks(c, f) \
usr.sbin/cron/macros.h
35
while (c == '\t' || c == ' ') \
usr.sbin/cron/macros.h
36
c = get_char(f);
usr.sbin/cron/macros.h
38
#define Skip_Nonblanks(c, f) \
usr.sbin/cron/macros.h
39
while (c!='\t' && c!=' ' && c!='\n' && c != EOF) \
usr.sbin/cron/macros.h
40
c = get_char(f);
usr.sbin/cron/macros.h
48
#define get_gmtoff(c, t) ((t)->tm_gmtoff)
usr.sbin/crunchgen/crunchgen.c
262
void (*f) (int c, char **v);
usr.sbin/dhcpd/conflex.c
102
int c = getc(cfile);
usr.sbin/dhcpd/conflex.c
104
if (c == '\n') {
usr.sbin/dhcpd/conflex.c
115
} else if (c != EOF) {
usr.sbin/dhcpd/conflex.c
117
cur_line[lpos - 1] = c;
usr.sbin/dhcpd/conflex.c
124
return (c);
usr.sbin/dhcpd/conflex.c
130
int c, ttok;
usr.sbin/dhcpd/conflex.c
138
c = get_char(cfile);
usr.sbin/dhcpd/conflex.c
140
if (!(c == '\n' && eol_token) && isascii(c) && isspace(c))
usr.sbin/dhcpd/conflex.c
142
if (c == '#') {
usr.sbin/dhcpd/conflex.c
148
if (c == '"') {
usr.sbin/dhcpd/conflex.c
151
} else if (c == '-' || (isascii(c) && isalnum(c))) {
usr.sbin/dhcpd/conflex.c
152
ttok = read_num_or_name(c, cfile);
usr.sbin/dhcpd/conflex.c
155
tb[0] = c;
usr.sbin/dhcpd/conflex.c
158
ttok = c;
usr.sbin/dhcpd/conflex.c
214
int c;
usr.sbin/dhcpd/conflex.c
217
c = get_char(cfile);
usr.sbin/dhcpd/conflex.c
218
if (c == EOF)
usr.sbin/dhcpd/conflex.c
220
if (c == '\n')
usr.sbin/dhcpd/conflex.c
228
int i, c, bs;
usr.sbin/dhcpd/conflex.c
232
c = get_char(cfile);
usr.sbin/dhcpd/conflex.c
235
else if (c == '\\')
usr.sbin/dhcpd/conflex.c
238
if (c != '"' && c != EOF && bs == 0)
usr.sbin/dhcpd/conflex.c
239
tokbuf[i++] = c;
usr.sbin/dhcpd/conflex.c
241
} while (i < (sizeof(tokbuf) - 1) && c != EOF && c != '"');
usr.sbin/dhcpd/conflex.c
243
if (c == EOF)
usr.sbin/dhcpd/conflex.c
245
else if (c != '"')
usr.sbin/dhcpd/conflex.c
255
read_num_or_name(int c, FILE *cfile)
usr.sbin/dhcpd/conflex.c
259
xdigits = isxdigit(c) ? 1 : 0;
usr.sbin/dhcpd/conflex.c
261
tokbuf[0] = c;
usr.sbin/dhcpd/conflex.c
263
c = get_char(cfile);
usr.sbin/dhcpd/conflex.c
264
if (!isascii(c) || (c != '-' && c != '_' && !isalnum(c))) {
usr.sbin/dhcpd/conflex.c
265
ungetc(c, cfile);
usr.sbin/dhcpd/conflex.c
269
if (isxdigit(c))
usr.sbin/dhcpd/conflex.c
271
tokbuf[i] = c;
usr.sbin/dhcpd/conflex.c
276
c = tokbuf[i];
usr.sbin/dhcpd/conflex.c
277
if (isxdigit(c))
usr.sbin/dhcpd/conflex.c
283
c = (unsigned int)tokbuf[0];
usr.sbin/dhcpd/conflex.c
285
if (c == '-')
usr.sbin/dhcpd/parse.c
165
pair c = NULL;
usr.sbin/dhcpd/parse.c
180
c = cons((caddr_t) s, c);
usr.sbin/dhcpd/parse.c
196
while (c) {
usr.sbin/dhcpd/parse.c
197
pair cdr = c->cdr;
usr.sbin/dhcpd/parse.c
198
int l = strlen((char *)c->car);
usr.sbin/dhcpd/parse.c
201
memcpy(t, (char *)c->car, l);
usr.sbin/dhcpd/parse.c
203
free(c->car);
usr.sbin/dhcpd/parse.c
204
free(c);
usr.sbin/dhcpd/parse.c
205
c = cdr;
usr.sbin/dhcpd/parse.c
324
pair c = NULL;
usr.sbin/dhcpd/parse.c
370
c = cons(t, c);
usr.sbin/dhcpd/parse.c
375
if (c) {
usr.sbin/dhcpd/parse.c
382
while (c) {
usr.sbin/dhcpd/parse.c
383
pair cdr = c->cdr;
usr.sbin/dhcpd/parse.c
384
convert_num(s, (char *)c->car, base, size);
usr.sbin/dhcpd/parse.c
387
free(c->car);
usr.sbin/dhcpd/parse.c
388
free(c);
usr.sbin/dhcpd/parse.c
389
c = cdr;
usr.sbin/dhcpd/pfutils.c
231
pfmsg(char c, struct lease *lp)
usr.sbin/dhcpd/pfutils.c
238
cmd.type = c;
usr.sbin/dhcpd/pfutils.c
241
switch (c) {
usr.sbin/dvmrpd/control.c
125
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
149
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/dvmrpd/control.c
155
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/dvmrpd/control.c
158
free(c);
usr.sbin/dvmrpd/control.c
162
c->iev.handler = control_dispatch_imsg;
usr.sbin/dvmrpd/control.c
163
c->iev.events = EV_READ;
usr.sbin/dvmrpd/control.c
164
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/dvmrpd/control.c
165
c->iev.handler, &c->iev);
usr.sbin/dvmrpd/control.c
166
event_add(&c->iev.ev, NULL);
usr.sbin/dvmrpd/control.c
168
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/dvmrpd/control.c
174
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
176
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/dvmrpd/control.c
177
if (c->iev.ibuf.fd == fd)
usr.sbin/dvmrpd/control.c
181
return (c);
usr.sbin/dvmrpd/control.c
187
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
189
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/dvmrpd/control.c
190
if (c->iev.ibuf.pid == pid)
usr.sbin/dvmrpd/control.c
194
return (c);
usr.sbin/dvmrpd/control.c
200
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
202
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/dvmrpd/control.c
207
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/dvmrpd/control.c
208
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/dvmrpd/control.c
210
event_del(&c->iev.ev);
usr.sbin/dvmrpd/control.c
211
close(c->iev.ibuf.fd);
usr.sbin/dvmrpd/control.c
219
free(c);
usr.sbin/dvmrpd/control.c
225
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
231
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/dvmrpd/control.c
237
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/dvmrpd/control.c
243
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/dvmrpd/control.c
250
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/dvmrpd/control.c
268
dvmrpe_iface_ctl(c, ifidx);
usr.sbin/dvmrpd/control.c
269
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/dvmrpd/control.c
277
dvmrpe_iface_igmp_ctl(c, ifidx);
usr.sbin/dvmrpd/control.c
278
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/dvmrpd/control.c
283
dvmrpe_nbr_ctl(c);
usr.sbin/dvmrpd/control.c
288
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/dvmrpd/control.c
314
imsg_event_add(&c->iev);
usr.sbin/dvmrpd/control.c
320
struct ctl_conn *c;
usr.sbin/dvmrpd/control.c
322
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/dvmrpd/control.c
325
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/dvmrpd/dvmrpe.c
464
dvmrpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/dvmrpd/dvmrpe.c
472
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_IFACE,
usr.sbin/dvmrpd/dvmrpe.c
478
dvmrpe_iface_igmp_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/dvmrpd/dvmrpe.c
486
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_IFACE,
usr.sbin/dvmrpd/dvmrpe.c
488
group_list_dump(iface, c);
usr.sbin/dvmrpd/dvmrpe.c
494
dvmrpe_nbr_ctl(struct ctl_conn *c)
usr.sbin/dvmrpd/dvmrpe.c
503
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_NBR,
usr.sbin/dvmrpd/dvmrpe.c
507
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/dvmrpd/group.c
448
group_list_dump(struct iface *iface, struct ctl_conn *c)
usr.sbin/dvmrpd/group.c
455
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_IGMP, 0, 0,
usr.sbin/dvmrpd/parse.y
432
int c, next;
usr.sbin/dvmrpd/parse.y
437
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/dvmrpd/parse.y
438
if (c != '\0')
usr.sbin/dvmrpd/parse.y
439
return (c);
usr.sbin/dvmrpd/parse.y
449
if ((c = getc(file->stream)) == EOF) {
usr.sbin/dvmrpd/parse.y
456
return (c);
usr.sbin/dvmrpd/parse.y
459
while ((c = getc(file->stream)) == '\\') {
usr.sbin/dvmrpd/parse.y
462
c = next;
usr.sbin/dvmrpd/parse.y
469
while (c == EOF) {
usr.sbin/dvmrpd/parse.y
472
c = getc(file->stream);
usr.sbin/dvmrpd/parse.y
474
return (c);
usr.sbin/dvmrpd/parse.y
478
lungetc(int c)
usr.sbin/dvmrpd/parse.y
480
if (c == EOF)
usr.sbin/dvmrpd/parse.y
485
return (c);
usr.sbin/dvmrpd/parse.y
489
pushback_buffer[pushback_index++] = c;
usr.sbin/dvmrpd/parse.y
490
return (c);
usr.sbin/dvmrpd/parse.y
496
int c;
usr.sbin/dvmrpd/parse.y
503
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/dvmrpd/parse.y
505
c = lgetc(0);
usr.sbin/dvmrpd/parse.y
506
if (c == '\n') {
usr.sbin/dvmrpd/parse.y
510
if (c == EOF)
usr.sbin/dvmrpd/parse.y
521
int quotec, next, c;
usr.sbin/dvmrpd/parse.y
526
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/dvmrpd/parse.y
530
if (c == '#')
usr.sbin/dvmrpd/parse.y
531
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/dvmrpd/parse.y
533
if (c == '$' && parsebuf == NULL) {
usr.sbin/dvmrpd/parse.y
535
if ((c = lgetc(0)) == EOF)
usr.sbin/dvmrpd/parse.y
542
if (isalnum(c) || c == '_') {
usr.sbin/dvmrpd/parse.y
543
*p++ = c;
usr.sbin/dvmrpd/parse.y
547
lungetc(c);
usr.sbin/dvmrpd/parse.y
560
switch (c) {
usr.sbin/dvmrpd/parse.y
563
quotec = c;
usr.sbin/dvmrpd/parse.y
565
if ((c = lgetc(quotec)) == EOF)
usr.sbin/dvmrpd/parse.y
567
if (c == '\n') {
usr.sbin/dvmrpd/parse.y
570
} else if (c == '\\') {
usr.sbin/dvmrpd/parse.y
575
c = next;
usr.sbin/dvmrpd/parse.y
581
} else if (c == quotec) {
usr.sbin/dvmrpd/parse.y
584
} else if (c == '\0') {
usr.sbin/dvmrpd/parse.y
592
*p++ = c;
usr.sbin/dvmrpd/parse.y
603
if (c == '-' || isdigit(c)) {
usr.sbin/dvmrpd/parse.y
605
*p++ = c;
usr.sbin/dvmrpd/parse.y
610
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/dvmrpd/parse.y
611
lungetc(c);
usr.sbin/dvmrpd/parse.y
614
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/dvmrpd/parse.y
630
c = (unsigned char)*--p;
usr.sbin/dvmrpd/parse.y
631
if (c == '-')
usr.sbin/dvmrpd/parse.y
632
return (c);
usr.sbin/dvmrpd/parse.y
642
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/dvmrpd/parse.y
644
*p++ = c;
usr.sbin/dvmrpd/parse.y
649
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/dvmrpd/parse.y
650
lungetc(c);
usr.sbin/dvmrpd/parse.y
657
if (c == '\n') {
usr.sbin/dvmrpd/parse.y
661
if (c == EOF)
usr.sbin/dvmrpd/parse.y
663
return (c);
usr.sbin/edquota/edquota.c
699
int c;
usr.sbin/edquota/edquota.c
701
c = (unsigned char)*s++;
usr.sbin/edquota/edquota.c
703
if (!isdigit(c))
usr.sbin/edquota/edquota.c
705
} while ((c = (unsigned char)*s++));
usr.sbin/eigrpd/control.c
117
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
141
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/eigrpd/control.c
147
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/eigrpd/control.c
150
free(c);
usr.sbin/eigrpd/control.c
153
c->iev.handler = control_dispatch_imsg;
usr.sbin/eigrpd/control.c
154
c->iev.events = EV_READ;
usr.sbin/eigrpd/control.c
155
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/eigrpd/control.c
156
c->iev.handler, &c->iev);
usr.sbin/eigrpd/control.c
157
event_add(&c->iev.ev, NULL);
usr.sbin/eigrpd/control.c
159
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/eigrpd/control.c
165
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
167
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/eigrpd/control.c
168
if (c->iev.ibuf.fd == fd)
usr.sbin/eigrpd/control.c
172
return (c);
usr.sbin/eigrpd/control.c
178
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
180
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/eigrpd/control.c
181
if (c->iev.ibuf.pid == pid)
usr.sbin/eigrpd/control.c
185
return (c);
usr.sbin/eigrpd/control.c
191
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
193
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/eigrpd/control.c
198
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/eigrpd/control.c
199
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/eigrpd/control.c
201
event_del(&c->iev.ev);
usr.sbin/eigrpd/control.c
202
close(c->iev.ibuf.fd);
usr.sbin/eigrpd/control.c
210
free(c);
usr.sbin/eigrpd/control.c
216
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
221
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/eigrpd/control.c
227
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/eigrpd/control.c
233
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/eigrpd/control.c
240
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/eigrpd/control.c
252
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/eigrpd/control.c
257
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/eigrpd/control.c
267
eigrpe_iface_ctl(c, ifidx);
usr.sbin/eigrpd/control.c
268
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/eigrpd/control.c
276
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/eigrpd/control.c
281
eigrpe_nbr_ctl(c);
usr.sbin/eigrpd/control.c
284
eigrpe_stats_ctl(c);
usr.sbin/eigrpd/control.c
315
imsg_event_add(&c->iev);
usr.sbin/eigrpd/control.c
321
struct ctl_conn *c;
usr.sbin/eigrpd/control.c
323
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/eigrpd/control.c
326
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/eigrpd/eigrpe.c
637
eigrpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/eigrpd/eigrpe.c
647
imsg_compose_event(&c->iev,
usr.sbin/eigrpd/eigrpe.c
656
eigrpe_nbr_ctl(struct ctl_conn *c)
usr.sbin/eigrpd/eigrpe.c
668
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_NBR, 0,
usr.sbin/eigrpd/eigrpe.c
673
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/eigrpd/eigrpe.c
677
eigrpe_stats_ctl(struct ctl_conn *c)
usr.sbin/eigrpd/eigrpe.c
686
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_STATS, 0,
usr.sbin/eigrpd/eigrpe.c
690
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/eigrpd/parse.y
663
int c;
usr.sbin/eigrpd/parse.y
667
c = file->ungetbuf[--file->ungetpos];
usr.sbin/eigrpd/parse.y
669
c = getc(file->stream);
usr.sbin/eigrpd/parse.y
671
if (c == START_EXPAND)
usr.sbin/eigrpd/parse.y
673
else if (c == DONE_EXPAND)
usr.sbin/eigrpd/parse.y
678
return (c);
usr.sbin/eigrpd/parse.y
684
int c, next;
usr.sbin/eigrpd/parse.y
687
if ((c = igetc()) == EOF) {
usr.sbin/eigrpd/parse.y
694
return (c);
usr.sbin/eigrpd/parse.y
697
while ((c = igetc()) == '\\') {
usr.sbin/eigrpd/parse.y
700
c = next;
usr.sbin/eigrpd/parse.y
707
if (c == EOF) {
usr.sbin/eigrpd/parse.y
717
while (c == EOF) {
usr.sbin/eigrpd/parse.y
720
c = igetc();
usr.sbin/eigrpd/parse.y
723
return (c);
usr.sbin/eigrpd/parse.y
727
lungetc(int c)
usr.sbin/eigrpd/parse.y
729
if (c == EOF)
usr.sbin/eigrpd/parse.y
739
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/eigrpd/parse.y
745
int c;
usr.sbin/eigrpd/parse.y
749
c = lgetc(0);
usr.sbin/eigrpd/parse.y
750
if (c == '\n') {
usr.sbin/eigrpd/parse.y
754
if (c == EOF)
usr.sbin/eigrpd/parse.y
765
int quotec, next, c;
usr.sbin/eigrpd/parse.y
770
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/eigrpd/parse.y
774
if (c == '#')
usr.sbin/eigrpd/parse.y
775
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/eigrpd/parse.y
777
if (c == '$' && !expanding) {
usr.sbin/eigrpd/parse.y
779
if ((c = lgetc(0)) == EOF)
usr.sbin/eigrpd/parse.y
786
if (isalnum(c) || c == '_') {
usr.sbin/eigrpd/parse.y
787
*p++ = c;
usr.sbin/eigrpd/parse.y
791
lungetc(c);
usr.sbin/eigrpd/parse.y
809
switch (c) {
usr.sbin/eigrpd/parse.y
812
quotec = c;
usr.sbin/eigrpd/parse.y
814
if ((c = lgetc(quotec)) == EOF)
usr.sbin/eigrpd/parse.y
816
if (c == '\n') {
usr.sbin/eigrpd/parse.y
819
} else if (c == '\\') {
usr.sbin/eigrpd/parse.y
824
c = next;
usr.sbin/eigrpd/parse.y
830
} else if (c == quotec) {
usr.sbin/eigrpd/parse.y
833
} else if (c == '\0') {
usr.sbin/eigrpd/parse.y
841
*p++ = c;
usr.sbin/eigrpd/parse.y
852
if (c == '-' || isdigit(c)) {
usr.sbin/eigrpd/parse.y
854
*p++ = c;
usr.sbin/eigrpd/parse.y
859
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/eigrpd/parse.y
860
lungetc(c);
usr.sbin/eigrpd/parse.y
863
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/eigrpd/parse.y
879
c = (unsigned char)*--p;
usr.sbin/eigrpd/parse.y
880
if (c == '-')
usr.sbin/eigrpd/parse.y
881
return (c);
usr.sbin/eigrpd/parse.y
891
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/eigrpd/parse.y
893
*p++ = c;
usr.sbin/eigrpd/parse.y
898
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/eigrpd/parse.y
899
lungetc(c);
usr.sbin/eigrpd/parse.y
906
if (c == '\n') {
usr.sbin/eigrpd/parse.y
910
if (c == EOF)
usr.sbin/eigrpd/parse.y
912
return (c);
usr.sbin/fdformat/fdformat.c
167
int fd, c, track, error, tracks_per_dot, bytes_per_track, errs;
usr.sbin/fdformat/fdformat.c
172
while((c = getopt(argc, argv, "c:s:h:r:g:S:F:t:i:qvn")) != -1)
usr.sbin/fdformat/fdformat.c
173
switch (c) {
usr.sbin/hostapd/parse.y
1350
int c;
usr.sbin/hostapd/parse.y
1354
c = file->ungetbuf[--file->ungetpos];
usr.sbin/hostapd/parse.y
1356
c = getc(file->stream);
usr.sbin/hostapd/parse.y
1358
if (c == START_EXPAND)
usr.sbin/hostapd/parse.y
1360
else if (c == DONE_EXPAND)
usr.sbin/hostapd/parse.y
1365
return (c);
usr.sbin/hostapd/parse.y
1371
int c, next;
usr.sbin/hostapd/parse.y
1374
if ((c = igetc()) == EOF) {
usr.sbin/hostapd/parse.y
1381
return (c);
usr.sbin/hostapd/parse.y
1384
while ((c = igetc()) == '\\') {
usr.sbin/hostapd/parse.y
1387
c = next;
usr.sbin/hostapd/parse.y
1394
if (c == EOF) {
usr.sbin/hostapd/parse.y
1404
while (c == EOF) {
usr.sbin/hostapd/parse.y
1407
c = igetc();
usr.sbin/hostapd/parse.y
1410
return (c);
usr.sbin/hostapd/parse.y
1414
lungetc(int c)
usr.sbin/hostapd/parse.y
1416
if (c == EOF)
usr.sbin/hostapd/parse.y
1426
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/hostapd/parse.y
1432
int c;
usr.sbin/hostapd/parse.y
1436
c = lgetc(0);
usr.sbin/hostapd/parse.y
1437
if (c == '\n') {
usr.sbin/hostapd/parse.y
1441
if (c == EOF)
usr.sbin/hostapd/parse.y
1452
int quotec, next, c;
usr.sbin/hostapd/parse.y
1457
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/hostapd/parse.y
1461
if (c == '#')
usr.sbin/hostapd/parse.y
1462
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/hostapd/parse.y
1464
if (c == '$' && !expanding) {
usr.sbin/hostapd/parse.y
1466
if ((c = lgetc(0)) == EOF)
usr.sbin/hostapd/parse.y
1473
if (isalnum(c) || c == '_') {
usr.sbin/hostapd/parse.y
1474
*p++ = c;
usr.sbin/hostapd/parse.y
1478
lungetc(c);
usr.sbin/hostapd/parse.y
1496
switch (c) {
usr.sbin/hostapd/parse.y
1499
quotec = c;
usr.sbin/hostapd/parse.y
1501
if ((c = lgetc(quotec)) == EOF)
usr.sbin/hostapd/parse.y
1503
if (c == '\n') {
usr.sbin/hostapd/parse.y
1506
} else if (c == '\\') {
usr.sbin/hostapd/parse.y
1511
c = next;
usr.sbin/hostapd/parse.y
1517
} else if (c == quotec) {
usr.sbin/hostapd/parse.y
1520
} else if (c == '\0') {
usr.sbin/hostapd/parse.y
1528
*p++ = c;
usr.sbin/hostapd/parse.y
1563
if (c == '-' || isdigit(c)) {
usr.sbin/hostapd/parse.y
1565
*p++ = c;
usr.sbin/hostapd/parse.y
1570
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/hostapd/parse.y
1571
lungetc(c);
usr.sbin/hostapd/parse.y
1574
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/hostapd/parse.y
1590
c = (unsigned char)*--p;
usr.sbin/hostapd/parse.y
1591
if (c == '-')
usr.sbin/hostapd/parse.y
1592
return (c);
usr.sbin/hostapd/parse.y
1602
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/hostapd/parse.y
1604
*p++ = c;
usr.sbin/hostapd/parse.y
1609
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/hostapd/parse.y
1610
lungetc(c);
usr.sbin/hostapd/parse.y
1617
if (c == '\n') {
usr.sbin/hostapd/parse.y
1621
if (c == EOF)
usr.sbin/hostapd/parse.y
1623
return (c);
usr.sbin/httpd/config.c
214
size_t c;
usr.sbin/httpd/config.c
238
c = 0;
usr.sbin/httpd/config.c
239
iov[c].iov_base = &s;
usr.sbin/httpd/config.c
240
iov[c++].iov_len = sizeof(s);
usr.sbin/httpd/config.c
242
iov[c].iov_base = srv->srv_conf.return_uri;
usr.sbin/httpd/config.c
243
iov[c++].iov_len = srv->srv_conf.return_uri_len;
usr.sbin/httpd/config.c
257
IMSG_CFG_SERVER, -1, fd, iov, c) != 0) {
usr.sbin/httpd/config.c
274
iov, c) != 0) {
usr.sbin/httpd/config.c
318
size_t c;
usr.sbin/httpd/config.c
338
c = 0;
usr.sbin/httpd/config.c
339
iov[c].iov_base = &tls;
usr.sbin/httpd/config.c
340
iov[c++].iov_len = sizeof(tls);
usr.sbin/httpd/config.c
341
iov[c].iov_base = data;
usr.sbin/httpd/config.c
342
iov[c++].iov_len = tls.tls_chunk_len;
usr.sbin/httpd/config.c
344
if (proc_composev(ps, PROC_SERVER, IMSG_CFG_TLS, iov, c) != 0) {
usr.sbin/httpd/httpd.c
118
int c;
usr.sbin/httpd/httpd.c
1198
char c, *p, *r;
usr.sbin/httpd/httpd.c
1214
c = *bits;
usr.sbin/httpd/httpd.c
1215
if (c == '_')
usr.sbin/httpd/httpd.c
1219
tolower((unsigned char)c);
usr.sbin/httpd/httpd.c
130
while ((c = getopt(argc, argv, "dD:nf:I:P:v")) != -1) {
usr.sbin/httpd/httpd.c
131
switch (c) {
usr.sbin/httpd/httpd.c
679
unsigned char c;
usr.sbin/httpd/httpd.c
686
c = (unsigned char)*src;
usr.sbin/httpd/httpd.c
687
if (c == ' ' || c == '#' || c == '%' || c == '?' || c == '"' ||
usr.sbin/httpd/httpd.c
688
c == '&' || c == '<' || c <= 0x1f || c >= 0x7f) {
usr.sbin/httpd/httpd.c
690
*dp++ = hex[c >> 4];
usr.sbin/httpd/httpd.c
691
*dp++ = hex[c & 0x0f];
usr.sbin/httpd/parse.y
1699
int c;
usr.sbin/httpd/parse.y
1703
c = file->ungetbuf[--file->ungetpos];
usr.sbin/httpd/parse.y
1705
c = getc(file->stream);
usr.sbin/httpd/parse.y
1707
if (c == START_EXPAND)
usr.sbin/httpd/parse.y
1709
else if (c == DONE_EXPAND)
usr.sbin/httpd/parse.y
1714
return (c);
usr.sbin/httpd/parse.y
1720
int c, next;
usr.sbin/httpd/parse.y
1723
if ((c = igetc()) == EOF) {
usr.sbin/httpd/parse.y
1730
return (c);
usr.sbin/httpd/parse.y
1733
while ((c = igetc()) == '\\') {
usr.sbin/httpd/parse.y
1736
c = next;
usr.sbin/httpd/parse.y
1743
if (c == EOF) {
usr.sbin/httpd/parse.y
1753
while (c == EOF) {
usr.sbin/httpd/parse.y
1756
c = igetc();
usr.sbin/httpd/parse.y
1759
return (c);
usr.sbin/httpd/parse.y
1763
lungetc(int c)
usr.sbin/httpd/parse.y
1765
if (c == EOF)
usr.sbin/httpd/parse.y
1775
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/httpd/parse.y
1781
int c;
usr.sbin/httpd/parse.y
1785
c = lgetc(0);
usr.sbin/httpd/parse.y
1786
if (c == '\n') {
usr.sbin/httpd/parse.y
1790
if (c == EOF)
usr.sbin/httpd/parse.y
1801
int quotec, next, c;
usr.sbin/httpd/parse.y
1806
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/httpd/parse.y
1810
if (c == '#')
usr.sbin/httpd/parse.y
1811
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/httpd/parse.y
1813
if (c == '$' && !expanding) {
usr.sbin/httpd/parse.y
1815
if ((c = lgetc(0)) == EOF)
usr.sbin/httpd/parse.y
1822
if (isalnum(c) || c == '_') {
usr.sbin/httpd/parse.y
1823
*p++ = c;
usr.sbin/httpd/parse.y
1827
lungetc(c);
usr.sbin/httpd/parse.y
1845
switch (c) {
usr.sbin/httpd/parse.y
1848
quotec = c;
usr.sbin/httpd/parse.y
1850
if ((c = lgetc(quotec)) == EOF)
usr.sbin/httpd/parse.y
1852
if (c == '\n') {
usr.sbin/httpd/parse.y
1855
} else if (c == '\\') {
usr.sbin/httpd/parse.y
1860
c = next;
usr.sbin/httpd/parse.y
1866
} else if (c == quotec) {
usr.sbin/httpd/parse.y
1869
} else if (c == '\0') {
usr.sbin/httpd/parse.y
1877
*p++ = c;
usr.sbin/httpd/parse.y
1888
if (c == '-' || isdigit(c)) {
usr.sbin/httpd/parse.y
1890
*p++ = c;
usr.sbin/httpd/parse.y
1895
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/httpd/parse.y
1896
lungetc(c);
usr.sbin/httpd/parse.y
1899
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/httpd/parse.y
1915
c = (unsigned char)*--p;
usr.sbin/httpd/parse.y
1916
if (c == '-')
usr.sbin/httpd/parse.y
1917
return (c);
usr.sbin/httpd/parse.y
1927
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/httpd/parse.y
1929
*p++ = c;
usr.sbin/httpd/parse.y
1934
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/httpd/parse.y
1935
lungetc(c);
usr.sbin/httpd/parse.y
1942
if (c == '\n') {
usr.sbin/httpd/parse.y
1946
if (c == EOF)
usr.sbin/httpd/parse.y
1948
return (c);
usr.sbin/httpd/patterns.c
125
match_class(int c, int cl)
usr.sbin/httpd/patterns.c
130
res = isalpha(c);
usr.sbin/httpd/patterns.c
133
res = iscntrl(c);
usr.sbin/httpd/patterns.c
136
res = isdigit(c);
usr.sbin/httpd/patterns.c
139
res = isgraph(c);
usr.sbin/httpd/patterns.c
142
res = islower(c);
usr.sbin/httpd/patterns.c
145
res = ispunct(c);
usr.sbin/httpd/patterns.c
148
res = isspace(c);
usr.sbin/httpd/patterns.c
151
res = isupper(c);
usr.sbin/httpd/patterns.c
154
res = isalnum(c);
usr.sbin/httpd/patterns.c
157
res = isxdigit(c);
usr.sbin/httpd/patterns.c
160
return (cl == c);
usr.sbin/httpd/patterns.c
166
matchbracketclass(int c, const char *p, const char *ec)
usr.sbin/httpd/patterns.c
177
if (match_class(c, uchar(*p)))
usr.sbin/httpd/patterns.c
181
if (uchar(*(p - 2)) <= c && c <= uchar(*p))
usr.sbin/httpd/patterns.c
183
} else if (uchar(*p) == c)
usr.sbin/httpd/patterns.c
196
int c = uchar(*s);
usr.sbin/httpd/patterns.c
202
return match_class(c, uchar(*(p + 1)));
usr.sbin/httpd/patterns.c
204
return matchbracketclass(c, p, ep - 1);
usr.sbin/httpd/patterns.c
206
return (uchar(*p) == c);
usr.sbin/httpd/patterns.c
42
#define uchar(c) ((unsigned char)(c)) /* macro to 'unsign' a char */
usr.sbin/identd/identd.c
1006
struct ident_client *c = arg;
usr.sbin/identd/identd.c
1026
gethost(&c->client.ss));
usr.sbin/identd/identd.c
1029
c->rxbytes += n;
usr.sbin/identd/identd.c
1030
if (c->rxbytes >= INPUT_MAX)
usr.sbin/identd/identd.c
1041
n = write(fd, c->buf + c->bufoff, c->buflen - c->bufoff);
usr.sbin/identd/identd.c
1055
c->bufoff += n;
usr.sbin/identd/identd.c
1056
if (c->bufoff != c->buflen)
usr.sbin/identd/identd.c
1060
identd_close(c);
usr.sbin/identd/identd.c
1172
fetchuid(struct ident_client *c)
usr.sbin/identd/identd.c
1182
memcpy(&tir.faddr, &c->client.ss, sizeof(tir.faddr));
usr.sbin/identd/identd.c
1183
memcpy(&tir.laddr, &c->server.ss, sizeof(tir.laddr));
usr.sbin/identd/identd.c
1185
switch (c->server.ss.ss_family) {
usr.sbin/identd/identd.c
1188
s4->sin_port = htons(c->client.port);
usr.sbin/identd/identd.c
1191
s4->sin_port = htons(c->server.port);
usr.sbin/identd/identd.c
1195
s6->sin6_port = htons(c->client.port);
usr.sbin/identd/identd.c
1198
s6->sin6_port = htons(c->server.port);
usr.sbin/identd/identd.c
1201
lerrx(1, "unexpected family %d", c->server.ss.ss_family);
usr.sbin/identd/identd.c
1212
c->uid = tir.ruid;
usr.sbin/identd/identd.c
227
int c;
usr.sbin/identd/identd.c
237
while ((c = getopt(argc, argv, "46deHhl:Nnt:")) != -1) {
usr.sbin/identd/identd.c
238
switch (c) {
usr.sbin/identd/identd.c
530
struct ident_client *c;
usr.sbin/identd/identd.c
554
c = SIMPLEQ_FIRST(&sc.child.popping);
usr.sbin/identd/identd.c
555
if (c == NULL)
usr.sbin/identd/identd.c
564
if (c->state == S_DEAD) {
usr.sbin/identd/identd.c
565
free(c);
usr.sbin/identd/identd.c
568
c->state = S_DEAD;
usr.sbin/identd/identd.c
572
n = asprintf(&c->buf, "%u , %u : USERID : UNIX : %s\r\n",
usr.sbin/identd/identd.c
573
c->server.port, c->client.port, reply.buf);
usr.sbin/identd/identd.c
576
n = asprintf(&c->buf, "%u , %u : ERROR : %s\r\n",
usr.sbin/identd/identd.c
577
c->server.port, c->client.port,
usr.sbin/identd/identd.c
581
n = asprintf(&c->buf, "%u , %u : ERROR : UNKNOWN-ERROR\r\n",
usr.sbin/identd/identd.c
582
c->server.port, c->client.port);
usr.sbin/identd/identd.c
585
n = asprintf(&c->buf, "%u , %u : ERROR : HIDDEN-USER\r\n",
usr.sbin/identd/identd.c
586
c->server.port, c->client.port);
usr.sbin/identd/identd.c
594
c->buflen = n;
usr.sbin/identd/identd.c
596
fd = EVENT_FD(&c->ev);
usr.sbin/identd/identd.c
597
event_del(&c->ev);
usr.sbin/identd/identd.c
598
event_set(&c->ev, fd, EV_READ | EV_WRITE | EV_PERSIST,
usr.sbin/identd/identd.c
599
identd_response, c);
usr.sbin/identd/identd.c
600
event_add(&c->ev, NULL);
usr.sbin/identd/identd.c
604
identd_close(c);
usr.sbin/identd/identd.c
610
struct ident_client *c = SIMPLEQ_FIRST(&sc.child.pushing);
usr.sbin/identd/identd.c
614
n = write(fd, &c->uid, sizeof(c->uid));
usr.sbin/identd/identd.c
629
case sizeof(c->uid):
usr.sbin/identd/identd.c
637
SIMPLEQ_INSERT_TAIL(&sc.child.popping, c, entry);
usr.sbin/identd/identd.c
638
else if (identd_error(c, errstr) == -1)
usr.sbin/identd/identd.c
639
identd_close(c);
usr.sbin/identd/identd.c
715
struct ident_client *c = NULL;
usr.sbin/identd/identd.c
737
c = calloc(1, sizeof(*c));
usr.sbin/identd/identd.c
738
if (c == NULL) {
usr.sbin/identd/identd.c
744
memcpy(&c->client.ss, &ss, len);
usr.sbin/identd/identd.c
745
c->client.len = len;
usr.sbin/identd/identd.c
749
c->server.len = sizeof(c->server.ss);
usr.sbin/identd/identd.c
750
if (getsockname(s, sa(&c->server.ss), &c->server.len) == -1)
usr.sbin/identd/identd.c
753
event_set(&c->ev, s, EV_READ | EV_PERSIST, identd_request, c);
usr.sbin/identd/identd.c
754
event_add(&c->ev, NULL);
usr.sbin/identd/identd.c
756
evtimer_set(&c->tmo, identd_timeout, c);
usr.sbin/identd/identd.c
757
evtimer_add(&c->tmo, &timeout);
usr.sbin/identd/identd.c
763
struct ident_client *c = arg;
usr.sbin/identd/identd.c
765
event_del(&c->ev);
usr.sbin/identd/identd.c
767
free(c->buf);
usr.sbin/identd/identd.c
769
if (c->state == S_QUEUED) /* it is queued for resolving */
usr.sbin/identd/identd.c
770
c->state = S_DEAD;
usr.sbin/identd/identd.c
772
free(c);
usr.sbin/identd/identd.c
778
struct ident_client *c = arg;
usr.sbin/identd/identd.c
791
lwarn("%s read", gethost(&c->client.ss));
usr.sbin/identd/identd.c
797
ldebug("%s closed connection", gethost(&c->client.ss));
usr.sbin/identd/identd.c
803
c->rxbytes += n;
usr.sbin/identd/identd.c
804
if (c->rxbytes >= INPUT_MAX)
usr.sbin/identd/identd.c
807
for (i = 0; c->state < S_EOL && i < n; i++)
usr.sbin/identd/identd.c
808
c->state = identd_parse(c, buf[i]);
usr.sbin/identd/identd.c
810
if (c->state == S_DEAD)
usr.sbin/identd/identd.c
812
if (c->state != S_EOL)
usr.sbin/identd/identd.c
815
if (c->server.port < 1 || c->client.port < 1)
usr.sbin/identd/identd.c
818
if (fetchuid(c) == -1) {
usr.sbin/identd/identd.c
823
SIMPLEQ_INSERT_TAIL(&sc.child.pushing, c, entry);
usr.sbin/identd/identd.c
824
c->state = S_QUEUED;
usr.sbin/identd/identd.c
826
event_del(&c->ev);
usr.sbin/identd/identd.c
827
event_set(&c->ev, fd, EV_READ | EV_PERSIST, identd_resolving, c);
usr.sbin/identd/identd.c
828
event_add(&c->ev, NULL);
usr.sbin/identd/identd.c
834
if (identd_error(c, errstr) == -1)
usr.sbin/identd/identd.c
840
identd_close(c);
usr.sbin/identd/identd.c
844
identd_error(struct ident_client *c, const char *errstr)
usr.sbin/identd/identd.c
846
int fd = EVENT_FD(&c->ev);
usr.sbin/identd/identd.c
849
n = asprintf(&c->buf, "%u , %u : ERROR : %s\r\n",
usr.sbin/identd/identd.c
850
c->server.port, c->client.port, errstr);
usr.sbin/identd/identd.c
854
c->buflen = n;
usr.sbin/identd/identd.c
856
event_del(&c->ev);
usr.sbin/identd/identd.c
857
event_set(&c->ev, fd, EV_READ | EV_WRITE | EV_PERSIST,
usr.sbin/identd/identd.c
858
identd_response, c);
usr.sbin/identd/identd.c
859
event_add(&c->ev, NULL);
usr.sbin/identd/identd.c
865
identd_close(struct ident_client *c)
usr.sbin/identd/identd.c
867
int fd = EVENT_FD(&c->ev);
usr.sbin/identd/identd.c
869
evtimer_del(&c->tmo);
usr.sbin/identd/identd.c
870
event_del(&c->ev);
usr.sbin/identd/identd.c
872
free(c->buf);
usr.sbin/identd/identd.c
873
free(c);
usr.sbin/identd/identd.c
879
struct ident_client *c = arg;
usr.sbin/identd/identd.c
902
gethost(&c->client.ss));
usr.sbin/identd/identd.c
905
c->rxbytes += n;
usr.sbin/identd/identd.c
906
if (c->rxbytes >= INPUT_MAX)
usr.sbin/identd/identd.c
913
evtimer_del(&c->tmo);
usr.sbin/identd/identd.c
914
event_del(&c->ev);
usr.sbin/identd/identd.c
916
c->state = S_DEAD; /* on the resolving queue */
usr.sbin/identd/identd.c
920
identd_parse(struct ident_client *c, int ch)
usr.sbin/identd/identd.c
922
enum ident_client_state s = c->state;
usr.sbin/identd/identd.c
933
c->server.port = ch - '0';
usr.sbin/identd/identd.c
945
c->server.port *= 10;
usr.sbin/identd/identd.c
946
c->server.port += ch - '0';
usr.sbin/identd/identd.c
947
if (c->server.port > 65535)
usr.sbin/identd/identd.c
967
c->client.port = ch - '0';
usr.sbin/identd/identd.c
979
c->client.port *= 10;
usr.sbin/identd/identd.c
980
c->client.port += ch - '0';
usr.sbin/identd/identd.c
981
if (c->client.port > 65535)
usr.sbin/ifstated/ifstated.c
621
if ((action->act.c.expression != NULL &&
usr.sbin/ifstated/ifstated.c
622
action->act.c.expression->truth) ||
usr.sbin/ifstated/ifstated.c
623
action->act.c.expression == NULL) {
usr.sbin/ifstated/ifstated.c
624
TAILQ_FOREACH(subaction, &action->act.c.actions,
usr.sbin/ifstated/ifstated.c
708
if (action->act.c.expression != NULL)
usr.sbin/ifstated/ifstated.c
709
remove_expression(action->act.c.expression, state);
usr.sbin/ifstated/ifstated.c
711
TAILQ_FIRST(&action->act.c.actions)) != NULL) {
usr.sbin/ifstated/ifstated.c
712
TAILQ_REMOVE(&action->act.c.actions,
usr.sbin/ifstated/ifstated.h
72
} c;
usr.sbin/ifstated/parse.y
197
TAILQ_INSERT_TAIL(&curaction->act.c.actions,
usr.sbin/ifstated/parse.y
212
TAILQ_INSERT_TAIL(&curaction->act.c.actions,
usr.sbin/ifstated/parse.y
221
TAILQ_INIT(&action->act.c.actions);
usr.sbin/ifstated/parse.y
222
TAILQ_INSERT_TAIL(&curaction->act.c.actions,
usr.sbin/ifstated/parse.y
227
set_expression_depth(curaction->act.c.expression, 0);
usr.sbin/ifstated/parse.y
278
curaction->act.c.expression = $$;
usr.sbin/ifstated/parse.y
286
curaction->act.c.expression = $$;
usr.sbin/ifstated/parse.y
299
curaction->act.c.expression = $$;
usr.sbin/ifstated/parse.y
307
curaction->act.c.expression = $$;
usr.sbin/ifstated/parse.y
317
curaction->act.c.expression = $$;
usr.sbin/ifstated/parse.y
426
int c, next;
usr.sbin/ifstated/parse.y
431
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/ifstated/parse.y
432
if (c != '\0')
usr.sbin/ifstated/parse.y
433
return (c);
usr.sbin/ifstated/parse.y
443
if ((c = getc(file->stream)) == EOF) {
usr.sbin/ifstated/parse.y
450
return (c);
usr.sbin/ifstated/parse.y
453
while ((c = getc(file->stream)) == '\\') {
usr.sbin/ifstated/parse.y
456
c = next;
usr.sbin/ifstated/parse.y
463
while (c == EOF) {
usr.sbin/ifstated/parse.y
466
c = getc(file->stream);
usr.sbin/ifstated/parse.y
468
return (c);
usr.sbin/ifstated/parse.y
472
lungetc(int c)
usr.sbin/ifstated/parse.y
474
if (c == EOF)
usr.sbin/ifstated/parse.y
479
return (c);
usr.sbin/ifstated/parse.y
483
pushback_buffer[pushback_index++] = c;
usr.sbin/ifstated/parse.y
484
return (c);
usr.sbin/ifstated/parse.y
490
int c;
usr.sbin/ifstated/parse.y
497
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/ifstated/parse.y
499
c = lgetc(0);
usr.sbin/ifstated/parse.y
500
if (c == '\n') {
usr.sbin/ifstated/parse.y
504
if (c == EOF)
usr.sbin/ifstated/parse.y
515
int quotec, next, c;
usr.sbin/ifstated/parse.y
520
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ifstated/parse.y
524
if (c == '#')
usr.sbin/ifstated/parse.y
525
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ifstated/parse.y
527
if (c == '$' && parsebuf == NULL) {
usr.sbin/ifstated/parse.y
529
if ((c = lgetc(0)) == EOF)
usr.sbin/ifstated/parse.y
536
if (isalnum(c) || c == '_') {
usr.sbin/ifstated/parse.y
537
*p++ = c;
usr.sbin/ifstated/parse.y
541
lungetc(c);
usr.sbin/ifstated/parse.y
554
switch (c) {
usr.sbin/ifstated/parse.y
557
quotec = c;
usr.sbin/ifstated/parse.y
559
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ifstated/parse.y
561
if (c == '\n') {
usr.sbin/ifstated/parse.y
564
} else if (c == '\\') {
usr.sbin/ifstated/parse.y
569
c = next;
usr.sbin/ifstated/parse.y
575
} else if (c == quotec) {
usr.sbin/ifstated/parse.y
578
} else if (c == '\0') {
usr.sbin/ifstated/parse.y
586
*p++ = c;
usr.sbin/ifstated/parse.y
597
if (c == '-' || isdigit(c)) {
usr.sbin/ifstated/parse.y
599
*p++ = c;
usr.sbin/ifstated/parse.y
604
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ifstated/parse.y
605
lungetc(c);
usr.sbin/ifstated/parse.y
608
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ifstated/parse.y
624
c = (unsigned char)*--p;
usr.sbin/ifstated/parse.y
625
if (c == '-')
usr.sbin/ifstated/parse.y
626
return (c);
usr.sbin/ifstated/parse.y
636
if (isalnum(c) || c == ':' || c == '_' || c == '&' || c == '|') {
usr.sbin/ifstated/parse.y
638
*p++ = c;
usr.sbin/ifstated/parse.y
643
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ifstated/parse.y
644
lungetc(c);
usr.sbin/ifstated/parse.y
651
if (c == '\n') {
usr.sbin/ifstated/parse.y
655
if (c == EOF)
usr.sbin/ifstated/parse.y
657
return (c);
usr.sbin/ifstated/parse.y
824
TAILQ_FOREACH(subaction, &action->act.c.actions, entries)
usr.sbin/ifstated/parse.y
922
TAILQ_INIT(&state->init->act.c.actions);
usr.sbin/ifstated/parse.y
927
TAILQ_INIT(&state->body->act.c.actions);
usr.sbin/inetd/inetd.c
1317
int c;
usr.sbin/inetd/inetd.c
1319
c = getc(fconfig);
usr.sbin/inetd/inetd.c
1320
(void) ungetc(c, fconfig);
usr.sbin/inetd/inetd.c
1321
if (c == ' ' || c == '\t')
usr.sbin/inetd/inetd.c
563
#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}
usr.sbin/iscsictl/parse.y
409
int c;
usr.sbin/iscsictl/parse.y
413
c = file->ungetbuf[--file->ungetpos];
usr.sbin/iscsictl/parse.y
415
c = getc(file->stream);
usr.sbin/iscsictl/parse.y
417
if (c == START_EXPAND)
usr.sbin/iscsictl/parse.y
419
else if (c == DONE_EXPAND)
usr.sbin/iscsictl/parse.y
424
return (c);
usr.sbin/iscsictl/parse.y
430
int c, next;
usr.sbin/iscsictl/parse.y
433
if ((c = igetc()) == EOF) {
usr.sbin/iscsictl/parse.y
440
return (c);
usr.sbin/iscsictl/parse.y
443
while ((c = igetc()) == '\\') {
usr.sbin/iscsictl/parse.y
446
c = next;
usr.sbin/iscsictl/parse.y
453
while (c == EOF) {
usr.sbin/iscsictl/parse.y
456
c = getc(file->stream);
usr.sbin/iscsictl/parse.y
458
return (c);
usr.sbin/iscsictl/parse.y
462
lungetc(int c)
usr.sbin/iscsictl/parse.y
464
if (c == EOF)
usr.sbin/iscsictl/parse.y
474
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/iscsictl/parse.y
480
int c;
usr.sbin/iscsictl/parse.y
484
c = lgetc(0);
usr.sbin/iscsictl/parse.y
485
if (c == '\n') {
usr.sbin/iscsictl/parse.y
489
if (c == EOF)
usr.sbin/iscsictl/parse.y
500
int quotec, next, c;
usr.sbin/iscsictl/parse.y
505
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/iscsictl/parse.y
509
if (c == '#')
usr.sbin/iscsictl/parse.y
510
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/iscsictl/parse.y
512
if (c == '$' && !expanding) {
usr.sbin/iscsictl/parse.y
514
if ((c = lgetc(0)) == EOF)
usr.sbin/iscsictl/parse.y
521
if (isalnum(c) || c == '_') {
usr.sbin/iscsictl/parse.y
522
*p++ = c;
usr.sbin/iscsictl/parse.y
526
lungetc(c);
usr.sbin/iscsictl/parse.y
544
switch (c) {
usr.sbin/iscsictl/parse.y
547
quotec = c;
usr.sbin/iscsictl/parse.y
549
if ((c = lgetc(quotec)) == EOF)
usr.sbin/iscsictl/parse.y
551
if (c == '\n') {
usr.sbin/iscsictl/parse.y
554
} else if (c == '\\') {
usr.sbin/iscsictl/parse.y
559
c = next;
usr.sbin/iscsictl/parse.y
565
} else if (c == quotec) {
usr.sbin/iscsictl/parse.y
568
} else if (c == '\0') {
usr.sbin/iscsictl/parse.y
576
*p++ = c;
usr.sbin/iscsictl/parse.y
587
if (c == '-' || isdigit(c)) {
usr.sbin/iscsictl/parse.y
589
*p++ = c;
usr.sbin/iscsictl/parse.y
594
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/iscsictl/parse.y
595
lungetc(c);
usr.sbin/iscsictl/parse.y
598
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/iscsictl/parse.y
614
c = (unsigned char)*--p;
usr.sbin/iscsictl/parse.y
615
if (c == '-')
usr.sbin/iscsictl/parse.y
616
return (c);
usr.sbin/iscsictl/parse.y
626
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/iscsictl/parse.y
628
*p++ = c;
usr.sbin/iscsictl/parse.y
633
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/iscsictl/parse.y
634
lungetc(c);
usr.sbin/iscsictl/parse.y
641
if (c == '\n') {
usr.sbin/iscsictl/parse.y
645
if (c == EOF)
usr.sbin/iscsictl/parse.y
647
return (c);
usr.sbin/iscsictl/parse.y
810
clear_config(struct iscsi_config *c)
usr.sbin/iscsictl/parse.y
814
while ((s = SIMPLEQ_FIRST(&c->sessions))) {
usr.sbin/iscsictl/parse.y
815
SIMPLEQ_REMOVE_HEAD(&c->sessions, entry);
usr.sbin/iscsictl/parse.y
821
free(c);
usr.sbin/iscsid/connection.c
103
if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, &nodelay,
usr.sbin/iscsid/connection.c
107
event_set(&c->ev, c->fd, EV_READ|EV_PERSIST, conn_dispatch, c);
usr.sbin/iscsid/connection.c
108
event_set(&c->wev, c->fd, EV_WRITE, conn_write_dispatch, c);
usr.sbin/iscsid/connection.c
110
conn_fsm(c, CONN_EV_CONNECT);
usr.sbin/iscsid/connection.c
114
conn_free(struct connection *c)
usr.sbin/iscsid/connection.c
118
pdu_readbuf_free(&c->prbuf);
usr.sbin/iscsid/connection.c
119
pdu_free_queue(&c->pdu_w);
usr.sbin/iscsid/connection.c
121
event_del(&c->sev.ev);
usr.sbin/iscsid/connection.c
122
event_del(&c->ev);
usr.sbin/iscsid/connection.c
123
event_del(&c->wev);
usr.sbin/iscsid/connection.c
124
if (c->fd != -1)
usr.sbin/iscsid/connection.c
125
close(c->fd);
usr.sbin/iscsid/connection.c
127
taskq_cleanup(&c->tasks);
usr.sbin/iscsid/connection.c
129
TAILQ_REMOVE(&c->session->connections, c, entry);
usr.sbin/iscsid/connection.c
130
free(c);
usr.sbin/iscsid/connection.c
136
struct connection *c = arg;
usr.sbin/iscsid/connection.c
143
if ((n = pdu_read(c)) == -1) {
usr.sbin/iscsid/connection.c
148
conn_fsm(c, CONN_EV_FAIL);
usr.sbin/iscsid/connection.c
152
conn_fsm(c, CONN_EV_CLOSED);
usr.sbin/iscsid/connection.c
156
pdu_parse(c);
usr.sbin/iscsid/connection.c
162
struct connection *c = arg;
usr.sbin/iscsid/connection.c
172
switch (c->state) {
usr.sbin/iscsid/connection.c
175
if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR,
usr.sbin/iscsid/connection.c
178
log_sockaddr(&c->config.TargetAddr));
usr.sbin/iscsid/connection.c
179
conn_fsm(c, CONN_EV_FAIL);
usr.sbin/iscsid/connection.c
182
conn_fsm(c, CONN_EV_CONNECTED);
usr.sbin/iscsid/connection.c
185
if ((n = pdu_write(c)) == -1) {
usr.sbin/iscsid/connection.c
187
conn_fsm(c, CONN_EV_FAIL);
usr.sbin/iscsid/connection.c
191
conn_fsm(c, CONN_EV_CLOSED);
usr.sbin/iscsid/connection.c
196
if (pdu_pending(c))
usr.sbin/iscsid/connection.c
197
event_add(&c->wev, NULL);
usr.sbin/iscsid/connection.c
202
conn_fail(struct connection *c)
usr.sbin/iscsid/connection.c
205
conn_fsm(c, CONN_EV_FAIL);
usr.sbin/iscsid/connection.c
209
conn_task_ready(struct connection *c)
usr.sbin/iscsid/connection.c
211
if ((c->state & CONN_RUNNING) && TAILQ_EMPTY(&c->tasks))
usr.sbin/iscsid/connection.c
217
conn_task_issue(struct connection *c, struct task *t)
usr.sbin/iscsid/connection.c
219
TAILQ_INSERT_TAIL(&c->tasks, t, entry);
usr.sbin/iscsid/connection.c
220
conn_task_schedule(c);
usr.sbin/iscsid/connection.c
224
conn_task_schedule(struct connection *c)
usr.sbin/iscsid/connection.c
226
struct task *t = TAILQ_FIRST(&c->tasks);
usr.sbin/iscsid/connection.c
238
conn_pdu_write(c, p);
usr.sbin/iscsid/connection.c
242
conn_task_cleanup(c, t);
usr.sbin/iscsid/connection.c
248
conn_task_cleanup(struct connection *c, struct task *t)
usr.sbin/iscsid/connection.c
253
if (c) {
usr.sbin/iscsid/connection.c
254
TAILQ_REMOVE(&c->tasks, t, entry);
usr.sbin/iscsid/connection.c
255
if (!TAILQ_EMPTY(&c->tasks))
usr.sbin/iscsid/connection.c
256
conn_task_schedule(c);
usr.sbin/iscsid/connection.c
258
session_schedule(c->session);
usr.sbin/iscsid/connection.c
299
conn_parse_kvp(struct connection *c, struct kvp *kvp)
usr.sbin/iscsid/connection.c
302
struct session *s = c->session;
usr.sbin/iscsid/connection.c
322
SET_NUM(k, c, MaxRecvDataSegmentLength, 512, 16777215);
usr.sbin/iscsid/connection.c
323
SET_DIGEST(k, c, HeaderDigest);
usr.sbin/iscsid/connection.c
324
SET_DIGEST(k, c, DataDigest);
usr.sbin/iscsid/connection.c
389
kvp_set_from_mine(struct kvp *kvp, const char *key, struct connection *c)
usr.sbin/iscsid/connection.c
407
GET_DIGEST_P(kvp, key, HeaderDigest, c, f);
usr.sbin/iscsid/connection.c
408
GET_DIGEST_P(kvp, key, DataDigest, c, f);
usr.sbin/iscsid/connection.c
409
GET_NUM_P(kvp, key, MaxConnections, c->session, f, e);
usr.sbin/iscsid/connection.c
410
GET_STR_C(kvp, key, TargetName, c->session, f);
usr.sbin/iscsid/connection.c
411
GET_STR_C(kvp, key, InitiatorName, c->session, f);
usr.sbin/iscsid/connection.c
412
GET_BOOL_P(kvp, key, InitialR2T, c->session, f);
usr.sbin/iscsid/connection.c
413
GET_BOOL_P(kvp, key, ImmediateData, c->session, f);
usr.sbin/iscsid/connection.c
414
GET_NUM_P(kvp, key, MaxRecvDataSegmentLength, c, f, e);
usr.sbin/iscsid/connection.c
415
GET_NUM_P(kvp, key, MaxBurstLength, c->session, f, e);
usr.sbin/iscsid/connection.c
416
GET_NUM_P(kvp, key, FirstBurstLength, c->session, f, e);
usr.sbin/iscsid/connection.c
417
GET_NUM_P(kvp, key, DefaultTime2Wait, c->session, f, e);
usr.sbin/iscsid/connection.c
418
GET_NUM_P(kvp, key, DefaultTime2Retain, c->session, f, e);
usr.sbin/iscsid/connection.c
419
GET_NUM_P(kvp, key, MaxOutstandingR2T, c->session, f, e);
usr.sbin/iscsid/connection.c
420
GET_BOOL_P(kvp, key, DataPDUInOrder, c->session, f);
usr.sbin/iscsid/connection.c
421
GET_BOOL_P(kvp, key, DataSequenceInOrder, c->session, f);
usr.sbin/iscsid/connection.c
422
GET_NUM_P(kvp, key, ErrorRecoveryLevel, c->session, f, e);
usr.sbin/iscsid/connection.c
423
GET_STYPE_C(kvp, key, SessionType, c->session, f);
usr.sbin/iscsid/connection.c
441
conn_pdu_write(struct connection *c, struct pdu *p)
usr.sbin/iscsid/connection.c
456
ipdu->expstatsn = ntohl(c->expstatsn);
usr.sbin/iscsid/connection.c
460
TAILQ_INSERT_TAIL(&c->pdu_w, p, entry);
usr.sbin/iscsid/connection.c
461
event_add(&c->wev, NULL);
usr.sbin/iscsid/connection.c
492
conn_fsm(struct connection *c, enum c_event event)
usr.sbin/iscsid/connection.c
497
if (c->state & fsm[i].state && event == fsm[i].event) {
usr.sbin/iscsid/connection.c
499
c->session->config.SessionName,
usr.sbin/iscsid/connection.c
500
conn_state(c->state), conn_event(event));
usr.sbin/iscsid/connection.c
501
ns = fsm[i].action(c, event);
usr.sbin/iscsid/connection.c
506
c->session->config.SessionName, conn_state(ns));
usr.sbin/iscsid/connection.c
507
c->state = ns;
usr.sbin/iscsid/connection.c
512
c->session->config.SessionName, conn_state(c->state),
usr.sbin/iscsid/connection.c
518
c_do_connect(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
520
if (c->fd == -1) {
usr.sbin/iscsid/connection.c
522
log_sockaddr(&c->config.TargetAddr));
usr.sbin/iscsid/connection.c
523
session_fsm(&c->sev, SESS_EV_CONN_FAIL, 0);
usr.sbin/iscsid/connection.c
526
if (c->config.LocalAddr.ss_len != 0) {
usr.sbin/iscsid/connection.c
527
if (bind(c->fd, (struct sockaddr *)&c->config.LocalAddr,
usr.sbin/iscsid/connection.c
528
c->config.LocalAddr.ss_len) == -1) {
usr.sbin/iscsid/connection.c
530
log_sockaddr(&c->config.LocalAddr));
usr.sbin/iscsid/connection.c
531
session_fsm(&c->sev, SESS_EV_CONN_FAIL, 0);
usr.sbin/iscsid/connection.c
535
if (connect(c->fd, (struct sockaddr *)&c->config.TargetAddr,
usr.sbin/iscsid/connection.c
536
c->config.TargetAddr.ss_len) == -1) {
usr.sbin/iscsid/connection.c
538
event_add(&c->wev, NULL);
usr.sbin/iscsid/connection.c
539
event_add(&c->ev, NULL);
usr.sbin/iscsid/connection.c
543
log_sockaddr(&c->config.TargetAddr));
usr.sbin/iscsid/connection.c
544
session_fsm(&c->sev, SESS_EV_CONN_FAIL, 0);
usr.sbin/iscsid/connection.c
548
event_add(&c->ev, NULL);
usr.sbin/iscsid/connection.c
550
return c_do_login(c, CONN_EV_CONNECTED);
usr.sbin/iscsid/connection.c
554
c_do_login(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
557
initiator_login(c);
usr.sbin/iscsid/connection.c
562
c_do_loggedin(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
564
iscsi_merge_conn_params(&c->active, &c->mine, &c->his);
usr.sbin/iscsid/connection.c
565
session_fsm(&c->sev, SESS_EV_CONN_LOGGED_IN, 0);
usr.sbin/iscsid/connection.c
57
struct connection *c;
usr.sbin/iscsid/connection.c
571
c_do_req_logout(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
575
if (c->state & CONN_IN_LOGOUT)
usr.sbin/iscsid/connection.c
582
c_do_logout(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
589
c_do_loggedout(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
599
c_do_fail(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
60
if (!(c = calloc(1, sizeof(*c))))
usr.sbin/iscsid/connection.c
604
event_del(&c->ev);
usr.sbin/iscsid/connection.c
605
event_del(&c->wev);
usr.sbin/iscsid/connection.c
606
close(c->fd);
usr.sbin/iscsid/connection.c
607
c->fd = -1; /* make sure this fd is not closed again */
usr.sbin/iscsid/connection.c
610
taskq_cleanup(&c->tasks);
usr.sbin/iscsid/connection.c
613
session_fsm(&c->sev, SESS_EV_CONN_FAIL, 0);
usr.sbin/iscsid/connection.c
615
if (ev == CONN_EV_FREE || c->state & CONN_NEVER_LOGGED_IN)
usr.sbin/iscsid/connection.c
621
c_do_cleanup(struct connection *c, enum c_event ev)
usr.sbin/iscsid/connection.c
63
c->fd = -1;
usr.sbin/iscsid/connection.c
64
c->state = CONN_FREE;
usr.sbin/iscsid/connection.c
65
c->session = s;
usr.sbin/iscsid/connection.c
66
c->cid = arc4random();
usr.sbin/iscsid/connection.c
67
c->config = *cc;
usr.sbin/iscsid/connection.c
68
c->mine = initiator_conn_defaults;
usr.sbin/iscsid/connection.c
70
c->mine.HeaderDigest = s->config.HeaderDigest;
usr.sbin/iscsid/connection.c
72
c->mine.DataDigest = s->config.DataDigest;
usr.sbin/iscsid/connection.c
73
c->his = iscsi_conn_defaults;
usr.sbin/iscsid/connection.c
75
c->sev.sess = s;
usr.sbin/iscsid/connection.c
76
c->sev.conn = c;
usr.sbin/iscsid/connection.c
77
evtimer_set(&c->sev.ev, session_fsm_callback, &c->sev);
usr.sbin/iscsid/connection.c
79
TAILQ_INIT(&c->pdu_w);
usr.sbin/iscsid/connection.c
80
TAILQ_INIT(&c->tasks);
usr.sbin/iscsid/connection.c
81
TAILQ_INSERT_TAIL(&s->connections, c, entry);
usr.sbin/iscsid/connection.c
83
if (pdu_readbuf_set(&c->prbuf, PDU_READ_SIZE)) {
usr.sbin/iscsid/connection.c
85
conn_free(c);
usr.sbin/iscsid/connection.c
90
c->fd = socket(c->config.TargetAddr.ss_family, SOCK_STREAM, 0);
usr.sbin/iscsid/connection.c
91
if (c->fd == -1) {
usr.sbin/iscsid/connection.c
93
conn_free(c);
usr.sbin/iscsid/connection.c
96
if (socket_setblockmode(c->fd, 1)) {
usr.sbin/iscsid/connection.c
98
conn_free(c);
usr.sbin/iscsid/control.c
144
struct control *c;
usr.sbin/iscsid/control.c
168
if ((c = malloc(sizeof(struct control))) == NULL) {
usr.sbin/iscsid/control.c
174
TAILQ_INIT(&c->channel);
usr.sbin/iscsid/control.c
175
c->fd = connfd;
usr.sbin/iscsid/control.c
176
event_set(&c->ev, connfd, EV_READ, control_dispatch, c);
usr.sbin/iscsid/control.c
177
event_add(&c->ev, NULL);
usr.sbin/iscsid/control.c
181
control_close(struct control *c)
usr.sbin/iscsid/control.c
183
event_del(&c->ev);
usr.sbin/iscsid/control.c
184
close(c->fd);
usr.sbin/iscsid/control.c
192
pdu_free_queue(&c->channel);
usr.sbin/iscsid/control.c
193
free(c);
usr.sbin/iscsid/control.c
203
struct control *c = bula;
usr.sbin/iscsid/control.c
211
control_close(c);
usr.sbin/iscsid/control.c
217
control_close(c);
usr.sbin/iscsid/control.c
221
control_close(c);
usr.sbin/iscsid/control.c
227
control_close(c);
usr.sbin/iscsid/control.c
230
iscsid_ctrl_dispatch(c, pdu);
usr.sbin/iscsid/control.c
233
if ((pdu = TAILQ_FIRST(&c->channel)) != NULL) {
usr.sbin/iscsid/control.c
244
control_close(c);
usr.sbin/iscsid/control.c
247
TAILQ_REMOVE(&c->channel, pdu, entry);
usr.sbin/iscsid/control.c
251
if (!TAILQ_EMPTY(&c->channel))
usr.sbin/iscsid/control.c
254
event_del(&c->ev);
usr.sbin/iscsid/control.c
255
event_set(&c->ev, fd, flags, control_dispatch, c);
usr.sbin/iscsid/control.c
256
event_add(&c->ev, NULL);
usr.sbin/iscsid/control.c
310
struct control *c = ch;
usr.sbin/iscsid/control.c
312
TAILQ_INSERT_TAIL(&c->channel, pdu, entry);
usr.sbin/iscsid/control.c
314
event_del(&c->ev);
usr.sbin/iscsid/control.c
315
event_set(&c->ev, c->fd, EV_READ|EV_WRITE, control_dispatch, c);
usr.sbin/iscsid/control.c
316
event_add(&c->ev, NULL);
usr.sbin/iscsid/initiator.c
193
initiator_login(struct connection *c)
usr.sbin/iscsid/initiator.c
200
conn_fail(c);
usr.sbin/iscsid/initiator.c
203
tl->c = c;
usr.sbin/iscsid/initiator.c
206
if (!(p = initiator_login_build(c, tl))) {
usr.sbin/iscsid/initiator.c
209
conn_fail(c);
usr.sbin/iscsid/initiator.c
213
task_init(&tl->task, c->session, 1, tl, initiator_login_cb, NULL);
usr.sbin/iscsid/initiator.c
215
conn_task_issue(c, &tl->task);
usr.sbin/iscsid/initiator.c
247
initiator_logout(struct session *s, struct connection *c, u_int8_t reason)
usr.sbin/iscsid/initiator.c
258
tl->c = c;
usr.sbin/iscsid/initiator.c
278
loreq->cid = c->cid;
usr.sbin/iscsid/initiator.c
282
if (c && (c->state & CONN_RUNNING))
usr.sbin/iscsid/initiator.c
283
conn_task_issue(c, &tl->task);
usr.sbin/iscsid/initiator.c
289
initiator_nop_in_imm(struct connection *c, struct pdu *p)
usr.sbin/iscsid/initiator.c
306
task_init(t, c->session, 1, NULL, NULL, NULL);
usr.sbin/iscsid/initiator.c
309
conn_task_issue(c, t);
usr.sbin/iscsid/initiator.c
313
conn_is_leading(struct connection *c)
usr.sbin/iscsid/initiator.c
315
return c == TAILQ_FIRST(&c->session->connections);
usr.sbin/iscsid/initiator.c
318
#define MINE_NOT_DEFAULT(c, k) ((c)->mine.k != iscsi_conn_defaults.k)
usr.sbin/iscsid/initiator.c
321
initiator_login_kvp(struct connection *c, u_int8_t stage)
usr.sbin/iscsid/initiator.c
339
if (c->session->config.SessionType == SESSION_TYPE_DISCOVERY) {
usr.sbin/iscsid/initiator.c
349
if (kvp_set_from_mine(&kvp[i], *p, c))
usr.sbin/iscsid/initiator.c
354
if (conn_is_leading(c))
usr.sbin/iscsid/initiator.c
356
if (MINE_NOT_DEFAULT(c, MaxRecvDataSegmentLength))
usr.sbin/iscsid/initiator.c
361
if (kvp_set_from_mine(&kvp[i], *p, c))
usr.sbin/iscsid/initiator.c
363
if (conn_is_leading(c))
usr.sbin/iscsid/initiator.c
365
if (kvp_set_from_mine(&kvp[i], *p, c))
usr.sbin/iscsid/initiator.c
367
if (MINE_NOT_DEFAULT(c, MaxRecvDataSegmentLength) &&
usr.sbin/iscsid/initiator.c
368
kvp_set_from_mine(&kvp[i], "MaxRecvDataSegmentLength", c))
usr.sbin/iscsid/initiator.c
383
initiator_login_build(struct connection *c, struct task_login *tl)
usr.sbin/iscsid/initiator.c
40
struct connection *c;
usr.sbin/iscsid/initiator.c
407
lreq->isid_base = htonl(tl->c->session->isid_base);
usr.sbin/iscsid/initiator.c
408
lreq->isid_qual = htons(tl->c->session->isid_qual);
usr.sbin/iscsid/initiator.c
410
lreq->cid = htons(tl->c->cid);
usr.sbin/iscsid/initiator.c
411
lreq->expstatsn = htonl(tl->c->expstatsn);
usr.sbin/iscsid/initiator.c
413
if (!(kvp = initiator_login_kvp(c, tl->stage))) {
usr.sbin/iscsid/initiator.c
460
initiator_login_cb(struct connection *c, void *arg, struct pdu *p)
usr.sbin/iscsid/initiator.c
47
struct connection *c;
usr.sbin/iscsid/initiator.c
473
conn_fail(c);
usr.sbin/iscsid/initiator.c
479
conn_fail(c);
usr.sbin/iscsid/initiator.c
488
conn_fail(c);
usr.sbin/iscsid/initiator.c
495
conn_fail(c);
usr.sbin/iscsid/initiator.c
499
if (conn_parse_kvp(c, kvp) == -1) {
usr.sbin/iscsid/initiator.c
501
conn_fail(c);
usr.sbin/iscsid/initiator.c
516
p = initiator_login_build(c, tl);
usr.sbin/iscsid/initiator.c
518
conn_fail(c);
usr.sbin/iscsid/initiator.c
523
conn_fsm(c, CONN_EV_LOGGED_IN);
usr.sbin/iscsid/initiator.c
524
conn_task_cleanup(c, &tl->task);
usr.sbin/iscsid/initiator.c
529
conn_fail(c);
usr.sbin/iscsid/initiator.c
532
conn_task_cleanup(c, &tl->task);
usr.sbin/iscsid/initiator.c
535
conn_task_issue(c, &tl->task);
usr.sbin/iscsid/initiator.c
543
initiator_discovery_cb(struct connection *c, void *arg, struct pdu *p)
usr.sbin/iscsid/initiator.c
558
session_shutdown(c->session);
usr.sbin/iscsid/initiator.c
572
session_shutdown(c->session);
usr.sbin/iscsid/initiator.c
578
conn_fail(c);
usr.sbin/iscsid/initiator.c
582
conn_task_cleanup(c, t);
usr.sbin/iscsid/initiator.c
588
initiator_logout_cb(struct connection *c, void *arg, struct pdu *p)
usr.sbin/iscsid/initiator.c
602
conn_fsm(c, CONN_EV_LOGGED_OUT);
usr.sbin/iscsid/initiator.c
603
session_fsm(&c->session->sev, SESS_EV_CLOSED, 0);
usr.sbin/iscsid/initiator.c
605
conn_fsm(tl->c, CONN_EV_LOGGED_OUT);
usr.sbin/iscsid/initiator.c
606
session_fsm(&tl->c->sev, SESS_EV_CONN_CLOSED, 0);
usr.sbin/iscsid/initiator.c
612
tl->c->session->config.SessionName,
usr.sbin/iscsid/initiator.c
613
tl->c->cid);
usr.sbin/iscsid/initiator.c
614
conn_fsm(tl->c, CONN_EV_FREE);
usr.sbin/iscsid/initiator.c
620
conn_fail(tl->c);
usr.sbin/iscsid/initiator.c
625
conn_task_cleanup(c, &tl->task);
usr.sbin/iscsid/pdu.c
256
pdu_read(struct connection *c)
usr.sbin/iscsid/pdu.c
263
iov[0].iov_base = c->prbuf.buf + c->prbuf.wpos;
usr.sbin/iscsid/pdu.c
264
if (c->prbuf.wpos < c->prbuf.rpos)
usr.sbin/iscsid/pdu.c
265
iov[0].iov_len = c->prbuf.rpos - c->prbuf.wpos;
usr.sbin/iscsid/pdu.c
267
iov[0].iov_len = c->prbuf.size - c->prbuf.wpos;
usr.sbin/iscsid/pdu.c
268
if (c->prbuf.rpos > 0) {
usr.sbin/iscsid/pdu.c
270
iov[1].iov_base = c->prbuf.buf;
usr.sbin/iscsid/pdu.c
271
iov[1].iov_len = c->prbuf.rpos - 1;
usr.sbin/iscsid/pdu.c
275
if ((n = readv(c->fd, iov, niov)) == -1)
usr.sbin/iscsid/pdu.c
281
c->prbuf.wpos += n;
usr.sbin/iscsid/pdu.c
282
if (c->prbuf.wpos >= c->prbuf.size)
usr.sbin/iscsid/pdu.c
283
c->prbuf.wpos -= c->prbuf.size;
usr.sbin/iscsid/pdu.c
289
pdu_write(struct connection *c)
usr.sbin/iscsid/pdu.c
297
TAILQ_FOREACH(b, &c->pdu_w, entry) {
usr.sbin/iscsid/pdu.c
314
if ((n = writev(c->fd, iov, niov)) == -1) {
usr.sbin/iscsid/pdu.c
327
for (b = TAILQ_FIRST(&c->pdu_w); b != NULL && size > 0; b = nb) {
usr.sbin/iscsid/pdu.c
345
TAILQ_REMOVE(&c->pdu_w, b, entry);
usr.sbin/iscsid/pdu.c
353
pdu_pending(struct connection *c)
usr.sbin/iscsid/pdu.c
355
if (TAILQ_EMPTY(&c->pdu_w))
usr.sbin/iscsid/pdu.c
362
pdu_parse(struct connection *c)
usr.sbin/iscsid/pdu.c
374
if (!(p = c->prbuf.wip)) {
usr.sbin/iscsid/pdu.c
376
if (pdu_readbuf_len(&c->prbuf) < sizeof(*ipdu))
usr.sbin/iscsid/pdu.c
383
c->prbuf.wip = p;
usr.sbin/iscsid/pdu.c
388
pdu_readbuf_read(&c->prbuf, ipdu, sizeof(*ipdu));
usr.sbin/iscsid/pdu.c
412
n = pdu_readbuf_read(&c->prbuf,
usr.sbin/iscsid/pdu.c
422
c->prbuf.wip = NULL;
usr.sbin/iscsid/pdu.c
423
task_pdu_cb(c, p);
usr.sbin/iscsid/poll.c
44
struct connection *c;
usr.sbin/iscsid/poll.c
52
TAILQ_FOREACH(c, &s->connections, entry) {
usr.sbin/iscsid/poll.c
53
if (c->state & CONN_LOGGED_IN)
usr.sbin/iscsid/poll.c
55
else if (c->state & CONN_FAILED)
usr.sbin/iscsid/poll.c
57
else if (c->state & CONN_NEVER_LOGGED_IN)
usr.sbin/iscsid/session.c
118
struct connection *c, *rc = NULL;
usr.sbin/iscsid/session.c
121
TAILQ_FOREACH(c, &s->connections, entry) {
usr.sbin/iscsid/session.c
122
if (conn_task_ready(c)) {
usr.sbin/iscsid/session.c
123
conn_fsm(c, CONN_EV_LOGOUT);
usr.sbin/iscsid/session.c
124
conn_task_issue(c, t);
usr.sbin/iscsid/session.c
127
if (c->state & CONN_RUNNING)
usr.sbin/iscsid/session.c
128
rc = c;
usr.sbin/iscsid/session.c
145
struct connection *c;
usr.sbin/iscsid/session.c
154
TAILQ_FOREACH(c, &s->connections, entry)
usr.sbin/iscsid/session.c
155
if (conn_task_ready(c)) {
usr.sbin/iscsid/session.c
157
conn_task_issue(c, t);
usr.sbin/iscsid/session.c
280
struct connection *c = sev->conn;
usr.sbin/iscsid/session.c
296
switch (c->state) {
usr.sbin/iscsid/session.c
298
conn_free(c);
usr.sbin/iscsid/session.c
307
TAILQ_FOREACH(c, &s->connections, entry) {
usr.sbin/iscsid/session.c
308
if (c->state & CONN_FAILED) {
usr.sbin/iscsid/session.c
310
conn_fsm(c, CONN_EV_CLEANING_UP);
usr.sbin/iscsid/session.c
311
} else if (c->state & CONN_RUNNING && state != SESS_FAILED)
usr.sbin/iscsid/session.c
326
struct connection *c = sev->conn;
usr.sbin/iscsid/session.c
329
if (c == NULL || c->state != CONN_FREE) {
usr.sbin/iscsid/session.c
333
conn_free(c);
usr.sbin/iscsid/session.c
335
TAILQ_FOREACH(c, &s->connections, entry) {
usr.sbin/iscsid/session.c
336
if (c->state & CONN_FAILED) {
usr.sbin/iscsid/session.c
339
} else if (c->state & CONN_RUNNING)
usr.sbin/iscsid/session.c
349
struct connection *c;
usr.sbin/iscsid/session.c
353
while ((c = TAILQ_FIRST(&s->connections)) != NULL)
usr.sbin/iscsid/session.c
354
conn_free(c);
usr.sbin/iscsid/session.c
363
struct connection *c;
usr.sbin/iscsid/session.c
365
while ((c = TAILQ_FIRST(&s->connections)) != NULL)
usr.sbin/iscsid/session.c
366
conn_free(c);
usr.sbin/iscsid/session.c
377
struct connection *c, *nc;
usr.sbin/iscsid/session.c
379
TAILQ_FOREACH_SAFE(c, &s->connections, entry, nc) {
usr.sbin/iscsid/session.c
381
s->config.SessionName, conn_state(c->state));
usr.sbin/iscsid/session.c
383
if (c->state & CONN_FAILED) {
usr.sbin/iscsid/session.c
384
conn_fsm(c, CONN_EV_FREE);
usr.sbin/iscsid/session.c
385
conn_free(c);
usr.sbin/iscsid/session.c
52
struct connection *c;
usr.sbin/iscsid/session.c
56
while ((c = TAILQ_FIRST(&s->connections)) != NULL)
usr.sbin/iscsid/session.c
57
conn_free(c);
usr.sbin/iscsid/session.c
72
struct connection *c;
usr.sbin/iscsid/session.c
73
while ((c = TAILQ_FIRST(&s->connections)) != NULL)
usr.sbin/iscsid/session.c
74
conn_free(c);
usr.sbin/iscsid/task.c
108
c->expstatsn = ntohl(ipdu->cmdsn) + 1;
usr.sbin/iscsid/task.c
109
initiator_nop_in_imm(c, p);
usr.sbin/iscsid/task.c
120
c->expstatsn = ntohl(ipdu->cmdsn) + 1;
usr.sbin/iscsid/task.c
125
TAILQ_FOREACH(t, &c->tasks, entry) {
usr.sbin/iscsid/task.c
130
t->callback(c, t->callarg, p);
usr.sbin/iscsid/task.c
42
void (*c)(struct connection *, void *, struct pdu *),
usr.sbin/iscsid/task.c
47
t->callback = c;
usr.sbin/iscsid/task.c
96
task_pdu_cb(struct connection *c, struct pdu *p)
usr.sbin/iscsid/vscsi.c
121
struct connection *c;
usr.sbin/iscsid/vscsi.c
130
c = TAILQ_FIRST(&s->connections);
usr.sbin/iscsid/vscsi.c
131
if (c && size > c->active.MaxRecvDataSegmentLength)
usr.sbin/iscsid/vscsi.c
132
size = c->active.MaxRecvDataSegmentLength;
usr.sbin/iscsid/vscsi.c
208
vscsi_callback(struct connection *c, void *arg, struct pdu *p)
usr.sbin/iscsid/vscsi.c
221
conn_task_cleanup(c, &t->task);
usr.sbin/iscsid/vscsi.c
228
conn_fail(c);
usr.sbin/iscsid/vscsi.c
267
conn_task_cleanup(c, &t->task);
usr.sbin/iscsid/vscsi.c
273
conn_task_cleanup(c, &t->task);
usr.sbin/iscsid/vscsi.c
278
vscsi_dataout(c, t, r2t->ttt, size, off);
usr.sbin/iscsid/vscsi.c
298
vscsi_dataout(struct connection *c, struct scsi_task *t, u_int32_t ttt,
usr.sbin/iscsid/vscsi.c
308
size = len - off > c->active.MaxRecvDataSegmentLength ?
usr.sbin/iscsid/vscsi.c
309
c->active.MaxRecvDataSegmentLength : len - off;
usr.sbin/iscsid/vscsi.c
336
conn_task_issue(c, &t->task);
usr.sbin/ldapd/btest.c
32
int c, rc = BT_FAIL;
usr.sbin/ldapd/btest.c
39
while ((c = getopt(argc, argv, "rf:")) != -1) {
usr.sbin/ldapd/btest.c
40
switch (c) {
usr.sbin/ldapd/btree.c
162
#define CURSOR_EMPTY(c) SLIST_EMPTY(&(c)->stack)
usr.sbin/ldapd/btree.c
163
#define CURSOR_TOP(c) SLIST_FIRST(&(c)->stack)
usr.sbin/ldapd/btree.c
164
#define CURSOR_POP(c) SLIST_REMOVE_HEAD(&(c)->stack, entry)
usr.sbin/ldapd/btree.c
165
#define CURSOR_PUSH(c,p) SLIST_INSERT_HEAD(&(c)->stack, p, entry)
usr.sbin/ldapd/control.c
127
struct ctl_conn *c;
usr.sbin/ldapd/control.c
150
if ((c = calloc(1, sizeof(*c))) == NULL) {
usr.sbin/ldapd/control.c
157
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/ldapd/control.c
158
imsgev_init(&c->iev, connfd, cs, control_imsgev, control_needfd);
usr.sbin/ldapd/control.c
164
struct ctl_conn *c;
usr.sbin/ldapd/control.c
166
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ldapd/control.c
167
if (c->iev.ibuf.fd == fd)
usr.sbin/ldapd/control.c
171
return (c);
usr.sbin/ldapd/control.c
177
struct ctl_conn *c;
usr.sbin/ldapd/control.c
179
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ldapd/control.c
184
log_debug("close control fd %d", c->iev.ibuf.fd);
usr.sbin/ldapd/control.c
185
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ldapd/control.c
186
imsgev_clear(&c->iev);
usr.sbin/ldapd/control.c
194
free(c);
usr.sbin/ldapd/control.c
231
struct ctl_conn *c;
usr.sbin/ldapd/control.c
237
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ldapd/control.c
280
struct ctl_conn *c;
usr.sbin/ldapd/control.c
282
c = TAILQ_FIRST(&ctl_conns);
usr.sbin/ldapd/control.c
283
if (c != NULL) {
usr.sbin/ldapd/control.c
285
control_close(c->iev.ibuf.fd, cs);
usr.sbin/ldapd/ldapd.c
113
int c;
usr.sbin/ldapd/ldapd.c
133
while ((c = getopt(argc, argv, "dhvD:f:nr:s:E")) != -1) {
usr.sbin/ldapd/ldapd.c
135
switch (c) {
usr.sbin/ldapd/parse.y
501
int c;
usr.sbin/ldapd/parse.y
505
c = file->ungetbuf[--file->ungetpos];
usr.sbin/ldapd/parse.y
507
c = getc(file->stream);
usr.sbin/ldapd/parse.y
509
if (c == START_EXPAND)
usr.sbin/ldapd/parse.y
511
else if (c == DONE_EXPAND)
usr.sbin/ldapd/parse.y
516
return (c);
usr.sbin/ldapd/parse.y
522
int c, next;
usr.sbin/ldapd/parse.y
525
if ((c = igetc()) == EOF) {
usr.sbin/ldapd/parse.y
532
return (c);
usr.sbin/ldapd/parse.y
535
while ((c = igetc()) == '\\') {
usr.sbin/ldapd/parse.y
538
c = next;
usr.sbin/ldapd/parse.y
545
if (c == EOF) {
usr.sbin/ldapd/parse.y
555
while (c == EOF) {
usr.sbin/ldapd/parse.y
558
c = igetc();
usr.sbin/ldapd/parse.y
561
return (c);
usr.sbin/ldapd/parse.y
565
lungetc(int c)
usr.sbin/ldapd/parse.y
567
if (c == EOF)
usr.sbin/ldapd/parse.y
577
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/ldapd/parse.y
583
int c;
usr.sbin/ldapd/parse.y
587
c = lgetc(0);
usr.sbin/ldapd/parse.y
588
if (c == '\n') {
usr.sbin/ldapd/parse.y
592
if (c == EOF)
usr.sbin/ldapd/parse.y
603
int quotec, next, c;
usr.sbin/ldapd/parse.y
608
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ldapd/parse.y
612
if (c == '#')
usr.sbin/ldapd/parse.y
613
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ldapd/parse.y
615
if (c == '$' && !expanding) {
usr.sbin/ldapd/parse.y
617
if ((c = lgetc(0)) == EOF)
usr.sbin/ldapd/parse.y
624
if (isalnum(c) || c == '_') {
usr.sbin/ldapd/parse.y
625
*p++ = c;
usr.sbin/ldapd/parse.y
629
lungetc(c);
usr.sbin/ldapd/parse.y
647
switch (c) {
usr.sbin/ldapd/parse.y
650
quotec = c;
usr.sbin/ldapd/parse.y
652
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ldapd/parse.y
654
if (c == '\n') {
usr.sbin/ldapd/parse.y
657
} else if (c == '\\') {
usr.sbin/ldapd/parse.y
662
c = next;
usr.sbin/ldapd/parse.y
668
} else if (c == quotec) {
usr.sbin/ldapd/parse.y
671
} else if (c == '\0') {
usr.sbin/ldapd/parse.y
679
*p++ = c;
usr.sbin/ldapd/parse.y
690
if (c == '-' || isdigit(c)) {
usr.sbin/ldapd/parse.y
692
*p++ = c;
usr.sbin/ldapd/parse.y
697
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ldapd/parse.y
698
lungetc(c);
usr.sbin/ldapd/parse.y
701
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ldapd/parse.y
717
c = (unsigned char)*--p;
usr.sbin/ldapd/parse.y
718
if (c == '-')
usr.sbin/ldapd/parse.y
719
return (c);
usr.sbin/ldapd/parse.y
729
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/ldapd/parse.y
731
*p++ = c;
usr.sbin/ldapd/parse.y
736
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ldapd/parse.y
737
lungetc(c);
usr.sbin/ldapd/parse.y
744
if (c == '\n') {
usr.sbin/ldapd/parse.y
748
if (c == EOF)
usr.sbin/ldapd/parse.y
750
return (c);
usr.sbin/ldapd/schema.c
283
int c, next;
usr.sbin/ldapd/schema.c
289
if ((c = getc(schema->fp)) == EOF) {
usr.sbin/ldapd/schema.c
294
return (c);
usr.sbin/ldapd/schema.c
297
while ((c = getc(schema->fp)) == '\\') {
usr.sbin/ldapd/schema.c
300
c = next;
usr.sbin/ldapd/schema.c
306
return (c);
usr.sbin/ldapd/schema.c
310
schema_ungetc(struct schema *schema, int c)
usr.sbin/ldapd/schema.c
312
if (c == EOF)
usr.sbin/ldapd/schema.c
316
return (schema->pushback_buffer[schema->pushback_index++] = c);
usr.sbin/ldapd/schema.c
324
int c;
usr.sbin/ldapd/schema.c
329
c = schema->pushback_buffer[--schema->pushback_index];
usr.sbin/ldapd/schema.c
331
c = schema_getc(schema, 0);
usr.sbin/ldapd/schema.c
332
if (c == '\n') {
usr.sbin/ldapd/schema.c
336
if (c == EOF)
usr.sbin/ldapd/schema.c
347
int quotec, next, c;
usr.sbin/ldapd/schema.c
354
while ((c = schema_getc(schema, 0)) == ' ' || c == '\t')
usr.sbin/ldapd/schema.c
357
if (c == '#')
usr.sbin/ldapd/schema.c
358
while ((c = schema_getc(schema, 0)) != '\n' && c != EOF)
usr.sbin/ldapd/schema.c
361
switch (c) {
usr.sbin/ldapd/schema.c
364
quotec = c;
usr.sbin/ldapd/schema.c
366
if ((c = schema_getc(schema, quotec)) == EOF)
usr.sbin/ldapd/schema.c
368
if (c == '\n') {
usr.sbin/ldapd/schema.c
371
} else if (c == '\\') {
usr.sbin/ldapd/schema.c
374
if (next == quotec || c == ' ' || c == '\t')
usr.sbin/ldapd/schema.c
375
c = next;
usr.sbin/ldapd/schema.c
380
} else if (c == quotec) {
usr.sbin/ldapd/schema.c
388
*p++ = (char)c;
usr.sbin/ldapd/schema.c
401
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/ldapd/schema.c
403
*p++ = c;
usr.sbin/ldapd/schema.c
408
} while ((c = schema_getc(schema, 0)) != EOF && (allowed_in_string(c)));
usr.sbin/ldapd/schema.c
409
schema_ungetc(schema, c);
usr.sbin/ldapd/schema.c
415
if (c == '\n') {
usr.sbin/ldapd/schema.c
419
if (c == EOF)
usr.sbin/ldapd/schema.c
421
return (c);
usr.sbin/ldapd/schema.c
705
int token, ret = 0, c;
usr.sbin/ldapd/schema.c
797
if ((c = schema_getc(schema, 0)) == '{') {
usr.sbin/ldapd/schema.c
802
schema_ungetc(schema, c);
usr.sbin/ldapd/syntax.c
230
#define IS_XDIGITS(n, c) \
usr.sbin/ldapd/syntax.c
235
if (*value++ != (c)) \
usr.sbin/ldomctl/parse.y
424
int c, next;
usr.sbin/ldomctl/parse.y
429
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/ldomctl/parse.y
430
if (c != '\0')
usr.sbin/ldomctl/parse.y
431
return (c);
usr.sbin/ldomctl/parse.y
441
if ((c = getc(file->stream)) == EOF) {
usr.sbin/ldomctl/parse.y
448
return (c);
usr.sbin/ldomctl/parse.y
451
while ((c = getc(file->stream)) == '\\') {
usr.sbin/ldomctl/parse.y
454
c = next;
usr.sbin/ldomctl/parse.y
461
while (c == EOF) {
usr.sbin/ldomctl/parse.y
464
c = getc(file->stream);
usr.sbin/ldomctl/parse.y
466
return (c);
usr.sbin/ldomctl/parse.y
470
lungetc(int c)
usr.sbin/ldomctl/parse.y
472
if (c == EOF)
usr.sbin/ldomctl/parse.y
477
return (c);
usr.sbin/ldomctl/parse.y
481
pushback_buffer[pushback_index++] = c;
usr.sbin/ldomctl/parse.y
482
return (c);
usr.sbin/ldomctl/parse.y
488
int c;
usr.sbin/ldomctl/parse.y
495
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/ldomctl/parse.y
497
c = lgetc(0);
usr.sbin/ldomctl/parse.y
498
if (c == '\n') {
usr.sbin/ldomctl/parse.y
502
if (c == EOF)
usr.sbin/ldomctl/parse.y
513
int quotec, next, c;
usr.sbin/ldomctl/parse.y
517
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ldomctl/parse.y
521
if (c == '#')
usr.sbin/ldomctl/parse.y
522
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ldomctl/parse.y
525
switch (c) {
usr.sbin/ldomctl/parse.y
528
quotec = c;
usr.sbin/ldomctl/parse.y
530
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ldomctl/parse.y
532
if (c == '\n') {
usr.sbin/ldomctl/parse.y
535
} else if (c == '\\') {
usr.sbin/ldomctl/parse.y
540
c = next;
usr.sbin/ldomctl/parse.y
546
} else if (c == quotec) {
usr.sbin/ldomctl/parse.y
549
} else if (c == '\0') {
usr.sbin/ldomctl/parse.y
557
*p++ = c;
usr.sbin/ldomctl/parse.y
566
if (c == '-' || isdigit(c)) {
usr.sbin/ldomctl/parse.y
568
*p++ = c;
usr.sbin/ldomctl/parse.y
573
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ldomctl/parse.y
574
lungetc(c);
usr.sbin/ldomctl/parse.y
577
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ldomctl/parse.y
593
c = (unsigned char)*--p;
usr.sbin/ldomctl/parse.y
594
if (c == '-')
usr.sbin/ldomctl/parse.y
595
return (c);
usr.sbin/ldomctl/parse.y
605
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/ldomctl/parse.y
607
*p++ = c;
usr.sbin/ldomctl/parse.y
612
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ldomctl/parse.y
613
lungetc(c);
usr.sbin/ldomctl/parse.y
619
if (c == '\n') {
usr.sbin/ldomctl/parse.y
623
if (c == EOF)
usr.sbin/ldomctl/parse.y
625
return (c);
usr.sbin/ldpd/control.c
113
struct ctl_conn *c;
usr.sbin/ldpd/control.c
130
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/ldpd/control.c
136
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/ldpd/control.c
139
free(c);
usr.sbin/ldpd/control.c
143
c->iev.handler = control_dispatch_imsg;
usr.sbin/ldpd/control.c
144
c->iev.events = EV_READ;
usr.sbin/ldpd/control.c
145
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/ldpd/control.c
146
c->iev.handler, &c->iev);
usr.sbin/ldpd/control.c
147
event_add(&c->iev.ev, NULL);
usr.sbin/ldpd/control.c
149
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/ldpd/control.c
155
struct ctl_conn *c;
usr.sbin/ldpd/control.c
157
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ldpd/control.c
158
if (c->iev.ibuf.fd == fd)
usr.sbin/ldpd/control.c
162
return (c);
usr.sbin/ldpd/control.c
168
struct ctl_conn *c;
usr.sbin/ldpd/control.c
170
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ldpd/control.c
171
if (c->iev.ibuf.pid == pid)
usr.sbin/ldpd/control.c
175
return (c);
usr.sbin/ldpd/control.c
181
struct ctl_conn *c;
usr.sbin/ldpd/control.c
183
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ldpd/control.c
188
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/ldpd/control.c
189
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ldpd/control.c
191
event_del(&c->iev.ev);
usr.sbin/ldpd/control.c
192
close(c->iev.ibuf.fd);
usr.sbin/ldpd/control.c
194
free(c);
usr.sbin/ldpd/control.c
200
struct ctl_conn *c;
usr.sbin/ldpd/control.c
205
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ldpd/control.c
211
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/ldpd/control.c
217
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/ldpd/control.c
224
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/ldpd/control.c
236
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ldpd/control.c
242
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ldpd/control.c
251
ldpe_iface_ctl(c, ifidx);
usr.sbin/ldpd/control.c
252
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/ldpd/control.c
257
ldpe_adj_ctl(c);
usr.sbin/ldpd/control.c
262
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ldpd/control.c
267
ldpe_nbr_ctl(c);
usr.sbin/ldpd/control.c
298
imsg_event_add(&c->iev);
usr.sbin/ldpd/control.c
304
struct ctl_conn *c;
usr.sbin/ldpd/control.c
306
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/ldpd/control.c
309
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/ldpd/ldpe.c
742
ldpe_iface_af_ctl(struct ctl_conn *c, int af, unsigned int idx)
usr.sbin/ldpd/ldpe.c
755
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_INTERFACE,
usr.sbin/ldpd/ldpe.c
762
ldpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/ldpd/ldpe.c
764
ldpe_iface_af_ctl(c, AF_INET, idx);
usr.sbin/ldpd/ldpe.c
765
ldpe_iface_af_ctl(c, AF_INET6, idx);
usr.sbin/ldpd/ldpe.c
769
ldpe_adj_ctl(struct ctl_conn *c)
usr.sbin/ldpd/ldpe.c
778
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_DISCOVERY,
usr.sbin/ldpd/ldpe.c
788
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_DISCOVERY, 0, 0,
usr.sbin/ldpd/ldpe.c
792
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/ldpd/ldpe.c
796
ldpe_nbr_ctl(struct ctl_conn *c)
usr.sbin/ldpd/ldpe.c
803
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_NBR, 0, 0, -1, nctl,
usr.sbin/ldpd/ldpe.c
806
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/ldpd/parse.y
1001
if ((c = igetc()) == EOF) {
usr.sbin/ldpd/parse.y
1008
return (c);
usr.sbin/ldpd/parse.y
1011
while ((c = igetc()) == '\\') {
usr.sbin/ldpd/parse.y
1014
c = next;
usr.sbin/ldpd/parse.y
1021
if (c == EOF) {
usr.sbin/ldpd/parse.y
1031
while (c == EOF) {
usr.sbin/ldpd/parse.y
1034
c = igetc();
usr.sbin/ldpd/parse.y
1037
return (c);
usr.sbin/ldpd/parse.y
1041
lungetc(int c)
usr.sbin/ldpd/parse.y
1043
if (c == EOF)
usr.sbin/ldpd/parse.y
1053
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/ldpd/parse.y
1059
int c;
usr.sbin/ldpd/parse.y
1063
c = lgetc(0);
usr.sbin/ldpd/parse.y
1064
if (c == '\n') {
usr.sbin/ldpd/parse.y
1068
if (c == EOF)
usr.sbin/ldpd/parse.y
1079
int quotec, next, c;
usr.sbin/ldpd/parse.y
1084
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ldpd/parse.y
1088
if (c == '#')
usr.sbin/ldpd/parse.y
1089
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ldpd/parse.y
1091
if (c == '$' && !expanding) {
usr.sbin/ldpd/parse.y
1093
if ((c = lgetc(0)) == EOF)
usr.sbin/ldpd/parse.y
1100
if (isalnum(c) || c == '_') {
usr.sbin/ldpd/parse.y
1101
*p++ = c;
usr.sbin/ldpd/parse.y
1105
lungetc(c);
usr.sbin/ldpd/parse.y
1123
switch (c) {
usr.sbin/ldpd/parse.y
1126
quotec = c;
usr.sbin/ldpd/parse.y
1128
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ldpd/parse.y
1130
if (c == '\n') {
usr.sbin/ldpd/parse.y
1133
} else if (c == '\\') {
usr.sbin/ldpd/parse.y
1138
c = next;
usr.sbin/ldpd/parse.y
1144
} else if (c == quotec) {
usr.sbin/ldpd/parse.y
1147
} else if (c == '\0') {
usr.sbin/ldpd/parse.y
1155
*p++ = c;
usr.sbin/ldpd/parse.y
1166
if (c == '-' || isdigit(c)) {
usr.sbin/ldpd/parse.y
1168
*p++ = c;
usr.sbin/ldpd/parse.y
1173
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ldpd/parse.y
1174
lungetc(c);
usr.sbin/ldpd/parse.y
1177
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ldpd/parse.y
1193
c = (unsigned char)*--p;
usr.sbin/ldpd/parse.y
1194
if (c == '-')
usr.sbin/ldpd/parse.y
1195
return (c);
usr.sbin/ldpd/parse.y
1205
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/ldpd/parse.y
1207
*p++ = c;
usr.sbin/ldpd/parse.y
1212
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ldpd/parse.y
1213
lungetc(c);
usr.sbin/ldpd/parse.y
1220
if (c == '\n') {
usr.sbin/ldpd/parse.y
1224
if (c == EOF)
usr.sbin/ldpd/parse.y
1226
return (c);
usr.sbin/ldpd/parse.y
977
int c;
usr.sbin/ldpd/parse.y
981
c = file->ungetbuf[--file->ungetpos];
usr.sbin/ldpd/parse.y
983
c = getc(file->stream);
usr.sbin/ldpd/parse.y
985
if (c == START_EXPAND)
usr.sbin/ldpd/parse.y
987
else if (c == DONE_EXPAND)
usr.sbin/ldpd/parse.y
992
return (c);
usr.sbin/ldpd/parse.y
998
int c, next;
usr.sbin/lldpd/lldpd.c
294
enum agent_counter c)
usr.sbin/lldpd/lldpd.c
296
lldpd->agent_counters[c]++;
usr.sbin/lldpd/lldpd.c
297
ifp->if_agent_counters[c]++;
usr.sbin/lpd/frontend_lpr.c
410
#define CMD(c) ((int)(c))
usr.sbin/lpd/frontend_lpr.c
411
#define SUBCMD(c) (0x100 | (int)(c))
usr.sbin/lpd/frontend_lpr.c
643
lpr_ack(struct lpr_conn *conn, char c)
usr.sbin/lpd/frontend_lpr.c
645
if (c == 0)
usr.sbin/lpd/frontend_lpr.c
648
log_debug("%08x nack %d", conn->id, (int)c);
usr.sbin/lpd/frontend_lpr.c
650
io_write(conn->io, &c, 1);
usr.sbin/lpd/lp_banner.c
1087
scnline(int key, char *p, int c)
usr.sbin/lpd/lp_banner.c
1093
*p++ = key & 0200 ? c : BACKGND;
usr.sbin/lpd/lp_banner.c
1101
dropit(int c)
usr.sbin/lpd/lp_banner.c
1103
switch(c) {
usr.sbin/lpd/lp_banner.c
1125
char outbuf[LINELEN+1], *sp, c, cc;
usr.sbin/lpd/lp_banner.c
1132
d = dropit(c = TRC(cc = *sp++));
usr.sbin/lpd/lp_banner.c
1137
strp = scnline(scnkey[(int)c][scnhgt-1-d],
usr.sbin/lpd/parse.y
288
int c, next;
usr.sbin/lpd/parse.y
293
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/lpd/parse.y
294
if (c != '\0')
usr.sbin/lpd/parse.y
295
return (c);
usr.sbin/lpd/parse.y
305
if ((c = getc(file->stream)) == EOF) {
usr.sbin/lpd/parse.y
312
return (c);
usr.sbin/lpd/parse.y
315
while ((c = getc(file->stream)) == '\\') {
usr.sbin/lpd/parse.y
318
c = next;
usr.sbin/lpd/parse.y
325
while (c == EOF) {
usr.sbin/lpd/parse.y
328
c = getc(file->stream);
usr.sbin/lpd/parse.y
330
return (c);
usr.sbin/lpd/parse.y
334
lungetc(int c)
usr.sbin/lpd/parse.y
336
if (c == EOF)
usr.sbin/lpd/parse.y
341
return (c);
usr.sbin/lpd/parse.y
345
pushback_buffer[pushback_index++] = c;
usr.sbin/lpd/parse.y
346
return (c);
usr.sbin/lpd/parse.y
352
int c;
usr.sbin/lpd/parse.y
359
c = lgetc(0);
usr.sbin/lpd/parse.y
360
if (c == '\n') {
usr.sbin/lpd/parse.y
364
if (c == EOF)
usr.sbin/lpd/parse.y
375
int quotec, next, c;
usr.sbin/lpd/parse.y
380
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/lpd/parse.y
384
if (c == '#')
usr.sbin/lpd/parse.y
385
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/lpd/parse.y
387
if (c == '$' && parsebuf == NULL) {
usr.sbin/lpd/parse.y
389
if ((c = lgetc(0)) == EOF)
usr.sbin/lpd/parse.y
396
if (isalnum(c) || c == '_') {
usr.sbin/lpd/parse.y
397
*p++ = c;
usr.sbin/lpd/parse.y
401
lungetc(c);
usr.sbin/lpd/parse.y
414
switch (c) {
usr.sbin/lpd/parse.y
417
quotec = c;
usr.sbin/lpd/parse.y
419
if ((c = lgetc(quotec)) == EOF)
usr.sbin/lpd/parse.y
421
if (c == '\n') {
usr.sbin/lpd/parse.y
424
} else if (c == '\\') {
usr.sbin/lpd/parse.y
429
c = next;
usr.sbin/lpd/parse.y
435
} else if (c == quotec) {
usr.sbin/lpd/parse.y
438
} else if (c == '\0') {
usr.sbin/lpd/parse.y
446
*p++ = c;
usr.sbin/lpd/parse.y
457
if (c == '-' || isdigit(c)) {
usr.sbin/lpd/parse.y
459
*p++ = c;
usr.sbin/lpd/parse.y
464
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/lpd/parse.y
465
lungetc(c);
usr.sbin/lpd/parse.y
468
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/lpd/parse.y
484
c = (unsigned char)*--p;
usr.sbin/lpd/parse.y
485
if (c == '-')
usr.sbin/lpd/parse.y
486
return (c);
usr.sbin/lpd/parse.y
490
if (c == '=') {
usr.sbin/lpd/parse.y
491
if ((c = lgetc(0)) != EOF && c == '>')
usr.sbin/lpd/parse.y
493
lungetc(c);
usr.sbin/lpd/parse.y
494
c = '=';
usr.sbin/lpd/parse.y
503
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/lpd/parse.y
505
*p++ = c;
usr.sbin/lpd/parse.y
510
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/lpd/parse.y
511
lungetc(c);
usr.sbin/lpd/parse.y
518
if (c == '\n') {
usr.sbin/lpd/parse.y
522
if (c == EOF)
usr.sbin/lpd/parse.y
524
return (c);
usr.sbin/lpd/parse.y
713
config_free(struct lpd_conf *c)
usr.sbin/lpd/parse.y
717
while ((l = TAILQ_FIRST(&c->listeners))) {
usr.sbin/lpd/parse.y
718
TAILQ_REMOVE(&c->listeners, l, entry);
usr.sbin/lpd/parse.y
721
free(c);
usr.sbin/lpd/printer.c
1025
while ((c = getc(efp)) != EOF)
usr.sbin/lpd/printer.c
1026
putc(c, fp);
usr.sbin/lpd/printer.c
942
int p[2], c;
usr.sbin/lpd/proc.c
486
char *end, c;
usr.sbin/lpd/proc.c
491
c = *p->m_in.pos++;
usr.sbin/lpd/proc.c
492
if (c == '\0') {
usr.sbin/lpr/common_source/common.c
202
int c;
usr.sbin/lpr/common_source/common.c
204
while ((c = getc(cfp)) != '\n' && linel+1<sizeof(line)) {
usr.sbin/lpr/common_source/common.c
205
if (c == EOF)
usr.sbin/lpr/common_source/common.c
207
if (c == '\t') {
usr.sbin/lpr/common_source/common.c
214
*lp++ = c;
usr.sbin/lpr/lpc/cmds.c
1122
int c, status;
usr.sbin/lpr/lpc/cmds.c
1135
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
1137
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
218
int c, status;
usr.sbin/lpr/lpc/cmds.c
231
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
233
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
257
int c = d->d_name[0];
usr.sbin/lpr/lpc/cmds.c
259
if ((c == 't' || c == 'c' || c == 'd') && d->d_name[1] == 'f')
usr.sbin/lpr/lpc/cmds.c
371
int c, status;
usr.sbin/lpr/lpc/cmds.c
384
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
386
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
439
int c, status;
usr.sbin/lpr/lpc/cmds.c
452
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
454
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
517
int c, status;
usr.sbin/lpr/lpc/cmds.c
530
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
532
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
638
int c, status;
usr.sbin/lpr/lpc/cmds.c
651
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
653
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
682
int c, status;
usr.sbin/lpr/lpc/cmds.c
695
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
697
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
758
int c, status;
usr.sbin/lpr/lpc/cmds.c
767
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
769
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
78
int c, status;
usr.sbin/lpr/lpc/cmds.c
872
int c, status;
usr.sbin/lpr/lpc/cmds.c
885
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
887
*cp1++ = c;
usr.sbin/lpr/lpc/cmds.c
91
while ((c = *cp2++) && c != '|' && c != ':' &&
usr.sbin/lpr/lpc/cmds.c
93
*cp1++ = c;
usr.sbin/lpr/lpc/lpc.c
124
struct cmd *c;
usr.sbin/lpr/lpc/lpc.c
150
c = getcmd(margv[0]);
usr.sbin/lpr/lpc/lpc.c
151
if (c == (struct cmd *)-1) {
usr.sbin/lpr/lpc/lpc.c
155
if (c == 0) {
usr.sbin/lpr/lpc/lpc.c
159
if (c->c_priv && getuid() && ingroup(LPR_OPER) == 0) {
usr.sbin/lpr/lpc/lpc.c
163
(*c->c_handler)(margc, margv);
usr.sbin/lpr/lpc/lpc.c
171
struct cmd *c, *found;
usr.sbin/lpr/lpc/lpc.c
177
for (c = cmdtab; (p = c->c_name) != NULL; c++) {
usr.sbin/lpr/lpc/lpc.c
180
return(c);
usr.sbin/lpr/lpc/lpc.c
185
found = c;
usr.sbin/lpr/lpc/lpc.c
222
struct cmd *c;
usr.sbin/lpr/lpc/lpc.c
229
for (c = cmdtab; c->c_name; c++) {
usr.sbin/lpr/lpc/lpc.c
230
int len = strlen(c->c_name);
usr.sbin/lpr/lpc/lpc.c
242
c = cmdtab + j * lines + i;
usr.sbin/lpr/lpc/lpc.c
243
if (c->c_name)
usr.sbin/lpr/lpc/lpc.c
244
printf("%s", c->c_name);
usr.sbin/lpr/lpc/lpc.c
245
if (c + lines >= &cmdtab[NCMDS]) {
usr.sbin/lpr/lpc/lpc.c
249
w = strlen(c->c_name);
usr.sbin/lpr/lpc/lpc.c
262
c = getcmd(arg);
usr.sbin/lpr/lpc/lpc.c
263
if (c == (struct cmd *)-1)
usr.sbin/lpr/lpc/lpc.c
265
else if (c == NULL)
usr.sbin/lpr/lpc/lpc.c
269
c->c_name, c->c_help);
usr.sbin/lpr/lpc/lpc.c
76
struct cmd *c;
usr.sbin/lpr/lpc/lpc.c
86
c = getcmd(*++argv);
usr.sbin/lpr/lpc/lpc.c
87
if (c == (struct cmd *)-1) {
usr.sbin/lpr/lpc/lpc.c
91
if (c == 0) {
usr.sbin/lpr/lpc/lpc.c
95
if (c->c_priv && real_uid && ingroup(LPR_OPER) == 0) {
usr.sbin/lpr/lpc/lpc.c
99
(*c->c_handler)(argc, argv);
usr.sbin/lpr/lpd/printjob.c
1042
scnline(int key, char *p, int c)
usr.sbin/lpr/lpd/printjob.c
1048
*p++ = key & 0200 ? c : BACKGND;
usr.sbin/lpr/lpd/printjob.c
1060
char outbuf[LINELEN+1], *sp, c, cc;
usr.sbin/lpr/lpd/printjob.c
1068
d = dropit(c = TRC(cc = *sp++));
usr.sbin/lpr/lpd/printjob.c
1073
strp = scnline(scnkey[(int)c][scnhgt-1-d],
usr.sbin/lpr/lpd/printjob.c
1090
dropit(int c)
usr.sbin/lpr/lpd/printjob.c
1092
switch(c) {
usr.sbin/lpr/lpr/lpr.c
365
char c;
usr.sbin/lpr/lpr/lpr.c
367
if (read(tfd, &c, 1) == 1 &&
usr.sbin/lpr/lpr/lpr.c
369
write(tfd, &c, 1) != 1) {
usr.sbin/lpr/lpr/lpr.c
478
card(int c, const char *p2)
usr.sbin/lpr/lpr/lpr.c
488
*p1++ = c;
usr.sbin/lpr/lpr/lpr.c
489
while ((c = *p2++) != '\0' && len < sizeof(buf)) {
usr.sbin/lpr/lpr/lpr.c
490
*p1++ = (c == '\n') ? ' ' : c;
usr.sbin/makefs/cd9660/cd9660_strings.c
102
const char *c=str;
usr.sbin/makefs/cd9660/cd9660_strings.c
105
while ((*c) != '\0') {
usr.sbin/makefs/cd9660/cd9660_strings.c
106
if (!(cd9660_is_d_char(*c))) {
usr.sbin/makefs/cd9660/cd9660_strings.c
107
if (islower((unsigned char)*c) )
usr.sbin/makefs/cd9660/cd9660_strings.c
112
c++;
usr.sbin/makefs/cd9660/cd9660_strings.c
53
cd9660_is_d_char(char c)
usr.sbin/makefs/cd9660/cd9660_strings.c
55
return (isupper((unsigned char)c)
usr.sbin/makefs/cd9660/cd9660_strings.c
56
|| c == '_'
usr.sbin/makefs/cd9660/cd9660_strings.c
57
|| (c >= '0' && c <= '9'));
usr.sbin/makefs/cd9660/cd9660_strings.c
61
cd9660_is_a_char(char c)
usr.sbin/makefs/cd9660/cd9660_strings.c
63
return (isupper((unsigned char)c)
usr.sbin/makefs/cd9660/cd9660_strings.c
64
|| c == '_'
usr.sbin/makefs/cd9660/cd9660_strings.c
65
|| (c >= '%' && c <= '?')
usr.sbin/makefs/cd9660/cd9660_strings.c
66
|| (c >= ' ' && c <= '\"'));
usr.sbin/makefs/cd9660/cd9660_strings.c
78
const char *c = str;
usr.sbin/makefs/cd9660/cd9660_strings.c
81
while ((*c) != '\0') {
usr.sbin/makefs/cd9660/cd9660_strings.c
82
if (!(cd9660_is_a_char(*c))) {
usr.sbin/makefs/cd9660/cd9660_strings.c
83
if (islower((unsigned char)*c) )
usr.sbin/makefs/cd9660/cd9660_strings.c
88
c++;
usr.sbin/makefs/msdos/mkfs_msdos.c
163
#define INIT(a, b, c, d, e, f, g, h, i, j) \
usr.sbin/makefs/msdos/mkfs_msdos.c
164
{ .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \
usr.sbin/makefs/msdos/mkfs_msdos.c
862
int c, i;
usr.sbin/makefs/msdos/mkfs_msdos.c
865
c = (u_char)*src++;
usr.sbin/makefs/msdos/mkfs_msdos.c
866
if (c < ' ' + !i || strchr("\"*+,./:;<=>?[\\]|", c))
usr.sbin/makefs/msdos/mkfs_msdos.c
869
return i && !c;
usr.sbin/makefs/msdos/mkfs_msdos.c
878
int c, i;
usr.sbin/makefs/msdos/mkfs_msdos.c
881
c = *src ? toupper((unsigned char)*src++) : ' ';
usr.sbin/makefs/msdos/mkfs_msdos.c
882
*dest++ = !i && c == '\xe5' ? 5 : c;
usr.sbin/mkuboot/mkuboot.c
153
int c, ep, load;
usr.sbin/mkuboot/mkuboot.c
156
while ((c = getopt(argc, argv, "a:e:l:n:o:t:")) != -1) {
usr.sbin/mkuboot/mkuboot.c
157
switch (c) {
usr.sbin/mopd/common/dl.c
222
c = mopGetChar(pkt, &idx); /* Parameter Length */
usr.sbin/mopd/common/dl.c
225
fprintf(fd, "Target Name : %02x '", c);
usr.sbin/mopd/common/dl.c
226
for (i = 0; i < c; i++)
usr.sbin/mopd/common/dl.c
232
fprintf(fd, "Target Addr : %02x ", c);
usr.sbin/mopd/common/dl.c
233
for (i = 0; i < c; i++)
usr.sbin/mopd/common/dl.c
239
fprintf(fd, "Host Name : %02x '", c);
usr.sbin/mopd/common/dl.c
240
for (i = 0; i < c; i++)
usr.sbin/mopd/common/dl.c
246
fprintf(fd, "Host Addr : %02x ", c);
usr.sbin/mopd/common/dl.c
247
for (i = 0; i < c; i++)
usr.sbin/mopd/common/dl.c
37
u_char tmpc, c, program[17], code, *ucp;
usr.sbin/mopd/common/file.c
184
u_char c;
usr.sbin/mopd/common/file.c
187
c = buf[idx+i];
usr.sbin/mopd/common/file.c
189
buf[idx+cnt-1-i] = c;
usr.sbin/mopd/mopd/mopd.c
69
int c;
usr.sbin/mopd/mopd/mopd.c
75
while ((c = getopt(argc, argv, "34adfv")) != -1)
usr.sbin/mopd/mopd/mopd.c
76
switch (c) {
usr.sbin/mrouted/inet.c
157
char c;
usr.sbin/mrouted/inet.c
159
if (sscanf(s, "%u.%u.%u.%u%c", &a0, &a1, &a2, &a3, &c) != 4 ||
usr.sbin/mtrace/mtrace.c
1136
char c = *p++;
usr.sbin/mtrace/mtrace.c
1142
switch (c) {
usr.sbin/npppd/common/hash.c
106
int c;
usr.sbin/npppd/common/hash.c
111
c = (htbl->hash) (k, (int)htbl->size);
usr.sbin/npppd/common/hash.c
112
for (w = htbl->bucket[c]; w != NULL; w = w->next)
usr.sbin/npppd/common/hash.c
124
int c;
usr.sbin/npppd/common/hash.c
134
c = (htbl->hash) (k, (int)htbl->size);
usr.sbin/npppd/common/hash.c
138
n->next = htbl->bucket[c];
usr.sbin/npppd/common/hash.c
139
htbl->bucket[c] = n;
usr.sbin/npppd/npppd/control.c
134
struct ctl_conn *c, *nc;
usr.sbin/npppd/npppd/control.c
139
TAILQ_FOREACH_SAFE(c, &ctl_conns, entry, nc)
usr.sbin/npppd/npppd/control.c
140
control_close(c->iev.ibuf.fd, cs);
usr.sbin/npppd/npppd/control.c
155
struct ctl_conn *c;
usr.sbin/npppd/npppd/control.c
178
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/npppd/npppd/control.c
183
if ((c->ctx = npppd_ctl_create(cs->cs_ctx)) == NULL) {
usr.sbin/npppd/npppd/control.c
186
free(c);
usr.sbin/npppd/npppd/control.c
190
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/npppd/npppd/control.c
193
free(c->ctx);
usr.sbin/npppd/npppd/control.c
194
free(c);
usr.sbin/npppd/npppd/control.c
198
c->iev.handler = control_dispatch_imsg;
usr.sbin/npppd/npppd/control.c
199
c->iev.events = EV_READ;
usr.sbin/npppd/npppd/control.c
200
c->iev.data = cs;
usr.sbin/npppd/npppd/control.c
201
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/npppd/npppd/control.c
202
c->iev.handler, cs);
usr.sbin/npppd/npppd/control.c
203
event_add(&c->iev.ev, NULL);
usr.sbin/npppd/npppd/control.c
205
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/npppd/npppd/control.c
211
struct ctl_conn *c;
usr.sbin/npppd/npppd/control.c
213
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/npppd/npppd/control.c
214
if (c->iev.ibuf.fd == fd)
usr.sbin/npppd/npppd/control.c
218
return (c);
usr.sbin/npppd/npppd/control.c
224
struct ctl_conn *c;
usr.sbin/npppd/npppd/control.c
226
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/npppd/npppd/control.c
231
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/npppd/npppd/control.c
232
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/npppd/npppd/control.c
234
event_del(&c->iev.ev);
usr.sbin/npppd/npppd/control.c
235
close(c->iev.ibuf.fd);
usr.sbin/npppd/npppd/control.c
242
npppd_ctl_destroy(c->ctx);
usr.sbin/npppd/npppd/control.c
244
free(c);
usr.sbin/npppd/npppd/control.c
251
struct ctl_conn *c;
usr.sbin/npppd/npppd/control.c
255
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/npppd/npppd/control.c
262
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/npppd/npppd/control.c
266
if (imsgbuf_queuelen(&c->iev.ibuf) == 0)
usr.sbin/npppd/npppd/control.c
267
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/control.c
268
imsg_event_add(&c->iev);
usr.sbin/npppd/npppd/control.c
273
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/npppd/npppd/control.c
280
if ((n = imsg_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/npppd/npppd/control.c
288
if (cs->cs_restricted || (c->flags & CTL_CONN_LOCKED)) {
usr.sbin/npppd/npppd/control.c
301
imsg_compose(&c->iev.ibuf, IMSG_CTL_OK, 0, 0, -1,
usr.sbin/npppd/npppd/control.c
309
retval = npppd_ctl_who(c->ctx);
usr.sbin/npppd/npppd/control.c
311
retval = npppd_ctl_monitor(c->ctx);
usr.sbin/npppd/npppd/control.c
313
retval = npppd_ctl_who_and_monitor(c->ctx);
usr.sbin/npppd/npppd/control.c
314
imsg_compose(&c->iev.ibuf,
usr.sbin/npppd/npppd/control.c
325
retval = npppd_ctl_disconnect(c->ctx,
usr.sbin/npppd/npppd/control.c
328
imsg_compose(&c->iev.ibuf, IMSG_CTL_OK, 0, 0,
usr.sbin/npppd/npppd/control.c
333
imsg_compose(&c->iev.ibuf, IMSG_CTL_FAIL, 0, 0, -1,
usr.sbin/npppd/npppd/control.c
339
if (imsgbuf_queuelen(&c->iev.ibuf) == 0)
usr.sbin/npppd/npppd/control.c
340
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/control.c
341
imsg_event_add(&c->iev);
usr.sbin/npppd/npppd/control.c
347
struct ctl_conn *c;
usr.sbin/npppd/npppd/control.c
349
TAILQ_FOREACH(c, &ctl_conns, entry)
usr.sbin/npppd/npppd/control.c
350
if (c->flags & CTL_CONN_NOTIFY)
usr.sbin/npppd/npppd/control.c
351
imsg_compose(&c->iev.ibuf, imsg->hdr.type, 0,
usr.sbin/npppd/npppd/npppd.c
2387
struct ctl_conn *c;
usr.sbin/npppd/npppd/npppd.c
2389
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/npppd/npppd/npppd.c
2390
if (npppd_ctl_add_started_ppp_id(c->ctx, ppp->id) == 0) {
usr.sbin/npppd/npppd/npppd.c
2391
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/npppd.c
2392
imsg_event_add(&c->iev);
usr.sbin/npppd/npppd/npppd.c
2400
struct ctl_conn *c;
usr.sbin/npppd/npppd/npppd.c
2402
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/npppd/npppd/npppd.c
2403
if (npppd_ctl_add_stopped_ppp(c->ctx, ppp) == 0) {
usr.sbin/npppd/npppd/npppd.c
2404
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/npppd.c
2405
imsg_event_add(&c->iev);
usr.sbin/npppd/npppd/npppd_subr.c
412
#define GETCHAR(c, cp) { (c) = *(cp)++; }
usr.sbin/npppd/npppd/parse.y
1210
int c, next;
usr.sbin/npppd/npppd/parse.y
1215
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/npppd/npppd/parse.y
1216
if (c != '\0')
usr.sbin/npppd/npppd/parse.y
1217
return (c);
usr.sbin/npppd/npppd/parse.y
1227
if ((c = getc(file->stream)) == EOF) {
usr.sbin/npppd/npppd/parse.y
1234
return (c);
usr.sbin/npppd/npppd/parse.y
1237
while ((c = getc(file->stream)) == '\\') {
usr.sbin/npppd/npppd/parse.y
1240
c = next;
usr.sbin/npppd/npppd/parse.y
1247
while (c == EOF) {
usr.sbin/npppd/npppd/parse.y
1250
c = getc(file->stream);
usr.sbin/npppd/npppd/parse.y
1252
return (c);
usr.sbin/npppd/npppd/parse.y
1256
lungetc(int c)
usr.sbin/npppd/npppd/parse.y
1258
if (c == EOF)
usr.sbin/npppd/npppd/parse.y
1263
return (c);
usr.sbin/npppd/npppd/parse.y
1267
pushback_buffer[pushback_index++] = c;
usr.sbin/npppd/npppd/parse.y
1268
return (c);
usr.sbin/npppd/npppd/parse.y
1274
int c;
usr.sbin/npppd/npppd/parse.y
1281
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/npppd/npppd/parse.y
1283
c = lgetc(0);
usr.sbin/npppd/npppd/parse.y
1284
if (c == '\n') {
usr.sbin/npppd/npppd/parse.y
1288
if (c == EOF)
usr.sbin/npppd/npppd/parse.y
1299
int quotec, next, c;
usr.sbin/npppd/npppd/parse.y
1303
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/npppd/npppd/parse.y
1307
if (c == '#')
usr.sbin/npppd/npppd/parse.y
1308
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/npppd/npppd/parse.y
1311
switch (c) {
usr.sbin/npppd/npppd/parse.y
1314
quotec = c;
usr.sbin/npppd/npppd/parse.y
1316
if ((c = lgetc(quotec)) == EOF)
usr.sbin/npppd/npppd/parse.y
1318
if (c == '\n') {
usr.sbin/npppd/npppd/parse.y
1321
} else if (c == '\\') {
usr.sbin/npppd/npppd/parse.y
1326
c = next;
usr.sbin/npppd/npppd/parse.y
1332
} else if (c == quotec) {
usr.sbin/npppd/npppd/parse.y
1335
} else if (c == '\0') {
usr.sbin/npppd/npppd/parse.y
1343
*p++ = c;
usr.sbin/npppd/npppd/parse.y
1354
if (c == '-' || isdigit(c)) {
usr.sbin/npppd/npppd/parse.y
1356
*p++ = c;
usr.sbin/npppd/npppd/parse.y
1361
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/npppd/npppd/parse.y
1362
lungetc(c);
usr.sbin/npppd/npppd/parse.y
1365
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/npppd/npppd/parse.y
1381
c = (unsigned char)*--p;
usr.sbin/npppd/npppd/parse.y
1382
if (c == '-')
usr.sbin/npppd/npppd/parse.y
1383
return (c);
usr.sbin/npppd/npppd/parse.y
1393
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/npppd/npppd/parse.y
1395
*p++ = c;
usr.sbin/npppd/npppd/parse.y
1400
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/npppd/npppd/parse.y
1401
lungetc(c);
usr.sbin/npppd/npppd/parse.y
1408
if (c == '\n') {
usr.sbin/npppd/npppd/parse.y
1412
if (c == EOF)
usr.sbin/npppd/npppd/parse.y
1414
return (c);
usr.sbin/npppd/npppd/ppp.h
665
#define GETCHAR(c, cp) { \
usr.sbin/npppd/npppd/ppp.h
666
(c) = *(cp)++; \
usr.sbin/npppd/npppd/ppp.h
668
#define PUTCHAR(c, cp) { \
usr.sbin/npppd/npppd/ppp.h
669
*(cp)++ = (u_char) (c); \
usr.sbin/nsd/lookup3.c
155
#define mix(a,b,c) \
usr.sbin/nsd/lookup3.c
157
a -= c; a ^= rot(c, 4); c += b; \
usr.sbin/nsd/lookup3.c
158
b -= a; b ^= rot(a, 6); a += c; \
usr.sbin/nsd/lookup3.c
159
c -= b; c ^= rot(b, 8); b += a; \
usr.sbin/nsd/lookup3.c
160
a -= c; a ^= rot(c,16); c += b; \
usr.sbin/nsd/lookup3.c
161
b -= a; b ^= rot(a,19); a += c; \
usr.sbin/nsd/lookup3.c
162
c -= b; c ^= rot(b, 4); b += a; \
usr.sbin/nsd/lookup3.c
190
#define final(a,b,c) \
usr.sbin/nsd/lookup3.c
192
c ^= b; c -= rot(b,14); \
usr.sbin/nsd/lookup3.c
193
a ^= c; a -= rot(c,11); \
usr.sbin/nsd/lookup3.c
195
c ^= b; c -= rot(b,16); \
usr.sbin/nsd/lookup3.c
196
a ^= c; a -= rot(c,4); \
usr.sbin/nsd/lookup3.c
198
c ^= b; c -= rot(b,24); \
usr.sbin/nsd/lookup3.c
219
uint32_t a,b,c;
usr.sbin/nsd/lookup3.c
222
a = b = c = raninit + (((uint32_t)length)<<2) + initval;
usr.sbin/nsd/lookup3.c
229
c += k[2];
usr.sbin/nsd/lookup3.c
230
mix(a,b,c);
usr.sbin/nsd/lookup3.c
238
case 3 : c+=k[2];
usr.sbin/nsd/lookup3.c
243
final(a,b,c);
usr.sbin/nsd/lookup3.c
248
return c;
usr.sbin/nsd/lookup3.c
268
uint32_t a,b,c;
usr.sbin/nsd/lookup3.c
271
a = b = c = raninit + ((uint32_t)(length<<2)) + *pc;
usr.sbin/nsd/lookup3.c
272
c += *pb;
usr.sbin/nsd/lookup3.c
279
c += k[2];
usr.sbin/nsd/lookup3.c
280
mix(a,b,c);
usr.sbin/nsd/lookup3.c
288
case 3 : c+=k[2];
usr.sbin/nsd/lookup3.c
291
final(a,b,c);
usr.sbin/nsd/lookup3.c
296
*pc=c; *pb=b;
usr.sbin/nsd/lookup3.c
330
uint32_t a,b,c; /* internal state */
usr.sbin/nsd/lookup3.c
334
a = b = c = raninit + ((uint32_t)length) + initval;
usr.sbin/nsd/lookup3.c
348
c += k[2];
usr.sbin/nsd/lookup3.c
349
mix(a,b,c);
usr.sbin/nsd/lookup3.c
368
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
369
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
370
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
371
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
380
case 0 : return c; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
388
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
389
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
usr.sbin/nsd/lookup3.c
390
case 10: c+=((uint32_t)k8[9])<<8; /* fall through */
usr.sbin/nsd/lookup3.c
391
case 9 : c+=k8[8]; /* fall through */
usr.sbin/nsd/lookup3.c
400
case 0 : return c;
usr.sbin/nsd/lookup3.c
414
c += k[4] + (((uint32_t)k[5])<<16);
usr.sbin/nsd/lookup3.c
415
mix(a,b,c);
usr.sbin/nsd/lookup3.c
424
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
usr.sbin/nsd/lookup3.c
428
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
usr.sbin/nsd/lookup3.c
429
case 10: c+=k[4];
usr.sbin/nsd/lookup3.c
433
case 9 : c+=k8[8]; /* fall through */
usr.sbin/nsd/lookup3.c
449
case 0 : return c; /* zero length requires no mixing */
usr.sbin/nsd/lookup3.c
466
c += k[8];
usr.sbin/nsd/lookup3.c
467
c += ((uint32_t)k[9])<<8;
usr.sbin/nsd/lookup3.c
468
c += ((uint32_t)k[10])<<16;
usr.sbin/nsd/lookup3.c
469
c += ((uint32_t)k[11])<<24;
usr.sbin/nsd/lookup3.c
470
mix(a,b,c);
usr.sbin/nsd/lookup3.c
478
case 12: c+=((uint32_t)k[11])<<24;
usr.sbin/nsd/lookup3.c
480
case 11: c+=((uint32_t)k[10])<<16;
usr.sbin/nsd/lookup3.c
482
case 10: c+=((uint32_t)k[9])<<8;
usr.sbin/nsd/lookup3.c
484
case 9 : c+=k[8];
usr.sbin/nsd/lookup3.c
502
case 0 : return c;
usr.sbin/nsd/lookup3.c
506
final(a,b,c);
usr.sbin/nsd/lookup3.c
507
return c;
usr.sbin/nsd/lookup3.c
528
uint32_t a,b,c; /* internal state */
usr.sbin/nsd/lookup3.c
532
a = b = c = raninit + ((uint32_t)length) + *pc;
usr.sbin/nsd/lookup3.c
533
c += *pb;
usr.sbin/nsd/lookup3.c
547
c += k[2];
usr.sbin/nsd/lookup3.c
548
mix(a,b,c);
usr.sbin/nsd/lookup3.c
567
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
568
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
569
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
570
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
579
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
587
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
588
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
usr.sbin/nsd/lookup3.c
589
case 10: c+=((uint32_t)k8[9])<<8; /* fall through */
usr.sbin/nsd/lookup3.c
590
case 9 : c+=k8[8]; /* fall through */
usr.sbin/nsd/lookup3.c
599
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
613
c += k[4] + (((uint32_t)k[5])<<16);
usr.sbin/nsd/lookup3.c
614
mix(a,b,c);
usr.sbin/nsd/lookup3.c
623
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
usr.sbin/nsd/lookup3.c
627
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
usr.sbin/nsd/lookup3.c
628
case 10: c+=k[4];
usr.sbin/nsd/lookup3.c
632
case 9 : c+=k8[8]; /* fall through */
usr.sbin/nsd/lookup3.c
648
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
665
c += k[8];
usr.sbin/nsd/lookup3.c
666
c += ((uint32_t)k[9])<<8;
usr.sbin/nsd/lookup3.c
667
c += ((uint32_t)k[10])<<16;
usr.sbin/nsd/lookup3.c
668
c += ((uint32_t)k[11])<<24;
usr.sbin/nsd/lookup3.c
669
mix(a,b,c);
usr.sbin/nsd/lookup3.c
677
case 12: c+=((uint32_t)k[11])<<24;
usr.sbin/nsd/lookup3.c
678
case 11: c+=((uint32_t)k[10])<<16;
usr.sbin/nsd/lookup3.c
679
case 10: c+=((uint32_t)k[9])<<8;
usr.sbin/nsd/lookup3.c
680
case 9 : c+=k[8];
usr.sbin/nsd/lookup3.c
690
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
694
final(a,b,c);
usr.sbin/nsd/lookup3.c
695
*pc=c; *pb=b;
usr.sbin/nsd/lookup3.c
710
uint32_t a,b,c;
usr.sbin/nsd/lookup3.c
714
a = b = c = raninit + ((uint32_t)length) + initval;
usr.sbin/nsd/lookup3.c
728
c += k[2];
usr.sbin/nsd/lookup3.c
729
mix(a,b,c);
usr.sbin/nsd/lookup3.c
748
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
749
case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
750
case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
751
case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
760
case 0 : return c; /* zero length strings require no mixing */
usr.sbin/nsd/lookup3.c
768
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/nsd/lookup3.c
769
case 11: c+=((uint32_t)k8[10])<<8; /* fall through */
usr.sbin/nsd/lookup3.c
770
case 10: c+=((uint32_t)k8[9])<<16; /* fall through */
usr.sbin/nsd/lookup3.c
771
case 9 : c+=((uint32_t)k8[8])<<24; /* fall through */
usr.sbin/nsd/lookup3.c
780
case 0 : return c;
usr.sbin/nsd/lookup3.c
799
c += ((uint32_t)k[8])<<24;
usr.sbin/nsd/lookup3.c
800
c += ((uint32_t)k[9])<<16;
usr.sbin/nsd/lookup3.c
801
c += ((uint32_t)k[10])<<8;
usr.sbin/nsd/lookup3.c
802
c += ((uint32_t)k[11]);
usr.sbin/nsd/lookup3.c
803
mix(a,b,c);
usr.sbin/nsd/lookup3.c
811
case 12: c+=k[11];
usr.sbin/nsd/lookup3.c
812
case 11: c+=((uint32_t)k[10])<<8;
usr.sbin/nsd/lookup3.c
813
case 10: c+=((uint32_t)k[9])<<16;
usr.sbin/nsd/lookup3.c
814
case 9 : c+=((uint32_t)k[8])<<24;
usr.sbin/nsd/lookup3.c
824
case 0 : return c;
usr.sbin/nsd/lookup3.c
828
final(a,b,c);
usr.sbin/nsd/lookup3.c
829
return c;
usr.sbin/nsd/lookup3.c
862
uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
usr.sbin/nsd/lookup3.c
889
c[0] = hashlittle(a, hlen, m);
usr.sbin/nsd/lookup3.c
896
e[l] &= (c[l]^d[l]);
usr.sbin/nsd/lookup3.c
897
f[l] &= ~(c[l]^d[l]);
usr.sbin/nsd/lookup3.c
898
g[l] &= c[l];
usr.sbin/nsd/lookup3.c
899
h[l] &= ~c[l];
usr.sbin/nsd/nsd-checkconf.c
938
int c;
usr.sbin/nsd/nsd-checkconf.c
953
while ((c = getopt(argc, argv, "vfho:a:p:s:z:t:")) != -1) {
usr.sbin/nsd/nsd-checkconf.c
954
switch (c) {
usr.sbin/nsd/nsd-checkzone.c
137
int c;
usr.sbin/nsd/nsd-checkzone.c
148
while ((c = getopt(argc, argv, "hi:n:ps:")) != -1) {
usr.sbin/nsd/nsd-checkzone.c
149
switch (c) {
usr.sbin/nsd/nsd-control.c
574
int c;
usr.sbin/nsd/nsd-control.c
615
while( (c=getopt(argc, argv, "c:s:h")) != -1) {
usr.sbin/nsd/nsd-control.c
616
switch(c) {
usr.sbin/nsd/nsd-mem.c
281
int c;
usr.sbin/nsd/nsd-mem.c
289
while ((c = getopt(argc, argv, "c:h"
usr.sbin/nsd/nsd-mem.c
291
switch (c) {
usr.sbin/nsd/nsd.c
860
int c;
usr.sbin/nsd/nsd.c
921
while ((c = getopt(argc, argv, "46a:c:df:hi:I:l:N:n:P:p:s:u:t:X:V:v"
usr.sbin/nsd/nsd.c
926
switch (c) {
usr.sbin/nsd/nsec3.c
769
unsigned long n = 0, c = 0;
usr.sbin/nsd/nsec3.c
783
if(++c % ZONEC_PCT_COUNT == 0 && time(NULL) > s + ZONEC_PCT_TIME) {
usr.sbin/nsd/nsec3.c
787
(n==0)?0:(int)(c*((unsigned long)100)/n)));
usr.sbin/nsd/packet.h
121
#define QDCOUNT_SET(packet, c) (buffer_write_u16_at((packet), 4, (c)))
usr.sbin/nsd/packet.h
125
#define ANCOUNT_SET(packet, c) (buffer_write_u16_at((packet), 6, (c)))
usr.sbin/nsd/packet.h
129
#define NSCOUNT_SET(packet, c) (buffer_write_u16_at((packet), 8, (c)))
usr.sbin/nsd/packet.h
133
#define ARCOUNT_SET(packet, c) (buffer_write_u16_at((packet), 10, (c)))
usr.sbin/nsd/radtree.c
1015
static uint8_t char_d2r(uint8_t c)
usr.sbin/nsd/radtree.c
1017
if(c < 'A') return c+1; /* make space for 00 */
usr.sbin/nsd/radtree.c
1018
else if(c <= 'Z') return c-'A'+'a'; /* lowercase */
usr.sbin/nsd/radtree.c
1019
else return c;
usr.sbin/nsd/radtree.c
1023
static uint8_t char_r2d(uint8_t c)
usr.sbin/nsd/radtree.c
1025
assert(c != 0); /* end of label */
usr.sbin/nsd/radtree.c
1026
if(c <= 'A') return c-1;
usr.sbin/nsd/radtree.c
1027
else return c;
usr.sbin/nsd/remote.c
129
struct event c;
usr.sbin/nsd/remote.c
152
struct event c;
usr.sbin/nsd/remote.c
2820
if (fcntl(s->c.ev_fd, F_SETFL, 0) == -1) { /* set blocking */
usr.sbin/nsd/remote.c
2898
event_del(&s->c);
usr.sbin/nsd/remote.c
2899
memset(&s->c, 0, sizeof(s->c));
usr.sbin/nsd/remote.c
2900
event_set(&s->c, fd, EV_PERSIST|EV_TIMEOUT|EV_READ,
usr.sbin/nsd/remote.c
2902
if(event_base_set(xfrd->event_base, &s->c) != 0)
usr.sbin/nsd/remote.c
2904
if(event_add(&s->c, &s->tval) != 0)
usr.sbin/nsd/remote.c
2915
event_del(&s->c);
usr.sbin/nsd/remote.c
2916
memset(&s->c, 0, sizeof(s->c));
usr.sbin/nsd/remote.c
2917
event_set(&s->c, fd, EV_PERSIST|EV_TIMEOUT|EV_WRITE,
usr.sbin/nsd/remote.c
2919
if(event_base_set(xfrd->event_base, &s->c) != 0)
usr.sbin/nsd/remote.c
2921
if(event_add(&s->c, &s->tval) != 0)
usr.sbin/nsd/remote.c
336
event_del(&h->c);
usr.sbin/nsd/remote.c
337
close(h->c.ev_fd);
usr.sbin/nsd/remote.c
349
event_del(&p->c);
usr.sbin/nsd/remote.c
354
close(p->c.ev_fd);
usr.sbin/nsd/remote.c
523
hl->c.ev_fd = fd;
usr.sbin/nsd/remote.c
561
fd = p->c.ev_fd;
usr.sbin/nsd/remote.c
562
memset(&p->c, 0, sizeof(p->c));
usr.sbin/nsd/remote.c
563
event_set(&p->c, fd, EV_PERSIST|EV_READ, remote_accept_callback,
usr.sbin/nsd/remote.c
565
if(event_base_set(xfrd->event_base, &p->c) != 0)
usr.sbin/nsd/remote.c
567
if(event_add(&p->c, NULL) != 0)
usr.sbin/nsd/remote.c
640
memset(&n->c, 0, sizeof(n->c));
usr.sbin/nsd/remote.c
641
event_set(&n->c, newfd, EV_PERSIST|EV_TIMEOUT|EV_READ,
usr.sbin/nsd/remote.c
643
if(event_base_set(xfrd->event_base, &n->c) != 0) {
usr.sbin/nsd/remote.c
648
if(event_add(&n->c, &n->tval) != 0) {
usr.sbin/nsd/remote.c
672
event_del(&n->c);
usr.sbin/nsd/remote.c
681
event_del(&n->c);
usr.sbin/nsd/remote.c
720
event_del(&s->c);
usr.sbin/nsd/remote.c
727
close(s->c.ev_fd);
usr.sbin/nsd/rrl.c
223
const char* rrltype2str(enum rrl_type c)
usr.sbin/nsd/rrl.c
225
switch(c & 0x0fff) {
usr.sbin/nsd/rrl.c
310
uint16_t c, c2;
usr.sbin/nsd/rrl.c
312
uint8_t buf[MAXDOMAINLEN + sizeof(*source) + sizeof(c) + 16];
usr.sbin/nsd/rrl.c
317
c = rrl_classify(query, &dname, &dname_len);
usr.sbin/nsd/rrl.c
319
(query->zone->opts->pattern->rrl_whitelist & c))
usr.sbin/nsd/rrl.c
322
c |= c2;
usr.sbin/nsd/rrl.c
323
*flags = c;
usr.sbin/nsd/rrl.c
325
memmove(buf+sizeof(*source), &c, sizeof(c));
usr.sbin/nsd/rrl.c
327
DEBUG(DEBUG_QUERY, 1, (LOG_INFO, "rrl_examine type %s name %s", rrltype2str(c), dname?wiredname2str(dname):"NULL"));
usr.sbin/nsd/rrl.c
331
memmove(buf+sizeof(*source)+sizeof(c), dname, dname_len);
usr.sbin/nsd/rrl.c
332
*hash = hashlittle(buf, sizeof(*source)+sizeof(c)+dname_len, r);
usr.sbin/nsd/rrl.c
334
*hash = hashlittle(buf, sizeof(*source)+sizeof(c), r);
usr.sbin/nsd/rrl.c
356
uint16_t c, c2, wl = 0;
usr.sbin/nsd/rrl.c
364
c = rrl_classify(query, &d, &d_len) | c2;
usr.sbin/nsd/rrl.c
366
(query->zone->opts->pattern->rrl_whitelist & c))
usr.sbin/nsd/rrl.c
369
str, d?wiredname2str(d):"", rrltype2str(c),
usr.sbin/nsd/rrl.h
76
const char* rrltype2str(enum rrl_type c);
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
26
const uint8_t c = (uint8_t)*p;
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
27
if (c == ':') {
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
34
if (c >= '0' && c <= '9')
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
35
x = c - '0';
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
36
else if (c >= 'A' && c <= 'F')
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
37
x = c - ('A' - 10);
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
38
else if (c >= 'a' && c <= 'f')
usr.sbin/nsd/simdzone/src/generic/ilnp64.h
39
x = c - ('a' - 10);
usr.sbin/nsd/simdzone/src/generic/types.h
1088
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1093
if ((r = check(&c, check_name(parser, type, &f[0], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1143
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1148
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1149
(r = check(&c, check_int16(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1150
(r = check(&c, check_int16(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1151
(r = check(&c, check_name(parser, type, &f[3], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1154
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
1368
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1373
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1374
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1375
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1399
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
1458
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1463
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1464
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1469
if (c == n)
usr.sbin/nsd/simdzone/src/generic/types.h
1471
else if (o[1] == 1 && (n - c) != 20)
usr.sbin/nsd/simdzone/src/generic/types.h
1474
else if (o[1] == 2 && (n - c) != 32)
usr.sbin/nsd/simdzone/src/generic/types.h
1561
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1567
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1568
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1569
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1576
if ((r = check(&c, check_ip4(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
1582
if ((r = check(&c, check_ip6(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
1588
if ((r = check(&c, check_name(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
1597
if (c < n)
usr.sbin/nsd/simdzone/src/generic/types.h
1601
if (c >= n)
usr.sbin/nsd/simdzone/src/generic/types.h
1677
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1682
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1683
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1684
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1685
(r = check(&c, check_ttl(parser, type, &f[3], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1686
(r = check(&c, check_int32(parser, type, &f[4], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1687
(r = check(&c, check_int32(parser, type, &f[5], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1688
(r = check(&c, check_int16(parser, type, &f[6], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1689
(r = check(&c, check_name(parser, type, &f[7], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1692
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
1748
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1753
if ((r = check(&c, check_name(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1754
(r = check(&c, check_nsec(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1757
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
1785
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1790
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1791
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1792
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1795
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
1857
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1862
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1863
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1864
(r = check(&c, check_int16(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1865
(r = check(&c, check_string(parser, type, &f[3], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1866
(r = check(&c, check_string(parser, type, &f[4], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1867
(r = check(&c, check_nsec(parser, type, &f[5], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1870
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
1914
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1919
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1920
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1921
(r = check(&c, check_int16(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1922
(r = check(&c, check_string(parser, type, &f[3], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1925
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
1963
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
1968
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1969
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
1970
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
1973
if (c >= n)
usr.sbin/nsd/simdzone/src/generic/types.h
2093
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2098
if ((r = check(&c, check_int32(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2099
(r = check(&c, check_int16(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2100
(r = check(&c, check_nsec(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2103
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
2135
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2140
if ((r = check(&c, check_int32(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2141
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2142
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2283
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2288
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2289
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2290
(r = check(&c, check_int16(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2291
(r = check(&c, check_name(parser, type, &f[3], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2302
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
2347
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2352
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2353
(r = check(&c, check_ilnp64(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2355
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
2385
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2390
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2391
(r = check(&c, check_ip4(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2394
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
2424
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2429
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2430
(r = check(&c, check_ilnp64(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2432
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
2512
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2517
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2518
(r = check(&c, check_int16(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2520
if (c >= n)
usr.sbin/nsd/simdzone/src/generic/types.h
2554
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2559
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2560
(r = check(&c, check_int8(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2562
if (c >= n)
usr.sbin/nsd/simdzone/src/generic/types.h
2596
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2601
if ((r = check(&c, check_int32(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2602
(r = check(&c, check_int32(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2603
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2604
(r = check(&c, check_string(parser, type, &f[3], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2606
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
261
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
266
if ((r = check(&c, check_name(parser, type, &f[0], o, n))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
2684
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
269
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
2690
if ((r = check(&c, check_int8(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
2691
(r = check(&c, check_int8(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
2698
if ((r = check(&c, check_ip4(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
2704
if ((r = check(&c, check_ip6(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
2710
if ((r = check(&c, check_name(parser, t, &f[3], o+c, n-c))) < 0)
usr.sbin/nsd/simdzone/src/generic/types.h
2716
if (c < n)
usr.sbin/nsd/simdzone/src/generic/types.h
2794
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
2799
if ((r = check(&c, check_int64(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
2801
if (c > n)
usr.sbin/nsd/simdzone/src/generic/types.h
295
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
300
if ((r = check(&c, check_name(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
301
(r = check(&c, check_name(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
302
(r = check(&c, check_int32(parser, type, &f[2], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
303
(r = check(&c, check_ttl(parser, type, &f[3], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
304
(r = check(&c, check_ttl(parser, type, &f[4], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
305
(r = check(&c, check_ttl(parser, type, &f[5], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
306
(r = check(&c, check_ttl(parser, type, &f[6], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
309
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
359
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
364
if ((r = check(&c, check_ip4(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
365
(r = check(&c, check_int8(parser, type, &f[0], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
430
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
435
if ((r = check(&c, check_string(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
436
(r = check(&c, check_string(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
439
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
469
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
474
if ((r = check(&c, check_name(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
475
(r = check(&c, check_name(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
478
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
508
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
513
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
514
(r = check(&c, check_name(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
517
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
547
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
552
if ((r = check(&c, check_string(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
555
while (c < n)
usr.sbin/nsd/simdzone/src/generic/types.h
556
if ((r = check(&c, check_string(parser, type, &f[0], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
559
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
587
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
592
if ((r = check(&c, check_string(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
595
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
621
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
626
if ((r = check(&c, check_string(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
629
if (c < n && (r = check(&c, check_string(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
632
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
667
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
672
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
673
(r = check(&c, check_name(parser, type, &f[1], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
676
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
732
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
737
if ((r = check(&c, check_string(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
740
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
796
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
845
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
850
if ((r = check(&c, check_int16(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
851
(r = check(&c, check_name(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
852
(r = check(&c, check_name(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
855
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
889
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
894
if ((r = check(&c, check_string(parser, type, &f[0], o, n))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
895
(r = check(&c, check_string(parser, type, &f[1], o+c, n-c))) ||
usr.sbin/nsd/simdzone/src/generic/types.h
896
(r = check(&c, check_string(parser, type, &f[2], o+c, n-c))))
usr.sbin/nsd/simdzone/src/generic/types.h
899
if (c != n)
usr.sbin/nsd/simdzone/src/generic/types.h
932
size_t c = 0;
usr.sbin/nsd/simdzone/src/generic/types.h
937
if ((r = check(&c, check_ip6(parser, type, &f[0], o, n))))
usr.sbin/nsd/simdzone/src/generic/types.h
940
if (c != n)
usr.sbin/nsd/simdzone/src/isadetection.h
150
uint32_t a = *eax, b, c = *ecx, d;
usr.sbin/nsd/simdzone/src/isadetection.h
151
asm volatile("cpuid\n\t" : "+a"(a), "=b"(b), "+c"(c), "=d"(d));
usr.sbin/nsd/simdzone/src/isadetection.h
154
*ecx = c;
usr.sbin/nsd/simdzone/src/isadetection.h
164
uint32_t a, c = ecx, d;
usr.sbin/nsd/simdzone/src/isadetection.h
165
asm volatile("xgetbv\n\t" : "=d"(d), "=a"(a) : "c"(c));
usr.sbin/nsd/tsig-openssl.c
182
struct tsig_openssl_context* c = (struct tsig_openssl_context*)data;
usr.sbin/nsd/tsig-openssl.c
183
EVP_MAC_CTX_free(c->hmac_ctx);
usr.sbin/nsd/tsig-openssl.c
184
c->hmac_ctx = NULL;
usr.sbin/nsd/tsig-openssl.c
225
struct tsig_openssl_context* c = (struct tsig_openssl_context*)context;
usr.sbin/nsd/tsig-openssl.c
226
if(c->hmac_ctx) {
usr.sbin/nsd/tsig-openssl.c
227
EVP_MAC_CTX_free(c->hmac_ctx);
usr.sbin/nsd/tsig-openssl.c
229
c->hmac_ctx = EVP_MAC_CTX_new(algo_data->mac);
usr.sbin/nsd/tsig-openssl.c
230
if(!c->hmac_ctx) {
usr.sbin/nsd/tsig-openssl.c
240
if(EVP_MAC_CTX_set_params(c->hmac_ctx, params) <= 0) {
usr.sbin/nsd/tsig-openssl.c
242
EVP_MAC_CTX_free(c->hmac_ctx);
usr.sbin/nsd/tsig-openssl.c
243
c->hmac_ctx = NULL;
usr.sbin/nsd/tsig-openssl.c
249
EVP_MAC_CTX_free(c->hmac_ctx);
usr.sbin/nsd/tsig-openssl.c
250
c->hmac_ctx = NULL;
usr.sbin/nsd/tsig-openssl.c
254
c->outsize = algorithm->maximum_digest_size;
usr.sbin/nsd/tsig-openssl.c
265
struct tsig_openssl_context* c = (struct tsig_openssl_context*)context;
usr.sbin/nsd/tsig-openssl.c
266
if(EVP_MAC_update(c->hmac_ctx, data, size) <= 0) {
usr.sbin/nsd/tsig-openssl.c
281
struct tsig_openssl_context* c = (struct tsig_openssl_context*)context;
usr.sbin/nsd/tsig-openssl.c
282
if(EVP_MAC_final(c->hmac_ctx, digest, size, c->outsize) <= 0) {
usr.sbin/nsd/udb.c
1720
uint64_t c;
usr.sbin/nsd/udb.c
1738
c = f + xlsz - UDB_ALLOC_CHUNK_SIZE;
usr.sbin/nsd/udb.c
1741
while(c >= f) {
usr.sbin/nsd/udb.c
1743
udb_alloc_push_fl(base, alloc, c, UDB_ALLOC_CHUNKS_MAX);
usr.sbin/nsd/udb.c
1744
c -= UDB_ALLOC_CHUNK_SIZE;
usr.sbin/nsd/udb.c
1846
udb_void c, n, newd;
usr.sbin/nsd/udb.c
1858
c = chunk_from_dataptr(r);
usr.sbin/nsd/udb.c
1859
cp = UDB_CHUNK(c);
usr.sbin/nsd/udb.c
1862
avail = UDB_XL_CHUNK(c)->size - sizeof(udb_xl_chunk_d)
usr.sbin/nsd/udb.c
690
regen_free(void* base, udb_void c, int exp, udb_alloc_d* regen)
usr.sbin/nsd/udb.c
692
udb_free_chunk_d* cp = UDB_FREE_CHUNK(c);
usr.sbin/nsd/udb.c
699
chunk_set_last(base, c, exp, (uint8_t)exp);
usr.sbin/nsd/udb.c
703
UDB_FREE_CHUNK(cp->next)->prev = c;
usr.sbin/nsd/udb.c
705
return c + esz;
usr.sbin/nsd/udb.c
710
regen_xl(void* base, udb_void c, udb_alloc_d* regen)
usr.sbin/nsd/udb.c
712
udb_xl_chunk_d* cp = UDB_XL_CHUNK(c);
usr.sbin/nsd/udb.c
717
if( (c&(UDB_ALLOC_CHUNK_SIZE-1)) != 0) {
usr.sbin/nsd/udb.c
722
return c + xlsz;
usr.sbin/nsd/udb.c
727
regen_data(void* base, udb_void c, int exp, udb_alloc_d* regen)
usr.sbin/nsd/udb.c
733
chunk_set_last(base, c, exp, (uint8_t)exp);
usr.sbin/nsd/udb.c
735
return c + esz;
usr.sbin/nsd/xdp-dns-redirect_kern.c
101
cursor_init(&c, ctx);
usr.sbin/nsd/xdp-dns-redirect_kern.c
103
if (!(eth = parse_eth(&c, ð_proto)))
usr.sbin/nsd/xdp-dns-redirect_kern.c
107
if (!(ipv4 = parse_iphdr(&c)) || ipv4->protocol != IPPROTO_UDP)
usr.sbin/nsd/xdp-dns-redirect_kern.c
110
if (!(udp = parse_udphdr(&c)) || udp->dest != __bpf_htons(DNS_PORT))
usr.sbin/nsd/xdp-dns-redirect_kern.c
117
if (!(ipv6 = parse_ipv6hdr(&c)) || ipv6->nexthdr != IPPROTO_UDP)
usr.sbin/nsd/xdp-dns-redirect_kern.c
120
if (!(udp = parse_udphdr(&c)) || udp->dest != __bpf_htons(DNS_PORT))
usr.sbin/nsd/xdp-dns-redirect_kern.c
36
static __always_inline void cursor_init(struct cursor *c, struct xdp_md *ctx) {
usr.sbin/nsd/xdp-dns-redirect_kern.c
37
c->end = (void *)(long)ctx->data_end;
usr.sbin/nsd/xdp-dns-redirect_kern.c
38
c->pos = (void *)(long)ctx->data;
usr.sbin/nsd/xdp-dns-redirect_kern.c
42
static __always_inline struct STRUCT *parse_##STRUCT(struct cursor *c) { \
usr.sbin/nsd/xdp-dns-redirect_kern.c
43
struct STRUCT *ret = c->pos; \
usr.sbin/nsd/xdp-dns-redirect_kern.c
44
if (c->pos + sizeof(struct STRUCT) > c->end) \
usr.sbin/nsd/xdp-dns-redirect_kern.c
46
c->pos += sizeof(struct STRUCT); \
usr.sbin/nsd/xdp-dns-redirect_kern.c
62
parse_eth(struct cursor *c, __u16 *eth_proto) {
usr.sbin/nsd/xdp-dns-redirect_kern.c
65
if (!(eth = parse_ethhdr(c)))
usr.sbin/nsd/xdp-dns-redirect_kern.c
73
if (!(vlan = parse_vlanhdr(c)))
usr.sbin/nsd/xdp-dns-redirect_kern.c
79
if (!(vlan = parse_vlanhdr(c)))
usr.sbin/nsd/xdp-dns-redirect_kern.c
92
struct cursor c;
usr.sbin/nsd/xfr-inspect.c
505
int c, list=0;
usr.sbin/nsd/xfr-inspect.c
506
while( (c=getopt(argc, argv, "hlv")) != -1) {
usr.sbin/nsd/xfr-inspect.c
507
switch(c) {
usr.sbin/nsd/zonec.c
115
struct collect_rrs c;
usr.sbin/nsd/zonec.c
123
if(!state->c.domain || state->c.rr_count == 0)
usr.sbin/nsd/zonec.c
125
if (!state->c.rrset) {
usr.sbin/nsd/zonec.c
128
+ sizeof(rr_type*) * state->c.rr_count /* Add space for RRs. */
usr.sbin/nsd/zonec.c
132
rrset->rr_count = state->c.rr_count;
usr.sbin/nsd/zonec.c
135
sizeof(rr_type*) * state->c.rr_count);
usr.sbin/nsd/zonec.c
137
memcpy(rrset->rrs, state->c.rrs, state->c.rr_count * sizeof(rr_type*));
usr.sbin/nsd/zonec.c
138
switch (state->c.type) {
usr.sbin/nsd/zonec.c
140
if (!domain_find_non_cname_rrset(state->c.domain, state->zone))
usr.sbin/nsd/zonec.c
151
if (!domain_find_rrset(state->c.domain, state->zone, TYPE_CNAME))
usr.sbin/nsd/zonec.c
157
domain_add_rrset(state->c.domain, rrset);
usr.sbin/nsd/zonec.c
165
rrset = state->c.rrset;
usr.sbin/nsd/zonec.c
169
state->database->region, rrset->rr_count + state->c.rr_count, sizeof(*rrs));
usr.sbin/nsd/zonec.c
176
(rrset_orig->rr_count+state->c.rr_count)*sizeof(rr_type*));
usr.sbin/nsd/zonec.c
180
if(state->c.rrset_prev)
usr.sbin/nsd/zonec.c
181
state->c.rrset_prev->next = rrset;
usr.sbin/nsd/zonec.c
182
else state->c.domain->rrsets = rrset;
usr.sbin/nsd/zonec.c
187
memcpy(rrset->rrs + rrset->rr_count, state->c.rrs, state->c.rr_count * sizeof(rr_type*));
usr.sbin/nsd/zonec.c
188
rrset->rr_count += state->c.rr_count;
usr.sbin/nsd/zonec.c
190
state->records += state->c.rr_count;;
usr.sbin/nsd/zonec.c
192
if (state->c.rrs[0]->owner == state->zone->apex)
usr.sbin/nsd/zonec.c
193
apex_rrset_checks(state->database, rrset, state->c.rrs[0]->owner);
usr.sbin/nsd/zonec.c
195
state->c.domain = NULL;
usr.sbin/nsd/zonec.c
196
state->c.type = -1;
usr.sbin/nsd/zonec.c
197
state->c.rrset = NULL;
usr.sbin/nsd/zonec.c
199
state->c.rrset_prev = NULL;
usr.sbin/nsd/zonec.c
201
state->c.rr_count = 0;
usr.sbin/nsd/zonec.c
237
if (domain != state->c.domain || type != state->c.type
usr.sbin/nsd/zonec.c
238
|| state->c.rr_count >= (int)(sizeof(state->c.rrs) / sizeof(*state->c.rrs))){
usr.sbin/nsd/zonec.c
240
state->c.domain = domain;
usr.sbin/nsd/zonec.c
241
state->c.type = type;
usr.sbin/nsd/zonec.c
242
state->c.rrset = NULL;
usr.sbin/nsd/zonec.c
244
state->c.rrset_prev = NULL;
usr.sbin/nsd/zonec.c
287
if (state->c.rr_count == 0) {
usr.sbin/nsd/zonec.c
289
state->c.rrset = domain_find_rrset(state->c.domain, state->zone, state->c.type);
usr.sbin/nsd/zonec.c
291
state->c.rrset = domain_find_rrset_and_prev(state->c.domain, state->zone, state->c.type, &state->c.rrset_prev);
usr.sbin/nsd/zonec.c
296
else if (state->c.rrset && ttl != state->c.rrset->rrs[0]->ttl) {
usr.sbin/nsd/zonec.c
300
state->c.rrset->rrs[0]->ttl, rrtype_to_string(type));
usr.sbin/nsd/zonec.c
302
} else if (state->c.rr_count && ttl != state->c.rrs[0]->ttl) {
usr.sbin/nsd/zonec.c
306
state->c.rrs[0]->ttl, rrtype_to_string(type));
usr.sbin/nsd/zonec.c
308
if (state->c.rrset || state->c.rr_count) {
usr.sbin/nsd/zonec.c
320
if (state->c.rrset) {
usr.sbin/nsd/zonec.c
322
for (int i = 0; i < state->c.rrset->rr_count; i++) {
usr.sbin/nsd/zonec.c
323
if (!equal_rr_rdata(descriptor, rr, state->c.rrset->rrs[i]))
usr.sbin/nsd/zonec.c
333
for (int i = 0; i < state->c.rr_count; i++) {
usr.sbin/nsd/zonec.c
334
if (!equal_rr_rdata(descriptor, rr, state->c.rrs[i]))
usr.sbin/nsd/zonec.c
342
state->c.rrs[state->c.rr_count++] = rr;
usr.sbin/nsd/zonec.c
442
state.c.domain = NULL;
usr.sbin/nsd/zonec.c
443
state.c.type = -1;
usr.sbin/nsd/zonec.c
444
state.c.rrset = NULL;
usr.sbin/nsd/zonec.c
446
state.c.rrset_prev = NULL;
usr.sbin/nsd/zonec.c
448
state.c.rr_count = 0;
usr.sbin/nsd/zonec.c
466
for (int i = 0; i < state.c.rr_count; i++) {
usr.sbin/nsd/zonec.c
468
rr_lower_usage(database, state.c.rrs[i]);
usr.sbin/nsd/zonec.c
469
region_recycle( database->region, state.c.rrs[i]
usr.sbin/nsd/zonec.c
470
, sizeof(*state.c.rrs[i])
usr.sbin/nsd/zonec.c
471
+ state.c.rrs[i]->rdlength);
usr.sbin/ntpd/constraint.c
1143
char *buf, *q, c;
usr.sbin/ntpd/constraint.c
1157
ret = tls_read(tls, &c, 1);
usr.sbin/ntpd/constraint.c
1172
buf[i] = c;
usr.sbin/ntpd/constraint.c
1173
if (c == '\n')
usr.sbin/ntpd/control.c
167
struct ctl_conn *c;
usr.sbin/ntpd/control.c
169
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ntpd/control.c
170
if (c->ibuf.fd == fd)
usr.sbin/ntpd/control.c
174
return (c);
usr.sbin/ntpd/control.c
180
struct ctl_conn *c;
usr.sbin/ntpd/control.c
182
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ntpd/control.c
187
imsgbuf_clear(&c->ibuf);
usr.sbin/ntpd/control.c
188
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ntpd/control.c
190
close(c->ibuf.fd);
usr.sbin/ntpd/control.c
191
free(c);
usr.sbin/ntpd/control.c
200
struct ctl_conn *c;
usr.sbin/ntpd/control.c
209
if ((c = control_connbyfd(pfd->fd)) == NULL) {
usr.sbin/ntpd/control.c
215
if (imsgbuf_write(&c->ibuf) == -1) {
usr.sbin/ntpd/control.c
223
if (imsgbuf_read(&c->ibuf) != 1) {
usr.sbin/ntpd/control.c
229
if ((n = imsgbuf_get(&c->ibuf, &imsg)) == -1) {
usr.sbin/ntpd/control.c
239
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_STATUS, 0, 0, -1,
usr.sbin/ntpd/control.c
246
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_PEERS,
usr.sbin/ntpd/control.c
250
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_PEERS_END,
usr.sbin/ntpd/control.c
257
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS,
usr.sbin/ntpd/control.c
261
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS_END,
usr.sbin/ntpd/control.c
266
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_STATUS, 0, 0, -1,
usr.sbin/ntpd/control.c
272
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_PEERS,
usr.sbin/ntpd/control.c
276
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_PEERS_END,
usr.sbin/ntpd/control.c
282
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS,
usr.sbin/ntpd/control.c
286
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS_END,
usr.sbin/ntpd/control.c
289
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_ALL_END,
usr.sbin/ntpd/parse.y
572
int c, next;
usr.sbin/ntpd/parse.y
577
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/ntpd/parse.y
578
if (c != '\0')
usr.sbin/ntpd/parse.y
579
return (c);
usr.sbin/ntpd/parse.y
589
if ((c = getc(file->stream)) == EOF) {
usr.sbin/ntpd/parse.y
596
return (c);
usr.sbin/ntpd/parse.y
599
while ((c = getc(file->stream)) == '\\') {
usr.sbin/ntpd/parse.y
602
c = next;
usr.sbin/ntpd/parse.y
609
while (c == EOF) {
usr.sbin/ntpd/parse.y
612
c = getc(file->stream);
usr.sbin/ntpd/parse.y
614
return (c);
usr.sbin/ntpd/parse.y
618
lungetc(int c)
usr.sbin/ntpd/parse.y
620
if (c == EOF)
usr.sbin/ntpd/parse.y
625
return (c);
usr.sbin/ntpd/parse.y
629
pushback_buffer[pushback_index++] = c;
usr.sbin/ntpd/parse.y
630
return (c);
usr.sbin/ntpd/parse.y
636
int c;
usr.sbin/ntpd/parse.y
643
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/ntpd/parse.y
645
c = lgetc(0);
usr.sbin/ntpd/parse.y
646
if (c == '\n') {
usr.sbin/ntpd/parse.y
650
if (c == EOF)
usr.sbin/ntpd/parse.y
661
int quotec, next, c;
usr.sbin/ntpd/parse.y
665
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ntpd/parse.y
669
if (c == '#')
usr.sbin/ntpd/parse.y
670
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ntpd/parse.y
673
switch (c) {
usr.sbin/ntpd/parse.y
676
quotec = c;
usr.sbin/ntpd/parse.y
678
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ntpd/parse.y
680
if (c == '\n') {
usr.sbin/ntpd/parse.y
683
} else if (c == '\\') {
usr.sbin/ntpd/parse.y
688
c = next;
usr.sbin/ntpd/parse.y
694
} else if (c == quotec) {
usr.sbin/ntpd/parse.y
697
} else if (c == '\0') {
usr.sbin/ntpd/parse.y
705
*p++ = c;
usr.sbin/ntpd/parse.y
716
if (c == '-' || isdigit(c)) {
usr.sbin/ntpd/parse.y
718
*p++ = c;
usr.sbin/ntpd/parse.y
723
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ntpd/parse.y
724
lungetc(c);
usr.sbin/ntpd/parse.y
727
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ntpd/parse.y
743
c = (unsigned char)*--p;
usr.sbin/ntpd/parse.y
744
if (c == '-')
usr.sbin/ntpd/parse.y
745
return (c);
usr.sbin/ntpd/parse.y
755
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/ntpd/parse.y
757
*p++ = c;
usr.sbin/ntpd/parse.y
762
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ntpd/parse.y
763
lungetc(c);
usr.sbin/ntpd/parse.y
770
if (c == '\n') {
usr.sbin/ntpd/parse.y
774
if (c == EOF)
usr.sbin/ntpd/parse.y
776
return (c);
usr.sbin/ocspcheck/http.c
224
int family, fd, c;
usr.sbin/ocspcheck/http.c
243
c = inet_pton(AF_INET, addrs[cur].ip,
usr.sbin/ocspcheck/http.c
250
c = inet_pton(AF_INET6, addrs[cur].ip,
usr.sbin/ocspcheck/http.c
258
if (c < 0) {
usr.sbin/ocspcheck/http.c
261
} else if (c == 0) {
usr.sbin/ocspcheck/http.c
333
int c;
usr.sbin/ocspcheck/http.c
337
c = asprintf(&req,
usr.sbin/ocspcheck/http.c
343
c = asprintf(&req,
usr.sbin/ocspcheck/http.c
351
if (c == -1) {
usr.sbin/ocspcheck/http.c
354
} else if (!http_write(req, c, http)) {
usr.sbin/ospf6d/carp.c
100
free(c);
usr.sbin/ospf6d/carp.c
134
struct carpgroup *c;
usr.sbin/ospf6d/carp.c
136
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ospf6d/carp.c
141
if (c->changed_by + demote < 0) {
usr.sbin/ospf6d/carp.c
146
if (c->do_demote && carp_demote_ioctl(group, demote) == -1)
usr.sbin/ospf6d/carp.c
149
c->changed_by += demote;
usr.sbin/ospf6d/carp.c
152
if (demote < 0 && c->changed_by == 0)
usr.sbin/ospf6d/carp.c
153
c->do_demote = 1;
usr.sbin/ospf6d/carp.c
48
struct carpgroup *c;
usr.sbin/ospf6d/carp.c
50
TAILQ_FOREACH(c, &carpgroups, entry)
usr.sbin/ospf6d/carp.c
51
if (!strcmp(c->group, group))
usr.sbin/ospf6d/carp.c
52
return (c);
usr.sbin/ospf6d/carp.c
60
struct carpgroup *c;
usr.sbin/ospf6d/carp.c
63
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ospf6d/carp.c
64
if ((c = calloc(1, sizeof(struct carpgroup))) == NULL) {
usr.sbin/ospf6d/carp.c
68
if ((c->group = strdup(group)) == NULL) {
usr.sbin/ospf6d/carp.c
70
free(c);
usr.sbin/ospf6d/carp.c
76
free(c->group);
usr.sbin/ospf6d/carp.c
77
free(c);
usr.sbin/ospf6d/carp.c
81
c->do_demote = 1;
usr.sbin/ospf6d/carp.c
83
TAILQ_INSERT_TAIL(&carpgroups, c, entry);
usr.sbin/ospf6d/carp.c
92
struct carpgroup *c;
usr.sbin/ospf6d/carp.c
94
while ((c = TAILQ_FIRST(&carpgroups)) != NULL) {
usr.sbin/ospf6d/carp.c
95
TAILQ_REMOVE(&carpgroups, c, entry);
usr.sbin/ospf6d/carp.c
96
if (c->do_demote && c->changed_by > 0)
usr.sbin/ospf6d/carp.c
97
carp_demote_ioctl(c->group, -c->changed_by);
usr.sbin/ospf6d/carp.c
99
free(c->group);
usr.sbin/ospf6d/control.c
149
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
173
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/ospf6d/control.c
179
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/ospf6d/control.c
182
free(c);
usr.sbin/ospf6d/control.c
185
c->iev.handler = control_dispatch_imsg;
usr.sbin/ospf6d/control.c
186
c->iev.events = EV_READ;
usr.sbin/ospf6d/control.c
187
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/ospf6d/control.c
188
c->iev.handler, &c->iev);
usr.sbin/ospf6d/control.c
189
event_add(&c->iev.ev, NULL);
usr.sbin/ospf6d/control.c
191
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/ospf6d/control.c
197
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
199
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ospf6d/control.c
200
if (c->iev.ibuf.fd == fd)
usr.sbin/ospf6d/control.c
204
return (c);
usr.sbin/ospf6d/control.c
210
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
212
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ospf6d/control.c
213
if (c->iev.ibuf.pid == pid)
usr.sbin/ospf6d/control.c
217
return (c);
usr.sbin/ospf6d/control.c
223
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
225
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ospf6d/control.c
230
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/ospf6d/control.c
231
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ospf6d/control.c
233
event_del(&c->iev.ev);
usr.sbin/ospf6d/control.c
234
close(c->iev.ibuf.fd);
usr.sbin/ospf6d/control.c
242
free(c);
usr.sbin/ospf6d/control.c
248
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
253
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ospf6d/control.c
259
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/ospf6d/control.c
265
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/ospf6d/control.c
272
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/ospf6d/control.c
287
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospf6d/control.c
292
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospf6d/control.c
300
ospfe_iface_ctl(c, ifidx);
usr.sbin/ospf6d/control.c
301
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/ospf6d/control.c
316
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospf6d/control.c
321
ospfe_nbr_ctl(c);
usr.sbin/ospf6d/control.c
345
imsg_event_add(&c->iev);
usr.sbin/ospf6d/control.c
351
struct ctl_conn *c;
usr.sbin/ospf6d/control.c
353
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/ospf6d/control.c
356
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/ospf6d/ospfe.c
1166
ospfe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/ospf6d/ospfe.c
1176
imsg_compose_event(&c->iev,
usr.sbin/ospf6d/ospfe.c
1183
ospfe_nbr_ctl(struct ctl_conn *c)
usr.sbin/ospf6d/ospfe.c
1195
imsg_compose_event(&c->iev,
usr.sbin/ospf6d/ospfe.c
1201
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/ospf6d/parse.y
693
int c;
usr.sbin/ospf6d/parse.y
697
c = file->ungetbuf[--file->ungetpos];
usr.sbin/ospf6d/parse.y
699
c = getc(file->stream);
usr.sbin/ospf6d/parse.y
701
if (c == START_EXPAND)
usr.sbin/ospf6d/parse.y
703
else if (c == DONE_EXPAND)
usr.sbin/ospf6d/parse.y
708
return (c);
usr.sbin/ospf6d/parse.y
714
int c, next;
usr.sbin/ospf6d/parse.y
717
if ((c = igetc()) == EOF) {
usr.sbin/ospf6d/parse.y
724
return (c);
usr.sbin/ospf6d/parse.y
727
while ((c = igetc()) == '\\') {
usr.sbin/ospf6d/parse.y
730
c = next;
usr.sbin/ospf6d/parse.y
737
if (c == EOF) {
usr.sbin/ospf6d/parse.y
747
while (c == EOF) {
usr.sbin/ospf6d/parse.y
750
c = igetc();
usr.sbin/ospf6d/parse.y
753
return (c);
usr.sbin/ospf6d/parse.y
757
lungetc(int c)
usr.sbin/ospf6d/parse.y
759
if (c == EOF)
usr.sbin/ospf6d/parse.y
769
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/ospf6d/parse.y
775
int c;
usr.sbin/ospf6d/parse.y
779
c = lgetc(0);
usr.sbin/ospf6d/parse.y
780
if (c == '\n') {
usr.sbin/ospf6d/parse.y
784
if (c == EOF)
usr.sbin/ospf6d/parse.y
795
int quotec, next, c;
usr.sbin/ospf6d/parse.y
800
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ospf6d/parse.y
804
if (c == '#')
usr.sbin/ospf6d/parse.y
805
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ospf6d/parse.y
807
if (c == '$' && !expanding) {
usr.sbin/ospf6d/parse.y
809
if ((c = lgetc(0)) == EOF)
usr.sbin/ospf6d/parse.y
816
if (isalnum(c) || c == '_') {
usr.sbin/ospf6d/parse.y
817
*p++ = c;
usr.sbin/ospf6d/parse.y
821
lungetc(c);
usr.sbin/ospf6d/parse.y
839
switch (c) {
usr.sbin/ospf6d/parse.y
842
quotec = c;
usr.sbin/ospf6d/parse.y
844
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ospf6d/parse.y
846
if (c == '\n') {
usr.sbin/ospf6d/parse.y
849
} else if (c == '\\') {
usr.sbin/ospf6d/parse.y
854
c = next;
usr.sbin/ospf6d/parse.y
860
} else if (c == quotec) {
usr.sbin/ospf6d/parse.y
863
} else if (c == '\0') {
usr.sbin/ospf6d/parse.y
871
*p++ = c;
usr.sbin/ospf6d/parse.y
882
if (c == '-' || isdigit(c)) {
usr.sbin/ospf6d/parse.y
884
*p++ = c;
usr.sbin/ospf6d/parse.y
889
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ospf6d/parse.y
890
lungetc(c);
usr.sbin/ospf6d/parse.y
893
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ospf6d/parse.y
909
c = (unsigned char)*--p;
usr.sbin/ospf6d/parse.y
910
if (c == '-')
usr.sbin/ospf6d/parse.y
911
return (c);
usr.sbin/ospf6d/parse.y
921
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/ospf6d/parse.y
923
*p++ = c;
usr.sbin/ospf6d/parse.y
928
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ospf6d/parse.y
929
lungetc(c);
usr.sbin/ospf6d/parse.y
936
if (c == '\n') {
usr.sbin/ospf6d/parse.y
940
if (c == EOF)
usr.sbin/ospf6d/parse.y
942
return (c);
usr.sbin/ospf6d/rde_spf.c
581
struct vertex *c = NULL;
usr.sbin/ospf6d/rde_spf.c
583
TAILQ_FOREACH(c, &cand_list, cand) {
usr.sbin/ospf6d/rde_spf.c
584
if (c->cost > v->cost) {
usr.sbin/ospf6d/rde_spf.c
585
TAILQ_INSERT_BEFORE(c, v, cand);
usr.sbin/ospf6d/rde_spf.c
587
} else if (c->cost == v->cost && c->type == LSA_TYPE_ROUTER &&
usr.sbin/ospf6d/rde_spf.c
589
TAILQ_INSERT_BEFORE(c, v, cand);
usr.sbin/ospf6d/rde_spf.c
599
struct vertex *c;
usr.sbin/ospf6d/rde_spf.c
601
if ((c = TAILQ_FIRST(&cand_list)) != NULL) {
usr.sbin/ospf6d/rde_spf.c
602
TAILQ_REMOVE(&cand_list, c, cand);
usr.sbin/ospf6d/rde_spf.c
605
return (c);
usr.sbin/ospf6d/rde_spf.c
611
struct vertex *c;
usr.sbin/ospf6d/rde_spf.c
613
TAILQ_FOREACH(c, &cand_list, cand) {
usr.sbin/ospf6d/rde_spf.c
614
if (c == v)
usr.sbin/ospf6d/rde_spf.c
624
struct vertex *c;
usr.sbin/ospf6d/rde_spf.c
626
while ((c = TAILQ_FIRST(&cand_list)) != NULL) {
usr.sbin/ospf6d/rde_spf.c
627
TAILQ_REMOVE(&cand_list, c, cand);
usr.sbin/ospfd/carp.c
100
free(c);
usr.sbin/ospfd/carp.c
134
struct carpgroup *c;
usr.sbin/ospfd/carp.c
136
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ospfd/carp.c
141
if (c->changed_by + demote < 0) {
usr.sbin/ospfd/carp.c
146
if (c->do_demote && carp_demote_ioctl(group, demote) == -1)
usr.sbin/ospfd/carp.c
149
c->changed_by += demote;
usr.sbin/ospfd/carp.c
152
if (demote < 0 && c->changed_by == 0)
usr.sbin/ospfd/carp.c
153
c->do_demote = 1;
usr.sbin/ospfd/carp.c
48
struct carpgroup *c;
usr.sbin/ospfd/carp.c
50
TAILQ_FOREACH(c, &carpgroups, entry)
usr.sbin/ospfd/carp.c
51
if (!strcmp(c->group, group))
usr.sbin/ospfd/carp.c
52
return (c);
usr.sbin/ospfd/carp.c
60
struct carpgroup *c;
usr.sbin/ospfd/carp.c
63
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ospfd/carp.c
64
if ((c = calloc(1, sizeof(struct carpgroup))) == NULL) {
usr.sbin/ospfd/carp.c
68
if ((c->group = strdup(group)) == NULL) {
usr.sbin/ospfd/carp.c
70
free(c);
usr.sbin/ospfd/carp.c
76
free(c->group);
usr.sbin/ospfd/carp.c
77
free(c);
usr.sbin/ospfd/carp.c
81
c->do_demote = 1;
usr.sbin/ospfd/carp.c
83
TAILQ_INSERT_TAIL(&carpgroups, c, entry);
usr.sbin/ospfd/carp.c
92
struct carpgroup *c;
usr.sbin/ospfd/carp.c
94
while ((c = TAILQ_FIRST(&carpgroups)) != NULL) {
usr.sbin/ospfd/carp.c
95
TAILQ_REMOVE(&carpgroups, c, entry);
usr.sbin/ospfd/carp.c
96
if (c->do_demote && c->changed_by > 0)
usr.sbin/ospfd/carp.c
97
carp_demote_ioctl(c->group, -c->changed_by);
usr.sbin/ospfd/carp.c
99
free(c->group);
usr.sbin/ospfd/control.c
149
struct ctl_conn *c;
usr.sbin/ospfd/control.c
173
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/ospfd/control.c
179
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/ospfd/control.c
182
free(c);
usr.sbin/ospfd/control.c
185
c->iev.handler = control_dispatch_imsg;
usr.sbin/ospfd/control.c
186
c->iev.events = EV_READ;
usr.sbin/ospfd/control.c
187
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/ospfd/control.c
188
c->iev.handler, &c->iev);
usr.sbin/ospfd/control.c
189
event_add(&c->iev.ev, NULL);
usr.sbin/ospfd/control.c
191
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/ospfd/control.c
197
struct ctl_conn *c;
usr.sbin/ospfd/control.c
199
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ospfd/control.c
200
if (c->iev.ibuf.fd == fd)
usr.sbin/ospfd/control.c
204
return (c);
usr.sbin/ospfd/control.c
210
struct ctl_conn *c;
usr.sbin/ospfd/control.c
212
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ospfd/control.c
213
if (c->iev.ibuf.pid == pid)
usr.sbin/ospfd/control.c
217
return (c);
usr.sbin/ospfd/control.c
223
struct ctl_conn *c;
usr.sbin/ospfd/control.c
225
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ospfd/control.c
230
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/ospfd/control.c
231
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ospfd/control.c
233
event_del(&c->iev.ev);
usr.sbin/ospfd/control.c
234
close(c->iev.ibuf.fd);
usr.sbin/ospfd/control.c
242
free(c);
usr.sbin/ospfd/control.c
248
struct ctl_conn *c;
usr.sbin/ospfd/control.c
253
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ospfd/control.c
259
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/ospfd/control.c
265
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/ospfd/control.c
272
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/ospfd/control.c
287
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospfd/control.c
293
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospfd/control.c
301
ospfe_iface_ctl(c, ifidx);
usr.sbin/ospfd/control.c
302
imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
usr.sbin/ospfd/control.c
316
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ospfd/control.c
321
ospfe_nbr_ctl(c);
usr.sbin/ospfd/control.c
345
imsg_event_add(&c->iev);
usr.sbin/ospfd/control.c
351
struct ctl_conn *c;
usr.sbin/ospfd/control.c
353
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/ospfd/control.c
356
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/ospfd/ospfe.c
1210
ospfe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/ospfd/ospfe.c
1220
imsg_compose_event(&c->iev,
usr.sbin/ospfd/ospfe.c
1227
ospfe_nbr_ctl(struct ctl_conn *c)
usr.sbin/ospfd/ospfe.c
1239
imsg_compose_event(&c->iev,
usr.sbin/ospfd/ospfe.c
1245
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/ospfd/parse.y
1005
if (isalnum(c) || c == '_') {
usr.sbin/ospfd/parse.y
1006
*p++ = c;
usr.sbin/ospfd/parse.y
1010
lungetc(c);
usr.sbin/ospfd/parse.y
1028
switch (c) {
usr.sbin/ospfd/parse.y
1031
quotec = c;
usr.sbin/ospfd/parse.y
1033
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ospfd/parse.y
1035
if (c == '\n') {
usr.sbin/ospfd/parse.y
1038
} else if (c == '\\') {
usr.sbin/ospfd/parse.y
1043
c = next;
usr.sbin/ospfd/parse.y
1049
} else if (c == quotec) {
usr.sbin/ospfd/parse.y
1052
} else if (c == '\0') {
usr.sbin/ospfd/parse.y
1060
*p++ = c;
usr.sbin/ospfd/parse.y
1071
if (c == '-' || isdigit(c)) {
usr.sbin/ospfd/parse.y
1073
*p++ = c;
usr.sbin/ospfd/parse.y
1078
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ospfd/parse.y
1079
lungetc(c);
usr.sbin/ospfd/parse.y
1082
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ospfd/parse.y
1098
c = (unsigned char)*--p;
usr.sbin/ospfd/parse.y
1099
if (c == '-')
usr.sbin/ospfd/parse.y
1100
return (c);
usr.sbin/ospfd/parse.y
1110
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/ospfd/parse.y
1112
*p++ = c;
usr.sbin/ospfd/parse.y
1117
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ospfd/parse.y
1118
lungetc(c);
usr.sbin/ospfd/parse.y
1125
if (c == '\n') {
usr.sbin/ospfd/parse.y
1129
if (c == EOF)
usr.sbin/ospfd/parse.y
1131
return (c);
usr.sbin/ospfd/parse.y
882
int c;
usr.sbin/ospfd/parse.y
886
c = file->ungetbuf[--file->ungetpos];
usr.sbin/ospfd/parse.y
888
c = getc(file->stream);
usr.sbin/ospfd/parse.y
890
if (c == START_EXPAND)
usr.sbin/ospfd/parse.y
892
else if (c == DONE_EXPAND)
usr.sbin/ospfd/parse.y
897
return (c);
usr.sbin/ospfd/parse.y
903
int c, next;
usr.sbin/ospfd/parse.y
906
if ((c = igetc()) == EOF) {
usr.sbin/ospfd/parse.y
913
return (c);
usr.sbin/ospfd/parse.y
916
while ((c = igetc()) == '\\') {
usr.sbin/ospfd/parse.y
919
c = next;
usr.sbin/ospfd/parse.y
926
if (c == EOF) {
usr.sbin/ospfd/parse.y
936
while (c == EOF) {
usr.sbin/ospfd/parse.y
939
c = igetc();
usr.sbin/ospfd/parse.y
942
return (c);
usr.sbin/ospfd/parse.y
946
lungetc(int c)
usr.sbin/ospfd/parse.y
948
if (c == EOF)
usr.sbin/ospfd/parse.y
958
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/ospfd/parse.y
964
int c;
usr.sbin/ospfd/parse.y
968
c = lgetc(0);
usr.sbin/ospfd/parse.y
969
if (c == '\n') {
usr.sbin/ospfd/parse.y
973
if (c == EOF)
usr.sbin/ospfd/parse.y
984
int quotec, next, c;
usr.sbin/ospfd/parse.y
989
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ospfd/parse.y
993
if (c == '#')
usr.sbin/ospfd/parse.y
994
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ospfd/parse.y
996
if (c == '$' && !expanding) {
usr.sbin/ospfd/parse.y
998
if ((c = lgetc(0)) == EOF)
usr.sbin/ospfd/rde_spf.c
461
struct vertex *c = NULL;
usr.sbin/ospfd/rde_spf.c
463
TAILQ_FOREACH(c, &cand_list, cand) {
usr.sbin/ospfd/rde_spf.c
464
if (c->cost > v->cost) {
usr.sbin/ospfd/rde_spf.c
465
TAILQ_INSERT_BEFORE(c, v, cand);
usr.sbin/ospfd/rde_spf.c
467
} else if (c->cost == v->cost && c->type == LSA_TYPE_ROUTER &&
usr.sbin/ospfd/rde_spf.c
469
TAILQ_INSERT_BEFORE(c, v, cand);
usr.sbin/ospfd/rde_spf.c
479
struct vertex *c;
usr.sbin/ospfd/rde_spf.c
481
if ((c = TAILQ_FIRST(&cand_list)) != NULL) {
usr.sbin/ospfd/rde_spf.c
482
TAILQ_REMOVE(&cand_list, c, cand);
usr.sbin/ospfd/rde_spf.c
485
return (c);
usr.sbin/ospfd/rde_spf.c
491
struct vertex *c;
usr.sbin/ospfd/rde_spf.c
493
TAILQ_FOREACH(c, &cand_list, cand) {
usr.sbin/ospfd/rde_spf.c
494
if (c == v)
usr.sbin/ospfd/rde_spf.c
504
struct vertex *c;
usr.sbin/ospfd/rde_spf.c
506
while ((c = TAILQ_FIRST(&cand_list)) != NULL) {
usr.sbin/ospfd/rde_spf.c
507
TAILQ_REMOVE(&cand_list, c, cand);
usr.sbin/pcidump/pcidump.c
178
int c, error = 0, dumpall = 1, domid = 0;
usr.sbin/pcidump/pcidump.c
180
while ((c = getopt(argc, argv, "d:r:vx")) != -1) {
usr.sbin/pcidump/pcidump.c
181
switch (c) {
usr.sbin/portmap/portmap.c
103
int sock, lsock, c, on = 1;
usr.sbin/portmap/portmap.c
110
while ((c = getopt(argc, argv, "d")) != -1) {
usr.sbin/portmap/portmap.c
111
switch (c) {
usr.sbin/pppd/chat/chat.c
1110
char c;
usr.sbin/pppd/chat/chat.c
1112
status = read(0, &c, 1);
usr.sbin/pppd/chat/chat.c
1116
return ((int)c & 0x7F);
usr.sbin/pppd/chat/chat.c
1132
int put_char(int c)
usr.sbin/pppd/chat/chat.c
1135
char ch = c;
usr.sbin/pppd/chat/chat.c
1159
int write_char (int c)
usr.sbin/pppd/chat/chat.c
1161
if (alarmed || put_char(c) < 0) {
usr.sbin/pppd/chat/chat.c
1191
char c = *s++;
usr.sbin/pppd/chat/chat.c
1193
if (c != '\\') {
usr.sbin/pppd/chat/chat.c
1194
if (!write_char (c))
usr.sbin/pppd/chat/chat.c
1199
c = *s++;
usr.sbin/pppd/chat/chat.c
1200
switch (c) {
usr.sbin/pppd/chat/chat.c
1214
if (!write_char (c))
usr.sbin/pppd/chat/chat.c
1260
int c, printed = 0, len, minlen;
usr.sbin/pppd/chat/chat.c
1287
while ( ! alarmed && (c = get_char()) >= 0) {
usr.sbin/pppd/chat/chat.c
1291
echo_stderr(c);
usr.sbin/pppd/chat/chat.c
1292
if (verbose && c == '\n') {
usr.sbin/pppd/chat/chat.c
1300
*s++ = c;
usr.sbin/pppd/chat/chat.c
1308
if (c == '\n')
usr.sbin/pppd/chat/chat.c
1310
else if (c != '\r')
usr.sbin/pppd/chat/chat.c
1311
fprintf( stderr, "%s", character(c) );
usr.sbin/pppd/chat/chat.c
1332
if (!iscntrl (c)) {
usr.sbin/pppd/chat/chat.c
1334
report_buffer[rep_len] = c;
usr.sbin/pppd/chat/chat.c
1344
c == string[len - 1] &&
usr.sbin/pppd/chat/chat.c
1428
#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0)
usr.sbin/pppd/chat/chat.c
1433
int c, i, n;
usr.sbin/pppd/chat/chat.c
1459
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1462
if (c == '0') {
usr.sbin/pppd/chat/chat.c
1464
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1466
if (c == '*') {
usr.sbin/pppd/chat/chat.c
1468
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1470
while (isdigit(c)) {
usr.sbin/pppd/chat/chat.c
1471
width = width * 10 + c - '0';
usr.sbin/pppd/chat/chat.c
1472
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1475
if (c == '.') {
usr.sbin/pppd/chat/chat.c
1476
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1477
if (c == '*') {
usr.sbin/pppd/chat/chat.c
1479
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1481
while (isdigit(c)) {
usr.sbin/pppd/chat/chat.c
1482
prec = prec * 10 + c - '0';
usr.sbin/pppd/chat/chat.c
1483
c = *++fmt;
usr.sbin/pppd/chat/chat.c
1491
switch (c) {
usr.sbin/pppd/chat/chat.c
1527
quoted = c == 'q';
usr.sbin/pppd/chat/chat.c
1537
c = *p++;
usr.sbin/pppd/chat/chat.c
1539
if (!quoted && c >= 0x80) {
usr.sbin/pppd/chat/chat.c
1542
c -= 0x80;
usr.sbin/pppd/chat/chat.c
1544
if (quoted && (c == '"' || c == '\\'))
usr.sbin/pppd/chat/chat.c
1546
if (c < 0x20 || (0x7f <= c && c < 0xa0)) {
usr.sbin/pppd/chat/chat.c
1549
switch (c) {
usr.sbin/pppd/chat/chat.c
1556
OUTCHAR(hexchars[c >> 4]);
usr.sbin/pppd/chat/chat.c
1557
OUTCHAR(hexchars[c & 0xf]);
usr.sbin/pppd/chat/chat.c
1560
if (c == '\t')
usr.sbin/pppd/chat/chat.c
1561
OUTCHAR(c);
usr.sbin/pppd/chat/chat.c
1564
OUTCHAR(c ^ 0x40);
usr.sbin/pppd/chat/chat.c
1568
OUTCHAR(c);
usr.sbin/pppd/chat/chat.c
1573
if (c != '%')
usr.sbin/pppd/chat/chat.c
191
int write_char(int c);
usr.sbin/pppd/chat/chat.c
192
int put_char(int c);
usr.sbin/pppd/chat/chat.c
195
char *character(int c);
usr.sbin/pppd/chat/chat.c
543
int c, rep_len;
usr.sbin/pppd/chat/chat.c
548
c = get_char();
usr.sbin/pppd/chat/chat.c
550
if (c < 0 || iscntrl(c))
usr.sbin/pppd/chat/chat.c
552
report_buffer[rep_len] = c;
usr.sbin/pppd/chat/chat.c
932
char *character(int c)
usr.sbin/pppd/chat/chat.c
937
meta = (c & 0x80) ? "M-" : "";
usr.sbin/pppd/chat/chat.c
938
c &= 0x7F;
usr.sbin/pppd/chat/chat.c
940
if (c < 32)
usr.sbin/pppd/chat/chat.c
941
snprintf(string, sizeof string, "%s^%c", meta, (int)c + '@');
usr.sbin/pppd/chat/chat.c
942
else if (c == 127)
usr.sbin/pppd/chat/chat.c
945
snprintf(string, sizeof string, "%s%c", meta, c);
usr.sbin/pppd/demand.c
205
int c, rv;
usr.sbin/pppd/demand.c
209
c = *p++;
usr.sbin/pppd/demand.c
210
if (c == PPP_FLAG) {
usr.sbin/pppd/demand.c
226
c ^= PPP_TRANS;
usr.sbin/pppd/demand.c
228
} else if (c == PPP_ESCAPE) {
usr.sbin/pppd/demand.c
236
frame[framelen++] = c;
usr.sbin/pppd/demand.c
237
fcs = PPP_FCS(fcs, c);
usr.sbin/pppd/main.c
1283
int c;
usr.sbin/pppd/main.c
1287
c = *p++;
usr.sbin/pppd/main.c
1288
if (' ' <= c && c <= '~') {
usr.sbin/pppd/main.c
1289
if (c == '\\' || c == '"')
usr.sbin/pppd/main.c
1291
printer(arg, "%c", c);
usr.sbin/pppd/main.c
1293
switch (c) {
usr.sbin/pppd/main.c
1304
printer(arg, "\\%.3o", c);
usr.sbin/pppd/main.c
1343
#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0)
usr.sbin/pppd/main.c
1348
int c, i, n;
usr.sbin/pppd/main.c
1374
c = *++fmt;
usr.sbin/pppd/main.c
1377
if (c == '0') {
usr.sbin/pppd/main.c
1379
c = *++fmt;
usr.sbin/pppd/main.c
1381
if (c == '*') {
usr.sbin/pppd/main.c
1383
c = *++fmt;
usr.sbin/pppd/main.c
1385
while (isdigit(c)) {
usr.sbin/pppd/main.c
1386
width = width * 10 + c - '0';
usr.sbin/pppd/main.c
1387
c = *++fmt;
usr.sbin/pppd/main.c
1390
if (c == '.') {
usr.sbin/pppd/main.c
1391
c = *++fmt;
usr.sbin/pppd/main.c
1392
if (c == '*') {
usr.sbin/pppd/main.c
1394
c = *++fmt;
usr.sbin/pppd/main.c
1396
while (isdigit(c)) {
usr.sbin/pppd/main.c
1397
prec = prec * 10 + c - '0';
usr.sbin/pppd/main.c
1398
c = *++fmt;
usr.sbin/pppd/main.c
1406
switch (c) {
usr.sbin/pppd/main.c
1451
quoted = c == 'q';
usr.sbin/pppd/main.c
1461
c = *p++;
usr.sbin/pppd/main.c
1463
if (!quoted && c >= 0x80) {
usr.sbin/pppd/main.c
1466
c -= 0x80;
usr.sbin/pppd/main.c
1468
if (quoted && (c == '"' || c == '\\'))
usr.sbin/pppd/main.c
1470
if (c < 0x20 || (0x7f <= c && c < 0xa0)) {
usr.sbin/pppd/main.c
1473
switch (c) {
usr.sbin/pppd/main.c
1480
OUTCHAR(hexchars[c >> 4]);
usr.sbin/pppd/main.c
1481
OUTCHAR(hexchars[c & 0xf]);
usr.sbin/pppd/main.c
1484
if (c == '\t')
usr.sbin/pppd/main.c
1485
OUTCHAR(c);
usr.sbin/pppd/main.c
1488
OUTCHAR(c ^ 0x40);
usr.sbin/pppd/main.c
1492
OUTCHAR(c);
usr.sbin/pppd/main.c
1497
if (c != '%')
usr.sbin/pppd/options.c
722
int c, len, escape;
usr.sbin/pppd/options.c
726
#define isoctal(c) ((c) >= '0' && (c) < '8')
usr.sbin/pppd/options.c
737
c = getc(f);
usr.sbin/pppd/options.c
738
if (c == EOF)
usr.sbin/pppd/options.c
745
if (c == '\n') {
usr.sbin/pppd/options.c
769
if (c == '\\') {
usr.sbin/pppd/options.c
777
if (c == '#') {
usr.sbin/pppd/options.c
785
if (!isspace(c))
usr.sbin/pppd/options.c
792
if (!escape && (c == '"' || c == '\'')) {
usr.sbin/pppd/options.c
793
quoted = c;
usr.sbin/pppd/options.c
794
c = getc(f);
usr.sbin/pppd/options.c
801
while (c != EOF) {
usr.sbin/pppd/options.c
809
if (c == '\n') {
usr.sbin/pppd/options.c
810
c = getc(f);
usr.sbin/pppd/options.c
815
switch (c) {
usr.sbin/pppd/options.c
839
if (isoctal(c)) {
usr.sbin/pppd/options.c
844
for (n = 0; n < 3 && isoctal(c); ++n) {
usr.sbin/pppd/options.c
845
value = (value << 3) + (c & 07);
usr.sbin/pppd/options.c
846
c = getc(f);
usr.sbin/pppd/options.c
852
if (c == 'x') {
usr.sbin/pppd/options.c
857
c = getc(f);
usr.sbin/pppd/options.c
858
for (n = 0; n < 2 && isxdigit(c); ++n) {
usr.sbin/pppd/options.c
859
digit = toupper(c) - '0';
usr.sbin/pppd/options.c
863
c = getc (f);
usr.sbin/pppd/options.c
872
value = c;
usr.sbin/pppd/options.c
885
c = getc(f);
usr.sbin/pppd/options.c
894
if (c == quoted)
usr.sbin/pppd/options.c
897
if (isspace(c) || c == '#') {
usr.sbin/pppd/options.c
898
ungetc (c, f);
usr.sbin/pppd/options.c
906
if (c == '\\') {
usr.sbin/pppd/options.c
908
c = getc(f);
usr.sbin/pppd/options.c
916
word[len] = c;
usr.sbin/pppd/options.c
920
c = getc(f);
usr.sbin/pppd/options.c
926
if (c == EOF) {
usr.sbin/pppd/pppd.h
357
#define GETCHAR(c, cp) { \
usr.sbin/pppd/pppd.h
358
(c) = *(cp)++; \
usr.sbin/pppd/pppd.h
360
#define PUTCHAR(c, cp) { \
usr.sbin/pppd/pppd.h
361
*(cp)++ = (u_char) (c); \
usr.sbin/pppd/pppstats/pppstats.c
146
#define RATIO(c, i, u) ((c) == 0? 1.0: (u) / ((double)(c) + (i)))
usr.sbin/pppd/pppstats/pppstats.c
219
KBPS(W(c.comp_bytes)), W(c.comp_packets),
usr.sbin/pppd/pppstats/pppstats.c
220
KBPS(W(c.inc_bytes)), W(c.inc_packets),
usr.sbin/pppd/pppstats/pppstats.c
221
ccs.c.ratio * 256.0);
usr.sbin/pppd/pppstats/pppstats.c
229
W(c.comp_bytes), W(c.comp_packets),
usr.sbin/pppd/pppstats/pppstats.c
230
W(c.inc_bytes), W(c.inc_packets),
usr.sbin/pppd/pppstats/pppstats.c
231
ccs.c.ratio * 256.0);
usr.sbin/pppd/pppstats/pppstats.c
271
printf(" %6.2f ", CRATE(c));
usr.sbin/pppd/pppstats/pppstats.c
273
printf("%6.2f", KBPS(W(c.unc_bytes)));
usr.sbin/pppd/pppstats/pppstats.c
275
printf("%6u", W(c.unc_bytes));
usr.sbin/pppd/pppstats/pppstats.c
309
int c;
usr.sbin/pppd/pppstats/pppstats.c
314
while ((c = getopt(argc, argv, "advrzc:w:")) != -1) {
usr.sbin/pppd/pppstats/pppstats.c
315
switch (c) {
usr.sbin/quot/quot.c
409
int c;
usr.sbin/quot/quot.c
417
while ((c = getchar()) != EOF && (c < '0' || c > '9'))
usr.sbin/quot/quot.c
418
while ((c = getchar()) != EOF && c != '\n');
usr.sbin/quot/quot.c
419
ungetc(c, stdin);
usr.sbin/quot/quot.c
431
while ((c = getchar()) == ' ' || c == '\t');
usr.sbin/quot/quot.c
433
while (c != EOF && c != '\n') {
usr.sbin/quot/quot.c
434
putchar(c);
usr.sbin/quot/quot.c
435
c = getchar();
usr.sbin/quot/quot.c
443
while ((c = getchar()) != EOF && c != '\n')
usr.sbin/quot/quot.c
446
if (c == EOF)
usr.sbin/rad/control.c
128
struct ctl_conn *c;
usr.sbin/rad/control.c
152
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/rad/control.c
158
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/rad/control.c
161
free(c);
usr.sbin/rad/control.c
164
c->iev.handler = control_dispatch_imsg;
usr.sbin/rad/control.c
165
c->iev.events = EV_READ;
usr.sbin/rad/control.c
166
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/rad/control.c
167
c->iev.handler, &c->iev);
usr.sbin/rad/control.c
168
event_add(&c->iev.ev, NULL);
usr.sbin/rad/control.c
170
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/rad/control.c
176
struct ctl_conn *c;
usr.sbin/rad/control.c
178
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/rad/control.c
179
if (c->iev.ibuf.fd == fd)
usr.sbin/rad/control.c
183
return (c);
usr.sbin/rad/control.c
189
struct ctl_conn *c;
usr.sbin/rad/control.c
191
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/rad/control.c
192
if (c->iev.ibuf.pid == pid)
usr.sbin/rad/control.c
196
return (c);
usr.sbin/rad/control.c
202
struct ctl_conn *c;
usr.sbin/rad/control.c
204
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/rad/control.c
209
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/rad/control.c
210
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/rad/control.c
212
event_del(&c->iev.ev);
usr.sbin/rad/control.c
213
close(c->iev.ibuf.fd);
usr.sbin/rad/control.c
221
free(c);
usr.sbin/rad/control.c
227
struct ctl_conn *c;
usr.sbin/rad/control.c
232
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/rad/control.c
238
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/rad/control.c
244
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/rad/control.c
251
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/rad/control.c
283
imsg_event_add(&c->iev);
usr.sbin/rad/control.c
289
struct ctl_conn *c;
usr.sbin/rad/control.c
291
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/rad/control.c
294
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/rad/parse.y
572
int c;
usr.sbin/rad/parse.y
576
c = file->ungetbuf[--file->ungetpos];
usr.sbin/rad/parse.y
578
c = getc(file->stream);
usr.sbin/rad/parse.y
580
if (c == START_EXPAND)
usr.sbin/rad/parse.y
582
else if (c == DONE_EXPAND)
usr.sbin/rad/parse.y
587
return (c);
usr.sbin/rad/parse.y
593
int c, next;
usr.sbin/rad/parse.y
596
if ((c = igetc()) == EOF) {
usr.sbin/rad/parse.y
603
return (c);
usr.sbin/rad/parse.y
606
while ((c = igetc()) == '\\') {
usr.sbin/rad/parse.y
609
c = next;
usr.sbin/rad/parse.y
616
if (c == EOF) {
usr.sbin/rad/parse.y
626
while (c == EOF) {
usr.sbin/rad/parse.y
629
c = igetc();
usr.sbin/rad/parse.y
632
return (c);
usr.sbin/rad/parse.y
636
lungetc(int c)
usr.sbin/rad/parse.y
638
if (c == EOF)
usr.sbin/rad/parse.y
648
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/rad/parse.y
654
int c;
usr.sbin/rad/parse.y
658
c = lgetc(0);
usr.sbin/rad/parse.y
659
if (c == '\n') {
usr.sbin/rad/parse.y
663
if (c == EOF)
usr.sbin/rad/parse.y
674
int quotec, next, c;
usr.sbin/rad/parse.y
679
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/rad/parse.y
683
if (c == '#')
usr.sbin/rad/parse.y
684
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/rad/parse.y
686
if (c == '$' && !expanding) {
usr.sbin/rad/parse.y
688
if ((c = lgetc(0)) == EOF)
usr.sbin/rad/parse.y
695
if (isalnum(c) || c == '_') {
usr.sbin/rad/parse.y
696
*p++ = c;
usr.sbin/rad/parse.y
700
lungetc(c);
usr.sbin/rad/parse.y
718
switch (c) {
usr.sbin/rad/parse.y
721
quotec = c;
usr.sbin/rad/parse.y
723
if ((c = lgetc(quotec)) == EOF)
usr.sbin/rad/parse.y
725
if (c == '\n') {
usr.sbin/rad/parse.y
728
} else if (c == '\\') {
usr.sbin/rad/parse.y
733
c = next;
usr.sbin/rad/parse.y
739
} else if (c == quotec) {
usr.sbin/rad/parse.y
742
} else if (c == '\0') {
usr.sbin/rad/parse.y
750
*p++ = c;
usr.sbin/rad/parse.y
761
if (c == '-' || isdigit(c)) {
usr.sbin/rad/parse.y
763
*p++ = c;
usr.sbin/rad/parse.y
768
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/rad/parse.y
769
lungetc(c);
usr.sbin/rad/parse.y
772
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/rad/parse.y
788
c = (unsigned char)*--p;
usr.sbin/rad/parse.y
789
if (c == '-')
usr.sbin/rad/parse.y
790
return (c);
usr.sbin/rad/parse.y
800
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/rad/parse.y
802
*p++ = c;
usr.sbin/rad/parse.y
807
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/rad/parse.y
808
lungetc(c);
usr.sbin/rad/parse.y
815
if (c == '\n') {
usr.sbin/rad/parse.y
819
if (c == EOF)
usr.sbin/rad/parse.y
821
return (c);
usr.sbin/radiusctl/json.c
180
char c;
usr.sbin/radiusctl/json.c
183
c = ']';
usr.sbin/radiusctl/json.c
185
c = '}';
usr.sbin/radiusctl/json.c
191
eb = fprintf(jsonfh, "\n%.*s%c", level, indent, c) < 0;
usr.sbin/radiusctl/json.c
194
eb = fprintf(jsonfh, " %c", c) < 0;
usr.sbin/radiusctl/json.c
227
unsigned char c;
usr.sbin/radiusctl/json.c
233
while ((c = *v++) != '\0' && !eb) {
usr.sbin/radiusctl/json.c
235
switch (c) {
usr.sbin/radiusctl/json.c
258
if (iscntrl(c))
usr.sbin/radiusctl/json.c
260
eb = putc(c, jsonfh) == EOF;
usr.sbin/radiusd/control.c
121
struct ctl_conn *c, *t;
usr.sbin/radiusd/control.c
123
TAILQ_FOREACH_SAFE(c, &ctl_conns, entry, t) {
usr.sbin/radiusd/control.c
124
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/radiusd/control.c
125
control_connfree(c);
usr.sbin/radiusd/control.c
138
struct ctl_conn *c;
usr.sbin/radiusd/control.c
162
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/radiusd/control.c
168
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/radiusd/control.c
171
free(c);
usr.sbin/radiusd/control.c
176
c->id = idseq++;
usr.sbin/radiusd/control.c
177
c->iev.handler = control_dispatch_imsg;
usr.sbin/radiusd/control.c
178
c->iev.events = EV_READ;
usr.sbin/radiusd/control.c
179
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events, c->iev.handler, c);
usr.sbin/radiusd/control.c
180
event_add(&c->iev.ev, NULL);
usr.sbin/radiusd/control.c
182
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/radiusd/control.c
188
struct ctl_conn *c;
usr.sbin/radiusd/control.c
190
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/radiusd/control.c
191
if (c->iev.ibuf.fd == fd)
usr.sbin/radiusd/control.c
195
return (c);
usr.sbin/radiusd/control.c
201
struct ctl_conn *c;
usr.sbin/radiusd/control.c
203
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/radiusd/control.c
204
if (c->id == id)
usr.sbin/radiusd/control.c
208
return (c);
usr.sbin/radiusd/control.c
214
struct ctl_conn *c;
usr.sbin/radiusd/control.c
216
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/radiusd/control.c
220
if (c->modulename[0] != '\0')
usr.sbin/radiusd/control.c
221
radiusd_imsg_compose_module(radiusd_s, c->modulename,
usr.sbin/radiusd/control.c
222
IMSG_RADIUSD_MODULE_CTRL_UNBIND, c->id, -1, -1, NULL, 0);
usr.sbin/radiusd/control.c
224
control_connfree(c);
usr.sbin/radiusd/control.c
228
control_connfree(struct ctl_conn *c)
usr.sbin/radiusd/control.c
230
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/radiusd/control.c
231
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/radiusd/control.c
233
event_del(&c->iev.ev);
usr.sbin/radiusd/control.c
234
close(c->iev.ibuf.fd);
usr.sbin/radiusd/control.c
242
free(c);
usr.sbin/radiusd/control.c
249
struct ctl_conn *c;
usr.sbin/radiusd/control.c
254
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/radiusd/control.c
260
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/radiusd/control.c
266
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/radiusd/control.c
273
if ((n = imsg_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/radiusd/control.c
295
modulename, imsg.hdr.type, c->id, -1, -1,
usr.sbin/radiusd/control.c
303
imsg_compose_event(&c->iev,
usr.sbin/radiusd/control.c
304
IMSG_NG, c->id, -1, -1, msg,
usr.sbin/radiusd/control.c
314
imsg_event_add(&c->iev);
usr.sbin/radiusd/control.c
320
struct ctl_conn *c;
usr.sbin/radiusd/control.c
322
if ((c = control_connbyid(imsg->hdr.peerid)) == NULL)
usr.sbin/radiusd/control.c
325
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/radiusd/control.c
332
struct ctl_conn *c;
usr.sbin/radiusd/control.c
334
if ((c = control_connbyid(peerid)) == NULL)
usr.sbin/radiusd/control.c
337
if (c->modulename[0] != '\0')
usr.sbin/radiusd/control.c
338
radiusd_imsg_compose_module(radiusd_s, c->modulename,
usr.sbin/radiusd/control.c
339
IMSG_RADIUSD_MODULE_CTRL_UNBIND, c->id, -1, -1, NULL, 0);
usr.sbin/radiusd/control.c
340
strlcpy(c->modulename, modulename, sizeof(c->modulename));
usr.sbin/radiusd/parse.y
446
optdeco : { $$.c = 0; $$.v = NULL; }
usr.sbin/radiusd/parse.y
533
if ((v = calloc(sizeof(char **), $$.c + 2)) == NULL)
usr.sbin/radiusd/parse.y
535
for (i = 0; i < $$.c; i++)
usr.sbin/radiusd/parse.y
539
$$.c++;
usr.sbin/radiusd/parse.y
548
$$.c = 1;
usr.sbin/radiusd/parse.y
645
int c, next;
usr.sbin/radiusd/parse.y
650
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/radiusd/parse.y
651
if (c != '\0')
usr.sbin/radiusd/parse.y
652
return (c);
usr.sbin/radiusd/parse.y
662
if ((c = getc(file->stream)) == EOF) {
usr.sbin/radiusd/parse.y
669
return (c);
usr.sbin/radiusd/parse.y
672
while ((c = getc(file->stream)) == '\\') {
usr.sbin/radiusd/parse.y
675
c = next;
usr.sbin/radiusd/parse.y
682
while (c == EOF) {
usr.sbin/radiusd/parse.y
685
c = getc(file->stream);
usr.sbin/radiusd/parse.y
687
return (c);
usr.sbin/radiusd/parse.y
691
lungetc(int c)
usr.sbin/radiusd/parse.y
693
if (c == EOF)
usr.sbin/radiusd/parse.y
698
return (c);
usr.sbin/radiusd/parse.y
702
pushback_buffer[pushback_index++] = c;
usr.sbin/radiusd/parse.y
703
return (c);
usr.sbin/radiusd/parse.y
709
int c;
usr.sbin/radiusd/parse.y
716
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/radiusd/parse.y
718
c = lgetc(0);
usr.sbin/radiusd/parse.y
719
if (c == '\n') {
usr.sbin/radiusd/parse.y
723
if (c == EOF)
usr.sbin/radiusd/parse.y
734
int quotec, next, c;
usr.sbin/radiusd/parse.y
738
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/radiusd/parse.y
742
if (c == '#')
usr.sbin/radiusd/parse.y
743
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/radiusd/parse.y
746
switch (c) {
usr.sbin/radiusd/parse.y
749
quotec = c;
usr.sbin/radiusd/parse.y
751
if ((c = lgetc(quotec)) == EOF)
usr.sbin/radiusd/parse.y
753
if (c == '\n') {
usr.sbin/radiusd/parse.y
756
} else if (c == '\\') {
usr.sbin/radiusd/parse.y
761
c = next;
usr.sbin/radiusd/parse.y
767
} else if (c == quotec) {
usr.sbin/radiusd/parse.y
770
} else if (c == '\0') {
usr.sbin/radiusd/parse.y
778
*p++ = c;
usr.sbin/radiusd/parse.y
789
if (c == '-' || isdigit(c)) {
usr.sbin/radiusd/parse.y
791
*p++ = c;
usr.sbin/radiusd/parse.y
796
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/radiusd/parse.y
797
lungetc(c);
usr.sbin/radiusd/parse.y
800
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/radiusd/parse.y
816
c = (unsigned char)*--p;
usr.sbin/radiusd/parse.y
817
if (c == '-')
usr.sbin/radiusd/parse.y
818
return (c);
usr.sbin/radiusd/parse.y
828
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
usr.sbin/radiusd/parse.y
830
*p++ = c;
usr.sbin/radiusd/parse.y
835
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/radiusd/parse.y
836
lungetc(c);
usr.sbin/radiusd/parse.y
84
int c;
usr.sbin/radiusd/parse.y
843
if (c == '\n') {
usr.sbin/radiusd/parse.y
847
if (c == EOF)
usr.sbin/radiusd/parse.y
849
return (c);
usr.sbin/radiusd/parse.y
989
int c;
usr.sbin/radiusd/parse.y
992
for (i = 0; i < str_l->c; i++)
usr.sbin/rbootd/rbootd.c
83
int c, fd;
usr.sbin/rbootd/rbootd.c
92
while ((c = getopt(argc, argv, "adi:")) != -1)
usr.sbin/rbootd/rbootd.c
93
switch (c) {
usr.sbin/rdate/rdate.c
52
#define logwtmp(a,b,c)
usr.sbin/rdate/rdate.c
79
int c, p[2], pid;
usr.sbin/rdate/rdate.c
82
while ((c = getopt(argc, argv, "46psanov")) != -1) {
usr.sbin/rdate/rdate.c
83
switch (c) {
usr.sbin/relayd/ca.c
233
int ret = 0, c = 0;
usr.sbin/relayd/ca.c
259
iov[c].iov_base = &cko;
usr.sbin/relayd/ca.c
260
iov[c++].iov_len = sizeof(cko);
usr.sbin/relayd/ca.c
263
c) == -1)
usr.sbin/relayd/ca.c
294
iov[c].iov_base = &cko;
usr.sbin/relayd/ca.c
295
iov[c++].iov_len = sizeof(cko);
usr.sbin/relayd/ca.c
297
iov[c].iov_base = to;
usr.sbin/relayd/ca.c
298
iov[c++].iov_len = cko.cko_tlen;
usr.sbin/relayd/ca.c
302
imsg_get_type(imsg), -1, -1, iov, c) == -1)
usr.sbin/relayd/ca.c
330
iov[c].iov_base = &cko;
usr.sbin/relayd/ca.c
331
iov[c++].iov_len = sizeof(cko);
usr.sbin/relayd/ca.c
334
c) == -1)
usr.sbin/relayd/ca.c
351
iov[c].iov_base = &cko;
usr.sbin/relayd/ca.c
352
iov[c++].iov_len = sizeof(cko);
usr.sbin/relayd/ca.c
354
iov[c].iov_base = to;
usr.sbin/relayd/ca.c
355
iov[c++].iov_len = len;
usr.sbin/relayd/ca.c
359
imsg_get_type(imsg), -1, -1, iov, c) == -1)
usr.sbin/relayd/carp.c
100
free(c->group);
usr.sbin/relayd/carp.c
101
free(c);
usr.sbin/relayd/carp.c
141
struct carpgroup *c;
usr.sbin/relayd/carp.c
143
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/relayd/carp.c
148
if (c->changed_by + demote < 0) {
usr.sbin/relayd/carp.c
153
if (c->do_demote && carp_demote_ioctl(group, demote) == -1)
usr.sbin/relayd/carp.c
156
c->changed_by += demote;
usr.sbin/relayd/carp.c
159
if (demote < 0 && c->changed_by == 0)
usr.sbin/relayd/carp.c
160
c->do_demote = 1;
usr.sbin/relayd/carp.c
50
struct carpgroup *c;
usr.sbin/relayd/carp.c
52
TAILQ_FOREACH(c, &carpgroups, entry)
usr.sbin/relayd/carp.c
53
if (!strcmp(c->group, group))
usr.sbin/relayd/carp.c
54
return (c);
usr.sbin/relayd/carp.c
62
struct carpgroup *c;
usr.sbin/relayd/carp.c
68
if ((c = calloc(1, sizeof(struct carpgroup))) == NULL) {
usr.sbin/relayd/carp.c
72
if ((c->group = strdup(group)) == NULL) {
usr.sbin/relayd/carp.c
74
free(c);
usr.sbin/relayd/carp.c
79
free(c->group);
usr.sbin/relayd/carp.c
80
free(c);
usr.sbin/relayd/carp.c
84
c->do_demote = 1;
usr.sbin/relayd/carp.c
86
TAILQ_INSERT_TAIL(&carpgroups, c, entry);
usr.sbin/relayd/carp.c
93
struct carpgroup *c;
usr.sbin/relayd/carp.c
95
while ((c = TAILQ_FIRST(&carpgroups)) != NULL) {
usr.sbin/relayd/carp.c
96
TAILQ_REMOVE(&carpgroups, c, entry);
usr.sbin/relayd/carp.c
97
if (c->do_demote && c->changed_by > 0)
usr.sbin/relayd/carp.c
98
carp_demote_ioctl(c->group, -c->changed_by);
usr.sbin/relayd/config.c
1011
c = 0;
usr.sbin/relayd/config.c
1012
iov[c].iov_base = &crt;
usr.sbin/relayd/config.c
1013
iov[c++].iov_len = sizeof(crt);
usr.sbin/relayd/config.c
1015
proc_composev(ps, id, IMSG_CFG_RELAY_TABLE, iov, c);
usr.sbin/relayd/config.c
307
int id, c;
usr.sbin/relayd/config.c
322
c = 0;
usr.sbin/relayd/config.c
323
iov[c].iov_base = &tb->conf;
usr.sbin/relayd/config.c
324
iov[c++].iov_len = sizeof(tb->conf);
usr.sbin/relayd/config.c
326
iov[c].iov_base = tb->sendbuf;
usr.sbin/relayd/config.c
327
iov[c++].iov_len = strlen(tb->sendbuf);
usr.sbin/relayd/config.c
330
proc_composev(ps, id, IMSG_CFG_TABLE, iov, c);
usr.sbin/relayd/config.c
634
size_t c;
usr.sbin/relayd/config.c
644
c = 0;
usr.sbin/relayd/config.c
645
iov[c].iov_base = proto;
usr.sbin/relayd/config.c
646
iov[c++].iov_len = sizeof(*proto);
usr.sbin/relayd/config.c
649
iov[c].iov_base = proto->style;
usr.sbin/relayd/config.c
650
iov[c++].iov_len = strlen(proto->style) + 1;
usr.sbin/relayd/config.c
653
proc_composev(ps, id, IMSG_CFG_PROTO, iov, c);
usr.sbin/relayd/config.c
666
size_t c, i;
usr.sbin/relayd/config.c
680
c = 0;
usr.sbin/relayd/config.c
681
iov[c].iov_base = rule;
usr.sbin/relayd/config.c
682
iov[c++].iov_len = sizeof(*rule);
usr.sbin/relayd/config.c
687
iov[c].iov_base =
usr.sbin/relayd/config.c
689
iov[c++].iov_len =
usr.sbin/relayd/config.c
696
iov[c].iov_base =
usr.sbin/relayd/config.c
698
iov[c++].iov_len =
usr.sbin/relayd/config.c
704
proc_composev(ps, id, IMSG_CFG_RULE, iov, c);
usr.sbin/relayd/config.c
859
size_t c;
usr.sbin/relayd/config.c
877
c = 0;
usr.sbin/relayd/config.c
878
iov[c].iov_base = &rl;
usr.sbin/relayd/config.c
879
iov[c++].iov_len = sizeof(rl);
usr.sbin/relayd/config.c
883
iov[c].iov_base = rlay->rl_tls_cakey;
usr.sbin/relayd/config.c
884
iov[c++].iov_len = rl.tls_cakey_len;
usr.sbin/relayd/config.c
896
IMSG_CFG_RELAY, -1, fd, iov, c) != 0) {
usr.sbin/relayd/config.c
912
IMSG_CFG_RELAY, iov, c) != 0) {
usr.sbin/relayd/control.c
137
struct ctl_conn *c;
usr.sbin/relayd/control.c
162
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/relayd/control.c
168
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/relayd/control.c
171
free(c);
usr.sbin/relayd/control.c
175
c->iev.handler = control_dispatch_imsg;
usr.sbin/relayd/control.c
176
c->iev.events = EV_READ;
usr.sbin/relayd/control.c
177
c->iev.data = cs; /* proc.c cheats (reuses the handler) */
usr.sbin/relayd/control.c
178
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/relayd/control.c
179
c->iev.handler, cs);
usr.sbin/relayd/control.c
180
event_add(&c->iev.ev, NULL);
usr.sbin/relayd/control.c
182
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/relayd/control.c
188
struct ctl_conn *c;
usr.sbin/relayd/control.c
190
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/relayd/control.c
191
if (c->iev.ibuf.fd == fd)
usr.sbin/relayd/control.c
195
return (c);
usr.sbin/relayd/control.c
201
struct ctl_conn *c;
usr.sbin/relayd/control.c
203
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/relayd/control.c
208
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/relayd/control.c
209
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/relayd/control.c
211
event_del(&c->iev.ev);
usr.sbin/relayd/control.c
212
close(c->iev.ibuf.fd);
usr.sbin/relayd/control.c
220
free(c);
usr.sbin/relayd/control.c
227
struct ctl_conn *c;
usr.sbin/relayd/control.c
235
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/relayd/control.c
241
switch (imsgbuf_read(&c->iev.ibuf)) {
usr.sbin/relayd/control.c
252
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/relayd/control.c
259
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/relayd/control.c
267
if (c->waiting) {
usr.sbin/relayd/control.c
277
show(c);
usr.sbin/relayd/control.c
280
show_sessions(c);
usr.sbin/relayd/control.c
286
if (disable_rdr(c, &id))
usr.sbin/relayd/control.c
287
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
291
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
299
if (enable_rdr(c, &id))
usr.sbin/relayd/control.c
300
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
304
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
312
if (disable_table(c, &id))
usr.sbin/relayd/control.c
313
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
317
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
325
if (enable_table(c, &id))
usr.sbin/relayd/control.c
326
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
330
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
338
if (disable_host(c, &id, NULL))
usr.sbin/relayd/control.c
339
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
343
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
351
if (enable_host(c, &id, NULL))
usr.sbin/relayd/control.c
352
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
356
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
367
imsg_compose_event(&c->iev, IMSG_CTL_OK,
usr.sbin/relayd/control.c
371
if (c->flags & CTL_CONN_NOTIFY) {
usr.sbin/relayd/control.c
375
imsg_compose_event(&c->iev, IMSG_CTL_FAIL,
usr.sbin/relayd/control.c
379
c->flags |= CTL_CONN_NOTIFY;
usr.sbin/relayd/control.c
400
imsg_event_add(&c->iev);
usr.sbin/relayd/control.c
406
struct ctl_conn *c;
usr.sbin/relayd/control.c
408
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/relayd/control.c
409
if (c->flags & CTL_CONN_NOTIFY) {
usr.sbin/relayd/control.c
410
if (imsg_compose(&c->iev.ibuf, type, 0, 0, -1, data,
usr.sbin/relayd/control.c
413
imsg_event_add(&c->iev);
usr.sbin/relayd/control.c
421
struct ctl_conn *c;
usr.sbin/relayd/control.c
423
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/relayd/control.c
424
if (c->flags & CTL_CONN_NOTIFY) {
usr.sbin/relayd/control.c
425
if (imsg_forward(&c->iev.ibuf, imsg) == -1)
usr.sbin/relayd/control.c
427
imsg_event_add(&c->iev);
usr.sbin/relayd/parse.y
2658
int c;
usr.sbin/relayd/parse.y
2662
c = file->ungetbuf[--file->ungetpos];
usr.sbin/relayd/parse.y
2663
else c = getc(file->stream);
usr.sbin/relayd/parse.y
2665
if (c == START_EXPAND)
usr.sbin/relayd/parse.y
2667
else if (c == DONE_EXPAND)
usr.sbin/relayd/parse.y
2672
return (c);
usr.sbin/relayd/parse.y
2678
int c, next;
usr.sbin/relayd/parse.y
2681
if ((c = igetc()) == EOF) {
usr.sbin/relayd/parse.y
2688
return (c);
usr.sbin/relayd/parse.y
2691
while ((c = igetc()) == '\\') {
usr.sbin/relayd/parse.y
2694
c = next;
usr.sbin/relayd/parse.y
2701
if (c == EOF) {
usr.sbin/relayd/parse.y
2711
while (c == EOF) {
usr.sbin/relayd/parse.y
2714
c = igetc();
usr.sbin/relayd/parse.y
2717
return (c);
usr.sbin/relayd/parse.y
2721
lungetc(int c)
usr.sbin/relayd/parse.y
2723
if (c == EOF)
usr.sbin/relayd/parse.y
2733
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/relayd/parse.y
2739
int c;
usr.sbin/relayd/parse.y
2743
c = lgetc(0);
usr.sbin/relayd/parse.y
2744
if (c == '\n') {
usr.sbin/relayd/parse.y
2748
if (c == EOF)
usr.sbin/relayd/parse.y
2759
int quotec, next, c;
usr.sbin/relayd/parse.y
2764
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/relayd/parse.y
2768
if (c == '#')
usr.sbin/relayd/parse.y
2769
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/relayd/parse.y
2771
if (c == '$' && !expanding) {
usr.sbin/relayd/parse.y
2773
if ((c = lgetc(0)) == EOF)
usr.sbin/relayd/parse.y
2780
if (isalnum(c) || c == '_') {
usr.sbin/relayd/parse.y
2781
*p++ = c;
usr.sbin/relayd/parse.y
2785
lungetc(c);
usr.sbin/relayd/parse.y
2803
switch (c) {
usr.sbin/relayd/parse.y
2806
quotec = c;
usr.sbin/relayd/parse.y
2808
if ((c = lgetc(quotec)) == EOF)
usr.sbin/relayd/parse.y
2810
if (c == '\n') {
usr.sbin/relayd/parse.y
2813
} else if (c == '\\') {
usr.sbin/relayd/parse.y
2818
c = next;
usr.sbin/relayd/parse.y
2824
} else if (c == quotec) {
usr.sbin/relayd/parse.y
2827
} else if (c == '\0') {
usr.sbin/relayd/parse.y
2835
*p++ = c;
usr.sbin/relayd/parse.y
2846
if (c == '-' || isdigit(c)) {
usr.sbin/relayd/parse.y
2848
*p++ = c;
usr.sbin/relayd/parse.y
2853
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/relayd/parse.y
2854
lungetc(c);
usr.sbin/relayd/parse.y
2857
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/relayd/parse.y
2873
c = (unsigned char)*--p;
usr.sbin/relayd/parse.y
2874
if (c == '-')
usr.sbin/relayd/parse.y
2875
return (c);
usr.sbin/relayd/parse.y
2885
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/relayd/parse.y
2887
*p++ = c;
usr.sbin/relayd/parse.y
2892
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/relayd/parse.y
2893
lungetc(c);
usr.sbin/relayd/parse.y
2900
if (c == '\n') {
usr.sbin/relayd/parse.y
2904
if (c == EOF)
usr.sbin/relayd/parse.y
2906
return (c);
usr.sbin/relayd/pfe.c
269
struct ctl_conn *c;
usr.sbin/relayd/pfe.c
299
if ((c = control_connbyfd(con.se_cid)) == NULL) {
usr.sbin/relayd/pfe.c
304
imsg_compose_event(&c->iev,
usr.sbin/relayd/pfe.c
311
if ((c = control_connbyfd(cid)) == NULL) {
usr.sbin/relayd/pfe.c
316
if (c->waiting == 0) {
usr.sbin/relayd/pfe.c
319
} else if (--c->waiting == 0) {
usr.sbin/relayd/pfe.c
321
imsg_compose_event(&c->iev, IMSG_CTL_END,
usr.sbin/relayd/pfe.c
365
show(struct ctl_conn *c)
usr.sbin/relayd/pfe.c
377
imsg_compose_event(&c->iev, IMSG_CTL_RDR, 0, 0, -1,
usr.sbin/relayd/pfe.c
382
imsg_compose_event(&c->iev, IMSG_CTL_RDR_STATS, 0, 0, -1,
usr.sbin/relayd/pfe.c
385
imsg_compose_event(&c->iev, IMSG_CTL_TABLE, 0, 0, -1,
usr.sbin/relayd/pfe.c
389
imsg_compose_event(&c->iev, IMSG_CTL_HOST,
usr.sbin/relayd/pfe.c
394
imsg_compose_event(&c->iev, IMSG_CTL_TABLE, 0, 0, -1,
usr.sbin/relayd/pfe.c
398
imsg_compose_event(&c->iev, IMSG_CTL_HOST,
usr.sbin/relayd/pfe.c
406
imsg_compose_event(&c->iev, IMSG_CTL_RELAY, 0, 0, -1,
usr.sbin/relayd/pfe.c
408
imsg_compose_event(&c->iev, IMSG_CTL_RELAY_STATS, 0, 0, -1,
usr.sbin/relayd/pfe.c
412
imsg_compose_event(&c->iev, IMSG_CTL_TABLE, 0, 0, -1,
usr.sbin/relayd/pfe.c
417
imsg_compose_event(&c->iev,
usr.sbin/relayd/pfe.c
427
imsg_compose_event(&c->iev, IMSG_CTL_ROUTER, 0, 0, -1,
usr.sbin/relayd/pfe.c
433
imsg_compose_event(&c->iev, IMSG_CTL_NETROUTE,
usr.sbin/relayd/pfe.c
435
imsg_compose_event(&c->iev, IMSG_CTL_TABLE, 0, 0, -1,
usr.sbin/relayd/pfe.c
439
imsg_compose_event(&c->iev, IMSG_CTL_HOST,
usr.sbin/relayd/pfe.c
444
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/relayd/pfe.c
448
show_sessions(struct ctl_conn *c)
usr.sbin/relayd/pfe.c
453
cid = c->iev.ibuf.fd;
usr.sbin/relayd/pfe.c
460
c->waiting++;
usr.sbin/relayd/pfe.c
465
disable_rdr(struct ctl_conn *c, struct ctl_id *id)
usr.sbin/relayd/pfe.c
490
enable_rdr(struct ctl_conn *c, struct ctl_id *id)
usr.sbin/relayd/pfe.c
515
if (enable_table(c, &eid) == -1)
usr.sbin/relayd/pfe.c
520
if (enable_table(c, &eid) == -1)
usr.sbin/relayd/pfe.c
526
disable_table(struct ctl_conn *c, struct ctl_id *id)
usr.sbin/relayd/pfe.c
560
enable_table(struct ctl_conn *c, struct ctl_id *id)
usr.sbin/relayd/pfe.c
596
disable_host(struct ctl_conn *c, struct ctl_id *id, struct host *host)
usr.sbin/relayd/pfe.c
641
disable_host(c, id, h);
usr.sbin/relayd/pfe.c
651
disable_host(c, id, h);
usr.sbin/relayd/pfe.c
658
enable_host(struct ctl_conn *c, struct ctl_id *id, struct host *host)
usr.sbin/relayd/pfe.c
695
enable_host(c, id, h);
usr.sbin/relayd/pfe.c
705
enable_host(c, id, h);
usr.sbin/relayd/relay_http.c
893
char *hi[RELAY_MAXLOOKUPLEVELS], *p, *pp, *c, ch;
usr.sbin/relayd/relay_http.c
948
c = &pp[p - pp];
usr.sbin/relayd/relay_http.c
949
ch = *c;
usr.sbin/relayd/relay_http.c
950
*c = '\0';
usr.sbin/relayd/relay_http.c
954
*c = ch;
usr.sbin/relayd/relayd.c
123
int c;
usr.sbin/relayd/relayd.c
134
while ((c = getopt(argc, argv, "dD:nI:P:f:v")) != -1) {
usr.sbin/relayd/relayd.c
135
switch (c) {
usr.sbin/relayd/relayd.c
1596
char c;
usr.sbin/relayd/relayd.c
1619
c = tolower((unsigned char)host[i]);
usr.sbin/relayd/relayd.c
1620
if ((c == '.') && (j == 0 || name[j - 1] == '.'))
usr.sbin/relayd/relayd.c
1622
name[j++] = c;
usr.sbin/relayd/util.c
250
char c, *p, *r;
usr.sbin/relayd/util.c
264
for (; (c = *bits) > 32; bits++) {
usr.sbin/relayd/util.c
265
if (c == '_')
usr.sbin/relayd/util.c
268
*p++ = tolower((u_char)c);
usr.sbin/ripd/carp.c
100
free(c);
usr.sbin/ripd/carp.c
134
struct carpgroup *c;
usr.sbin/ripd/carp.c
136
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ripd/carp.c
141
if (c->changed_by + demote < 0) {
usr.sbin/ripd/carp.c
146
if (c->do_demote && carp_demote_ioctl(group, demote) == -1)
usr.sbin/ripd/carp.c
149
c->changed_by += demote;
usr.sbin/ripd/carp.c
152
if (demote < 0 && c->changed_by == 0)
usr.sbin/ripd/carp.c
153
c->do_demote = 1;
usr.sbin/ripd/carp.c
48
struct carpgroup *c;
usr.sbin/ripd/carp.c
50
TAILQ_FOREACH(c, &carpgroups, entry)
usr.sbin/ripd/carp.c
51
if (!strcmp(c->group, group))
usr.sbin/ripd/carp.c
52
return (c);
usr.sbin/ripd/carp.c
60
struct carpgroup *c;
usr.sbin/ripd/carp.c
63
if ((c = carp_group_find(group)) == NULL) {
usr.sbin/ripd/carp.c
64
if ((c = calloc(1, sizeof(struct carpgroup))) == NULL) {
usr.sbin/ripd/carp.c
68
if ((c->group = strdup(group)) == NULL) {
usr.sbin/ripd/carp.c
70
free(c);
usr.sbin/ripd/carp.c
76
free(c->group);
usr.sbin/ripd/carp.c
77
free(c);
usr.sbin/ripd/carp.c
81
c->do_demote = 1;
usr.sbin/ripd/carp.c
83
TAILQ_INSERT_TAIL(&carpgroups, c, entry);
usr.sbin/ripd/carp.c
92
struct carpgroup *c;
usr.sbin/ripd/carp.c
94
while ((c = TAILQ_FIRST(&carpgroups)) != NULL) {
usr.sbin/ripd/carp.c
95
TAILQ_REMOVE(&carpgroups, c, entry);
usr.sbin/ripd/carp.c
96
if (c->do_demote && c->changed_by > 0)
usr.sbin/ripd/carp.c
97
carp_demote_ioctl(c->group, -c->changed_by);
usr.sbin/ripd/carp.c
99
free(c->group);
usr.sbin/ripd/control.c
116
struct ctl_conn *c;
usr.sbin/ripd/control.c
140
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/ripd/control.c
146
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/ripd/control.c
149
free(c);
usr.sbin/ripd/control.c
152
c->iev.handler = control_dispatch_imsg;
usr.sbin/ripd/control.c
153
c->iev.events = EV_READ;
usr.sbin/ripd/control.c
154
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/ripd/control.c
155
c->iev.handler, &c->iev);
usr.sbin/ripd/control.c
156
event_add(&c->iev.ev, NULL);
usr.sbin/ripd/control.c
158
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/ripd/control.c
164
struct ctl_conn *c;
usr.sbin/ripd/control.c
166
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ripd/control.c
167
if (c->iev.ibuf.fd == fd)
usr.sbin/ripd/control.c
171
return (c);
usr.sbin/ripd/control.c
177
struct ctl_conn *c;
usr.sbin/ripd/control.c
179
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/ripd/control.c
180
if (c->iev.ibuf.pid == pid)
usr.sbin/ripd/control.c
184
return (c);
usr.sbin/ripd/control.c
190
struct ctl_conn *c;
usr.sbin/ripd/control.c
192
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ripd/control.c
197
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/ripd/control.c
198
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/ripd/control.c
200
event_del(&c->iev.ev);
usr.sbin/ripd/control.c
201
close(c->iev.ibuf.fd);
usr.sbin/ripd/control.c
209
free(c);
usr.sbin/ripd/control.c
215
struct ctl_conn *c;
usr.sbin/ripd/control.c
220
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/ripd/control.c
226
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/ripd/control.c
232
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/ripd/control.c
239
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/ripd/control.c
253
ripe_iface_ctl(c, ifidx);
usr.sbin/ripd/control.c
254
imsg_compose(&c->iev.ibuf, IMSG_CTL_END, 0, 0,
usr.sbin/ripd/control.c
259
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ripd/control.c
265
ripe_nbr_ctl(c);
usr.sbin/ripd/control.c
270
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ripd/control.c
278
c->iev.ibuf.pid = imsg.hdr.pid;
usr.sbin/ripd/control.c
303
imsg_event_add(&c->iev);
usr.sbin/ripd/control.c
309
struct ctl_conn *c;
usr.sbin/ripd/control.c
311
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
usr.sbin/ripd/control.c
314
return (imsg_compose_event(&c->iev, imsg->hdr.type, 0, imsg->hdr.pid,
usr.sbin/ripd/parse.y
467
int c, next;
usr.sbin/ripd/parse.y
472
c = (unsigned char)parsebuf[parseindex++];
usr.sbin/ripd/parse.y
473
if (c != '\0')
usr.sbin/ripd/parse.y
474
return (c);
usr.sbin/ripd/parse.y
484
if ((c = getc(file->stream)) == EOF) {
usr.sbin/ripd/parse.y
491
return (c);
usr.sbin/ripd/parse.y
494
while ((c = getc(file->stream)) == '\\') {
usr.sbin/ripd/parse.y
497
c = next;
usr.sbin/ripd/parse.y
504
while (c == EOF) {
usr.sbin/ripd/parse.y
507
c = getc(file->stream);
usr.sbin/ripd/parse.y
509
return (c);
usr.sbin/ripd/parse.y
513
lungetc(int c)
usr.sbin/ripd/parse.y
515
if (c == EOF)
usr.sbin/ripd/parse.y
520
return (c);
usr.sbin/ripd/parse.y
524
pushback_buffer[pushback_index++] = c;
usr.sbin/ripd/parse.y
525
return (c);
usr.sbin/ripd/parse.y
531
int c;
usr.sbin/ripd/parse.y
538
c = (unsigned char)pushback_buffer[--pushback_index];
usr.sbin/ripd/parse.y
540
c = lgetc(0);
usr.sbin/ripd/parse.y
541
if (c == '\n') {
usr.sbin/ripd/parse.y
545
if (c == EOF)
usr.sbin/ripd/parse.y
556
int quotec, next, c;
usr.sbin/ripd/parse.y
561
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ripd/parse.y
565
if (c == '#')
usr.sbin/ripd/parse.y
566
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ripd/parse.y
568
if (c == '$' && parsebuf == NULL) {
usr.sbin/ripd/parse.y
570
if ((c = lgetc(0)) == EOF)
usr.sbin/ripd/parse.y
577
if (isalnum(c) || c == '_') {
usr.sbin/ripd/parse.y
578
*p++ = c;
usr.sbin/ripd/parse.y
582
lungetc(c);
usr.sbin/ripd/parse.y
595
switch (c) {
usr.sbin/ripd/parse.y
598
quotec = c;
usr.sbin/ripd/parse.y
600
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ripd/parse.y
602
if (c == '\n') {
usr.sbin/ripd/parse.y
605
} else if (c == '\\') {
usr.sbin/ripd/parse.y
610
c = next;
usr.sbin/ripd/parse.y
616
} else if (c == quotec) {
usr.sbin/ripd/parse.y
619
} else if (c == '\0') {
usr.sbin/ripd/parse.y
627
*p++ = c;
usr.sbin/ripd/parse.y
638
if (c == '-' || isdigit(c)) {
usr.sbin/ripd/parse.y
640
*p++ = c;
usr.sbin/ripd/parse.y
645
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ripd/parse.y
646
lungetc(c);
usr.sbin/ripd/parse.y
649
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ripd/parse.y
665
c = (unsigned char)*--p;
usr.sbin/ripd/parse.y
666
if (c == '-')
usr.sbin/ripd/parse.y
667
return (c);
usr.sbin/ripd/parse.y
677
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/ripd/parse.y
679
*p++ = c;
usr.sbin/ripd/parse.y
684
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ripd/parse.y
685
lungetc(c);
usr.sbin/ripd/parse.y
692
if (c == '\n') {
usr.sbin/ripd/parse.y
696
if (c == EOF)
usr.sbin/ripd/parse.y
698
return (c);
usr.sbin/ripd/ripe.c
494
ripe_iface_ctl(struct ctl_conn *c, unsigned int idx)
usr.sbin/ripd/ripe.c
502
imsg_compose_event(&c->iev, IMSG_CTL_SHOW_IFACE,
usr.sbin/ripd/ripe.c
509
ripe_nbr_ctl(struct ctl_conn *c)
usr.sbin/ripd/ripe.c
518
imsg_compose_event(&c->iev,
usr.sbin/ripd/ripe.c
523
imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
usr.sbin/rmt/rmt.c
129
if (read(STDIN_FILENO, &c, 1) != 1)
usr.sbin/rmt/rmt.c
131
switch (c) {
usr.sbin/rmt/rmt.c
274
DEBUG1("rmtd: garbage command %c\n", c);
usr.sbin/rmt/rmt.c
77
char c;
usr.sbin/route6d/route6d.c
272
#define FLAG(c, flag, n) case c: do { flag = n; break; } while(0)
usr.sbin/rpc.bootparamd/bootparamd.c
72
int c;
usr.sbin/rpc.bootparamd/bootparamd.c
74
while ((c = getopt(argc, argv, "dsr:f:")) != -1)
usr.sbin/rpc.bootparamd/bootparamd.c
75
switch (c) {
usr.sbin/rpki-client/cert.c
1970
struct cert c;
usr.sbin/rpki-client/cert.c
1973
c.certid = id;
usr.sbin/rpki-client/cert.c
1974
a.cert = &c;
usr.sbin/rpki-client/filemode.c
433
struct crl *c;
usr.sbin/rpki-client/filemode.c
592
c = crl_get(&crls, a);
usr.sbin/rpki-client/filemode.c
594
if ((status = valid_x509(file, ctx, cert->x509, a, c, &errstr))) {
usr.sbin/rpki-client/http.c
279
const unsigned char *c = (const unsigned char *)c0;
usr.sbin/rpki-client/http.c
285
return (iscntrl(*c) || !isascii(*c) ||
usr.sbin/rpki-client/http.c
291
strchr(excluded_chars, *c) != NULL ||
usr.sbin/rpki-client/http.c
292
(*c == '%' && (!isxdigit(c[1]) || !isxdigit(c[2]))));
usr.sbin/rpki-client/http.c
339
unsigned char c, ret;
usr.sbin/rpki-client/http.c
341
c = str[0];
usr.sbin/rpki-client/http.c
342
ret = c;
usr.sbin/rpki-client/http.c
343
if (isalpha(c))
usr.sbin/rpki-client/http.c
344
ret -= isupper(c) ? 'A' - 10 : 'a' - 10;
usr.sbin/rpki-client/http.c
349
c = str[1];
usr.sbin/rpki-client/http.c
350
ret += c;
usr.sbin/rpki-client/http.c
351
if (isalpha(c))
usr.sbin/rpki-client/http.c
352
ret -= isupper(c) ? 'A' - 10 : 'a' - 10;
usr.sbin/rpki-client/http.c
361
char *ret, c;
usr.sbin/rpki-client/http.c
369
c = str[i];
usr.sbin/rpki-client/http.c
370
if (c == '+') {
usr.sbin/rpki-client/http.c
378
if (c == '%' && isxdigit((unsigned char)str[i + 1]) &&
usr.sbin/rpki-client/http.c
384
*ret = c;
usr.sbin/rpki-client/json.c
180
char c;
usr.sbin/rpki-client/json.c
183
c = ']';
usr.sbin/rpki-client/json.c
185
c = '}';
usr.sbin/rpki-client/json.c
191
eb = fprintf(jsonfh, "\n%.*s%c", level, indent, c) < 0;
usr.sbin/rpki-client/json.c
194
eb = fprintf(jsonfh, " %c", c) < 0;
usr.sbin/rpki-client/json.c
227
unsigned char c;
usr.sbin/rpki-client/json.c
233
while ((c = *v++) != '\0' && !eb) {
usr.sbin/rpki-client/json.c
235
switch (c) {
usr.sbin/rpki-client/json.c
258
if (iscntrl(c))
usr.sbin/rpki-client/json.c
259
eb = fprintf(jsonfh, "\\u00%02x", c) < 0;
usr.sbin/rpki-client/json.c
261
eb = putc(c, jsonfh) == EOF;
usr.sbin/rpki-client/main.c
1021
int rc, c, i, st, hangup = 0;
usr.sbin/rpki-client/main.c
1070
while ((c =
usr.sbin/rpki-client/main.c
1072
switch (c) {
usr.sbin/rpki-client/main.c
323
int c;
usr.sbin/rpki-client/main.c
330
c = (s->session_id != NULL);
usr.sbin/rpki-client/main.c
331
io_simple_buffer(b, &c, sizeof(c));
usr.sbin/rpki-client/main.c
333
if (c != 0)
usr.sbin/rpki-client/mft.c
108
const unsigned char *c;
usr.sbin/rpki-client/mft.c
113
c = memchr(fn, '.', len);
usr.sbin/rpki-client/mft.c
114
if (c == NULL || c != memrchr(fn, '.', len))
usr.sbin/rpki-client/ometric.c
293
unsigned char c;
usr.sbin/rpki-client/ometric.c
295
while ((c = *s++) != '\0') {
usr.sbin/rpki-client/ometric.c
296
switch (c) {
usr.sbin/rpki-client/ometric.c
310
if (putc(c, out) == EOF)
usr.sbin/rpki-client/parser.c
1025
c = (spl != NULL);
usr.sbin/rpki-client/parser.c
1026
io_simple_buffer(b, &c, sizeof(int));
usr.sbin/rpki-client/parser.c
886
int c;
usr.sbin/rpki-client/parser.c
932
c = (cert != NULL);
usr.sbin/rpki-client/parser.c
933
io_simple_buffer(b, &c, sizeof(int));
usr.sbin/rpki-client/parser.c
951
c = (mft != NULL);
usr.sbin/rpki-client/parser.c
952
io_simple_buffer(b, &c, sizeof(int));
usr.sbin/rpki-client/parser.c
984
c = (roa != NULL);
usr.sbin/rpki-client/parser.c
985
io_simple_buffer(b, &c, sizeof(int));
usr.sbin/rpki-client/parser.c
997
c = (aspa != NULL);
usr.sbin/rpki-client/parser.c
998
io_simple_buffer(b, &c, sizeof(int));
usr.sbin/rpki-client/print.c
453
mft_print(const struct cert *c, const struct mft *p)
usr.sbin/rpki-client/print.c
460
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
461
x509_print(c->x509);
usr.sbin/rpki-client/print.c
462
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
463
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
464
json_do_string("sia", c->signedobj);
usr.sbin/rpki-client/print.c
472
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
473
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
474
x509_print(c->x509);
usr.sbin/rpki-client/print.c
475
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
476
printf("Subject info access: %s\n", c->signedobj);
usr.sbin/rpki-client/print.c
512
roa_print(const struct cert *c, const struct roa *p)
usr.sbin/rpki-client/print.c
519
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
520
x509_print(c->x509);
usr.sbin/rpki-client/print.c
521
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
522
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
523
json_do_string("sia", c->signedobj);
usr.sbin/rpki-client/print.c
525
json_do_int("valid_since", c->notbefore);
usr.sbin/rpki-client/print.c
526
json_do_int("valid_until", c->notafter);
usr.sbin/rpki-client/print.c
530
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
531
x509_print(c->x509);
usr.sbin/rpki-client/print.c
532
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
533
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
534
printf("Subject info access: %s\n", c->signedobj);
usr.sbin/rpki-client/print.c
537
time2str(c->notbefore));
usr.sbin/rpki-client/print.c
538
printf("ROA not after: %s\n", time2str(c->notafter));
usr.sbin/rpki-client/print.c
565
spl_print(const struct cert *c, const struct spl *s)
usr.sbin/rpki-client/print.c
572
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
573
x509_print(c->x509);
usr.sbin/rpki-client/print.c
574
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
575
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
576
json_do_string("sia", c->signedobj);
usr.sbin/rpki-client/print.c
578
json_do_int("valid_since", c->notbefore);
usr.sbin/rpki-client/print.c
579
json_do_int("valid_until", c->notafter);
usr.sbin/rpki-client/print.c
584
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
585
x509_print(c->x509);
usr.sbin/rpki-client/print.c
586
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
587
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
588
printf("Subject info access: %s\n", c->signedobj);
usr.sbin/rpki-client/print.c
591
time2str(c->notbefore));
usr.sbin/rpki-client/print.c
592
printf("SPL not after: %s\n", time2str(c->notafter));
usr.sbin/rpki-client/print.c
616
rsc_print(const struct cert *c, const struct rsc *p)
usr.sbin/rpki-client/print.c
623
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
624
x509_print(c->x509);
usr.sbin/rpki-client/print.c
625
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
626
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
628
json_do_int("valid_since", c->notbefore);
usr.sbin/rpki-client/print.c
629
json_do_int("valid_until", c->notafter);
usr.sbin/rpki-client/print.c
631
json_do_int("expires", c->expires);
usr.sbin/rpki-client/print.c
634
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
635
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
636
x509_print(c->x509);
usr.sbin/rpki-client/print.c
637
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
640
time2str(c->notbefore));
usr.sbin/rpki-client/print.c
641
printf("RSC not after: %s\n", time2str(c->notafter));
usr.sbin/rpki-client/print.c
682
aspa_print(const struct cert *c, const struct aspa *p)
usr.sbin/rpki-client/print.c
688
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
689
x509_print(c->x509);
usr.sbin/rpki-client/print.c
690
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
691
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
692
json_do_string("sia", c->signedobj);
usr.sbin/rpki-client/print.c
694
json_do_int("valid_since", c->notbefore);
usr.sbin/rpki-client/print.c
695
json_do_int("valid_until", c->notafter);
usr.sbin/rpki-client/print.c
701
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
702
x509_print(c->x509);
usr.sbin/rpki-client/print.c
703
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
704
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
705
printf("Subject info access: %s\n", c->signedobj);
usr.sbin/rpki-client/print.c
708
time2str(c->notbefore));
usr.sbin/rpki-client/print.c
709
printf("ASPA not after: %s\n", time2str(c->notafter));
usr.sbin/rpki-client/print.c
770
tak_print(const struct cert *c, const struct tak *p)
usr.sbin/rpki-client/print.c
774
json_do_string("ski", c->ski);
usr.sbin/rpki-client/print.c
775
x509_print(c->x509);
usr.sbin/rpki-client/print.c
776
json_do_string("aki", c->aki);
usr.sbin/rpki-client/print.c
777
json_do_string("aia", c->aia);
usr.sbin/rpki-client/print.c
778
json_do_string("sia", c->signedobj);
usr.sbin/rpki-client/print.c
780
json_do_int("valid_since", c->notbefore);
usr.sbin/rpki-client/print.c
781
json_do_int("valid_until", c->notafter);
usr.sbin/rpki-client/print.c
786
printf("Subject key identifier: %s\n", pretty_key_id(c->ski));
usr.sbin/rpki-client/print.c
787
x509_print(c->x509);
usr.sbin/rpki-client/print.c
788
printf("Authority key identifier: %s\n", pretty_key_id(c->aki));
usr.sbin/rpki-client/print.c
789
printf("Authority info access: %s\n", c->aia);
usr.sbin/rpki-client/print.c
790
printf("Subject info access: %s\n", c->signedobj);
usr.sbin/rpki-client/print.c
793
time2str(c->notbefore));
usr.sbin/rpki-client/print.c
794
printf("TAK not after: %s\n", time2str(c->notafter));
usr.sbin/rpki-client/rsync.c
125
char c;
usr.sbin/rpki-client/rsync.c
127
while ((c = *destdir++) != '\0')
usr.sbin/rpki-client/rsync.c
128
if (c == '/')
usr.sbin/rpki-client/validate.c
227
const unsigned char *c;
usr.sbin/rpki-client/validate.c
233
for (c = fn, i = 0; i < len; i++, c++)
usr.sbin/rpki-client/validate.c
234
if (!isalnum(*c) && *c != '-' && *c != '_' && *c != '.')
usr.sbin/rpki-client/validate.c
38
int c;
usr.sbin/rpki-client/validate.c
44
c = as_check_covered(min, max, a->cert->ases, a->cert->num_ases);
usr.sbin/rpki-client/validate.c
45
if (c > 0)
usr.sbin/rpki-client/validate.c
47
else if (c < 0)
usr.sbin/rpki-client/validate.c
64
int c;
usr.sbin/rpki-client/validate.c
70
c = ip_addr_check_covered(afi, min, max, a->cert->ips,
usr.sbin/rpki-client/validate.c
72
if (c > 0)
usr.sbin/rpki-client/validate.c
74
else if (c < 0)
usr.sbin/sa/main.c
324
unsigned char c = ac.ac_comm[i];
usr.sbin/sa/main.c
326
if (!isascii(c) || iscntrl(c)) {
usr.sbin/sa/main.c
330
ci.ci_comm[i] = c;
usr.sbin/sa/pdb.c
324
double t, c;
usr.sbin/sa/pdb.c
327
c = cip->ci_calls ? cip->ci_calls : 1;
usr.sbin/sa/pdb.c
345
printf("%11.2fre ", cip->ci_etime / (double) (AHZ * c));
usr.sbin/sa/pdb.c
371
printf("%11.2fu ", cip->ci_utime / (double) (AHZ * c));
usr.sbin/sa/pdb.c
381
printf("%11.2fs ", cip->ci_stime / (double) (AHZ * c));
usr.sbin/sa/pdb.c
402
printf("%8.0favio ", cip->ci_io / c);
usr.sbin/slowcgi/slowcgi.c
1009
header->id = htons(c->id);
usr.sbin/slowcgi/slowcgi.c
1016
end_request->app_status = htonl(c->script_status);
usr.sbin/slowcgi/slowcgi.c
1024
slowcgi_add_response(c, resp);
usr.sbin/slowcgi/slowcgi.c
1028
script_in(int fd, struct event *ev, struct request *c, uint8_t type)
usr.sbin/slowcgi/slowcgi.c
1041
header->id = htons(c->id);
usr.sbin/slowcgi/slowcgi.c
1061
slowcgi_add_response(c, resp);
usr.sbin/slowcgi/slowcgi.c
1065
c->script_flags |= STDOUT_DONE;
usr.sbin/slowcgi/slowcgi.c
1067
c->script_flags |= STDERR_DONE;
usr.sbin/slowcgi/slowcgi.c
1069
if (c->script_flags == (STDOUT_DONE | STDERR_DONE |
usr.sbin/slowcgi/slowcgi.c
1071
create_end_record(c);
usr.sbin/slowcgi/slowcgi.c
1076
c->stdout_fd_closed = 1;
usr.sbin/slowcgi/slowcgi.c
1078
c->stderr_fd_closed = 1;
usr.sbin/slowcgi/slowcgi.c
1085
struct request *c = arg;
usr.sbin/slowcgi/slowcgi.c
1086
script_in(fd, &c->script_ev, c, FCGI_STDOUT);
usr.sbin/slowcgi/slowcgi.c
1092
struct request *c = arg;
usr.sbin/slowcgi/slowcgi.c
1093
script_in(fd, &c->script_err_ev, c, FCGI_STDERR);
usr.sbin/slowcgi/slowcgi.c
1099
struct request *c;
usr.sbin/slowcgi/slowcgi.c
1103
c = arg;
usr.sbin/slowcgi/slowcgi.c
1105
while ((node = TAILQ_FIRST(&c->stdin_head))) {
usr.sbin/slowcgi/slowcgi.c
1108
c->stdin_fd_closed = 1;
usr.sbin/slowcgi/slowcgi.c
1115
event_del(&c->script_stdin_ev);
usr.sbin/slowcgi/slowcgi.c
1121
TAILQ_REMOVE(&c->stdin_head, node, entry);
usr.sbin/slowcgi/slowcgi.c
1125
event_del(&c->script_stdin_ev);
usr.sbin/slowcgi/slowcgi.c
1129
cleanup_request(struct request *c)
usr.sbin/slowcgi/slowcgi.c
1135
evtimer_del(&c->tmo);
usr.sbin/slowcgi/slowcgi.c
1136
if (event_initialized(&c->ev))
usr.sbin/slowcgi/slowcgi.c
1137
event_del(&c->ev);
usr.sbin/slowcgi/slowcgi.c
1138
if (event_initialized(&c->resp_ev))
usr.sbin/slowcgi/slowcgi.c
1139
event_del(&c->resp_ev);
usr.sbin/slowcgi/slowcgi.c
1140
if (event_initialized(&c->script_ev)) {
usr.sbin/slowcgi/slowcgi.c
1141
if (!c->stdout_fd_closed)
usr.sbin/slowcgi/slowcgi.c
1142
close(EVENT_FD(&c->script_ev));
usr.sbin/slowcgi/slowcgi.c
1143
event_del(&c->script_ev);
usr.sbin/slowcgi/slowcgi.c
1145
if (event_initialized(&c->script_err_ev)) {
usr.sbin/slowcgi/slowcgi.c
1146
if (!c->stderr_fd_closed)
usr.sbin/slowcgi/slowcgi.c
1147
close(EVENT_FD(&c->script_err_ev));
usr.sbin/slowcgi/slowcgi.c
1148
event_del(&c->script_err_ev);
usr.sbin/slowcgi/slowcgi.c
1150
if (event_initialized(&c->script_stdin_ev)) {
usr.sbin/slowcgi/slowcgi.c
1151
if (!c->stdin_fd_closed)
usr.sbin/slowcgi/slowcgi.c
1152
close(EVENT_FD(&c->script_stdin_ev));
usr.sbin/slowcgi/slowcgi.c
1153
event_del(&c->script_stdin_ev);
usr.sbin/slowcgi/slowcgi.c
1155
close(c->fd);
usr.sbin/slowcgi/slowcgi.c
1156
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/slowcgi/slowcgi.c
1157
env_entry = SLIST_FIRST(&c->env);
usr.sbin/slowcgi/slowcgi.c
1158
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/slowcgi/slowcgi.c
1163
while ((resp = TAILQ_FIRST(&c->response_head))) {
usr.sbin/slowcgi/slowcgi.c
1164
TAILQ_REMOVE(&c->response_head, resp, entry);
usr.sbin/slowcgi/slowcgi.c
1167
while ((stdin_node = TAILQ_FIRST(&c->stdin_head))) {
usr.sbin/slowcgi/slowcgi.c
1168
TAILQ_REMOVE(&c->stdin_head, stdin_node, entry);
usr.sbin/slowcgi/slowcgi.c
1171
LIST_REMOVE(c, entry);
usr.sbin/slowcgi/slowcgi.c
1172
if (! c->inflight_fds_accounted)
usr.sbin/slowcgi/slowcgi.c
1174
free(c);
usr.sbin/slowcgi/slowcgi.c
275
int c, fd;
usr.sbin/slowcgi/slowcgi.c
286
for (c=0; c < 3; c++) {
usr.sbin/slowcgi/slowcgi.c
287
if (fstat(c, &sb) == -1) {
usr.sbin/slowcgi/slowcgi.c
289
if (dup2(fd, c) == -1)
usr.sbin/slowcgi/slowcgi.c
291
if (fd > c)
usr.sbin/slowcgi/slowcgi.c
298
while ((c = getopt(argc, argv, "dp:s:t:U:u:v")) != -1) {
usr.sbin/slowcgi/slowcgi.c
299
switch (c) {
usr.sbin/slowcgi/slowcgi.c
464
struct request *c;
usr.sbin/slowcgi/slowcgi.c
471
c = NULL;
usr.sbin/slowcgi/slowcgi.c
491
c = calloc(1, sizeof(*c));
usr.sbin/slowcgi/slowcgi.c
492
if (c == NULL) {
usr.sbin/slowcgi/slowcgi.c
498
c->fd = s;
usr.sbin/slowcgi/slowcgi.c
499
c->buf_pos = 0;
usr.sbin/slowcgi/slowcgi.c
500
c->buf_len = 0;
usr.sbin/slowcgi/slowcgi.c
501
c->request_started = 0;
usr.sbin/slowcgi/slowcgi.c
502
c->stdin_fd_closed = c->stdout_fd_closed = c->stderr_fd_closed = 0;
usr.sbin/slowcgi/slowcgi.c
503
c->inflight_fds_accounted = 0;
usr.sbin/slowcgi/slowcgi.c
504
TAILQ_INIT(&c->response_head);
usr.sbin/slowcgi/slowcgi.c
505
TAILQ_INIT(&c->stdin_head);
usr.sbin/slowcgi/slowcgi.c
507
event_set(&c->ev, s, EV_READ | EV_PERSIST, slowcgi_request, c);
usr.sbin/slowcgi/slowcgi.c
508
event_add(&c->ev, NULL);
usr.sbin/slowcgi/slowcgi.c
509
event_set(&c->resp_ev, s, EV_WRITE | EV_PERSIST, slowcgi_response, c);
usr.sbin/slowcgi/slowcgi.c
510
evtimer_set(&c->tmo, slowcgi_timeout, c);
usr.sbin/slowcgi/slowcgi.c
511
evtimer_add(&c->tmo, &timeout);
usr.sbin/slowcgi/slowcgi.c
512
LIST_INSERT_HEAD(&slowcgi_proc.requests, c, entry);
usr.sbin/slowcgi/slowcgi.c
524
struct request *c;
usr.sbin/slowcgi/slowcgi.c
534
LIST_FOREACH(c, &p->requests, entry)
usr.sbin/slowcgi/slowcgi.c
535
if (c->script_pid == pid)
usr.sbin/slowcgi/slowcgi.c
537
if (c == NULL) {
usr.sbin/slowcgi/slowcgi.c
543
c->script_status = WTERMSIG(status);
usr.sbin/slowcgi/slowcgi.c
545
c->script_status = WEXITSTATUS(status);
usr.sbin/slowcgi/slowcgi.c
547
if (c->script_flags == (STDOUT_DONE | STDERR_DONE))
usr.sbin/slowcgi/slowcgi.c
548
create_end_record(c);
usr.sbin/slowcgi/slowcgi.c
549
c->script_flags |= SCRIPT_DONE;
usr.sbin/slowcgi/slowcgi.c
551
ldebug("wait: %s", c->script_name);
usr.sbin/slowcgi/slowcgi.c
563
slowcgi_add_response(struct request *c, struct fcgi_response *resp)
usr.sbin/slowcgi/slowcgi.c
580
TAILQ_INSERT_TAIL(&c->response_head, resp, entry);
usr.sbin/slowcgi/slowcgi.c
581
event_add(&c->resp_ev, NULL);
usr.sbin/slowcgi/slowcgi.c
587
struct request *c;
usr.sbin/slowcgi/slowcgi.c
592
c = arg;
usr.sbin/slowcgi/slowcgi.c
594
while ((resp = TAILQ_FIRST(&c->response_head))) {
usr.sbin/slowcgi/slowcgi.c
603
cleanup_request(c);
usr.sbin/slowcgi/slowcgi.c
609
TAILQ_REMOVE(&c->response_head, resp, entry);
usr.sbin/slowcgi/slowcgi.c
614
if (TAILQ_EMPTY(&c->response_head)) {
usr.sbin/slowcgi/slowcgi.c
615
if (c->script_flags == (STDOUT_DONE | STDERR_DONE |
usr.sbin/slowcgi/slowcgi.c
617
cleanup_request(c);
usr.sbin/slowcgi/slowcgi.c
619
event_del(&c->resp_ev);
usr.sbin/slowcgi/slowcgi.c
626
struct request *c;
usr.sbin/slowcgi/slowcgi.c
629
c = arg;
usr.sbin/slowcgi/slowcgi.c
631
n = read(fd, c->buf + c->buf_pos + c->buf_len,
usr.sbin/slowcgi/slowcgi.c
632
FCGI_RECORD_SIZE - c->buf_pos-c->buf_len);
usr.sbin/slowcgi/slowcgi.c
652
c->buf_len += n;
usr.sbin/slowcgi/slowcgi.c
661
parsed = parse_record(c->buf + c->buf_pos, c->buf_len, c);
usr.sbin/slowcgi/slowcgi.c
664
c->buf_pos += parsed;
usr.sbin/slowcgi/slowcgi.c
665
c->buf_len -= parsed;
usr.sbin/slowcgi/slowcgi.c
666
} while (parsed > 0 && c->buf_len > 0);
usr.sbin/slowcgi/slowcgi.c
669
if (c->buf_len > 0) {
usr.sbin/slowcgi/slowcgi.c
670
bcopy(c->buf + c->buf_pos, c->buf, c->buf_len);
usr.sbin/slowcgi/slowcgi.c
671
c->buf_pos = 0;
usr.sbin/slowcgi/slowcgi.c
675
cleanup_request(c);
usr.sbin/slowcgi/slowcgi.c
679
parse_begin_request(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/slowcgi/slowcgi.c
682
if (c->request_started) {
usr.sbin/slowcgi/slowcgi.c
693
c->request_started = 1;
usr.sbin/slowcgi/slowcgi.c
695
c->id = id;
usr.sbin/slowcgi/slowcgi.c
696
SLIST_INIT(&c->env);
usr.sbin/slowcgi/slowcgi.c
697
c->env_count = 0;
usr.sbin/slowcgi/slowcgi.c
701
parse_params(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/slowcgi/slowcgi.c
706
if (!c->request_started) {
usr.sbin/slowcgi/slowcgi.c
711
if (c->id != id) {
usr.sbin/slowcgi/slowcgi.c
721
if (c->script_pid != 0) {
usr.sbin/slowcgi/slowcgi.c
725
exec_cgi(c);
usr.sbin/slowcgi/slowcgi.c
783
"SCRIPT_NAME") == 0 && c->script_name[0] == '\0') {
usr.sbin/slowcgi/slowcgi.c
784
bcopy(buf, c->script_name, val_len);
usr.sbin/slowcgi/slowcgi.c
785
c->script_name[val_len] = '\0';
usr.sbin/slowcgi/slowcgi.c
788
bcopy(buf, c->script_name, val_len);
usr.sbin/slowcgi/slowcgi.c
789
c->script_name[val_len] = '\0';
usr.sbin/slowcgi/slowcgi.c
797
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/slowcgi/slowcgi.c
798
ldebug("env[%d], %s", c->env_count, env_entry->val);
usr.sbin/slowcgi/slowcgi.c
799
c->env_count++;
usr.sbin/slowcgi/slowcgi.c
804
parse_stdin(uint8_t *buf, uint16_t n, struct request *c, uint16_t id)
usr.sbin/slowcgi/slowcgi.c
808
if (c->id != id) {
usr.sbin/slowcgi/slowcgi.c
822
TAILQ_INSERT_TAIL(&c->stdin_head, node, entry);
usr.sbin/slowcgi/slowcgi.c
824
if (event_initialized(&c->script_stdin_ev))
usr.sbin/slowcgi/slowcgi.c
825
event_add(&c->script_stdin_ev, NULL);
usr.sbin/slowcgi/slowcgi.c
829
parse_record(uint8_t *buf, size_t n, struct request *c)
usr.sbin/slowcgi/slowcgi.c
853
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/slowcgi/slowcgi.c
857
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/slowcgi/slowcgi.c
861
ntohs(h->content_len), c, ntohs(h->id));
usr.sbin/slowcgi/slowcgi.c
879
exec_cgi(struct request *c)
usr.sbin/slowcgi/slowcgi.c
897
c->inflight_fds_accounted = 1;
usr.sbin/slowcgi/slowcgi.c
898
ldebug("fork: %s", c->script_name);
usr.sbin/slowcgi/slowcgi.c
902
c->script_status = errno;
usr.sbin/slowcgi/slowcgi.c
914
c->stdin_fd_closed = c->stdout_fd_closed =
usr.sbin/slowcgi/slowcgi.c
915
c->stderr_fd_closed = 1;
usr.sbin/slowcgi/slowcgi.c
916
c->script_flags = (STDOUT_DONE | STDERR_DONE | SCRIPT_DONE);
usr.sbin/slowcgi/slowcgi.c
918
create_end_record(c);
usr.sbin/slowcgi/slowcgi.c
941
path = strrchr(c->script_name, '/');
usr.sbin/slowcgi/slowcgi.c
943
if (path != c->script_name) {
usr.sbin/slowcgi/slowcgi.c
945
if (chdir(c->script_name) == -1)
usr.sbin/slowcgi/slowcgi.c
947
c->script_name);
usr.sbin/slowcgi/slowcgi.c
954
argv[0] = c->script_name;
usr.sbin/slowcgi/slowcgi.c
956
if ((env = calloc(c->env_count + 1, sizeof(char*))) == NULL)
usr.sbin/slowcgi/slowcgi.c
958
SLIST_FOREACH(env_entry, &c->env, entry)
usr.sbin/slowcgi/slowcgi.c
961
execve(c->script_name, argv, env);
usr.sbin/slowcgi/slowcgi.c
962
lwarn("execve %s", c->script_name);
usr.sbin/slowcgi/slowcgi.c
983
c->script_pid = pid;
usr.sbin/slowcgi/slowcgi.c
984
event_set(&c->script_stdin_ev, s_in[0], EV_WRITE | EV_PERSIST,
usr.sbin/slowcgi/slowcgi.c
985
script_out, c);
usr.sbin/slowcgi/slowcgi.c
986
event_add(&c->script_stdin_ev, NULL);
usr.sbin/slowcgi/slowcgi.c
987
event_set(&c->script_ev, s_out[0], EV_READ | EV_PERSIST,
usr.sbin/slowcgi/slowcgi.c
988
script_std_in, c);
usr.sbin/slowcgi/slowcgi.c
989
event_add(&c->script_ev, NULL);
usr.sbin/slowcgi/slowcgi.c
990
event_set(&c->script_err_ev, s_err[0], EV_READ | EV_PERSIST,
usr.sbin/slowcgi/slowcgi.c
991
script_err_in, c);
usr.sbin/slowcgi/slowcgi.c
992
event_add(&c->script_err_ev, NULL);
usr.sbin/slowcgi/slowcgi.c
996
create_end_record(struct request *c)
usr.sbin/smtpd/control.c
100
if (c == NULL)
usr.sbin/smtpd/control.c
103
m_forward(&c->mproc, imsg);
usr.sbin/smtpd/control.c
107
c = tree_get(&ctl_conns, imsg->hdr.peerid);
usr.sbin/smtpd/control.c
108
if (c == NULL)
usr.sbin/smtpd/control.c
110
m_compose(&c->mproc, IMSG_CTL_OK, 0, 0, imsg_get_fd(imsg),
usr.sbin/smtpd/control.c
280
struct ctl_conn *c;
usr.sbin/smtpd/control.c
321
c = xcalloc(1, sizeof(*c));
usr.sbin/smtpd/control.c
322
c->euid = euid;
usr.sbin/smtpd/control.c
323
c->egid = egid;
usr.sbin/smtpd/control.c
324
c->id = connid;
usr.sbin/smtpd/control.c
325
c->mproc.proc = PROC_CLIENT;
usr.sbin/smtpd/control.c
326
c->mproc.handler = control_dispatch_ext;
usr.sbin/smtpd/control.c
327
c->mproc.data = c;
usr.sbin/smtpd/control.c
328
if ((c->mproc.name = strdup(proc_title(c->mproc.proc))) == NULL)
usr.sbin/smtpd/control.c
330
mproc_init(&c->mproc, connfd);
usr.sbin/smtpd/control.c
331
mproc_enable(&c->mproc);
usr.sbin/smtpd/control.c
332
tree_xset(&ctl_conns, c->id, c);
usr.sbin/smtpd/control.c
343
control_close(struct ctl_conn *c)
usr.sbin/smtpd/control.c
347
count = tree_xget(&ctl_count, c->euid);
usr.sbin/smtpd/control.c
350
tree_xpop(&ctl_count, c->euid);
usr.sbin/smtpd/control.c
353
tree_xpop(&ctl_conns, c->id);
usr.sbin/smtpd/control.c
354
mproc_clear(&c->mproc);
usr.sbin/smtpd/control.c
355
free(c);
usr.sbin/smtpd/control.c
415
struct ctl_conn *c;
usr.sbin/smtpd/control.c
424
c = p->data;
usr.sbin/smtpd/control.c
427
control_close(c);
usr.sbin/smtpd/control.c
443
m_compose(p_dispatcher, IMSG_CTL_SMTP_SESSION, c->id, 0, -1,
usr.sbin/smtpd/control.c
444
&c->euid, sizeof(c->euid));
usr.sbin/smtpd/control.c
448
if (c->euid)
usr.sbin/smtpd/control.c
455
if (c->euid)
usr.sbin/smtpd/control.c
468
if (c->euid)
usr.sbin/smtpd/control.c
483
if (c->euid)
usr.sbin/smtpd/control.c
499
if (c->euid)
usr.sbin/smtpd/control.c
515
if (c->euid)
usr.sbin/smtpd/control.c
530
if (c->euid)
usr.sbin/smtpd/control.c
545
if (c->euid)
usr.sbin/smtpd/control.c
548
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
553
if (c->euid)
usr.sbin/smtpd/control.c
567
if (c->euid)
usr.sbin/smtpd/control.c
581
if (c->euid)
usr.sbin/smtpd/control.c
595
if (c->euid)
usr.sbin/smtpd/control.c
598
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
603
if (c->euid)
usr.sbin/smtpd/control.c
617
if (c->euid)
usr.sbin/smtpd/control.c
631
if (c->euid)
usr.sbin/smtpd/control.c
645
if (c->euid)
usr.sbin/smtpd/control.c
653
if (c->euid)
usr.sbin/smtpd/control.c
655
m_compose(p_scheduler, IMSG_CTL_LIST_MESSAGES, c->id, 0, -1,
usr.sbin/smtpd/control.c
660
if (c->euid)
usr.sbin/smtpd/control.c
662
m_compose(p_scheduler, IMSG_CTL_LIST_ENVELOPES, c->id, 0, -1,
usr.sbin/smtpd/control.c
671
if (c->euid)
usr.sbin/smtpd/control.c
674
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
679
if (c->euid)
usr.sbin/smtpd/control.c
688
if (c->euid)
usr.sbin/smtpd/control.c
694
m_create(p_dispatcher, imsg->hdr.type, c->id, 0, -1);
usr.sbin/smtpd/control.c
701
if (c->euid)
usr.sbin/smtpd/control.c
704
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
709
if (c->euid)
usr.sbin/smtpd/control.c
712
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
717
if (c->euid)
usr.sbin/smtpd/control.c
725
imsg->hdr.peerid = c->id;
usr.sbin/smtpd/control.c
730
if (c->euid)
usr.sbin/smtpd/control.c
737
m_create(p_queue, imsg->hdr.type, c->id, 0, -1);
usr.sbin/smtpd/control.c
74
struct ctl_conn *c;
usr.sbin/smtpd/control.c
743
if (c->euid)
usr.sbin/smtpd/control.c
750
m_create(p_queue, imsg->hdr.type, c->id, 0, -1);
usr.sbin/smtpd/control.c
99
c = tree_get(&ctl_conns, imsg->hdr.peerid);
usr.sbin/smtpd/enqueue.c
89
#define WSP(c) (c == ' ' || c == '\t')
usr.sbin/smtpd/mproc.c
530
char c;
usr.sbin/smtpd/mproc.c
535
c = *m->pos++;
usr.sbin/smtpd/mproc.c
536
if (c == '\0') {
usr.sbin/smtpd/mproc.c
622
size_t c;
usr.sbin/smtpd/mproc.c
629
m_get_size(m, &c);
usr.sbin/smtpd/mproc.c
631
for (; c; c--) {
usr.sbin/smtpd/mta.c
1164
struct mta_connector *c;
usr.sbin/smtpd/mta.c
1175
c = mta_connector(relay, source);
usr.sbin/smtpd/mta.c
1176
if (c->flags & CONNECTOR_NEW) {
usr.sbin/smtpd/mta.c
1177
c->flags &= ~CONNECTOR_NEW;
usr.sbin/smtpd/mta.c
1180
mta_connect(c);
usr.sbin/smtpd/mta.c
1181
if ((c->flags & CONNECTOR_ERROR) == 0)
usr.sbin/smtpd/mta.c
1202
while (tree_iter(&relay->connectors, &iter, NULL, (void **)&c))
usr.sbin/smtpd/mta.c
1203
errmask |= c->flags;
usr.sbin/smtpd/mta.c
1226
mta_connect(struct mta_connector *c)
usr.sbin/smtpd/mta.c
1230
struct mta_limits *l = c->relay->limits;
usr.sbin/smtpd/mta.c
1235
if (mta_is_blocked(c->source, c->relay->domain->name))
usr.sbin/smtpd/mta.c
1236
c->flags |= CONNECTOR_ERROR_BLOCKED;
usr.sbin/smtpd/mta.c
1238
c->flags &= ~CONNECTOR_ERROR_BLOCKED;
usr.sbin/smtpd/mta.c
1242
log_debug("debug: mta: connecting with %s", mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1245
if (c->flags & CONNECTOR_ERROR) {
usr.sbin/smtpd/mta.c
1250
if (c->flags & CONNECTOR_WAIT) {
usr.sbin/smtpd/mta.c
1252
runq_cancel(runq_connector, c);
usr.sbin/smtpd/mta.c
1253
c->flags &= ~CONNECTOR_WAIT;
usr.sbin/smtpd/mta.c
1257
if (c->relay->ntask == 0) {
usr.sbin/smtpd/mta.c
1263
if ((c->relay->nconn_ready >= c->relay->ntask) ||
usr.sbin/smtpd/mta.c
1264
(c->relay->nconn > 2 && c->relay->nconn >= c->relay->ntask / 2)) {
usr.sbin/smtpd/mta.c
1272
if (c->relay->domain->lastconn + l->conndelay_domain > nextconn) {
usr.sbin/smtpd/mta.c
1274
c->relay->domain->name,
usr.sbin/smtpd/mta.c
1275
(unsigned long long) c->relay->domain->lastconn + l->conndelay_domain - now);
usr.sbin/smtpd/mta.c
1276
nextconn = c->relay->domain->lastconn + l->conndelay_domain;
usr.sbin/smtpd/mta.c
1278
if (c->relay->domain->nconn >= l->maxconn_per_domain) {
usr.sbin/smtpd/mta.c
1283
if (c->source->lastconn + l->conndelay_source > nextconn) {
usr.sbin/smtpd/mta.c
1285
mta_source_to_text(c->source),
usr.sbin/smtpd/mta.c
1286
(unsigned long long) c->source->lastconn + l->conndelay_source - now);
usr.sbin/smtpd/mta.c
1287
nextconn = c->source->lastconn + l->conndelay_source;
usr.sbin/smtpd/mta.c
1289
if (c->source->nconn >= l->maxconn_per_source) {
usr.sbin/smtpd/mta.c
1294
if (c->lastconn + l->conndelay_connector > nextconn) {
usr.sbin/smtpd/mta.c
1296
mta_connector_to_text(c),
usr.sbin/smtpd/mta.c
1297
(unsigned long long) c->lastconn + l->conndelay_connector - now);
usr.sbin/smtpd/mta.c
1298
nextconn = c->lastconn + l->conndelay_connector;
usr.sbin/smtpd/mta.c
1300
if (c->nconn >= l->maxconn_per_connector) {
usr.sbin/smtpd/mta.c
1305
if (c->relay->lastconn + l->conndelay_relay > nextconn) {
usr.sbin/smtpd/mta.c
1307
mta_relay_to_text(c->relay),
usr.sbin/smtpd/mta.c
1308
(unsigned long long) c->relay->lastconn + l->conndelay_relay - now);
usr.sbin/smtpd/mta.c
1309
nextconn = c->relay->lastconn + l->conndelay_relay;
usr.sbin/smtpd/mta.c
1311
if (c->relay->nconn >= l->maxconn_per_relay) {
usr.sbin/smtpd/mta.c
1318
route = mta_find_route(c, now, &limits, &nextconn, &mx);
usr.sbin/smtpd/mta.c
1325
if (c->flags & CONNECTOR_ERROR) {
usr.sbin/smtpd/mta.c
1328
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1333
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1338
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1341
mta_connector_to_text(c),
usr.sbin/smtpd/mta.c
1343
c->flags |= CONNECTOR_WAIT;
usr.sbin/smtpd/mta.c
1344
runq_schedule_at(runq_connector, nextconn, c);
usr.sbin/smtpd/mta.c
1351
c->nconn += 1;
usr.sbin/smtpd/mta.c
1352
c->lastconn = time(NULL);
usr.sbin/smtpd/mta.c
1354
c->relay->nconn += 1;
usr.sbin/smtpd/mta.c
1355
c->relay->lastconn = c->lastconn;
usr.sbin/smtpd/mta.c
1356
c->relay->domain->nconn += 1;
usr.sbin/smtpd/mta.c
1357
c->relay->domain->lastconn = c->lastconn;
usr.sbin/smtpd/mta.c
1359
route->lastconn = c->lastconn;
usr.sbin/smtpd/mta.c
1361
route->src->lastconn = c->lastconn;
usr.sbin/smtpd/mta.c
1363
route->dst->lastconn = c->lastconn;
usr.sbin/smtpd/mta.c
1365
mta_session(c->relay, route, mx->mxname); /* this never fails synchronously */
usr.sbin/smtpd/mta.c
1366
mta_relay_ref(c->relay);
usr.sbin/smtpd/mta.c
1534
struct mta_connector *c;
usr.sbin/smtpd/mta.c
1559
NULL, (void **)&c)) {
usr.sbin/smtpd/mta.c
1560
if (c->flags & CONNECTOR_ERROR_ROUTE)
usr.sbin/smtpd/mta.c
1593
mta_find_route(struct mta_connector *c, time_t now, int *limits,
usr.sbin/smtpd/mta.c
1597
struct mta_limits *l = c->relay->limits;
usr.sbin/smtpd/mta.c
1604
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1615
TAILQ_FOREACH(mx, &c->relay->domain->mxs, entry) {
usr.sbin/smtpd/mta.c
1639
if (c->relay->backuppref >= 0 &&
usr.sbin/smtpd/mta.c
1640
mx->preference >= c->relay->backuppref)
usr.sbin/smtpd/mta.c
1656
if ((c->source->sa &&
usr.sbin/smtpd/mta.c
1657
c->source->sa->sa_family != mx->host->sa->sa_family) ||
usr.sbin/smtpd/mta.c
1681
route = mta_route(c->source, mx->host);
usr.sbin/smtpd/mta.c
1749
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1750
c->flags |= CONNECTOR_ERROR_MX;
usr.sbin/smtpd/mta.c
1766
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1767
c->flags |= CONNECTOR_ERROR_FAMILY;
usr.sbin/smtpd/mta.c
1771
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
1773
c->flags |= CONNECTOR_ERROR_ROUTE_NET;
usr.sbin/smtpd/mta.c
1775
c->flags |= CONNECTOR_ERROR_ROUTE_SMTP;
usr.sbin/smtpd/mta.c
1881
struct mta_connector *c;
usr.sbin/smtpd/mta.c
1897
while ((tree_poproot(&relay->connectors, NULL, (void**)&c)))
usr.sbin/smtpd/mta.c
1898
mta_connector_free(c);
usr.sbin/smtpd/mta.c
2002
struct mta_connector *c;
usr.sbin/smtpd/mta.c
2042
while (tree_iter(&r->connectors, &iter, NULL, (void **)&c)) {
usr.sbin/smtpd/mta.c
2044
if (runq_pending(runq_connector, c, &to))
usr.sbin/smtpd/mta.c
2052
if (c->flags & (f)) { \
usr.sbin/smtpd/mta.c
2079
mta_source_to_text(c->source),
usr.sbin/smtpd/mta.c
2080
c->refcount,
usr.sbin/smtpd/mta.c
2081
c->nconn,
usr.sbin/smtpd/mta.c
2082
c->lastconn ? duration_to_text(t - c->lastconn) : "-",
usr.sbin/smtpd/mta.c
2381
struct mta_connector *c;
usr.sbin/smtpd/mta.c
2383
c = tree_get(&relay->connectors, (uintptr_t)(source));
usr.sbin/smtpd/mta.c
2384
if (c == NULL) {
usr.sbin/smtpd/mta.c
2385
c = xcalloc(1, sizeof(*c));
usr.sbin/smtpd/mta.c
2386
c->relay = relay;
usr.sbin/smtpd/mta.c
2387
c->source = source;
usr.sbin/smtpd/mta.c
2388
c->flags |= CONNECTOR_NEW;
usr.sbin/smtpd/mta.c
2390
tree_xset(&relay->connectors, (uintptr_t)(source), c);
usr.sbin/smtpd/mta.c
2392
log_debug("debug: mta: new %s", mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
2395
return (c);
usr.sbin/smtpd/mta.c
2399
mta_connector_free(struct mta_connector *c)
usr.sbin/smtpd/mta.c
2402
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
2404
if (c->flags & CONNECTOR_WAIT) {
usr.sbin/smtpd/mta.c
2406
mta_connector_to_text(c));
usr.sbin/smtpd/mta.c
2407
runq_cancel(runq_connector, c);
usr.sbin/smtpd/mta.c
2409
mta_source_unref(c->source); /* from constructor */
usr.sbin/smtpd/mta.c
2410
free(c);
usr.sbin/smtpd/mta.c
2416
mta_connector_to_text(struct mta_connector *c)
usr.sbin/smtpd/mta.c
2421
mta_source_to_text(c->source),
usr.sbin/smtpd/mta.c
2422
mta_relay_to_text(c->relay),
usr.sbin/smtpd/mta.c
2423
c->flags);
usr.sbin/smtpd/mta.c
573
struct mta_connector *c;
usr.sbin/smtpd/mta.c
578
c = mta_connector(relay, route->src);
usr.sbin/smtpd/mta.c
579
if (!(c->flags & CONNECTOR_ERROR_SOURCE))
usr.sbin/smtpd/mta.c
582
c->flags |= CONNECTOR_ERROR_SOURCE;
usr.sbin/smtpd/mta.c
602
struct mta_connector *c;
usr.sbin/smtpd/mta.c
613
c = mta_connector(relay, route->src);
usr.sbin/smtpd/mta.c
614
mta_connect(c);
usr.sbin/smtpd/mta.c
628
struct mta_connector *c;
usr.sbin/smtpd/mta.c
644
c = mta_connector(relay, route->src);
usr.sbin/smtpd/mta.c
645
c->nconn -= 1;
usr.sbin/smtpd/mta.c
646
mta_connect(c);
usr.sbin/smtpd/parse.y
2804
int c;
usr.sbin/smtpd/parse.y
2808
c = file->ungetbuf[--file->ungetpos];
usr.sbin/smtpd/parse.y
2810
c = getc(file->stream);
usr.sbin/smtpd/parse.y
2812
if (c == START_EXPAND)
usr.sbin/smtpd/parse.y
2814
else if (c == DONE_EXPAND)
usr.sbin/smtpd/parse.y
2819
return (c);
usr.sbin/smtpd/parse.y
2825
int c, next;
usr.sbin/smtpd/parse.y
2828
if ((c = igetc()) == EOF) {
usr.sbin/smtpd/parse.y
2835
return (c);
usr.sbin/smtpd/parse.y
2838
while ((c = igetc()) == '\\') {
usr.sbin/smtpd/parse.y
2841
c = next;
usr.sbin/smtpd/parse.y
2848
if (c == EOF) {
usr.sbin/smtpd/parse.y
2858
while (c == EOF) {
usr.sbin/smtpd/parse.y
2861
c = igetc();
usr.sbin/smtpd/parse.y
2864
return (c);
usr.sbin/smtpd/parse.y
2868
lungetc(int c)
usr.sbin/smtpd/parse.y
2870
if (c == EOF)
usr.sbin/smtpd/parse.y
2880
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/smtpd/parse.y
2886
int c;
usr.sbin/smtpd/parse.y
2890
c = lgetc(0);
usr.sbin/smtpd/parse.y
2891
if (c == '\n') {
usr.sbin/smtpd/parse.y
2895
if (c == EOF)
usr.sbin/smtpd/parse.y
2906
int quotec, next, c;
usr.sbin/smtpd/parse.y
2911
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/smtpd/parse.y
2915
if (c == '#')
usr.sbin/smtpd/parse.y
2916
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/smtpd/parse.y
2918
if (c == '$' && !expanding) {
usr.sbin/smtpd/parse.y
2920
if ((c = lgetc(0)) == EOF)
usr.sbin/smtpd/parse.y
2927
if (isalnum(c) || c == '_') {
usr.sbin/smtpd/parse.y
2928
*p++ = c;
usr.sbin/smtpd/parse.y
2932
lungetc(c);
usr.sbin/smtpd/parse.y
2950
switch (c) {
usr.sbin/smtpd/parse.y
2953
quotec = c;
usr.sbin/smtpd/parse.y
2955
if ((c = lgetc(quotec)) == EOF)
usr.sbin/smtpd/parse.y
2957
if (c == '\n') {
usr.sbin/smtpd/parse.y
2960
} else if (c == '\\') {
usr.sbin/smtpd/parse.y
2965
c = next;
usr.sbin/smtpd/parse.y
2971
} else if (c == quotec) {
usr.sbin/smtpd/parse.y
2974
} else if (c == '\0') {
usr.sbin/smtpd/parse.y
2982
*p++ = c;
usr.sbin/smtpd/parse.y
2993
if (c == '-' || isdigit(c)) {
usr.sbin/smtpd/parse.y
2995
*p++ = c;
usr.sbin/smtpd/parse.y
3000
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/smtpd/parse.y
3001
lungetc(c);
usr.sbin/smtpd/parse.y
3004
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/smtpd/parse.y
3020
c = (unsigned char)*--p;
usr.sbin/smtpd/parse.y
3021
if (c == '-')
usr.sbin/smtpd/parse.y
3022
return (c);
usr.sbin/smtpd/parse.y
3026
if (c == '=') {
usr.sbin/smtpd/parse.y
3027
if ((c = lgetc(0)) != EOF && c == '>')
usr.sbin/smtpd/parse.y
3029
lungetc(c);
usr.sbin/smtpd/parse.y
3030
c = '=';
usr.sbin/smtpd/parse.y
3039
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/smtpd/parse.y
3041
*p++ = c;
usr.sbin/smtpd/parse.y
3046
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/smtpd/parse.y
3047
lungetc(c);
usr.sbin/smtpd/parse.y
3054
if (c == '\n') {
usr.sbin/smtpd/parse.y
3058
if (c == EOF)
usr.sbin/smtpd/parse.y
3060
return (c);
usr.sbin/smtpd/smtpc.c
275
char *scheme, *creds, *host, *port, *p, *c;
usr.sbin/smtpd/smtpc.c
288
c = strrchr(p, '@');
usr.sbin/smtpd/smtpc.c
289
if (c) {
usr.sbin/smtpd/smtpc.c
291
*c = '\0';
usr.sbin/smtpd/smtpc.c
292
host = c + 1;
usr.sbin/smtpd/smtpd.c
149
struct child *c;
usr.sbin/smtpd/smtpd.c
223
while ((n = tree_iter(&children, &i, NULL, (void**)&c)))
usr.sbin/smtpd/smtpd.c
224
if (c->type == CHILD_MDA &&
usr.sbin/smtpd/smtpd.c
225
c->mda_id == reqid &&
usr.sbin/smtpd/smtpd.c
226
c->cause == NULL)
usr.sbin/smtpd/smtpd.c
234
c->cause = xstrdup(cause);
usr.sbin/smtpd/smtpd.c
236
c->pid, c->cause);
usr.sbin/smtpd/smtpd.c
237
kill(c->pid, SIGTERM);
usr.sbin/smtpd/smtpd.c
476
int c, i;
usr.sbin/smtpd/smtpd.c
497
while ((c = getopt(argc, argv, "B:dD:hnP:f:FT:vVx:")) != -1) {
usr.sbin/smtpd/smtpd.c
498
switch (c) {
usr.sbin/smtpd/srs.c
71
SHA_CTX c;
usr.sbin/smtpd/srs.c
74
SHA1_Init(&c);
usr.sbin/smtpd/srs.c
75
SHA1_Update(&c, key, strlen(key));
usr.sbin/smtpd/srs.c
76
SHA1_Update(&c, value, strlen(value));
usr.sbin/smtpd/srs.c
77
SHA1_Final(md, &c);
usr.sbin/smtpd/ssl.c
205
ssl_load_cafile(struct ca *c, const char *pathname)
usr.sbin/smtpd/ssl.c
207
c->ca_cert = ssl_load_file(pathname, &c->ca_cert_len, 0755);
usr.sbin/smtpd/ssl.c
208
if (c->ca_cert == NULL)
usr.sbin/smtpd/util.c
413
#define IS_ATEXT(c) (isalnum((unsigned char)(c)) || strchr(MAILADDR_ALLOWED, (c)))
usr.sbin/smtpd/util.c
436
char *c, domain[SMTPD_MAXDOMAINPARTSIZE];
usr.sbin/smtpd/util.c
449
c = strchr(domain, ']');
usr.sbin/smtpd/util.c
450
if (!c || c[1] != '\0')
usr.sbin/smtpd/util.c
453
*c = '\0';
usr.sbin/smtpd/util.c
476
#define LABELCHR(c) ((c) == '-' || (c) == '_' || isalpha((unsigned char)(c)) || isdigit((unsigned char)(c)))
usr.sbin/snmpd/mib.y
1111
int c, comment = 0;
usr.sbin/snmpd/mib.y
1115
while ((c = fgetc(file.stream)) != EOF) {
usr.sbin/snmpd/mib.y
1121
if (c == '"') {
usr.sbin/snmpd/mib.y
1127
if (c == '\n')
usr.sbin/snmpd/mib.y
1129
buf[i++] = c;
usr.sbin/snmpd/mib.y
1133
if (c == '-') {
usr.sbin/snmpd/mib.y
1136
} else if (c == '\n') {
usr.sbin/snmpd/mib.y
1143
if (c == '\n') {
usr.sbin/snmpd/mib.y
1152
ungetc(c, file.stream);
usr.sbin/snmpd/mib.y
1158
if (c == ' ' || c == '\t') {
usr.sbin/snmpd/mib.y
1163
if (c == '.' || c == ':') {
usr.sbin/snmpd/mib.y
1165
ungetc(c, file.stream);
usr.sbin/snmpd/mib.y
1170
if (c != '.' && c != ':' && c != '=') {
usr.sbin/snmpd/mib.y
1171
ungetc(c, file.stream);
usr.sbin/snmpd/mib.y
1175
if (c == ',' || c == ';' || c == '{' || c == '}' ||
usr.sbin/snmpd/mib.y
1176
c == '(' || c == ')' || c == '[' || c == ']' || c == '|') {
usr.sbin/snmpd/mib.y
1178
return c;
usr.sbin/snmpd/mib.y
1179
ungetc(c, file.stream);
usr.sbin/snmpd/mib.y
1182
buf[i++] = c;
usr.sbin/snmpd/parse.y
1361
int c;
usr.sbin/snmpd/parse.y
1365
c = file->ungetbuf[--file->ungetpos];
usr.sbin/snmpd/parse.y
1366
else c = getc(file->stream);
usr.sbin/snmpd/parse.y
1368
if (c == START_EXPAND)
usr.sbin/snmpd/parse.y
1370
else if (c == DONE_EXPAND)
usr.sbin/snmpd/parse.y
1375
return (c);
usr.sbin/snmpd/parse.y
1381
int c, next;
usr.sbin/snmpd/parse.y
1384
if ((c = igetc()) == EOF) {
usr.sbin/snmpd/parse.y
1390
return (c);
usr.sbin/snmpd/parse.y
1393
while ((c = igetc()) == '\\') {
usr.sbin/snmpd/parse.y
1396
c = next;
usr.sbin/snmpd/parse.y
1402
if (c == '\t' || c == ' ') {
usr.sbin/snmpd/parse.y
1405
c = getc(file->stream);
usr.sbin/snmpd/parse.y
1406
} while (c == '\t' || c == ' ');
usr.sbin/snmpd/parse.y
1407
ungetc(c, file->stream);
usr.sbin/snmpd/parse.y
1408
c = ' ';
usr.sbin/snmpd/parse.y
1411
if (c == EOF) {
usr.sbin/snmpd/parse.y
1421
while (c == EOF) {
usr.sbin/snmpd/parse.y
1424
c = igetc();
usr.sbin/snmpd/parse.y
1427
return (c);
usr.sbin/snmpd/parse.y
1431
lungetc(int c)
usr.sbin/snmpd/parse.y
1433
if (c == EOF)
usr.sbin/snmpd/parse.y
1443
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/snmpd/parse.y
1449
int c;
usr.sbin/snmpd/parse.y
1453
c = lgetc(0);
usr.sbin/snmpd/parse.y
1454
if (c == '\n') {
usr.sbin/snmpd/parse.y
1458
if (c == EOF)
usr.sbin/snmpd/parse.y
1469
int quotec, next, c;
usr.sbin/snmpd/parse.y
1474
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/snmpd/parse.y
1478
if (c == '#')
usr.sbin/snmpd/parse.y
1479
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/snmpd/parse.y
1481
if (c == '$' && !expanding) {
usr.sbin/snmpd/parse.y
1483
if ((c = lgetc(0)) == EOF)
usr.sbin/snmpd/parse.y
1490
if (isalnum(c) || c == '_') {
usr.sbin/snmpd/parse.y
1491
*p++ = c;
usr.sbin/snmpd/parse.y
1495
lungetc(c);
usr.sbin/snmpd/parse.y
1513
switch (c) {
usr.sbin/snmpd/parse.y
1516
quotec = c;
usr.sbin/snmpd/parse.y
1518
if ((c = lgetc(quotec)) == EOF)
usr.sbin/snmpd/parse.y
1520
if (c == '\n') {
usr.sbin/snmpd/parse.y
1523
} else if (c == '\\') {
usr.sbin/snmpd/parse.y
1528
c = next;
usr.sbin/snmpd/parse.y
1534
} else if (c == quotec) {
usr.sbin/snmpd/parse.y
1537
} else if (c == '\0') {
usr.sbin/snmpd/parse.y
1545
*p++ = c;
usr.sbin/snmpd/parse.y
1556
if (c == '-' || isdigit(c)) {
usr.sbin/snmpd/parse.y
1558
*p++ = c;
usr.sbin/snmpd/parse.y
1563
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/snmpd/parse.y
1564
lungetc(c);
usr.sbin/snmpd/parse.y
1567
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/snmpd/parse.y
1583
c = (unsigned char)*--p;
usr.sbin/snmpd/parse.y
1584
if (c == '-')
usr.sbin/snmpd/parse.y
1585
return (c);
usr.sbin/snmpd/parse.y
1595
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/snmpd/parse.y
1597
*p++ = c;
usr.sbin/snmpd/parse.y
1602
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/snmpd/parse.y
1603
lungetc(c);
usr.sbin/snmpd/parse.y
1610
if (c == '\n') {
usr.sbin/snmpd/parse.y
1614
if (c == EOF)
usr.sbin/snmpd/parse.y
1616
return (c);
usr.sbin/snmpd/snmpd.c
130
int c;
usr.sbin/snmpd/snmpd.c
147
while ((c = getopt(argc, argv, "dD:nNf:I:P:v")) != -1) {
usr.sbin/snmpd/snmpd.c
148
switch (c) {
usr.sbin/snmpd/usm.c
689
u_char *pw, *c;
usr.sbin/snmpd/usm.c
703
c = pwbuf;
usr.sbin/snmpd/usm.c
707
*c++ = *pw++;
usr.sbin/spamdb/spamdb.c
332
int i, ch, action = 0, type = WHITE, r = 0, c = 0;
usr.sbin/spamdb/spamdb.c
385
c++;
usr.sbin/spamdb/spamdb.c
388
if (c == 0)
usr.sbin/spamdb/spamdb.c
394
c++;
usr.sbin/spamdb/spamdb.c
397
if (c == 0)
usr.sbin/syslogd/syslogd.c
1711
int c, flags;
usr.sbin/syslogd/syslogd.c
1737
while (*p && (c = *p++) != '\n' &&
usr.sbin/syslogd/syslogd.c
1739
q = vis(q, c, VIS_NOSLASH, 0);
usr.sbin/syslogd/syslogd.c
3088
const CODE *c;
usr.sbin/syslogd/syslogd.c
3098
for (c = codetab; c->c_name; c++)
usr.sbin/syslogd/syslogd.c
3099
if (!strcmp(buf, c->c_name))
usr.sbin/syslogd/syslogd.c
3100
return (c->c_val);
usr.sbin/syslogd/syslogd.c
731
char c;
usr.sbin/syslogd/syslogd.c
744
read(lockpipe[0], &c, 1);
usr.sbin/tcpdump/parsenfsfh.c
78
#define make_uint32(msb,b,c,lsb)\
usr.sbin/tcpdump/parsenfsfh.c
79
((lsb) + ((c)<<8) + ((b)<<16) + ((msb)<<24))
usr.sbin/tcpdump/parsenfsfh.c
89
#define make_uint48(msb,b,c,d,e,lsb)\
usr.sbin/tcpdump/parsenfsfh.c
90
((lsb) + ((e)<<8) + ((d)<<16) + ((c)<<24) + ((b)<<32) + ((msb)<<40))
usr.sbin/tcpdump/parsenfsfh.c
93
#define make_uint48(msb,b,c,d,e,lsb)\
usr.sbin/tcpdump/parsenfsfh.c
94
((lsb) + ((e)<<8) + ((d)<<16) + ((c)<<24))
usr.sbin/tcpdump/print-atalk.c
259
char c;
usr.sbin/tcpdump/print-atalk.c
321
c = '[';
usr.sbin/tcpdump/print-atalk.c
323
printf("%cXO", c);
usr.sbin/tcpdump/print-atalk.c
324
c = ',';
usr.sbin/tcpdump/print-atalk.c
327
printf("%cEOM", c);
usr.sbin/tcpdump/print-atalk.c
328
c = ',';
usr.sbin/tcpdump/print-atalk.c
331
printf("%cSTS", c);
usr.sbin/tcpdump/print-atalk.c
332
c = ',';
usr.sbin/tcpdump/print-atalk.c
351
char c;
usr.sbin/tcpdump/print-atalk.c
360
c = '<';
usr.sbin/tcpdump/print-atalk.c
363
printf("%c%d", c, i);
usr.sbin/tcpdump/print-atalk.c
364
c = ',';
usr.sbin/tcpdump/print-bootp.c
267
u_char c;
usr.sbin/tcpdump/print-bootp.c
285
c = *cp++;
usr.sbin/tcpdump/print-bootp.c
300
c = *bp++;
usr.sbin/tcpdump/print-bootp.c
301
switch (c) {
usr.sbin/tcpdump/print-bootp.c
310
default: printf("%u", c); break;
usr.sbin/tcpdump/print-bootp.c
318
c = *bp++;
usr.sbin/tcpdump/print-bootp.c
319
cp = tok2str(tag2str, "?%d", c);
usr.sbin/tcpdump/print-bootp.c
330
if (c == '?') {
usr.sbin/tcpdump/print-bootp.c
333
c = 'b';
usr.sbin/tcpdump/print-bootp.c
335
c = 's';
usr.sbin/tcpdump/print-bootp.c
337
c = 'l';
usr.sbin/tcpdump/print-bootp.c
340
switch (c) {
usr.sbin/tcpdump/print-bootp.c
358
if (c == 'i')
usr.sbin/tcpdump/print-decnet.c
884
int c;
usr.sbin/tcpdump/print-decnet.c
888
c = (unsigned char)*dp++;
usr.sbin/tcpdump/print-decnet.c
889
if (isprint(c))
usr.sbin/tcpdump/print-decnet.c
890
putchar(c);
usr.sbin/tcpdump/print-decnet.c
892
printf("\\%o", c & 0xFF);
usr.sbin/tcpdump/print-krb.c
127
u_char c;
usr.sbin/tcpdump/print-krb.c
132
c = *s++;
usr.sbin/tcpdump/print-krb.c
133
if (c == '\0') {
usr.sbin/tcpdump/print-krb.c
137
if (!isascii(c)) {
usr.sbin/tcpdump/print-krb.c
138
c = toascii(c);
usr.sbin/tcpdump/print-krb.c
142
if (!isprint(c)) {
usr.sbin/tcpdump/print-krb.c
143
c ^= 0x40; /* DEL to ?, others to alpha */
usr.sbin/tcpdump/print-krb.c
146
putchar(c);
usr.sbin/tcpdump/print-mobile.c
112
u_int32_t c[2];
usr.sbin/tcpdump/print-mobile.c
114
u.c[0] = *(u_char *)p;
usr.sbin/tcpdump/print-mobile.c
115
u.c[1] = 0;
usr.sbin/tcpdump/print-tcp.c
672
int c;
usr.sbin/tcpdump/print-tcp.c
684
c = *sp++;
usr.sbin/tcpdump/print-tcp.c
685
safeputchar(c);
usr.sbin/tcpdump/print-vrrp.c
104
c = ' ';
usr.sbin/tcpdump/print-vrrp.c
108
printf("%c%s", c, ipaddr_string(bp));
usr.sbin/tcpdump/print-vrrp.c
109
c = ',';
usr.sbin/tcpdump/print-vrrp.c
95
char c;
usr.sbin/tcpdump/print-wb.c
178
char c;
usr.sbin/tcpdump/print-wb.c
204
c = '<';
usr.sbin/tcpdump/print-wb.c
207
c, ipaddr_string(&io->id), (u_int32_t)ntohl(io->off));
usr.sbin/tcpdump/print-wb.c
208
c = ',';
usr.sbin/tcpdump/print-wb.c
262
char c = '<';
usr.sbin/tcpdump/print-wb.c
270
printf("%c%s:%u", c, ipaddr_string(&io->id),
usr.sbin/tcpdump/print-wb.c
272
c = ',';
usr.sbin/tcpdump/smbutil.c
166
uchar c;
usr.sbin/tcpdump/smbutil.c
173
c = *p;
usr.sbin/tcpdump/smbutil.c
176
if ((c & 0xC0) == 0xC0)
usr.sbin/tcpdump/smbutil.c
216
unsigned char c;
usr.sbin/tcpdump/smbutil.c
221
c = *s;
usr.sbin/tcpdump/smbutil.c
222
if ((c & 0xC0) == 0xC0)
usr.sbin/tcpdump/tcpdump.c
582
int c;
usr.sbin/tcpdump/tcpdump.c
610
c = cp[i+j];
usr.sbin/tcpdump/tcpdump.c
611
c = isprint(c) ? c : '.';
usr.sbin/tcpdump/tcpdump.c
612
buf[0] = c;
usr.sbin/tcpdump/tcpdump.c
624
int c, i;
usr.sbin/tcpdump/tcpdump.c
628
c = cp[i];
usr.sbin/tcpdump/tcpdump.c
629
if (isprint(c) || c == '\t' || c == '\n' || c == '\r')
usr.sbin/tcpdump/tcpdump.c
630
putchar(c);
usr.sbin/tcpdump/util.c
103
if (!isprint(c)) {
usr.sbin/tcpdump/util.c
104
c ^= 0x40; /* DEL to ?, others to alpha */
usr.sbin/tcpdump/util.c
107
putchar(c);
usr.sbin/tcpdump/util.c
304
safeputchar(int c)
usr.sbin/tcpdump/util.c
306
c &= 0xff;
usr.sbin/tcpdump/util.c
307
if (c < 0x80 && isprint(c))
usr.sbin/tcpdump/util.c
308
putchar(c);
usr.sbin/tcpdump/util.c
310
printf("\\%03o", c);
usr.sbin/tcpdump/util.c
321
char c;
usr.sbin/tcpdump/util.c
336
for (; (c = *bits) > 32; bits++)
usr.sbin/tcpdump/util.c
337
putchar(c);
usr.sbin/tcpdump/util.c
57
u_char c;
usr.sbin/tcpdump/util.c
61
c = *s++;
usr.sbin/tcpdump/util.c
62
if (c == '\0') {
usr.sbin/tcpdump/util.c
66
if (!isascii(c)) {
usr.sbin/tcpdump/util.c
67
c = toascii(c);
usr.sbin/tcpdump/util.c
71
if (!isprint(c)) {
usr.sbin/tcpdump/util.c
72
c ^= 0x40; /* DEL to ?, others to alpha */
usr.sbin/tcpdump/util.c
75
putchar(c);
usr.sbin/tcpdump/util.c
89
u_char c;
usr.sbin/tcpdump/util.c
97
c = *s++;
usr.sbin/tcpdump/util.c
98
if (!isascii(c)) {
usr.sbin/tcpdump/util.c
99
c = toascii(c);
usr.sbin/tftp-proxy/tftp-proxy.c
214
int c;
usr.sbin/tftp-proxy/tftp-proxy.c
228
while ((c = getopt(argc, argv, "46a:dvl:p:w:")) != -1) {
usr.sbin/tftp-proxy/tftp-proxy.c
229
switch (c) {
usr.sbin/tftpd/tftpd.c
1088
fput_octet(struct tftp_client *client, int c)
usr.sbin/tftpd/tftpd.c
1090
return (putc(c, client->file));
usr.sbin/tftpd/tftpd.c
1096
int c = -1;
usr.sbin/tftpd/tftpd.c
1100
c = getc(client->file);
usr.sbin/tftpd/tftpd.c
1101
if (c == EOF)
usr.sbin/tftpd/tftpd.c
1104
if (c == '\n' || c == '\r') {
usr.sbin/tftpd/tftpd.c
1105
client->newline = c;
usr.sbin/tftpd/tftpd.c
1106
c = '\r';
usr.sbin/tftpd/tftpd.c
1111
c = '\n';
usr.sbin/tftpd/tftpd.c
1115
c = '\0';
usr.sbin/tftpd/tftpd.c
1119
return (c);
usr.sbin/tftpd/tftpd.c
1123
fput_netascii(struct tftp_client *client, int c)
usr.sbin/tftpd/tftpd.c
1128
if (c == '\0')
usr.sbin/tftpd/tftpd.c
1129
c = '\r';
usr.sbin/tftpd/tftpd.c
1131
} else if (c == '\r') {
usr.sbin/tftpd/tftpd.c
1132
client->newline = c;
usr.sbin/tftpd/tftpd.c
1133
return (c);
usr.sbin/tftpd/tftpd.c
1136
return (putc(c, client->file));
usr.sbin/tftpd/tftpd.c
1154
int c;
usr.sbin/tftpd/tftpd.c
1162
c = client->fgetc(client);
usr.sbin/tftpd/tftpd.c
1163
if (c == EOF) {
usr.sbin/tftpd/tftpd.c
1171
buf[i] = c;
usr.sbin/tftpd/tftpd.c
301
int c;
usr.sbin/tftpd/tftpd.c
312
while ((c = getopt(argc, argv, "46cdil:p:r:vw")) != -1) {
usr.sbin/tftpd/tftpd.c
313
switch (c) {
usr.sbin/tokenadm/tokenadm.c
109
while ((c = getopt(argc, argv, "BDERT1dem:r")) != -1)
usr.sbin/tokenadm/tokenadm.c
110
switch (c) {
usr.sbin/tokenadm/tokenadm.c
160
if ((c = token_mode(optarg+1)) == 0)
usr.sbin/tokenadm/tokenadm.c
162
dmode |= c;
usr.sbin/tokenadm/tokenadm.c
164
if ((c = token_mode(optarg)) == 0)
usr.sbin/tokenadm/tokenadm.c
166
emode |= c;
usr.sbin/tokenadm/tokenadm.c
72
int c, errors;
usr.sbin/tokeninit/tokeninit.c
101
while ((c = getopt(argc, argv, optstr)) != -1)
usr.sbin/tokeninit/tokeninit.c
102
switch (c) {
usr.sbin/tokeninit/tokeninit.c
112
if ((c = token_mode(optarg)))
usr.sbin/tokeninit/tokeninit.c
113
modes |= c;
usr.sbin/tokeninit/tokeninit.c
60
int c;
usr.sbin/unbound/cachedb/cachedb.c
350
uint16_t c = htons(qinfo->qclass);
usr.sbin/unbound/cachedb/cachedb.c
352
memmove(clear+clen+2, &c, 2);
usr.sbin/unbound/daemon/remote.c
2133
uint16_t t, uint16_t c, int remcachedb)
usr.sbin/unbound/daemon/remote.c
2137
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c, 0);
usr.sbin/unbound/daemon/remote.c
2139
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c,
usr.sbin/unbound/daemon/remote.c
2144
k.qclass = c;
usr.sbin/unbound/daemon/remote.c
244
comm_point_delete(p->c);
usr.sbin/unbound/daemon/remote.c
2609
char* c = sldns_wire2str_class(dclass);
usr.sbin/unbound/daemon/remote.c
2611
if(!ssl_printf(ssl, "%s %s %s ", buf, (c?c:"CLASS??"), str)) {
usr.sbin/unbound/daemon/remote.c
2612
free(c);
usr.sbin/unbound/daemon/remote.c
2615
free(c);
usr.sbin/unbound/daemon/remote.c
3078
char* c = sldns_wire2str_class(sub->s->s.qinfo.qclass);
usr.sbin/unbound/daemon/remote.c
3081
(c?c:"CLASS??"), nm);
usr.sbin/unbound/daemon/remote.c
3085
free(c);
usr.sbin/unbound/daemon/remote.c
3111
char* c = sldns_wire2str_class(m->s.qinfo.qclass);
usr.sbin/unbound/daemon/remote.c
3116
num, (t?t:"TYPE??"), (c?c:"CLASS??"), buf, timebuf,
usr.sbin/unbound/daemon/remote.c
3119
free(c);
usr.sbin/unbound/daemon/remote.c
3124
free(c);
usr.sbin/unbound/daemon/remote.c
3912
char* c = cmd;
usr.sbin/unbound/daemon/remote.c
3913
if(strchr(c, ' ') && strchr(c, '\t')) {
usr.sbin/unbound/daemon/remote.c
3914
if(strchr(c, ' ') < strchr(c, '\t'))
usr.sbin/unbound/daemon/remote.c
3915
*strchr(c, ' ')=0;
usr.sbin/unbound/daemon/remote.c
3916
else *strchr(c, '\t')=0;
usr.sbin/unbound/daemon/remote.c
3917
} else if(strchr(c, ' ')) {
usr.sbin/unbound/daemon/remote.c
3918
*strchr(c, ' ')=0;
usr.sbin/unbound/daemon/remote.c
3919
} else if(strchr(c, '\t')) {
usr.sbin/unbound/daemon/remote.c
3920
*strchr(c, '\t')=0;
usr.sbin/unbound/daemon/remote.c
3923
" have '%s'\n", c, p);
usr.sbin/unbound/daemon/remote.c
4223
WSAEventSelect(s->c->fd, NULL, 0);
usr.sbin/unbound/daemon/remote.c
4225
fd_set_block(s->c->fd);
usr.sbin/unbound/daemon/remote.c
4278
struct comm_point* c, int r, int r2)
usr.sbin/unbound/daemon/remote.c
4286
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/daemon/remote.c
4294
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/daemon/remote.c
4300
&s->c->repinfo.remote_addr, s->c->repinfo.remote_addrlen);
usr.sbin/unbound/daemon/remote.c
4307
int remote_control_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/daemon/remote.c
4326
return remote_handshake_later(rc, s, c, r, r2);
usr.sbin/unbound/daemon/remote.c
4357
res.fd = c->fd;
usr.sbin/unbound/daemon/remote.c
468
int remote_accept_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/daemon/remote.c
481
newfd = comm_point_perform_accept(c, &addr, &addrlen);
usr.sbin/unbound/daemon/remote.c
500
n->c = comm_point_create_raw(rc->worker->base, newfd, 0,
usr.sbin/unbound/daemon/remote.c
502
if(!n->c) {
usr.sbin/unbound/daemon/remote.c
508
n->c->do_not_close = 0;
usr.sbin/unbound/daemon/remote.c
509
comm_point_stop_listening(n->c);
usr.sbin/unbound/daemon/remote.c
510
comm_point_start_listening(n->c, -1, REMOTE_CONTROL_TCP_TIMEOUT);
usr.sbin/unbound/daemon/remote.c
511
memcpy(&n->c->repinfo.remote_addr, &addr, addrlen);
usr.sbin/unbound/daemon/remote.c
512
n->c->repinfo.remote_addrlen = addrlen;
usr.sbin/unbound/daemon/remote.c
518
comm_point_delete(n->c);
usr.sbin/unbound/daemon/remote.c
527
comm_point_delete(n->c);
usr.sbin/unbound/daemon/remote.c
542
(void)remote_control_callback(n->c, n, NETEVENT_NOERROR, NULL);
usr.sbin/unbound/daemon/remote.c
548
state_list_remove_elem(struct rc_state** list, struct comm_point* c)
usr.sbin/unbound/daemon/remote.c
551
if( (*list)->c == c) {
usr.sbin/unbound/daemon/remote.c
568
state_list_remove_elem(&rc->busy_list, s->c);
usr.sbin/unbound/daemon/remote.c
574
comm_point_delete(s->c);
usr.sbin/unbound/daemon/remote.c
8302
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c), void* arg,
usr.sbin/unbound/daemon/remote.c
8373
fr_printq_create(struct comm_point* c, struct worker* worker)
usr.sbin/unbound/daemon/remote.c
8384
printq->client_cp = c;
usr.sbin/unbound/daemon/remote.c
8531
state_list_remove_elem(&s->rc->busy_list, s->c);
usr.sbin/unbound/daemon/remote.c
8536
fd_set_nonblock(s->c->fd);
usr.sbin/unbound/daemon/remote.c
8537
worker->daemon->fast_reload_thread->printq = fr_printq_create(s->c,
usr.sbin/unbound/daemon/remote.h
372
int fast_reload_client_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/daemon/remote.h
71
struct comm_point* c;
usr.sbin/unbound/daemon/stats.c
538
void server_stats_insquery(struct ub_server_stats* stats, struct comm_point* c,
usr.sbin/unbound/daemon/stats.c
542
uint16_t flags = sldns_buffer_read_u16_at(c->buffer, 2);
usr.sbin/unbound/daemon/stats.c
549
stats->qopcode[ LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) ]++;
usr.sbin/unbound/daemon/stats.c
550
if(c->type != comm_udp) {
usr.sbin/unbound/daemon/stats.c
551
if(c->type != comm_doq)
usr.sbin/unbound/daemon/stats.c
553
if(c->ssl != NULL) {
usr.sbin/unbound/daemon/stats.c
556
if(SSL_session_reused(c->ssl))
usr.sbin/unbound/daemon/stats.c
559
if(c->type == comm_http)
usr.sbin/unbound/daemon/stats.c
562
else if(c->type == comm_doq)
usr.sbin/unbound/daemon/stats.h
118
void server_stats_insquery(struct ub_server_stats* stats, struct comm_point* c,
usr.sbin/unbound/daemon/unbound.c
763
int c;
usr.sbin/unbound/daemon/unbound.c
781
while( (c=getopt(argc, argv, "c:dhpvw:V")) != -1) {
usr.sbin/unbound/daemon/unbound.c
782
switch(c) {
usr.sbin/unbound/daemon/worker.c
1241
deny_refuse(struct comm_point* c, enum acl_access acl,
usr.sbin/unbound/daemon/worker.c
1251
log_buf(VERB_ALGO, "dropped", c->buffer);
usr.sbin/unbound/daemon/worker.c
1263
log_buf(VERB_ALGO, "refuse", c->buffer);
usr.sbin/unbound/daemon/worker.c
1268
worker_check_request(c->buffer, worker, check_result);
usr.sbin/unbound/daemon/worker.c
1271
query_error(c->buffer, check_result->value, 0);
usr.sbin/unbound/daemon/worker.c
1280
log_assert(sldns_buffer_limit(c->buffer) >= LDNS_HEADER_SIZE
usr.sbin/unbound/daemon/worker.c
1281
&& LDNS_QDCOUNT(sldns_buffer_begin(c->buffer)) == 1);
usr.sbin/unbound/daemon/worker.c
1283
sldns_buffer_set_position(c->buffer, LDNS_HEADER_SIZE); /* skip header */
usr.sbin/unbound/daemon/worker.c
1286
if(LDNS_ARCOUNT(sldns_buffer_begin(c->buffer)) != 1
usr.sbin/unbound/daemon/worker.c
1288
query_error(c->buffer, LDNS_RCODE_REFUSED, 0);
usr.sbin/unbound/daemon/worker.c
1292
if (!query_dname_len(c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1293
query_error(c->buffer, LDNS_RCODE_FORMERR, 0);
usr.sbin/unbound/daemon/worker.c
1297
if (sldns_buffer_remaining(c->buffer) < 2 * sizeof(uint16_t)) {
usr.sbin/unbound/daemon/worker.c
1298
query_error(c->buffer, LDNS_RCODE_FORMERR, 0);
usr.sbin/unbound/daemon/worker.c
1301
LDNS_QR_SET(sldns_buffer_begin(c->buffer));
usr.sbin/unbound/daemon/worker.c
1302
LDNS_RCODE_SET(sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1305
sldns_buffer_skip(c->buffer, (ssize_t)sizeof(uint16_t)); /* skip qtype */
usr.sbin/unbound/daemon/worker.c
1307
sldns_buffer_skip(c->buffer, (ssize_t)sizeof(uint16_t)); /* skip qclass */
usr.sbin/unbound/daemon/worker.c
1312
opt_rr_mark = sldns_buffer_position(c->buffer);
usr.sbin/unbound/daemon/worker.c
1315
if(LDNS_ANCOUNT(sldns_buffer_begin(c->buffer)) != 0 ||
usr.sbin/unbound/daemon/worker.c
1316
LDNS_NSCOUNT(sldns_buffer_begin(c->buffer)) != 0) {
usr.sbin/unbound/daemon/worker.c
1317
if(!skip_pkt_rrs(c->buffer,
usr.sbin/unbound/daemon/worker.c
1318
((int)LDNS_ANCOUNT(sldns_buffer_begin(c->buffer)))+
usr.sbin/unbound/daemon/worker.c
1319
((int)LDNS_NSCOUNT(sldns_buffer_begin(c->buffer))))) {
usr.sbin/unbound/daemon/worker.c
1320
query_error(c->buffer, LDNS_RCODE_FORMERR,
usr.sbin/unbound/daemon/worker.c
1328
if(sldns_buffer_remaining(c->buffer) < 1 || *sldns_buffer_current(c->buffer) != 0) {
usr.sbin/unbound/daemon/worker.c
1329
query_error(c->buffer, LDNS_RCODE_REFUSED,
usr.sbin/unbound/daemon/worker.c
1334
sldns_buffer_skip(c->buffer, 1); /* skip root label */
usr.sbin/unbound/daemon/worker.c
1336
if(sldns_buffer_remaining(c->buffer) < 2 ||
usr.sbin/unbound/daemon/worker.c
1337
sldns_buffer_read_u16(c->buffer) != LDNS_RR_TYPE_OPT) {
usr.sbin/unbound/daemon/worker.c
1338
query_error(c->buffer, LDNS_RCODE_REFUSED,
usr.sbin/unbound/daemon/worker.c
1346
LDNS_ANCOUNT_SET(sldns_buffer_begin(c->buffer), 0);
usr.sbin/unbound/daemon/worker.c
1347
LDNS_NSCOUNT_SET(sldns_buffer_begin(c->buffer), 0);
usr.sbin/unbound/daemon/worker.c
1348
sldns_buffer_clear(c->buffer); /* reset write limit */
usr.sbin/unbound/daemon/worker.c
1349
sldns_buffer_set_position(c->buffer, opt_rr_mark);
usr.sbin/unbound/daemon/worker.c
1356
if (sldns_buffer_available(c->buffer, 17) == 0) {
usr.sbin/unbound/daemon/worker.c
1357
LDNS_ARCOUNT_SET(sldns_buffer_begin(c->buffer), 0);
usr.sbin/unbound/daemon/worker.c
1358
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/daemon/worker.c
1362
LDNS_ARCOUNT_SET(sldns_buffer_begin(c->buffer), 1);
usr.sbin/unbound/daemon/worker.c
1365
sldns_buffer_write_u8(c->buffer, 0);
usr.sbin/unbound/daemon/worker.c
1366
sldns_buffer_write_u16(c->buffer, LDNS_RR_TYPE_OPT);
usr.sbin/unbound/daemon/worker.c
1367
sldns_buffer_write_u16(c->buffer, EDNS_ADVERTISED_SIZE);
usr.sbin/unbound/daemon/worker.c
1370
sldns_buffer_write_u32(c->buffer, 0);
usr.sbin/unbound/daemon/worker.c
1373
sldns_buffer_write_u16(c->buffer, 6);
usr.sbin/unbound/daemon/worker.c
1376
sldns_buffer_write_u16(c->buffer, LDNS_EDNS_EDE);
usr.sbin/unbound/daemon/worker.c
1379
sldns_buffer_write_u16(c->buffer, 2);
usr.sbin/unbound/daemon/worker.c
1382
sldns_buffer_write_u16(c->buffer, LDNS_EDE_PROHIBITED);
usr.sbin/unbound/daemon/worker.c
1384
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/daemon/worker.c
1396
deny_refuse_all(struct comm_point* c, enum acl_access* acl,
usr.sbin/unbound/daemon/worker.c
1409
if(!(*acladdr) && c->socket) {
usr.sbin/unbound/daemon/worker.c
1410
*acladdr = c->socket->acl;
usr.sbin/unbound/daemon/worker.c
1413
return deny_refuse(c, *acl, acl_deny, acl_refuse, worker, repinfo,
usr.sbin/unbound/daemon/worker.c
1418
deny_refuse_non_local(struct comm_point* c, enum acl_access acl,
usr.sbin/unbound/daemon/worker.c
1423
return deny_refuse(c, acl, acl_deny_non_local, acl_refuse_non_local,
usr.sbin/unbound/daemon/worker.c
1471
worker_handle_request(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/daemon/worker.c
1508
if (worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv)) {
usr.sbin/unbound/daemon/worker.c
1509
timeval_subtract(&wait_time, worker->env.now_tv, &c->recv_tv);
usr.sbin/unbound/daemon/worker.c
1527
if(c->dnscrypt && !repinfo->is_dnscrypted) {
usr.sbin/unbound/daemon/worker.c
1530
worker_check_request(c->buffer, worker, &check_result);
usr.sbin/unbound/daemon/worker.c
1537
query_error(c->buffer, check_result.value, 0);
usr.sbin/unbound/daemon/worker.c
1543
if(!query_info_parse(&qinfo, c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1552
query_error(c->buffer, LDNS_RCODE_FORMERR, 0);
usr.sbin/unbound/daemon/worker.c
1553
sldns_buffer_copy(c->dnscrypt_buffer, c->buffer);
usr.sbin/unbound/daemon/worker.c
1569
query_error(c->buffer, LDNS_RCODE_SERVFAIL,
usr.sbin/unbound/daemon/worker.c
1572
sldns_buffer_copy(c->dnscrypt_buffer, c->buffer);
usr.sbin/unbound/daemon/worker.c
1576
sldns_buffer_rewind(c->buffer);
usr.sbin/unbound/daemon/worker.c
1577
} else if(c->dnscrypt && repinfo->is_dnscrypted) {
usr.sbin/unbound/daemon/worker.c
1587
log_addr(VERB_ALGO, "to local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
usr.sbin/unbound/daemon/worker.c
1588
dt_msg_send_client_query(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer,
usr.sbin/unbound/daemon/worker.c
1589
((worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv))?&c->recv_tv:NULL));
usr.sbin/unbound/daemon/worker.c
1594
if((ret=deny_refuse_all(c, &acl, worker, repinfo, &acladdr,
usr.sbin/unbound/daemon/worker.c
1601
if((ret=deny_refuse_all(c, &acl, worker, repinfo, &acladdr,
usr.sbin/unbound/daemon/worker.c
1608
worker_check_request(c->buffer, worker, &check_result);
usr.sbin/unbound/daemon/worker.c
1613
query_error(c->buffer, check_result.value, 0);
usr.sbin/unbound/daemon/worker.c
1622
|| sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE
usr.sbin/unbound/daemon/worker.c
1623
|| LDNS_ARCOUNT(sldns_buffer_begin(c->buffer)) == 0;
usr.sbin/unbound/daemon/worker.c
1631
repinfo->client_addrlen, 0, c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1638
if(!query_info_parse(&qinfo, c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1647
query_error(c->buffer, LDNS_RCODE_FORMERR, 0);
usr.sbin/unbound/daemon/worker.c
1664
query_error(c->buffer, LDNS_RCODE_REFUSED, qinfo.qname_len);
usr.sbin/unbound/daemon/worker.c
1683
query_error(c->buffer, LDNS_RCODE_FORMERR, qinfo.qname_len);
usr.sbin/unbound/daemon/worker.c
1690
c->buffer, &edns, worker->env.cfg, c, repinfo,
usr.sbin/unbound/daemon/worker.c
1704
error_encode(c->buffer, ret, &qinfo,
usr.sbin/unbound/daemon/worker.c
1705
*(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1706
sldns_buffer_read_u16_at(c->buffer, 2), &reply_edns);
usr.sbin/unbound/daemon/worker.c
1723
extended_error_encode(c->buffer, EDNS_RCODE_BADVERS, &qinfo,
usr.sbin/unbound/daemon/worker.c
1724
*(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1725
sldns_buffer_read_u16_at(c->buffer, 2), 0, &edns);
usr.sbin/unbound/daemon/worker.c
1748
c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1763
else if(c->type != comm_udp)
usr.sbin/unbound/daemon/worker.c
1773
extended_error_encode(c->buffer,
usr.sbin/unbound/daemon/worker.c
1776
sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1777
sldns_buffer_read_u16_at(c->buffer, 2),
usr.sbin/unbound/daemon/worker.c
1795
error_encode(c->buffer,
usr.sbin/unbound/daemon/worker.c
1798
sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1799
sldns_buffer_read_u16_at(c->buffer, 2),
usr.sbin/unbound/daemon/worker.c
1806
c->type == comm_udp) {
usr.sbin/unbound/daemon/worker.c
1824
query_error(c->buffer, LDNS_RCODE_SERVFAIL, 0);
usr.sbin/unbound/daemon/worker.c
1825
LDNS_TC_SET(sldns_buffer_begin(c->buffer));
usr.sbin/unbound/daemon/worker.c
1830
server_stats_insquery(&worker->stats, c, qinfo.qtype,
usr.sbin/unbound/daemon/worker.c
1832
if(c->type != comm_udp)
usr.sbin/unbound/daemon/worker.c
1834
edns.udp_size = (c->dnscrypt && repinfo->is_dnscrypted)
usr.sbin/unbound/daemon/worker.c
1835
? sldns_buffer_capacity(c->buffer) - DNSCRYPT_REPLY_HEADER_SIZE
usr.sbin/unbound/daemon/worker.c
1841
&edns, repinfo, c->buffer)) {
usr.sbin/unbound/daemon/worker.c
1845
if(LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
usr.sbin/unbound/daemon/worker.c
1847
answer_notify(worker, &qinfo, &edns, c->buffer,
usr.sbin/unbound/daemon/worker.c
1853
&edns, c->buffer, worker->scratchpad, repinfo, acladdr->taglist,
usr.sbin/unbound/daemon/worker.c
1859
if(sldns_buffer_limit(c->buffer) == 0) {
usr.sbin/unbound/daemon/worker.c
1867
&worker->env, &qinfo, &edns, c->buffer, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
1871
if(sldns_buffer_limit(c->buffer) == 0) {
usr.sbin/unbound/daemon/worker.c
1879
&worker->env, &qinfo, &edns, repinfo, c->buffer,
usr.sbin/unbound/daemon/worker.c
1882
if(sldns_buffer_limit(c->buffer) == 0) {
usr.sbin/unbound/daemon/worker.c
1888
if(LDNS_RD_WIRE(sldns_buffer_begin(c->buffer)) &&
usr.sbin/unbound/daemon/worker.c
1890
LDNS_RA_SET(sldns_buffer_begin(c->buffer));
usr.sbin/unbound/daemon/worker.c
1896
if((ret=deny_refuse_non_local(c, acl, worker, repinfo, acladdr,
usr.sbin/unbound/daemon/worker.c
1907
if(!(LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) &&
usr.sbin/unbound/daemon/worker.c
1909
LDNS_RD_SET(sldns_buffer_begin(c->buffer));
usr.sbin/unbound/daemon/worker.c
1914
if(!(LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) &&
usr.sbin/unbound/daemon/worker.c
1929
error_encode(c->buffer, LDNS_RCODE_REFUSED, &qinfo,
usr.sbin/unbound/daemon/worker.c
1930
*(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1931
sldns_buffer_read_u16_at(c->buffer, 2), &edns);
usr.sbin/unbound/daemon/worker.c
1977
h = query_info_hash(lookup_qinfo, sldns_buffer_read_u16_at(c->buffer, 2));
usr.sbin/unbound/daemon/worker.c
1984
*(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
1985
sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
usr.sbin/unbound/daemon/worker.c
2002
sldns_buffer_read_u16_at(c->buffer, 2),
usr.sbin/unbound/daemon/worker.c
2044
if(!LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) {
usr.sbin/unbound/daemon/worker.c
2046
*(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
2047
sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
usr.sbin/unbound/daemon/worker.c
2056
sldns_buffer_rewind(c->buffer);
usr.sbin/unbound/daemon/worker.c
2060
if(c->type == comm_udp)
usr.sbin/unbound/daemon/worker.c
2069
sldns_buffer_read_u16_at(c->buffer, 2),
usr.sbin/unbound/daemon/worker.c
2070
&edns, repinfo, *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
usr.sbin/unbound/daemon/worker.c
2086
server_stats_insrcode(&worker->stats, c->buffer);
usr.sbin/unbound/daemon/worker.c
2095
log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
usr.sbin/unbound/daemon/worker.c
2097
dt_msg_send_client_response(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer);
usr.sbin/unbound/daemon/worker.c
2111
tv, 1, c->buffer,
usr.sbin/unbound/daemon/worker.c
2112
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
2113
c->type, c->ssl);
usr.sbin/unbound/daemon/worker.c
2117
tv, 1, c->buffer,
usr.sbin/unbound/daemon/worker.c
2118
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
2119
c->type, c->ssl);
usr.sbin/unbound/daemon/worker.c
2123
if(!dnsc_handle_uncurved_request(repinfo, c->buffer)) {
usr.sbin/unbound/daemon/worker.c
237
uint32_t c = (uint32_t)htonl(cmd);
usr.sbin/unbound/daemon/worker.c
238
if(!tube_write_msg(worker->cmd, (uint8_t*)&c, sizeof(c), 0)) {
usr.sbin/unbound/daemon/worker.c
244
worker_handle_service_reply(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/daemon/worker.c
258
if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE
usr.sbin/unbound/daemon/worker.c
259
|| !LDNS_QR_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/daemon/worker.c
260
|| LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) !=
usr.sbin/unbound/daemon/worker.c
2604
int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/daemon/worker.c
262
|| LDNS_QDCOUNT(sldns_buffer_begin(c->buffer)) > 1) {
usr.sbin/unbound/daemon/worker.c
425
uint8_t c = (uint8_t)worker->thread_num;
usr.sbin/unbound/daemon/worker.c
429
(void*)&c, 1, 0);
usr.sbin/unbound/daemon/worker.c
646
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
usr.sbin/unbound/daemon/worker.c
691
repinfo->c->buffer, 0, 1, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
697
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
usr.sbin/unbound/daemon/worker.c
702
server_stats_insrcode(&worker->stats, repinfo->c->buffer);
usr.sbin/unbound/daemon/worker.c
849
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
usr.sbin/unbound/daemon/worker.c
930
repinfo->c->buffer, timenow, 1, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
937
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
usr.sbin/unbound/daemon/worker.c
964
if(repinfo->c->tcp_req_info) {
usr.sbin/unbound/daemon/worker.c
966
repinfo->c->tcp_req_info->spool_buffer,
usr.sbin/unbound/daemon/worker.c
967
repinfo->c->buffer);
usr.sbin/unbound/dns64/dns64.c
232
char* c = ptr;
usr.sbin/unbound/dns64/dns64.c
236
*c = uitoa((unsigned int)(ipv4 % 256), c + 1);
usr.sbin/unbound/dns64/dns64.c
237
c += *c + 1;
usr.sbin/unbound/dns64/dns64.c
238
log_assert(c < ptr+nm_len);
usr.sbin/unbound/dns64/dns64.c
242
log_assert(c + sizeof(IPV4_PTR_SUFFIX) <= ptr+nm_len);
usr.sbin/unbound/dns64/dns64.c
243
memmove(c, IPV4_PTR_SUFFIX, sizeof(IPV4_PTR_SUFFIX));
usr.sbin/unbound/dns64/dns64.c
245
return c + sizeof(IPV4_PTR_SUFFIX) - ptr;
usr.sbin/unbound/dnscrypt/dnscrypt.c
750
int c = (int)*((const uint8_t *) cert + j);
usr.sbin/unbound/dnscrypt/dnscrypt.c
751
if (isprint(c) && c != '"' && c != '\\') {
usr.sbin/unbound/dnscrypt/dnscrypt.c
752
snprintf(rr + strlen(rr), rrlen - strlen(rr), "%c", c);
usr.sbin/unbound/dnscrypt/dnscrypt.c
754
snprintf(rr + strlen(rr), rrlen - strlen(rr), "\\%03d", c);
usr.sbin/unbound/dnscrypt/dnscrypt.c
806
size_t c;
usr.sbin/unbound/dnscrypt/dnscrypt.c
841
for(c = 0; c < env->signed_certs_count; c++) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
843
env->signed_certs[c].server_publickey,
usr.sbin/unbound/dnscrypt/dnscrypt.c
849
env->signed_certs[c].magic_query,
usr.sbin/unbound/dnscrypt/dnscrypt.c
850
sizeof env->signed_certs[c].magic_query);
usr.sbin/unbound/dnscrypt/dnscrypt.c
852
env->signed_certs[c].version_major,
usr.sbin/unbound/dnscrypt/dnscrypt.c
853
sizeof env->signed_certs[c].version_major
usr.sbin/unbound/dnscrypt/dnscrypt.c
901
struct comm_point* c = repinfo->c;
usr.sbin/unbound/dnscrypt/dnscrypt.c
904
if( !c->dnscrypt ) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
910
if ((repinfo->dnsc_cert = dnsc_find_cert(dnscenv, c->buffer)) != NULL) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
915
c->buffer) != 0){
usr.sbin/unbound/dnscrypt/dnscrypt.c
921
sldns_buffer_rewind(c->buffer);
usr.sbin/unbound/dnscrypt/dnscrypt.c
930
if(!repinfo->c->dnscrypt) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
933
sldns_buffer_copy(repinfo->c->dnscrypt_buffer, buffer);
usr.sbin/unbound/dnscrypt/dnscrypt.c
940
repinfo->c->dnscrypt_buffer,
usr.sbin/unbound/dnscrypt/dnscrypt.c
941
repinfo->c->type == comm_udp,
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1459
int c;
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1503
while( (c=getopt(argc, argv, "hcls:t:u:vx:y:z:")) != -1) {
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1504
switch(c) {
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1617
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1625
int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1633
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1641
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1702
int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/dnstap/unbound-dnstap-socket.c
1811
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/edns-subnet/addrtree.c
318
addrkey_t c = key1[n/KEYWIDTH] ^ key2[n/KEYWIDTH];
usr.sbin/unbound/edns-subnet/addrtree.c
319
return (int)(c >> ((KEYWIDTH-1)-(n%KEYWIDTH))) & 1;
usr.sbin/unbound/iterator/iter_fwd.c
111
forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
121
node->dclass = c;
usr.sbin/unbound/iterator/iter_fwd.c
143
fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
usr.sbin/unbound/iterator/iter_fwd.c
147
key.dclass = c;
usr.sbin/unbound/iterator/iter_fwd.c
155
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
usr.sbin/unbound/iterator/iter_fwd.c
157
return forwards_insert_data(fwd, c, dp->name, dp->namelen,
usr.sbin/unbound/iterator/iter_fwd.c
315
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
usr.sbin/unbound/iterator/iter_fwd.c
319
key.dclass = c;
usr.sbin/unbound/iterator/iter_fwd.c
567
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_fwd.c
573
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
577
if(!forwards_insert(fwd, c, dp)) {
usr.sbin/unbound/iterator/iter_fwd.c
587
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
593
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.c
604
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
609
if(fwd_zone_find(fwd, c, nm) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
613
if(!fwd_add_stub_hole(fwd, c, nm)) {
usr.sbin/unbound/iterator/iter_fwd.c
623
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.c
629
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.h
194
int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
207
void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
222
int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
234
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_hints.c
171
hints_insert(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_hints.c
183
dp->namelabs, c)) {
usr.sbin/unbound/iterator/iter_hints.c
322
uint16_t c = LDNS_RR_CLASS_IN;
usr.sbin/unbound/iterator/iter_hints.c
359
c = sldns_wirerr_get_class(rr, rr_len, dname_len);
usr.sbin/unbound/iterator/iter_hints.c
415
if(!hints_insert(hints, c, dp, 0)) {
usr.sbin/unbound/iterator/iter_hints.c
580
hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_hints.c
587
dp->name, dp->namelen, dp->namelabs, c)) != NULL) {
usr.sbin/unbound/iterator/iter_hints.c
591
if(!hints_insert(hints, c, dp, noprime)) {
usr.sbin/unbound/iterator/iter_hints.c
601
hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_hints.c
610
nm, len, labs, c))) {
usr.sbin/unbound/iterator/iter_hints.h
185
int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_hints.h
198
void hints_delete_stub(struct iter_hints* hints, uint16_t c,
usr.sbin/unbound/iterator/iter_utils.c
1366
uint16_t* c)
usr.sbin/unbound/iterator/iter_utils.c
1368
uint16_t c1 = *c, c2 = *c;
usr.sbin/unbound/iterator/iter_utils.c
1383
*c = c2;
usr.sbin/unbound/iterator/iter_utils.c
1385
*c = c1;
usr.sbin/unbound/iterator/iter_utils.c
1387
*c = c1;
usr.sbin/unbound/iterator/iter_utils.c
1388
else *c = c2;
usr.sbin/unbound/iterator/iter_utils.c
799
uint16_t t, uint16_t c)
usr.sbin/unbound/iterator/iter_utils.c
805
qinf.qclass = c;
usr.sbin/unbound/iterator/iter_utils.h
348
uint16_t* c);
usr.sbin/unbound/iterator/iterator.c
4086
uint16_t c = 0;
usr.sbin/unbound/iterator/iterator.c
4089
qstate->env->fwds, &c)) {
usr.sbin/unbound/iterator/iterator.c
4092
qstate->qinfo.qname, qstate->qinfo.qtype, c);
usr.sbin/unbound/iterator/iterator.c
4095
c, qstate, id, iq, INIT_REQUEST_STATE,
usr.sbin/unbound/iterator/iterator.c
4105
if(c == 0xffff)
usr.sbin/unbound/iterator/iterator.c
4107
else c++;
usr.sbin/unbound/iterator/iterator.c
4363
pkt = qstate->reply->c->buffer;
usr.sbin/unbound/libunbound/libworker.c
1080
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/libunbound/libworker.c
911
libworker_handle_service_reply(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/libunbound/libworker.c
922
if(!LDNS_QR_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/libunbound/libworker.c
923
|| LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) !=
usr.sbin/unbound/libunbound/libworker.c
925
|| LDNS_QDCOUNT(sldns_buffer_begin(c->buffer)) > 1) {
usr.sbin/unbound/libunbound/libworker.c
944
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/libunbound/libworker.c
952
int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/libunbound/libworker.c
960
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/libunbound/libworker.c
968
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/libunbound/worker.h
152
int worker_handle_request(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/libunbound/worker.h
156
int worker_handle_service_reply(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/libunbound/worker.h
84
int libworker_handle_service_reply(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/authzone.c
2119
auth_zones_cfg(struct auth_zones* az, struct config_auth* c)
usr.sbin/unbound/services/authzone.c
2125
if(c->isrpz) {
usr.sbin/unbound/services/authzone.c
2131
if(!(z=auth_zones_find_or_add_zone(az, c->name))) {
usr.sbin/unbound/services/authzone.c
2133
if(c->isrpz) {
usr.sbin/unbound/services/authzone.c
2138
if(c->masters || c->urls) {
usr.sbin/unbound/services/authzone.c
2142
if(c->isrpz) {
usr.sbin/unbound/services/authzone.c
2148
if(c->for_downstream)
usr.sbin/unbound/services/authzone.c
2154
if(!auth_zone_set_zonefile(z, c->zonefile)) {
usr.sbin/unbound/services/authzone.c
2159
if(c->isrpz) {
usr.sbin/unbound/services/authzone.c
2164
z->for_downstream = c->for_downstream;
usr.sbin/unbound/services/authzone.c
2165
z->for_upstream = c->for_upstream;
usr.sbin/unbound/services/authzone.c
2166
z->fallback_enabled = c->fallback_enabled;
usr.sbin/unbound/services/authzone.c
2167
z->zonemd_check = c->zonemd_check;
usr.sbin/unbound/services/authzone.c
2168
z->zonemd_reject_absence = c->zonemd_reject_absence;
usr.sbin/unbound/services/authzone.c
2169
if(c->isrpz && !z->rpz){
usr.sbin/unbound/services/authzone.c
2170
if(!(z->rpz = rpz_create(c))){
usr.sbin/unbound/services/authzone.c
2180
} else if(c->isrpz && z->rpz) {
usr.sbin/unbound/services/authzone.c
2181
if(!rpz_config(z->rpz, c)) {
usr.sbin/unbound/services/authzone.c
2191
if(c->isrpz) {
usr.sbin/unbound/services/authzone.c
2199
if(!xfer_set_masters(&x->task_probe->masters, c, 0)) {
usr.sbin/unbound/services/authzone.c
2204
if(!xfer_set_masters(&x->task_transfer->masters, c, 1)) {
usr.sbin/unbound/services/authzone.c
2305
struct auth_chunk* c, *cn;
usr.sbin/unbound/services/authzone.c
2306
c = at->chunks_first;
usr.sbin/unbound/services/authzone.c
2307
while(c) {
usr.sbin/unbound/services/authzone.c
2308
cn = c->next;
usr.sbin/unbound/services/authzone.c
2309
free(c->data);
usr.sbin/unbound/services/authzone.c
2310
free(c);
usr.sbin/unbound/services/authzone.c
2311
c = cn;
usr.sbin/unbound/services/authzone.c
4440
char c = (char)((*chunk)->data[*chunk_pos]);
usr.sbin/unbound/services/authzone.c
4448
sldns_buffer_write_u8(buf, (uint8_t)c);
usr.sbin/unbound/services/authzone.c
4449
if(c == '\n') {
usr.sbin/unbound/services/authzone.c
4473
char c = (char)sldns_buffer_read_u8_at(buf, i);
usr.sbin/unbound/services/authzone.c
4474
if(squote && c != '\'') continue;
usr.sbin/unbound/services/authzone.c
4475
if(dquote && c != '"') continue;
usr.sbin/unbound/services/authzone.c
4476
if(c == '"')
usr.sbin/unbound/services/authzone.c
4478
else if(c == '\'')
usr.sbin/unbound/services/authzone.c
4480
else if(c == '(')
usr.sbin/unbound/services/authzone.c
4482
else if(c == ')')
usr.sbin/unbound/services/authzone.c
4484
else if(c == ';') {
usr.sbin/unbound/services/authzone.c
4500
char c = (char)sldns_buffer_read_u8_at(buf, i);
usr.sbin/unbound/services/authzone.c
4501
if(squote && c != '\'') continue;
usr.sbin/unbound/services/authzone.c
4502
if(dquote && c != '"') continue;
usr.sbin/unbound/services/authzone.c
4503
if(c == '"')
usr.sbin/unbound/services/authzone.c
4505
else if(c == '\'')
usr.sbin/unbound/services/authzone.c
4507
else if(c == ';') {
usr.sbin/unbound/services/authzone.c
4522
char c = (char)sldns_buffer_read_u8_at(buf, i);
usr.sbin/unbound/services/authzone.c
4523
if(c == ';')
usr.sbin/unbound/services/authzone.c
4525
else if(c != ' ' && c != '\t' && c != '\r' && c != '\n')
usr.sbin/unbound/services/authzone.c
4616
char c = (char)sldns_buffer_read_u8_at(buf, i);
usr.sbin/unbound/services/authzone.c
4617
if(c == '\n' && i==end-1) {
usr.sbin/unbound/services/authzone.c
4622
if(c == '\n')
usr.sbin/unbound/services/authzone.c
6236
auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/authzone.c
6290
if(!check_xfer_packet(c->buffer, xfr, &gonextonfail, &transferdone)) {
usr.sbin/unbound/services/authzone.c
6295
if(!xfer_link_data(c->buffer, xfr)) {
usr.sbin/unbound/services/authzone.c
6311
c->tcp_is_reading = 1;
usr.sbin/unbound/services/authzone.c
6312
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/services/authzone.c
6313
comm_point_start_listening(c, -1, AUTH_TRANSFER_TIMEOUT);
usr.sbin/unbound/services/authzone.c
6319
auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/authzone.c
6344
if(repinfo) repinfo->c = NULL; /* signal cp deleted to
usr.sbin/unbound/services/authzone.c
6355
if(sldns_buffer_limit(c->buffer) > 0) {
usr.sbin/unbound/services/authzone.c
6357
(int)sldns_buffer_limit(c->buffer));
usr.sbin/unbound/services/authzone.c
6358
if(!xfer_link_data(c->buffer, xfr)) {
usr.sbin/unbound/services/authzone.c
6366
if(repinfo) repinfo->c = NULL; /* signal cp deleted to
usr.sbin/unbound/services/authzone.c
6377
c->tcp_is_reading = 1;
usr.sbin/unbound/services/authzone.c
6378
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/services/authzone.c
6379
comm_point_start_listening(c, -1, AUTH_TRANSFER_TIMEOUT);
usr.sbin/unbound/services/authzone.c
6569
auth_xfer_probe_udp_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/authzone.c
6584
repinfo->c = NULL;
usr.sbin/unbound/services/authzone.c
6591
if(check_packet_ok(c->buffer, LDNS_RR_TYPE_SOA, xfr,
usr.sbin/unbound/services/authzone.c
7377
xfer_set_masters(struct auth_master** list, struct config_auth* c,
usr.sbin/unbound/services/authzone.c
7387
for(p = c->urls; p; p = p->next) {
usr.sbin/unbound/services/authzone.c
7394
for(p = c->masters; p; p = p->next) {
usr.sbin/unbound/services/authzone.c
7404
for(p = c->allow_notify; p; p = p->next) {
usr.sbin/unbound/services/authzone.h
676
int xfer_set_masters(struct auth_master** list, struct config_auth* c,
usr.sbin/unbound/services/authzone.h
683
int auth_xfer_probe_udp_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/authzone.h
686
int auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/authzone.h
689
int auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err,
usr.sbin/unbound/services/listen_dnsport.c
1489
listen_cp_insert(struct comm_point* c, struct listen_dnsport* front)
usr.sbin/unbound/services/listen_dnsport.c
1495
item->com = c;
usr.sbin/unbound/services/listen_dnsport.c
2330
struct comm_point* c = req->cp;
usr.sbin/unbound/services/listen_dnsport.c
2343
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/services/listen_dnsport.c
2344
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo) ) {
usr.sbin/unbound/services/listen_dnsport.c
2351
c->tcp_is_reading = 0;
usr.sbin/unbound/services/listen_dnsport.c
2352
comm_point_stop_listening(c);
usr.sbin/unbound/services/listen_dnsport.c
2353
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
usr.sbin/unbound/services/listen_dnsport.c
2370
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2593
struct http2_stream* h2_stream = h2_session->c->h2_stream;
usr.sbin/unbound/services/listen_dnsport.c
2602
if(sldns_buffer_remaining(h2_session->c->buffer) == 0) {
usr.sbin/unbound/services/listen_dnsport.c
2613
rlen = sldns_buffer_remaining(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2653
sldns_buffer_current(h2_session->c->buffer),
usr.sbin/unbound/services/listen_dnsport.c
2654
sldns_buffer_remaining(h2_session->c->buffer));
usr.sbin/unbound/services/listen_dnsport.c
2772
if(h2_session->c->h2_stream) {
usr.sbin/unbound/services/listen_dnsport.c
2780
sldns_buffer_clear(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2781
if(sldns_buffer_remaining(h2_session->c->buffer) <
usr.sbin/unbound/services/listen_dnsport.c
2784
sldns_buffer_clear(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2790
sldns_buffer_write(h2_session->c->buffer,
usr.sbin/unbound/services/listen_dnsport.c
2800
sldns_buffer_flip(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2801
h2_session->c->h2_stream = h2_stream;
usr.sbin/unbound/services/listen_dnsport.c
2802
fptr_ok(fptr_whitelist_comm_point(h2_session->c->callback));
usr.sbin/unbound/services/listen_dnsport.c
2803
if((*h2_session->c->callback)(h2_session->c, h2_session->c->cb_arg,
usr.sbin/unbound/services/listen_dnsport.c
2804
NETEVENT_NOERROR, &h2_session->c->repinfo)) {
usr.sbin/unbound/services/listen_dnsport.c
2807
sldns_buffer_clear(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2808
h2_session->c->h2_stream = NULL;
usr.sbin/unbound/services/listen_dnsport.c
2890
sldns_buffer_clear(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2891
h2_session->c->h2_stream = NULL;
usr.sbin/unbound/services/listen_dnsport.c
2895
sldns_buffer_clear(h2_session->c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
2896
h2_session->c->h2_stream = NULL;
usr.sbin/unbound/services/listen_dnsport.c
2958
h2_session->c->http2_stream_max_qbuffer_size) {
usr.sbin/unbound/services/listen_dnsport.c
3085
size_t el = strlen(h2_session->c->http_endpoint);
usr.sbin/unbound/services/listen_dnsport.c
3088
if(valuelen < el || memcmp(h2_session->c->http_endpoint,
usr.sbin/unbound/services/listen_dnsport.c
3136
h2_session->c->http2_stream_max_qbuffer_size) {
usr.sbin/unbound/services/listen_dnsport.c
3169
} else if(len <= h2_session->c->http2_stream_max_qbuffer_size) {
usr.sbin/unbound/services/listen_dnsport.c
3543
doq_conn_create(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/services/listen_dnsport.c
3550
conn->doq_socket = c->doq_socket;
usr.sbin/unbound/services/listen_dnsport.c
3551
conn->table = c->doq_socket->table;
usr.sbin/unbound/services/listen_dnsport.c
3663
struct doq_conn* c = (struct doq_conn*)key1;
usr.sbin/unbound/services/listen_dnsport.c
3674
if(c->key.paddr.addrlen != d->key.paddr.addrlen) {
usr.sbin/unbound/services/listen_dnsport.c
3675
if(c->key.paddr.addrlen < d->key.paddr.addrlen)
usr.sbin/unbound/services/listen_dnsport.c
3679
if((r=memcmp(&c->key.paddr.addr, &d->key.paddr.addr,
usr.sbin/unbound/services/listen_dnsport.c
3680
c->key.paddr.addrlen))!=0)
usr.sbin/unbound/services/listen_dnsport.c
3682
if(c->key.paddr.localaddrlen != d->key.paddr.localaddrlen) {
usr.sbin/unbound/services/listen_dnsport.c
3683
if(c->key.paddr.localaddrlen < d->key.paddr.localaddrlen)
usr.sbin/unbound/services/listen_dnsport.c
3687
if((r=memcmp(&c->key.paddr.localaddr, &d->key.paddr.localaddr,
usr.sbin/unbound/services/listen_dnsport.c
3688
c->key.paddr.localaddrlen))!=0)
usr.sbin/unbound/services/listen_dnsport.c
3690
if(c->key.paddr.ifindex != d->key.paddr.ifindex) {
usr.sbin/unbound/services/listen_dnsport.c
3691
if(c->key.paddr.ifindex < d->key.paddr.ifindex)
usr.sbin/unbound/services/listen_dnsport.c
3695
if(c->key.dcidlen != d->key.dcidlen) {
usr.sbin/unbound/services/listen_dnsport.c
3696
if(c->key.dcidlen < d->key.dcidlen)
usr.sbin/unbound/services/listen_dnsport.c
3700
if((r=memcmp(c->key.dcid, d->key.dcid, c->key.dcidlen))!=0)
usr.sbin/unbound/services/listen_dnsport.c
3707
struct doq_conid* c = (struct doq_conid*)key1;
usr.sbin/unbound/services/listen_dnsport.c
3709
if(c->cidlen != d->cidlen) {
usr.sbin/unbound/services/listen_dnsport.c
3710
if(c->cidlen < d->cidlen)
usr.sbin/unbound/services/listen_dnsport.c
3714
return memcmp(c->cid, d->cid, c->cidlen);
usr.sbin/unbound/services/listen_dnsport.c
3730
struct doq_stream* c = (struct doq_stream*)key1;
usr.sbin/unbound/services/listen_dnsport.c
3732
if(c->stream_id != d->stream_id) {
usr.sbin/unbound/services/listen_dnsport.c
3733
if(c->stream_id < d->stream_id)
usr.sbin/unbound/services/listen_dnsport.c
4097
struct comm_point* c;
usr.sbin/unbound/services/listen_dnsport.c
4108
c = conn->doq_socket->cp;
usr.sbin/unbound/services/listen_dnsport.c
4113
if(stream->inlen > sldns_buffer_capacity(c->buffer)) {
usr.sbin/unbound/services/listen_dnsport.c
4117
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
4118
sldns_buffer_write(c->buffer, stream->in, stream->inlen);
usr.sbin/unbound/services/listen_dnsport.c
4119
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/services/listen_dnsport.c
4120
c->repinfo.c = c;
usr.sbin/unbound/services/listen_dnsport.c
4121
if(!doq_conn_key_store_repinfo(&conn->key, &c->repinfo)) {
usr.sbin/unbound/services/listen_dnsport.c
4126
c->repinfo.doq_streamid = stream->stream_id;
usr.sbin/unbound/services/listen_dnsport.c
4127
c->repinfo.doq_stream = stream;
usr.sbin/unbound/services/listen_dnsport.c
4129
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/services/listen_dnsport.c
4130
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo)) {
usr.sbin/unbound/services/listen_dnsport.c
4132
if(!doq_stream_send_reply(conn, stream, c->buffer)) {
usr.sbin/unbound/services/listen_dnsport.c
5213
doq_conn_start_closing_period(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/services/listen_dnsport.c
5239
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5243
&pi, sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5244
sldns_buffer_remaining(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5259
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
usr.sbin/unbound/services/listen_dnsport.c
5260
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5264
conn->close_pkt = memdup(sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5265
sldns_buffer_limit(c->doq_socket->pkt_buf));
usr.sbin/unbound/services/listen_dnsport.c
5270
conn->close_pkt_len = sldns_buffer_limit(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5277
doq_conn_send_close(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/services/listen_dnsport.c
5283
if(conn->close_pkt_len > sldns_buffer_capacity(c->doq_socket->pkt_buf))
usr.sbin/unbound/services/listen_dnsport.c
5285
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5286
sldns_buffer_write(c->doq_socket->pkt_buf, conn->close_pkt, conn->close_pkt_len);
usr.sbin/unbound/services/listen_dnsport.c
5287
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5289
doq_send_pkt(c, &conn->key.paddr, conn->close_ecn);
usr.sbin/unbound/services/listen_dnsport.c
5297
doq_conn_close_error(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/services/listen_dnsport.c
5307
if(!doq_conn_start_closing_period(c, conn))
usr.sbin/unbound/services/listen_dnsport.c
5320
if(!doq_conn_send_close(c, conn))
usr.sbin/unbound/services/listen_dnsport.c
5326
doq_conn_recv(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/services/listen_dnsport.c
5339
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5340
sldns_buffer_limit(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5405
if(!doq_conn_close_error(c, conn)) {
usr.sbin/unbound/services/listen_dnsport.c
5424
doq_conn_write_streams(struct comm_point* c, struct doq_conn* conn,
usr.sbin/unbound/services/listen_dnsport.c
5477
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5479
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5480
sldns_buffer_remaining(c->doq_socket->pkt_buf),
usr.sbin/unbound/services/listen_dnsport.c
5514
if(!doq_conn_close_error(c, conn)) {
usr.sbin/unbound/services/listen_dnsport.c
5531
if(!doq_conn_close_error(c, conn)) {
usr.sbin/unbound/services/listen_dnsport.c
5552
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
usr.sbin/unbound/services/listen_dnsport.c
5553
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/services/listen_dnsport.c
5554
doq_send_pkt(c, &conn->key.paddr, pi.ecn);
usr.sbin/unbound/services/listen_dnsport.c
5556
if(c->doq_socket->have_blocked_pkt)
usr.sbin/unbound/services/listen_dnsport.h
719
struct doq_conn* doq_conn_create(struct comm_point* c,
usr.sbin/unbound/services/listen_dnsport.h
775
int doq_conn_recv(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/services/listen_dnsport.h
780
int doq_conn_write_streams(struct comm_point* c, struct doq_conn* conn,
usr.sbin/unbound/services/listen_dnsport.h
784
int doq_conn_send_close(struct comm_point* c, struct doq_conn* conn);
usr.sbin/unbound/services/localzone.c
1171
int c = 0;
usr.sbin/unbound/services/localzone.c
1176
c++;
usr.sbin/unbound/services/localzone.c
1178
if(c) verbose(VERB_ALGO, "applied tags to %d local zones", c);
usr.sbin/unbound/services/localzone.c
1675
? (repinfo->c != NULL
usr.sbin/unbound/services/localzone.c
1676
? repinfo->c->type == comm_udp
usr.sbin/unbound/services/localzone.c
230
int labs, enum localzone_type t, uint16_t c)
usr.sbin/unbound/services/localzone.c
232
struct local_zone* z = local_zone_create(nm, len, labs, t, c);
usr.sbin/unbound/services/localzone.c
252
z = local_zones_find(zones, nm, len, labs, c);
usr.sbin/unbound/services/mesh.c
1097
if(rep->query_reply.c->use_h2)
usr.sbin/unbound/services/mesh.c
1172
find_in_subsub(struct mesh_state* m, struct mesh_state* tofind, size_t *c)
usr.sbin/unbound/services/mesh.c
1175
if((*c)++ > MESH_MAX_SUBSUB)
usr.sbin/unbound/services/mesh.c
1178
if(r->s == tofind || find_in_subsub(r->s, tofind, c))
usr.sbin/unbound/services/mesh.c
1422
return r->query_reply.c->type == comm_udp;
usr.sbin/unbound/services/mesh.c
1493
if(r->query_reply.c->use_h2) {
usr.sbin/unbound/services/mesh.c
1494
r->query_reply.c->h2_stream = r->h2_stream;
usr.sbin/unbound/services/mesh.c
1621
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
usr.sbin/unbound/services/mesh.c
1622
r->query_reply.c->type, r->query_reply.c->ssl);
usr.sbin/unbound/services/mesh.c
1742
struct mesh_cb* c;
usr.sbin/unbound/services/mesh.c
1794
if(r->query_reply.c->use_h2)
usr.sbin/unbound/services/mesh.c
1833
if(r->query_reply.c->use_h2) {
usr.sbin/unbound/services/mesh.c
1843
struct sldns_buffer* r_buffer = r->query_reply.c->buffer;
usr.sbin/unbound/services/mesh.c
1844
if(r->query_reply.c->tcp_req_info) {
usr.sbin/unbound/services/mesh.c
1845
r_buffer = r->query_reply.c->tcp_req_info->spool_buffer;
usr.sbin/unbound/services/mesh.c
1850
if(r->query_reply.c->tcp_req_info) {
usr.sbin/unbound/services/mesh.c
1851
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
usr.sbin/unbound/services/mesh.c
1894
while((c = mstate->cb_list) != NULL) {
usr.sbin/unbound/services/mesh.c
1897
if(!mstate->reply_list && mstate->cb_list && !c->next) {
usr.sbin/unbound/services/mesh.c
1902
mstate->cb_list = c->next;
usr.sbin/unbound/services/mesh.c
1906
mesh_do_callback(mstate, mstate->s.return_rcode, rep, c, &tv);
usr.sbin/unbound/services/mesh.c
2029
if(rep->c->use_h2)
usr.sbin/unbound/services/mesh.c
2030
r->h2_stream = rep->c->h2_stream;
usr.sbin/unbound/services/mesh.c
2032
if(rep->c->type != comm_doq)
usr.sbin/unbound/services/mesh.c
2399
if(n->query_reply.c == cp
usr.sbin/unbound/services/mesh.c
2474
struct mesh_cb* c;
usr.sbin/unbound/services/mesh.c
2588
if(r->query_reply.c->use_h2)
usr.sbin/unbound/services/mesh.c
2623
r_buffer = r->query_reply.c->buffer;
usr.sbin/unbound/services/mesh.c
2624
if(r->query_reply.c->tcp_req_info)
usr.sbin/unbound/services/mesh.c
2625
r_buffer = r->query_reply.c->tcp_req_info->spool_buffer;
usr.sbin/unbound/services/mesh.c
2628
if(r->query_reply.c->tcp_req_info)
usr.sbin/unbound/services/mesh.c
2629
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
usr.sbin/unbound/services/mesh.c
2663
while((c = mstate->cb_list) != NULL) {
usr.sbin/unbound/services/mesh.c
2666
if(!mstate->reply_list && mstate->cb_list && !c->next) {
usr.sbin/unbound/services/mesh.c
2671
mstate->cb_list = c->next;
usr.sbin/unbound/services/mesh.c
2675
mesh_do_callback(mstate, LDNS_RCODE_NOERROR, msg->rep, c, &tv);
usr.sbin/unbound/services/mesh.c
439
struct sldns_buffer* r_buffer = rep->c->buffer;
usr.sbin/unbound/services/mesh.c
441
if(rep->c->tcp_req_info) {
usr.sbin/unbound/services/mesh.c
442
r_buffer = rep->c->tcp_req_info->spool_buffer;
usr.sbin/unbound/services/mesh.c
465
if(!mesh_make_new_space(mesh, rep->c->buffer)) {
usr.sbin/unbound/services/mesh.c
468
if(rep->c->use_h2)
usr.sbin/unbound/services/mesh.c
469
http2_stream_remove_mesh_state(rep->c->h2_stream);
usr.sbin/unbound/services/mesh.c
470
else if(rep->c->type == comm_doq && rep->doq_stream)
usr.sbin/unbound/services/mesh.c
483
if(rep->c->use_h2)
usr.sbin/unbound/services/mesh.c
484
http2_stream_remove_mesh_state(rep->c->h2_stream);
usr.sbin/unbound/services/mesh.c
485
else if(rep->c->type == comm_doq && rep->doq_stream)
usr.sbin/unbound/services/mesh.c
551
if(rep->c->tcp_req_info) {
usr.sbin/unbound/services/mesh.c
552
if(!tcp_req_info_add_meshstate(rep->c->tcp_req_info, mesh, s)) {
usr.sbin/unbound/services/mesh.c
557
if(rep->c->use_h2) {
usr.sbin/unbound/services/mesh.c
558
http2_stream_add_meshstate(rep->c->h2_stream, mesh, s);
usr.sbin/unbound/services/mesh.c
559
} else if(rep->c->type == comm_doq && rep->doq_stream) {
usr.sbin/unbound/services/mesh.c
612
if(rep->c->use_h2)
usr.sbin/unbound/services/mesh.c
613
http2_stream_remove_mesh_state(rep->c->h2_stream);
usr.sbin/unbound/services/mesh.c
614
else if(rep->c->type == comm_doq && rep->doq_stream)
usr.sbin/unbound/services/outside_network.c
101
struct comm_point* c, struct comm_reply* rep);
usr.sbin/unbound/services/outside_network.c
1036
comm_point_stop_listening(reuse->pending->c);
usr.sbin/unbound/services/outside_network.c
1039
reuse->pending->c->fd, reuse->pending,
usr.sbin/unbound/services/outside_network.c
1109
pend->c->tcp_write_pkt == pend->query->pkt &&
usr.sbin/unbound/services/outside_network.c
1110
pend->c->tcp_write_pkt_len == pend->query->pkt_len) {
usr.sbin/unbound/services/outside_network.c
1119
buf, (int)pend->c->tcp_write_byte_count);
usr.sbin/unbound/services/outside_network.c
1121
pend->c->tcp_write_pkt = NULL;
usr.sbin/unbound/services/outside_network.c
1122
pend->c->tcp_write_pkt_len = 0;
usr.sbin/unbound/services/outside_network.c
1123
pend->c->tcp_write_and_read = 0;
usr.sbin/unbound/services/outside_network.c
1126
pend->c->tcp_is_reading = 1;
usr.sbin/unbound/services/outside_network.c
1251
if(pend->c->ssl) {
usr.sbin/unbound/services/outside_network.c
1253
SSL_shutdown(pend->c->ssl);
usr.sbin/unbound/services/outside_network.c
1254
SSL_free(pend->c->ssl);
usr.sbin/unbound/services/outside_network.c
1255
pend->c->ssl = NULL;
usr.sbin/unbound/services/outside_network.c
1258
comm_point_close(pend->c);
usr.sbin/unbound/services/outside_network.c
1327
comm_point_start_listening(pend_tcp->c, -1, tcp_reuse_timeout);
usr.sbin/unbound/services/outside_network.c
1335
sldns_buffer_clear(pend_tcp->c->buffer);
usr.sbin/unbound/services/outside_network.c
1336
pend_tcp->c->tcp_is_reading = 1;
usr.sbin/unbound/services/outside_network.c
1337
pend_tcp->c->tcp_byte_count = 0;
usr.sbin/unbound/services/outside_network.c
1338
comm_point_stop_listening(pend_tcp->c);
usr.sbin/unbound/services/outside_network.c
1339
comm_point_start_listening(pend_tcp->c, -1, tcp_reuse_timeout);
usr.sbin/unbound/services/outside_network.c
1343
outnet_tcp_cb(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.c
1352
if(pend->c->tcp_write_and_read) {
usr.sbin/unbound/services/outside_network.c
1369
log_assert(c == pend->c);
usr.sbin/unbound/services/outside_network.c
1370
log_assert(pend->query->pkt == pend->c->tcp_write_pkt);
usr.sbin/unbound/services/outside_network.c
1371
log_assert(pend->query->pkt_len == pend->c->tcp_write_pkt_len);
usr.sbin/unbound/services/outside_network.c
1372
pend->c->tcp_write_pkt = NULL;
usr.sbin/unbound/services/outside_network.c
1373
pend->c->tcp_write_pkt_len = 0;
usr.sbin/unbound/services/outside_network.c
1386
comm_point_stop_listening(pend->c);
usr.sbin/unbound/services/outside_network.c
1387
outnet_tcp_take_query_setup(pend->c->fd, pend,
usr.sbin/unbound/services/outside_network.c
1391
pend->c->tcp_write_and_read = 0;
usr.sbin/unbound/services/outside_network.c
1394
pend->c->tcp_is_reading = 1;
usr.sbin/unbound/services/outside_network.c
1395
comm_point_stop_listening(pend->c);
usr.sbin/unbound/services/outside_network.c
1405
if(sldns_buffer_limit(c->buffer) < sizeof(uint16_t)) {
usr.sbin/unbound/services/outside_network.c
1412
c->buffer));
usr.sbin/unbound/services/outside_network.c
1442
error, (int)sldns_buffer_limit(c->buffer));
usr.sbin/unbound/services/outside_network.c
1443
waiting_tcp_callback(w, c, error, reply_info);
usr.sbin/unbound/services/outside_network.c
1528
outnet_udp_cb(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.c
1540
if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
usr.sbin/unbound/services/outside_network.c
1547
key.id = (unsigned)LDNS_ID_WIRE(sldns_buffer_begin(c->buffer));
usr.sbin/unbound/services/outside_network.c
1559
log_buf(VERB_ALGO, "dropped message", c->buffer);
usr.sbin/unbound/services/outside_network.c
1576
log_buf(VERB_ALGO, "udp message", c->buffer);
usr.sbin/unbound/services/outside_network.c
1577
if(p->pc->cp != c) {
usr.sbin/unbound/services/outside_network.c
1688
outnet->tcp_conns[i]->c = comm_point_create_tcp_out(
usr.sbin/unbound/services/outside_network.c
1691
if(!outnet->tcp_conns[i]->c)
usr.sbin/unbound/services/outside_network.c
1972
comm_point_delete(outnet->tcp_conns[i]->c);
usr.sbin/unbound/services/outside_network.c
2578
comm_point_stop_listening(pend->c);
usr.sbin/unbound/services/outside_network.c
2580
outnet_tcp_take_query_setup(pend->c->fd, pend,
usr.sbin/unbound/services/outside_network.c
2783
if(pend_tcp->c->fd == -1) {
usr.sbin/unbound/services/outside_network.c
2797
if(pend_tcp->c->fd != -1 && sq->outnet->tcp_reuse.count <
usr.sbin/unbound/services/outside_network.c
3061
serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
usr.sbin/unbound/services/outside_network.c
3080
if(sq->outnet->use_caps_for_id && error == NETEVENT_NOERROR && c &&
usr.sbin/unbound/services/outside_network.c
3086
if(sldns_buffer_read_u16_at(c->buffer, 4) == 0 &&
usr.sbin/unbound/services/outside_network.c
3087
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/services/outside_network.c
3089
LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/services/outside_network.c
3094
log_buf(VERB_DETAIL, "for packet", c->buffer);
usr.sbin/unbound/services/outside_network.c
3096
c = NULL;
usr.sbin/unbound/services/outside_network.c
3097
} else if(sldns_buffer_read_u16_at(c->buffer, 4) > 0 &&
usr.sbin/unbound/services/outside_network.c
3098
!serviced_check_qname(c->buffer, sq->qbuf,
usr.sbin/unbound/services/outside_network.c
3103
log_buf(VERB_DETAIL, "for packet", c->buffer);
usr.sbin/unbound/services/outside_network.c
3106
pkt_dname_tolower(c->buffer,
usr.sbin/unbound/services/outside_network.c
3107
sldns_buffer_at(c->buffer, 12));
usr.sbin/unbound/services/outside_network.c
3111
pkt_dname_tolower(c->buffer,
usr.sbin/unbound/services/outside_network.c
3112
sldns_buffer_at(c->buffer, 12));
usr.sbin/unbound/services/outside_network.c
3115
if(dobackup && c) {
usr.sbin/unbound/services/outside_network.c
3120
backlen = sldns_buffer_limit(c->buffer);
usr.sbin/unbound/services/outside_network.c
3122
sldns_buffer_begin(c->buffer), backlen);
usr.sbin/unbound/services/outside_network.c
3126
c = NULL;
usr.sbin/unbound/services/outside_network.c
3133
if(dobackup && c) {
usr.sbin/unbound/services/outside_network.c
3134
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/services/outside_network.c
3135
sldns_buffer_write(c->buffer, backup_p, backlen);
usr.sbin/unbound/services/outside_network.c
3136
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/services/outside_network.c
3139
(void)(*p->cb)(c, p->cb_arg, error, rep);
usr.sbin/unbound/services/outside_network.c
3150
serviced_tcp_callback(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.c
3181
&pi->addr, c->type, c->ssl, sq->zone, sq->zonelen, sq->qbuf,
usr.sbin/unbound/services/outside_network.c
3183
c->buffer);
usr.sbin/unbound/services/outside_network.c
3187
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
usr.sbin/unbound/services/outside_network.c
3189
c->buffer)) == LDNS_RCODE_NOTIMPL) ) {
usr.sbin/unbound/services/outside_network.c
3192
serviced_tcp_initiate(sq, c->buffer);
usr.sbin/unbound/services/outside_network.c
3196
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
usr.sbin/unbound/services/outside_network.c
3198
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NXDOMAIN
usr.sbin/unbound/services/outside_network.c
3199
|| LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/services/outside_network.c
3240
r2.c = c;
usr.sbin/unbound/services/outside_network.c
3244
serviced_callbacks(sq, error, c, rep);
usr.sbin/unbound/services/outside_network.c
3338
serviced_udp_callback(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.c
3356
if(!serviced_udp_send(sq, c->buffer)) {
usr.sbin/unbound/services/outside_network.c
3357
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
usr.sbin/unbound/services/outside_network.c
3373
if(!serviced_udp_send(sq, c->buffer)) {
usr.sbin/unbound/services/outside_network.c
3374
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
usr.sbin/unbound/services/outside_network.c
3381
serviced_callbacks(sq, error, c, rep);
usr.sbin/unbound/services/outside_network.c
3395
&p->pc->pif->addr, c->type, c->ssl, sq->zone, sq->zonelen,
usr.sbin/unbound/services/outside_network.c
3397
sq->outnet->now_tv, c->buffer);
usr.sbin/unbound/services/outside_network.c
3402
&& (LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer))
usr.sbin/unbound/services/outside_network.c
3404
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOTIMPL
usr.sbin/unbound/services/outside_network.c
3405
|| packet_edns_malformed(c->buffer, sq->qtype)
usr.sbin/unbound/services/outside_network.c
3411
if(!serviced_udp_send(sq, c->buffer)) {
usr.sbin/unbound/services/outside_network.c
3412
serviced_callbacks(sq, NETEVENT_CLOSED, c, rep);
usr.sbin/unbound/services/outside_network.c
3427
sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOERROR ||
usr.sbin/unbound/services/outside_network.c
3428
LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
usr.sbin/unbound/services/outside_network.c
3430
c->buffer)) == LDNS_RCODE_YXDOMAIN)) {
usr.sbin/unbound/services/outside_network.c
3467
if(LDNS_TC_WIRE(sldns_buffer_begin(c->buffer))) {
usr.sbin/unbound/services/outside_network.c
3476
serviced_tcp_initiate(sq, c->buffer);
usr.sbin/unbound/services/outside_network.c
3480
serviced_callbacks(sq, error, c, rep);
usr.sbin/unbound/services/outside_network.c
390
if(!reuse || !reuse->pending || !reuse->pending->c)
usr.sbin/unbound/services/outside_network.c
395
reuse->pending->c->fd);
usr.sbin/unbound/services/outside_network.c
3988
s += comm_point_get_mem(outnet->tcp_conns[i]->c);
usr.sbin/unbound/services/outside_network.c
552
struct comm_point c;
usr.sbin/unbound/services/outside_network.c
557
memset(&c, 0, sizeof(c));
usr.sbin/unbound/services/outside_network.c
559
key_p.c = &c;
usr.sbin/unbound/services/outside_network.c
641
pend->c->tcp_write_pkt = w->pkt;
usr.sbin/unbound/services/outside_network.c
642
pend->c->tcp_write_pkt_len = w->pkt_len;
usr.sbin/unbound/services/outside_network.c
643
pend->c->tcp_write_and_read = 1;
usr.sbin/unbound/services/outside_network.c
644
pend->c->tcp_write_byte_count = 0;
usr.sbin/unbound/services/outside_network.c
645
pend->c->tcp_is_reading = 0;
usr.sbin/unbound/services/outside_network.c
646
comm_point_start_listening(pend->c, s, -1);
usr.sbin/unbound/services/outside_network.c
671
pend->c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/services/outside_network.c
672
pend->c->tcp_do_close = 0;
usr.sbin/unbound/services/outside_network.c
717
pend->c->tcp_do_fastopen = 1;
usr.sbin/unbound/services/outside_network.c
754
pend->c->ssl = outgoing_ssl_fd(w->outnet->sslctx, s);
usr.sbin/unbound/services/outside_network.c
755
if(!pend->c->ssl) {
usr.sbin/unbound/services/outside_network.c
756
pend->c->fd = s;
usr.sbin/unbound/services/outside_network.c
757
comm_point_close(pend->c);
usr.sbin/unbound/services/outside_network.c
763
comm_point_tcp_win_bio_cb(pend->c, pend->c->ssl);
usr.sbin/unbound/services/outside_network.c
765
pend->c->ssl_shake_state = comm_ssl_shake_write;
usr.sbin/unbound/services/outside_network.c
772
pend->c->fd = s;
usr.sbin/unbound/services/outside_network.c
774
SSL_free(pend->c->ssl);
usr.sbin/unbound/services/outside_network.c
776
pend->c->ssl = NULL;
usr.sbin/unbound/services/outside_network.c
777
comm_point_close(pend->c);
usr.sbin/unbound/services/outside_network.c
781
if(!set_auth_name_on_ssl(pend->c->ssl, tls_auth_name,
usr.sbin/unbound/services/outside_network.c
783
pend->c->fd = s;
usr.sbin/unbound/services/outside_network.c
785
SSL_free(pend->c->ssl);
usr.sbin/unbound/services/outside_network.c
787
pend->c->ssl = NULL;
usr.sbin/unbound/services/outside_network.c
788
comm_point_close(pend->c);
usr.sbin/unbound/services/outside_network.c
799
pend->c->repinfo.remote_addrlen = w->addrlen;
usr.sbin/unbound/services/outside_network.c
800
pend->c->tcp_more_read_again = &pend->reuse.cp_more_read_again;
usr.sbin/unbound/services/outside_network.c
801
pend->c->tcp_more_write_again = &pend->reuse.cp_more_write_again;
usr.sbin/unbound/services/outside_network.c
804
memcpy(&pend->c->repinfo.remote_addr, &w->addr, w->addrlen);
usr.sbin/unbound/services/outside_network.c
814
if(pend->c->ssl) {
usr.sbin/unbound/services/outside_network.c
992
waiting_tcp_callback(struct waiting_tcp* w, struct comm_point* c, int error,
usr.sbin/unbound/services/outside_network.c
997
(void)(*w->cb)(c, w->cb_arg, error, reply_info);
usr.sbin/unbound/services/outside_network.h
401
struct comm_point* c;
usr.sbin/unbound/services/outside_network.h
908
int outnet_udp_cb(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.h
912
int outnet_tcp_cb(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.h
928
int serviced_udp_callback(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/outside_network.h
932
int serviced_tcp_callback(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/services/rpz.c
1766
? (repinfo->c != NULL
usr.sbin/unbound/services/rpz.c
1767
? repinfo->c->type == comm_udp
usr.sbin/unbound/sldns/parse.c
124
prev_c = c;
usr.sbin/unbound/sldns/parse.c
131
prev_c = c;
usr.sbin/unbound/sldns/parse.c
135
if (c == '\n' && p != 0 && t > token) {
usr.sbin/unbound/sldns/parse.c
145
prev_c = c;
usr.sbin/unbound/sldns/parse.c
151
if (c == *d)
usr.sbin/unbound/sldns/parse.c
155
if (c == *d && i > 0 && prev_c != '\\' && p == 0) {
usr.sbin/unbound/sldns/parse.c
156
if (c == '\n' && line_nr) {
usr.sbin/unbound/sldns/parse.c
166
prev_c = c;
usr.sbin/unbound/sldns/parse.c
171
if (c != ' ' && c != '\t') {
usr.sbin/unbound/sldns/parse.c
175
if (c != '\0' && c != '\n') {
usr.sbin/unbound/sldns/parse.c
183
if (c != '\0' && c != '\n') {
usr.sbin/unbound/sldns/parse.c
184
*t++ = c;
usr.sbin/unbound/sldns/parse.c
186
if (c == '\n') {
usr.sbin/unbound/sldns/parse.c
194
if (c == '\\' && prev_c == '\\')
usr.sbin/unbound/sldns/parse.c
196
else prev_c = c;
usr.sbin/unbound/sldns/parse.c
199
if (c == EOF) {
usr.sbin/unbound/sldns/parse.c
289
int c, lc;
usr.sbin/unbound/sldns/parse.c
315
while ((c = sldns_bgetc(b)) != EOF) {
usr.sbin/unbound/sldns/parse.c
316
if (c == '\r') /* carriage return */
usr.sbin/unbound/sldns/parse.c
317
c = ' ';
usr.sbin/unbound/sldns/parse.c
318
if (c == '(' && lc != '\\' && !quoted) {
usr.sbin/unbound/sldns/parse.c
324
lc = c;
usr.sbin/unbound/sldns/parse.c
328
if (c == ')' && lc != '\\' && !quoted) {
usr.sbin/unbound/sldns/parse.c
334
lc = c;
usr.sbin/unbound/sldns/parse.c
345
if (c == ';' && quoted == 0) {
usr.sbin/unbound/sldns/parse.c
35
int c, prev_c;
usr.sbin/unbound/sldns/parse.c
350
if (c == '"' && com == 0 && lc != '\\') {
usr.sbin/unbound/sldns/parse.c
354
if (c == '\n' && com != 0) {
usr.sbin/unbound/sldns/parse.c
358
lc = c;
usr.sbin/unbound/sldns/parse.c
364
lc = c;
usr.sbin/unbound/sldns/parse.c
368
if (c == '\n' && p != 0) {
usr.sbin/unbound/sldns/parse.c
371
if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) {
usr.sbin/unbound/sldns/parse.c
379
lc = c;
usr.sbin/unbound/sldns/parse.c
385
if(strchr(skipw, c)) {
usr.sbin/unbound/sldns/parse.c
386
lc = c;
usr.sbin/unbound/sldns/parse.c
394
if (c == *d && lc != '\\' && (p == 0 || par)) {
usr.sbin/unbound/sldns/parse.c
404
*t++ = c;
usr.sbin/unbound/sldns/parse.c
406
if (c == '\\' && lc == '\\') {
usr.sbin/unbound/sldns/parse.c
409
lc = c;
usr.sbin/unbound/sldns/parse.c
441
char c;
usr.sbin/unbound/sldns/parse.c
445
c = (char) sldns_buffer_read_u8_at(buffer, buffer->_position);
usr.sbin/unbound/sldns/parse.c
448
if (*d == c) {
usr.sbin/unbound/sldns/parse.c
470
int c;
usr.sbin/unbound/sldns/parse.c
473
while ((c = fgetc(fp)) != EOF) {
usr.sbin/unbound/sldns/parse.c
474
if (line_nr && c == '\n') {
usr.sbin/unbound/sldns/parse.c
479
if (*d == c) {
usr.sbin/unbound/sldns/parse.c
485
ungetc(c, fp);
usr.sbin/unbound/sldns/parse.c
61
while ((c = getc(f)) != EOF) {
usr.sbin/unbound/sldns/parse.c
62
if (c == '\r') /* carriage return */
usr.sbin/unbound/sldns/parse.c
63
c = ' ';
usr.sbin/unbound/sldns/parse.c
64
if (c == '(' && prev_c != '\\' && !quoted) {
usr.sbin/unbound/sldns/parse.c
69
prev_c = c;
usr.sbin/unbound/sldns/parse.c
73
if (c == ')' && prev_c != '\\' && !quoted) {
usr.sbin/unbound/sldns/parse.c
78
prev_c = c;
usr.sbin/unbound/sldns/parse.c
89
if (c == ';' && quoted == 0) {
usr.sbin/unbound/sldns/parse.c
94
if (c == '\"' && com == 0 && prev_c != '\\') {
usr.sbin/unbound/sldns/parse.c
98
if (c == '\n' && com != 0) {
usr.sbin/unbound/sldns/parseutil.c
384
size_t c = 0; /* c is used to carry partial base32 character over
usr.sbin/unbound/sldns/parseutil.c
438
c = src[3] >> 7 ;
usr.sbin/unbound/sldns/parseutil.c
441
case 3: dst[4] = b32[(src[2] & 0x0f) << 1 | c];
usr.sbin/unbound/sldns/parseutil.c
444
c = src[2] >> 4 ;
usr.sbin/unbound/sldns/parseutil.c
447
case 2: dst[3] = b32[(src[1] & 0x01) << 4 | c];
usr.sbin/unbound/sldns/parseutil.c
453
c = src[1] >> 6 ;
usr.sbin/unbound/sldns/parseutil.c
456
case 1: dst[1] = b32[(src[0] & 0x07) << 2 | c];
usr.sbin/unbound/sldns/sbuffer.h
448
sldns_buffer_set_at(sldns_buffer *buffer, size_t at, int c, size_t count)
usr.sbin/unbound/sldns/sbuffer.h
451
memset(buffer->_data + at, c, count);
usr.sbin/unbound/sldns/str2wire.c
2082
uint16_t c = sldns_get_rr_class_by_name(str);
usr.sbin/unbound/sldns/str2wire.c
2083
if(c == 0 && strcmp(str, "CLASS0") != 0)
usr.sbin/unbound/sldns/str2wire.c
2087
sldns_write_uint16(rd, c);
usr.sbin/unbound/sldns/str2wire.c
2718
unsigned int a, b, c, d;
usr.sbin/unbound/sldns/str2wire.c
2724
if (sscanf(str, "%4x:%4x:%4x:%4x%n", &a, &b, &c, &d, &l) != 4 ||
usr.sbin/unbound/sldns/str2wire.c
2731
shorts[2] = htons(c);
usr.sbin/unbound/sldns/str2wire.c
2740
unsigned int a, b, c, d, e, f;
usr.sbin/unbound/sldns/str2wire.c
2746
&a, &b, &c, &d, &e, &f, &l) != 6 ||
usr.sbin/unbound/sldns/str2wire.c
2751
rd[2] = c;
usr.sbin/unbound/sldns/str2wire.c
2761
unsigned int a, b, c, d, e, f, g, h;
usr.sbin/unbound/sldns/str2wire.c
2767
&a, &b, &c, &d, &e, &f, &g, &h, &l) != 8 ||
usr.sbin/unbound/sldns/str2wire.c
2772
rd[2] = c;
usr.sbin/unbound/sldns/str2wire.c
462
ssize_t c = sldns_bget_token(strbuf, token, delim, token_len);
usr.sbin/unbound/sldns/str2wire.c
467
if(c == -1) {
usr.sbin/unbound/sldns/wire2str.c
1458
static int str_char_print(char** s, size_t* sl, uint8_t c)
usr.sbin/unbound/sldns/wire2str.c
1460
if(isprint((unsigned char)c) || c == '\t') {
usr.sbin/unbound/sldns/wire2str.c
1461
if(c == '\"' || c == '\\')
usr.sbin/unbound/sldns/wire2str.c
1462
return sldns_str_print(s, sl, "\\%c", c);
usr.sbin/unbound/sldns/wire2str.c
1464
**s = (char)c;
usr.sbin/unbound/sldns/wire2str.c
1470
return sldns_str_print(s, sl, "\\%03u", (unsigned)c);
usr.sbin/unbound/sldns/wire2str.c
491
uint16_t t, c;
usr.sbin/unbound/sldns/wire2str.c
499
c = sldns_read_uint16((*d)+2);
usr.sbin/unbound/sldns/wire2str.c
502
w += sldns_wire2str_class_print(s, sl, c);
usr.sbin/unbound/sldns/wire2str.c
511
c = sldns_read_uint16((*d)+2);
usr.sbin/unbound/sldns/wire2str.c
516
w += sldns_wire2str_class_print(s, sl, c);
usr.sbin/unbound/sldns/wire2str.c
544
uint16_t c = sldns_read_uint16((*d)+2);
usr.sbin/unbound/sldns/wire2str.c
547
w += sldns_wire2str_class_print(s, slen, c);
usr.sbin/unbound/sldns/wire2str.c
597
uint16_t t, c;
usr.sbin/unbound/sldns/wire2str.c
607
c = sldns_read_uint16((*d)+2);
usr.sbin/unbound/sldns/wire2str.c
610
w += sldns_wire2str_class_print(s, slen, c);
usr.sbin/unbound/sldns/wire2str.c
836
static int dname_char_print(char** s, size_t* slen, uint8_t c)
usr.sbin/unbound/sldns/wire2str.c
838
if(c == '.' || c == ';' || c == '(' || c == ')' || c == '\\')
usr.sbin/unbound/sldns/wire2str.c
839
return sldns_str_print(s, slen, "\\%c", c);
usr.sbin/unbound/sldns/wire2str.c
840
else if(!(isascii((unsigned char)c) && isgraph((unsigned char)c)))
usr.sbin/unbound/sldns/wire2str.c
841
return sldns_str_print(s, slen, "\\%03u", (unsigned)c);
usr.sbin/unbound/sldns/wire2str.c
844
**s = (char)c;
usr.sbin/unbound/sldns/wire2str.c
993
uint16_t c;
usr.sbin/unbound/sldns/wire2str.c
996
c = sldns_read_uint16(*d);
usr.sbin/unbound/sldns/wire2str.c
999
return sldns_wire2str_class_print(s, slen, c);
usr.sbin/unbound/smallapp/unbound-anchor.c
2342
int c;
usr.sbin/unbound/smallapp/unbound-anchor.c
2359
while( (c=getopt(argc, argv, "46C:FRSP:a:b:c:f:hln:r:s:u:vx:")) != -1) {
usr.sbin/unbound/smallapp/unbound-anchor.c
2360
switch(c) {
usr.sbin/unbound/smallapp/unbound-checkconf.c
1112
int c;
usr.sbin/unbound/smallapp/unbound-checkconf.c
1127
while( (c=getopt(argc, argv, "fhqo:")) != -1) {
usr.sbin/unbound/smallapp/unbound-checkconf.c
1128
switch(c) {
usr.sbin/unbound/smallapp/unbound-control.c
976
int c, ret;
usr.sbin/unbound/smallapp/unbound-control.c
998
while( (c=getopt(argc, argv, "c:s:qh")) != -1) {
usr.sbin/unbound/smallapp/unbound-control.c
999
switch(c) {
usr.sbin/unbound/smallapp/unbound-host.c
205
massage_class(const char* c)
usr.sbin/unbound/smallapp/unbound-host.c
207
if(c) {
usr.sbin/unbound/smallapp/unbound-host.c
208
int r = sldns_get_rr_class_by_name(c);
usr.sbin/unbound/smallapp/unbound-host.c
209
if(r == 0 && strcasecmp(c, "CLASS0") != 0 &&
usr.sbin/unbound/smallapp/unbound-host.c
210
strcmp(c, "") != 0) {
usr.sbin/unbound/smallapp/unbound-host.c
211
fprintf(stderr, "error unknown class %s\n", c);
usr.sbin/unbound/smallapp/unbound-host.c
240
pretty_class(char* s, size_t len, int c)
usr.sbin/unbound/smallapp/unbound-host.c
243
sldns_wire2str_class_buf((uint16_t)c, d, sizeof(d));
usr.sbin/unbound/smallapp/unbound-host.c
290
pretty_output(char* q, int t, int c, struct ub_result* result, int docname)
usr.sbin/unbound/smallapp/unbound-host.c
298
pretty_class(cstr, 16, c);
usr.sbin/unbound/smallapp/unbound-host.c
369
dnslook(struct ub_ctx* ctx, char* q, int t, int c, int docname)
usr.sbin/unbound/smallapp/unbound-host.c
374
ret = ub_resolve(ctx, q, t, c, &result);
usr.sbin/unbound/smallapp/unbound-host.c
379
pretty_output(q, t, c, result, docname);
usr.sbin/unbound/smallapp/unbound-host.c
394
int c = massage_class(qc);
usr.sbin/unbound/smallapp/unbound-host.c
398
if(!dnslook(ctx, realq, LDNS_RR_TYPE_A, c, 1)) {
usr.sbin/unbound/smallapp/unbound-host.c
400
(void)dnslook(ctx, realq, LDNS_RR_TYPE_AAAA, c, 0);
usr.sbin/unbound/smallapp/unbound-host.c
401
(void)dnslook(ctx, realq, LDNS_RR_TYPE_MX, c, 0);
usr.sbin/unbound/smallapp/unbound-host.c
404
(void)dnslook(ctx, realq, t, c, 1);
usr.sbin/unbound/smallapp/unbound-host.c
428
int c;
usr.sbin/unbound/smallapp/unbound-host.c
444
while( (c=getopt(argc, argv, "46DF:c:df:hrt:vy:C:")) != -1) {
usr.sbin/unbound/smallapp/unbound-host.c
445
switch(c) {
usr.sbin/unbound/smallapp/worker_cb.c
151
int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/smallapp/worker_cb.c
271
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/smallapp/worker_cb.c
60
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/smallapp/worker_cb.c
68
int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/smallapp/worker_cb.c
76
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/smallapp/worker_cb.c
84
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/asynclook.c
404
int c;
usr.sbin/unbound/testcode/asynclook.c
425
while( (c=getopt(argc, argv, "bcdf:hH:r:tx")) != -1) {
usr.sbin/unbound/testcode/asynclook.c
426
switch(c) {
usr.sbin/unbound/testcode/delayer.c
1066
int c; /* defaults */
usr.sbin/unbound/testcode/delayer.c
1077
while( (c=getopt(argc, argv, "b:d:f:hm:p:")) != -1) {
usr.sbin/unbound/testcode/delayer.c
1078
switch(c) {
usr.sbin/unbound/testcode/dohclient.c
570
int c;
usr.sbin/unbound/testcode/dohclient.c
596
while((c=getopt(argc, argv, "c:e:hns:p:P")) != -1) {
usr.sbin/unbound/testcode/dohclient.c
597
switch(c) {
usr.sbin/unbound/testcode/doqclient.c
2459
int c;
usr.sbin/unbound/testcode/doqclient.c
2475
while((c=getopt(argc, argv, "hp:qs:vx:y:")) != -1) {
usr.sbin/unbound/testcode/doqclient.c
2476
switch(c) {
usr.sbin/unbound/testcode/doqclient.c
2553
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/doqclient.c
2561
int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/doqclient.c
2569
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/doqclient.c
2577
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/doqclient.c
2638
int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/doqclient.c
2763
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
1092
struct replay_runtime* runtime = (struct replay_runtime*)repinfo->c->ev;
usr.sbin/unbound/testcode/fake_event.c
1104
ans->pkt = memdup(sldns_buffer_begin(ans->repinfo.c->buffer),
usr.sbin/unbound/testcode/fake_event.c
1105
sldns_buffer_limit(ans->repinfo.c->buffer));
usr.sbin/unbound/testcode/fake_event.c
1106
ans->pkt_len = sldns_buffer_limit(ans->repinfo.c->buffer);
usr.sbin/unbound/testcode/fake_event.c
1115
if(repinfo->c) {
usr.sbin/unbound/testcode/fake_event.c
1116
sldns_buffer_free(repinfo->c->buffer);
usr.sbin/unbound/testcode/fake_event.c
1117
free(repinfo->c);
usr.sbin/unbound/testcode/fake_event.c
1471
void comm_point_start_listening(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
1477
void comm_point_stop_listening(struct comm_point* ATTR_UNUSED(c))
usr.sbin/unbound/testcode/fake_event.c
1483
void comm_point_delete(struct comm_point* c)
usr.sbin/unbound/testcode/fake_event.c
1485
struct fake_commpoint* fc = (struct fake_commpoint*)c;
usr.sbin/unbound/testcode/fake_event.c
1486
if(c == NULL) return;
usr.sbin/unbound/testcode/fake_event.c
1492
free(c);
usr.sbin/unbound/testcode/fake_event.c
1505
size_t comm_point_get_mem(struct comm_point* ATTR_UNUSED(c))
usr.sbin/unbound/testcode/fake_event.c
1515
size_t serviced_get_mem(struct serviced_query* ATTR_UNUSED(c))
usr.sbin/unbound/testcode/fake_event.c
1521
int outnet_udp_cb(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
1529
int outnet_tcp_cb(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
1617
int serviced_udp_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
1625
int serviced_tcp_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
183
if(a->repinfo.c) {
usr.sbin/unbound/testcode/fake_event.c
184
sldns_buffer_free(a->repinfo.c->buffer);
usr.sbin/unbound/testcode/fake_event.c
185
free(a->repinfo.c);
usr.sbin/unbound/testcode/fake_event.c
1909
int comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
usr.sbin/unbound/testcode/fake_event.c
1912
struct fake_commpoint* fc = (struct fake_commpoint*)c;
usr.sbin/unbound/testcode/fake_event.c
2060
int fast_reload_client_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/fake_event.c
338
uint8_t* c;
usr.sbin/unbound/testcode/fake_event.c
351
c = sldns_buffer_begin(reppkt->reply_from_hex);
usr.sbin/unbound/testcode/fake_event.c
353
if(!c) fatal_exit("out of memory");
usr.sbin/unbound/testcode/fake_event.c
355
c = reppkt->reply_pkt;
usr.sbin/unbound/testcode/fake_event.c
358
if(c) {
usr.sbin/unbound/testcode/fake_event.c
359
if(q) adjust_packet(entry, &c, &clen, q, qlen);
usr.sbin/unbound/testcode/fake_event.c
360
sldns_buffer_write(buffer, c, clen);
usr.sbin/unbound/testcode/fake_event.c
361
if(q) free(c);
usr.sbin/unbound/testcode/fake_event.c
376
struct comm_point c;
usr.sbin/unbound/testcode/fake_event.c
381
memset(&c, 0, sizeof(c));
usr.sbin/unbound/testcode/fake_event.c
382
c.fd = -1;
usr.sbin/unbound/testcode/fake_event.c
383
c.buffer = sldns_buffer_new(runtime->bufsize);
usr.sbin/unbound/testcode/fake_event.c
384
c.type = comm_udp;
usr.sbin/unbound/testcode/fake_event.c
386
c.type = comm_tcp;
usr.sbin/unbound/testcode/fake_event.c
387
c.tcp_timeout_msec = 30000;
usr.sbin/unbound/testcode/fake_event.c
388
c.tcp_keepalive = runtime->tcp_seen_keepalive;
usr.sbin/unbound/testcode/fake_event.c
390
fill_buffer_with_reply(c.buffer, entry, pend->pkt, pend->pkt_len,
usr.sbin/unbound/testcode/fake_event.c
392
repinfo.c = &c;
usr.sbin/unbound/testcode/fake_event.c
404
if((*cb)(&c, cb_arg, NETEVENT_NOERROR, &repinfo)) {
usr.sbin/unbound/testcode/fake_event.c
407
sldns_buffer_free(c.buffer);
usr.sbin/unbound/testcode/fake_event.c
420
if(ans->repinfo.c->type == comm_udp)
usr.sbin/unbound/testcode/fake_event.c
437
if(ans->repinfo.c->tcp_keepalive)
usr.sbin/unbound/testcode/fake_event.c
459
repinfo.c = (struct comm_point*)calloc(1, sizeof(struct comm_point));
usr.sbin/unbound/testcode/fake_event.c
460
if(!repinfo.c)
usr.sbin/unbound/testcode/fake_event.c
469
repinfo.c->fd = -1;
usr.sbin/unbound/testcode/fake_event.c
470
repinfo.c->ev = (struct internal_event*)runtime;
usr.sbin/unbound/testcode/fake_event.c
471
repinfo.c->buffer = sldns_buffer_new(runtime->bufsize);
usr.sbin/unbound/testcode/fake_event.c
473
repinfo.c->type = comm_tcp;
usr.sbin/unbound/testcode/fake_event.c
474
repinfo.c->tcp_timeout_msec = 30000;
usr.sbin/unbound/testcode/fake_event.c
475
repinfo.c->tcp_keepalive = runtime->tcp_seen_keepalive;
usr.sbin/unbound/testcode/fake_event.c
477
repinfo.c->type = comm_udp;
usr.sbin/unbound/testcode/fake_event.c
478
fill_buffer_with_reply(repinfo.c->buffer, todo->match, NULL, 0, 0);
usr.sbin/unbound/testcode/fake_event.c
482
if((*runtime->callback_query)(repinfo.c, runtime->cb_arg,
usr.sbin/unbound/testcode/fake_event.c
500
struct comm_point c;
usr.sbin/unbound/testcode/fake_event.c
504
memset(&c, 0, sizeof(c));
usr.sbin/unbound/testcode/fake_event.c
508
c.buffer = sldns_buffer_new(runtime->bufsize);
usr.sbin/unbound/testcode/fake_event.c
509
c.type = comm_udp;
usr.sbin/unbound/testcode/fake_event.c
511
c.type = comm_tcp;
usr.sbin/unbound/testcode/fake_event.c
512
c.tcp_timeout_msec = 30000;
usr.sbin/unbound/testcode/fake_event.c
513
c.tcp_keepalive = runtime->tcp_seen_keepalive;
usr.sbin/unbound/testcode/fake_event.c
516
fill_buffer_with_reply(c.buffer, todo->match, p->pkt,
usr.sbin/unbound/testcode/fake_event.c
519
repinfo.c = &c;
usr.sbin/unbound/testcode/fake_event.c
531
if((*cb)(&c, cb_arg, error, &repinfo)) {
usr.sbin/unbound/testcode/fake_event.c
535
sldns_buffer_free(c.buffer);
usr.sbin/unbound/testcode/lock_verify.c
168
int c;
usr.sbin/unbound/testcode/lock_verify.c
170
while( (c = fgetc(in)) != 0) {
usr.sbin/unbound/testcode/lock_verify.c
171
if(c == EOF)
usr.sbin/unbound/testcode/lock_verify.c
173
buf[len++] = c;
usr.sbin/unbound/testcode/perf.c
575
int c;
usr.sbin/unbound/testcode/perf.c
598
while( (c=getopt(argc, argv, "d:ha:f:q")) != -1) {
usr.sbin/unbound/testcode/perf.c
599
switch(c) {
usr.sbin/unbound/testcode/petal.c
301
int c = 1;
usr.sbin/unbound/testcode/petal.c
309
(void*)&c, (socklen_t) sizeof(int)) < 0) {
usr.sbin/unbound/testcode/petal.c
638
int c;
usr.sbin/unbound/testcode/petal.c
643
if((c=WSAStartup(MAKEWORD(2,2), &wsa_data)) != 0)
usr.sbin/unbound/testcode/petal.c
649
while( (c=getopt(argc, argv, "a:c:k:hp:v")) != -1) {
usr.sbin/unbound/testcode/petal.c
650
switch(c) {
usr.sbin/unbound/testcode/streamtcp.c
569
int c;
usr.sbin/unbound/testcode/streamtcp.c
601
while( (c=getopt(argc, argv, "af:p:hnsud:")) != -1) {
usr.sbin/unbound/testcode/streamtcp.c
602
switch(c) {
usr.sbin/unbound/testcode/testbound.c
351
int c, res;
usr.sbin/unbound/testcode/testbound.c
365
for(c=1; c<pass_argc; c++)
usr.sbin/unbound/testcode/testbound.c
366
free(pass_argv[c]);
usr.sbin/unbound/testcode/testbound.c
384
int c, res;
usr.sbin/unbound/testcode/testbound.c
405
while( (c=getopt(argc, argv, "12egciho:p:s")) != -1) {
usr.sbin/unbound/testcode/testbound.c
406
switch(c) {
usr.sbin/unbound/testcode/testbound.c
567
int c, res;
usr.sbin/unbound/testcode/testbound.c
646
int remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/testbound.c
654
int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
usr.sbin/unbound/testcode/testbound.c
670
int ATTR_UNUSED(c))
usr.sbin/unbound/testcode/testpkts.c
326
char c;
usr.sbin/unbound/testcode/testpkts.c
337
c = hexstr[i];
usr.sbin/unbound/testcode/testpkts.c
340
if (c != ' ') {
usr.sbin/unbound/testcode/testpkts.c
341
if (c >= '0' && c <= '9') {
usr.sbin/unbound/testcode/testpkts.c
342
int8 += c & 0x0f;
usr.sbin/unbound/testcode/testpkts.c
343
} else if (c >= 'a' && c <= 'z') {
usr.sbin/unbound/testcode/testpkts.c
344
int8 += (c & 0x0f) + 9;
usr.sbin/unbound/testcode/testpkts.c
345
} else if (c >= 'A' && c <= 'Z') {
usr.sbin/unbound/testcode/testpkts.c
346
int8 += (c & 0x0f) + 9;
usr.sbin/unbound/testcode/testpkts.c
374
int c;
usr.sbin/unbound/testcode/testpkts.c
393
c = (int) data_wire[data_buf_pos];
usr.sbin/unbound/testcode/testpkts.c
395
if (state < 2 && !isascii((unsigned char)c)) {
usr.sbin/unbound/testcode/testpkts.c
401
if ( (c >= '0' && c <= '9') ||
usr.sbin/unbound/testcode/testpkts.c
402
(c >= 'a' && c <= 'f') ||
usr.sbin/unbound/testcode/testpkts.c
403
(c >= 'A' && c <= 'F') )
usr.sbin/unbound/testcode/testpkts.c
411
hexbuf[hexbufpos] = (uint8_t) c;
usr.sbin/unbound/testcode/testpkts.c
413
} else if (c == ';') {
usr.sbin/unbound/testcode/testpkts.c
415
} else if (c == ' ' || c == '\t' || c == '\n') {
usr.sbin/unbound/testcode/testpkts.c
420
if (c == '\n' || c == EOF) {
usr.sbin/unbound/testcode/testpkts.c
430
hexbuf[hexbufpos] = (uint8_t) c;
usr.sbin/unbound/testcode/testpkts.c
64
static int isendline(char c)
usr.sbin/unbound/testcode/testpkts.c
66
if(c == ';' || c == '#'
usr.sbin/unbound/testcode/testpkts.c
67
|| c == '\n' || c == 0)
usr.sbin/unbound/testcode/unitanchor.c
101
unit_assert(anchors_lookup(a, (uint8_t*)"\000", 1, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
102
unit_assert(anchors_lookup(a, (uint8_t*)"\003com\000", 5, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
104
(uint8_t*)"\007example\003com\000", 11, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
106
unit_assert(ta = anchors_lookup(a, (uint8_t*)"\002nl\000", 4, c));
usr.sbin/unbound/testcode/unitanchor.c
111
(uint8_t*)"\004labs\002nl\000", 9, c));
usr.sbin/unbound/testcode/unitanchor.c
117
(uint8_t*)"\004fabs\002nl\000", 9, c));
usr.sbin/unbound/testcode/unitanchor.c
122
unit_assert(anchors_lookup(a, (uint8_t*)"\002oo\000", 4, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
53
uint16_t c = LDNS_RR_CLASS_IN;
usr.sbin/unbound/testcode/unitanchor.c
54
unit_assert(anchors_lookup(a, (uint8_t*)"\000", 1, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
55
unit_assert(anchors_lookup(a, (uint8_t*)"\003com\000", 5, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
57
(uint8_t*)"\007example\003com\000", 11, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
58
unit_assert(anchors_lookup(a, (uint8_t*)"\002nl\000", 4, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
60
(uint8_t*)"\004labs\002nl\000", 9, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
62
(uint8_t*)"\004fabs\002nl\000", 9, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
70
uint16_t c = LDNS_RR_CLASS_IN;
usr.sbin/unbound/testcode/unitanchor.c
73
unit_assert(anchors_lookup(a, (uint8_t*)"\000", 1, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
74
unit_assert(anchors_lookup(a, (uint8_t*)"\003com\000", 5, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
76
(uint8_t*)"\007example\003com\000", 11, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
79
(uint8_t*)"\002nl\000", 4, c)) != NULL);
usr.sbin/unbound/testcode/unitanchor.c
83
(uint8_t*)"\004labs\002nl\000", 9, c)) != NULL);
usr.sbin/unbound/testcode/unitanchor.c
87
(uint8_t*)"\004fabs\002nl\000", 9, c)) != NULL);
usr.sbin/unbound/testcode/unitanchor.c
90
unit_assert(anchors_lookup(a, (uint8_t*)"\002oo\000", 4, c) == NULL);
usr.sbin/unbound/testcode/unitanchor.c
98
uint16_t c = LDNS_RR_CLASS_IN;
usr.sbin/unbound/testcode/unitlruhash.c
280
size_t c = 0;
usr.sbin/unbound/testcode/unitlruhash.c
300
c++;
usr.sbin/unbound/testcode/unitlruhash.c
303
unit_assert(c == table->num);
usr.sbin/unbound/testcode/unitslabhash.c
154
size_t c = 0;
usr.sbin/unbound/testcode/unitslabhash.c
174
c++;
usr.sbin/unbound/testcode/unitslabhash.c
177
unit_assert(c == table->num);
usr.sbin/unbound/util/alloc.h
215
# define sldns_rr_class2str(c) unbound_lite_wrapstr(sldns_rr_class2str(c))
usr.sbin/unbound/util/data/dname.c
807
int c = memlowercmp(p1, p2, min);
usr.sbin/unbound/util/data/dname.c
808
if(c != 0)
usr.sbin/unbound/util/data/dname.c
809
return c;
usr.sbin/unbound/util/data/dname.c
829
int c;
usr.sbin/unbound/util/data/dname.c
856
if((c=memcanoncmp(d1, len1, d2, len2)) != 0) {
usr.sbin/unbound/util/data/dname.c
857
if(c<0)
usr.sbin/unbound/util/data/msgencode.c
115
int c, n, closen=0;
usr.sbin/unbound/util/data/msgencode.c
120
if((c = dname_lab_cmp(dname, labs, p->dname, p->labs, &n))
usr.sbin/unbound/util/data/msgencode.c
126
if(c<0) {
usr.sbin/unbound/util/data/msgencode.c
489
const sldns_rr_descriptor* c = type_rdata_compressible(key);
usr.sbin/unbound/util/data/msgencode.c
511
if(c) {
usr.sbin/unbound/util/data/msgencode.c
513
data->rr_len[j], region, tree, c,
usr.sbin/unbound/util/data/msgparse.c
1019
if (!cfg || !cfg->do_tcp_keepalive || !c ||
usr.sbin/unbound/util/data/msgparse.c
1020
c->type == comm_udp || c->tcp_keepalive)
usr.sbin/unbound/util/data/msgparse.c
1027
c->tcp_timeout_msec / 100,
usr.sbin/unbound/util/data/msgparse.c
1032
c->tcp_keepalive = 1;
usr.sbin/unbound/util/data/msgparse.c
1037
!c || c->type != comm_tcp ||!c->ssl || padding_seen)
usr.sbin/unbound/util/data/msgparse.c
1282
struct config_file* cfg, struct comm_point* c,
usr.sbin/unbound/util/data/msgparse.c
1330
c, repinfo, now, region, cookie_secrets);
usr.sbin/unbound/util/data/msgparse.c
954
struct edns_data* edns, struct config_file* cfg, struct comm_point* c,
usr.sbin/unbound/util/data/msgparse.c
968
if (cfg && cfg->do_tcp_keepalive && c && c->type != comm_udp && c->tcp_keepalive) {
usr.sbin/unbound/util/data/msgparse.c
970
c->tcp_timeout_msec / 100, region)) {
usr.sbin/unbound/util/data/msgparse.h
358
struct config_file* cfg, struct comm_point* c,
usr.sbin/unbound/util/data/packed_rrset.c
112
if((c=query_dname_compare(key1->rk.dname, key2->rk.dname)) != 0)
usr.sbin/unbound/util/data/packed_rrset.c
113
return c;
usr.sbin/unbound/util/data/packed_rrset.c
99
int c;
usr.sbin/unbound/util/edns.c
103
for(c=config->edns_client_strings; c; c=c->next) {
usr.sbin/unbound/util/edns.c
107
log_assert(c->str && c->str2);
usr.sbin/unbound/util/edns.c
109
if(!netblockstrtoaddr(c->str, UNBOUND_DNS_PORT, &addr, &addrlen,
usr.sbin/unbound/util/edns.c
112
"%s", c->str);
usr.sbin/unbound/util/edns.c
116
net, c->str2)) {
usr.sbin/unbound/util/edns.c
99
struct config_str2list* c;
usr.sbin/unbound/util/module.c
139
char t[16], c[16];
usr.sbin/unbound/util/module.c
141
sldns_wire2str_class_buf(qstate->qinfo.qclass, c, sizeof(c));
usr.sbin/unbound/util/module.c
143
snprintf(p, left, "validation failure <%s %s %s>:", dname, t, c);
usr.sbin/unbound/util/module.c
182
char t[16], c[16];
usr.sbin/unbound/util/module.c
184
sldns_wire2str_class_buf(qstate->qinfo.qclass, c, sizeof(c));
usr.sbin/unbound/util/module.c
186
snprintf(p, left, "SERVFAIL <%s %s %s>:", dname, t, c);
usr.sbin/unbound/util/module.c
222
char t[16], c[16];
usr.sbin/unbound/util/module.c
226
sldns_wire2str_class_buf(ntohs(rr->rk.rrset_class), c, sizeof(c));
usr.sbin/unbound/util/module.c
228
snprintf(buf, sizeof(buf), "for <%s %s %s>", dname, t, c);
usr.sbin/unbound/util/net_help.c
557
char t[12], c[12];
usr.sbin/unbound/util/net_help.c
578
snprintf(c, sizeof(c), "CLASS%d", (int)dclass);
usr.sbin/unbound/util/net_help.c
579
cs = c;
usr.sbin/unbound/util/net_help.c
588
char t[12], c[12];
usr.sbin/unbound/util/net_help.c
607
snprintf(c, sizeof(c), "CLASS%d", (int)dclass);
usr.sbin/unbound/util/net_help.c
608
cs = c;
usr.sbin/unbound/util/netevent.c
1013
rep.c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
1014
log_assert(rep.c->type == comm_udp);
usr.sbin/unbound/util/netevent.c
1018
log_assert(rep.c && rep.c->buffer && rep.c->fd == fd);
usr.sbin/unbound/util/netevent.c
1019
ub_comm_base_now(rep.c->ev->base);
usr.sbin/unbound/util/netevent.c
1021
sldns_buffer_clear(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1022
timeval_clear(&rep.c->recv_tv);
usr.sbin/unbound/util/netevent.c
1025
log_assert(sldns_buffer_remaining(rep.c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
1028
iov[0].iov_base = sldns_buffer_begin(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1029
iov[0].iov_len = sldns_buffer_remaining(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1046
sldns_buffer_skip(rep.c->buffer, rcv);
usr.sbin/unbound/util/netevent.c
1047
sldns_buffer_flip(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1078
TIMESPEC_TO_TIMEVAL(&rep.c->recv_tv, ts);
usr.sbin/unbound/util/netevent.c
1082
TIMESPEC_TO_TIMEVAL(&rep.c->recv_tv, ts);
usr.sbin/unbound/util/netevent.c
1085
memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval));
usr.sbin/unbound/util/netevent.c
1090
memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval));
usr.sbin/unbound/util/netevent.c
1099
if(rep.c->pp2_enabled && !consume_pp2_header(rep.c->buffer,
usr.sbin/unbound/util/netevent.c
1110
fptr_ok(fptr_whitelist_comm_point(rep.c->callback));
usr.sbin/unbound/util/netevent.c
1111
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
usr.sbin/unbound/util/netevent.c
1115
buffer = rep.c->dnscrypt_buffer;
usr.sbin/unbound/util/netevent.c
1117
buffer = rep.c->buffer;
usr.sbin/unbound/util/netevent.c
1119
(void)comm_point_send_udp_msg_if(rep.c, buffer,
usr.sbin/unbound/util/netevent.c
1123
if(!rep.c || rep.c->fd == -1) /* commpoint closed */
usr.sbin/unbound/util/netevent.c
1137
rep.c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
1138
log_assert(rep.c->type == comm_udp);
usr.sbin/unbound/util/netevent.c
1142
log_assert(rep.c && rep.c->buffer && rep.c->fd == fd);
usr.sbin/unbound/util/netevent.c
1143
ub_comm_base_now(rep.c->ev->base);
usr.sbin/unbound/util/netevent.c
1145
sldns_buffer_clear(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1148
log_assert(sldns_buffer_remaining(rep.c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
1149
rcv = recvfrom(fd, (void*)sldns_buffer_begin(rep.c->buffer),
usr.sbin/unbound/util/netevent.c
1150
sldns_buffer_remaining(rep.c->buffer), MSG_DONTWAIT,
usr.sbin/unbound/util/netevent.c
1168
sldns_buffer_skip(rep.c->buffer, rcv);
usr.sbin/unbound/util/netevent.c
1169
sldns_buffer_flip(rep.c->buffer);
usr.sbin/unbound/util/netevent.c
1173
if(rep.c->pp2_enabled && !consume_pp2_header(rep.c->buffer,
usr.sbin/unbound/util/netevent.c
1184
fptr_ok(fptr_whitelist_comm_point(rep.c->callback));
usr.sbin/unbound/util/netevent.c
1185
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
usr.sbin/unbound/util/netevent.c
1188
buffer = rep.c->dnscrypt_buffer;
usr.sbin/unbound/util/netevent.c
1190
buffer = rep.c->buffer;
usr.sbin/unbound/util/netevent.c
1192
(void)comm_point_send_udp_msg(rep.c, buffer,
usr.sbin/unbound/util/netevent.c
1196
if(!rep.c || rep.c->fd != fd) /* commpoint closed to -1 or reused for
usr.sbin/unbound/util/netevent.c
1328
doq_store_blocked_pkt(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1331
if(c->doq_socket->have_blocked_pkt)
usr.sbin/unbound/util/netevent.c
1334
if(sldns_buffer_limit(c->doq_socket->pkt_buf) >
usr.sbin/unbound/util/netevent.c
1335
sldns_buffer_capacity(c->doq_socket->blocked_pkt))
usr.sbin/unbound/util/netevent.c
1338
c->doq_socket->have_blocked_pkt = 1;
usr.sbin/unbound/util/netevent.c
1339
c->doq_socket->blocked_pkt_pi.ecn = ecn;
usr.sbin/unbound/util/netevent.c
1340
memcpy(c->doq_socket->blocked_paddr, paddr,
usr.sbin/unbound/util/netevent.c
1341
sizeof(*c->doq_socket->blocked_paddr));
usr.sbin/unbound/util/netevent.c
1342
sldns_buffer_clear(c->doq_socket->blocked_pkt);
usr.sbin/unbound/util/netevent.c
1343
sldns_buffer_write(c->doq_socket->blocked_pkt,
usr.sbin/unbound/util/netevent.c
1344
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1345
sldns_buffer_limit(c->doq_socket->pkt_buf));
usr.sbin/unbound/util/netevent.c
1346
sldns_buffer_flip(c->doq_socket->blocked_pkt);
usr.sbin/unbound/util/netevent.c
1350
doq_send_pkt(struct comm_point* c, struct doq_pkt_addr* paddr, uint32_t ecn)
usr.sbin/unbound/util/netevent.c
1359
iov[0].iov_base = sldns_buffer_begin(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1360
iov[0].iov_len = sldns_buffer_limit(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1374
doq_set_ecn(c->fd, paddr->addr.sockaddr.in.sin_family, ecn);
usr.sbin/unbound/util/netevent.c
1377
ret = sendmsg(c->fd, &msg, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
1396
doq_store_blocked_pkt(c, paddr, ecn);
usr.sbin/unbound/util/netevent.c
1415
} else if(ret != (ssize_t)sldns_buffer_limit(c->doq_socket->pkt_buf)) {
usr.sbin/unbound/util/netevent.c
1422
(int)sldns_buffer_limit(c->doq_socket->pkt_buf));
usr.sbin/unbound/util/netevent.c
1426
(int)ret, (int)sldns_buffer_limit(c->doq_socket->pkt_buf));
usr.sbin/unbound/util/netevent.c
1448
doq_get_localaddr_cmsg(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1474
(void*)c->socket->addr));
usr.sbin/unbound/util/netevent.c
1496
(void*)c->socket->addr));
usr.sbin/unbound/util/netevent.c
1516
(void*)c->socket->addr));
usr.sbin/unbound/util/netevent.c
1565
doq_recv(struct comm_point* c, struct doq_pkt_addr* paddr, int* pkt_continue,
usr.sbin/unbound/util/netevent.c
1578
iov[0].iov_base = sldns_buffer_begin(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1579
iov[0].iov_len = sldns_buffer_remaining(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1588
rcv = recvmsg(c->fd, &msg, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
1599
sldns_buffer_skip(c->doq_socket->pkt_buf, rcv);
usr.sbin/unbound/util/netevent.c
1600
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1601
if(!doq_get_localaddr_cmsg(c, paddr, pkt_continue, &msg))
usr.sbin/unbound/util/netevent.c
1610
doq_send_version_negotiation(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1622
unused_random = ub_random_max(c->doq_socket->rnd, 256);
usr.sbin/unbound/util/netevent.c
1623
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1625
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1626
sldns_buffer_capacity(c->doq_socket->pkt_buf), unused_random,
usr.sbin/unbound/util/netevent.c
1633
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
usr.sbin/unbound/util/netevent.c
1634
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1635
doq_send_pkt(c, paddr, 0);
usr.sbin/unbound/util/netevent.c
1736
doq_decode_pkt_header_negotiate(struct comm_point* c,
usr.sbin/unbound/util/netevent.c
1750
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1751
sldns_buffer_limit(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1752
c->doq_socket->sv_scidlen);
usr.sbin/unbound/util/netevent.c
1755
&scid, &scidlen, sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1756
sldns_buffer_limit(c->doq_socket->pkt_buf), c->doq_socket->sv_scidlen);
usr.sbin/unbound/util/netevent.c
1761
doq_send_version_negotiation(c, paddr,
usr.sbin/unbound/util/netevent.c
1799
*conn = doq_conn_find_by_addr_or_cid(c->doq_socket->table, paddr,
usr.sbin/unbound/util/netevent.c
1807
(*conn)->doq_socket = c->doq_socket;
usr.sbin/unbound/util/netevent.c
1824
doq_send_retry(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1840
scid.datalen = c->doq_socket->sv_scidlen;
usr.sbin/unbound/util/netevent.c
1841
doq_cid_randfill(&scid, scid.datalen, c->doq_socket->rnd);
usr.sbin/unbound/util/netevent.c
1844
c->doq_socket->static_secret, c->doq_socket->static_secret_len,
usr.sbin/unbound/util/netevent.c
1853
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1854
ret = ngtcp2_crypto_write_retry(sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1855
sldns_buffer_capacity(c->doq_socket->pkt_buf), hd->version,
usr.sbin/unbound/util/netevent.c
1862
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
usr.sbin/unbound/util/netevent.c
1863
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1864
doq_send_pkt(c, paddr, 0);
usr.sbin/unbound/util/netevent.c
1869
doq_send_stateless_connection_close(struct comm_point* c,
usr.sbin/unbound/util/netevent.c
1874
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1876
sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
1877
sldns_buffer_capacity(c->doq_socket->pkt_buf), hd->version, &hd->scid,
usr.sbin/unbound/util/netevent.c
1884
sldns_buffer_set_position(c->doq_socket->pkt_buf, ret);
usr.sbin/unbound/util/netevent.c
1885
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
1886
doq_send_pkt(c, paddr, 0);
usr.sbin/unbound/util/netevent.c
1891
doq_verify_retry_token(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1908
c->doq_socket->static_secret,
usr.sbin/unbound/util/netevent.c
1909
c->doq_socket->static_secret_len, hd->version,
usr.sbin/unbound/util/netevent.c
1922
doq_verify_token(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
1938
c->doq_socket->static_secret, c->doq_socket->static_secret_len,
usr.sbin/unbound/util/netevent.c
1951
doq_delete_connection(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/util/netevent.c
1969
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
1970
node = rbtree_delete(c->doq_socket->table->conn_tree, copy.node.key);
usr.sbin/unbound/util/netevent.c
1974
doq_conn_write_list_remove(c->doq_socket->table, conn);
usr.sbin/unbound/util/netevent.c
1980
doq_timer_list_remove(c->doq_socket->table,
usr.sbin/unbound/util/netevent.c
1984
doq_timer_tree_remove(c->doq_socket->table,
usr.sbin/unbound/util/netevent.c
1987
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
1990
doq_table_quic_size_subtract(c->doq_socket->table,
usr.sbin/unbound/util/netevent.c
1992
doq_conn_delete(conn, c->doq_socket->table);
usr.sbin/unbound/util/netevent.c
2000
doq_setup_new_conn(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
2004
if(!doq_table_quic_size_available(c->doq_socket->table,
usr.sbin/unbound/util/netevent.c
2005
c->doq_socket->cfg, sizeof(*conn)+hd->dcid.datalen
usr.sbin/unbound/util/netevent.c
2010
doq_send_stateless_connection_close(c, paddr, hd,
usr.sbin/unbound/util/netevent.c
2014
conn = doq_conn_create(c, paddr, hd->dcid.data, hd->dcid.datalen,
usr.sbin/unbound/util/netevent.c
2020
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2022
if(!rbtree_insert(c->doq_socket->table->conn_tree, &conn->node)) {
usr.sbin/unbound/util/netevent.c
2023
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2027
doq_conn_delete(conn, c->doq_socket->table);
usr.sbin/unbound/util/netevent.c
2030
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2031
doq_table_quic_size_add(c->doq_socket->table,
usr.sbin/unbound/util/netevent.c
2047
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2055
doq_address_validation(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
2069
doq_send_retry(c, paddr, hd);
usr.sbin/unbound/util/netevent.c
2074
doq_send_stateless_connection_close(c, paddr, hd,
usr.sbin/unbound/util/netevent.c
2079
if(!doq_verify_retry_token(c, paddr, ocid, hd)) {
usr.sbin/unbound/util/netevent.c
2080
doq_send_stateless_connection_close(c, paddr, hd,
usr.sbin/unbound/util/netevent.c
2086
if(!doq_verify_token(c, paddr, hd)) {
usr.sbin/unbound/util/netevent.c
2087
doq_send_retry(c, paddr, hd);
usr.sbin/unbound/util/netevent.c
2101
if(c->doq_socket->validate_addr) {
usr.sbin/unbound/util/netevent.c
2102
doq_send_retry(c, paddr, hd);
usr.sbin/unbound/util/netevent.c
2118
doq_accept(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.c
2126
rv = ngtcp2_accept(&hd, sldns_buffer_begin(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
2127
sldns_buffer_limit(c->doq_socket->pkt_buf));
usr.sbin/unbound/util/netevent.c
2130
doq_send_retry(c, paddr, &hd);
usr.sbin/unbound/util/netevent.c
2137
if(c->doq_socket->validate_addr ||
usr.sbin/unbound/util/netevent.c
2144
if(!doq_address_validation(c, paddr, &hd, &ocid, &pocid))
usr.sbin/unbound/util/netevent.c
2147
*conn = doq_setup_new_conn(c, paddr, &hd, pocid);
usr.sbin/unbound/util/netevent.c
2150
(*conn)->doq_socket = c->doq_socket;
usr.sbin/unbound/util/netevent.c
2151
if(!doq_conn_recv(c, paddr, *conn, pi, &err_retry, NULL)) {
usr.sbin/unbound/util/netevent.c
2153
doq_send_retry(c, paddr, &hd);
usr.sbin/unbound/util/netevent.c
2154
doq_delete_connection(c, *conn);
usr.sbin/unbound/util/netevent.c
2163
doq_pickup_timer(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2171
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2172
RBTREE_FOR(t, struct doq_timer*, c->doq_socket->table->timer_tree) {
usr.sbin/unbound/util/netevent.c
2174
t->worker_doq_socket == c->doq_socket) {
usr.sbin/unbound/util/netevent.c
2176
t->worker_doq_socket = c->doq_socket;
usr.sbin/unbound/util/netevent.c
2183
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2184
c->doq_socket->marked_time = ts;
usr.sbin/unbound/util/netevent.c
2187
timeval_subtract(&rel, &tv, c->doq_socket->now_tv);
usr.sbin/unbound/util/netevent.c
2188
comm_timer_set(c->doq_socket->timer, &rel);
usr.sbin/unbound/util/netevent.c
2193
if(comm_timer_is_set(c->doq_socket->timer))
usr.sbin/unbound/util/netevent.c
2194
comm_timer_disable(c->doq_socket->timer);
usr.sbin/unbound/util/netevent.c
2201
doq_done_setup_timer_and_write(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/util/netevent.c
2236
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2237
node = rbtree_search(c->doq_socket->table->conn_tree, copy.node.key);
usr.sbin/unbound/util/netevent.c
2239
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2247
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2256
doq_conn_set_write_list(c->doq_socket->table, conn);
usr.sbin/unbound/util/netevent.c
2259
doq_timer_set(c->doq_socket->table, &conn->timer,
usr.sbin/unbound/util/netevent.c
2260
c->doq_socket, &new_tv, new_ts);
usr.sbin/unbound/util/netevent.c
2262
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2268
doq_done_with_conn_cb(struct comm_point* c, struct doq_conn* conn)
usr.sbin/unbound/util/netevent.c
2295
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2296
node = rbtree_search(c->doq_socket->table->conn_tree, copy.node.key);
usr.sbin/unbound/util/netevent.c
2298
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2306
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2314
doq_conn_set_write_list(c->doq_socket->table, conn);
usr.sbin/unbound/util/netevent.c
2315
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2321
doq_write_list_length(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2325
lock_rw_rdlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2326
conn = c->doq_socket->table->write_list_first;
usr.sbin/unbound/util/netevent.c
2331
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2337
doq_pop_write_conn(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2340
lock_rw_wrlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2341
conn = doq_table_pop_first(c->doq_socket->table);
usr.sbin/unbound/util/netevent.c
2344
conn = doq_table_pop_first(c->doq_socket->table);
usr.sbin/unbound/util/netevent.c
2346
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2348
conn->doq_socket = c->doq_socket;
usr.sbin/unbound/util/netevent.c
2354
doq_done_with_write_cb(struct comm_point* c, struct doq_conn* conn,
usr.sbin/unbound/util/netevent.c
2358
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2361
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2366
doq_socket_want_write(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2369
if(c->doq_socket->have_blocked_pkt)
usr.sbin/unbound/util/netevent.c
2371
lock_rw_rdlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2372
if(c->doq_socket->table->write_list_first)
usr.sbin/unbound/util/netevent.c
2374
lock_rw_unlock(&c->doq_socket->table->lock);
usr.sbin/unbound/util/netevent.c
2380
doq_socket_write_enable(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2383
if(c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2385
comm_point_listen_for_rw(c, 1, 1);
usr.sbin/unbound/util/netevent.c
2386
c->doq_socket->event_has_write = 1;
usr.sbin/unbound/util/netevent.c
2391
doq_socket_write_disable(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2394
if(!c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2396
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
2397
c->doq_socket->event_has_write = 0;
usr.sbin/unbound/util/netevent.c
2402
doq_write_blocked_pkt(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2405
if(!c->doq_socket->have_blocked_pkt)
usr.sbin/unbound/util/netevent.c
2407
c->doq_socket->have_blocked_pkt = 0;
usr.sbin/unbound/util/netevent.c
2408
if(sldns_buffer_limit(c->doq_socket->blocked_pkt) >
usr.sbin/unbound/util/netevent.c
2409
sldns_buffer_remaining(c->doq_socket->pkt_buf))
usr.sbin/unbound/util/netevent.c
2412
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
2413
sldns_buffer_write(c->doq_socket->pkt_buf,
usr.sbin/unbound/util/netevent.c
2414
sldns_buffer_begin(c->doq_socket->blocked_pkt),
usr.sbin/unbound/util/netevent.c
2415
sldns_buffer_limit(c->doq_socket->blocked_pkt));
usr.sbin/unbound/util/netevent.c
2416
sldns_buffer_flip(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
2417
memcpy(&paddr, c->doq_socket->blocked_paddr, sizeof(paddr));
usr.sbin/unbound/util/netevent.c
2418
doq_send_pkt(c, &paddr, c->doq_socket->blocked_pkt_pi.ecn);
usr.sbin/unbound/util/netevent.c
2419
if(c->doq_socket->have_blocked_pkt)
usr.sbin/unbound/util/netevent.c
2514
struct comm_point* c;
usr.sbin/unbound/util/netevent.c
2521
c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
2522
log_assert(c->type == comm_doq);
usr.sbin/unbound/util/netevent.c
2524
log_assert(c && c->doq_socket->pkt_buf && c->fd == fd);
usr.sbin/unbound/util/netevent.c
2525
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
2532
if(c->doq_socket->have_blocked_pkt) {
usr.sbin/unbound/util/netevent.c
2533
if(!doq_write_blocked_pkt(c)) {
usr.sbin/unbound/util/netevent.c
2537
if(!c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2538
doq_socket_write_enable(c);
usr.sbin/unbound/util/netevent.c
2539
doq_pickup_timer(c);
usr.sbin/unbound/util/netevent.c
2546
num_len = doq_write_list_length(c);
usr.sbin/unbound/util/netevent.c
2547
while((conn = doq_pop_write_conn(c)) != NULL) {
usr.sbin/unbound/util/netevent.c
2562
if(c->doq_socket->have_blocked_pkt) {
usr.sbin/unbound/util/netevent.c
2563
if(!c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2564
doq_socket_write_enable(c);
usr.sbin/unbound/util/netevent.c
2565
doq_pickup_timer(c);
usr.sbin/unbound/util/netevent.c
2581
if(doq_conn_write_streams(c, conn, &err_drop))
usr.sbin/unbound/util/netevent.c
2583
doq_done_with_write_cb(c, conn, err_drop);
usr.sbin/unbound/util/netevent.c
2584
if(c->doq_socket->have_blocked_pkt) {
usr.sbin/unbound/util/netevent.c
2585
if(!c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2586
doq_socket_write_enable(c);
usr.sbin/unbound/util/netevent.c
2587
doq_pickup_timer(c);
usr.sbin/unbound/util/netevent.c
2605
if(c->doq_socket->have_blocked_pkt) {
usr.sbin/unbound/util/netevent.c
2606
if(!c->doq_socket->event_has_write)
usr.sbin/unbound/util/netevent.c
2607
doq_socket_write_enable(c);
usr.sbin/unbound/util/netevent.c
2608
doq_pickup_timer(c);
usr.sbin/unbound/util/netevent.c
2611
sldns_buffer_clear(c->doq_socket->pkt_buf);
usr.sbin/unbound/util/netevent.c
2614
log_assert(sldns_buffer_remaining(c->doq_socket->pkt_buf) > 0);
usr.sbin/unbound/util/netevent.c
2615
if(!doq_recv(c, &paddr, &pkt_continue, &pi)) {
usr.sbin/unbound/util/netevent.c
2636
(int)sldns_buffer_limit(c->doq_socket->pkt_buf),
usr.sbin/unbound/util/netevent.c
2640
if(sldns_buffer_limit(c->doq_socket->pkt_buf) == 0)
usr.sbin/unbound/util/netevent.c
2644
if(!doq_decode_pkt_header_negotiate(c, &paddr, &conn))
usr.sbin/unbound/util/netevent.c
2647
if(!doq_accept(c, &paddr, &conn, &pi))
usr.sbin/unbound/util/netevent.c
2649
if(!doq_conn_write_streams(c, conn, NULL)) {
usr.sbin/unbound/util/netevent.c
2650
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2653
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2663
if(!doq_conn_send_close(c, conn)) {
usr.sbin/unbound/util/netevent.c
2664
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2666
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2677
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2680
if(!doq_conn_recv(c, &paddr, conn, &pi, NULL, &err_drop)) {
usr.sbin/unbound/util/netevent.c
2685
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2687
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2691
if(!doq_conn_write_streams(c, conn, &err_drop)) {
usr.sbin/unbound/util/netevent.c
2693
doq_delete_connection(c, conn);
usr.sbin/unbound/util/netevent.c
2695
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2699
doq_done_setup_timer_and_write(c, conn);
usr.sbin/unbound/util/netevent.c
2704
if(doq_socket_want_write(c))
usr.sbin/unbound/util/netevent.c
2705
doq_socket_write_enable(c);
usr.sbin/unbound/util/netevent.c
2706
else doq_socket_write_disable(c);
usr.sbin/unbound/util/netevent.c
2707
doq_pickup_timer(c);
usr.sbin/unbound/util/netevent.c
2713
const void* quic_sslctx, struct comm_point* c, struct comm_base* base,
usr.sbin/unbound/util/netevent.c
2738
doq_socket->cp = c;
usr.sbin/unbound/util/netevent.c
2818
doq_lookup_conn_stream(struct comm_reply* repinfo, struct comm_point* c,
usr.sbin/unbound/util/netevent.c
2821
log_assert(c->doq_socket);
usr.sbin/unbound/util/netevent.c
2822
if(c->doq_socket->current_conn) {
usr.sbin/unbound/util/netevent.c
2823
*conn = c->doq_socket->current_conn;
usr.sbin/unbound/util/netevent.c
2825
*conn = doq_lookup_repinfo(c->doq_socket->table, repinfo);
usr.sbin/unbound/util/netevent.c
2831
(*conn)->doq_socket = c->doq_socket;
usr.sbin/unbound/util/netevent.c
2840
if(!c->doq_socket->current_conn) {
usr.sbin/unbound/util/netevent.c
2849
if(!c->doq_socket->current_conn) {
usr.sbin/unbound/util/netevent.c
2865
log_assert(repinfo->c->type == comm_doq);
usr.sbin/unbound/util/netevent.c
2866
if(!doq_lookup_conn_stream(repinfo, repinfo->c, &conn, &stream)) {
usr.sbin/unbound/util/netevent.c
2873
if(!doq_stream_send_reply(conn, stream, repinfo->c->buffer))
usr.sbin/unbound/util/netevent.c
2875
if(!repinfo->c->doq_socket->current_conn) {
usr.sbin/unbound/util/netevent.c
2878
doq_done_with_conn_cb(repinfo->c, conn);
usr.sbin/unbound/util/netevent.c
2886
doq_socket_write_enable(repinfo->c);
usr.sbin/unbound/util/netevent.c
2896
log_assert(repinfo->c->type == comm_doq);
usr.sbin/unbound/util/netevent.c
2897
if(!doq_lookup_conn_stream(repinfo, repinfo->c, &conn, &stream)) {
usr.sbin/unbound/util/netevent.c
2904
if(!repinfo->c->doq_socket->current_conn) {
usr.sbin/unbound/util/netevent.c
2907
doq_done_with_conn_cb(repinfo->c, conn);
usr.sbin/unbound/util/netevent.c
2908
doq_socket_write_enable(repinfo->c);
usr.sbin/unbound/util/netevent.c
2913
int adjusted_tcp_timeout(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
2915
if(c->tcp_timeout_msec < TCP_QUERY_TIMEOUT_MINIMUM)
usr.sbin/unbound/util/netevent.c
2917
return c->tcp_timeout_msec;
usr.sbin/unbound/util/netevent.c
2922
setup_tcp_handler(struct comm_point* c, int fd, int cur, int max)
usr.sbin/unbound/util/netevent.c
2925
log_assert(c->type == comm_tcp || c->type == comm_http);
usr.sbin/unbound/util/netevent.c
2926
log_assert(c->fd == -1);
usr.sbin/unbound/util/netevent.c
2927
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
2929
if (c->dnscrypt)
usr.sbin/unbound/util/netevent.c
2930
sldns_buffer_clear(c->dnscrypt_buffer);
usr.sbin/unbound/util/netevent.c
2932
c->tcp_is_reading = 1;
usr.sbin/unbound/util/netevent.c
2933
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
2934
c->tcp_keepalive = 0;
usr.sbin/unbound/util/netevent.c
2949
c->tcp_timeout_msec /= 100;
usr.sbin/unbound/util/netevent.c
2951
c->tcp_timeout_msec /= 500;
usr.sbin/unbound/util/netevent.c
2953
c->tcp_timeout_msec = 0;
usr.sbin/unbound/util/netevent.c
2954
comm_point_start_listening(c, fd, adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
2970
int comm_point_perform_accept(struct comm_point* c,
usr.sbin/unbound/util/netevent.c
2976
new_fd = accept(c->fd, (struct sockaddr*)addr, addrlen);
usr.sbin/unbound/util/netevent.c
2979
new_fd = accept4(c->fd, (struct sockaddr*)addr, addrlen, SOCK_NONBLOCK);
usr.sbin/unbound/util/netevent.c
3000
if(c->ev->base->stop_accept) {
usr.sbin/unbound/util/netevent.c
3001
struct comm_base* b = c->ev->base;
usr.sbin/unbound/util/netevent.c
3047
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
3055
if(c->tcp_conn_limit && c->type == comm_tcp_accept) {
usr.sbin/unbound/util/netevent.c
3056
c->tcl_addr = tcl_addr_lookup(c->tcp_conn_limit, addr, *addrlen);
usr.sbin/unbound/util/netevent.c
3057
if(!tcl_new_connection(c->tcl_addr)) {
usr.sbin/unbound/util/netevent.c
3108
comm_point_tcp_win_bio_cb(struct comm_point* c, void* thessl)
usr.sbin/unbound/util/netevent.c
3117
BIO_set_callback_arg(SSL_get_rbio(ssl), (char*)c->ev->ev);
usr.sbin/unbound/util/netevent.c
3123
BIO_set_callback_arg(SSL_get_wbio(ssl), (char*)c->ev->ev);
usr.sbin/unbound/util/netevent.c
3149
h2_session->c->http2_max_streams}};
usr.sbin/unbound/util/netevent.c
3169
h2_session->c, NULL);
usr.sbin/unbound/util/netevent.c
317
struct ub_event* comm_point_internal(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
319
return c->ev->ev;
usr.sbin/unbound/util/netevent.c
3192
h2_session->c->h2_stream = NULL;
usr.sbin/unbound/util/netevent.c
3200
struct comm_point* c = (struct comm_point*)arg, *c_hdl;
usr.sbin/unbound/util/netevent.c
3202
log_assert(c->type == comm_tcp_accept);
usr.sbin/unbound/util/netevent.c
3207
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
3209
if(!c->tcp_free) {
usr.sbin/unbound/util/netevent.c
3214
c_hdl = c->tcp_free;
usr.sbin/unbound/util/netevent.c
3241
if(!c->ssl) {
usr.sbin/unbound/util/netevent.c
3264
new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3279
if(c->ssl) {
usr.sbin/unbound/util/netevent.c
3280
c_hdl->ssl = incoming_ssl_fd(c->ssl, new_fd);
usr.sbin/unbound/util/netevent.c
3294
log_assert(c_hdl == c->tcp_free);
usr.sbin/unbound/util/netevent.c
3297
c->cur_tcp_count++;
usr.sbin/unbound/util/netevent.c
3298
c->tcp_free = c_hdl->tcp_free;
usr.sbin/unbound/util/netevent.c
3301
if(!c->tcp_free) {
usr.sbin/unbound/util/netevent.c
3303
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
3305
setup_tcp_handler(c_hdl, new_fd, c->cur_tcp_count, c->max_tcp_count);
usr.sbin/unbound/util/netevent.c
3310
reclaim_tcp_handler(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3312
log_assert(c->type == comm_tcp);
usr.sbin/unbound/util/netevent.c
3313
if(c->ssl) {
usr.sbin/unbound/util/netevent.c
3315
SSL_shutdown(c->ssl);
usr.sbin/unbound/util/netevent.c
3316
SSL_free(c->ssl);
usr.sbin/unbound/util/netevent.c
3317
c->ssl = NULL;
usr.sbin/unbound/util/netevent.c
3320
comm_point_close(c);
usr.sbin/unbound/util/netevent.c
3321
if(c->tcp_parent && !c->is_in_tcp_free) {
usr.sbin/unbound/util/netevent.c
3323
log_assert(c->tcp_free == NULL);
usr.sbin/unbound/util/netevent.c
3324
log_assert(c->tcp_parent->cur_tcp_count > 0);
usr.sbin/unbound/util/netevent.c
3325
c->tcp_parent->cur_tcp_count--;
usr.sbin/unbound/util/netevent.c
3326
c->tcp_free = c->tcp_parent->tcp_free;
usr.sbin/unbound/util/netevent.c
3327
c->tcp_parent->tcp_free = c;
usr.sbin/unbound/util/netevent.c
3328
c->is_in_tcp_free = 1;
usr.sbin/unbound/util/netevent.c
3329
if(!c->tcp_free) {
usr.sbin/unbound/util/netevent.c
3331
comm_point_start_listening(c->tcp_parent, -1, -1);
usr.sbin/unbound/util/netevent.c
3334
c->tcp_more_read_again = NULL;
usr.sbin/unbound/util/netevent.c
3335
c->tcp_more_write_again = NULL;
usr.sbin/unbound/util/netevent.c
3336
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
3337
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
3338
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
3343
tcp_callback_writer(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3345
log_assert(c->type == comm_tcp);
usr.sbin/unbound/util/netevent.c
3346
if(!c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3347
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
3348
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
3350
if(c->tcp_do_toggle_rw)
usr.sbin/unbound/util/netevent.c
3351
c->tcp_is_reading = 1;
usr.sbin/unbound/util/netevent.c
3353
if(c->tcp_req_info) {
usr.sbin/unbound/util/netevent.c
3354
tcp_req_info_handle_writedone(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3356
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
3357
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3358
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
3359
if( (*c->callback)(c, c->cb_arg, NETEVENT_PKT_WRITTEN,
usr.sbin/unbound/util/netevent.c
3360
&c->repinfo) ) {
usr.sbin/unbound/util/netevent.c
3361
comm_point_start_listening(c, -1,
usr.sbin/unbound/util/netevent.c
3362
adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
3365
comm_point_start_listening(c, -1,
usr.sbin/unbound/util/netevent.c
3366
adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
3373
tcp_callback_reader(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3375
log_assert(c->type == comm_tcp || c->type == comm_local);
usr.sbin/unbound/util/netevent.c
3376
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
3377
if(c->tcp_do_toggle_rw)
usr.sbin/unbound/util/netevent.c
3378
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
3379
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
3380
if(c->tcp_req_info) {
usr.sbin/unbound/util/netevent.c
3381
tcp_req_info_handle_readdone(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3383
if(c->type == comm_tcp)
usr.sbin/unbound/util/netevent.c
3384
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
3385
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
3386
if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo) ) {
usr.sbin/unbound/util/netevent.c
3387
comm_point_start_listening(c, -1,
usr.sbin/unbound/util/netevent.c
3388
adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
3424
ssl_handshake(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3427
if(c->ssl_shake_state == comm_ssl_shake_hs_read) {
usr.sbin/unbound/util/netevent.c
3429
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3430
c->ssl_shake_state = comm_ssl_shake_none;
usr.sbin/unbound/util/netevent.c
3433
if(c->ssl_shake_state == comm_ssl_shake_hs_write) {
usr.sbin/unbound/util/netevent.c
3435
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
3436
c->ssl_shake_state = comm_ssl_shake_none;
usr.sbin/unbound/util/netevent.c
3441
r = SSL_do_handshake(c->ssl);
usr.sbin/unbound/util/netevent.c
3443
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3445
if(c->ssl_shake_state == comm_ssl_shake_read)
usr.sbin/unbound/util/netevent.c
3447
c->ssl_shake_state = comm_ssl_shake_read;
usr.sbin/unbound/util/netevent.c
3448
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
3451
if(c->ssl_shake_state == comm_ssl_shake_write)
usr.sbin/unbound/util/netevent.c
3453
c->ssl_shake_state = comm_ssl_shake_write;
usr.sbin/unbound/util/netevent.c
3454
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3469
(struct sockaddr*)&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3470
c->repinfo.remote_addrlen))
usr.sbin/unbound/util/netevent.c
3484
if((vr=SSL_get_verify_result(c->ssl)) != 0)
usr.sbin/unbound/util/netevent.c
3489
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3490
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3496
if((SSL_get_verify_mode(c->ssl)&SSL_VERIFY_PEER)) {
usr.sbin/unbound/util/netevent.c
3498
if(SSL_get_verify_result(c->ssl) == X509_V_OK) {
usr.sbin/unbound/util/netevent.c
3500
X509* x = SSL_get1_peer_certificate(c->ssl);
usr.sbin/unbound/util/netevent.c
3502
X509* x = SSL_get_peer_certificate(c->ssl);
usr.sbin/unbound/util/netevent.c
3507
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3508
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3513
if(SSL_get0_peername(c->ssl)) {
usr.sbin/unbound/util/netevent.c
3517
SSL_get0_peername(c->ssl));
usr.sbin/unbound/util/netevent.c
3518
log_addr(VERB_ALGO, buf, &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3519
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3523
"authenticated", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3524
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3531
X509* x = SSL_get1_peer_certificate(c->ssl);
usr.sbin/unbound/util/netevent.c
3533
X509* x = SSL_get_peer_certificate(c->ssl);
usr.sbin/unbound/util/netevent.c
3541
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3542
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3548
log_addr(VERB_ALGO, "SSL connection", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3549
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3554
if(c->type == comm_http && c->h2_session) {
usr.sbin/unbound/util/netevent.c
3557
SSL_get0_alpn_selected(c->ssl, &alpn, &alpnlen);
usr.sbin/unbound/util/netevent.c
3560
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
3561
c->use_h2 = 1;
usr.sbin/unbound/util/netevent.c
3570
if(c->tcp_is_reading) {
usr.sbin/unbound/util/netevent.c
3571
if(c->ssl_shake_state != comm_ssl_shake_read)
usr.sbin/unbound/util/netevent.c
3572
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
3574
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3576
c->ssl_shake_state = comm_ssl_shake_none;
usr.sbin/unbound/util/netevent.c
3583
ssl_handle_read(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3587
if(c->ssl_shake_state != comm_ssl_shake_none) {
usr.sbin/unbound/util/netevent.c
3588
if(!ssl_handshake(c))
usr.sbin/unbound/util/netevent.c
3590
if(c->ssl_shake_state != comm_ssl_shake_none)
usr.sbin/unbound/util/netevent.c
3593
if(c->pp2_enabled && c->pp2_header_state != pp2_header_done) {
usr.sbin/unbound/util/netevent.c
3597
if(c->pp2_header_state == pp2_header_none) {
usr.sbin/unbound/util/netevent.c
3599
if(sldns_buffer_remaining(c->buffer)<want_read_size) {
usr.sbin/unbound/util/netevent.c
3602
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3603
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3610
if(c->tcp_byte_count < current_read_size) {
usr.sbin/unbound/util/netevent.c
3612
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(
usr.sbin/unbound/util/netevent.c
3613
c->buffer, c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
3615
c->tcp_byte_count)) <= 0) {
usr.sbin/unbound/util/netevent.c
3616
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3618
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
3619
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3623
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
3627
c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
3628
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3644
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
3645
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
3646
if(c->tcp_byte_count != current_read_size) return 1;
usr.sbin/unbound/util/netevent.c
3647
c->pp2_header_state = pp2_header_init;
usr.sbin/unbound/util/netevent.c
3650
if(c->pp2_header_state == pp2_header_init) {
usr.sbin/unbound/util/netevent.c
3653
sldns_buffer_begin(c->buffer),
usr.sbin/unbound/util/netevent.c
3654
sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
3661
header = (struct pp2_header*)sldns_buffer_begin(c->buffer);
usr.sbin/unbound/util/netevent.c
3663
if(sldns_buffer_limit(c->buffer) <
usr.sbin/unbound/util/netevent.c
3667
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3668
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3677
c->pp2_header_state = pp2_header_done;
usr.sbin/unbound/util/netevent.c
3678
} else if(c->tcp_byte_count < current_read_size) {
usr.sbin/unbound/util/netevent.c
3680
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(
usr.sbin/unbound/util/netevent.c
3681
c->buffer, c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
3683
c->tcp_byte_count)) <= 0) {
usr.sbin/unbound/util/netevent.c
3684
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3686
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
3687
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3691
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
3695
c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
3696
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3712
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
3713
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
3714
if(c->tcp_byte_count != current_read_size) return 1;
usr.sbin/unbound/util/netevent.c
3715
c->pp2_header_state = pp2_header_done;
usr.sbin/unbound/util/netevent.c
3718
if(c->pp2_header_state != pp2_header_done || !header) {
usr.sbin/unbound/util/netevent.c
3720
"PROXYv2 header", "", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3721
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3724
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
3725
if(!consume_pp2_header(c->buffer, &c->repinfo, 1)) {
usr.sbin/unbound/util/netevent.c
3727
"PROXYv2 header", "", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
3728
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
3735
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
3736
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
3739
if(c->tcp_byte_count < sizeof(uint16_t)) {
usr.sbin/unbound/util/netevent.c
3742
if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(c->buffer,
usr.sbin/unbound/util/netevent.c
3743
c->tcp_byte_count), (int)(sizeof(uint16_t) -
usr.sbin/unbound/util/netevent.c
3744
c->tcp_byte_count))) <= 0) {
usr.sbin/unbound/util/netevent.c
3745
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3747
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
3748
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3752
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
3756
c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
3757
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3772
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
3773
if(c->tcp_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
3775
if(sldns_buffer_read_u16_at(c->buffer, 0) >
usr.sbin/unbound/util/netevent.c
3776
sldns_buffer_capacity(c->buffer)) {
usr.sbin/unbound/util/netevent.c
3780
sldns_buffer_set_limit(c->buffer,
usr.sbin/unbound/util/netevent.c
3781
sldns_buffer_read_u16_at(c->buffer, 0));
usr.sbin/unbound/util/netevent.c
3782
if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
usr.sbin/unbound/util/netevent.c
3786
sldns_buffer_skip(c->buffer, (ssize_t)(c->tcp_byte_count-sizeof(uint16_t)));
usr.sbin/unbound/util/netevent.c
3788
(int)sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
3790
if(sldns_buffer_remaining(c->buffer) > 0) {
usr.sbin/unbound/util/netevent.c
3792
r = SSL_read(c->ssl, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
3793
(int)sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
3795
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3797
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
3798
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
3802
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
3806
c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
3807
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
3822
sldns_buffer_skip(c->buffer, (ssize_t)r);
usr.sbin/unbound/util/netevent.c
3824
if(sldns_buffer_remaining(c->buffer) <= 0) {
usr.sbin/unbound/util/netevent.c
3825
tcp_callback_reader(c);
usr.sbin/unbound/util/netevent.c
3829
(void)c;
usr.sbin/unbound/util/netevent.c
3836
ssl_handle_write(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
3840
if(c->ssl_shake_state != comm_ssl_shake_none) {
usr.sbin/unbound/util/netevent.c
3841
if(!ssl_handshake(c))
usr.sbin/unbound/util/netevent.c
3843
if(c->ssl_shake_state != comm_ssl_shake_none)
usr.sbin/unbound/util/netevent.c
3847
(void)SSL_set_mode(c->ssl, (long)SSL_MODE_ENABLE_PARTIAL_WRITE);
usr.sbin/unbound/util/netevent.c
3848
if((c->tcp_write_and_read?c->tcp_write_byte_count:c->tcp_byte_count) < sizeof(uint16_t)) {
usr.sbin/unbound/util/netevent.c
3849
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
3851
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3852
if(c->tcp_write_pkt_len + 2 < LDNS_RR_BUF_SIZE) {
usr.sbin/unbound/util/netevent.c
3858
c->tcp_write_pkt,
usr.sbin/unbound/util/netevent.c
3859
c->tcp_write_pkt_len);
usr.sbin/unbound/util/netevent.c
3860
r = SSL_write(c->ssl,
usr.sbin/unbound/util/netevent.c
3861
(void*)(buf+c->tcp_write_byte_count),
usr.sbin/unbound/util/netevent.c
3862
c->tcp_write_pkt_len + 2 -
usr.sbin/unbound/util/netevent.c
3863
c->tcp_write_byte_count);
usr.sbin/unbound/util/netevent.c
3865
r = SSL_write(c->ssl,
usr.sbin/unbound/util/netevent.c
3866
(void*)(((uint8_t*)&len)+c->tcp_write_byte_count),
usr.sbin/unbound/util/netevent.c
3867
(int)(sizeof(uint16_t)-c->tcp_write_byte_count));
usr.sbin/unbound/util/netevent.c
3869
} else if(sizeof(uint16_t)+sldns_buffer_remaining(c->buffer) <
usr.sbin/unbound/util/netevent.c
3876
sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
3877
sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
3878
r = SSL_write(c->ssl, (void*)(buf+c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
3880
sldns_buffer_remaining(c->buffer)
usr.sbin/unbound/util/netevent.c
3881
- c->tcp_byte_count));
usr.sbin/unbound/util/netevent.c
3883
r = SSL_write(c->ssl,
usr.sbin/unbound/util/netevent.c
3884
(void*)(((uint8_t*)&len)+c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
3885
(int)(sizeof(uint16_t)-c->tcp_byte_count));
usr.sbin/unbound/util/netevent.c
3888
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3892
c->ssl_shake_state = comm_ssl_shake_hs_read;
usr.sbin/unbound/util/netevent.c
3893
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
3897
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
3913
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3914
c->tcp_write_byte_count += r;
usr.sbin/unbound/util/netevent.c
3915
if(c->tcp_write_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
3918
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
3919
if(c->tcp_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
3921
sldns_buffer_set_position(c->buffer, c->tcp_byte_count -
usr.sbin/unbound/util/netevent.c
3924
if((!c->tcp_write_and_read && sldns_buffer_remaining(c->buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
usr.sbin/unbound/util/netevent.c
3925
tcp_callback_writer(c);
usr.sbin/unbound/util/netevent.c
3929
log_assert(c->tcp_write_and_read || sldns_buffer_remaining(c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
3930
log_assert(!c->tcp_write_and_read || c->tcp_write_byte_count < c->tcp_write_pkt_len + 2);
usr.sbin/unbound/util/netevent.c
3932
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3933
r = SSL_write(c->ssl, (void*)(c->tcp_write_pkt + c->tcp_write_byte_count - 2),
usr.sbin/unbound/util/netevent.c
3934
(int)(c->tcp_write_pkt_len + 2 - c->tcp_write_byte_count));
usr.sbin/unbound/util/netevent.c
3936
r = SSL_write(c->ssl, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
3937
(int)sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
3940
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
3944
c->ssl_shake_state = comm_ssl_shake_hs_read;
usr.sbin/unbound/util/netevent.c
3945
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
3949
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
396
comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
usr.sbin/unbound/util/netevent.c
3965
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
3966
c->tcp_write_byte_count += r;
usr.sbin/unbound/util/netevent.c
3968
sldns_buffer_skip(c->buffer, (ssize_t)r);
usr.sbin/unbound/util/netevent.c
3971
if((!c->tcp_write_and_read && sldns_buffer_remaining(c->buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
usr.sbin/unbound/util/netevent.c
3972
tcp_callback_writer(c);
usr.sbin/unbound/util/netevent.c
3976
(void)c;
usr.sbin/unbound/util/netevent.c
3983
ssl_handle_it(struct comm_point* c, int is_write)
usr.sbin/unbound/util/netevent.c
3987
if(is_write && c->ssl_shake_state == comm_ssl_shake_hs_write)
usr.sbin/unbound/util/netevent.c
3988
return ssl_handle_read(c);
usr.sbin/unbound/util/netevent.c
3989
else if(!is_write && c->ssl_shake_state == comm_ssl_shake_hs_read)
usr.sbin/unbound/util/netevent.c
3990
return ssl_handle_write(c);
usr.sbin/unbound/util/netevent.c
3994
return ssl_handle_read(c);
usr.sbin/unbound/util/netevent.c
3995
return ssl_handle_write(c);
usr.sbin/unbound/util/netevent.c
400
log_assert(c->fd != -1);
usr.sbin/unbound/util/netevent.c
4006
comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok)
usr.sbin/unbound/util/netevent.c
4010
log_assert(c->type == comm_tcp || c->type == comm_local);
usr.sbin/unbound/util/netevent.c
4011
if(c->ssl)
usr.sbin/unbound/util/netevent.c
4012
return ssl_handle_it(c, 0);
usr.sbin/unbound/util/netevent.c
4013
if(!c->tcp_is_reading && !c->tcp_write_and_read)
usr.sbin/unbound/util/netevent.c
4017
if(c->pp2_enabled && c->pp2_header_state != pp2_header_done) {
usr.sbin/unbound/util/netevent.c
4021
if(c->pp2_header_state == pp2_header_none) {
usr.sbin/unbound/util/netevent.c
4023
if(sldns_buffer_remaining(c->buffer)<want_read_size) {
usr.sbin/unbound/util/netevent.c
4026
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4027
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4034
if(c->tcp_byte_count < current_read_size) {
usr.sbin/unbound/util/netevent.c
4035
r = recv(fd, (void*)sldns_buffer_at(c->buffer,
usr.sbin/unbound/util/netevent.c
4036
c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
4037
current_read_size-c->tcp_byte_count, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
4039
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
4040
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
4045
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
4046
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
4047
if(c->tcp_byte_count != current_read_size) return 1;
usr.sbin/unbound/util/netevent.c
4048
c->pp2_header_state = pp2_header_init;
usr.sbin/unbound/util/netevent.c
4051
if(c->pp2_header_state == pp2_header_init) {
usr.sbin/unbound/util/netevent.c
4054
sldns_buffer_begin(c->buffer),
usr.sbin/unbound/util/netevent.c
4055
sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
4062
header = (struct pp2_header*)sldns_buffer_begin(c->buffer);
usr.sbin/unbound/util/netevent.c
4064
if(sldns_buffer_limit(c->buffer) <
usr.sbin/unbound/util/netevent.c
4068
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4069
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
407
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
usr.sbin/unbound/util/netevent.c
4078
c->pp2_header_state = pp2_header_done;
usr.sbin/unbound/util/netevent.c
4079
} else if(c->tcp_byte_count < current_read_size) {
usr.sbin/unbound/util/netevent.c
4080
r = recv(fd, (void*)sldns_buffer_at(c->buffer,
usr.sbin/unbound/util/netevent.c
4081
c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
4082
current_read_size-c->tcp_byte_count, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
4084
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
4085
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
4090
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
4091
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
4092
if(c->tcp_byte_count != current_read_size) return 1;
usr.sbin/unbound/util/netevent.c
4093
c->pp2_header_state = pp2_header_done;
usr.sbin/unbound/util/netevent.c
4096
if(c->pp2_header_state != pp2_header_done || !header) {
usr.sbin/unbound/util/netevent.c
4098
"PROXYv2 header", "", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4099
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4102
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
4103
if(!consume_pp2_header(c->buffer, &c->repinfo, 1)) {
usr.sbin/unbound/util/netevent.c
4105
"PROXYv2 header", "", &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4106
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
411
sent = send(c->fd, (void*)sldns_buffer_begin(packet),
usr.sbin/unbound/util/netevent.c
4113
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
4114
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
4118
if(c->tcp_byte_count < sizeof(uint16_t)) {
usr.sbin/unbound/util/netevent.c
4120
r = recv(fd,(void*)sldns_buffer_at(c->buffer,c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
4121
sizeof(uint16_t)-c->tcp_byte_count, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
4123
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
4124
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
4127
if(c->pp2_enabled) goto recv_error;
usr.sbin/unbound/util/netevent.c
4130
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
4131
if(c->tcp_byte_count != sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
4133
if(sldns_buffer_read_u16_at(c->buffer, 0) >
usr.sbin/unbound/util/netevent.c
4134
sldns_buffer_capacity(c->buffer)) {
usr.sbin/unbound/util/netevent.c
4138
sldns_buffer_set_limit(c->buffer,
usr.sbin/unbound/util/netevent.c
4139
sldns_buffer_read_u16_at(c->buffer, 0));
usr.sbin/unbound/util/netevent.c
4141
sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) {
usr.sbin/unbound/util/netevent.c
4146
(int)sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
4149
if(sldns_buffer_remaining(c->buffer) == 0)
usr.sbin/unbound/util/netevent.c
4153
r = recv(fd, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
4154
sldns_buffer_remaining(c->buffer), MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
4156
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
4157
return tcp_req_info_handle_read_close(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
4162
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
4163
if(sldns_buffer_remaining(c->buffer) <= 0) {
usr.sbin/unbound/util/netevent.c
4164
tcp_callback_reader(c);
usr.sbin/unbound/util/netevent.c
4210
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4211
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4234
ub_winsock_tcp_wouldblock(c->ev->ev,
usr.sbin/unbound/util/netevent.c
4240
sock_strerror(errno), &c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4241
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4252
comm_point_tcp_handle_write(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4256
log_assert(c->type == comm_tcp);
usr.sbin/unbound/util/netevent.c
4258
buffer = c->dnscrypt_buffer;
usr.sbin/unbound/util/netevent.c
4260
buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
4262
if(c->tcp_is_reading && !c->ssl && !c->tcp_write_and_read)
usr.sbin/unbound/util/netevent.c
4265
if(((!c->tcp_write_and_read && c->tcp_byte_count == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == 0)) && c->tcp_check_nb_connect) {
usr.sbin/unbound/util/netevent.c
4288
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4289
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4295
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
4301
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4302
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4307
if(c->ssl)
usr.sbin/unbound/util/netevent.c
4308
return ssl_handle_it(c, 1);
usr.sbin/unbound/util/netevent.c
4314
if(c->tcp_do_fastopen == 1) {
usr.sbin/unbound/util/netevent.c
4317
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(buffer));
usr.sbin/unbound/util/netevent.c
4320
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
4322
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4323
iov[0].iov_base = (uint8_t*)&len + c->tcp_write_byte_count;
usr.sbin/unbound/util/netevent.c
4324
iov[0].iov_len = sizeof(uint16_t) - c->tcp_write_byte_count;
usr.sbin/unbound/util/netevent.c
4325
iov[1].iov_base = c->tcp_write_pkt;
usr.sbin/unbound/util/netevent.c
4326
iov[1].iov_len = c->tcp_write_pkt_len;
usr.sbin/unbound/util/netevent.c
4328
iov[0].iov_base = (uint8_t*)&len + c->tcp_byte_count;
usr.sbin/unbound/util/netevent.c
4329
iov[0].iov_len = sizeof(uint16_t) - c->tcp_byte_count;
usr.sbin/unbound/util/netevent.c
4334
msg.msg_name = &c->repinfo.remote_addr;
usr.sbin/unbound/util/netevent.c
4335
msg.msg_namelen = c->repinfo.remote_addrlen;
usr.sbin/unbound/util/netevent.c
4361
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4362
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4369
if(connect(fd, (struct sockaddr *)&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4370
c->repinfo.remote_addrlen) == -1) {
usr.sbin/unbound/util/netevent.c
4381
(struct sockaddr *)&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4382
c->repinfo.remote_addrlen)) {
usr.sbin/unbound/util/netevent.c
4385
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4386
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4392
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4393
c->tcp_write_byte_count += r;
usr.sbin/unbound/util/netevent.c
4394
if(c->tcp_write_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
4397
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
4398
if(c->tcp_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
4400
sldns_buffer_set_position(buffer, c->tcp_byte_count -
usr.sbin/unbound/util/netevent.c
4403
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
usr.sbin/unbound/util/netevent.c
4404
tcp_callback_writer(c);
usr.sbin/unbound/util/netevent.c
4411
if((c->tcp_write_and_read?c->tcp_write_byte_count:c->tcp_byte_count) < sizeof(uint16_t)) {
usr.sbin/unbound/util/netevent.c
4412
uint16_t len = htons(c->tcp_write_and_read?c->tcp_write_pkt_len:sldns_buffer_limit(buffer));
usr.sbin/unbound/util/netevent.c
4415
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4416
iov[0].iov_base = (uint8_t*)&len + c->tcp_write_byte_count;
usr.sbin/unbound/util/netevent.c
4417
iov[0].iov_len = sizeof(uint16_t) - c->tcp_write_byte_count;
usr.sbin/unbound/util/netevent.c
4418
iov[1].iov_base = c->tcp_write_pkt;
usr.sbin/unbound/util/netevent.c
4419
iov[1].iov_len = c->tcp_write_pkt_len;
usr.sbin/unbound/util/netevent.c
4421
iov[0].iov_base = (uint8_t*)&len + c->tcp_byte_count;
usr.sbin/unbound/util/netevent.c
4422
iov[0].iov_len = sizeof(uint16_t) - c->tcp_byte_count;
usr.sbin/unbound/util/netevent.c
4429
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4430
r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_write_byte_count),
usr.sbin/unbound/util/netevent.c
4431
sizeof(uint16_t)-c->tcp_write_byte_count, 0);
usr.sbin/unbound/util/netevent.c
4433
r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_byte_count),
usr.sbin/unbound/util/netevent.c
4434
sizeof(uint16_t)-c->tcp_byte_count, 0);
usr.sbin/unbound/util/netevent.c
4451
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4452
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4455
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4456
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4464
ub_winsock_tcp_wouldblock(c->ev->ev,
usr.sbin/unbound/util/netevent.c
4472
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4473
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4477
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4478
c->tcp_write_byte_count += r;
usr.sbin/unbound/util/netevent.c
4479
if(c->tcp_write_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
4482
c->tcp_byte_count += r;
usr.sbin/unbound/util/netevent.c
4483
if(c->tcp_byte_count < sizeof(uint16_t))
usr.sbin/unbound/util/netevent.c
4485
sldns_buffer_set_position(buffer, c->tcp_byte_count -
usr.sbin/unbound/util/netevent.c
4488
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
usr.sbin/unbound/util/netevent.c
4489
tcp_callback_writer(c);
usr.sbin/unbound/util/netevent.c
4493
log_assert(c->tcp_write_and_read || sldns_buffer_remaining(buffer) > 0);
usr.sbin/unbound/util/netevent.c
4494
log_assert(!c->tcp_write_and_read || c->tcp_write_byte_count < c->tcp_write_pkt_len + 2);
usr.sbin/unbound/util/netevent.c
4495
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4496
r = send(fd, (void*)(c->tcp_write_pkt + c->tcp_write_byte_count - 2),
usr.sbin/unbound/util/netevent.c
4497
c->tcp_write_pkt_len + 2 - c->tcp_write_byte_count, 0);
usr.sbin/unbound/util/netevent.c
4514
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
4521
&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
4522
c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4525
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
4526
c->tcp_write_byte_count += r;
usr.sbin/unbound/util/netevent.c
4531
if((!c->tcp_write_and_read && sldns_buffer_remaining(buffer) == 0) || (c->tcp_write_and_read && c->tcp_write_byte_count == c->tcp_write_pkt_len + 2)) {
usr.sbin/unbound/util/netevent.c
4532
tcp_callback_writer(c);
usr.sbin/unbound/util/netevent.c
4541
tcp_req_info_read_again(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4543
while(c->tcp_req_info->read_again) {
usr.sbin/unbound/util/netevent.c
4545
c->tcp_req_info->read_again = 0;
usr.sbin/unbound/util/netevent.c
4546
if(c->tcp_is_reading)
usr.sbin/unbound/util/netevent.c
4547
r = comm_point_tcp_handle_read(fd, c, 0);
usr.sbin/unbound/util/netevent.c
4548
else r = comm_point_tcp_handle_write(fd, c);
usr.sbin/unbound/util/netevent.c
4550
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4551
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4553
c->callback));
usr.sbin/unbound/util/netevent.c
4554
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4565
tcp_more_read_again(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4571
int* moreread = c->tcp_more_read_again;
usr.sbin/unbound/util/netevent.c
4574
if(!comm_point_tcp_handle_read(fd, c, 0)) {
usr.sbin/unbound/util/netevent.c
4575
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4576
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4578
c->callback));
usr.sbin/unbound/util/netevent.c
4579
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
458
p.fd = c->fd;
usr.sbin/unbound/util/netevent.c
4589
tcp_more_write_again(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4595
int* morewrite = c->tcp_more_write_again;
usr.sbin/unbound/util/netevent.c
4598
if(!comm_point_tcp_handle_write(fd, c)) {
usr.sbin/unbound/util/netevent.c
4599
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4600
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4602
c->callback));
usr.sbin/unbound/util/netevent.c
4603
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4614
struct comm_point* c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
4615
log_assert(c->type == comm_tcp);
usr.sbin/unbound/util/netevent.c
4616
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
4618
if(c->fd == -1 || c->fd != fd)
usr.sbin/unbound/util/netevent.c
4623
if(c->tcp_parent) {
usr.sbin/unbound/util/netevent.c
4624
c->dnscrypt = c->tcp_parent->dnscrypt;
usr.sbin/unbound/util/netevent.c
4626
if(c->dnscrypt && c->dnscrypt_buffer == c->buffer) {
usr.sbin/unbound/util/netevent.c
4627
c->dnscrypt_buffer = sldns_buffer_new(sldns_buffer_capacity(c->buffer));
usr.sbin/unbound/util/netevent.c
4628
if(!c->dnscrypt_buffer) {
usr.sbin/unbound/util/netevent.c
4630
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4631
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4633
c->callback));
usr.sbin/unbound/util/netevent.c
4634
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4644
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4645
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4646
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
4647
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4654
&& !(c->tcp_do_fastopen && (event&UB_EV_WRITE))
usr.sbin/unbound/util/netevent.c
4657
int has_tcpq = (c->tcp_req_info != NULL);
usr.sbin/unbound/util/netevent.c
4658
int* moreread = c->tcp_more_read_again;
usr.sbin/unbound/util/netevent.c
4659
if(!comm_point_tcp_handle_read(fd, c, 0)) {
usr.sbin/unbound/util/netevent.c
4660
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4661
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4663
c->callback));
usr.sbin/unbound/util/netevent.c
4664
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4669
if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again) {
usr.sbin/unbound/util/netevent.c
4670
if(!tcp_req_info_read_again(fd, c))
usr.sbin/unbound/util/netevent.c
4674
tcp_more_read_again(fd, c);
usr.sbin/unbound/util/netevent.c
4678
int has_tcpq = (c->tcp_req_info != NULL);
usr.sbin/unbound/util/netevent.c
4679
int* morewrite = c->tcp_more_write_again;
usr.sbin/unbound/util/netevent.c
4680
if(!comm_point_tcp_handle_write(fd, c)) {
usr.sbin/unbound/util/netevent.c
4681
reclaim_tcp_handler(c);
usr.sbin/unbound/util/netevent.c
4682
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
4684
c->callback));
usr.sbin/unbound/util/netevent.c
4685
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
4690
if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again) {
usr.sbin/unbound/util/netevent.c
4691
if(!tcp_req_info_read_again(fd, c))
usr.sbin/unbound/util/netevent.c
4695
tcp_more_write_again(fd, c);
usr.sbin/unbound/util/netevent.c
4703
reclaim_http_handler(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4705
log_assert(c->type == comm_http);
usr.sbin/unbound/util/netevent.c
4706
if(c->ssl) {
usr.sbin/unbound/util/netevent.c
4708
SSL_shutdown(c->ssl);
usr.sbin/unbound/util/netevent.c
4709
SSL_free(c->ssl);
usr.sbin/unbound/util/netevent.c
4710
c->ssl = NULL;
usr.sbin/unbound/util/netevent.c
4713
comm_point_close(c);
usr.sbin/unbound/util/netevent.c
4714
if(c->tcp_parent && !c->is_in_tcp_free) {
usr.sbin/unbound/util/netevent.c
4716
log_assert(c->tcp_free == NULL);
usr.sbin/unbound/util/netevent.c
4717
log_assert(c->tcp_parent->cur_tcp_count > 0);
usr.sbin/unbound/util/netevent.c
4718
c->tcp_parent->cur_tcp_count--;
usr.sbin/unbound/util/netevent.c
4719
c->tcp_free = c->tcp_parent->tcp_free;
usr.sbin/unbound/util/netevent.c
472
struct comm_base* b = c->ev->base;
usr.sbin/unbound/util/netevent.c
4720
c->tcp_parent->tcp_free = c;
usr.sbin/unbound/util/netevent.c
4721
c->is_in_tcp_free = 1;
usr.sbin/unbound/util/netevent.c
4722
if(!c->tcp_free) {
usr.sbin/unbound/util/netevent.c
4724
comm_point_start_listening(c->tcp_parent, -1, -1);
usr.sbin/unbound/util/netevent.c
4731
ssl_http_read_more(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4735
log_assert(sldns_buffer_remaining(c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
4737
r = SSL_read(c->ssl, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
4738
(int)sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
4740
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
4746
c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
4747
comm_point_listen_for_rw(c, 0, 1);
usr.sbin/unbound/util/netevent.c
4763
(int)sldns_buffer_position(c->buffer), (int)r);
usr.sbin/unbound/util/netevent.c
4764
sldns_buffer_skip(c->buffer, (ssize_t)r);
usr.sbin/unbound/util/netevent.c
4767
(void)c;
usr.sbin/unbound/util/netevent.c
4774
http_read_more(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4777
log_assert(sldns_buffer_remaining(c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
4778
r = recv(fd, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
4779
sldns_buffer_remaining(c->buffer), MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
4792
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
4797
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
4801
(int)sldns_buffer_position(c->buffer), (int)r);
usr.sbin/unbound/util/netevent.c
4802
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
4853
http_process_initial_header(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4855
char* line = http_header_line(c->buffer);
usr.sbin/unbound/util/netevent.c
4865
if(!c->http_is_chunked) {
usr.sbin/unbound/util/netevent.c
4874
c->tcp_byte_count = (size_t)cl;
usr.sbin/unbound/util/netevent.c
4877
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
4878
c->http_is_chunked = 1;
usr.sbin/unbound/util/netevent.c
4881
c->http_in_headers = 0;
usr.sbin/unbound/util/netevent.c
4882
if(c->http_is_chunked)
usr.sbin/unbound/util/netevent.c
4883
c->http_in_chunk_headers = 1;
usr.sbin/unbound/util/netevent.c
4888
http_moveover_buffer(c->buffer);
usr.sbin/unbound/util/netevent.c
4889
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
4899
http_process_chunk_header(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4901
char* line = http_header_line(c->buffer);
usr.sbin/unbound/util/netevent.c
4903
if(c->http_in_chunk_headers == 3) {
usr.sbin/unbound/util/netevent.c
4906
if(line[0] == 0 && c->tcp_byte_count == 0) {
usr.sbin/unbound/util/netevent.c
4909
sldns_buffer_set_position(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
4910
sldns_buffer_set_limit(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
4911
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
4912
(void)(*c->callback)(c, c->cb_arg, NETEVENT_DONE, NULL);
usr.sbin/unbound/util/netevent.c
4918
c->http_in_chunk_headers = 1;
usr.sbin/unbound/util/netevent.c
4920
http_moveover_buffer(c->buffer);
usr.sbin/unbound/util/netevent.c
4921
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
4928
if(c->http_in_chunk_headers == 1) {
usr.sbin/unbound/util/netevent.c
4939
c->tcp_byte_count = (size_t)chunk_sz;
usr.sbin/unbound/util/netevent.c
4940
c->http_in_chunk_headers = 0;
usr.sbin/unbound/util/netevent.c
4942
http_moveover_buffer(c->buffer);
usr.sbin/unbound/util/netevent.c
4943
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
4944
if(c->tcp_byte_count == 0) {
usr.sbin/unbound/util/netevent.c
4946
c->http_in_chunk_headers = 3;
usr.sbin/unbound/util/netevent.c
4956
http_nonchunk_segment(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
4963
size_t got_now = sldns_buffer_limit(c->buffer);
usr.sbin/unbound/util/netevent.c
4964
if(c->tcp_byte_count <= got_now) {
usr.sbin/unbound/util/netevent.c
4966
c->http_stored = 0;
usr.sbin/unbound/util/netevent.c
4967
sldns_buffer_set_position(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
4968
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
4969
(void)(*c->callback)(c, c->cb_arg, NETEVENT_DONE, NULL);
usr.sbin/unbound/util/netevent.c
4974
remainbufferlen = sldns_buffer_capacity(c->buffer) -
usr.sbin/unbound/util/netevent.c
4975
sldns_buffer_limit(c->buffer);
usr.sbin/unbound/util/netevent.c
4976
if(remainbufferlen+got_now >= c->tcp_byte_count ||
usr.sbin/unbound/util/netevent.c
4977
remainbufferlen >= (size_t)(c->ssl?16384:2048)) {
usr.sbin/unbound/util/netevent.c
4978
size_t total = sldns_buffer_limit(c->buffer);
usr.sbin/unbound/util/netevent.c
4979
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
4980
sldns_buffer_set_position(c->buffer, total);
usr.sbin/unbound/util/netevent.c
4981
c->http_stored = total;
usr.sbin/unbound/util/netevent.c
4987
c->tcp_byte_count -= got_now;
usr.sbin/unbound/util/netevent.c
4988
c->http_stored = 0;
usr.sbin/unbound/util/netevent.c
4989
sldns_buffer_set_position(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
4990
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
4991
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, NULL);
usr.sbin/unbound/util/netevent.c
4999
http_chunked_segment(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5006
size_t got_now = sldns_buffer_limit(c->buffer) - c->http_stored;
usr.sbin/unbound/util/netevent.c
5007
verbose(VERB_ALGO, "http_chunked_segment: got now %d, tcpbytcount %d, http_stored %d, buffer pos %d, buffer limit %d", (int)got_now, (int)c->tcp_byte_count, (int)c->http_stored, (int)sldns_buffer_position(c->buffer), (int)sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
5008
if(c->tcp_byte_count <= got_now) {
usr.sbin/unbound/util/netevent.c
5014
c->http_stored = 0;
usr.sbin/unbound/util/netevent.c
5015
sldns_buffer_skip(c->buffer, (ssize_t)c->tcp_byte_count);
usr.sbin/unbound/util/netevent.c
5016
sldns_buffer_clear(c->http_temp);
usr.sbin/unbound/util/netevent.c
5017
sldns_buffer_write(c->http_temp,
usr.sbin/unbound/util/netevent.c
5018
sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
5019
sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
5020
sldns_buffer_flip(c->http_temp);
usr.sbin/unbound/util/netevent.c
5023
fraglen = sldns_buffer_position(c->buffer);
usr.sbin/unbound/util/netevent.c
5024
sldns_buffer_set_position(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
5025
sldns_buffer_set_limit(c->buffer, fraglen);
usr.sbin/unbound/util/netevent.c
5026
repinfo = c->repinfo;
usr.sbin/unbound/util/netevent.c
5027
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
5028
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &repinfo);
usr.sbin/unbound/util/netevent.c
5032
if(!repinfo.c) {
usr.sbin/unbound/util/netevent.c
5036
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
5037
sldns_buffer_write(c->buffer,
usr.sbin/unbound/util/netevent.c
5038
sldns_buffer_begin(c->http_temp),
usr.sbin/unbound/util/netevent.c
5039
sldns_buffer_remaining(c->http_temp));
usr.sbin/unbound/util/netevent.c
5040
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
5043
c->http_in_chunk_headers = 3;
usr.sbin/unbound/util/netevent.c
5047
c->tcp_byte_count -= got_now;
usr.sbin/unbound/util/netevent.c
5051
remainbufferlen = sldns_buffer_capacity(c->buffer) -
usr.sbin/unbound/util/netevent.c
5052
sldns_buffer_limit(c->buffer);
usr.sbin/unbound/util/netevent.c
5053
if(remainbufferlen >= c->tcp_byte_count ||
usr.sbin/unbound/util/netevent.c
5055
size_t total = sldns_buffer_limit(c->buffer);
usr.sbin/unbound/util/netevent.c
5056
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
5057
sldns_buffer_set_position(c->buffer, total);
usr.sbin/unbound/util/netevent.c
5058
c->http_stored = total;
usr.sbin/unbound/util/netevent.c
5064
c->http_stored = 0;
usr.sbin/unbound/util/netevent.c
5065
sldns_buffer_set_position(c->buffer, 0);
usr.sbin/unbound/util/netevent.c
5066
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
5067
(void)(*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, NULL);
usr.sbin/unbound/util/netevent.c
5075
static struct http2_session* http2_session_create(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5082
session->c = c;
usr.sbin/unbound/util/netevent.c
5171
log_assert(h2_session->c->type == comm_http);
usr.sbin/unbound/util/netevent.c
5172
log_assert(h2_session->c->h2_session);
usr.sbin/unbound/util/netevent.c
5173
if(++h2_session->reads_count > h2_session->c->http2_max_streams) {
usr.sbin/unbound/util/netevent.c
5184
if(h2_session->c->ssl) {
usr.sbin/unbound/util/netevent.c
5187
r = SSL_read(h2_session->c->ssl, buf, len);
usr.sbin/unbound/util/netevent.c
5189
int want = SSL_get_error(h2_session->c->ssl, r);
usr.sbin/unbound/util/netevent.c
5195
h2_session->c->ssl_shake_state = comm_ssl_shake_hs_write;
usr.sbin/unbound/util/netevent.c
5196
comm_point_listen_for_rw(h2_session->c, 0, 1);
usr.sbin/unbound/util/netevent.c
5215
ret = recv(h2_session->c->fd, (void*)buf, len, MSG_DONTWAIT);
usr.sbin/unbound/util/netevent.c
5227
&h2_session->c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
5228
h2_session->c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5235
ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
usr.sbin/unbound/util/netevent.c
5241
&h2_session->c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
5242
h2_session->c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5252
comm_point_http2_handle_read(int ATTR_UNUSED(fd), struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5256
log_assert(c->h2_session);
usr.sbin/unbound/util/netevent.c
5259
ret = nghttp2_session_recv(c->h2_session->session);
usr.sbin/unbound/util/netevent.c
5264
addr_to_str(&c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
5265
c->repinfo.remote_addrlen, a, sizeof(a));
usr.sbin/unbound/util/netevent.c
5271
if(nghttp2_session_want_write(c->h2_session->session)) {
usr.sbin/unbound/util/netevent.c
5272
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
5273
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
5274
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
5275
} else if(!nghttp2_session_want_read(c->h2_session->session))
usr.sbin/unbound/util/netevent.c
5279
(void)c;
usr.sbin/unbound/util/netevent.c
5291
comm_point_http_handle_read(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5293
log_assert(c->type == comm_http);
usr.sbin/unbound/util/netevent.c
5298
if(c->ssl && c->ssl_shake_state != comm_ssl_shake_none) {
usr.sbin/unbound/util/netevent.c
5299
if(!ssl_handshake(c))
usr.sbin/unbound/util/netevent.c
5301
if(c->ssl_shake_state != comm_ssl_shake_none)
usr.sbin/unbound/util/netevent.c
5306
if(!c->tcp_is_reading)
usr.sbin/unbound/util/netevent.c
5309
if(c->use_h2) {
usr.sbin/unbound/util/netevent.c
5310
return comm_point_http2_handle_read(fd, c);
usr.sbin/unbound/util/netevent.c
5315
if(c->http_min_version >= http_version_2) {
usr.sbin/unbound/util/netevent.c
5321
if(c->ssl) {
usr.sbin/unbound/util/netevent.c
5322
if(!ssl_http_read_more(c))
usr.sbin/unbound/util/netevent.c
5325
if(!http_read_more(fd, c))
usr.sbin/unbound/util/netevent.c
5329
if(c->http_stored >= sldns_buffer_position(c->buffer)) {
usr.sbin/unbound/util/netevent.c
5334
sldns_buffer_flip(c->buffer);
usr.sbin/unbound/util/netevent.c
5337
if(c->http_stored < sldns_buffer_limit(c->buffer))
usr.sbin/unbound/util/netevent.c
5338
sldns_buffer_set_position(c->buffer, c->http_stored);
usr.sbin/unbound/util/netevent.c
5339
else sldns_buffer_set_position(c->buffer, sldns_buffer_limit(c->buffer));
usr.sbin/unbound/util/netevent.c
5341
while(sldns_buffer_remaining(c->buffer) > 0) {
usr.sbin/unbound/util/netevent.c
5344
if(c->http_in_headers || c->http_in_chunk_headers) {
usr.sbin/unbound/util/netevent.c
5346
if(!http_header_done(c->buffer)) {
usr.sbin/unbound/util/netevent.c
5349
http_moveover_buffer(c->buffer);
usr.sbin/unbound/util/netevent.c
5353
if(!c->http_in_chunk_headers) {
usr.sbin/unbound/util/netevent.c
5355
if(!http_process_initial_header(c))
usr.sbin/unbound/util/netevent.c
5359
int r = http_process_chunk_header(c);
usr.sbin/unbound/util/netevent.c
5368
if(!c->http_is_chunked) {
usr.sbin/unbound/util/netevent.c
5370
return http_nonchunk_segment(c);
usr.sbin/unbound/util/netevent.c
5373
int r = http_chunked_segment(c);
usr.sbin/unbound/util/netevent.c
5382
http_moveover_buffer(c->buffer);
usr.sbin/unbound/util/netevent.c
5389
http_check_connect(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5413
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5419
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
542
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
usr.sbin/unbound/util/netevent.c
5425
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5435
ssl_http_write_more(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5439
log_assert(sldns_buffer_remaining(c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
5441
r = SSL_write(c->ssl, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
5442
(int)sldns_buffer_remaining(c->buffer));
usr.sbin/unbound/util/netevent.c
5444
int want = SSL_get_error(c->ssl, r);
usr.sbin/unbound/util/netevent.c
5448
c->ssl_shake_state = comm_ssl_shake_hs_read;
usr.sbin/unbound/util/netevent.c
5449
comm_point_listen_for_rw(c, 1, 0);
usr.sbin/unbound/util/netevent.c
546
sent = send(c->fd, (void*)sldns_buffer_begin(packet),
usr.sbin/unbound/util/netevent.c
5466
sldns_buffer_skip(c->buffer, (ssize_t)r);
usr.sbin/unbound/util/netevent.c
5469
(void)c;
usr.sbin/unbound/util/netevent.c
5476
http_write_more(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5479
log_assert(sldns_buffer_remaining(c->buffer) > 0);
usr.sbin/unbound/util/netevent.c
5480
r = send(fd, (void*)sldns_buffer_current(c->buffer),
usr.sbin/unbound/util/netevent.c
5481
sldns_buffer_remaining(c->buffer), 0);
usr.sbin/unbound/util/netevent.c
5490
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
5495
&c->repinfo.remote_addr, c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5498
sldns_buffer_skip(c->buffer, r);
usr.sbin/unbound/util/netevent.c
5508
log_assert(h2_session->c->type == comm_http);
usr.sbin/unbound/util/netevent.c
5509
log_assert(h2_session->c->h2_session);
usr.sbin/unbound/util/netevent.c
5512
if(h2_session->c->ssl) {
usr.sbin/unbound/util/netevent.c
5515
r = SSL_write(h2_session->c->ssl, buf, len);
usr.sbin/unbound/util/netevent.c
5517
int want = SSL_get_error(h2_session->c->ssl, r);
usr.sbin/unbound/util/netevent.c
5521
h2_session->c->ssl_shake_state = comm_ssl_shake_hs_read;
usr.sbin/unbound/util/netevent.c
5522
comm_point_listen_for_rw(h2_session->c, 1, 0);
usr.sbin/unbound/util/netevent.c
5543
ret = send(h2_session->c->fd, (void*)buf, len, 0);
usr.sbin/unbound/util/netevent.c
5559
&h2_session->c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
5560
h2_session->c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5567
ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
usr.sbin/unbound/util/netevent.c
5575
&h2_session->c->repinfo.remote_addr,
usr.sbin/unbound/util/netevent.c
5576
h2_session->c->repinfo.remote_addrlen);
usr.sbin/unbound/util/netevent.c
5586
comm_point_http2_handle_write(int ATTR_UNUSED(fd), struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5590
log_assert(c->h2_session);
usr.sbin/unbound/util/netevent.c
5592
ret = nghttp2_session_send(c->h2_session->session);
usr.sbin/unbound/util/netevent.c
5599
if(nghttp2_session_want_read(c->h2_session->session)) {
usr.sbin/unbound/util/netevent.c
5600
c->tcp_is_reading = 1;
usr.sbin/unbound/util/netevent.c
5601
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
5602
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
usr.sbin/unbound/util/netevent.c
5603
} else if(!nghttp2_session_want_write(c->h2_session->session))
usr.sbin/unbound/util/netevent.c
5607
(void)c;
usr.sbin/unbound/util/netevent.c
5619
comm_point_http_handle_write(int fd, struct comm_point* c)
usr.sbin/unbound/util/netevent.c
5621
log_assert(c->type == comm_http);
usr.sbin/unbound/util/netevent.c
5626
if(c->tcp_check_nb_connect) {
usr.sbin/unbound/util/netevent.c
5627
int r = http_check_connect(fd, c);
usr.sbin/unbound/util/netevent.c
5630
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
5634
if(c->ssl && c->ssl_shake_state != comm_ssl_shake_none) {
usr.sbin/unbound/util/netevent.c
5635
if(!ssl_handshake(c))
usr.sbin/unbound/util/netevent.c
5637
if(c->ssl_shake_state != comm_ssl_shake_none)
usr.sbin/unbound/util/netevent.c
5641
if(c->tcp_is_reading)
usr.sbin/unbound/util/netevent.c
5644
if(c->use_h2) {
usr.sbin/unbound/util/netevent.c
5645
return comm_point_http2_handle_write(fd, c);
usr.sbin/unbound/util/netevent.c
5650
if(c->http_min_version >= http_version_2) {
usr.sbin/unbound/util/netevent.c
5656
if(c->ssl) {
usr.sbin/unbound/util/netevent.c
5657
if(!ssl_http_write_more(c))
usr.sbin/unbound/util/netevent.c
5660
if(!http_write_more(fd, c))
usr.sbin/unbound/util/netevent.c
5667
if(sldns_buffer_remaining(c->buffer) == 0) {
usr.sbin/unbound/util/netevent.c
5668
sldns_buffer_clear(c->buffer);
usr.sbin/unbound/util/netevent.c
5669
if(c->tcp_do_toggle_rw)
usr.sbin/unbound/util/netevent.c
5670
c->tcp_is_reading = 1;
usr.sbin/unbound/util/netevent.c
5671
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
5673
comm_point_stop_listening(c);
usr.sbin/unbound/util/netevent.c
5674
comm_point_start_listening(c, -1, -1);
usr.sbin/unbound/util/netevent.c
5682
struct comm_point* c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
5683
log_assert(c->type == comm_http);
usr.sbin/unbound/util/netevent.c
5684
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
5688
reclaim_http_handler(c);
usr.sbin/unbound/util/netevent.c
5689
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
5690
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
5691
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
5697
if(!comm_point_http_handle_read(fd, c)) {
usr.sbin/unbound/util/netevent.c
5698
reclaim_http_handler(c);
usr.sbin/unbound/util/netevent.c
5699
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
5701
c->callback));
usr.sbin/unbound/util/netevent.c
5702
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
5709
if(!comm_point_http_handle_write(fd, c)) {
usr.sbin/unbound/util/netevent.c
5710
reclaim_http_handler(c);
usr.sbin/unbound/util/netevent.c
5711
if(!c->tcp_do_close) {
usr.sbin/unbound/util/netevent.c
5713
c->callback));
usr.sbin/unbound/util/netevent.c
5714
(void)(*c->callback)(c, c->cb_arg,
usr.sbin/unbound/util/netevent.c
5725
struct comm_point* c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
5726
log_assert(c->type == comm_local);
usr.sbin/unbound/util/netevent.c
5727
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
5730
if(!comm_point_tcp_handle_read(fd, c, 1)) {
usr.sbin/unbound/util/netevent.c
5731
fptr_ok(fptr_whitelist_comm_point(c->callback));
usr.sbin/unbound/util/netevent.c
5732
(void)(*c->callback)(c, c->cb_arg, NETEVENT_CLOSED,
usr.sbin/unbound/util/netevent.c
5743
struct comm_point* c = (struct comm_point*)arg;
usr.sbin/unbound/util/netevent.c
5745
log_assert(c->type == comm_raw);
usr.sbin/unbound/util/netevent.c
5746
ub_comm_base_now(c->ev->base);
usr.sbin/unbound/util/netevent.c
5750
fptr_ok(fptr_whitelist_comm_point_raw(c->callback));
usr.sbin/unbound/util/netevent.c
5751
(void)(*c->callback)(c, c->cb_arg, err, NULL);
usr.sbin/unbound/util/netevent.c
5759
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
5762
if(!c)
usr.sbin/unbound/util/netevent.c
5764
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
5766
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
5767
free(c);
usr.sbin/unbound/util/netevent.c
5770
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
5771
c->fd = fd;
usr.sbin/unbound/util/netevent.c
5772
c->buffer = buffer;
usr.sbin/unbound/util/netevent.c
5773
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
5774
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
5775
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
5776
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
5777
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5778
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5779
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
5780
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
5781
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
5782
c->type = comm_udp;
usr.sbin/unbound/util/netevent.c
5783
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
5784
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
5785
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
5786
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
5788
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
5791
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
5792
c->dnscrypt_buffer = buffer;
usr.sbin/unbound/util/netevent.c
5794
c->inuse = 0;
usr.sbin/unbound/util/netevent.c
5795
c->callback = callback;
usr.sbin/unbound/util/netevent.c
5796
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
5797
c->socket = socket;
usr.sbin/unbound/util/netevent.c
5798
c->pp2_enabled = pp2_enabled;
usr.sbin/unbound/util/netevent.c
5799
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
5802
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
5803
comm_point_udp_callback, c);
usr.sbin/unbound/util/netevent.c
5804
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
5806
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5809
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
usr.sbin/unbound/util/netevent.c
5811
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5814
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
5815
return c;
usr.sbin/unbound/util/netevent.c
5824
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
5827
if(!c)
usr.sbin/unbound/util/netevent.c
5829
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
5831
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
5832
free(c);
usr.sbin/unbound/util/netevent.c
5835
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
5836
c->fd = fd;
usr.sbin/unbound/util/netevent.c
5837
c->buffer = buffer;
usr.sbin/unbound/util/netevent.c
5838
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
5839
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
5840
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
5841
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
5842
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5843
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5844
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
5845
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
5846
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
5847
c->type = comm_udp;
usr.sbin/unbound/util/netevent.c
5848
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
5849
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
5851
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
5852
c->dnscrypt_buffer = buffer;
usr.sbin/unbound/util/netevent.c
5854
c->inuse = 0;
usr.sbin/unbound/util/netevent.c
5855
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
5856
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
5858
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
5860
c->callback = callback;
usr.sbin/unbound/util/netevent.c
5861
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
5862
c->socket = socket;
usr.sbin/unbound/util/netevent.c
5863
c->pp2_enabled = pp2_enabled;
usr.sbin/unbound/util/netevent.c
5864
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
5867
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
5868
comm_point_udp_ancil_callback, c);
usr.sbin/unbound/util/netevent.c
5869
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
5871
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5874
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
usr.sbin/unbound/util/netevent.c
5876
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5879
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
5880
return c;
usr.sbin/unbound/util/netevent.c
5892
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
5896
if(!c)
usr.sbin/unbound/util/netevent.c
5898
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
5900
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
5901
free(c);
usr.sbin/unbound/util/netevent.c
5904
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
5905
c->fd = fd;
usr.sbin/unbound/util/netevent.c
5906
c->buffer = buffer;
usr.sbin/unbound/util/netevent.c
5907
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
5908
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
5909
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
5910
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
5911
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5912
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
5913
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
5914
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
5915
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
5916
c->type = comm_doq;
usr.sbin/unbound/util/netevent.c
5917
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
5918
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
5919
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
5920
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
5922
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
5925
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
5926
c->dnscrypt_buffer = NULL;
usr.sbin/unbound/util/netevent.c
5928
c->doq_socket = doq_server_socket_create(table, rnd, quic_sslctx, c,
usr.sbin/unbound/util/netevent.c
5930
if(!c->doq_socket) {
usr.sbin/unbound/util/netevent.c
5932
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5935
c->inuse = 0;
usr.sbin/unbound/util/netevent.c
5936
c->callback = callback;
usr.sbin/unbound/util/netevent.c
5937
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
5938
c->socket = socket;
usr.sbin/unbound/util/netevent.c
5939
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
5940
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
5943
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
5944
comm_point_doq_callback, c);
usr.sbin/unbound/util/netevent.c
5945
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
5947
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5950
if(fd!=-1 && ub_event_add(c->ev->ev, c->timeout) != 0 ) {
usr.sbin/unbound/util/netevent.c
5952
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
5955
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
5956
return c;
usr.sbin/unbound/util/netevent.c
5979
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
5982
if(!c)
usr.sbin/unbound/util/netevent.c
5984
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
5986
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
5987
free(c);
usr.sbin/unbound/util/netevent.c
5990
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
5991
c->fd = -1;
usr.sbin/unbound/util/netevent.c
5992
c->buffer = sldns_buffer_new(bufsize);
usr.sbin/unbound/util/netevent.c
5993
if(!c->buffer) {
usr.sbin/unbound/util/netevent.c
5994
free(c->ev);
usr.sbin/unbound/util/netevent.c
5995
free(c);
usr.sbin/unbound/util/netevent.c
5998
c->timeout = (struct timeval*)malloc(sizeof(struct timeval));
usr.sbin/unbound/util/netevent.c
5999
if(!c->timeout) {
usr.sbin/unbound/util/netevent.c
6000
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6001
free(c->ev);
usr.sbin/unbound/util/netevent.c
6002
free(c);
usr.sbin/unbound/util/netevent.c
6005
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6006
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6007
c->tcp_parent = parent;
usr.sbin/unbound/util/netevent.c
6008
c->tcp_timeout_msec = parent->tcp_timeout_msec;
usr.sbin/unbound/util/netevent.c
6009
c->tcp_conn_limit = parent->tcp_conn_limit;
usr.sbin/unbound/util/netevent.c
6010
c->tcl_addr = NULL;
usr.sbin/unbound/util/netevent.c
6011
c->tcp_keepalive = 0;
usr.sbin/unbound/util/netevent.c
6012
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6013
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6014
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6015
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6016
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6017
c->type = comm_tcp;
usr.sbin/unbound/util/netevent.c
6018
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6019
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
6020
c->tcp_do_toggle_rw = 1;
usr.sbin/unbound/util/netevent.c
6021
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
6023
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
6026
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6029
c->dnscrypt_buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
6031
c->repinfo.c = c;
usr.sbin/unbound/util/netevent.c
6032
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6033
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6034
c->socket = socket;
usr.sbin/unbound/util/netevent.c
6035
c->pp2_enabled = parent->pp2_enabled;
usr.sbin/unbound/util/netevent.c
6036
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6038
c->tcp_req_info = tcp_req_info_create(spoolbuf);
usr.sbin/unbound/util/netevent.c
6039
if(!c->tcp_req_info) {
usr.sbin/unbound/util/netevent.c
6041
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6042
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6043
free(c->ev);
usr.sbin/unbound/util/netevent.c
6044
free(c);
usr.sbin/unbound/util/netevent.c
6047
c->tcp_req_info->cp = c;
usr.sbin/unbound/util/netevent.c
6048
c->tcp_do_close = 1;
usr.sbin/unbound/util/netevent.c
6049
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
6052
c->tcp_free = parent->tcp_free;
usr.sbin/unbound/util/netevent.c
6053
parent->tcp_free = c;
usr.sbin/unbound/util/netevent.c
6054
c->is_in_tcp_free = 1;
usr.sbin/unbound/util/netevent.c
6057
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6058
comm_point_tcp_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6059
if(c->ev->ev == NULL)
usr.sbin/unbound/util/netevent.c
6062
parent->tcp_free = c->tcp_free;
usr.sbin/unbound/util/netevent.c
6063
tcp_req_info_delete(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
6064
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6065
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6066
free(c->ev);
usr.sbin/unbound/util/netevent.c
6067
free(c);
usr.sbin/unbound/util/netevent.c
6070
return c;
usr.sbin/unbound/util/netevent.c
6080
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6083
if(!c)
usr.sbin/unbound/util/netevent.c
6085
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6087
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6088
free(c);
usr.sbin/unbound/util/netevent.c
6091
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6092
c->fd = -1;
usr.sbin/unbound/util/netevent.c
6093
c->buffer = sldns_buffer_new(bufsize);
usr.sbin/unbound/util/netevent.c
6094
if(!c->buffer) {
usr.sbin/unbound/util/netevent.c
6095
free(c->ev);
usr.sbin/unbound/util/netevent.c
6096
free(c);
usr.sbin/unbound/util/netevent.c
6099
c->timeout = (struct timeval*)malloc(sizeof(struct timeval));
usr.sbin/unbound/util/netevent.c
6100
if(!c->timeout) {
usr.sbin/unbound/util/netevent.c
6101
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6102
free(c->ev);
usr.sbin/unbound/util/netevent.c
6103
free(c);
usr.sbin/unbound/util/netevent.c
6106
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6107
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6108
c->tcp_parent = parent;
usr.sbin/unbound/util/netevent.c
6109
c->tcp_timeout_msec = parent->tcp_timeout_msec;
usr.sbin/unbound/util/netevent.c
6110
c->tcp_conn_limit = parent->tcp_conn_limit;
usr.sbin/unbound/util/netevent.c
6111
c->tcl_addr = NULL;
usr.sbin/unbound/util/netevent.c
6112
c->tcp_keepalive = 0;
usr.sbin/unbound/util/netevent.c
6113
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6114
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6115
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6116
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6117
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6118
c->type = comm_http;
usr.sbin/unbound/util/netevent.c
6119
c->tcp_do_close = 1;
usr.sbin/unbound/util/netevent.c
6120
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
6121
c->tcp_do_toggle_rw = 1; /* will be set to 0 after http2 upgrade */
usr.sbin/unbound/util/netevent.c
6122
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
6124
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
6127
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6128
c->dnscrypt_buffer = NULL;
usr.sbin/unbound/util/netevent.c
6130
c->repinfo.c = c;
usr.sbin/unbound/util/netevent.c
6131
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6132
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6133
c->socket = socket;
usr.sbin/unbound/util/netevent.c
6134
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
6135
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6137
c->http_min_version = http_version_2;
usr.sbin/unbound/util/netevent.c
6138
c->http2_stream_max_qbuffer_size = bufsize;
usr.sbin/unbound/util/netevent.c
6140
c->http2_stream_max_qbuffer_size = 512;
usr.sbin/unbound/util/netevent.c
6141
c->http2_max_streams = http_max_streams;
usr.sbin/unbound/util/netevent.c
6142
if(!(c->http_endpoint = strdup(http_endpoint))) {
usr.sbin/unbound/util/netevent.c
6144
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6145
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6146
free(c->ev);
usr.sbin/unbound/util/netevent.c
6147
free(c);
usr.sbin/unbound/util/netevent.c
6150
c->use_h2 = 0;
usr.sbin/unbound/util/netevent.c
6152
if(!(c->h2_session = http2_session_create(c))) {
usr.sbin/unbound/util/netevent.c
6154
free(c->http_endpoint);
usr.sbin/unbound/util/netevent.c
6155
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6156
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6157
free(c->ev);
usr.sbin/unbound/util/netevent.c
6158
free(c);
usr.sbin/unbound/util/netevent.c
6161
if(!(c->h2_session->callbacks = http2_req_callbacks_create())) {
usr.sbin/unbound/util/netevent.c
6163
http2_session_delete(c->h2_session);
usr.sbin/unbound/util/netevent.c
6164
free(c->http_endpoint);
usr.sbin/unbound/util/netevent.c
6165
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6166
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6167
free(c->ev);
usr.sbin/unbound/util/netevent.c
6168
free(c);
usr.sbin/unbound/util/netevent.c
6174
c->tcp_free = parent->tcp_free;
usr.sbin/unbound/util/netevent.c
6175
parent->tcp_free = c;
usr.sbin/unbound/util/netevent.c
6176
c->is_in_tcp_free = 1;
usr.sbin/unbound/util/netevent.c
6179
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6180
comm_point_http_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6181
if(c->ev->ev == NULL)
usr.sbin/unbound/util/netevent.c
6184
parent->tcp_free = c->tcp_free;
usr.sbin/unbound/util/netevent.c
6185
http2_session_delete(c->h2_session);
usr.sbin/unbound/util/netevent.c
6186
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6187
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6188
free(c->ev);
usr.sbin/unbound/util/netevent.c
6189
free(c);
usr.sbin/unbound/util/netevent.c
6192
return c;
usr.sbin/unbound/util/netevent.c
6204
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6209
if(!c)
usr.sbin/unbound/util/netevent.c
6211
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6213
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6214
free(c);
usr.sbin/unbound/util/netevent.c
6217
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6218
c->fd = fd;
usr.sbin/unbound/util/netevent.c
6219
c->buffer = NULL;
usr.sbin/unbound/util/netevent.c
6220
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
6221
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6222
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6223
c->tcp_timeout_msec = idle_timeout;
usr.sbin/unbound/util/netevent.c
6224
c->tcp_conn_limit = tcp_conn_limit;
usr.sbin/unbound/util/netevent.c
6225
c->tcl_addr = NULL;
usr.sbin/unbound/util/netevent.c
6226
c->tcp_keepalive = 0;
usr.sbin/unbound/util/netevent.c
6227
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
6228
c->max_tcp_count = num;
usr.sbin/unbound/util/netevent.c
6229
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6230
c->tcp_handlers = (struct comm_point**)calloc((size_t)num,
usr.sbin/unbound/util/netevent.c
6232
if(!c->tcp_handlers) {
usr.sbin/unbound/util/netevent.c
6233
free(c->ev);
usr.sbin/unbound/util/netevent.c
6234
free(c);
usr.sbin/unbound/util/netevent.c
6237
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6238
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6239
c->type = comm_tcp_accept;
usr.sbin/unbound/util/netevent.c
6240
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6241
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
6242
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
6243
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
6245
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
6248
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6249
c->dnscrypt_buffer = NULL;
usr.sbin/unbound/util/netevent.c
625
comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
usr.sbin/unbound/util/netevent.c
6251
c->callback = NULL;
usr.sbin/unbound/util/netevent.c
6252
c->cb_arg = NULL;
usr.sbin/unbound/util/netevent.c
6253
c->socket = socket;
usr.sbin/unbound/util/netevent.c
6254
c->pp2_enabled = (port_type==listen_type_http?0:pp2_enabled);
usr.sbin/unbound/util/netevent.c
6255
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6258
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6259
comm_point_tcp_accept_callback, c);
usr.sbin/unbound/util/netevent.c
6260
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
6262
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
6265
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
usr.sbin/unbound/util/netevent.c
6267
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
6270
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
6276
c->tcp_handlers[i] = comm_point_create_tcp_handler(base,
usr.sbin/unbound/util/netevent.c
6277
c, bufsize, spoolbuf, callback, callback_arg, socket);
usr.sbin/unbound/util/netevent.c
6279
c->tcp_handlers[i] = comm_point_create_http_handler(
usr.sbin/unbound/util/netevent.c
6280
base, c, bufsize, harden_large_queries,
usr.sbin/unbound/util/netevent.c
6289
if(!c->tcp_handlers[i]) {
usr.sbin/unbound/util/netevent.c
6290
comm_point_delete(c);
usr.sbin/unbound/util/netevent.c
6295
return c;
usr.sbin/unbound/util/netevent.c
6302
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6305
if(!c)
usr.sbin/unbound/util/netevent.c
6307
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6309
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6310
free(c);
usr.sbin/unbound/util/netevent.c
6313
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6314
c->fd = -1;
usr.sbin/unbound/util/netevent.c
6315
c->buffer = sldns_buffer_new(bufsize);
usr.sbin/unbound/util/netevent.c
6316
if(!c->buffer) {
usr.sbin/unbound/util/netevent.c
6317
free(c->ev);
usr.sbin/unbound/util/netevent.c
6318
free(c);
usr.sbin/unbound/util/netevent.c
6321
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
6322
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6323
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6324
c->tcp_timeout_msec = TCP_QUERY_TIMEOUT;
usr.sbin/unbound/util/netevent.c
6325
c->tcp_conn_limit = NULL;
usr.sbin/unbound/util/netevent.c
6326
c->tcl_addr = NULL;
usr.sbin/unbound/util/netevent.c
6327
c->tcp_keepalive = 0;
usr.sbin/unbound/util/netevent.c
6328
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
6329
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6330
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6331
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6332
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6333
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6334
c->type = comm_tcp;
usr.sbin/unbound/util/netevent.c
6335
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6336
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
6337
c->tcp_do_toggle_rw = 1;
usr.sbin/unbound/util/netevent.c
6338
c->tcp_check_nb_connect = 1;
usr.sbin/unbound/util/netevent.c
6340
c->tcp_do_fastopen = 1;
usr.sbin/unbound/util/netevent.c
6343
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6344
c->dnscrypt_buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
6346
c->repinfo.c = c;
usr.sbin/unbound/util/netevent.c
6347
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6348
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6349
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
6350
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6352
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6353
comm_point_tcp_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6354
if(c->ev->ev == NULL)
usr.sbin/unbound/util/netevent.c
6357
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6358
free(c->ev);
usr.sbin/unbound/util/netevent.c
6359
free(c);
usr.sbin/unbound/util/netevent.c
6363
return c;
usr.sbin/unbound/util/netevent.c
6371
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6374
if(!c)
usr.sbin/unbound/util/netevent.c
6376
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6378
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6379
free(c);
usr.sbin/unbound/util/netevent.c
6382
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6383
c->fd = -1;
usr.sbin/unbound/util/netevent.c
6384
c->buffer = sldns_buffer_new(bufsize);
usr.sbin/unbound/util/netevent.c
6385
if(!c->buffer) {
usr.sbin/unbound/util/netevent.c
6386
free(c->ev);
usr.sbin/unbound/util/netevent.c
6387
free(c);
usr.sbin/unbound/util/netevent.c
6390
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
6391
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6392
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6393
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
6394
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6395
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6396
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6397
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6398
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6399
c->type = comm_http;
usr.sbin/unbound/util/netevent.c
640
log_assert(c->fd != -1);
usr.sbin/unbound/util/netevent.c
6400
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6401
c->do_not_close = 0;
usr.sbin/unbound/util/netevent.c
6402
c->tcp_do_toggle_rw = 1;
usr.sbin/unbound/util/netevent.c
6403
c->tcp_check_nb_connect = 1;
usr.sbin/unbound/util/netevent.c
6404
c->http_in_headers = 1;
usr.sbin/unbound/util/netevent.c
6405
c->http_in_chunk_headers = 0;
usr.sbin/unbound/util/netevent.c
6406
c->http_is_chunked = 0;
usr.sbin/unbound/util/netevent.c
6407
c->http_temp = temp;
usr.sbin/unbound/util/netevent.c
6409
c->tcp_do_fastopen = 1;
usr.sbin/unbound/util/netevent.c
6412
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6413
c->dnscrypt_buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
6415
c->repinfo.c = c;
usr.sbin/unbound/util/netevent.c
6416
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6417
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6418
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
6419
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6421
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6422
comm_point_http_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6423
if(c->ev->ev == NULL)
usr.sbin/unbound/util/netevent.c
6427
SSL_free(c->ssl);
usr.sbin/unbound/util/netevent.c
6429
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6430
free(c->ev);
usr.sbin/unbound/util/netevent.c
6431
free(c);
usr.sbin/unbound/util/netevent.c
6435
return c;
usr.sbin/unbound/util/netevent.c
6442
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6445
if(!c)
usr.sbin/unbound/util/netevent.c
6447
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6449
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6450
free(c);
usr.sbin/unbound/util/netevent.c
6453
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6454
c->fd = fd;
usr.sbin/unbound/util/netevent.c
6455
c->buffer = sldns_buffer_new(bufsize);
usr.sbin/unbound/util/netevent.c
6456
if(!c->buffer) {
usr.sbin/unbound/util/netevent.c
6457
free(c->ev);
usr.sbin/unbound/util/netevent.c
6458
free(c);
usr.sbin/unbound/util/netevent.c
6461
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
6462
c->tcp_is_reading = 1;
usr.sbin/unbound/util/netevent.c
6463
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6464
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
6465
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6466
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6467
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6468
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6469
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6470
c->type = comm_local;
usr.sbin/unbound/util/netevent.c
6471
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6472
c->do_not_close = 1;
usr.sbin/unbound/util/netevent.c
6473
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
6474
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
6476
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
6479
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6480
c->dnscrypt_buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
6482
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6483
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6484
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
6485
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6488
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6489
comm_point_local_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6490
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
6492
free(c->ev);
usr.sbin/unbound/util/netevent.c
6493
free(c);
usr.sbin/unbound/util/netevent.c
6496
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
usr.sbin/unbound/util/netevent.c
6498
ub_event_free(c->ev->ev);
usr.sbin/unbound/util/netevent.c
6499
free(c->ev);
usr.sbin/unbound/util/netevent.c
6500
free(c);
usr.sbin/unbound/util/netevent.c
6503
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
6504
return c;
usr.sbin/unbound/util/netevent.c
6511
struct comm_point* c = (struct comm_point*)calloc(1,
usr.sbin/unbound/util/netevent.c
6514
if(!c)
usr.sbin/unbound/util/netevent.c
6516
c->ev = (struct internal_event*)calloc(1,
usr.sbin/unbound/util/netevent.c
6518
if(!c->ev) {
usr.sbin/unbound/util/netevent.c
6519
free(c);
usr.sbin/unbound/util/netevent.c
6522
c->ev->base = base;
usr.sbin/unbound/util/netevent.c
6523
c->fd = fd;
usr.sbin/unbound/util/netevent.c
6524
c->buffer = NULL;
usr.sbin/unbound/util/netevent.c
6525
c->timeout = NULL;
usr.sbin/unbound/util/netevent.c
6526
c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6527
c->tcp_byte_count = 0;
usr.sbin/unbound/util/netevent.c
6528
c->tcp_parent = NULL;
usr.sbin/unbound/util/netevent.c
6529
c->max_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6530
c->cur_tcp_count = 0;
usr.sbin/unbound/util/netevent.c
6531
c->tcp_handlers = NULL;
usr.sbin/unbound/util/netevent.c
6532
c->tcp_free = NULL;
usr.sbin/unbound/util/netevent.c
6533
c->is_in_tcp_free = 0;
usr.sbin/unbound/util/netevent.c
6534
c->type = comm_raw;
usr.sbin/unbound/util/netevent.c
6535
c->tcp_do_close = 0;
usr.sbin/unbound/util/netevent.c
6536
c->do_not_close = 1;
usr.sbin/unbound/util/netevent.c
6537
c->tcp_do_toggle_rw = 0;
usr.sbin/unbound/util/netevent.c
6538
c->tcp_check_nb_connect = 0;
usr.sbin/unbound/util/netevent.c
6540
c->tcp_do_fastopen = 0;
usr.sbin/unbound/util/netevent.c
6543
c->dnscrypt = 0;
usr.sbin/unbound/util/netevent.c
6544
c->dnscrypt_buffer = c->buffer;
usr.sbin/unbound/util/netevent.c
6546
c->callback = callback;
usr.sbin/unbound/util/netevent.c
6547
c->cb_arg = callback_arg;
usr.sbin/unbound/util/netevent.c
6548
c->pp2_enabled = 0;
usr.sbin/unbound/util/netevent.c
6549
c->pp2_header_state = pp2_header_none;
usr.sbin/unbound/util/netevent.c
6554
c->ev->ev = ub_event_new(base->eb->base, c->fd, evbits,
usr.sbin/unbound/util/netevent.c
6555
comm_point_raw_handle_callback, c);
usr.sbin/unbound/util/netevent.c
6556
if(c->ev->ev == NULL) {
usr.sbin/unbound/util/netevent.c
6558
free(c->ev);
usr.sbin/unbound/util/netevent.c
6559
free(c);
usr.sbin/unbound/util/netevent.c
6562
if (ub_event_add(c->ev->ev, c->timeout) != 0) {
usr.sbin/unbound/util/netevent.c
6564
ub_event_free(c->ev->ev);
usr.sbin/unbound/util/netevent.c
6565
free(c->ev);
usr.sbin/unbound/util/netevent.c
6566
free(c);
usr.sbin/unbound/util/netevent.c
6569
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
6570
return c;
usr.sbin/unbound/util/netevent.c
6574
comm_point_close(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
6576
if(!c)
usr.sbin/unbound/util/netevent.c
6578
if(c->fd != -1) {
usr.sbin/unbound/util/netevent.c
6579
verbose(5, "comm_point_close of %d: event_del", c->fd);
usr.sbin/unbound/util/netevent.c
6580
if(c->event_added) {
usr.sbin/unbound/util/netevent.c
6581
if(ub_event_del(c->ev->ev) != 0) {
usr.sbin/unbound/util/netevent.c
6584
c->event_added = 0;
usr.sbin/unbound/util/netevent.c
6587
tcl_close_connection(c->tcl_addr);
usr.sbin/unbound/util/netevent.c
6588
if(c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
6589
tcp_req_info_clear(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
6590
if(c->h2_session)
usr.sbin/unbound/util/netevent.c
6591
http2_session_server_delete(c->h2_session);
usr.sbin/unbound/util/netevent.c
6593
if(c->tcp_more_read_again && *c->tcp_more_read_again)
usr.sbin/unbound/util/netevent.c
6594
*c->tcp_more_read_again = 0;
usr.sbin/unbound/util/netevent.c
6595
if(c->tcp_more_write_again && *c->tcp_more_write_again)
usr.sbin/unbound/util/netevent.c
6596
*c->tcp_more_write_again = 0;
usr.sbin/unbound/util/netevent.c
6599
if(c->fd != -1 && !c->do_not_close) {
usr.sbin/unbound/util/netevent.c
6601
if(c->type == comm_tcp || c->type == comm_http) {
usr.sbin/unbound/util/netevent.c
6603
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
6604
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6607
verbose(VERB_ALGO, "close fd %d", c->fd);
usr.sbin/unbound/util/netevent.c
6608
sock_close(c->fd);
usr.sbin/unbound/util/netevent.c
6610
c->fd = -1;
usr.sbin/unbound/util/netevent.c
6614
comm_point_delete(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
6616
if(!c)
usr.sbin/unbound/util/netevent.c
6618
if((c->type == comm_tcp || c->type == comm_http) && c->ssl) {
usr.sbin/unbound/util/netevent.c
6620
SSL_shutdown(c->ssl);
usr.sbin/unbound/util/netevent.c
6621
SSL_free(c->ssl);
usr.sbin/unbound/util/netevent.c
6624
if(c->type == comm_http && c->http_endpoint) {
usr.sbin/unbound/util/netevent.c
6625
free(c->http_endpoint);
usr.sbin/unbound/util/netevent.c
6626
c->http_endpoint = NULL;
usr.sbin/unbound/util/netevent.c
6628
comm_point_close(c);
usr.sbin/unbound/util/netevent.c
6629
if(c->tcp_handlers) {
usr.sbin/unbound/util/netevent.c
6631
for(i=0; i<c->max_tcp_count; i++)
usr.sbin/unbound/util/netevent.c
6632
comm_point_delete(c->tcp_handlers[i]);
usr.sbin/unbound/util/netevent.c
6633
free(c->tcp_handlers);
usr.sbin/unbound/util/netevent.c
6635
free(c->timeout);
usr.sbin/unbound/util/netevent.c
6636
if(c->type == comm_tcp || c->type == comm_local || c->type == comm_http) {
usr.sbin/unbound/util/netevent.c
6637
sldns_buffer_free(c->buffer);
usr.sbin/unbound/util/netevent.c
6639
if(c->dnscrypt && c->dnscrypt_buffer != c->buffer) {
usr.sbin/unbound/util/netevent.c
6640
sldns_buffer_free(c->dnscrypt_buffer);
usr.sbin/unbound/util/netevent.c
6643
if(c->tcp_req_info) {
usr.sbin/unbound/util/netevent.c
6644
tcp_req_info_delete(c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
6646
if(c->h2_session) {
usr.sbin/unbound/util/netevent.c
6647
http2_session_delete(c->h2_session);
usr.sbin/unbound/util/netevent.c
6651
if(c->doq_socket)
usr.sbin/unbound/util/netevent.c
6652
doq_server_socket_delete(c->doq_socket);
usr.sbin/unbound/util/netevent.c
6654
ub_event_free(c->ev->ev);
usr.sbin/unbound/util/netevent.c
6655
free(c->ev);
usr.sbin/unbound/util/netevent.c
6656
free(c);
usr.sbin/unbound/util/netevent.c
6677
log_assert(repinfo && repinfo->c);
usr.sbin/unbound/util/netevent.c
6679
buffer = repinfo->c->dnscrypt_buffer;
usr.sbin/unbound/util/netevent.c
6681
repinfo->c->tcp_req_info?
usr.sbin/unbound/util/netevent.c
6682
repinfo->c->tcp_req_info->spool_buffer:repinfo->c->buffer)) {
usr.sbin/unbound/util/netevent.c
6686
buffer = repinfo->c->buffer;
usr.sbin/unbound/util/netevent.c
6688
if(repinfo->c->type == comm_udp) {
usr.sbin/unbound/util/netevent.c
6690
comm_point_send_udp_msg_if(repinfo->c, buffer,
usr.sbin/unbound/util/netevent.c
6694
comm_point_send_udp_msg(repinfo->c, buffer,
usr.sbin/unbound/util/netevent.c
6702
if(repinfo->c->dtenv != NULL && repinfo->c->dtenv->log_client_response_messages) {
usr.sbin/unbound/util/netevent.c
6703
send_reply_dnstap(repinfo->c->dtenv,
usr.sbin/unbound/util/netevent.c
6704
repinfo->c->socket->addr,
usr.sbin/unbound/util/netevent.c
6705
repinfo->c->socket->addrlen,
usr.sbin/unbound/util/netevent.c
6707
repinfo->c->type, repinfo->c->ssl,
usr.sbin/unbound/util/netevent.c
6708
repinfo->c->buffer);
usr.sbin/unbound/util/netevent.c
6715
repinfo->c->doq_socket
usr.sbin/unbound/util/netevent.c
6716
?repinfo->c->dtenv:
usr.sbin/unbound/util/netevent.c
6718
repinfo->c->tcp_parent->dtenv;
usr.sbin/unbound/util/netevent.c
6719
struct sldns_buffer* dtbuffer = repinfo->c->tcp_req_info
usr.sbin/unbound/util/netevent.c
6720
?repinfo->c->tcp_req_info->spool_buffer
usr.sbin/unbound/util/netevent.c
6721
:repinfo->c->buffer;
usr.sbin/unbound/util/netevent.c
6723
if(repinfo->c->dnscrypt && repinfo->is_dnscrypted)
usr.sbin/unbound/util/netevent.c
6724
dtbuffer = repinfo->c->buffer;
usr.sbin/unbound/util/netevent.c
6732
repinfo->c->socket->addr,
usr.sbin/unbound/util/netevent.c
6733
repinfo->c->socket->addrlen,
usr.sbin/unbound/util/netevent.c
6735
repinfo->c->type, repinfo->c->ssl,
usr.sbin/unbound/util/netevent.c
6739
if(repinfo->c->tcp_req_info) {
usr.sbin/unbound/util/netevent.c
6740
tcp_req_info_send_reply(repinfo->c->tcp_req_info);
usr.sbin/unbound/util/netevent.c
6741
} else if(repinfo->c->use_h2) {
usr.sbin/unbound/util/netevent.c
6742
if(!http2_submit_dns_response(repinfo->c->h2_session)) {
usr.sbin/unbound/util/netevent.c
6745
repinfo->c->h2_stream = NULL;
usr.sbin/unbound/util/netevent.c
6746
repinfo->c->tcp_is_reading = 0;
usr.sbin/unbound/util/netevent.c
6747
comm_point_stop_listening(repinfo->c);
usr.sbin/unbound/util/netevent.c
6748
comm_point_start_listening(repinfo->c, -1,
usr.sbin/unbound/util/netevent.c
6749
adjusted_tcp_timeout(repinfo->c));
usr.sbin/unbound/util/netevent.c
6752
} else if(repinfo->c->doq_socket) {
usr.sbin/unbound/util/netevent.c
6756
comm_point_start_listening(repinfo->c, -1,
usr.sbin/unbound/util/netevent.c
6757
adjusted_tcp_timeout(repinfo->c));
usr.sbin/unbound/util/netevent.c
6767
log_assert(repinfo->c);
usr.sbin/unbound/util/netevent.c
6768
log_assert(repinfo->c->type != comm_tcp_accept);
usr.sbin/unbound/util/netevent.c
6769
if(repinfo->c->type == comm_udp)
usr.sbin/unbound/util/netevent.c
6771
if(repinfo->c->tcp_req_info)
usr.sbin/unbound/util/netevent.c
6772
repinfo->c->tcp_req_info->is_drop = 1;
usr.sbin/unbound/util/netevent.c
6773
if(repinfo->c->type == comm_http) {
usr.sbin/unbound/util/netevent.c
6774
if(repinfo->c->h2_session) {
usr.sbin/unbound/util/netevent.c
6775
repinfo->c->h2_session->is_drop = 1;
usr.sbin/unbound/util/netevent.c
6776
if(!repinfo->c->h2_session->postpone_drop)
usr.sbin/unbound/util/netevent.c
6777
reclaim_http_handler(repinfo->c);
usr.sbin/unbound/util/netevent.c
6780
reclaim_http_handler(repinfo->c);
usr.sbin/unbound/util/netevent.c
6783
} else if(repinfo->c->doq_socket) {
usr.sbin/unbound/util/netevent.c
6788
reclaim_tcp_handler(repinfo->c);
usr.sbin/unbound/util/netevent.c
6792
comm_point_stop_listening(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
6794
verbose(VERB_ALGO, "comm point stop listening %d", c->fd);
usr.sbin/unbound/util/netevent.c
6795
if(c->event_added) {
usr.sbin/unbound/util/netevent.c
6796
if(ub_event_del(c->ev->ev) != 0) {
usr.sbin/unbound/util/netevent.c
6799
c->event_added = 0;
usr.sbin/unbound/util/netevent.c
6804
comm_point_start_listening(struct comm_point* c, int newfd, int msec)
usr.sbin/unbound/util/netevent.c
6807
c->fd==-1?newfd:c->fd, msec);
usr.sbin/unbound/util/netevent.c
6808
if(c->type == comm_tcp_accept && !c->tcp_free) {
usr.sbin/unbound/util/netevent.c
6812
if(c->event_added) {
usr.sbin/unbound/util/netevent.c
6813
if(ub_event_del(c->ev->ev) != 0) {
usr.sbin/unbound/util/netevent.c
6816
c->event_added = 0;
usr.sbin/unbound/util/netevent.c
6819
if(!c->timeout) {
usr.sbin/unbound/util/netevent.c
6820
c->timeout = (struct timeval*)malloc(sizeof(
usr.sbin/unbound/util/netevent.c
6822
if(!c->timeout) {
usr.sbin/unbound/util/netevent.c
6827
ub_event_add_bits(c->ev->ev, UB_EV_TIMEOUT);
usr.sbin/unbound/util/netevent.c
6829
c->timeout->tv_sec = msec/1000;
usr.sbin/unbound/util/netevent.c
6830
c->timeout->tv_usec = (msec%1000)*1000;
usr.sbin/unbound/util/netevent.c
6833
if(msec == 0 || !c->timeout) {
usr.sbin/unbound/util/netevent.c
6834
ub_event_del_bits(c->ev->ev, UB_EV_TIMEOUT);
usr.sbin/unbound/util/netevent.c
6837
if(c->type == comm_tcp || c->type == comm_http) {
usr.sbin/unbound/util/netevent.c
6838
ub_event_del_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6839
if(c->tcp_write_and_read) {
usr.sbin/unbound/util/netevent.c
6840
verbose(5, "startlistening %d mode rw", (newfd==-1?c->fd:newfd));
usr.sbin/unbound/util/netevent.c
6841
ub_event_add_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6842
} else if(c->tcp_is_reading) {
usr.sbin/unbound/util/netevent.c
6843
verbose(5, "startlistening %d mode r", (newfd==-1?c->fd:newfd));
usr.sbin/unbound/util/netevent.c
6844
ub_event_add_bits(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
6846
verbose(5, "startlistening %d mode w", (newfd==-1?c->fd:newfd));
usr.sbin/unbound/util/netevent.c
6847
ub_event_add_bits(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6851
if(c->fd != -1 && c->fd != newfd) {
usr.sbin/unbound/util/netevent.c
6852
verbose(5, "cpsl close of fd %d for %d", c->fd, newfd);
usr.sbin/unbound/util/netevent.c
6853
sock_close(c->fd);
usr.sbin/unbound/util/netevent.c
6855
c->fd = newfd;
usr.sbin/unbound/util/netevent.c
6856
ub_event_set_fd(c->ev->ev, c->fd);
usr.sbin/unbound/util/netevent.c
6858
if(ub_event_add(c->ev->ev, msec==0?NULL:c->timeout) != 0) {
usr.sbin/unbound/util/netevent.c
6862
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
6865
void comm_point_listen_for_rw(struct comm_point* c, int rd, int wr)
usr.sbin/unbound/util/netevent.c
6867
verbose(VERB_ALGO, "comm point listen_for_rw %d %d", c->fd, wr);
usr.sbin/unbound/util/netevent.c
6868
if(c->event_added) {
usr.sbin/unbound/util/netevent.c
6869
if(ub_event_del(c->ev->ev) != 0) {
usr.sbin/unbound/util/netevent.c
6872
c->event_added = 0;
usr.sbin/unbound/util/netevent.c
6874
if(!c->timeout) {
usr.sbin/unbound/util/netevent.c
6875
ub_event_del_bits(c->ev->ev, UB_EV_TIMEOUT);
usr.sbin/unbound/util/netevent.c
6877
ub_event_del_bits(c->ev->ev, UB_EV_READ|UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6878
if(rd) ub_event_add_bits(c->ev->ev, UB_EV_READ);
usr.sbin/unbound/util/netevent.c
6879
if(wr) ub_event_add_bits(c->ev->ev, UB_EV_WRITE);
usr.sbin/unbound/util/netevent.c
6880
if(ub_event_add(c->ev->ev, c->timeout) != 0) {
usr.sbin/unbound/util/netevent.c
6884
c->event_added = 1;
usr.sbin/unbound/util/netevent.c
6887
size_t comm_point_get_mem(struct comm_point* c)
usr.sbin/unbound/util/netevent.c
6890
if(!c)
usr.sbin/unbound/util/netevent.c
6892
s = sizeof(*c) + sizeof(*c->ev);
usr.sbin/unbound/util/netevent.c
6893
if(c->timeout)
usr.sbin/unbound/util/netevent.c
6894
s += sizeof(*c->timeout);
usr.sbin/unbound/util/netevent.c
6895
if(c->type == comm_tcp || c->type == comm_local) {
usr.sbin/unbound/util/netevent.c
6896
s += sizeof(*c->buffer) + sldns_buffer_capacity(c->buffer);
usr.sbin/unbound/util/netevent.c
6898
s += sizeof(*c->dnscrypt_buffer);
usr.sbin/unbound/util/netevent.c
6899
if(c->buffer != c->dnscrypt_buffer) {
usr.sbin/unbound/util/netevent.c
6900
s += sldns_buffer_capacity(c->dnscrypt_buffer);
usr.sbin/unbound/util/netevent.c
6904
if(c->type == comm_tcp_accept) {
usr.sbin/unbound/util/netevent.c
6906
for(i=0; i<c->max_tcp_count; i++)
usr.sbin/unbound/util/netevent.c
6907
s += comm_point_get_mem(c->tcp_handlers[i]);
usr.sbin/unbound/util/netevent.c
730
sent = sendmsg(c->fd, &msg, 0);
usr.sbin/unbound/util/netevent.c
773
p.fd = c->fd;
usr.sbin/unbound/util/netevent.c
787
struct comm_base* b = c->ev->base;
usr.sbin/unbound/util/netevent.c
856
sent = sendmsg(c->fd, &msg, 0);
usr.sbin/unbound/util/netevent.c
880
(void)c;
usr.sbin/unbound/util/netevent.h
1128
void doq_send_pkt(struct comm_point* c, struct doq_pkt_addr* paddr,
usr.sbin/unbound/util/netevent.h
1191
void comm_point_tcp_win_bio_cb(struct comm_point* c, void* ssl);
usr.sbin/unbound/util/netevent.h
140
struct comm_point* c;
usr.sbin/unbound/util/netevent.h
560
struct ub_event* comm_point_internal(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
711
void comm_point_close(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
718
void comm_point_delete(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
742
int comm_point_send_udp_msg(struct comm_point* c, struct sldns_buffer* packet,
usr.sbin/unbound/util/netevent.h
749
void comm_point_stop_listening(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
758
void comm_point_start_listening(struct comm_point* c, int newfd, int msec);
usr.sbin/unbound/util/netevent.h
766
void comm_point_listen_for_rw(struct comm_point* c, int rd, int wr);
usr.sbin/unbound/util/netevent.h
776
int adjusted_tcp_timeout(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
785
size_t comm_point_get_mem(struct comm_point* c);
usr.sbin/unbound/util/netevent.h
864
int comm_point_perform_accept(struct comm_point* c,
usr.sbin/unbound/util/netevent.h
943
struct comm_point* c;
usr.sbin/unbound/util/regional.c
215
size_t c = 1;
usr.sbin/unbound/util/regional.c
218
c++;
usr.sbin/unbound/util/regional.c
221
return c;
usr.sbin/unbound/util/regional.c
230
size_t c = 0;
usr.sbin/unbound/util/regional.c
233
c++;
usr.sbin/unbound/util/regional.c
236
return c;
usr.sbin/unbound/util/storage/lookup3.c
1013
uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
usr.sbin/unbound/util/storage/lookup3.c
1040
c[0] = hashlittle(a, hlen, m);
usr.sbin/unbound/util/storage/lookup3.c
1047
e[l] &= (c[l]^d[l]);
usr.sbin/unbound/util/storage/lookup3.c
1048
f[l] &= ~(c[l]^d[l]);
usr.sbin/unbound/util/storage/lookup3.c
1049
g[l] &= c[l];
usr.sbin/unbound/util/storage/lookup3.c
1050
h[l] &= ~c[l];
usr.sbin/unbound/util/storage/lookup3.c
173
#define mix(a,b,c) \
usr.sbin/unbound/util/storage/lookup3.c
175
a -= c; a ^= rot(c, 4); c += b; \
usr.sbin/unbound/util/storage/lookup3.c
176
b -= a; b ^= rot(a, 6); a += c; \
usr.sbin/unbound/util/storage/lookup3.c
177
c -= b; c ^= rot(b, 8); b += a; \
usr.sbin/unbound/util/storage/lookup3.c
178
a -= c; a ^= rot(c,16); c += b; \
usr.sbin/unbound/util/storage/lookup3.c
179
b -= a; b ^= rot(a,19); a += c; \
usr.sbin/unbound/util/storage/lookup3.c
180
c -= b; c ^= rot(b, 4); b += a; \
usr.sbin/unbound/util/storage/lookup3.c
208
#define final(a,b,c) \
usr.sbin/unbound/util/storage/lookup3.c
210
c ^= b; c -= rot(b,14); \
usr.sbin/unbound/util/storage/lookup3.c
211
a ^= c; a -= rot(c,11); \
usr.sbin/unbound/util/storage/lookup3.c
213
c ^= b; c -= rot(b,16); \
usr.sbin/unbound/util/storage/lookup3.c
214
a ^= c; a -= rot(c,4); \
usr.sbin/unbound/util/storage/lookup3.c
216
c ^= b; c -= rot(b,24); \
usr.sbin/unbound/util/storage/lookup3.c
237
uint32_t a,b,c;
usr.sbin/unbound/util/storage/lookup3.c
240
a = b = c = raninit + (((uint32_t)length)<<2) + initval;
usr.sbin/unbound/util/storage/lookup3.c
247
c += k[2];
usr.sbin/unbound/util/storage/lookup3.c
248
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
256
case 3 : c+=k[2];
usr.sbin/unbound/util/storage/lookup3.c
263
final(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
270
return c;
usr.sbin/unbound/util/storage/lookup3.c
290
uint32_t a,b,c;
usr.sbin/unbound/util/storage/lookup3.c
293
a = b = c = raninit + ((uint32_t)(length<<2)) + *pc;
usr.sbin/unbound/util/storage/lookup3.c
294
c += *pb;
usr.sbin/unbound/util/storage/lookup3.c
301
c += k[2];
usr.sbin/unbound/util/storage/lookup3.c
302
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
310
case 3 : c+=k[2];
usr.sbin/unbound/util/storage/lookup3.c
317
final(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
324
*pc=c; *pb=b;
usr.sbin/unbound/util/storage/lookup3.c
358
uint32_t a,b,c; /* internal state */
usr.sbin/unbound/util/storage/lookup3.c
362
a = b = c = raninit + ((uint32_t)length) + initval;
usr.sbin/unbound/util/storage/lookup3.c
376
c += k[2];
usr.sbin/unbound/util/storage/lookup3.c
377
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
396
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
397
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
398
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
399
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
408
case 0 : return c; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
416
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
417
case 11: c+=((uint32_t)k8[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
420
case 10: c+=((uint32_t)k8[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
423
case 9 : c+=k8[8];
usr.sbin/unbound/util/storage/lookup3.c
444
case 0 : return c;
usr.sbin/unbound/util/storage/lookup3.c
458
c += k[4] + (((uint32_t)k[5])<<16);
usr.sbin/unbound/util/storage/lookup3.c
459
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
468
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
usr.sbin/unbound/util/storage/lookup3.c
472
case 11: c+=((uint32_t)k8[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
475
case 10: c+=k[4];
usr.sbin/unbound/util/storage/lookup3.c
479
case 9 : c+=k8[8];
usr.sbin/unbound/util/storage/lookup3.c
503
case 0 : return c; /* zero length requires no mixing */
usr.sbin/unbound/util/storage/lookup3.c
520
c += k[8];
usr.sbin/unbound/util/storage/lookup3.c
521
c += ((uint32_t)k[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
522
c += ((uint32_t)k[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
523
c += ((uint32_t)k[11])<<24;
usr.sbin/unbound/util/storage/lookup3.c
524
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
532
case 12: c+=((uint32_t)k[11])<<24;
usr.sbin/unbound/util/storage/lookup3.c
535
case 11: c+=((uint32_t)k[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
538
case 10: c+=((uint32_t)k[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
541
case 9 : c+=k[8];
usr.sbin/unbound/util/storage/lookup3.c
567
case 0 : return c;
usr.sbin/unbound/util/storage/lookup3.c
571
final(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
572
return c;
usr.sbin/unbound/util/storage/lookup3.c
593
uint32_t a,b,c; /* internal state */
usr.sbin/unbound/util/storage/lookup3.c
597
a = b = c = raninit + ((uint32_t)length) + *pc;
usr.sbin/unbound/util/storage/lookup3.c
598
c += *pb;
usr.sbin/unbound/util/storage/lookup3.c
612
c += k[2];
usr.sbin/unbound/util/storage/lookup3.c
613
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
632
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
633
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
634
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
635
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
644
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
652
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
653
case 11: c+=((uint32_t)k8[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
656
case 10: c+=((uint32_t)k8[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
659
case 9 : c+=k8[8];
usr.sbin/unbound/util/storage/lookup3.c
680
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
694
c += k[4] + (((uint32_t)k[5])<<16);
usr.sbin/unbound/util/storage/lookup3.c
695
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
704
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
usr.sbin/unbound/util/storage/lookup3.c
708
case 11: c+=((uint32_t)k8[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
711
case 10: c+=k[4];
usr.sbin/unbound/util/storage/lookup3.c
715
case 9 : c+=k8[8];
usr.sbin/unbound/util/storage/lookup3.c
739
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
756
c += k[8];
usr.sbin/unbound/util/storage/lookup3.c
757
c += ((uint32_t)k[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
758
c += ((uint32_t)k[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
759
c += ((uint32_t)k[11])<<24;
usr.sbin/unbound/util/storage/lookup3.c
760
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
768
case 12: c+=((uint32_t)k[11])<<24;
usr.sbin/unbound/util/storage/lookup3.c
771
case 11: c+=((uint32_t)k[10])<<16;
usr.sbin/unbound/util/storage/lookup3.c
774
case 10: c+=((uint32_t)k[9])<<8;
usr.sbin/unbound/util/storage/lookup3.c
777
case 9 : c+=k[8];
usr.sbin/unbound/util/storage/lookup3.c
803
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
807
final(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
808
*pc=c; *pb=b;
usr.sbin/unbound/util/storage/lookup3.c
823
uint32_t a,b,c;
usr.sbin/unbound/util/storage/lookup3.c
827
a = b = c = raninit + ((uint32_t)length) + initval;
usr.sbin/unbound/util/storage/lookup3.c
841
c += k[2];
usr.sbin/unbound/util/storage/lookup3.c
842
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
861
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
862
case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
863
case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
864
case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
873
case 0 : return c; /* zero length strings require no mixing */
usr.sbin/unbound/util/storage/lookup3.c
881
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
usr.sbin/unbound/util/storage/lookup3.c
882
case 11: c+=((uint32_t)k8[10])<<8;
usr.sbin/unbound/util/storage/lookup3.c
885
case 10: c+=((uint32_t)k8[9])<<16;
usr.sbin/unbound/util/storage/lookup3.c
888
case 9 : c+=((uint32_t)k8[8])<<24;
usr.sbin/unbound/util/storage/lookup3.c
909
case 0 : return c;
usr.sbin/unbound/util/storage/lookup3.c
928
c += ((uint32_t)k[8])<<24;
usr.sbin/unbound/util/storage/lookup3.c
929
c += ((uint32_t)k[9])<<16;
usr.sbin/unbound/util/storage/lookup3.c
930
c += ((uint32_t)k[10])<<8;
usr.sbin/unbound/util/storage/lookup3.c
931
c += ((uint32_t)k[11]);
usr.sbin/unbound/util/storage/lookup3.c
932
mix(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
940
case 12: c+=k[11];
usr.sbin/unbound/util/storage/lookup3.c
943
case 11: c+=((uint32_t)k[10])<<8;
usr.sbin/unbound/util/storage/lookup3.c
946
case 10: c+=((uint32_t)k[9])<<16;
usr.sbin/unbound/util/storage/lookup3.c
949
case 9 : c+=((uint32_t)k[8])<<24;
usr.sbin/unbound/util/storage/lookup3.c
975
case 0 : return c;
usr.sbin/unbound/util/storage/lookup3.c
979
final(a,b,c);
usr.sbin/unbound/util/storage/lookup3.c
980
return c;
usr.sbin/unbound/util/storage/lruhash.c
222
size_t c = 0;
usr.sbin/unbound/util/storage/lruhash.c
227
c++;
usr.sbin/unbound/util/storage/lruhash.c
231
*collisions = c;
usr.sbin/unbound/util/tube.c
149
tube_handle_listen(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/util/tube.c
162
r = read(c->fd, ((uint8_t*)&tube->cmd_len) + tube->cmd_read,
usr.sbin/unbound/util/tube.c
192
r = read(c->fd, tube->cmd_msg+tube->cmd_read-sizeof(tube->cmd_len),
usr.sbin/unbound/util/tube.c
225
tube_handle_write(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/util/tube.c
237
comm_point_stop_listening(c);
usr.sbin/unbound/util/tube.c
242
r = write(c->fd, ((uint8_t*)&item->len) + tube->res_write,
usr.sbin/unbound/util/tube.c
259
r = write(c->fd, item->buf + tube->res_write - sizeof(item->len),
usr.sbin/unbound/util/tube.c
282
comm_point_stop_listening(c);
usr.sbin/unbound/util/tube.c
719
tube_handle_listen(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg),
usr.sbin/unbound/util/tube.c
727
tube_handle_write(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg),
usr.sbin/unbound/util/tube.h
270
int tube_handle_listen(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/util/tube.h
274
int tube_handle_write(struct comm_point* c, void* arg, int error,
usr.sbin/unbound/util/ub_event.c
193
# define NATIVE_BITS_CB(c) (c)
usr.sbin/unbound/util/ub_event_pluggable.c
130
# define NATIVE_BITS_CB(c) (c)
usr.sbin/unbound/validator/autotrust.c
1733
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1736
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
usr.sbin/unbound/validator/autotrust.c
1741
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1752
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1763
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1769
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
usr.sbin/unbound/validator/autotrust.c
1775
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1778
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
usr.sbin/unbound/validator/autotrust.c
1781
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
usr.sbin/unbound/validator/autotrust.c
1786
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1789
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1794
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1797
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
usr.sbin/unbound/validator/autotrust.c
1806
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1814
do_newkey(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1820
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1822
else do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1828
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1831
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1834
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1841
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1844
do_keypres(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1849
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1851
else do_remtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1971
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
usr.sbin/unbound/validator/autotrust.c
1977
do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
usr.sbin/unbound/validator/val_anchor.c
1227
anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm)
usr.sbin/unbound/validator/val_anchor.c
1233
key.dclass = c;
usr.sbin/unbound/validator/val_anchor.c
1240
if(!anchor_new_ta(anchors, nm, key.namelabs, key.namelen, c, 0)) {
usr.sbin/unbound/validator/val_anchor.c
1252
anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
usr.sbin/unbound/validator/val_anchor.c
1260
key.dclass = c;
usr.sbin/unbound/validator/val_anchor.c
486
skip_to_eol(FILE* in, int *c)
usr.sbin/unbound/validator/val_anchor.c
488
while((*c = getc(in)) != EOF ) {
usr.sbin/unbound/validator/val_anchor.c
489
if(*c == '\n')
usr.sbin/unbound/validator/val_anchor.c
496
is_bind_special(int c)
usr.sbin/unbound/validator/val_anchor.c
498
switch(c) {
usr.sbin/unbound/validator/val_anchor.c
532
int c;
usr.sbin/unbound/validator/val_anchor.c
534
while((c = getc(in)) != EOF ) {
usr.sbin/unbound/validator/val_anchor.c
535
if(comments && c == '#') { /* # blabla */
usr.sbin/unbound/validator/val_anchor.c
536
skip_to_eol(in, &c);
usr.sbin/unbound/validator/val_anchor.c
537
if(c == EOF) return 0;
usr.sbin/unbound/validator/val_anchor.c
540
} else if(comments && c=='/' && numdone>0 && /* /_/ bla*/
usr.sbin/unbound/validator/val_anchor.c
545
skip_to_eol(in, &c);
usr.sbin/unbound/validator/val_anchor.c
546
if(c == EOF) return 0;
usr.sbin/unbound/validator/val_anchor.c
549
} else if(comments && c=='*' && numdone>0 && /* /_* bla *_/ */
usr.sbin/unbound/validator/val_anchor.c
555
while(c != EOF && (c=getc(in)) != EOF ) {
usr.sbin/unbound/validator/val_anchor.c
556
if(c == '*') {
usr.sbin/unbound/validator/val_anchor.c
557
if((c=getc(in)) == '/')
usr.sbin/unbound/validator/val_anchor.c
560
if(c == '\n')
usr.sbin/unbound/validator/val_anchor.c
563
if(c == EOF) return 0;
usr.sbin/unbound/validator/val_anchor.c
569
if(isspace((unsigned char)c)) {
usr.sbin/unbound/validator/val_anchor.c
570
ungetc(c, in);
usr.sbin/unbound/validator/val_anchor.c
573
if(is_bind_special(c)) {
usr.sbin/unbound/validator/val_anchor.c
574
ungetc(c, in);
usr.sbin/unbound/validator/val_anchor.c
578
if(c == '\n') {
usr.sbin/unbound/validator/val_anchor.c
579
c = ' ';
usr.sbin/unbound/validator/val_anchor.c
586
sldns_buffer_write_u8(buf, (uint8_t)c);
usr.sbin/unbound/validator/val_anchor.c
588
if(isspace((unsigned char)c)) {
usr.sbin/unbound/validator/val_anchor.c
590
while((c = getc(in)) != EOF ) {
usr.sbin/unbound/validator/val_anchor.c
591
if(c == '\n')
usr.sbin/unbound/validator/val_anchor.c
593
if(!isspace((unsigned char)c)) {
usr.sbin/unbound/validator/val_anchor.c
594
ungetc(c, in);
usr.sbin/unbound/validator/val_anchor.c
598
if(c == EOF) return 0;
usr.sbin/unbound/validator/val_anchor.c
601
if(is_bind_special(c))
usr.sbin/unbound/validator/val_anchor.h
205
int anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm);
usr.sbin/unbound/validator/val_anchor.h
214
void anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
usr.sbin/unbound/validator/val_neg.c
1274
struct nsec3_cached_hash c;
usr.sbin/unbound/validator/val_neg.c
1341
c.hash = hashnc;
usr.sbin/unbound/validator/val_neg.c
1342
c.hash_len = nclen;
usr.sbin/unbound/validator/val_neg.c
1343
c.b32 = nc_b32+1;
usr.sbin/unbound/validator/val_neg.c
1344
c.b32_len = (size_t)nc_b32[0];
usr.sbin/unbound/validator/val_neg.c
1345
if(nsec3_covers(zone->name, &c, nc_rrset, 0, buf)) {
usr.sbin/unbound/validator/val_nsec3.c
571
int c = query_dname_compare(h1->dname, h2->dname);
usr.sbin/unbound/validator/val_nsec3.c
572
if(c != 0)
usr.sbin/unbound/validator/val_nsec3.c
573
return c;
usr.sbin/unbound/validator/val_nsec3.c
654
struct nsec3_cached_hash* c)
usr.sbin/unbound/validator/val_nsec3.c
656
int algo = nsec3_get_algo(c->nsec3, c->rr);
usr.sbin/unbound/validator/val_nsec3.c
657
size_t iter = nsec3_get_iter(c->nsec3, c->rr);
usr.sbin/unbound/validator/val_nsec3.c
660
if(!nsec3_get_salt(c->nsec3, c->rr, &salt, &saltlen))
usr.sbin/unbound/validator/val_nsec3.c
664
sldns_buffer_write(buf, c->dname, c->dname_len);
usr.sbin/unbound/validator/val_nsec3.c
668
c->hash_len = nsec3_hash_algo_size_supported(algo);
usr.sbin/unbound/validator/val_nsec3.c
669
if(c->hash_len == 0) {
usr.sbin/unbound/validator/val_nsec3.c
673
c->hash = (uint8_t*)regional_alloc(region, c->hash_len);
usr.sbin/unbound/validator/val_nsec3.c
674
if(!c->hash)
usr.sbin/unbound/validator/val_nsec3.c
677
sldns_buffer_limit(buf), (unsigned char*)c->hash);
usr.sbin/unbound/validator/val_nsec3.c
680
sldns_buffer_write(buf, c->hash, c->hash_len);
usr.sbin/unbound/validator/val_nsec3.c
685
sldns_buffer_limit(buf), (unsigned char*)c->hash);
usr.sbin/unbound/validator/val_nsec3.c
693
struct nsec3_cached_hash* c)
usr.sbin/unbound/validator/val_nsec3.c
697
r = sldns_b32_ntop_extended_hex(c->hash, c->hash_len,
usr.sbin/unbound/validator/val_nsec3.c
703
c->b32_len = (size_t)r;
usr.sbin/unbound/validator/val_nsec3.c
704
c->b32 = regional_alloc_init(region, sldns_buffer_begin(buf),
usr.sbin/unbound/validator/val_nsec3.c
705
c->b32_len);
usr.sbin/unbound/validator/val_nsec3.c
706
if(!c->b32)
usr.sbin/unbound/validator/val_nsec3.c
716
struct nsec3_cached_hash* c;
usr.sbin/unbound/validator/val_nsec3.c
728
c = (struct nsec3_cached_hash*)rbtree_search(table, &looki);
usr.sbin/unbound/validator/val_nsec3.c
729
if(c) {
usr.sbin/unbound/validator/val_nsec3.c
730
*hash = c;
usr.sbin/unbound/validator/val_nsec3.c
734
c = (struct nsec3_cached_hash*)regional_alloc(region, sizeof(*c));
usr.sbin/unbound/validator/val_nsec3.c
735
if(!c) return 0;
usr.sbin/unbound/validator/val_nsec3.c
736
c->node.key = c;
usr.sbin/unbound/validator/val_nsec3.c
737
c->nsec3 = nsec3;
usr.sbin/unbound/validator/val_nsec3.c
738
c->rr = rr;
usr.sbin/unbound/validator/val_nsec3.c
739
c->dname = dname;
usr.sbin/unbound/validator/val_nsec3.c
740
c->dname_len = dname_len;
usr.sbin/unbound/validator/val_nsec3.c
741
r = nsec3_calc_hash(region, buf, c);
usr.sbin/unbound/validator/val_nsec3.c
744
r = nsec3_calc_b32(region, buf, c);
usr.sbin/unbound/validator/val_nsec3.c
752
rbtree_insert(table, &c->node);
usr.sbin/unbound/validator/val_nsec3.c
754
*hash = c;
usr.sbin/unbound/validator/val_sigcrypt.c
1000
return c;
usr.sbin/unbound/validator/val_sigcrypt.c
938
int c;
usr.sbin/unbound/validator/val_sigcrypt.c
998
c = memcmp(d->rr_data[i]+2, d->rr_data[j]+2, minlen);
usr.sbin/unbound/validator/val_sigcrypt.c
999
if(c!=0)
usr.sbin/unbound/validator/val_utils.c
1176
check_no_anchor(struct val_anchors* anchors, uint8_t* nm, size_t l, uint16_t c)
usr.sbin/unbound/validator/val_utils.c
1179
if((ta=anchors_lookup(anchors, nm, l, c))) {
usr.sbin/unbound/validator/val_utils.c
1310
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
usr.sbin/unbound/validator/val_utils.c
1316
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
usr.sbin/unbound/validator/val_utils.c
1326
msg = dns_msg_create(nm, nmlen, LDNS_RR_TYPE_DS, c, region, 1);
usr.sbin/unbound/validator/val_utils.c
1339
qinfo.qclass = c;
usr.sbin/unbound/validator/val_utils.h
428
uint16_t c, struct regional* region, uint8_t* topname);
usr.sbin/unbound/validator/validator.c
108
for(i=0; i<c; i++) {
usr.sbin/unbound/validator/validator.c
148
int c;
usr.sbin/unbound/validator/validator.c
149
c = cfg_count_numbers(val_nsec3_key_iterations);
usr.sbin/unbound/validator/validator.c
150
if(c < 1 || (c&1)) {
usr.sbin/unbound/validator/validator.c
155
*keyiter_count = c/2;
usr.sbin/unbound/validator/validator.c
156
if(!fill_nsec3_iter(keysize, maxiter, val_nsec3_key_iterations, c/2)) {
usr.sbin/unbound/validator/validator.c
94
fill_nsec3_iter(size_t** keysize, size_t** maxiter, char* s, int c)
usr.sbin/unbound/validator/validator.c
98
*keysize = (size_t*)calloc((size_t)c, sizeof(size_t));
usr.sbin/unbound/validator/validator.c
99
*maxiter = (size_t*)calloc((size_t)c, sizeof(size_t));
usr.sbin/user/user.c
1852
int c;
usr.sbin/user/user.c
1859
while ((c = getopt(argc, argv, "DG:L:b:c:d:e:f:g:k:mop:r:s:u:v")) != -1) {
usr.sbin/user/user.c
1860
switch(c) {
usr.sbin/user/user.c
1975
int c, have_new_user;
usr.sbin/user/user.c
1984
while ((c = getopt(argc, argv, "G:L:S:UZc:d:e:f:g:l:mop:s:u:v")) != -1) {
usr.sbin/user/user.c
1985
switch(c) {
usr.sbin/user/user.c
2108
int c;
usr.sbin/user/user.c
2113
while ((c = getopt(argc, argv, "Dp:rv")) != -1) {
usr.sbin/user/user.c
2114
switch(c) {
usr.sbin/user/user.c
2180
int c;
usr.sbin/user/user.c
2185
while ((c = getopt(argc, argv, "g:ov")) != -1) {
usr.sbin/user/user.c
2186
switch(c) {
usr.sbin/user/user.c
2234
int c;
usr.sbin/user/user.c
2236
while ((c = getopt(argc, argv, "v")) != -1) {
usr.sbin/user/user.c
2237
switch(c) {
usr.sbin/user/user.c
2278
int c;
usr.sbin/user/user.c
2283
while ((c = getopt(argc, argv, "g:n:ov")) != -1) {
usr.sbin/user/user.c
2284
switch(c) {
usr.sbin/vmd/control.c
105
if ((c = control_connbyfd(peer_id)) == NULL) {
usr.sbin/vmd/control.c
110
imsg_forward_event(&c->iev, imsg);
usr.sbin/vmd/control.c
114
if ((c = control_connbyfd(peer_id)) == NULL) {
usr.sbin/vmd/control.c
137
imsg_compose_event(&c->iev, type, 0, 0, -1, &vmr,
usr.sbin/vmd/control.c
153
if ((c = control_connbyfd(notify->ctl_fd)) != NULL) {
usr.sbin/vmd/control.c
155
imsg_compose_event(&c->iev, type, 0, 0, -1,
usr.sbin/vmd/control.c
271
struct ctl_conn *c;
usr.sbin/vmd/control.c
295
if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) {
usr.sbin/vmd/control.c
302
&c->peercred, &len) != 0) {
usr.sbin/vmd/control.c
305
free(c);
usr.sbin/vmd/control.c
309
if (imsgbuf_init(&c->iev.ibuf, connfd) == -1) {
usr.sbin/vmd/control.c
312
free(c);
usr.sbin/vmd/control.c
315
imsgbuf_allow_fdpass(&c->iev.ibuf);
usr.sbin/vmd/control.c
316
c->iev.handler = control_dispatch_imsg;
usr.sbin/vmd/control.c
317
c->iev.events = EV_READ;
usr.sbin/vmd/control.c
318
c->iev.data = cs;
usr.sbin/vmd/control.c
319
event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
usr.sbin/vmd/control.c
320
c->iev.handler, c->iev.data);
usr.sbin/vmd/control.c
321
event_add(&c->iev.ev, NULL);
usr.sbin/vmd/control.c
323
TAILQ_INSERT_TAIL(&ctl_conns, c, entry);
usr.sbin/vmd/control.c
329
struct ctl_conn *c;
usr.sbin/vmd/control.c
331
TAILQ_FOREACH(c, &ctl_conns, entry) {
usr.sbin/vmd/control.c
332
if (c->iev.ibuf.fd == fd)
usr.sbin/vmd/control.c
336
return (c);
usr.sbin/vmd/control.c
342
struct ctl_conn *c;
usr.sbin/vmd/control.c
345
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/vmd/control.c
350
imsgbuf_clear(&c->iev.ibuf);
usr.sbin/vmd/control.c
351
TAILQ_REMOVE(&ctl_conns, c, entry);
usr.sbin/vmd/control.c
361
event_del(&c->iev.ev);
usr.sbin/vmd/control.c
362
close(c->iev.ibuf.fd);
usr.sbin/vmd/control.c
370
free(c);
usr.sbin/vmd/control.c
378
struct ctl_conn *c;
usr.sbin/vmd/control.c
386
if ((c = control_connbyfd(fd)) == NULL) {
usr.sbin/vmd/control.c
392
if (imsgbuf_read(&c->iev.ibuf) != 1) {
usr.sbin/vmd/control.c
398
if (imsgbuf_write(&c->iev.ibuf) == -1) {
usr.sbin/vmd/control.c
405
if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) {
usr.sbin/vmd/control.c
432
if (c->peercred.uid != 0) {
usr.sbin/vmd/control.c
434
type, c->peercred.uid);
usr.sbin/vmd/control.c
457
vmc.vmc_owner.uid = c->peercred.uid;
usr.sbin/vmd/control.c
475
vid.vid_uid = c->peercred.uid;
usr.sbin/vmd/control.c
507
vid.vid_uid = c->peercred.uid;
usr.sbin/vmd/control.c
523
imsg_event_add(&c->iev);
usr.sbin/vmd/control.c
531
imsg_compose_event(&c->iev, IMSG_CTL_FAIL, 0, 0, -1, &ret, sizeof(ret));
usr.sbin/vmd/control.c
532
imsgbuf_flush(&c->iev.ibuf);
usr.sbin/vmd/control.c
85
struct ctl_conn *c;
usr.sbin/vmd/parse.y
1002
if (c == '#')
usr.sbin/vmd/parse.y
1003
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/vmd/parse.y
1005
if (c == '$' && !expanding) {
usr.sbin/vmd/parse.y
1007
if ((c = lgetc(0)) == EOF)
usr.sbin/vmd/parse.y
1014
if (isalnum(c) || c == '_') {
usr.sbin/vmd/parse.y
1015
*p++ = c;
usr.sbin/vmd/parse.y
1019
lungetc(c);
usr.sbin/vmd/parse.y
1037
switch (c) {
usr.sbin/vmd/parse.y
1040
quotec = c;
usr.sbin/vmd/parse.y
1042
if ((c = lgetc(quotec)) == EOF)
usr.sbin/vmd/parse.y
1044
if (c == '\n') {
usr.sbin/vmd/parse.y
1047
} else if (c == '\\') {
usr.sbin/vmd/parse.y
1052
c = next;
usr.sbin/vmd/parse.y
1058
} else if (c == quotec) {
usr.sbin/vmd/parse.y
1061
} else if (c == '\0') {
usr.sbin/vmd/parse.y
1069
*p++ = c;
usr.sbin/vmd/parse.y
1080
if (c == '-' || isdigit(c)) {
usr.sbin/vmd/parse.y
1082
*p++ = c;
usr.sbin/vmd/parse.y
1087
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/vmd/parse.y
1088
lungetc(c);
usr.sbin/vmd/parse.y
1091
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/vmd/parse.y
1107
c = (unsigned char)*--p;
usr.sbin/vmd/parse.y
1108
if (c == '-')
usr.sbin/vmd/parse.y
1109
return (c);
usr.sbin/vmd/parse.y
1119
if (isalnum(c) || c == ':' || c == '_' || c == '/') {
usr.sbin/vmd/parse.y
1121
*p++ = c;
usr.sbin/vmd/parse.y
1126
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/vmd/parse.y
1127
lungetc(c);
usr.sbin/vmd/parse.y
1134
if (c == '\n') {
usr.sbin/vmd/parse.y
1138
if (c == EOF)
usr.sbin/vmd/parse.y
1140
return (c);
usr.sbin/vmd/parse.y
883
int c;
usr.sbin/vmd/parse.y
887
c = file->ungetbuf[--file->ungetpos];
usr.sbin/vmd/parse.y
889
c = getc(file->stream);
usr.sbin/vmd/parse.y
891
if (c == START_EXPAND)
usr.sbin/vmd/parse.y
893
else if (c == DONE_EXPAND)
usr.sbin/vmd/parse.y
898
return (c);
usr.sbin/vmd/parse.y
904
int c, next;
usr.sbin/vmd/parse.y
907
if ((c = igetc()) == EOF) {
usr.sbin/vmd/parse.y
914
return (c);
usr.sbin/vmd/parse.y
917
while ((c = igetc()) == '\\') {
usr.sbin/vmd/parse.y
920
c = next;
usr.sbin/vmd/parse.y
926
if (c == '\t' || c == ' ') {
usr.sbin/vmd/parse.y
929
c = getc(file->stream);
usr.sbin/vmd/parse.y
930
} while (c == '\t' || c == ' ');
usr.sbin/vmd/parse.y
931
ungetc(c, file->stream);
usr.sbin/vmd/parse.y
932
c = ' ';
usr.sbin/vmd/parse.y
935
if (c == EOF) {
usr.sbin/vmd/parse.y
945
while (c == EOF) {
usr.sbin/vmd/parse.y
948
c = igetc();
usr.sbin/vmd/parse.y
951
return (c);
usr.sbin/vmd/parse.y
955
lungetc(int c)
usr.sbin/vmd/parse.y
957
if (c == EOF)
usr.sbin/vmd/parse.y
967
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/vmd/parse.y
973
int c;
usr.sbin/vmd/parse.y
977
c = lgetc(0);
usr.sbin/vmd/parse.y
978
if (c == '\n') {
usr.sbin/vmd/parse.y
982
if (c == EOF)
usr.sbin/vmd/parse.y
993
int quotec, next, c;
usr.sbin/vmd/parse.y
998
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/wsconscfg/wsconscfg.c
65
int c, delete, get, kbd, idx, wsfd, res, mux;
usr.sbin/wsconscfg/wsconscfg.c
79
while ((c = getopt(argc, argv, "f:dgkmt:e:F")) != -1) {
usr.sbin/wsconscfg/wsconscfg.c
80
switch (c) {
usr.sbin/wsfontload/wsfontload.c
80
int c, res, wsfd, ffd, list, i;
usr.sbin/wsfontload/wsfontload.c
93
while ((c = getopt(argc, argv, "bB:e:f:h:lN:w:")) != -1) {
usr.sbin/wsfontload/wsfontload.c
94
switch (c) {
usr.sbin/wsmoused/mouse_protocols.c
190
char *c;
usr.sbin/wsmoused/mouse_protocols.c
226
c = "*n";
usr.sbin/wsmoused/mouse_protocols.c
231
if (write(mouse.mfd, c, 2) != 2)
usr.sbin/wsmoused/mouse_protocols.c
244
char c[4];
usr.sbin/wsmoused/mouse_protocols.c
253
read(fd, &c, sizeof(c));
usr.sbin/wsmoused/mouse_protocols.c
278
char c;
usr.sbin/wsmoused/mouse_protocols.c
356
while (read(mouse_fd, &c, 1) == 1) {
usr.sbin/wsmoused/mouse_protocols.c
358
if ((c == 0x08) || (c == 0x28)) { /* Begin ID */
usr.sbin/wsmoused/mouse_protocols.c
359
buf[i++] = c;
usr.sbin/wsmoused/mouse_protocols.c
367
++c; /* make it `End ID' */
usr.sbin/wsmoused/mouse_protocols.c
373
if (buf[i++] == c) /* End ID */
usr.sbin/wsmoused/mouse_protocols.c
378
if (buf[i - 1] != c)
usr.sbin/wsmoused/mouse_protocols.c
563
char c;
usr.sbin/wsmoused/mouse_protocols.c
679
c = 'g';
usr.sbin/wsmoused/mouse_protocols.c
681
c = 'e';
usr.sbin/wsmoused/mouse_protocols.c
683
c = 'h';
usr.sbin/wsmoused/mouse_protocols.c
685
c = 'd';
usr.sbin/wsmoused/mouse_protocols.c
687
c = 'g';
usr.sbin/wsmoused/mouse_protocols.c
689
c = 'd';
usr.sbin/wsmoused/mouse_protocols.c
691
c = 'e';
usr.sbin/wsmoused/mouse_protocols.c
693
c = 'h';
usr.sbin/wsmoused/mouse_protocols.c
695
c = 'j';
usr.sbin/wsmoused/mouse_protocols.c
697
c = 'd';
usr.sbin/wsmoused/mouse_protocols.c
698
write(mouse.mfd, &c, 1);
usr.sbin/wsmoused/mouse_protocols.c
716
read(mouse.mfd, &c, 1);
usr.sbin/wsmoused/mouse_protocols.c
717
debug("%c", c);
usr.sbin/wsmoused/mouse_protocols.c
718
if (c != *s)
usr.sbin/ypbind/ypbind.c
772
int i, c;
usr.sbin/ypbind/ypbind.c
797
while ((c = getc(ypdb->dom_servlistfp)) != '\n' && c != EOF)
usr.sbin/ypldap/aldap.c
1379
isu8cont(unsigned char c)
usr.sbin/ypldap/aldap.c
1381
return (c & (0x80 | 0x40)) == 0x80;
usr.sbin/ypldap/aldap.c
291
struct ber_element *root = NULL, *ber, *c;
usr.sbin/ypldap/aldap.c
304
c = ber;
usr.sbin/ypldap/aldap.c
326
aldap_create_page_control(c, 100, page);
usr.sbin/ypldap/aldap.c
350
struct ber c;
usr.sbin/ypldap/aldap.c
353
c.br_wbuf = NULL;
usr.sbin/ypldap/aldap.c
366
if ((len = ober_write_elements(&c, ber)) < 1)
usr.sbin/ypldap/aldap.c
369
c.br_wbuf, (size_t)len) == NULL)
usr.sbin/ypldap/aldap.c
373
ober_free(&c);
usr.sbin/ypldap/aldap.c
378
ober_free(&c);
usr.sbin/ypldap/parse.y
590
int c;
usr.sbin/ypldap/parse.y
594
c = file->ungetbuf[--file->ungetpos];
usr.sbin/ypldap/parse.y
596
c = getc(file->stream);
usr.sbin/ypldap/parse.y
598
if (c == START_EXPAND)
usr.sbin/ypldap/parse.y
600
else if (c == DONE_EXPAND)
usr.sbin/ypldap/parse.y
605
return (c);
usr.sbin/ypldap/parse.y
611
int c, next;
usr.sbin/ypldap/parse.y
614
if ((c = igetc()) == EOF) {
usr.sbin/ypldap/parse.y
621
return (c);
usr.sbin/ypldap/parse.y
624
while ((c = igetc()) == '\\') {
usr.sbin/ypldap/parse.y
627
c = next;
usr.sbin/ypldap/parse.y
634
if (c == EOF) {
usr.sbin/ypldap/parse.y
644
while (c == EOF) {
usr.sbin/ypldap/parse.y
647
c = igetc();
usr.sbin/ypldap/parse.y
650
return (c);
usr.sbin/ypldap/parse.y
654
lungetc(int c)
usr.sbin/ypldap/parse.y
656
if (c == EOF)
usr.sbin/ypldap/parse.y
666
file->ungetbuf[file->ungetpos++] = c;
usr.sbin/ypldap/parse.y
672
int c;
usr.sbin/ypldap/parse.y
676
c = lgetc(0);
usr.sbin/ypldap/parse.y
677
if (c == '\n') {
usr.sbin/ypldap/parse.y
681
if (c == EOF)
usr.sbin/ypldap/parse.y
692
int quotec, next, c;
usr.sbin/ypldap/parse.y
697
while ((c = lgetc(0)) == ' ' || c == '\t')
usr.sbin/ypldap/parse.y
701
if (c == '#')
usr.sbin/ypldap/parse.y
702
while ((c = lgetc(0)) != '\n' && c != EOF)
usr.sbin/ypldap/parse.y
704
if (c == '$' && !expanding) {
usr.sbin/ypldap/parse.y
706
if ((c = lgetc(0)) == EOF)
usr.sbin/ypldap/parse.y
713
if (isalnum(c) || c == '_') {
usr.sbin/ypldap/parse.y
714
*p++ = c;
usr.sbin/ypldap/parse.y
718
lungetc(c);
usr.sbin/ypldap/parse.y
736
switch (c) {
usr.sbin/ypldap/parse.y
739
quotec = c;
usr.sbin/ypldap/parse.y
741
if ((c = lgetc(quotec)) == EOF)
usr.sbin/ypldap/parse.y
743
if (c == '\n') {
usr.sbin/ypldap/parse.y
746
} else if (c == '\\') {
usr.sbin/ypldap/parse.y
751
c = next;
usr.sbin/ypldap/parse.y
757
} else if (c == quotec) {
usr.sbin/ypldap/parse.y
760
} else if (c == '\0') {
usr.sbin/ypldap/parse.y
768
*p++ = c;
usr.sbin/ypldap/parse.y
779
if (c == '-' || isdigit(c)) {
usr.sbin/ypldap/parse.y
781
*p++ = c;
usr.sbin/ypldap/parse.y
786
} while ((c = lgetc(0)) != EOF && isdigit(c));
usr.sbin/ypldap/parse.y
787
lungetc(c);
usr.sbin/ypldap/parse.y
790
if (c == EOF || allowed_to_end_number(c)) {
usr.sbin/ypldap/parse.y
806
c = (unsigned char)*--p;
usr.sbin/ypldap/parse.y
807
if (c == '-')
usr.sbin/ypldap/parse.y
808
return (c);
usr.sbin/ypldap/parse.y
818
if (isalnum(c) || c == ':' || c == '_') {
usr.sbin/ypldap/parse.y
820
*p++ = c;
usr.sbin/ypldap/parse.y
825
} while ((c = lgetc(0)) != EOF && (allowed_in_string(c)));
usr.sbin/ypldap/parse.y
826
lungetc(c);
usr.sbin/ypldap/parse.y
833
if (c == '\n') {
usr.sbin/ypldap/parse.y
837
if (c == EOF)
usr.sbin/ypldap/parse.y
839
return (c);
usr.sbin/ypldap/ypldap.c
504
int c;
usr.sbin/ypldap/ypldap.c
521
while ((c = getopt(argc, argv, "dD:nf:v")) != -1) {
usr.sbin/ypldap/ypldap.c
522
switch (c) {
usr.sbin/yppoll/yppoll.c
132
int order, c, r;
usr.sbin/yppoll/yppoll.c
137
while ((c=getopt(argc, argv, "h:d:")) != -1)
usr.sbin/yppoll/yppoll.c
138
switch (c) {
usr.sbin/ypserv/mkalias/mkalias.c
111
char *c;
usr.sbin/ypserv/mkalias/mkalias.c
114
for (c = name; i < len; i++) {
usr.sbin/ypserv/mkalias/mkalias.c
115
if (*c == '.')
usr.sbin/ypserv/mkalias/mkalias.c
117
c++;
usr.sbin/ypserv/mkalias/mkalias.c
122
for (c = name; i < len; i++) {
usr.sbin/ypserv/mkalias/mkalias.c
124
*c = (char)toupper(*c);
usr.sbin/ypserv/mkalias/mkalias.c
125
last = *c++;
usr.sbin/ypserv/mkalias/mkalias.c
48
char *c, *s, *r;
usr.sbin/ypserv/mkalias/mkalias.c
53
for (c = address; i < len; i++) {
usr.sbin/ypserv/mkalias/mkalias.c
54
if (*c == '@') {
usr.sbin/ypserv/mkalias/mkalias.c
58
*s++ = *c;
usr.sbin/ypserv/mkalias/mkalias.c
60
c++;
usr.sbin/ypserv/mkalias/mkalias.c
67
for (c = address; i < len; i++) {
usr.sbin/ypserv/mkalias/mkalias.c
68
if (c == r) {
usr.sbin/ypserv/mkalias/mkalias.c
72
*s++ = *c;
usr.sbin/ypserv/mkalias/mkalias.c
74
c++;
usr.sbin/ypserv/yppush/yppush.c
221
int c, r, i;
usr.sbin/ypserv/yppush/yppush.c
232
while ((c=getopt(argc, argv, "d:h:v")) != -1)
usr.sbin/ypserv/yppush/yppush.c
233
switch (c) {
usr.sbin/ypserv/ypserv/acl.c
49
char *c, *p, l;
usr.sbin/ypserv/ypserv/acl.c
55
c = buf;
usr.sbin/ypserv/ypserv/acl.c
56
while (*c != '\0') {
usr.sbin/ypserv/ypserv/acl.c
57
if (*c == '#' || *c == '\n') {
usr.sbin/ypserv/ypserv/acl.c
58
*c = '\0';
usr.sbin/ypserv/ypserv/acl.c
60
c++;
usr.sbin/ypserv/ypserv/acl.c
64
c = p = buf; l = ' ';
usr.sbin/ypserv/ypserv/acl.c
65
while (*c != '\0') {
usr.sbin/ypserv/ypserv/acl.c
67
isspace((unsigned char)*c)) {
usr.sbin/ypserv/ypserv/acl.c
68
c++;
usr.sbin/ypserv/ypserv/acl.c
70
l = *c++; *p = l; p++;
usr.sbin/ypset/ypset.c
114
int c;
usr.sbin/ypset/ypset.c
122
while ((c = getopt(argc, argv, "h:d:")) != -1)
usr.sbin/ypset/ypset.c
123
switch(c) {
usr.sbin/zic/zic.c
1833
int i, c, compat = 0;
usr.sbin/zic/zic.c
1923
c = stringrule(result, size, dstrp, dstrp->r_stdoff, zp->z_gmtoff);
usr.sbin/zic/zic.c
1924
if (c < 0) {
usr.sbin/zic/zic.c
1928
if (compat < c)
usr.sbin/zic/zic.c
1929
compat = c;
usr.sbin/zic/zic.c
1931
c = stringrule(result, size, stdrp, dstrp->r_stdoff, zp->z_gmtoff);
usr.sbin/zic/zic.c
1932
if (c < 0) {
usr.sbin/zic/zic.c
1936
if (compat < c)
usr.sbin/zic/zic.c
1937
compat = c;
usr.sbin/zic/zic.c
441
int c;
usr.sbin/zic/zic.c
459
while ((*tp++ = c = *fp++) != '\0') {
usr.sbin/zic/zic.c
460
if (c != '%')
usr.sbin/zic/zic.c
466
*t++ = c = *f++;
usr.sbin/zic/zic.c
467
} while (isdigit((unsigned char)c));
usr.sbin/zic/zic.c
468
if (c == '$') {
usr.sbin/zic/zic.c
507
int i, j, c;
usr.sbin/zic/zic.c
513
while ((c = getopt(argc, argv, "d:l:p:L:vy:")) != -1)
usr.sbin/zic/zic.c
514
switch (c) {