dirCache.c File Reference

#include "sysincludes.h"
#include "vfat.h"
#include "dirCache.h"

Include dependency graph for dirCache.c:

Go to the source code of this file.

Defines

#define free   myfree
#define BITS_PER_INT   (sizeof(unsigned int) * 8)

Functions

void myfree (void *a)
static unsigned int rol (unsigned int arg, int shift)
static int calcHash (char *name)
static int addBit (unsigned int *bitmap, int hash, int checkOnly)
static int _addHash (dirCache_t *cache, unsigned int hash, int checkOnly)
static void addNameToHash (dirCache_t *cache, char *name)
static void hashDce (dirCache_t *cache, dirCacheEntry_t *dce)
int isHashed (dirCache_t *cache, char *name)
void checkXYZ (dirCache_t *cache)
int growDirCache (dirCache_t *cache, int slot)
dirCache_tallocDirCache (Stream_t *Stream, int slot)
static void freeDirCacheRange (dirCache_t *cache, int beginSlot, int endSlot)
static dirCacheEntry_tallocDirCacheEntry (dirCache_t *cache, int beginSlot, int endSlot, dirCacheEntryType_t type)
dirCacheEntry_taddUsedEntry (dirCache_t *cache, int beginSlot, int endSlot, char *longName, char *shortName, struct directory *dir)
static void mergeFreeSlots (dirCache_t *cache, int slot)
dirCacheEntry_taddFreeEntry (dirCache_t *cache, int beginSlot, int endSlot)
dirCacheEntry_taddEndEntry (dirCache_t *cache, int pos)
dirCacheEntry_tlookupInDircache (dirCache_t *cache, int pos)
void freeDirCache (Stream_t *Stream)


Define Documentation

#define BITS_PER_INT   (sizeof(unsigned int) * 8)
 

Definition at line 14 of file dirCache.c.

Referenced by addBit().

#define free   myfree
 

Definition at line 11 of file dirCache.c.

Referenced by _udp_recvfrom(), _udp_sendto(), add_name(), add_z_2(), addpoint(), alloc(), alloc_inode(), allocbuf(), allocDirCache(), another_hunk(), AnyMail(), arg_str(), b_unset(), bclose(), bootminix(), bsClose(), buf_free(), chk_ftime(), chk_lnk(), chkfree(), clean(), clear_func(), closedir(), cutfree(), deallocate(), default_bzfree(), Defdev(), del(), delete(), delfile(), delwin(), dir_grow(), directory(), do_clean(), do_extract_currentfile(), do_ignore(), dodefine(), done(), execute(), expand(), fat_32_read(), fetchname(), fgetln(), find_device(), format(), format_root(), fpop(), Free(), free_a_tree(), free_args(), free_index(), free_num(), free_space(), freebitmap(), freecount(), freeDirCache(), freeDirCacheRange(), freent(), freepnt(), fs_free(), fts_build(), fts_close(), fts_lfree(), fts_palloc(), fts_read(), get_atdir(), grow(), gzlog_open(), gzscan(), gztack(), implmacros(), incr_size(), insert_bit(), is_deleted(), leaveDirectory(), leaveDrive(), link_islink(), lnk_end(), log_clean(), lookup(), m_bsrch(), m_fsrch(), m_out(), main(), make(), make1(), makedir(), makenew(), mapkey(), mcsub(), mergeFreeSlots(), monitor(), more_arrays(), more_variables(), mwrite_one(), myfree(), newline(), newwin(), nm(), opt_add(), out_num(), parse_one(), pat_sel(), pch_swap(), plan_a(), pop(), pop_vars(), popname(), poptoken(), preadbuffer(), print1(), print_fs(), printSummary(), Process(), purg_lnk(), put_buf(), re_alloc(), re_comp(), re_input(), realloc(), reallocf(), recomp(), regcomp(), regfree(), reinitialize_almost_everything(), rep_add(), restore_attr(), sbx_fcls(), select_image(), setDFmacro(), setmacro(), setvbuf(), sfree(), shorten(), testname(), there_is_another_patch(), typefixhack(), unix_copydir(), unix_dir_loop(), unix_write(), unmakepat(), unschedule(), unzRepair(), voidtoken(), win32_close_file_func(), word_free(), work(), zcfree(), and zipCloseFileInZipRaw().


Function Documentation

static int _addHash dirCache_t cache,
unsigned int  hash,
int  checkOnly
[static]
 

Definition at line 67 of file dirCache.c.

References addBit(), cache, and rol().

Referenced by addNameToHash(), and isHashed().

