/openbsd/bin/ksh/ |
H A D | vi.c | 575 memmove(es->cbuf + tcursor, es->cbuf + es->cursor, in vi_insert() 578 memcpy(es->cbuf + tcursor, undo->cbuf + tcursor, in vi_insert() 593 memmove(es->cbuf, &es->cbuf[es->cursor], in vi_insert() 604 memmove(&es->cbuf[tcursor], &es->cbuf[es->cursor], in vi_insert() 681 memmove(&es->cbuf[es->cursor+1], &es->cbuf[es->cursor], in vi_insert() 716 memmove(undo->cbuf, es->cbuf, es->linelen); in vi_cmd() 1397 memcpy(new->cbuf, old->cbuf, old->linelen); in save_edstate() 1408 memcpy(new->cbuf, old->cbuf, old->linelen); in restore_edstate() 1430 es->cbuf = buf; in edit_reset() 1482 memmove(&es->cbuf[es->cursor + len], &es->cbuf[es->cursor], in putbuf() [all …]
|
/openbsd/sys/ntfs/ |
H A D | ntfs_compr.c | 42 ntfs_uncompblock(u_int8_t *buf, u_int8_t *cbuf) in ntfs_uncompblock() argument 50 len = GET_UINT16(cbuf) & 0xFFF; in ntfs_uncompblock() 52 len, len, GET_UINT16(cbuf)); in ntfs_uncompblock() 54 if (!(GET_UINT16(cbuf) & 0x8000)) { in ntfs_uncompblock() 59 memcpy(buf, cbuf + 2, len + 1); in ntfs_uncompblock() 66 ctag = cbuf[cpos++]; in ntfs_uncompblock() 74 boff = -1 - (GET_UINT16(cbuf + cpos) >> dshift); in ntfs_uncompblock() 75 blen = 3 + (GET_UINT16(cbuf + cpos) & lmask); in ntfs_uncompblock() 83 buf[pos++] = cbuf[cpos++]; in ntfs_uncompblock()
|
/openbsd/libexec/ftpd/ |
H A D | ftpcmd.y | 93 char cbuf[512]; variable 1205 n = get_line(cbuf, sizeof(cbuf)-1); in yylex() 1231 c = cbuf[cpos]; in yylex() 1233 upper(cbuf); in yylex() 1235 cbuf[cpos] = c; in yylex() 1252 cp = &cbuf[cpos]; in yylex() 1255 c = cbuf[cpos]; in yylex() 1259 cbuf[cpos] = c; in yylex() 1298 cp = &cbuf[cpos]; in yylex() 1324 c = cbuf[cpos]; in yylex() [all …]
|
/openbsd/usr.bin/vi/vi/ |
H A D | vs_line.c | 49 char *p, *cbp, *ecbp, cbuf[128]; in vs_line() local 137 nlen = snprintf(cbuf, sizeof(cbuf), in vs_line() 139 if (nlen >= sizeof(cbuf)) in vs_line() 140 nlen = sizeof(cbuf) - 1; in vs_line() 329 ecbp = (cbp = cbuf) + sizeof(cbuf) - 1; in vs_line() 402 (void)(gp)->scr_addstr((sp), (cbuf), (cbp) - (cbuf)); \ in vs_line() 403 (cbp) = (cbuf); \ in vs_line() 420 FLUSH(gp, sp, cbp, cbuf); in vs_line() 441 FLUSH(gp, sp, cbp, cbuf); in vs_line() 452 if (cbp > cbuf) in vs_line() [all …]
|
/openbsd/sys/arch/alpha/stand/ |
H A D | prom.c | 75 char cbuf; local 78 cbuf = '\r'; 81 (u_int64_t)&cbuf, 1, 0); 83 cbuf = '\n'; 85 cbuf = c; 88 (u_int64_t)&cbuf, 1, 0);
|
/openbsd/usr.bin/less/ |
H A D | command.c | 179 char *cbuf; in exec_mca() local 182 cbuf = get_cmdbuf(); in exec_mca() 197 while (*cbuf == '+' || *cbuf == ' ') in exec_mca() 198 cbuf++; in exec_mca() 200 if (*cbuf == '\0') in exec_mca() 210 match_brac(cbuf[0], cbuf[1], 1, (int)number); in exec_mca() 213 match_brac(cbuf[1], cbuf[0], 0, (int)number); in exec_mca() 220 if (strlen(cbuf) == 0) { in exec_mca() 238 edit_list(cbuf); in exec_mca() 919 char *cbuf; in commands() local [all …]
|
/openbsd/regress/lib/libc/sys/ |
H A D | t_clock_gettime.c | 159 char name[128], cbuf[512], ctrbuf[10240]; in ATF_TC_BODY() local 160 size_t cbufsiz = sizeof(cbuf); in ATF_TC_BODY() 166 if (sysctlbyname(TC_HARDWARE, cbuf, &cbufsiz, NULL, 0) != 0) { in ATF_TC_BODY() 173 (void)printf("%s = %s\n", TC_HARDWARE, cbuf); in ATF_TC_BODY() 174 REQUIRE_LIBC(save = strdup(cbuf), NULL); in ATF_TC_BODY()
|
/openbsd/sys/kern/ |
H A D | tty_endrun.c | 81 char cbuf[ENDRUNLEN]; /* receive buffer */ member 194 np->cbuf[np->pos++] = c; /* TFOM char */ in endruninput() 233 np->cbuf[np->pos] = '\0'; in endruninput() 239 np->cbuf[np->pos++] = c; in endruninput() 254 DPRINTFN(1, ("%s\n", np->cbuf)); in endrun_scan() 256 fld[fldcnt++] = &np->cbuf[0]; in endrun_scan() 258 switch (np->cbuf[n]) { in endrun_scan() 260 np->cbuf[n] = '\0'; in endrun_scan() 261 cs = &np->cbuf[n + 1]; in endrun_scan() 265 np->cbuf[n] = '\0'; in endrun_scan() [all …]
|
H A D | tty_msts.c | 53 char cbuf[MSTSMAX]; /* receive buffer */ member 192 np->cbuf[np->pos] = '\0'; in mstsinput() 199 np->cbuf[np->pos++] = c; in mstsinput() 214 fld[fldcnt++] = &np->cbuf[0]; in msts_scan() 216 switch (np->cbuf[n]) { in msts_scan() 218 np->cbuf[n] = '\0'; in msts_scan() 219 cs = &np->cbuf[n + 1]; in msts_scan() 223 np->cbuf[n] = '\0'; in msts_scan() 224 fld[fldcnt++] = &np->cbuf[n + 1]; in msts_scan()
|
H A D | tty_nmea.c | 54 char cbuf[NMEAMAX]; /* receive buffer */ member 240 np->cbuf[np->pos] = '\0'; in nmeainput() 247 np->cbuf[np->pos++] = c; in nmeainput() 262 fld[fldcnt++] = &np->cbuf[0]; /* message type */ in nmea_scan() 264 switch (np->cbuf[n]) { in nmea_scan() 266 np->cbuf[n] = '\0'; in nmea_scan() 267 cs = &np->cbuf[n + 1]; in nmea_scan() 271 cksum ^= np->cbuf[n]; in nmea_scan() 272 np->cbuf[n] = '\0'; in nmea_scan() 273 fld[fldcnt++] = &np->cbuf[n + 1]; in nmea_scan() [all …]
|
/openbsd/sys/arch/sparc64/dev/ |
H A D | comkbd_ebus.c | 339 u_int8_t cbuf[SUNKBD_MAX_INPUT_SIZE], *cptr; in comkbd_soft() local 342 cptr = cbuf; in comkbd_soft() 348 if (cptr - cbuf == sizeof cbuf) { in comkbd_soft() 349 sunkbd_input(ss, cbuf, cptr - cbuf); in comkbd_soft() 350 cptr = cbuf; in comkbd_soft() 353 if (cptr != cbuf) in comkbd_soft() 354 sunkbd_input(ss, cbuf, cptr - cbuf); in comkbd_soft()
|
H A D | z8530kbd.c | 896 u_int8_t cbuf[SUNKBD_MAX_INPUT_SIZE], *c; in zskbd_rxsoft() local 908 c = cbuf; in zskbd_rxsoft() 925 if (c - cbuf == sizeof cbuf) { in zskbd_rxsoft() 926 sunkbd_input(ss, cbuf, c - cbuf); in zskbd_rxsoft() 927 c = cbuf; in zskbd_rxsoft() 935 if (c != cbuf) in zskbd_rxsoft() 936 sunkbd_input(ss, cbuf, c - cbuf); in zskbd_rxsoft()
|
/openbsd/sys/arch/arm64/dev/ |
H A D | aplspmi.c | 167 uint8_t *cbuf = buf; in aplspmi_cmd_read() local 185 memcpy(cbuf, &resp, MIN(len, 4)); in aplspmi_cmd_read() 186 cbuf += MIN(len, 4); in aplspmi_cmd_read() 198 const uint8_t *cbuf = buf; in aplspmi_cmd_write() local 208 memcpy(&data, cbuf, MIN(len, 4)); in aplspmi_cmd_write() 210 cbuf += MIN(len, 4); in aplspmi_cmd_write()
|
/openbsd/regress/lib/libssl/ssl/ |
H A D | ssltest.c | 850 char cbuf[1024*8]; in doit_biopair() local 854 memset(cbuf, 0, sizeof(cbuf)); in doit_biopair() 864 if (cw_num > (long)sizeof cbuf) in doit_biopair() 865 i = sizeof cbuf; in doit_biopair() 868 r = BIO_write(c_ssl_bio, cbuf, i); in doit_biopair() 892 r = BIO_read(c_ssl_bio, cbuf, sizeof(cbuf)); in doit_biopair() 1127 char cbuf[1024*8], sbuf[1024*8]; in doit() local 1141 memset(cbuf, 0, sizeof(cbuf)); in doit() 1205 j = (cw_num > (long)sizeof(cbuf)) ? in doit() 1207 i = BIO_write(c_bio, cbuf, j); in doit() [all …]
|
/openbsd/sys/dev/fdt/ |
H A D | qcspmi.c | 381 uint8_t *cbuf = buf; in qcspmi_cmd_read() local 430 memcpy(cbuf, ®, MIN(len, 4)); in qcspmi_cmd_read() 431 cbuf += MIN(len, 4); in qcspmi_cmd_read() 437 memcpy(cbuf, ®, MIN(len, 4)); in qcspmi_cmd_read() 438 cbuf += MIN(len, 4); in qcspmi_cmd_read() 450 const uint8_t *cbuf = buf; in qcspmi_cmd_write() local 472 memcpy(®, cbuf, MIN(len, 4)); in qcspmi_cmd_write() 475 cbuf += MIN(len, 4); in qcspmi_cmd_write() 479 memcpy(®, cbuf, MIN(len, 4)); in qcspmi_cmd_write() 482 cbuf += MIN(len, 4); in qcspmi_cmd_write()
|
/openbsd/sys/dev/hil/ |
H A D | hilkbd.c | 397 u_char cbuf[HILBUFSIZE * 2]; in hilkbd_callback() local 407 cbuf[j++] = 0xe0; in hilkbd_callback() 408 cbuf[j] = c & 0x7f; in hilkbd_callback() 410 cbuf[j] |= 0x80; in hilkbd_callback() 415 wskbd_rawinput(sc->sc_wskbddev, cbuf, j); in hilkbd_callback()
|
/openbsd/sys/arch/luna88k/dev/ |
H A D | lunaws.c | 314 u_char cbuf[2]; in omkbd_input() local 321 cbuf[j++] = 0xe0; in omkbd_input() 322 cbuf[j] = c & 0x7f; in omkbd_input() 324 cbuf[j] |= 0x80; in omkbd_input() 327 wskbd_rawinput(sc->sc_wskbddev, cbuf, j); in omkbd_input()
|
/openbsd/sys/arch/alpha/stand/nboot/ |
H A D | promcons.c | 90 char cbuf = c; in prom_cnputc() local 94 (u_int64_t)&cbuf, 1, 0); in prom_cnputc()
|
/openbsd/sys/dev/adb/ |
H A D | akbd.c | 545 char cbuf[2]; in akbd_input() local 555 cbuf[j++] = 0xe0; in akbd_input() 556 cbuf[j] = c & 0x7f; in akbd_input() 558 cbuf[j] |= 0x80; in akbd_input() 561 wskbd_rawinput(sc->sc_wskbddev, cbuf, j); in akbd_input()
|
/openbsd/usr.sbin/iscsid/ |
H A D | control.c | 196 static char cbuf[CONTROL_READ_SIZE]; variable 215 if ((n = recv(fd, cbuf, sizeof(cbuf), 0)) == -1 && in control_dispatch() 224 pdu = control_getpdu(cbuf, n); in control_dispatch()
|
/openbsd/usr.sbin/dhcpd/ |
H A D | udpsock.c | 88 char cbuf[256], ifname[IF_NAMESIZE]; in udpsock_handler() local 114 m.msg_control = cbuf; in udpsock_handler() 115 m.msg_controllen = sizeof(cbuf); in udpsock_handler()
|
/openbsd/sys/arch/alpha/eisa/ |
H A D | eisa_machdep.c | 311 const u_int8_t *cbuf = cbufp; in eisa_uncompress() local 319 } else if (*cbuf == '\0') { in eisa_uncompress() 320 *ucbuf++ = *cbuf++; in eisa_uncompress() 321 zeros = *cbuf++ - 1; in eisa_uncompress() 323 *ucbuf++ = *cbuf++; in eisa_uncompress() 326 return ((size_t)cbuf - (size_t)cbufp); in eisa_uncompress()
|
/openbsd/gnu/usr.bin/binutils-2.17/binutils/ |
H A D | ar.c | 801 char *cbuf = xmalloc (BUFSIZE); in print_contents() local 823 nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); in print_contents() 828 fwrite (cbuf, 1, nread, stdout); in print_contents() 831 free (cbuf); in print_contents() 848 char *cbuf = xmalloc (BUFSIZE); in extract_file() local 890 nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); in extract_file() 911 fwrite (cbuf, 1, nread, ostream); in extract_file() 931 free (cbuf); in extract_file()
|
/openbsd/usr.sbin/lpr/lpd/ |
H A D | lpd.c | 431 char cbuf[BUFSIZ]; /* command line buffer */ variable 448 cp = cbuf; in doit() 450 if (cp >= &cbuf[sizeof(cbuf) - 1]) in doit() 459 cp = cbuf; in doit() 512 displayq(cbuf[0] - '\3'); in doit()
|
/openbsd/lib/libedit/ |
H A D | read.c | 212 char cbuf[MB_LEN_MAX]; in read_char() local 217 switch (read(el->el_infd, cbuf + cbp, 1)) { in read_char() 246 switch (mbrtowc(cp, cbuf, cbp, &mbs)) { in read_char() 253 cbuf[0] = cbuf[cbp - 1]; in read_char()
|