libefs function documentation.



Here folows a patch to libefs source to add some function
documentation.
Do whatever you want with it.


? libefs.patch
Index: dir.c
===================================================================
RCS file: /cvs/gnome/libefs/src/dir.c,v
retrieving revision 1.4
diff -u -r1.4 dir.c
--- dir.c	1999/07/10 14:10:34	1.4
+++ dir.c	2000/02/12 11:51:58
@@ -9,6 +9,28 @@
 
 #include "vefs.h"
 
+/**
+ * efs_dir_open:
+ * @dir: parent directory
+ * @path: filesystem path
+ * @flags: access flags
+ *
+ * Description: Opens or creates a new #EFS within file @path. @path
+ * is simply the name of the directory like "test_dir". "./test_dir"
+ * is not valid and will always return NULL.
+ *
+ * @flags is %EFS_READ or %EFS_RDWR which request opening the #EFS read-only 
+ * or read/write. flags  may  also  be  bitwise-or'd with one or more of the
+ * following:
+ *
+ * %EFS_CREATE If the #EFS does not exist it will be created.
+ *
+ * %EFS_EXCL  When used with %EFS_CREATE, if the #EFS already exists it is an 
+ * error and the open will fail.
+ *
+ * Returns: a pointer to the subdirectory, or zero if an error occurred.
+ **/
+
 EFSDir*
 efs_dir_open (EFSDir *dir, const char *path, gint flags)
 {
@@ -22,6 +44,18 @@
 	return d->fops->dir_open (dir, path, flags);
 }
 
+/**
+ * efs_dir_close
+ * @dir: the directory to close.
+ * 
+ * Description: Closes @dir. This function 
+ * recurses its opened files/subdirs. This 
+ * function can be called on the root #EFS
+ * after having called efs_commit.
+ *
+ * Returns: 0 upon success. -1 upon failure.
+ */
+
 gint         
 efs_dir_close (EFSDir *dir)
 {
@@ -34,6 +68,16 @@
 	return d->fops->dir_close (dir);
 }
 
+/**
+ * efs_dir_seek
+ * @dir:
+ * @offset:
+ *
+ * Description:
+ *
+ * Returns:
+ */
+
 gint32       
 efs_dir_seek (EFSDir *dir, gint32 offset)
 {
@@ -46,6 +90,17 @@
 	return d->fops->dir_seek (dir, offset);
 }
 
+/**
+ * efs_dir_read
+ * @dir: the directory to close.
+ * 
+ * Description: allows you to browse @dir content.
+ *
+ * Returns: it will return the next #EFSDirEntry 
+ * till all of them have been returned. It will 
+ * return after the last #EFSDirEntry has been 
+ * returned.
+ */
 EFSDirEntry*
 efs_dir_read (EFSDir *dir)
 {
Index: efs.c
===================================================================
RCS file: /cvs/gnome/libefs/src/efs.c,v
retrieving revision 1.9
diff -u -r1.9 efs.c
--- efs.c	1999/10/24 11:17:51	1.9
+++ efs.c	2000/02/12 11:51:58
@@ -61,10 +61,12 @@
  *
  * %EFS_CREATE If the #EFS does not exist it will be created.
  *
- * %EFS_EXCL  When used with %EFS_CREAT, if the #EFS already exists it is an 
+ * %EFS_EXCL  When used with %EFS_CREATE, if the #EFS already exists it is an 
  * error and the open will fail.
  *
  * @mode  specifies  the  permissions to use if a new file is created.
+ * You can specify them in octal with 0700 which gives 700 permission
+ * to the file created.
  *
  * Returns: a pointer to the filesystem, or zero if an error occurred.
  **/
Index: file.c
===================================================================
RCS file: /cvs/gnome/libefs/src/file.c,v
retrieving revision 1.3
diff -u -r1.3 file.c
--- file.c	1999/07/10 14:10:34	1.3
+++ file.c	2000/02/12 11:51:58
@@ -10,6 +10,29 @@
 #include "vefs.h"
 #include "simple.h"
 
+
+/**
+ * efs_file_open:
+ * @dir: parent directory
+ * @path: filesystem path
+ * @flags: access flags
+ *
+ * Description: Opens or creates a new #EFSFile within file @path. @path
+ * is simply the name of the file like "test.c". "./test.c" is not valid
+ * and will always return NULL.
+ *
+ * @flags is %EFS_READ or %EFS_RDWR which request opening the #EFSFile read-only 
+ * or read/write. flags  may  also  be  bitwise-or'd with one or more of the
+ * following:
+ *
+ * %EFS_CREATE If the #EFSFile does not exist it will be created.
+ *
+ * %EFS_EXCL  When used with %EFS_CREATE, if the #EFSFile already exists it is an 
+ * error and the open will fail.
+ *
+ * Returns: a pointer to the file, or NULL if an error occurred.
+ **/
+
 EFSFile*
 efs_file_open (EFSDir *dir, const char *path, gint flags)
 {
@@ -25,6 +48,16 @@
 	return d->fops->file_open (dir, path, flags);
 }
 
+
+/**
+ * efs_file_close
+ * @file: the file to close.
+ *
+ * Description: Closes the file.
+ *
+ * Returns: 0 upon success. -1 upon failure.
+ */
+
 gint         
 efs_file_close (EFSFile *file)
 {
@@ -37,6 +70,17 @@
 	return d->fops->file_close (file);
 }
 
+/**
+ * efs_file_seek
+ * @file:
+ * @offset:
+ * @whence:
+ * 
+ * Description:
+ *
+ * Returns:
+ */
+
 gint32
 efs_file_seek (EFSFile *file, gint32 offset, gint whence)
 {
@@ -49,6 +93,16 @@
 	return d->fops->file_seek (file, offset, whence);
 }
 
+/**
+ * efs_file_read
+ * @file:
+ * @buf:
+ * @count:
+ *
+ * Description:
+ *
+ * Returns: 
+ */
 gint32
 efs_file_read (EFSFile *file, void *buf, gint32 count)
 {
@@ -62,6 +116,16 @@
 	return d->fops->file_read (file, buf, count);
 }
 
+/**
+ * efs_file_write
+ * @file:
+ * @buf:
+ * @count:
+ *
+ * Description:
+ *
+ * Returns: 
+ */
 gint32
 efs_file_write (EFSFile *file, void *buf, gint32 count)
 {
@@ -77,6 +141,15 @@
 	return d->fops->file_write (file, buf, count);
 }
 
+/**
+ * efs_file_trunc
+ * @file:
+ * @size:
+ *
+ * Description:
+ *
+ * Returns: 
+ */
 gint
 efs_file_trunc (EFSFile *file, guint32 size)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]