mappedfile.c File Reference

Routines for sharing large read-only data files. More...

#include "common.h"
#include <stdio.h>
#include <math.h>
#include <fcntl.h>
#include <strings.h>
#include "machine.h"
#include "bu.h"

Include dependency graph for mappedfile.c:

Go to the source code of this file.

Functions

bu_mapped_filebu_open_mapped_file (const char *name, const char *appl)
void bu_close_mapped_file (struct bu_mapped_file *mp)
void bu_pr_mapped_file (const char *title, const struct bu_mapped_file *mp)
void bu_free_mapped_files (int verbose)
bu_mapped_filebu_open_mapped_file_with_path (char *const *path, const char *name, const char *appl)


Detailed Description

Routines for sharing large read-only data files.

Routines for sharing large read-only data files like height fields, bit map solids, texture maps, etc. Uses memory mapped files where available.

Each instance of the file has the raw data available as element "buf". If a particular application needs to transform the raw data in a manner that is identical across all uses of that application (e.g. height fields, EBMs, etc), then the application should provide a non-null "appl" string, to tag the format of the "apbuf". This will keep different applications from sharing that instance of the file. Thus, if the same filename is opened for interpretation as both an EBM and a height field, they will be assigned different mapped file structures, so that the "apbuf" pointers are distinct.

Author:
Michael John Muuss
Source -
The U. S. Army Research Laboratory
Aberdeen Proving Ground, Maryland 21005-5068 USA

Definition in file mappedfile.c.


Generated on Mon Sep 18 01:25:04 2006 for BRL-CAD by  doxygen 1.4.6