static int addBit unsigned int *  bitmap,
int  hash,
int  checkOnly
[static]
 

Definition at line 52 of file dirCache.c.

References BITS_PER_INT, and DC_BITMAP_SIZE.

Referenced by _addHash().

dirCacheEntry_t* addEndEntry dirCache_t cache,
int  pos
 

Definition at line 306 of file dirCache.c.

References allocDirCacheEntry(), cache, and DCET_END.

Referenced by vfat_lookup_loop_common().

dirCacheEntry_t* addFreeEntry dirCache_t cache,
int  beginSlot,
int  endSlot
 

Definition at line 284 of file dirCache.c.

References allocDirCacheEntry(), cache, DCET_FREE, entry, exit(), fprintf(), mergeFreeSlots(), and stderr.

Referenced by clear_vses(), dir_write(), and vfat_lookup_loop_common().

static void addNameToHash dirCache_t cache,
char *  name
[static]
 

Definition at line 76 of file dirCache.c.

References _addHash(), cache, and calcHash().

Referenced by hashDce().

dirCacheEntry_t* addUsedEntry dirCache_t cache,
int  beginSlot,
int  endSlot,
char *  longName,
char *  shortName,
struct directory dir
 

Definition at line 238 of file dirCache.c.

References allocDirCacheEntry(), cache, DCET_USED, entry::dir, dir, entry, exit(), fprintf(), hashDce(), stderr, and strdup().

Referenced by vfat_lookup_loop_common().

dirCache_t* allocDirCache Stream_t Stream,
int  slot
 

Definition at line 129 of file dirCache.c.

References DC_BITMAP_SIZE, exit(), fprintf(), free, getDirCacheP(), growDirCache(), memset(), New, NewArray, and stderr.

Referenced by clear_vses(), dir_write(), lookupForInsert(), and vfat_lookup().

static dirCacheEntry_t* allocDirCacheEntry dirCache_t cache,
int  beginSlot,
int  endSlot,
dirCacheEntryType_t  type
[static]
 

Definition at line 212 of file dirCache.c.

References cache, entry, freeDirCacheRange(), growDirCache(), i, New, and entry::type.

Referenced by addEndEntry(), addFreeEntry(), and addUsedEntry().

static int calcHash char *  name  )  [static]
 

Definition at line 24 of file dirCache.c.

References c, hash(), i, rol(), and toupper.

Referenced by addNameToHash(), and isHashed().

void checkXYZ dirCache_t cache  ) 
 

Definition at line 99 of file dirCache.c.

References cache, and printf.

void freeDirCache Stream_t Stream  ) 
 

Definition at line 318 of file dirCache.c.

References cache, free, freeDirCacheRange(), and getDirCacheP().

Referenced by free_file().

static void freeDirCacheRange dirCache_t cache,
int  beginSlot,
int  endSlot
[static]
 

Definition at line 159 of file dirCache.c.

References cache, entry, exit(), fprintf(), free, i, and stderr.

Referenced by allocDirCacheEntry(), and freeDirCache().

int growDirCache dirCache_t cache,
int  slot
 

Definition at line 106 of file dirCache.c.

References cache, exit(), fprintf(), i, realloc(), and stderr.

Referenced by allocDirCache(), allocDirCacheEntry(), lookupForInsert(), and lookupInDircache().

static void hashDce dirCache_t cache,
dirCacheEntry_t dce
[static]
 

Definition at line 81 of file dirCache.c.

References addNameToHash(), dirCacheEntry_t::beginSlot, cache, dirCacheEntry_t::endSlot, dirCacheEntry_t::longName, and dirCacheEntry_t::shortName.

Referenced by addUsedEntry().

int isHashed dirCache_t cache,
char *  name
 

Definition at line 91 of file dirCache.c.

References _addHash(), cache, and calcHash().

Referenced by lookupForInsert().

dirCacheEntry_t* lookupInDircache dirCache_t cache,
int  pos
 

Definition at line 311 of file dirCache.c.

References cache, and growDirCache().

static void mergeFreeSlots dirCache_t cache,
int  slot
[static]
 

Definition at line 266 of file dirCache.c.

References cache, DCET_FREE, free, i, next, and previous.

Referenced by addFreeEntry().

void myfree void *  a  ) 
 

Definition at line 6 of file dirCache.c.

References free.

static unsigned int rol unsigned int  arg,
int  shift
[inline, static]
 

Definition at line 17 of file dirCache.c.

Referenced by _addHash(), and calcHash().


Generated on Fri Apr 14 23:03:50 2006 for minix by  doxygen 1.4.6