Skip to content

Commit

Permalink
Merge pull request #27 from byrnHDF/hdf5_1_8
Browse files Browse the repository at this point in the history
Merge from develop
  • Loading branch information
lrknox authored Oct 7, 2020
2 parents 2eeb6c4 + 81e70df commit df55924
Show file tree
Hide file tree
Showing 15 changed files with 3,799 additions and 3,763 deletions.
5 changes: 4 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BraceWrapping:
BreakBeforeBraces: Stroustrup
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 110
ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 3
Expand All @@ -33,6 +33,8 @@ IncludeIsMainRegex: '(public)?$'
IndentCaseLabels: true
IndentGotoLabels: false
IndentWidth: 4
MacroBlockBegin: "^BEGIN_FUNC"
MacroBlockEnd: "^END_FUNC"
ObjCBlockIndentWidth: 4
ReflowComments: true
SortIncludes: false
Expand All @@ -58,5 +60,6 @@ StatementMacros:
- HMPI_GOTO_ERROR
- H5_GCC_DIAG_OFF
- H5_GCC_DIAG_ON
- CATCH
...

30 changes: 14 additions & 16 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,34 @@
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
*.cmake @byrnHDF
CMakeLists.txt @byrnHDF
CMakeTests.* @byrnHDF
*.cmake @byrnHDF @derobins
CMakeLists.txt @byrnHDF @derobins
CMakeTests.* @byrnHDF @derobins

/bin/ @lrknox @derobins @byrnHDF
/bin/ @lrknox @derobins @qkoziol

/c++/ bmribler@hdfgroup.org
/c++/ @bmribler @byrnHDF

/config/ @lrknox @derobins @byrnHDF
/config/ @lrknox @derobins @qkoziol @byrnHDF

/doc/ @gnuoyd [email protected]
/doc/ @gnuoyd @jrmainzer

/examples/ @lrknox @derobins [email protected]
/examples/ @lrknox @derobins @bljhdf

/fortran/ @brtnfld @epourmal

/hl/ [email protected]

/java/ @jhendersonHDF @byrnHDF
/hl/ @bmribler @byrnHDF

/m4/ @lrknox @derobins

/release_docs/ @lrknox [email protected] @byrnHDF
/release_docs/ @lrknox @bljhdf @byrnHDF

/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup [email protected]
/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup @jrmainzer

/test/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup [email protected]
/test/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup @jrmainzer

/testpar/ @jhendersonHDF @rawarren [email protected]
/testpar/ @jhendersonHDF @rawarren @jrmainzer @qkoziol

/tools/ @byrnHDF
/tools/ @byrnHDF @bmribler

/utils/ @lrknox @byrnHDF
6 changes: 3 additions & 3 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
uses: DoozyX/clang-format-lint-action@v0.8
uses: DoozyX/clang-format-lint-action@v0.10
with:
source: '.'
extensions: 'c,h,cpp'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: 10
style: file
exclude: './config ./hl/src/H5LTanalyze.c'
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
echo "::set-env name=CXX::cl.exe"
echo "::set-env name=CC::cl.exe"
echo "CXX=cl.exe" >> $GITHUB_ENV
echo "CC=cl.exe" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
echo "::set-env name=CXX::cl.exe"
echo "::set-env name=CC::cl.exe"
echo "CXX=cl.exe" >> $GITHUB_ENV
echo "CC=cl.exe" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
Expand Down
24 changes: 22 additions & 2 deletions bin/format_source
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/bin/bash
#
# Recursively format all C & C++ sources and header files, except those in the
# 'config' directory and generated files, such as H5LTanalyze.c, etc.
#
# Note that any files or directories that are excluded here should also be
# added to the 'exclude' list in .github/workflows/clang-format-check.yml
#
# (Remember to update both bin/format_source and bin/format_source_patch)

find . -type d \( -path ./config \) -prune \
-o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
-or \( \( \! \( \
-name H5LTanalyze.c \
-or -name H5LTparse.c \
-or -name H5LTparse.h \
-or -name H5Epubgen.h \
-or -name H5Einit.h \
-or -name H5Eterm.h \
-or -name H5Edefin.h \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
| xargs clang-format -style=file -i -fallback-style=none

exit 0
exit 0
24 changes: 22 additions & 2 deletions bin/format_source_patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/bin/bash
#
# Recursively format all C & C++ sources and header files, except those in the
# 'config' directory and generated files, such as H5LTanalyze.c, etc.
#
# Note that any files or directories that are excluded here should also be
# added to the 'exclude' list in .github/workflows/clang-format-check.yml
#
# (Remember to update both bin/format_source and bin/format_source_patch)

find . -type d \( -path ./config \) -prune \
-o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
-or \( \( \! \( \
-name H5LTanalyze.c \
-or -name H5LTparse.c \
-or -name H5LTparse.h \
-or -name H5Epubgen.h \
-or -name H5Einit.h \
-or -name H5Eterm.h \
-or -name H5Edefin.h \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
| xargs clang-format -style=file -i -fallback-style=none

git diff > clang_format.patch
Expand All @@ -11,4 +31,4 @@ then
rm clang_format.patch
fi

exit 0
exit 0
29 changes: 19 additions & 10 deletions bin/genparser
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /bin/bash
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
Expand Down Expand Up @@ -200,25 +200,29 @@ if [ "$verbose" = true ] ; then
fi
${HDF5_FLEX} --nounistd -PH5LTyy -o ${path_to_hl_src}/H5LTanalyze.c ${path_to_hl_src}/H5LTanalyze.l

# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
# instead of int. Currently the generated function H5LTyyparse is
# fix H5LTparse.c and H5LTlparse.h to declare H5LTyyparse return type as an
# hid_t instead of int. Currently the generated function H5LTyyparse is
# generated with a return value of type int, which is a mapping to the
# flex yyparse function. The return value in the HL library should be
# an hid_t.
# I propose to not use flex to generate this function, but for now I am
# an hid_t.
# I propose to not use flex to generate this function, but for now I am
# adding a perl command to find and replace this function declaration in
# H5LTparse.c.
perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.c
perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.h
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.h
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.h

# Add code that disables warnings in the flex/bison-generated code.
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
do
echo '#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__ ' >> tmp.out
echo '#if defined (__GNUC__) ' >> tmp.out
echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
Expand All @@ -230,11 +234,16 @@ do
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
echo '#endif ' >> tmp.out
echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wnull-dereference" ' >> tmp.out
echo '#endif ' >> tmp.out
echo '#elif defined __SUNPRO_CC ' >> tmp.out
echo '#pragma disable_warn ' >> tmp.out
echo '#elif defined _MSC_VER ' >> tmp.out
Expand Down
2 changes: 1 addition & 1 deletion bin/h5vers
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use strict;
# If you do not have access to either file, you may request a copy from
# [email protected].
#
# Robb Matzke <[email protected]>
# Robb Matzke
# 17 July 1998

### Purpose
Expand Down
8 changes: 3 additions & 5 deletions bin/pkgscrpts/h5rmflags
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
# [email protected].
#

## This script wasextracted from h5redeploy to find hdf5 compile scripts and
## remove build paths from hdf5 compile scripts. Script is intended to be
## called from the make18xxTarFiles.pl script, so it could be stripped of options.
## Actions are predetermined and written in this script instead of in a command
## file.
## Remove paths to libraries used to build HDF5 when packaging HDF5
## binaries.
## For help page, use "h5rmflags -help"

# Constants definitions
EXIT_SUCCESS=0
Expand Down
Loading

0 comments on commit df55924

Please sign in to comment.