diff options
author | peter <peter@FreeBSD.org> | 1999-12-29 17:50:34 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-12-29 17:50:34 +0000 |
commit | e8ea19d78e855d6d9e26a5314197cd14fddd16b2 (patch) | |
tree | 103f234fd4413c3904bda7cf7dec0159bf43995f /lib/libutil | |
parent | 506b57590bdf57e2248ebd3c429fe94984702ce2 (diff) | |
download | FreeBSD-src-e8ea19d78e855d6d9e26a5314197cd14fddd16b2.zip FreeBSD-src-e8ea19d78e855d6d9e26a5314197cd14fddd16b2.tar.gz |
Connect fparseln(3) for mailwrapper(8)
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/Makefile | 4 | ||||
-rw-r--r-- | lib/libutil/fparseln.3 | 3 | ||||
-rw-r--r-- | lib/libutil/fparseln.c | 10 | ||||
-rw-r--r-- | lib/libutil/libutil.h | 10 |
4 files changed, 22 insertions, 5 deletions
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 48db2a1..e06f227 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -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 diff --git a/lib/libutil/fparseln.3 b/lib/libutil/fparseln.3 index a5ea8db..ea1facd 100644 --- a/lib/libutil/fparseln.3 +++ b/lib/libutil/fparseln.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" diff --git a/lib/libutil/fparseln.c b/lib/libutil/fparseln.c index cd4d3dd..f294bfe 100644 --- a/lib/libutil/fparseln.c +++ b/lib/libutil/fparseln.c @@ -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; diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index f41c665..4923700 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -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_ */ |