diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2002-04-10 23:42:00 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2002-04-10 23:42:00 (GMT) |
commit | 27e7bde1725d4e5ed25b199b5e0ec8f4f8bc2548 (patch) | |
tree | 8b655d3e657e28748c20f4ce7d8bc21164bb35f8 /src | |
parent | 0a3cf94ffb287693ee592dae5cb717f314e76fcb (diff) | |
download | hdf5-27e7bde1725d4e5ed25b199b5e0ec8f4f8bc2548.zip hdf5-27e7bde1725d4e5ed25b199b5e0ec8f4f8bc2548.tar.gz hdf5-27e7bde1725d4e5ed25b199b5e0ec8f4f8bc2548.tar.bz2 |
[svn-r5166] Purpose:
Feature
Description:
Added comments that this is intended as an example of file driver.
Added a macro detection at the end to flag if non-public definitions
are used. (only check for H5private.h which is mostly likely used.
Not bullet proof at all.)
Platforms tested:
eirene.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmulti.c | 16 | ||||
-rw-r--r-- | src/H5FDstdio.c | 20 |
2 files changed, 30 insertions, 6 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index a98581c..c8773ff 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 1997 NCSA - * All rights reserved. + * Copyright (C) 1997-2002 NCSA + * All rights reserved. * * Programmer: Robb Matzke <matzke@llnl.gov> * Monday, November 10, 1997 @@ -9,6 +9,8 @@ * other file drivers depending on the purpose of the address * region being accessed. For instance, all meta-data could be * place in one file while all raw data goes to some other file. + * This also serves as an example of coding a complex file driver, + * therefore, it should not use any non-public definitions. */ #include <assert.h> #include <stdlib.h> @@ -1864,3 +1866,13 @@ open_members(H5FD_multi_t *file) return 0; } + + +#ifdef _H5private_H +/* + * This is not related to the functionality of the driver code. + * It is added here to trigger warning if HDF5 private definitions are included + * by mistake. The code should use only HDF5 public API and definitions. + */ +#error "Do not use HDF5 private definitions" +#endif diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 2cf4eb9..3b9c300 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -1,11 +1,13 @@ /* - * Copyright © 1999 NCSA + * Copyright (C) 1999-2002 NCSA * All rights reserved. * - * Programmer: Robb Matzke <matzke@llnl.gov> - * Wednesday, October 22, 1997 + * Programmer: Robb Matzke <matzke@llnl.gov> + * Wednesday, October 22, 1997 * - * Purpose: This is the Posix stdio.h I/O subclass of H5Flow. + * Purpose: This is the Posix stdio.h I/O subclass of H5Flow. + * It also serves as an example of coding a simple file driver, + * therefore, it should not use any non-public definitions. * * Notes: Ported to the new H5FD architecture on 10/18/99 - QAK * @@ -829,3 +831,13 @@ H5FD_stdio_flush(H5FD_t *_file) return(0); } + + +#ifdef _H5private_H +/* + * This is not related to the functionality of the driver code. + * It is added here to trigger warning if HDF5 private definitions are included + * by mistake. The code should use only HDF5 public API and definitions. + */ +#error "Do not use HDF5 private definitions" +#endif |