[Pkg-shadow-commits] r1619 - in upstream/trunk: . lib

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Tue Jan 1 20:34:48 UTC 2008


Author: nekral-guest
Date: 2008-01-01 20:34:47 +0000 (Tue, 01 Jan 2008)
New Revision: 1619

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/commonio.c
Log:
Document add_one_entry_nis(), write_all(), commonio_remove(),
commonio_locate(), and commonio_rewind().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-01-01 19:56:29 UTC (rev 1618)
+++ upstream/trunk/ChangeLog	2008-01-01 20:34:47 UTC (rev 1619)
@@ -1,5 +1,10 @@
 2008-01-01  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* lib/commonio.c: Document add_one_entry_nis(), write_all(),
+	commonio_remove(), commonio_locate(), and commonio_rewind().
+
+2008-01-01  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/pwck.c: Avoid implicit brackets.
 	* src/pwck.c: Avoid implicit conversions to booleans.
 

Modified: upstream/trunk/lib/commonio.c
===================================================================
--- upstream/trunk/lib/commonio.c	2008-01-01 19:56:29 UTC (rev 1618)
+++ upstream/trunk/lib/commonio.c	2008-01-01 20:34:47 UTC (rev 1619)
@@ -395,6 +395,9 @@
 #if KEEP_NIS_AT_END
 static void add_one_entry_nis (struct commonio_db *, struct commonio_entry *);
 
+/*
+ * Insert an entry between the regular entries, and the NIS entries.
+ */
 static void
 add_one_entry_nis (struct commonio_db *db, struct commonio_entry *newp)
 {
@@ -633,6 +636,11 @@
 	return 0;
 }
 
+/*
+ * write_all - Write the database to its file.
+ *
+ * It returns 0 if all the entries could be writen correctly.
+ */
 static int write_all (const struct commonio_db *db)
 {
 	const struct commonio_entry *p;
@@ -868,7 +876,9 @@
 	db->changed = 1;
 }
 
-
+/*
+ * commonio_remove - Remove the entry of the given name from the database.
+ */
 int commonio_remove (struct commonio_db *db, const char *name)
 {
 	struct commonio_entry *p;
@@ -894,7 +904,15 @@
 	return 1;
 }
 
-
+/*
+ * commonio_locate - Find the first entry with the specified name in
+ *                   the database.
+ *
+ *	If found, it returns the entry and set the cursor of the database to
+ *	that entry.
+ *
+ *	Otherwise, it returns NULL.
+ */
 const void *commonio_locate (struct commonio_db *db, const char *name)
 {
 	struct commonio_entry *p;
@@ -912,7 +930,11 @@
 	return p->eptr;
 }
 
-
+/*
+ * commonio_rewind - Restore the database cursor to the first entry.
+ *
+ * It returns 0 on error, 1 on success.
+ */
 int commonio_rewind (struct commonio_db *db)
 {
 	if (!db->isopen) {
@@ -923,7 +945,11 @@
 	return 1;
 }
 
-
+/*
+ * commonio_next - Return the next entry of the specified database
+ *
+ * It returns the next entry, or NULL if no other entries could be found.
+ */
 const void *commonio_next (struct commonio_db *db)
 {
 	void *eptr;




More information about the Pkg-shadow-commits mailing list