~ubuntu-branches/ubuntu/utopic/vtk6/utopic

« back to all changes in this revision

Viewing changes to ThirdParty/hdf5/vtkhdf5/src/H5Pfmpl.c

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-01-07 21:26:32 UTC
  • Revision ID: package-import@ubuntu.com-20140107212632-vzwzmu3oyc3obmsg
Tags: upstream-6.0.0
ImportĀ upstreamĀ versionĀ 6.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
2
 * Copyright by The HDF Group.                                               *
 
3
 * Copyright by the Board of Trustees of the University of Illinois.         *
 
4
 * All rights reserved.                                                      *
 
5
 *                                                                           *
 
6
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 
7
 * terms governing use, modification, and redistribution, is contained in    *
 
8
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 
9
 * of the source code distribution tree; Copyright.html can be found at the  *
 
10
 * root level of an installed copy of the electronic HDF5 document set and   *
 
11
 * is linked from the top-level documents page.  It can also be found at     *
 
12
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 
13
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 
14
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
15
 
 
16
/*-------------------------------------------------------------------------
 
17
 *
 
18
 * Created:             H5Pmtpl.c
 
19
 *                      November  1 2006
 
20
 *                      Quincey Koziol <koziol@hdfgroup.org>
 
21
 *
 
22
 * Purpose:             File mount property list class routines
 
23
 *
 
24
 *-------------------------------------------------------------------------
 
25
 */
 
26
 
 
27
/****************/
 
28
/* Module Setup */
 
29
/****************/
 
30
#define H5P_PACKAGE             /*suppress error about including H5Ppkg   */
 
31
 
 
32
 
 
33
/***********/
 
34
/* Headers */
 
35
/***********/
 
36
#include "H5private.h"          /* Generic Functions                    */
 
37
#include "H5Eprivate.h"         /* Error handling                       */
 
38
#include "H5Iprivate.h"         /* IDs                                  */
 
39
#include "H5Ppkg.h"             /* Property lists                       */
 
40
 
 
41
 
 
42
/****************/
 
43
/* Local Macros */
 
44
/****************/
 
45
 
 
46
/* ======================== File Mount properties ====================*/
 
47
/* Definition for whether absolute symlinks local to file. */
 
48
#define H5F_MNT_SYM_LOCAL_SIZE          sizeof(hbool_t)
 
49
#define H5F_MNT_SYM_LOCAL_DEF           FALSE
 
50
 
 
51
 
 
52
/******************/
 
53
/* Local Typedefs */
 
54
/******************/
 
55
 
 
56
 
 
57
/********************/
 
58
/* Package Typedefs */
 
59
/********************/
 
60
 
 
61
 
 
62
/********************/
 
63
/* Local Prototypes */
 
64
/********************/
 
65
 
 
66
/* Property class callbacks */
 
67
static herr_t H5P_fmnt_reg_prop(H5P_genclass_t *pclass);
 
68
 
 
69
 
 
70
/*********************/
 
71
/* Package Variables */
 
72
/*********************/
 
73
 
 
74
/* File mount property list class library initialization object */
 
75
const H5P_libclass_t H5P_CLS_FMNT[1] = {{
 
76
    "file mount",               /* Class name for debugging     */
 
77
    &H5P_CLS_ROOT_g,            /* Parent class ID              */
 
78
    &H5P_CLS_FILE_MOUNT_g,      /* Pointer to class ID          */
 
79
    &H5P_LST_FILE_MOUNT_g,      /* Pointer to default property list ID */
 
80
    H5P_fmnt_reg_prop,          /* Default property registration routine */
 
81
    NULL,                       /* Class creation callback      */
 
82
    NULL,                       /* Class creation callback info */
 
83
    NULL,                       /* Class copy callback          */
 
84
    NULL,                       /* Class copy callback info     */
 
85
    NULL,                       /* Class close callback         */
 
86
    NULL                        /* Class close callback info    */
 
87
}};
 
88
 
 
89
 
 
90
/*****************************/
 
91
/* Library Private Variables */
 
92
/*****************************/
 
93
 
 
94
 
 
95
 
 
96
/*-------------------------------------------------------------------------
 
97
 * Function:    H5P_fmnt_reg_prop
 
98
 *
 
99
 * Purpose:     Register the file mount property list class's properties
 
100
 *
 
101
 * Return:      Non-negative on success/Negative on failure
 
102
 *
 
103
 * Programmer:  Quincey Koziol
 
104
 *              October 31, 2006
 
105
 *-------------------------------------------------------------------------
 
106
 */
 
107
static herr_t
 
108
H5P_fmnt_reg_prop(H5P_genclass_t *pclass)
 
109
{
 
110
    hbool_t local = H5F_MNT_SYM_LOCAL_DEF;      /* Whether symlinks are local to file */
 
111
    herr_t ret_value = SUCCEED;                 /* Return value */
 
112
 
 
113
    FUNC_ENTER_NOAPI_NOINIT(H5P_fmnt_reg_prop)
 
114
 
 
115
    /* Register property of whether symlinks is local to file */
 
116
    if(H5P_register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &local, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
 
117
         HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
 
118
 
 
119
done:
 
120
    FUNC_LEAVE_NOAPI(ret_value)
 
121
} /* end H5P_fmnt_reg_prop() */
 
122