From 1dbacc8377754e33e8088ad6c7895a5f68bf7dfb Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Mon, 20 Jul 1998 11:05:43 -0500 Subject: [svn-r517] Changes since 19980720 ---------------------- ./bin/release The archive names have only three parts to a version number. Instead of `hdf5-1.2.3d.tar.gz' they will be named like `hdf5-1.2.3.tar.gz'. ./src/H5public.h ./src/H5.c Dropped the patch level from the version number. The version number is now a major number, a minor number, and a release number. ./doc/html/Version.html Updated to get rid of patch numbers. ./tools/h5repart.c Added a `-V' flag like for `h5ls' that prints the version number. --- README | 2 +- bin/release | 20 ++++++++------------ doc/html/Version.html | 42 +++++++++++++++++------------------------- src/H5.c | 23 ++++++++++------------- src/H5public.h | 17 +++++++---------- tools/h5ls.c | 2 +- tools/h5repart.c | 25 ++++++++++++++++--------- 7 files changed, 60 insertions(+), 71 deletions(-) diff --git a/README b/README index 6bec113..183a6c8 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is hdf5-1.0.24a released on 1998-06-20 14:23 UTC +This is hdf5-1.0.24 released on 1998-06-20 15:24 UTC Please refer to the INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/bin/release b/bin/release index 6a6af59..dab9fbe 100755 --- a/bin/release +++ b/bin/release @@ -15,40 +15,36 @@ use Cwd; $releases = "./releases"; # Directory for release tarballs ############################################################################## -# Read version info, return an array (MAJOR,MINOR,RELEASE,PATCHLEVEL) or -# a string "MAJOR.MINOR.RELEASE PATCHLEVEL" +# Read version info, return an array (MAJOR,MINOR,RELEASE) or +# a string "MAJOR.MINOR.RELEASE" # sub getver () { my @ver; - open SRC, "./src/H5public.h" or die "cannot read HDF5 version"; while () { $ver[0] = $1 if /define\s+H5_VERS_MAJOR\s+(\d+)/; $ver[1] = $1 if /define\s+H5_VERS_MINOR\s+(\d+)/; $ver[2] = $1 if /define\s+H5_VERS_RELEASE\s+(\d+)/; - $ver[3] = $1 if /define\s+H5_VERS_PATCH\s+(\d+)/; } close SRC; - wantarray ? @ver : "$ver[0].$ver[1].$ver[2]".chr(ord('a')+$ver[3]); + wantarray ? @ver : "$ver[0].$ver[1].$ver[2]"; } ############################################################################## # Set version information. Input is a string or an array. # -sub setver ($;$$$) { +sub setver ($;$$) { my @ver = @_; local $_; if ($ver[0]=~/\D/) { - @ver = $ver[0] =~ /^(\d+)\.(\d+)\.(\d+)([a-z])$/ or return ""; - $ver[3] = ord($ver[3])-ord('a'); + @ver = $ver[0] =~ /^(\d+)\.(\d+)\.(\d+)$/ or return ""; } $_ = `cat ./src/H5public.h`; s/(define\s+H5_VERS_MAJOR\s+)(\d+)/$1$ver[0]/; s/(define\s+H5_VERS_MINOR\s+)(\d+)/$1$ver[1]/; s/(define\s+H5_VERS_RELEASE\s+)(\d+)/$1$ver[2]/; - s/(define\s+H5_VERS_PATCH\s+)(\d+)/$1$ver[3]/; open SRC, "> ./src/H5public.h" or return ""; print SRC $_; close SRC; @@ -144,7 +140,7 @@ sub release (@) { # information. my $today = sprintf "19%02d-%02d-%02d %02d:%02d UTC", (gmtime)[5,4,3,2,1]; $_ = `cat README`; - s[^(This is hdf5-)\d+.\d+.\d+[a-z]( released on )(\d+-?){3} \d+:\d+ UTC] + s[^(This is hdf5-)\d+.\d+.\d+( released on )(\d+-?){3} \d+:\d+ UTC] [$1$ver$2$today]s; system ("cp -p README README~"); open README, ">README" or die "unable to open README: $!\n"; @@ -214,9 +210,9 @@ sub release (@) { # Update version info if ($batch) { - my ($v1,$v2,$v3,$v4) = $ver =~ /^(\d+)\.(\d+)\.(\d+)([a-z])$/; + my ($v1,$v2,$v3) = $ver =~ /^(\d+)\.(\d+)\.(\d+)$/; $v3 += 1; - setver ($ver = "$v1.$v2.${v3}a") or die "cannot set version"; + setver ($ver = "$v1.$v2.$v3") or die "cannot set version"; print "Development version set to $ver\n"; } else { print <1. Introduction -

The HDF5 version number is a set of three integer values and - one lower-case letter written as, for example, - hdf5-1.2.0a. +

The HDF5 version number is a set of three integer values + written as either hdf5-1.2.3 or hdf5 version + 1.2 release 3.

The 5 is part of the library name and will only change if the entire file format and library are redesigned @@ -19,7 +19,7 @@

The 1 is the major version number and changes when there is an extensive change to the file format or - library. Such a change will likely require files to be + library API. Such a change will likely require files to be translated and applications to be modified. This number is not expected to change frequently. @@ -29,25 +29,17 @@ library while odd numbers are reserved for developement versions. See the diagram below for examples. -

The 0 is the release number. For public +

The 3 is the release number. For public versions of the library, the release number is incremented each - time a bug(s) is fixed and the fix is made available to the - public. For development versions, the release number is - incremented automatically each time a CVS commit occurs anywhere - in the source tree. - -

The a is the patch level and is used only - for public versions. It's incremented only for very minor - changes that don't affect the usability of the library. For - instance, fixing spelling errors, changing warning messages, or - updating documentation. + time a bug is fixed and the fix is made available to the public. + For development versions, the release number is incremented more + often (perhaps almost daily).

2. Abbreviated Versions

-

It's often convenient to drop the patch level and release - number when referring to a version of the library, like saying - version 1.2 of HDF5. The release number and patch level can be - any value in this case. +

It's often convenient to drop the release number when referring + to a version of the library, like saying version 1.2 of HDF5. + The release number can be any value in this case.

3. Special Versions

@@ -58,6 +50,9 @@ versions were made available to people outside the core HDF5 development team. +

Version 1.0.23 was released mid-July as a second alpha + version. +

Version 1.1.0 will be the first official beta release but the 1.1 branch will also serve as a development branch since we're not concerned about providing bug fixes separate from normal @@ -95,14 +90,12 @@

H5_VERS_MAJOR
H5_VERS_MINOR
H5_VERS_RELEASE -
H5_VERS_PATCH
These preprocessor constants are defined in the public include file and determine the version of the include files.

herr_t H5version (unsigned *majnum, unsigned - *minnum, unsigned *relnum, unsigned - *patnum) + *minnum, unsigned *relnum)
This function returns through its arguments the version numbers for the library to which the application is linked. @@ -120,8 +113,7 @@

herr_t H5vers_check (unsigned majnum, - unsigned minnum, unsigned relnum, unsigned - patnum) + unsigned minnum, unsigned relnum)
This function is called by the H5check() macro with the include file version constants. The function compares its arguments to the result returned by @@ -133,7 +125,7 @@
Robb Matzke
-Last modified: Wed Apr 22 12:19:53 EDT 1998 +Last modified: Mon Jul 20 11:42:20 EDT 1998 diff --git a/src/H5.c b/src/H5.c index c521ea0..9b52dfa 100644 --- a/src/H5.c +++ b/src/H5.c @@ -304,11 +304,12 @@ H5dont_atexit(void) * * Purpose: Returns the library version numbers through arguments. MAJNUM * will be the major revision number of the library, MINNUM the - * minor revision number, RELNUM the release revision number, - * and PATNUM the patch revision number. + * minor revision number, and RELNUM the release revision number. * * Note: When printing an HDF5 version number it should be printed as - * `printf ("HDF5-%d.%d.%d%c", maj, min, rel, 'a'+patch)'. + * + * printf("%u.%u.%u", maj, min, rel) or + * printf("version %u.%u release %u", maj, min, rel) * * Return: Success: SUCCEED * @@ -324,8 +325,7 @@ H5dont_atexit(void) *------------------------------------------------------------------------- */ herr_t -H5version(unsigned *majnum, unsigned *minnum, unsigned *relnum, - unsigned *patnum) +H5version(unsigned *majnum, unsigned *minnum, unsigned *relnum) { herr_t ret_value = SUCCEED; @@ -335,7 +335,6 @@ H5version(unsigned *majnum, unsigned *minnum, unsigned *relnum, if (majnum) *majnum = H5_VERS_MAJOR; if (minnum) *minnum = H5_VERS_MINOR; if (relnum) *relnum = H5_VERS_RELEASE; - if (patnum) *patnum = H5_VERS_PATCH; FUNC_LEAVE(ret_value); } @@ -362,22 +361,20 @@ H5version(unsigned *majnum, unsigned *minnum, unsigned *relnum, *------------------------------------------------------------------------- */ herr_t -H5vers_check (unsigned majnum, unsigned minnum, unsigned relnum, - unsigned patnum) +H5vers_check (unsigned majnum, unsigned minnum, unsigned relnum) { /* Don't initialize the library quite yet */ if (H5_VERS_MAJOR!=majnum || H5_VERS_MINOR!=minnum || - H5_VERS_RELEASE!=relnum || H5_VERS_PATCH!=patnum) { + H5_VERS_RELEASE!=relnum) { fputs ("Warning! The HDF5 header files included by this application " "do not match the\nversion used by the HDF5 library to which " "this application is linked. Data\ncorruption or segmentation " "faults would be likely if the application were\nallowed to " "continue.\n", stderr); - fprintf (stderr, "Headers are %u.%u.%u%c, library is %u.%u.%u%c\n", - majnum, minnum, relnum, 'a'+patnum, - H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, - 'a'+H5_VERS_PATCH); + fprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", + majnum, minnum, relnum, + H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); fputs ("Bye...\n", stderr); abort (); } diff --git a/src/H5public.h b/src/H5public.h index eb78630..3caf7cf 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -25,13 +25,12 @@ #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface changes */ -#define H5_VERS_MINOR 0 /* For minor interface changes */ -#define H5_VERS_RELEASE 24 /* For interface tweaks & bug-fixes */ -#define H5_VERS_PATCH 0 /* For small groups of bug fixes */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MINOR 0 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 24 /* For tweaks, bug-fixes, or development */ -#define H5check() H5vers_check(H5_VERS_MAJOR,H5_VERS_MINOR,\ - H5_VERS_RELEASE, H5_VERS_PATCH) +#define H5check() H5vers_check(H5_VERS_MAJOR,H5_VERS_MINOR, \ + H5_VERS_RELEASE) /* * Status return values. Failed integer functions in HDF5 result almost @@ -83,10 +82,8 @@ extern "C" { herr_t H5open (void); herr_t H5close (void); herr_t H5dont_atexit (void); -herr_t H5version (unsigned *majnum, unsigned *minnum, unsigned *relnum, - unsigned *patnum); -herr_t H5vers_check (unsigned majnum, unsigned minnum, unsigned relnum, - unsigned patnum); +herr_t H5version (unsigned *majnum, unsigned *minnum, unsigned *relnum); +herr_t H5vers_check (unsigned majnum, unsigned minnum, unsigned relnum); #ifdef __cplusplus } diff --git a/tools/h5ls.c b/tools/h5ls.c index f6e3de7..f7e9b76 100644 --- a/tools/h5ls.c +++ b/tools/h5ls.c @@ -45,7 +45,7 @@ usage: %s [OPTIONS] FILE [GROUP]\n\ OPTIONS\n\ -h, -?, --help Print a usage message and exit\n\ -v, --verbose Generate more verbose output\n\ - --version Print version number and exit\n\ + -V, --version Print version number and exit\n\ FILE\n\ The file name may include a printf(3C) integer format such as\n\ \"%%05d\" to open a file family.\n\ diff --git a/tools/h5repart.c b/tools/h5repart.c index 8faa9ea..75dae80 100644 --- a/tools/h5repart.c +++ b/tools/h5repart.c @@ -47,15 +47,18 @@ static void usage (const char *progname) { - fprintf (stderr, "usage: %s [-[b|m] N[g|m|k]] SRC DST\n", progname); - fprintf (stderr, " -b N The I/O block size, defaults to 1kB\n"); - fprintf (stderr, " -m N The destination member size or 1GB\n"); - fprintf (stderr, " SRC The name of the source file\n"); - fprintf (stderr, " DST The name of the destination files\n"); - fprintf (stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or " - "`k' for kB.\n"); - fprintf (stderr, "File family names include an integer printf " - "format such as `%%d'\n"); + fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] SRC DST\n", + progname); + fprintf(stderr, " -v Produce verbose output\n"); + fprintf(stderr, " -V Print a version number and exit\n"); + fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n"); + fprintf(stderr, " -m N The destination member size or 1GB\n"); + fprintf(stderr, " SRC The name of the source file\n"); + fprintf(stderr, " DST The name of the destination files\n"); + fprintf(stderr, "Sizes may be suffixed with `g' for GB, `m' for MB or " + "`k' for kB.\n"); + fprintf(stderr, "File family names include an integer printf " + "format such as `%%d'\n"); exit (1); } @@ -184,6 +187,10 @@ main (int argc, char *argv[]) if (!strcmp (argv[argno], "-v")) { verbose = TRUE; argno++; + } else if (!strcmp(argv[argno], "-V")) { + printf("This is %s version %u.%u release %u\n", + prog_name, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + exit(0); } else if ('b'==argv[argno][1]) { blk_size = get_size (prog_name, &argno, argc, argv); } else if ('m'==argv[argno][1]) { -- cgit v0.12