Connect fparseln(3) for mailwrapper(8)
This commit is contained in:
parent
e519d76ecd
commit
1bee6959f4
@ -7,11 +7,11 @@ SHLIB_MINOR= 2
|
||||
CFLAGS+=-Wall -DLIBC_SCCS -I${.CURDIR} -I${.CURDIR}/../../sys
|
||||
SRCS= login.c login_tty.c logout.c logwtmp.c pty.c setproctitle.c \
|
||||
login_cap.c login_class.c login_auth.c login_times.c login_ok.c \
|
||||
_secure_path.c uucplock.c property.c auth.c realhostname.c
|
||||
_secure_path.c uucplock.c property.c auth.c realhostname.c fparseln.c
|
||||
MAN3+= login.3 login_auth.3 login_tty.3 logout.3 logwtmp.3 pty.3 \
|
||||
setproctitle.3 login_cap.3 login_class.3 login_times.3 login_ok.3 \
|
||||
_secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \
|
||||
trimdomain.3
|
||||
trimdomain.3 fparseln.3
|
||||
MAN5+= login.conf.5 auth.conf.5
|
||||
MLINKS+= property.3 properties_read.3 property.3 properties_free.3
|
||||
MLINKS+= property.3 property_find.3
|
||||
|
@ -1,4 +1,5 @@
|
||||
.\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.\" Copyright (c) 1997 Christos Zoulas. All rights reserved.
|
||||
.\"
|
||||
@ -36,7 +37,7 @@
|
||||
.Sh LIBRARY
|
||||
.Lb libutil
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <util.h>
|
||||
.Fd #include <libutil.h>
|
||||
.Ft "char *"
|
||||
.Fo "fparseln"
|
||||
.Fa "FILE *stream" "size_t *len" "size_t *lineno"
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* $NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
|
||||
@ -31,15 +32,16 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $");
|
||||
__RCSID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <util.h>
|
||||
#include <libutil.h>
|
||||
|
||||
static int isescaped __P((const char *, const char *, int));
|
||||
|
||||
@ -55,8 +57,10 @@ isescaped(sp, p, esc)
|
||||
const char *cp;
|
||||
size_t ne;
|
||||
|
||||
#if 0
|
||||
_DIAGASSERT(sp != NULL);
|
||||
_DIAGASSERT(p != NULL);
|
||||
#endif
|
||||
|
||||
/* No escape character */
|
||||
if (esc == '\0')
|
||||
@ -92,7 +96,9 @@ fparseln(fp, size, lineno, str, flags)
|
||||
int cnt;
|
||||
char esc, con, nl, com;
|
||||
|
||||
#if 0
|
||||
_DIAGASSERT(fp != NULL);
|
||||
#endif
|
||||
|
||||
len = 0;
|
||||
buf = NULL;
|
||||
|
@ -60,6 +60,9 @@ void properties_free __P((properties list));
|
||||
char *property_find __P((properties list, const char *name));
|
||||
char *auth_getval __P((const char *name));
|
||||
int realhostname __P((char *host, size_t hsize, const struct in_addr *ip));
|
||||
#ifdef _STDIO_H_ /* avoid adding new includes */
|
||||
char *fparseln __P((FILE *, size_t *, size_t *, const char[3], int));
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#define UU_LOCK_INUSE (1)
|
||||
@ -78,4 +81,11 @@ __END_DECLS
|
||||
#define HOSTNAME_INVALIDADDR (2)
|
||||
#define HOSTNAME_INVALIDNAME (3)
|
||||
|
||||
/* fparseln(3) */
|
||||
#define FPARSELN_UNESCESC 0x01
|
||||
#define FPARSELN_UNESCCONT 0x02
|
||||
#define FPARSELN_UNESCCOMM 0x04
|
||||
#define FPARSELN_UNESCREST 0x08
|
||||
#define FPARSELN_UNESCALL 0x0f
|
||||
|
||||
#endif /* !_LIBUTIL_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user