From d3b35ae4532897137addab7689be16997e9b7cb8 Mon Sep 17 00:00:00 2001 From: q-posev Date: Thu, 6 May 2021 09:35:48 +0200 Subject: [PATCH] discard portability patch --- src/templates_hdf5/templator_hdf5.org | 2 +- src/templates_text/templator_text.org | 18 +++++++++--------- tools/generator.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/templates_hdf5/templator_hdf5.org b/src/templates_hdf5/templator_hdf5.org index 5276eda..d843450 100644 --- a/src/templates_hdf5/templator_hdf5.org +++ b/src/templates_hdf5/templator_hdf5.org @@ -235,7 +235,7 @@ trexio_hdf5_write_$group_num$ (trexio_t* const file, const uint64_t num) if (infile_num != num) { if (infile_num != 0) { - printf("%llu -> %llu %s \n", num, infile_num, + printf("%lu -> %lu %s \n", num, infile_num, "This variable already exists. Overwriting it is not supported"); return TREXIO_FAILURE; diff --git a/src/templates_text/templator_text.org b/src/templates_text/templator_text.org index 5b6ef2a..9c4addc 100644 --- a/src/templates_text/templator_text.org +++ b/src/templates_text/templator_text.org @@ -226,7 +226,7 @@ trexio_text_unlock (trexio_t* const file) } #+end_src - + ** Deinitialize function (templated part) #+begin_src c :tangle basic_text_group.c @@ -283,7 +283,7 @@ trexio_text_read_$group$ (trexio_text_t* const file) strncpy (file_name, file->parent.file_name, TREXIO_MAX_FILENAME_LENGTH); strncat (file_name, $group$_file_name, - TREXIO_MAX_FILENAME_LENGTH-strlen($group$_file_name)); + TREXIO_MAX_FILENAME_LENGTH-strlen($group$_file_name)); if (file_name[TREXIO_MAX_FILENAME_LENGTH-1] != '\0') { FREE(file_name); @@ -347,7 +347,7 @@ trexio_text_read_$group$ (trexio_text_t* const file) return NULL; } - rc = fscanf(f, "%llu\n", &($group$->dims_$group_dset$[i])); + rc = fscanf(f, "%lu\n", &($group$->dims_$group_dset$[i])); assert(!(rc != 1)); if (rc != 1) { FREE(buffer); @@ -373,7 +373,7 @@ trexio_text_read_$group$ (trexio_text_t* const file) return NULL; } - rc = fscanf(f, "%llu", &($group$->$group_num$)); + rc = fscanf(f, "%lu", &($group$->$group_num$)); assert(!(rc != 1)); if (rc != 1) { FREE(buffer); @@ -479,14 +479,14 @@ trexio_text_flush_$group$ (trexio_text_t* const file) if ($group$->rank_$group_dset$ != 0) size_$group_dset$ = 1; for (unsigned int i=0; i<$group$->rank_$group_dset$; ++i){ - fprintf(f, "dims_$group_dset$ %u %llu\n", i, $group$->dims_$group_dset$[i]); + fprintf(f, "dims_$group_dset$ %u %lu\n", i, $group$->dims_$group_dset$[i]); size_$group_dset$ *= $group$->dims_$group_dset$[i]; } // END REPEAT GROUP_DSET // START REPEAT GROUP_NUM - fprintf(f, "$group_num$ %llu\n", $group$->$group_num$); + fprintf(f, "$group_num$ %lu\n", $group$->$group_num$); // END REPEAT GROUP_NUM /* Write arrays */ @@ -734,7 +734,7 @@ rdm_t* trexio_text_read_rdm(trexio_text_t* const file) { strncpy (file_name, file->parent.file_name, TREXIO_MAX_FILENAME_LENGTH); strncat (file_name, rdm_file_name, - TREXIO_MAX_FILENAME_LENGTH-strlen(rdm_file_name)); + TREXIO_MAX_FILENAME_LENGTH-strlen(rdm_file_name)); if (file_name[TREXIO_MAX_FILENAME_LENGTH-1] != '\0') { FREE(file_name); @@ -993,7 +993,7 @@ trexio_text_buffered_read_rdm_two_e(trexio_t* const file, fseek(f, (long) offset * line_length, SEEK_SET); for (uint64_t i=0 ; i