HCoop
/
hcoop
/
zz_old
/
debian
/
djbdns.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
release
[hcoop/zz_old/debian/djbdns.git]
/
getln.c
1
#include
"byte.h"
2
#include
"getln.h"
3
4
int
getln
(
buffer
*
ss
,
stralloc
*
sa
,
int
*
match
,
int
sep
)
5
{
6
char
*
cont
;
7
unsigned int
clen
;
8
9
if
(
getln2
(
ss
,
sa
,&
cont
,&
clen
,
sep
) == -
1
)
return
-
1
;
10
if
(!
clen
) { *
match
=
0
;
return
0
; }
11
if
(!
stralloc_catb
(
sa
,
cont
,
clen
))
return
-
1
;
12
*
match
=
1
;
13
return
0
;
14
}