Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2008 17:17:58 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184088 - head/lib/libutil
Message-ID:  <200810201717.m9KHHw4T076352@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Mon Oct 20 17:17:58 2008
New Revision: 184088
URL: http://svn.freebsd.org/changeset/base/184088

Log:
  Since in_lt() and in_lts() are not static, assume that they are intended to
  be part of the public API.  Accordingly, add prototypes and document them.

Modified:
  head/lib/libutil/login_cap.h
  head/lib/libutil/login_times.3

Modified: head/lib/libutil/login_cap.h
==============================================================================
--- head/lib/libutil/login_cap.h	Mon Oct 20 17:09:50 2008	(r184087)
+++ head/lib/libutil/login_cap.h	Mon Oct 20 17:17:58 2008	(r184088)
@@ -146,8 +146,10 @@ int auth_timeok(login_cap_t *, time_t);
 struct tm;
 
 login_time_t parse_lt(const char *);
+int in_lt(const login_time_t *, time_t *);
 int in_ltm(const login_time_t *, struct tm *, time_t *);
 int in_ltms(const login_time_t *, struct tm *, time_t *);
+int in_lts(const login_time_t *, time_t *);
 
 /* helper functions */
 

Modified: head/lib/libutil/login_times.3
==============================================================================
--- head/lib/libutil/login_times.3	Mon Oct 20 17:09:50 2008	(r184087)
+++ head/lib/libutil/login_times.3	Mon Oct 20 17:17:58 2008	(r184088)
@@ -19,13 +19,15 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 2, 1997
+.Dd October 20, 2008
 .Os
 .Dt LOGIN_TIMES 3
 .Sh NAME
 .Nm parse_lt ,
+.Nm in_lt ,
 .Nm in_ltm ,
-.Nm in_ltms
+.Nm in_ltms ,
+.Nm in_lts
 .Nd functions for parsing and checking login time periods
 .Sh LIBRARY
 .Lb libutil
@@ -36,9 +38,13 @@
 .Ft login_time_t
 .Fn parse_lt "const char *str"
 .Ft int
+.Fn in_lt "const login_time_t *lt" "time_t *ends"
+.Ft int
 .Fn in_ltm "const login_time_t *lt" "struct tm *t" "time_t *ends"
 .Ft int
 .Fn in_ltms "const login_time_t *lt" "struct tm *t" "time_t *ends"
+.Ft int
+.Fn in_lts "const login_time_t *lt" "time_t *ends"
 .Sh DESCRIPTION
 This set of functions may be used for parsing and checking login and
 session times against a predefined list of allowed login times as
@@ -135,6 +141,18 @@ elements in length, and terminated by an
 .Ar lt_dow
 field set to
 .Em LTM_NONE .
+.Pp
+The
+.Fn in_lt
+and
+.Fn in_lts
+functions are equivalent to
+.Fn in_ltm
+and
+.Fn in_ltms ,
+respectively, with the second argument set to the current time as
+returned by
+.Xr localtime 3 .
 .Sh RETURN VALUES
 The
 .Fn parse_lt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810201717.m9KHHw4T076352>