"Fossies" - the Fresh Open Source Software Archive

Member "coda-6.9.5/lib-src/rwcdb/rwcdb_file.h" (24 May 2006, 1352 Bytes) of package /linux/misc/old/coda-6.9.5.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "rwcdb_file.h" see the Fossies "Dox" file reference documentation.

    1 /* BLURB lgpl
    3                            Coda File System
    4                               Release 6
    6           Copyright (c) 2003 Carnegie Mellon University
    7                   Additional copyrights listed below
    9 This  code  is  distributed "AS IS" without warranty of any kind under
   10 the  terms of the  GNU  Library General Public Licence  Version 2,  as
   11 shown in the file LICENSE. The technical and financial contributors to
   12 Coda are listed in the file CREDITS.
   14                         Additional copyrights
   15 */
   17 #ifndef _RWCDB_FILE_H_
   18 #define _RWCDB_FILE_H_
   20 #include <sys/types.h>
   22 struct db_file {
   23     int fd;
   24     ino_t ino;
   25     u_int32_t pos, len, eod;
   26     u_int32_t cache_pos, cache_len, pending;
   27     void *cache;
   28 };
   30 /* prototypes for functions in rwcdb_file.c */
   31 int db_file_open(struct db_file *f, const char *name, const int mode);
   32 void db_file_close(struct db_file *f);
   33 int db_file_seek(struct db_file *f, const u_int32_t pos);
   34 int db_file_mread(struct db_file *f, void **data, const u_int32_t len,
   35           const u_int32_t pos);
   36 int db_file_write(struct db_file *f, void *data, u_int32_t len);
   37 int db_file_flush(struct db_file *f);
   38 int readints(struct db_file *f, u_int32_t *a, u_int32_t *b, u_int32_t pos);
   39 int grow_cache(struct db_file *f, u_int32_t len);
   40 int cached(struct db_file *f, u_int32_t len, u_int32_t pos);
   42 #endif /* _RWCDB_FILE_H_ */