Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getln(3) [debian man page]

getln(3)						     Library Functions Manual							  getln(3)

NAME
getln - read one line of data SYNTAX
#include <getln.h> int getln(&ss,&sa,&match,sep); substdio ss; stralloc sa; int match; int sep; DESCRIPTION
getln reads a line of characters, terminated by a sep character, from ss. It returns the line in sa and sets match to 1. If getln sees end-of-input before it sees sep, it returns the partial line in sa and sets match to 0. getln normally returns 0. If it runs out of memory, or encounters an error from ss, it returns -1, setting errno appropriately. SEE ALSO
stralloc(3), substdio(3), getln2(3) getln(3)

Check Out this Related Man Page

buffer_get_new_token_sa_pred(3) 			     Library Functions Manual				   buffer_get_new_token_sa_pred(3)

NAME
buffer_get_new_token_sa_pred - read token from buffer SYNTAX
#include <stralloc.h> #include <buffer.h> int buffer_get_new_token_sa_pred(buffer* b,stralloc* sa, int (*predicate)(stralloc* * sa)); DESCRIPTION
buffer_get_token_sa_pred copies data from b to sa until predicate(sa) returns 1 or -1. If predicate returns 1 once a ' ' was read, that new-line character is still appended to sa -- use stralloc_chop or stralloc_chomp to get rid of it. predicate can also return 0 (indicating further input is required to complete the token) or -1 (abort and return -1; use this if predicate wants to enfore a maximum message size or does timeout handling or detects a malformed message). If reading from the buffer or allocating memory fails, buffer_get_new_token_sa_pred returns -1 and sets errno appropriately. At that point sa may already contain a partial token. On success, buffer_get_new_token_sa_pred returns 0. If you want to read from a non-blocking socket, use buffer_get_token_sa_pred instead. SEE ALSO
buffer_getline_sa(3), buffer_get_token(3), buffer(3) buffer_get_new_token_sa_pred(3)
Man Page

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk script for replacing 2 strings

Hi I have written a script for automating a program. There is a string in 2 lines that needs altering from input. The 2 lines are: prepare_flexreceptor4.py -r rec_rigid.pdbqt -s TYR119_TRP312 -x rec_flex.pdbqt and prepare_flexdocking4.py -l ind.pdbqt -r rec_flex.pdbqt -s TYR119_TRP312... (3 Replies)
Discussion started by: gav2251
3 Replies

2. Shell Programming and Scripting

Batch download

............. (9 Replies)
Discussion started by: hoo
9 Replies

3. Programming

Help with djbdns code

Hi, I need help to rewrite djbdns source code to accept 1024 bytes via UDP (limit is 512) #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include "uint16.h" #include "uint32.h" #include "str.h" #include "byte.h" #include "fmt.h" #include "ip4.h"... (0 Replies)
Discussion started by: cain82
0 Replies