00001
00002 /*---------------------------------------------------------------------------
00003 E.S.O.
00004 ----------------------------------------------------------------------------
00005 File name : mmap_i.h
00006 Author : Nicolas Devillard
00007 Created on : August 1999
00008 Language : ANSI C
00009 Part of ECLIPSE library
00010 Description : mmap() interfaces to open/close files
00011 *--------------------------------------------------------------------------*/
00012
00013 /*
00014
00015 $Id: mmap_i.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00016 $Author: amodigli $
00017 $Date: 2003/09/03 12:50:47 $
00018 $Revision: 1.1 $
00019
00020 */
00021
00022 #ifndef _MMAP_I_H_
00023 #define _MMAP_I_H_
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00029 /*---------------------------------------------------------------------------
00030 Includes
00031 ---------------------------------------------------------------------------*/
00032
00033 #include <sys/types.h>
00034 #include <sys/mman.h>
00035 #include <sys/stat.h>
00036 #include <fcntl.h>
00037 #include <unistd.h>
00038 #include <stdio.h>
00039 #include <stdlib.h>
00040 #include <string.h>
00041
00042 #include "static_sz.h"
00043
00044 /*---------------------------------------------------------------------------
00045 New types
00046 ---------------------------------------------------------------------------*/
00047
00048 typedef struct _MMAP_FILE_ {
00049 int fd ;
00050 char * buf ;
00051 unsigned long size ;
00052 char filename[FILENAMESZ] ;
00053 } mmap_file ;
00054
00055
00056
00057 /*---------------------------------------------------------------------------
00058 Function prototypes
00059 ---------------------------------------------------------------------------*/
00060
00061
00062
00063 /*-------------------------------------------------------------------------*/
00085 /*--------------------------------------------------------------------------*/
00086
00087 mmap_file * mmap_open(char * filename);
00088
00089
00090 /*-------------------------------------------------------------------------*/
00100 /*--------------------------------------------------------------------------*/
00101
00102 void mmap_close(mmap_file * mm);
00103
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107
00108 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001