summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-18 02:44:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-18 02:44:26 (GMT)
commit0a7809a659fd320e57c3efe96fce901d4cababfe (patch)
treec49aa00c13ead8e8e5e87b704524fe9a7735618d /src/H5detect.c
parent0ac03c78900404696ff2427556bc815adf56744c (diff)
downloadhdf5-0a7809a659fd320e57c3efe96fce901d4cababfe.zip
hdf5-0a7809a659fd320e57c3efe96fce901d4cababfe.tar.gz
hdf5-0a7809a659fd320e57c3efe96fce901d4cababfe.tar.bz2
[svn-r18415] Description:
Move the libhdf5.settings information out of src/H5Tinit.c and into a separate header file (src/H5lib_settings.h), which is generated at build time (not configure time) with the src/H5make_libsettings generator program. Tested on: Linux/32 2.6 (jam) Mac OS X/32 10.6.2 (amazon)
Diffstat (limited to 'src/H5detect.c')
-rw-r--r--src/H5detect.c101
1 files changed, 2 insertions, 99 deletions
diff --git a/src/H5detect.c b/src/H5detect.c
index ebd042d..8fc1690 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -109,7 +109,6 @@ static void detect_C99_integers32(void);
static void detect_C99_integers64(void);
static void detect_alignments(void);
static void insert_libhdf5_settings(FILE *flibinfo);
-static void make_libinfo(void);
static size_t align_g[] = {1, 2, 4, 8, 16};
static jmp_buf jbuf_g;
@@ -504,99 +503,6 @@ sigbus_handler(int UNUSED signo)
/*-------------------------------------------------------------------------
- * Function: insert_libhdf5_settings
- *
- * Purpose: insert the contents of libhdf5.settings into a file
- * represented by flibinfo.
- * Make it an empty string if H5_HAVE_EMBEDDED_LIBINFO is not
- * defined, i.e., not enabled.
- *
- * Return: void
- *
- * Programmer: Albert Cheng
- * Apr 20, 2009
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#define LIBSETTINGSFNAME "libhdf5.settings"
-static void
-insert_libhdf5_settings(FILE *flibinfo)
-{
-#ifdef H5_HAVE_EMBEDDED_LIBINFO
- FILE *fsettings; /* for files libhdf5.settings */
- int inchar;
- int bol=0; /* indicates the beginning of a new line */
-
- if (NULL==(fsettings=HDfopen(LIBSETTINGSFNAME, "r"))){
- perror(LIBSETTINGSFNAME);
- exit(1);
- }
- /* print variable definition and the string */
- fprintf(flibinfo, "char H5libhdf5_settings[]=\n");
- bol++;
- while (EOF != (inchar = getc(fsettings))){
- if (bol){
- /* Start a new line */
- fprintf(flibinfo, "\t\"");
- bol = 0;
- }
- if (inchar == '\n'){
- /* end of a line */
- fprintf(flibinfo, "\\n\"\n");
- bol++;
- }else{
- putc(inchar, flibinfo);
- }
- }
- if (feof(fsettings)){
- /* wrap up */
- if (!bol){
- /* EOF found without a new line */
- fprintf(flibinfo, "\\n\"\n");
- };
- fprintf(flibinfo, ";\n\n");
- }else{
- fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME);
- exit(1);
- }
- if (0 != fclose(fsettings)){
- perror(LIBSETTINGSFNAME);
- exit(1);
- }
-#else
- /* print variable definition and an empty string */
- fprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n");
-#endif
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: make_libinfo
- *
- * Purpose: Create the embedded library information definition.
- * This sets up for a potential extension that the declaration
- * is printed to a file different from stdout.
- *
- * Return: void
- *
- * Programmer: Albert Cheng
- * Sep 15, 2009
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static void
-make_libinfo(void)
-{
- /* print variable definition and then the string as a macro. */
- insert_libhdf5_settings(stdout);
-}
-
-
-/*-------------------------------------------------------------------------
* Function: print_results
*
* Purpose: Prints information about the detected data types.
@@ -677,9 +583,6 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align)
/*******************/\n\
\n");
- /* Generate embedded library information variable definition */
- make_libinfo();
-
/* The interface initialization function */
printf("\n\
\n\
@@ -1154,8 +1057,8 @@ find_bias(int epos, int esize, int *perm, void *_a)
/*-------------------------------------------------------------------------
* Function: print_header
- *
- * Purpose: Prints the C file header for the generated file.
+ *
+ * Purpose: Prints the C file header for the generated file.
*
* Return: void
*