Initial code commit for Toolkit 1.1.
[silc.git] / lib / silcutil / silcfileutil.h
index f388e25a876c17cb1bf900b9c5ab05fbfc8da757..a1ccd3049953cf54e80f241edf980383893f8ef4 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2002 Pekka Riikonen
+  Copyright (C) 1997 - 2005 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -40,7 +40,8 @@
  * DESCRIPTION
  *
  *    Opens a file indicated by the filename `filename' with flags indicated
- *    by `flags'.  The opening permission defaults to 0600.
+ *    by `flags'.  The opening permission defaults to 0600.  The `flags'
+ *    are defined in open(2).
  *
  ***/
 int silc_file_open(const char *filename, int flags);
@@ -55,7 +56,7 @@ int silc_file_open(const char *filename, int flags);
  *
  *    Opens a file indicated by the filename `filename' with flags indicated
  *    by `flags'.  The argument `mode' specifies the permissions to use in
- *    case a new file is created.
+ *    case a new file is created.  The `flags' are defined in open(2).
  *
  ***/
 int silc_file_open_mode(const char *filename, int flags, int mode);
@@ -108,7 +109,10 @@ int silc_file_close(int fd);
  * DESCRIPTION
  *
  *    Reads the content of `filename' to a buffer.  The allocated buffer is
- *    returned.
+ *    returned.  This does not NULL terminate the buffer but EOF terminate
+ *    it.  The caller must replace the EOF with NULL if the buffer must be
+ *    NULL terminated.
+ *
  *    If the `return_len' pointer is not NULL, it's filled with the length of
  *    the file.
  *