Searched refs:linebuf (Results 1 - 25 of 33) sorted by relevance

12

/openbsd-current/games/hack/
H A Dhack.end.c457 char linebuf[BUFSZ]; local
460 (void) strlcpy(linebuf, "Number Points Name", sizeof linebuf);
461 bp = eos(linebuf);
462 while(bp < linebuf + COLNO - 9) *bp++ = ' ';
463 (void) strlcpy(bp, "Hp [max]", linebuf + sizeof linebuf - bp);
464 puts(linebuf);
472 char linebuf[BUFSZ]; local
475 linebuf[
[all...]
/openbsd-current/usr.bin/unexpand/
H A Dunexpand.c43 char linebuf[BUFSIZ]; variable
76 for (cp = linebuf; *cp; cp++)
78 if (cp > linebuf)
81 printf("%s", linebuf);
98 dp = linebuf;
99 len = sizeof linebuf;
/openbsd-current/usr.bin/make/
H A Dlowparse.c267 Parse_ReadNextConditionalLine(Buffer linebuf) argument
287 return Parse_ReadUnparsedLine(linebuf, "conditional");
291 read_logical_line(Buffer linebuf, int c) argument
300 Buf_AddChar(linebuf, c);
305 Buf_AddSpace(linebuf);
311 Buf_AddChar(linebuf, '\\');
313 Buf_AddChar(linebuf, '\\');
323 Parse_ReadUnparsedLine(Buffer linebuf, const char *type) argument
327 Buf_Reset(linebuf);
343 Buf_AddChar(linebuf, '\\');
359 skip_empty_lines_and_read_char(Buffer linebuf) argument
440 Parse_ReadNormalLine(Buffer linebuf) argument
[all...]
H A Dparse.c149 #define ParseReadLoopLine(linebuf) Parse_ReadUnparsedLine(linebuf, "for loop")
1337 handle_for_loop(Buffer linebuf, const char *line) argument
1346 line = ParseReadLoopLine(linebuf);
1375 handle_bsd_command(Buffer linebuf, Buffer copy, const char *line) argument
1387 line = Parse_ReadNextConditionalLine(linebuf);
1398 return handle_for_loop(linebuf, line + 3);
/openbsd-current/usr.bin/mail/
H A Dfio.c73 char linebuf[LINESIZE], pathbuf[PATHSIZE]; local
104 if (fgets(linebuf, sizeof(linebuf), ibuf) == NULL) {
110 count = strlen(linebuf);
116 if (count >= 2 && linebuf[count-1] == '\n' &&
117 linebuf[count - 2] == '\r') {
118 linebuf[count - 2] = '\n';
119 linebuf[count - 1] = '\0';
123 (void)fwrite(linebuf, sizeof(*linebuf), coun
172 putline(FILE *obuf, char *linebuf, int outlf) argument
193 readline(FILE *ibuf, char *linebuf, int linesize, int *signo) argument
[all...]
H A Dcollect.c63 char linebuf[LINESIZE], tempname[PATHSIZE], *cp; local
111 c = readline(stdin, linebuf, LINESIZE, &sig);
148 if (linebuf[0] == '.' && linebuf[1] == '\0' &&
152 if (linebuf[0] != escape || value("interactive") == NULL ||
154 if (putline(collf, linebuf, !longline) < 0)
158 c = (unsigned char)linebuf[1];
166 if (putline(collf, &linebuf[1], !longline) < 0)
178 shell(&linebuf[2]);
185 execute(&linebuf[
[all...]
H A Dhead.c48 ishead(char *linebuf) argument
54 cp = linebuf;
58 parse(linebuf, &hl, parbuf);
60 fail(linebuf, "No from or date field");
64 fail(linebuf, "Date field not legal date");
74 fail(char *linebuf, char *reason) argument
80 fprintf(stderr, "\"%s\"\nnot a header because %s\n", linebuf, reason);
H A Dutil.c127 char linebuf[LINESIZE]; local
135 if (readline(ibuf, linebuf, LINESIZE, NULL) < 0)
138 if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0)
140 if ((hfield = ishfield(linebuf, colon, field)) != NULL)
153 gethfield(FILE *f, char *linebuf, int rem, char **colon) argument
162 if ((c = readline(f, linebuf, LINESIZE, NULL)) <= 0)
164 for (cp = linebuf;
168 if (*cp != ':' || cp == linebuf)
175 cp = linebuf + c;
177 while (--cp >= linebuf
209 ishfield(char *linebuf, char *colon, char *field) argument
345 blankline(char *linebuf) argument
521 char linebuf[LINESIZE]; local
[all...]
H A Dlist.c377 char *linebuf, *linebuf2; local
380 if ((linebuf = malloc(linebufsize)) == NULL)
394 cp2 = linebuf;
398 if (cp2 - linebuf == linebufsize - 1) {
400 linebuf2 = realloc(linebuf, newsize);
403 linebuf = linebuf2;
405 cp2 = linebuf + linebufsize - BUFSIZ - 1;
469 argv[argn++] = savestr(linebuf);
472 (void)free(linebuf);
H A Dcmd2.c217 snarf(char *linebuf, int *flag) argument
222 cp = strlen(linebuf) + linebuf - 1;
227 while (cp > linebuf && isspace((unsigned char)*cp))
234 while (cp > linebuf && !isspace((unsigned char)*cp))
H A Dlex.c202 char linebuf[LINESIZE]; local
226 if (readline(input, &linebuf[n], LINESIZE - n, sigp) < 0) {
245 if ((n = strlen(linebuf)) == 0)
248 if (linebuf[n] != '\\')
250 linebuf[n++] = ' ';
270 if (execute(linebuf, 0))
283 execute(char *linebuf, int contxt) argument
301 for (cp = linebuf; isspace((unsigned char)*cp); cp++)
H A Dcmd1.c407 char *valtop, linebuf[LINESIZE]; local
429 if (readline(ibuf, linebuf, sizeof(linebuf), NULL) < 0)
431 puts(linebuf);
432 lineb = blankline(linebuf);
/openbsd-current/gnu/gcc/gcc/
H A Dgen-protos.c135 sstring linebuf; local
145 INIT_SSTRING (&linebuf);
159 linebuf.ptr = linebuf.base;
161 c = read_upto (inf, &linebuf, '\n');
162 if (linebuf.base[0] == '#') /* skip cpp command */
164 if (linebuf.base[0] == '\0') /* skip empty line */
167 if (! parse_fn_proto (linebuf.base, linebuf.ptr, &fn_decl))
/openbsd-current/gnu/usr.bin/gcc/gcc/
H A Dgen-protos.c142 sstring linebuf; local
149 INIT_SSTRING (&linebuf);
163 linebuf.ptr = linebuf.base;
165 c = read_upto (inf, &linebuf, '\n');
166 if (linebuf.base[0] == '#') /* skip cpp command */
168 if (linebuf.base[0] == '\0') /* skip empty line */
171 if (! parse_fn_proto (linebuf.base, linebuf.ptr, &fn_decl))
/openbsd-current/usr.bin/less/
H A Dline.c24 static char *linebuf = NULL; /* Buffer which holds the current output line */ variable
25 static char *attr = NULL; /* Extension of linebuf to hold attributes */
35 static int curr; /* Total number of bytes in linebuf */
36 static int column; /* Display columns needed to show linebuf */
39 static int lmargin; /* Index in linebuf of start of content */
83 linebuf = ecalloc(LINEBUF_SIZE, sizeof (char));
98 char *new_buf = recallocarray(linebuf, size_linebuf, new_size, 1);
101 linebuf = new_buf;
152 * {{ Since forw_raw_line modifies linebuf, we must
153 * do this first, before storing anything in linebuf
[all...]
/openbsd-current/usr.sbin/npppd/common/
H A Ddebugutil.c262 char linebuf[80]; local
276 o += snprintf(linebuf + o, sizeof(linebuf) - o,
281 o += snprintf(linebuf + o, sizeof(linebuf) - o,
284 fprintf(file, "\t%-47s |%s|\n", linebuf,
287 syslog(LOG_ERR, "%-47s |%s|\n", linebuf,
294 o += snprintf(linebuf + o, sizeof(linebuf) - o,
299 o += snprintf(linebuf
[all...]
/openbsd-current/gnu/usr.bin/cvs/src/
H A Dlogin.c96 * char *linebuf
107 * linebuf the current line
111 * char *password as a pointer into linebuf
114 * This function temporarily alters linebuf, so it isn't thread safe when
115 * called on the same linebuf
118 password_entry_parseline (cvsroot_canonical, warn, linenumber, linebuf)
122 char *linebuf;
128 if (*linebuf == '/')
134 if (isspace(*(linebuf + 1)))
136 q = linebuf
305 char *linebuf = NULL; local
[all...]
/openbsd-current/usr.sbin/ftp-proxy/
H A Dftp-proxy.c113 char linebuf[MAX_LINE + 1]; variable
156 if (linebuf[0] == 'P' || linebuf[0] == 'p' ||
157 linebuf[0] == 'E' || linebuf[0] == 'e') {
171 if (anonymous_only && (linebuf[0] == 'U' || linebuf[0] == 'u'))
180 if (strcasecmp("USER ftp\r\n", linebuf) != 0 &&
181 strcasecmp("USER anonymous\r\n", linebuf) != 0) {
182 snprintf(linebuf, sizeo
[all...]
/openbsd-current/usr.bin/cvs/
H A Dentries.c429 char linebuf[128], tagpath[PATH_MAX]; local
455 while (fgets(linebuf, (int)sizeof(linebuf), fp) != NULL) {
457 if ((len = strlen(linebuf)) == 0)
459 if (linebuf[len - 1] != '\n') {
464 linebuf[--len] = '\0';
466 switch (*linebuf) {
469 *tagp = xstrdup(linebuf + 1);
472 if (sscanf(linebuf + 1, "%d.%d.%d.%d.%d.%d",
483 *datep = xstrdup(linebuf
[all...]
H A Dcvs.c140 char *cp, *linebuf, *lp; local
152 linebuf = xstrdup(cmdp->cmd_defargs);
153 for (lp = linebuf; lp != NULL;) {
/openbsd-current/lib/libcrypto/asn1/
H A Dasn_mime.c107 static int strip_eol(char *linebuf, int *plen);
539 char linebuf[MAX_SMLEN]; local
550 while ((len = BIO_read(in, linebuf, MAX_SMLEN)) > 0)
551 BIO_write(out, linebuf, len);
555 while ((len = BIO_gets(in, linebuf, MAX_SMLEN)) > 0) {
556 eol = strip_eol(linebuf, &len);
558 BIO_write(out, linebuf, len);
610 char linebuf[MAX_SMLEN]; local
625 while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
626 state = mime_bound_check(linebuf, le
673 char linebuf[MAX_SMLEN]; local
995 strip_eol(char *linebuf, int *plen) argument
[all...]
/openbsd-current/gnu/usr.bin/perl/cpan/Encode/bin/
H A Dunidump14 my ($linebuf, $outbuf);
34 $linebuf .= Encode::decode($Opt{f}, $_);
35 while($linebuf){
36 my $chr = render_p(substr($linebuf, 0, 1, ''));
78 $linebuf .= Encode::decode($Opt{f}, $_);
79 while (length($linebuf) > $CPL){
80 my $chunk = substr($linebuf, 0, $CPL, '');
85 $linebuf and print_C($linebuf);
/openbsd-current/games/cribbage/
H A Dio.c49 char linebuf[LINESIZE]; variable
518 if (c == ' ' && (pos == 0 || linebuf[pos - 1] == ' '))
524 for (i = strlen(unctrl(linebuf[pos])); i; i--)
540 linebuf[pos++] = c;
544 while (pos < sizeof(linebuf))
545 linebuf[pos++] = '\0';
547 return (linebuf);
/openbsd-current/libexec/tradcpp/
H A Doutput.c43 static char *linebuf; variable
173 linebuf = dorealloc(linebuf, oldmax, linebufmax);
187 memcpy(linebuf + linebufpos, buf, len);
191 filter_output(linebuf, linebufpos);
/openbsd-current/usr.bin/mg/
H A Decho.c651 char *linebuf; local
734 * Now do the display. Objects are written into linebuf until
738 if ((linebuf = malloc(linesize)) == NULL) {
748 linebuf[0] = '\0';
758 addline(bp, linebuf);
759 linebuf[0] = '\0';
762 len = strlcat(linebuf, lh2->l_name + preflen,
767 memset(linebuf + len, ' ',
769 linebuf[width] = '\0';
774 addline(bp, linebuf);
[all...]

Completed in 363 milliseconds

12