diff options
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/flopen.3 | 2 | ||||
-rw-r--r-- | lib/libutil/fparseln.3 | 1 | ||||
-rw-r--r-- | lib/libutil/fparseln.c | 16 | ||||
-rw-r--r-- | lib/libutil/kld.3 | 2 | ||||
-rw-r--r-- | lib/libutil/login_class.3 | 1 | ||||
-rw-r--r-- | lib/libutil/pidfile.3 | 4 | ||||
-rw-r--r-- | lib/libutil/pw_util.3 | 2 | ||||
-rw-r--r-- | lib/libutil/quotafile.3 | 4 |
8 files changed, 18 insertions, 14 deletions
diff --git a/lib/libutil/flopen.3 b/lib/libutil/flopen.3 index 6665702..aba788c 100644 --- a/lib/libutil/flopen.3 +++ b/lib/libutil/flopen.3 @@ -98,4 +98,4 @@ and The .Nm function and this manual page were written by -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . diff --git a/lib/libutil/fparseln.3 b/lib/libutil/fparseln.3 index cd78437..245fba7 100644 --- a/lib/libutil/fparseln.3 +++ b/lib/libutil/fparseln.3 @@ -122,7 +122,6 @@ Remove escape preceding any other character. .It Dv FPARSELN_UNESCALL All of the above. .El -.Pp .El .Sh RETURN VALUES Upon successful completion a pointer to the parsed line is returned; diff --git a/lib/libutil/fparseln.c b/lib/libutil/fparseln.c index 0624f0e..d03357e 100644 --- a/lib/libutil/fparseln.c +++ b/lib/libutil/fparseln.c @@ -1,4 +1,4 @@ -/* $NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $ */ +/* $NetBSD: fparseln.c,v 1.7 2007/03/08 19:57:53 drochner Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -59,7 +59,7 @@ isescaped(const char *sp, const char *p, int esc) /* No escape character */ if (esc == '\0') - return 1; + return 0; /* Count the number of escape characters that precede ours */ for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) @@ -135,13 +135,19 @@ fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags) cp = &ptr[s - 1]; if (*cp == con && !isescaped(ptr, cp, esc)) { - s--; /* forget escape */ + s--; /* forget continuation char */ cnt = 1; } } - if (s == 0 && buf != NULL) - continue; + if (s == 0) { + /* + * nothing to add, skip realloc except in case + * we need a minimal buf to return an empty line + */ + if (cnt || buf != NULL) + continue; + } if ((cp = realloc(buf, len + s + 1)) == NULL) { free(buf); diff --git a/lib/libutil/kld.3 b/lib/libutil/kld.3 index 595ac96..f6b2c13 100644 --- a/lib/libutil/kld.3 +++ b/lib/libutil/kld.3 @@ -90,4 +90,4 @@ The and .Fn kld_load functions and this manual page were written by -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3 index 75f3614..c87faae 100644 --- a/lib/libutil/login_class.3 +++ b/lib/libutil/login_class.3 @@ -160,7 +160,6 @@ capability "setenv=var1 val1,var2 val2..,varN valN". .It LOGIN_SETMAC Set the MAC label for the current process to the label specified in system login class database. -.Pp .It LOGIN_SETCPUMASK Create a new .Xr cpuset 2 diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3 index 30c880c..d5e2470 100644 --- a/lib/libutil/pidfile.3 +++ b/lib/libutil/pidfile.3 @@ -291,7 +291,7 @@ Probably called not from the process which used The .Nm pidfile functionality is based on ideas from -.An John-Mark Gurney Aq jmg@FreeBSD.org . +.An John-Mark Gurney Aq Mt jmg@FreeBSD.org . .Pp The code and manual page was written by -.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org . +.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org . diff --git a/lib/libutil/pw_util.3 b/lib/libutil/pw_util.3 index 6c449ba..0d8c763 100644 --- a/lib/libutil/pw_util.3 +++ b/lib/libutil/pw_util.3 @@ -283,4 +283,4 @@ DARPA/SPAWAR contract N66001-01-C-8035 as part of the DARPA CHATS research program. .Pp This manual page was written by -.An Baptiste Daroussin Aq bapt@FreeBSD.org . +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . diff --git a/lib/libutil/quotafile.3 b/lib/libutil/quotafile.3 index 1e75e9a..001a66c 100644 --- a/lib/libutil/quotafile.3 +++ b/lib/libutil/quotafile.3 @@ -285,6 +285,6 @@ functions first appeared in The .Nm quotafile functions and this manual page were written by -.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org and -.An Marshall Kirk McKusick Aq mckusick@mckusick.com . +.An Marshall Kirk McKusick Aq Mt mckusick@mckusick.com . |