summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-01-28 16:11:22 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-01-28 16:11:22 (GMT)
commitd7e8a93078db2639ef34cd616e8d0a83e9e01d3f (patch)
tree68aa0c5a21e0519292950e8c2f7c6878fdee653d /config
parent554d0eaccdd0fb4b86218842045088c2c14b79b2 (diff)
downloadhdf5-d7e8a93078db2639ef34cd616e8d0a83e9e01d3f.zip
hdf5-d7e8a93078db2639ef34cd616e8d0a83e9e01d3f.tar.gz
hdf5-d7e8a93078db2639ef34cd616e8d0a83e9e01d3f.tar.bz2
[svn-r24654] HDFFV-8640: Remove XLATE_UTILITY
Update tools testfiles
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5Tests.c2
-rw-r--r--config/cmake/xlatefile.c56
2 files changed, 1 insertions, 57 deletions
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
index 2f69ec8..21206e0 100644
--- a/config/cmake/HDF5Tests.c
+++ b/config/cmake/HDF5Tests.c
@@ -377,10 +377,10 @@ int main(int argc, char **argv)
#endif
#ifdef GETTIMEOFDAY_GIVES_TZ
+#include <time.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#include <time.h>
int main(void)
{
struct timeval tv;
diff --git a/config/cmake/xlatefile.c b/config/cmake/xlatefile.c
deleted file mode 100644
index e220289..0000000
--- a/config/cmake/xlatefile.c
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define BUFFERSIZE 1024
-
-int main(int argc, char *argv[]) {
- FILE *infile = NULL;
- FILE *outfile = NULL;
- char *buffer = NULL;
- char argbuf[8];
- size_t bytes = 0;
- size_t idx = 0;
- unsigned int lineidx = 0;
- unsigned int stripXlines = 3;
-
- if(argc < 3)
- exit(1);
- if(NULL == (infile = fopen(argv[1], "rb")))
- exit(2);
- if(NULL == (outfile = fopen(argv[2], "wb+")))
- exit(3);
- if(argc > 3)
- if(argv[3][0] == '-')
- if(argv[3][1] == 'l') {
- strcpy(argbuf, &argv[3][2]);
- stripXlines = atoi(argbuf);
- }
- buffer = (char*)malloc(BUFFERSIZE);
- if(buffer) {
- while(!feof(infile)) {
- /* read the file into the buffer. */
- bytes = fread(buffer, 1, BUFFERSIZE, infile);
- if(lineidx < stripXlines) {
- for(idx = 0; idx < bytes; idx++) {
- if(buffer[idx] == '\n') {
- lineidx++;
- if(buffer[idx+1] == '\r')
- idx++;
- }
- if(lineidx >= stripXlines) {
- fwrite(&buffer[idx+1], 1, bytes-idx-1, outfile);
- idx = bytes;
- }
- }
- }
- else
- fwrite(buffer, 1, bytes, outfile);
- }
- free(buffer);
- }
- fclose(outfile);
- fclose(infile);
-
- return 0;
-}