| /openbsd/src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/format/ |
| D | ext-3.c | 11 foo (char *s, size_t m, const struct tm *tp) in foo() argument 17 strftime (s, m, "%5C%-C%_C%0C", tp); in foo() 19 strftime (s, m, "%-5C%_5C%05C%-5d%_5d%05d%-5e%_5e%05e%-5G%_5G%05G", tp); in foo() 20 strftime (s, m, "%-5H%_5H%05H%-5I%_5I%05I%-5j%_5j%05j%-5m%_5m%05m", tp); in foo() 21 strftime (s, m, "%-5M%_5M%05M%-5S%_5S%05S%-5u%_5u%05u%-5U%_5U%05U", tp); in foo() 22 strftime (s, m, "%-5V%_5V%05V%-5w%_5w%05w%-5W%_5W%05W%-5Y%_5Y%05Y", tp); in foo() 24 strftime (s, m, "%-5k%_5k%05k%-5l%_5l%05l%-20s%_20s%020s", tp); in foo() 26 strftime (s, m, "%-5g%_5g%05g%-5y%_5y%05y", tp); /* { dg-warning "only last 2" "2-digit year" } */ in foo() 28 strftime (s, m, "%5a", tp); /* { dg-warning "width" "bad %a" } */ in foo() 29 strftime (s, m, "%-a", tp); /* { dg-warning "flag" "bad %a" } */ in foo() [all …]
|
| D | c99-strftime-1.c | 9 foo (char *s, size_t m, const struct tm *tp) in foo() argument 13 strftime (s, m, "%a%A%b%B%C%d%e%F%G%h%H%I%j%m%M%p%R%S%t%T%u%U%V%w%W%X%Y%z%Z%%", tp); in foo() 14 strftime (s, m, "%EC%EX%EY%Od%Oe%OH%OI%Om%OM%OS%Ou%OU%OV%Ow%OW", tp); in foo() 16 strftime (s, m, "%D", tp); /* { dg-warning "only last 2" "2-digit year" } */ in foo() 17 strftime (s, m, "%g", tp); /* { dg-warning "only last 2" "2-digit year" } */ in foo() 18 strftime (s, m, "%y", tp); /* { dg-warning "only last 2" "2-digit year" } */ in foo() 19 strftime (s, m, "%Oy", tp); /* { dg-warning "only last 2" "2-digit year" } */ in foo() 21 strftime (s, m, "%c", tp); /* { dg-warning "some locales" "2-digit year" } */ in foo() 22 strftime (s, m, "%Ec", tp); /* { dg-warning "some locales" "2-digit year" } */ in foo() 23 strftime (s, m, "%x", tp); /* { dg-warning "some locales" "2-digit year" } */ in foo() [all …]
|
| /openbsd/src/gnu/usr.bin/binutils/gdb/ |
| D | thread.c | 72 struct thread_info *tp; in delete_step_resume_breakpoint() local 77 for (tp = thread_list; tp; tp = tp->next) in delete_step_resume_breakpoint() 78 if (tp->step_resume_breakpoint == *breakpointp) in delete_step_resume_breakpoint() 79 tp->step_resume_breakpoint = NULL; in delete_step_resume_breakpoint() 86 free_thread (struct thread_info *tp) in free_thread() argument 90 if (tp->step_resume_breakpoint) in free_thread() 91 delete_breakpoint (tp->step_resume_breakpoint); in free_thread() 95 if (tp->private) in free_thread() 96 xfree (tp->private); in free_thread() 98 xfree (tp); in free_thread() [all …]
|
| /openbsd/src/usr.bin/vi/vi/ |
| D | v_txt.c | 228 #define UPDATE_POSITION(sp, tp) { \ argument 229 (sp)->lno = (tp)->lno; \ 230 (sp)->cno = (tp)->cno; \ 247 TEXT *ntp, *tp; /* Input text structures. */ in v_txt() local 288 tp = TAILQ_FIRST(tiqh); in v_txt() 289 if (TAILQ_NEXT(tp, q) || tp->lb_len < len + 32) { in v_txt() 293 tp->ai = tp->insert = tp->offset = tp->owrite = 0; in v_txt() 295 tp->len = len; in v_txt() 296 memmove(tp->lb, lp, len); in v_txt() 298 tp->len = 0; in v_txt() [all …]
|
| /openbsd/src/sys/netinet/ |
| D | tcp_timer.c | 88 tcp_timer_enter(struct inpcb *inp, struct socket **so, struct tcpcb **tp, in tcp_timer_enter() argument 96 *tp = NULL; in tcp_timer_enter() 99 *tp = intotcpcb(inp); in tcp_timer_enter() 101 if (*tp == NULL || !ISSET((*tp)->t_flags, TF_TIMER << timer) || in tcp_timer_enter() 102 timeout_pending(&(*tp)->t_timer[timer])) in tcp_timer_enter() 104 CLR((*tp)->t_flags, TF_TIMER << timer); in tcp_timer_enter() 125 struct tcpcb *otp = NULL, *tp; in tcp_timer_delack() local 133 if (tcp_timer_enter(inp, &so, &tp, TCPT_DELACK)) in tcp_timer_delack() 137 otp = tp; in tcp_timer_delack() 138 ostate = tp->t_state; in tcp_timer_delack() [all …]
|
| D | tcp_output.c | 107 void tcp_print_holes(struct tcpcb *tp); 110 tcp_print_holes(struct tcpcb *tp) in tcp_print_holes() argument 112 struct sackhole *p = tp->snd_holes; in tcp_print_holes() 130 tcp_sack_output(struct tcpcb *tp) in tcp_sack_output() argument 134 if (!tp->sack_enable) in tcp_sack_output() 136 p = tp->snd_holes; in tcp_sack_output() 139 if (SEQ_LT(p->rxmit, tp->snd_una)) {/* old SACK hole */ in tcp_sack_output() 145 tcp_print_holes(tp); in tcp_sack_output() 161 tcp_sack_adjust(struct tcpcb *tp) in tcp_sack_adjust() argument 163 struct sackhole *cur = tp->snd_holes; in tcp_sack_adjust() [all …]
|
| D | tcp_input.c | 135 #define ND6_HINT(tp) \ argument 137 if (tp && tp->t_inpcb && \ 138 ISSET(tp->t_inpcb->inp_flags, INP_IPV6) && \ 139 rtisvalid(tp->t_inpcb->inp_route.ro_rt)) { \ 140 nd6_nud_hint(tp->t_inpcb->inp_route.ro_rt); \ 144 #define ND6_HINT(tp) argument 166 #define TCP_SETUP_ACK(tp, tiflags, m) \ argument 171 if (TCP_TIMER_ISARMED(tp, TCPT_DELACK) || \ 174 tp->t_flags |= TF_ACKNOW; \ 176 TCP_TIMER_ARM(tp, TCPT_DELACK, tcp_delack_msecs); \ [all …]
|
| D | tcp_usrreq.c | 199 struct tcpcb *tp; in tcp_sogetpcb() local 206 if ((inp = sotoinpcb(so)) == NULL || (tp = intotcpcb(inp)) == NULL) { in tcp_sogetpcb() 215 *rtp = tp; in tcp_sogetpcb() 226 tcp_fill_info(struct tcpcb *tp, struct socket *so, struct mbuf *m) in tcp_fill_info() argument 243 ti->tcpi_state = tp->t_state; in tcp_fill_info() 244 if ((tp->t_flags & TF_REQ_TSTMP) && (tp->t_flags & TF_RCVD_TSTMP)) in tcp_fill_info() 246 if (tp->t_flags & TF_SACK_PERMIT) in tcp_fill_info() 248 if ((tp->t_flags & TF_REQ_SCALE) && (tp->t_flags & TF_RCVD_SCALE)) { in tcp_fill_info() 250 ti->tcpi_snd_wscale = tp->snd_scale; in tcp_fill_info() 251 ti->tcpi_rcv_wscale = tp->rcv_scale; in tcp_fill_info() [all …]
|
| D | tcp_subr.c | 201 tcp_template(struct tcpcb *tp) in tcp_template() argument 203 struct inpcb *inp = tp->t_inpcb; in tcp_template() 210 if ((m = tp->t_template) == 0) { in tcp_template() 215 switch (tp->pf) { in tcp_template() 229 switch(tp->pf) { in tcp_template() 296 tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0, in tcp_respond() argument 309 if (tp) { in tcp_respond() 310 struct socket *so = tp->t_inpcb->inp_socket; in tcp_respond() 316 af = tp->pf; in tcp_respond() 366 if (tp) in tcp_respond() [all …]
|
| /openbsd/src/sys/kern/ |
| D | tty.c | 180 ttyopen(dev_t device, struct tty *tp, struct proc *p) in ttyopen() argument 185 tp->t_dev = device; in ttyopen() 186 if (!ISSET(tp->t_state, TS_ISOPEN)) { in ttyopen() 187 SET(tp->t_state, TS_ISOPEN); in ttyopen() 188 memset(&tp->t_winsize, 0, sizeof(tp->t_winsize)); in ttyopen() 189 tp->t_column = 0; in ttyopen() 191 CLR(tp->t_state, TS_WOPEN); in ttyopen() 202 ttyclose(struct tty *tp) in ttyclose() argument 204 if (constty == tp) in ttyclose() 207 ttyflush(tp, FREAD | FWRITE); in ttyclose() [all …]
|
| D | tty_pty.c | 233 struct tty *tp; in ptsopen() local 240 tp = pti->pt_tty; in ptsopen() 241 if ((tp->t_state & TS_ISOPEN) == 0) { in ptsopen() 242 tp->t_state |= TS_WOPEN; in ptsopen() 243 ttychars(tp); /* Set up default chars */ in ptsopen() 244 tp->t_iflag = TTYDEF_IFLAG; in ptsopen() 245 tp->t_oflag = TTYDEF_OFLAG; in ptsopen() 246 tp->t_lflag = TTYDEF_LFLAG; in ptsopen() 247 tp->t_cflag = TTYDEF_CFLAG; in ptsopen() 248 tp->t_ispeed = tp->t_ospeed = B115200; in ptsopen() [all …]
|
| /openbsd/src/sys/dev/wscons/ |
| D | wstpad.c | 44 #define PRIMARYBTN_CLICKED(tp) ((tp)->btns_sync & PRIMARYBTN & (tp)->btns) argument 45 #define PRIMARYBTN_RELEASED(tp) ((tp)->btns_sync & PRIMARYBTN & ~(tp)->btns) argument 47 #define IS_MT(tp) ((tp)->features & WSTPAD_MT) argument 48 #define DISABLE(tp) ((tp)->features & WSTPAD_DISABLE) argument 324 wstpad_set_direction(struct wstpad *tp, struct tpad_touch *t, int dx, int dy) in wstpad_set_direction() argument 331 memcpy(&t->start, &tp->time, sizeof(struct timespec)); in wstpad_set_direction() 335 dir = direction(dx, dy, tp->ratio); in wstpad_set_direction() 338 memcpy(&t->start, &tp->time, sizeof(struct timespec)); in wstpad_set_direction() 341 memcpy(&t->match, &tp->time, sizeof(struct timespec)); in wstpad_set_direction() 343 timespecsub(&tp->time, &t->match, &ts); in wstpad_set_direction() [all …]
|
| /openbsd/src/usr.sbin/tcpdump/ |
| D | addrtoname.c | 298 struct enamemem *tp; in lookup_emem() local 304 tp = &enametable[(i ^ j) & (HASHNAMESIZE-1)]; in lookup_emem() 305 while (tp->e_nxt) in lookup_emem() 306 if (tp->e_addr0 == i && in lookup_emem() 307 tp->e_addr1 == j && in lookup_emem() 308 tp->e_addr2 == k) in lookup_emem() 309 return tp; in lookup_emem() 311 tp = tp->e_nxt; in lookup_emem() 312 tp->e_addr0 = i; in lookup_emem() 313 tp->e_addr1 = j; in lookup_emem() [all …]
|
| /openbsd/src/usr.bin/vi/ex/ |
| D | ex_txt.c | 58 TEXT ait, *ntp, *tp; in ex_txt() local 71 tp = TAILQ_FIRST(tiqh); in ex_txt() 72 if (TAILQ_NEXT(tp, q) || tp->lb_len < 32) { in ex_txt() 76 tp->len = 0; in ex_txt() 78 newtp: if ((tp = text_init(sp, NULL, 0, 32)) == NULL) in ex_txt() 80 TAILQ_INSERT_HEAD(tiqh, tp, q); in ex_txt() 84 tp->lno = sp->lno + 1; in ex_txt() 104 if (v_txt_auto(sp, sp->lno, NULL, 0, tp)) in ex_txt() 107 txt_prompt(sp, tp, prompt, flags); in ex_txt() 144 BINC_GOTO(sp, tp->lb, tp->lb_len, tp->len + 1); in ex_txt() [all …]
|
| /openbsd/src/usr.sbin/nsd/ |
| D | xfrd-tcp.c | 81 setup_ssl(struct xfrd_tcp_pipeline* tp, struct xfrd_tcp_set* tcp_set, in setup_ssl() argument 90 tp->ssl = SSL_new((SSL_CTX*)tcp_set->ssl_ctx); in setup_ssl() 91 if(!tp->ssl) { in setup_ssl() 95 SSL_set_connect_state(tp->ssl); in setup_ssl() 96 (void)SSL_set_mode(tp->ssl, SSL_MODE_AUTO_RETRY); in setup_ssl() 97 if(!SSL_set_fd(tp->ssl, tp->tcp_w->fd)) { in setup_ssl() 99 SSL_free(tp->ssl); in setup_ssl() 100 tp->ssl = NULL; in setup_ssl() 104 SSL_set_verify(tp->ssl, SSL_VERIFY_PEER, tls_verify_callback); in setup_ssl() 105 if(!SSL_set1_host(tp->ssl, auth_domain_name)) { in setup_ssl() [all …]
|
| /openbsd/src/usr.bin/mandoc/ |
| D | tbl_term.c | 160 term_tbl(struct termp *tp, const struct tbl_span *sp) in term_tbl() argument 172 tp->flags |= TERMP_NOSPACE | TERMP_NONOSPACE; in term_tbl() 173 save_offset = tp->tcol->offset; in term_tbl() 180 if (tp->tbl.cols == NULL) { in term_tbl() 181 borders_locale = tp->enc == TERMENC_UTF8 ? in term_tbl() 184 tp->tbl.len = term_tbl_len; in term_tbl() 185 tp->tbl.slen = term_tbl_strlen; in term_tbl() 186 tp->tbl.sulen = term_tbl_sulen; in term_tbl() 187 tp->tbl.arg = tp; in term_tbl() 189 tblcalc(&tp->tbl, sp, tp->tcol->offset, tp->tcol->rmargin); in term_tbl() [all …]
|
| /openbsd/src/sys/arch/powerpc64/dev/ |
| D | opalcons.c | 143 struct tty *tp; in opalconsopen() local 149 tp = sc->sc_tty; in opalconsopen() 151 tp = sc->sc_tty = ttymalloc(0); in opalconsopen() 153 tp->t_oproc = opalconsstart; in opalconsopen() 154 tp->t_param = opalconsparam; in opalconsopen() 155 tp->t_dev = dev; in opalconsopen() 156 if ((tp->t_state & TS_ISOPEN) == 0) { in opalconsopen() 157 ttychars(tp); in opalconsopen() 158 tp->t_iflag = TTYDEF_IFLAG; in opalconsopen() 159 tp->t_oflag = TTYDEF_OFLAG; in opalconsopen() [all …]
|
| /openbsd/src/bin/ksh/ |
| D | table.c | 43 ktinit(struct table *tp, Area *ap, int tsize) in ktinit() argument 45 tp->areap = ap; in ktinit() 46 tp->tbls = NULL; in ktinit() 47 tp->size = tp->nfree = 0; in ktinit() 49 texpand(tp, tsize); in ktinit() 53 texpand(struct table *tp, int nsize) in texpand() argument 57 struct tbl **ntblp, **otblp = tp->tbls; in texpand() 58 int osize = tp->size; in texpand() 60 ntblp = areallocarray(NULL, nsize, sizeof(struct tbl *), tp->areap); in texpand() 63 tp->size = nsize; in texpand() [all …]
|
| /openbsd/src/lib/libcurses/ |
| D | term_entry.h | 59 #define NUM_BOOLEANS(tp) (tp)->num_Booleans argument 60 #define NUM_NUMBERS(tp) (tp)->num_Numbers argument 61 #define NUM_STRINGS(tp) (tp)->num_Strings argument 62 #define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i] argument 64 #define NUM_BOOLEANS(tp) BOOLCOUNT 65 #define NUM_NUMBERS(tp) NUMCOUNT 66 #define NUM_STRINGS(tp) STRCOUNT 67 #define EXT_NAMES(tp,i,limit,index,table) table[i] 70 #define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings) argument 72 #define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++) argument [all …]
|
| /openbsd/src/sys/arch/sparc64/dev/ |
| D | vcons.c | 177 struct tty *tp; in vconsopen() local 188 tp = sc->sc_tty; in vconsopen() 190 tp = sc->sc_tty = ttymalloc(0); in vconsopen() 192 tp->t_oproc = vconsstart; in vconsopen() 193 tp->t_param = vconsparam; in vconsopen() 194 tp->t_dev = dev; in vconsopen() 195 if ((tp->t_state & TS_ISOPEN) == 0) { in vconsopen() 196 ttychars(tp); in vconsopen() 197 tp->t_iflag = TTYDEF_IFLAG; in vconsopen() 198 tp->t_oflag = TTYDEF_OFLAG; in vconsopen() [all …]
|
| /openbsd/src/usr.sbin/unbound/validator/ |
| D | autotrust.c | 335 struct trust_anchor* tp = (struct trust_anchor*)calloc(1, sizeof(*tp)); in autr_tp_create() local 336 if(!tp) return NULL; in autr_tp_create() 337 tp->name = memdup(own, own_len); in autr_tp_create() 338 if(!tp->name) { in autr_tp_create() 339 free(tp); in autr_tp_create() 342 tp->namelen = own_len; in autr_tp_create() 343 tp->namelabs = dname_count_labels(tp->name); in autr_tp_create() 344 tp->node.key = tp; in autr_tp_create() 345 tp->dclass = dc; in autr_tp_create() 346 tp->autr = (struct autr_point_data*)calloc(1, sizeof(*tp->autr)); in autr_tp_create() [all …]
|
| /openbsd/src/sbin/unwind/libunbound/validator/ |
| D | autotrust.c | 335 struct trust_anchor* tp = (struct trust_anchor*)calloc(1, sizeof(*tp)); in autr_tp_create() local 336 if(!tp) return NULL; in autr_tp_create() 337 tp->name = memdup(own, own_len); in autr_tp_create() 338 if(!tp->name) { in autr_tp_create() 339 free(tp); in autr_tp_create() 342 tp->namelen = own_len; in autr_tp_create() 343 tp->namelabs = dname_count_labels(tp->name); in autr_tp_create() 344 tp->node.key = tp; in autr_tp_create() 345 tp->dclass = dc; in autr_tp_create() 346 tp->autr = (struct autr_point_data*)calloc(1, sizeof(*tp->autr)); in autr_tp_create() [all …]
|
| /openbsd/src/sys/arch/riscv64/dev/ |
| D | sfuart.c | 194 struct tty *tp = sc->sc_tty; in sfuart_intr() local 199 if (tp == NULL) in sfuart_intr() 203 ISSET(tp->t_state, TS_BUSY)) { in sfuart_intr() 204 CLR(tp->t_state, TS_BUSY | TS_FLUSH); in sfuart_intr() 206 wakeup(&tp->t_outq); in sfuart_intr() 207 (*linesw[tp->t_line].l_start)(tp); in sfuart_intr() 236 struct tty *tp = sc->sc_tty; in sfuart_softintr() local 258 if (tp == NULL || !ISSET(tp->t_state, TS_ISOPEN)) { in sfuart_softintr() 268 if (tp->t_dev == cn_tab->cn_dev) { in sfuart_softintr() 274 (*linesw[tp->t_line].l_rint)(27, tp); in sfuart_softintr() [all …]
|
| /openbsd/src/sys/dev/fdt/ |
| D | amluart.c | 199 struct tty *tp = sc->sc_tty; in amluart_intr() local 205 if (tp == NULL) in amluart_intr() 210 ISSET(tp->t_state, TS_BUSY)) { in amluart_intr() 211 CLR(tp->t_state, TS_BUSY | TS_FLUSH); in amluart_intr() 213 wakeup(&tp->t_outq); in amluart_intr() 214 (*linesw[tp->t_line].l_start)(tp); in amluart_intr() 250 struct tty *tp = sc->sc_tty; in amluart_softintr() local 272 if (tp == NULL || !ISSET(tp->t_state, TS_ISOPEN)) { in amluart_softintr() 282 if (tp->t_dev == cn_tab->cn_dev) { in amluart_softintr() 288 (*linesw[tp->t_line].l_rint)(27, tp); in amluart_softintr() [all …]
|
| /openbsd/src/sys/arch/hppa/dev/ |
| D | pdc.c | 71 void pdcstart(struct tty *tp); 73 int pdcparam(struct tty *tp, struct termios *); 195 struct tty *tp; local 205 tp = sc->sc_tty; 207 tp = sc->sc_tty = ttymalloc(0); 210 tp->t_oproc = pdcstart; 211 tp->t_param = pdcparam; 212 tp->t_dev = dev; 213 if ((tp->t_state & TS_ISOPEN) == 0) { 214 ttychars(tp); [all …]
|