/freebsd/contrib/less/ |
H A D | line.c | 34 } linebuf; variable 161 linebuf.buf = (char *) ecalloc(LINEBUF_SIZE, sizeof(char)); in init_line() 162 linebuf.attr = (int *) ecalloc(LINEBUF_SIZE, sizeof(int)); in init_line() 191 memcpy(new_buf, linebuf.buf, size_linebuf * sizeof(char)); in expand_linebuf() 192 memcpy(new_attr, linebuf.attr, size_linebuf * sizeof(int)); in expand_linebuf() 193 free(linebuf.attr); in expand_linebuf() 194 free(linebuf.buf); in expand_linebuf() 195 linebuf.buf = new_buf; in expand_linebuf() 196 linebuf.attr = new_attr; in expand_linebuf() 216 right_curr = linebuf.end; in inc_end_column() [all …]
|
/freebsd/usr.bin/mail/ |
H A D | fio.c | 60 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local 92 if (fgets(linebuf, sizeof(linebuf), ibuf) == NULL) { in setptr() 98 count = strlen(linebuf); in setptr() 103 if (count >= 2 && linebuf[count - 1] == '\n' && in setptr() 104 linebuf[count - 2] == '\r') { in setptr() 106 linebuf[count - 1] = '\n'; in setptr() 109 (void)fwrite(linebuf, sizeof(*linebuf), count, otf); in setptr() 113 linebuf[count - 1] = '\0'; in setptr() 114 if (maybe && linebuf[0] == 'F' && ishead(linebuf)) { in setptr() 124 } else if (linebuf[0] == 0) { in setptr() [all …]
|
H A D | collect.c | 71 char linebuf[LINESIZE], tempname[PATHSIZE], *cp, getsub; in collect() local 151 c = readline(stdin, linebuf, LINESIZE); in collect() 165 if (linebuf[0] == '.' && linebuf[1] == '\0' && in collect() 169 if (linebuf[0] != escape || value("interactive") == NULL || in collect() 171 if (putline(collf, linebuf, !longline) < 0) in collect() 175 c = linebuf[1]; in collect() 183 if (putline(collf, &linebuf[1], !longline) < 0) in collect() 201 shell(&linebuf[2]); in collect() 208 execute(&linebuf[2], 1); in collect() 238 hp->h_to = cat(hp->h_to, extract(&linebuf[2], GTO)); in collect() [all …]
|
H A D | util.c | 130 char linebuf[LINESIZE]; in hfield() local 138 if (readline(ibuf, linebuf, LINESIZE) < 0) in hfield() 141 if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0) in hfield() 143 if ((hfield = ishfield(linebuf, colon, field)) != NULL) in hfield() 156 gethfield(FILE *f, char linebuf[], int rem, char **colon) in gethfield() argument 165 if ((c = readline(f, linebuf, LINESIZE)) <= 0) in gethfield() 167 for (cp = linebuf; isprint((unsigned char)*cp) && *cp != ' ' && *cp != ':'; in gethfield() 170 if (*cp != ':' || cp == linebuf) in gethfield() 177 cp = linebuf + c; in gethfield() 179 while (--cp >= linebuf && (*cp == ' ' || *cp == '\t')) in gethfield() [all …]
|
H A D | head.c | 47 ishead(char linebuf[]) in ishead() argument 52 if (strncmp(linebuf, "From ", 5) != 0) in ishead() 54 parse(linebuf, &hl, parbuf); in ishead() 56 fail(linebuf, "No date field"); in ishead() 60 fail(linebuf, "Date field not legal date"); in ishead() 70 fail(const char *linebuf __unused, const char *reason __unused) in fail()
|
H A D | lex.c | 197 char linebuf[LINESIZE]; in commands() local 228 if (readline(input, &linebuf[n], LINESIZE - n) < 0) { in commands() 233 if ((n = strlen(linebuf)) == 0) in commands() 236 if (linebuf[n] != '\\') in commands() 238 linebuf[n++] = ' '; in commands() 258 if (execute(linebuf, 0)) in commands() 271 execute(char linebuf[], int contxt) in execute() argument 289 for (cp = linebuf; isspace((unsigned char)*cp); cp++) in execute()
|
H A D | list.c | 379 char *linebuf; in getrawlist() local 382 if ((linebuf = malloc(linebufsize)) == NULL) in getrawlist() 397 cp2 = linebuf; in getrawlist() 401 if (cp2 - linebuf == linebufsize - 1) { in getrawlist() 403 if ((linebuf = realloc(linebuf, linebufsize)) == NULL) in getrawlist() 405 cp2 = linebuf + linebufsize - BUFSIZ - 1; in getrawlist() 469 argv[argn++] = savestr(linebuf); in getrawlist() 472 (void)free(linebuf); in getrawlist()
|
H A D | cmd1.c | 364 char *valtop, linebuf[LINESIZE]; in top() local 386 if (readline(ibuf, linebuf, sizeof(linebuf)) < 0) in top() 388 puts(linebuf); in top() 389 lineb = strspn(linebuf, " \t") == strlen(linebuf); in top()
|
H A D | cmd2.c | 225 snarf(char *linebuf, int *flag) in snarf() argument 230 cp = strlen(linebuf) + linebuf - 1; in snarf() 236 while (cp > linebuf && isspace((unsigned char)*cp)) in snarf() 244 while (cp > linebuf && !isspace((unsigned char)*cp)) in snarf()
|
/freebsd/contrib/pf/ftp-proxy/ |
H A D | ftp-proxy.c | 118 char linebuf[MAX_LINE + 1]; variable 160 if (linebuf[0] == 'P' || linebuf[0] == 'p' || in client_parse() 161 linebuf[0] == 'E' || linebuf[0] == 'e') { in client_parse() 175 if (anonymous_only && (linebuf[0] == 'U' || linebuf[0] == 'u')) in client_parse() 184 if (strcasecmp("USER ftp\r\n", linebuf) != 0 && in client_parse_anon() 185 strcasecmp("USER anonymous\r\n", linebuf) != 0) { in client_parse_anon() 186 snprintf(linebuf, sizeof linebuf, in client_parse_anon() 188 logmsg(LOG_DEBUG, "#%d proxy: %s", s->id, linebuf); in client_parse_anon() 191 linelen = strlen(linebuf); in client_parse_anon() 192 bufferevent_write(s->client_bufev, linebuf, linelen); in client_parse_anon() [all …]
|
/freebsd/crypto/openssl/crypto/pem/ |
H A D | pem_lib.c | 689 static int sanitize_line(char *linebuf, int len, unsigned int flags, int first_call) in sanitize_line() argument 697 if (len > 3 && memcmp(linebuf, utf8_bom, 3) == 0) { in sanitize_line() 698 memmove(linebuf, linebuf + 3, len - 3); in sanitize_line() 699 linebuf[len - 3] = 0; in sanitize_line() 706 while ((len >= 0) && (linebuf[len] <= ' ')) in sanitize_line() 712 if (!ossl_isbase64(linebuf[i]) || linebuf[i] == '\n' in sanitize_line() 713 || linebuf[i] == '\r') in sanitize_line() 721 if (linebuf[i] == '\n' || linebuf[i] == '\r') in sanitize_line() 723 if (ossl_iscntrl(linebuf[i])) in sanitize_line() 724 linebuf[i] = ' '; in sanitize_line() [all …]
|
/freebsd/contrib/ofed/opensm/complib/ |
H A D | cl_nodenamemap.c | 56 char *linebuf, 80 char linebuf[PARSE_NODE_MAP_BUFLEN + 1]; in open_node_name_map() local 98 memset(linebuf, '\0', PARSE_NODE_MAP_BUFLEN + 1); in open_node_name_map() 100 linebuf, PARSE_NODE_MAP_BUFLEN)) { in open_node_name_map() 108 linebuf); in open_node_name_map() 174 char *linebuf, in parse_node_map_wrap() argument 197 if (linebuf) { in parse_node_map_wrap() 198 memcpy(linebuf, line, in parse_node_map_wrap() 200 e = strpbrk(linebuf, "\n"); in parse_node_map_wrap()
|
/freebsd/usr.bin/xstr/ |
H A D | xstr.c | 147 static char linebuf[BUFSIZ]; variable 159 if (fgets(linebuf, sizeof linebuf, stdin) == NULL) { in process() 164 if (linebuf[0] == '#') { in process() 165 if (linebuf[1] == ' ' && isdigit(linebuf[2])) in process() 166 printf("#line%s", &linebuf[1]); in process() 168 printf("%s", linebuf); in process() 171 for (cp = linebuf; (c = *cp++);) switch (c) { in process() 241 if (fgets(linebuf, sizeof linebuf, stdin) in yankstr() 247 cp = linebuf; in yankstr()
|
/freebsd/usr.sbin/ypserv/ |
H A D | yp_access.c | 112 char linebuf[1024 + 2]; in load_securenets() local 143 while (fgets(linebuf, LINEBUFSZ, fp)) { in load_securenets() 146 if ((linebuf[0] == '#') in load_securenets() 147 || (strspn(linebuf, " \t\r\n") == strlen(linebuf))) in load_securenets() 149 if (sscanf(linebuf, "%s %s", addr1, addr2) < 2) { in load_securenets() 151 linebuf); in load_securenets()
|
/freebsd/crypto/openssl/crypto/asn1/ |
H A D | asn_mime.c | 58 static int strip_eol(char *linebuf, int *plen, int flags); 517 char linebuf[MAX_SMLEN]; in SMIME_crlf_copy() local 536 while ((len = BIO_read(in, linebuf, MAX_SMLEN)) > 0) in SMIME_crlf_copy() 537 BIO_write(out, linebuf, len); in SMIME_crlf_copy() 542 while ((len = BIO_gets(in, linebuf, MAX_SMLEN)) > 0) { in SMIME_crlf_copy() 543 eol = strip_eol(linebuf, &len, flags); in SMIME_crlf_copy() 552 BIO_write(out, linebuf, len); in SMIME_crlf_copy() 610 char linebuf[MAX_SMLEN]; in multi_split() local 625 while ((len = BIO_get_line(bio, linebuf, MAX_SMLEN)) > 0) { in multi_split() 626 state = mime_bound_check(linebuf, len, bound, blen); in multi_split() [all …]
|
/freebsd/sys/contrib/dev/athk/ath12k/ |
H A D | debug.c | 120 char linebuf[256]; in ath12k_dbg_dump() local 135 linebuflen += scnprintf(linebuf + linebuflen, in ath12k_dbg_dump() 136 sizeof(linebuf) - linebuflen, in ath12k_dbg_dump() 141 linebuf + linebuflen, in ath12k_dbg_dump() 142 sizeof(linebuf) - linebuflen, true); in ath12k_dbg_dump() 143 dev_dbg(ab->dev, "%s\n", linebuf); in ath12k_dbg_dump()
|
/freebsd/sys/contrib/dev/athk/ath11k/ |
H A D | debug.c | 123 char linebuf[256]; in ath11k_dbg_dump() local 138 linebuflen += scnprintf(linebuf + linebuflen, in ath11k_dbg_dump() 139 sizeof(linebuf) - linebuflen, in ath11k_dbg_dump() 144 linebuf + linebuflen, in ath11k_dbg_dump() 145 sizeof(linebuf) - linebuflen, true); in ath11k_dbg_dump() 146 dev_printk(KERN_DEBUG, ab->dev, "%s\n", linebuf); in ath11k_dbg_dump()
|
/freebsd/usr.sbin/usbdump/ |
H A D | usbdump.c | 405 char linebuf[128]; in hexdump() local 414 linebuf[i] = ' '; in hexdump() 415 hexbyte(linebuf + i + 1, ((line - region) >> 8) & 0xFF); in hexdump() 416 hexbyte(linebuf + i + 3, (line - region) & 0xFF); in hexdump() 417 linebuf[i + 5] = ' '; in hexdump() 418 linebuf[i + 6] = ' '; in hexdump() 423 hexbyte(linebuf + i, in hexdump() 426 linebuf[i] = '-'; in hexdump() 427 linebuf[i + 1] = '-'; in hexdump() 429 linebuf[i + 2] = ' '; in hexdump() [all …]
|
/freebsd/contrib/ldns/ |
H A D | higher.c | 155 ldns_buffer *linebuf; in ldns_get_rr_list_hosts_frm_fp_l() local 185 linebuf = LDNS_MALLOC(ldns_buffer); in ldns_get_rr_list_hosts_frm_fp_l() 186 if(!linebuf) { in ldns_get_rr_list_hosts_frm_fp_l() 195 ldns_buffer_new_frm_data(linebuf, line, (size_t) i); in ldns_get_rr_list_hosts_frm_fp_l() 196 for(cnt = 0, j = ldns_bget_token(linebuf, word, LDNS_PARSE_NO_NL, LDNS_MAX_LINELEN); in ldns_get_rr_list_hosts_frm_fp_l() 198 j = ldns_bget_token(linebuf, word, LDNS_PARSE_NO_NL, LDNS_MAX_LINELEN), cnt++) { in ldns_get_rr_list_hosts_frm_fp_l() 237 ldns_buffer_free(linebuf); in ldns_get_rr_list_hosts_frm_fp_l()
|
/freebsd/libexec/getty/ |
H A D | main.c | 702 static char linebuf[512]; in get_line() local 708 while (i < (sizeof linebuf - 3) && read(fd, linebuf+i, 1)==1) { in get_line() 709 if (linebuf[i] == '\n') { in get_line() 711 linebuf[i++] = '\r'; in get_line() 712 linebuf[i++] = '\n'; in get_line() 713 linebuf[i] = '\0'; in get_line() 714 return linebuf; in get_line() 718 linebuf[i] = '\0'; in get_line() 719 return i ? linebuf : 0; in get_line()
|
/freebsd/sbin/md5/ |
H A D | md5.c | 307 char *linebuf = NULL; in gnu_check() local 328 while ((linelen = getline(&linebuf, &linecap, inp)) > 0) { in gnu_check() 330 while (linelen > 0 && linebuf[linelen - 1] == '\n') in gnu_check() 332 linebuf[linelen] = '\0'; in gnu_check() 333 filename = linebuf + digestnamelen + 2; in gnu_check() 334 hashstr = linebuf + linelen - hashstrlen; in gnu_check() 341 strncmp(linebuf, digestname, digestnamelen) == 0 && in gnu_check() 347 strspn(linebuf, "0123456789ABCDEFabcdef") == hashstrlen && in gnu_check() 348 linebuf[hashstrlen] == ' ') { in gnu_check() 349 linebuf[hashstrlen] = '\0'; in gnu_check() [all …]
|
/freebsd/sbin/swapon/ |
H A D | swapon.c | 415 static char mdpath[PATH_MAX], linebuf[PATH_MAX]; in swap_on_geli_args() 479 (linelen < 2 || linelen > sizeof(linebuf))) { in swap_on_off_md() 484 strlcpy(linebuf, p, linelen); in swap_on_off_md() 486 ul = strtoul(linebuf, &p, 10); in swap_on_off_md() 493 linebuf); in swap_on_off_md() 540 (linelen < 2 || linelen > sizeof(linebuf))) { in swap_on_off_md() 545 strlcpy(linebuf, p, linelen); in swap_on_off_md() 546 p = strchr(linebuf, ' '); in swap_on_off_md() 550 ul = strtoul(linebuf, &p, 10); in swap_on_off_md() 557 linebuf); in swap_on_off_md() 475 static char mdpath[PATH_MAX], linebuf[PATH_MAX]; swap_on_off_md() local [all...] |
/freebsd/contrib/elftoolchain/libdwarf/ |
H A D | dwarf_lineno.c | 32 dwarf_srclines(Dwarf_Die die, Dwarf_Line **linebuf, Dwarf_Signed *linecount, in dwarf_srclines() argument 44 if (die == NULL || linebuf == NULL || linecount == NULL) { in dwarf_srclines() 74 *linebuf = li->li_lnarray; in dwarf_srclines() 88 *linebuf = li->li_lnarray; in dwarf_srclines()
|
H A D | dwarf_dealloc.c | 76 dwarf_srclines_dealloc(Dwarf_Debug dbg, Dwarf_Line *linebuf, in dwarf_srclines_dealloc() argument 86 (void) dbg; (void) linebuf; (void) count; in dwarf_srclines_dealloc()
|
/freebsd/lib/libc/iconv/ |
H A D | citrus_mapper.c | 127 lookup_mapper_entry(const char *dir, const char *mapname, void *linebuf, in lookup_mapper_entry() argument 159 p = linebuf; in lookup_mapper_entry() 317 char linebuf[PATH_MAX]; in _citrus_mapper_open() local 338 ret = lookup_mapper_entry(ma->ma_dir, mapname, linebuf, in _citrus_mapper_open()
|