1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
/*
* $Id: file.h 726 2004-03-08 13:12:45Z lohmann $
*
* This file contains definitions related to the Vista data file format.
*/
#ifndef V_file_h
#define V_file_h 1
/*
* Copyright 1993, 1994 University of British Columbia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appears in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. UBC makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* Author: Arthur Pope, UBC Laboratory for Computational Intelligence
*/
/* From the Vista library: */
#include <viaio/Vlib.h>
/* From the standard C library: */
#ifdef NULL /* because some stdio's blindly defined NULL */
#undef NULL
#endif
#include <stdio.h>
#ifndef NULL
#define NULL 0
#endif
/* For portability: */
#include <X11/Xfuncproto.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Components of the Vista data file header, and the delimeter separating
* attributes from binary data.
*/
#define VFileHeader "V-data"
#define VFileVersion 2
#define VFileDelimiter "\f\n"
/*
* Limit on the length of an attribute name.
*/
#define VMaxAttrNameLength 256
/*
* Type of function supplied as a filter to VReadFile.
*/
typedef VBoolean VReadFileFilterProc (
#if NeedFunctionPrototypes
VBundle /* bundle */,
VRepnKind /* repn */
#endif
);
/*
* Declarations of library routines.
*/
/* Open a file for input: */
extern FILE *VOpenInputFile (
#if NeedFunctionPrototypes
VStringConst /* filename */,
VBoolean /* nofail */
#endif
);
/* Open a file for output: */
extern FILE *VOpenOutputFile (
#if NeedFunctionPrototypes
VStringConst /* filename */,
VBoolean /* nofail */
#endif
);
/* Read objects of a certain type: */
extern int VReadObjects (
#if NeedFunctionPrototypes
FILE * /* file */,
VRepnKind /* repn */,
VAttrList * /* attributes */,
VPointer ** /* objects */
#endif
);
/* Read a Vista data file: */
extern VAttrList VReadFile (
#if NeedFunctionPrototypes
FILE * /* f */,
VReadFileFilterProc * /* filter */
#endif
);
/* Write objects of a certain type: */
extern VBoolean VWriteObjects (
#if NeedFunctionPrototypes
FILE * /* file */,
VRepnKind /* repn */,
VAttrList /* attributes */,
int /* nobjects */,
VPointer [] /* objects */
#endif
);
/* Write a Vista data file: */
extern VBoolean VWriteFile (
#if NeedFunctionPrototypes
FILE * /* f */,
VAttrList /* list */
#endif
);
#ifdef __cplusplus
}
#endif
#endif /* V_file_h */
|