fid_Filenamebuffer Struct Reference
[File handling routines]

Buffer for creating filenames from basename and extension. More...


Detailed Description

Buffer for creating filenames from basename and extension.

The allocated buffer pointed to by fid_Filenamebuffer::buffer contains a basename, like "/tmp/myindex", followed by a trailing dot, ".". The buffer's size corresponds to the length of the basename plus 5, one for the appended dot, 3 for the extension, and 1 for the terminator. Pointer fid_Filenamebuffer::bufptr points two bytes after the end of the basename and hence right after the dot, into fid_Filenamebuffer::buffer.

This construction is meant to enable easy and fast filename construction. Given a filename extension with a length of three characters, this extension can simply be copied to fid_Filenamebuffer::bufptr to create a full filename.

Definition at line 80 of file fileutils.h.

#include <fileutils.h>


Data Fields

char * buffer
 An allocated buffer that holds a filename.
char * bufptr
 A pointer into fid_Filenamebuffer::buffer that points right after the "." character to enable fast copying of file name extensions to the end of the base name.


Field Documentation

An allocated buffer that holds a filename.

Definition at line 82 of file fileutils.h.

Referenced by fid_filename_create(), fid_filenamebuffer_free(), fid_filenamebuffer_init(), and fid_suffixarray_load_from_files().

A pointer into fid_Filenamebuffer::buffer that points right after the "." character to enable fast copying of file name extensions to the end of the base name.

Definition at line 83 of file fileutils.h.

Referenced by fid_filename_create(), fid_filenamebuffer_free(), fid_filenamebuffer_init(), and fid_suffixarray_load_from_files().


Generated on Wed Jul 8 17:21:18 2009 for Full-text Index Data structure library by  doxygen 1.5.9