[udunits] 01/01: release 2.2.25
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Jul 18 08:26:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to tag upstream/2.2.25
in repository udunits.
commit 0868f43914ee52467fbbb761283c18e8aaf68d72
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Jul 18 09:26:00 2017 +0100
release 2.2.25
---
CHANGE_LOG | 68 +++-
CMakeLists.txt | 2 +-
configure | 20 +-
configure.ac | 2 +-
lib/Makefile.am | 53 +--
lib/Makefile.in | 30 +-
lib/c99_snprintf.c | 34 ++
lib/parser.c | 858 +++++++++++++++++++++---------------------------
lib/scanner.c | 30 +-
lib/scanner.l | 2 +-
lib/systemMap.c | 2 +-
lib/testUnits-1.c | 14 +
lib/testUnits.c | 26 +-
lib/tsearch.c | 113 +++++++
lib/tsearch.h | 14 +
lib/udunits-1.c | 59 +++-
lib/udunits2-common.xml | 14 +
lib/udunits2lib.pdf | Bin 270660 -> 270660 bytes
lib/unitcore.c | 108 ++----
lib/xml.c | 37 ++-
prog/Makefile.am | 3 +-
prog/Makefile.in | 3 +-
prog/XGetopt.c | 214 ++++++++++++
prog/XGetopt.h | 40 +++
prog/udunits2prog.pdf | Bin 71512 -> 71512 bytes
stamp-vti | 8 +-
udunits2.html | 10 +-
udunits2.info | 4 +-
udunits2.pdf | Bin 117911 -> 118100 bytes
version.texi | 8 +-
30 files changed, 1084 insertions(+), 692 deletions(-)
diff --git a/CHANGE_LOG b/CHANGE_LOG
index b45a27f..214c3d4 100644
--- a/CHANGE_LOG
+++ b/CHANGE_LOG
@@ -1,4 +1,42 @@
-2.2.20
+2.2.25 2017-05-16T10:17:38-0600
+ Corrected temporal decomposition algorithm in ut_decode_time(). It
+ incorrectly returned a seconds value of 59.999999999998778 when decomposing
+ the input value -3240.0. It now returns a seconds value of 0 and correctly
+ increments the minutes value.
+
+ Added missing UDUNITS-1 files to the distribution ("lib/udunits.h" and
+ "lib/udunits-1.c").
+
+ Removed some lint(1) reported by whatever compiler AppVeyor uses.
+
+ Told git(1) to ignore "lib/scanner.c", "stamp-vti", and "version.texi".
+
+2.2.24 2017-01-24T14:42:49-0700
+ Added (against my better judgment) the unit "ppv". Use "1" instead and call
+ the physical quantity "volume fraction".
+
+ Fixed utCalendar() in the UDUNITS-1 interface returning 60 seconds.
+
+ Added ./push(1) for pushing commits to the remote repository. Removed all
+ git(1) hooks.
+
+2.2.23 2017-01-20T11:06:47-0700
+ Added missing comma to snprintf() call under Windows.
+
+2.2.22 2017-01-20T10:44:10-0700
+ Added missing files to distribution for building on Windows:
+ lib/c99_snprintf.c
+ lib/tsearch.c
+ lib/tsearch.h
+ prog/XGetopt.c
+ prog/XGetopt.h
+
+2.2.21 2017-01-07T10:51:38-0700
+ Units Database:
+ Corrected construction of the pathname of an imported database file
+ under Windows.
+
+2.2.20 2015-10-22T16:00:54-0600
Building:
Add Ward Fisher's modifications for better portability.
@@ -73,7 +111,7 @@
2.2.7 2014-04-16T09:05:47-0600
Documentation:
Added more instances when ut_free() should be called.
-
+
Added hyperlinks for functions in the synopsis section.
2.2.6 2014-04-08T12:57:50-0600
@@ -110,31 +148,31 @@
New Features:
Program udunits2(1):
Added "-H have" and "-W want" options.
-
+
Added support for numeric unit amount so that "0 degC" equals "32
degF".
-
+
Library udunits2(3):
Added ut_get_path_xml() to retrieve pathname of XML unit database.
-
+
Units Database:
Added units "molecule" (for conversion with "mole") and "bit".
Misc:
Removed bundled EXPAT package.
-
+
Ported code to 32-bit Windows-7 under MinGW.
-
+
Added explicit chapters on the unit utility and unit library to the
top-level package documentation.
Bug Fixes:
Library udunits2(3):
Corrected logic of checking for location of <noplural> element.
-
+
Units Database:
Corrected ISO Latin-1 encodings that somehow got corrupted.
-
+
Release Engineering:
Added support for building by CMake and for creating binary
distributions by CPack.
@@ -143,19 +181,19 @@
Misc:
Removed bundled EXPAT package.
-
+
Ported code to 32-bit Windows-7 under MinGW.
-
+
Added explicit chapters on the unit utility and unit library to the
top-level package documentation.
Bug Fixes:
Library udunits2(3):
Corrected logic of checking for location of <noplural> element.
-
+
Units Database:
Corrected ISO Latin-1 encodings that somehow got corrupted.
-
+
Release Engineering:
Added support for building by CMake and for creating binary
distributions by CPack.
@@ -165,11 +203,11 @@
Added acceptance-test scripts for 32-bit Ubuntu 12 (Precise Pangolin)
and 32-bit Windows-7. Currently, only the Ubuntu script is used in the
continuous-delivery pipeline.
-
+
Misc:
Changed file LICENSE to COPYRIGHT and corrected copyright year in many
files.
-
+
Refactored the documentation to make it more version aware.
2.1.24 2011-09-12 15:01-600
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23c3713..68c7b52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(VERSION_MAJOR 2)
SET(VERSION_MINOR 2)
-SET(VERSION_PATCH 20)
+SET(VERSION_PATCH 23)
# Ensure a path in the format common to both Unix and MinGW.
FUNCTION(to_common_path input result)
diff --git a/configure b/configure
index d4d33f8..81a498d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for UDUNITS 2.2.20.
+# Generated by GNU Autoconf 2.68 for UDUNITS 2.2.25.
#
# Report bugs to <support-udunits at unidata.ucar.edu>.
#
@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='UDUNITS'
PACKAGE_TARNAME='udunits'
-PACKAGE_VERSION='2.2.20'
-PACKAGE_STRING='UDUNITS 2.2.20'
+PACKAGE_VERSION='2.2.25'
+PACKAGE_STRING='UDUNITS 2.2.25'
PACKAGE_BUGREPORT='support-udunits at unidata.ucar.edu'
PACKAGE_URL=''
@@ -1310,7 +1310,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures UDUNITS 2.2.20 to adapt to many kinds of systems.
+\`configure' configures UDUNITS 2.2.25 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1380,7 +1380,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of UDUNITS 2.2.20:";;
+ short | recursive ) echo "Configuration of UDUNITS 2.2.25:";;
esac
cat <<\_ACEOF
@@ -1493,7 +1493,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-UDUNITS configure 2.2.20
+UDUNITS configure 2.2.25
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by UDUNITS $as_me 2.2.20, which was
+It was created by UDUNITS $as_me 2.2.25, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2817,7 +2817,7 @@ fi
# Define the identity of the package.
PACKAGE='udunits'
- VERSION='2.2.20'
+ VERSION='2.2.25'
cat >>confdefs.h <<_ACEOF
@@ -15896,7 +15896,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by UDUNITS $as_me 2.2.20, which was
+This file was extended by UDUNITS $as_me 2.2.25, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15962,7 +15962,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-UDUNITS config.status 2.2.20
+UDUNITS config.status 2.2.25
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 2b86e0e..132cdf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@
#
AC_PREREQ(2.59)
-AC_INIT([UDUNITS], [2.2.20], [support-udunits at unidata.ucar.edu])
+AC_INIT([UDUNITS], [2.2.25], [support-udunits at unidata.ucar.edu])
AC_CONFIG_SRCDIR([lib/converter.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3863e81..093cbea 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -7,18 +7,19 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = xmlFailures xmlSuccesses
lib_LTLIBRARIES = libudunits2.la
-EXTRA_DIST = tsearch.c tsearch.h
-libudunits2_la_SOURCES = unitcore.c converter.c formatter.c \
- idToUnitMap.c idToUnitMap.h \
- unitToIdMap.c unitToIdMap.h \
- unitAndId.c unitAndId.h \
- systemMap.c systemMap.h \
- prefix.c prefix.h \
- parser.y \
- status.c \
- xml.c \
- error.c \
- ut_free_system.c
+libudunits2_la_SOURCES = unitcore.c \
+ converter.c \
+ formatter.c \
+ idToUnitMap.c idToUnitMap.h \
+ unitToIdMap.c unitToIdMap.h \
+ unitAndId.c unitAndId.h \
+ systemMap.c systemMap.h \
+ prefix.c prefix.h \
+ parser.y \
+ status.c \
+ xml.c \
+ error.c \
+ ut_free_system.c
BUILT_SOURCES = parser.c scanner.c
pkgdata_DATA = \
udunits2.xml \
@@ -40,19 +41,21 @@ LEX_OUTPUT_ROOT = lex.$(lex_prefix)
LFLAGS = -d -P$(lex_prefix)
include_HEADERS = udunits2.h converter.h
-EXTRA_DIST = \
- CMakeLists.txt \
- parser.c \
- scanner.l \
- scanner.c \
- udunits2.xml \
- udunits2-accepted.xml \
- udunits2-base.xml \
- udunits2-common.xml \
- udunits2-derived.xml \
- udunits2-prefixes.xml \
- udunits2lib.html \
- udunits2lib.pdf
+EXTRA_DIST = c99_snprintf.c \
+ CMakeLists.txt \
+ parser.c \
+ scanner.l \
+ scanner.c \
+ tsearch.c tsearch.h \
+ udunits-1.c udunits.h \
+ udunits2.xml \
+ udunits2-accepted.xml \
+ udunits2-base.xml \
+ udunits2-common.xml \
+ udunits2-derived.xml \
+ udunits2-prefixes.xml \
+ udunits2lib.html \
+ udunits2lib.pdf
AM_YFLAGS = -t -p ut
if HAVE_CUNIT
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 33fa2d9..698c82c 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -315,20 +315,6 @@ top_srcdir = @top_srcdir@
#
SUBDIRS = xmlFailures xmlSuccesses
lib_LTLIBRARIES = libudunits2.la
-EXTRA_DIST = \
- CMakeLists.txt \
- parser.c \
- scanner.l \
- scanner.c \
- udunits2.xml \
- udunits2-accepted.xml \
- udunits2-base.xml \
- udunits2-common.xml \
- udunits2-derived.xml \
- udunits2-prefixes.xml \
- udunits2lib.html \
- udunits2lib.pdf
-
libudunits2_la_SOURCES = unitcore.c converter.c formatter.c \
idToUnitMap.c idToUnitMap.h unitToIdMap.c unitToIdMap.h \
unitAndId.c unitAndId.h systemMap.c systemMap.h prefix.c \
@@ -353,6 +339,22 @@ libudunits2_la_LDFLAGS = -version-number 0:1:0
lex_prefix = ut
LFLAGS = -d -P$(lex_prefix)
include_HEADERS = udunits2.h converter.h $(am__append_2)
+EXTRA_DIST = c99_snprintf.c \
+ CMakeLists.txt \
+ parser.c \
+ scanner.l \
+ scanner.c \
+ tsearch.c tsearch.h \
+ udunits-1.c udunits.h \
+ udunits2.xml \
+ udunits2-accepted.xml \
+ udunits2-base.xml \
+ udunits2-common.xml \
+ udunits2-derived.xml \
+ udunits2-prefixes.xml \
+ udunits2lib.html \
+ udunits2lib.pdf
+
AM_YFLAGS = -t -p ut
@HAVE_CUNIT_FALSE at LDADD = @LIBS@
@HAVE_CUNIT_TRUE at LDADD = \
diff --git a/lib/c99_snprintf.c b/lib/c99_snprintf.c
new file mode 100644
index 0000000..8aa4098
--- /dev/null
+++ b/lib/c99_snprintf.c
@@ -0,0 +1,34 @@
+/*! c99_snprintf class for use with Visual Studio.
+
+ MSVC does not implement snprintf, so we must provide our own.
+
+ The following is adapted from:
+
+ http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
+*/
+
+#include "udunits2.h"
+
+int c99_snprintf(char* str, size_t size, const char* format, ...)
+{
+ int count;
+ va_list ap;
+
+ va_start(ap, format);
+ count = c99_vsnprintf(str, size, format, ap);
+ va_end(ap);
+
+ return count;
+}
+
+int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
+{
+ int count = -1;
+
+ if (size != 0)
+ count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
+ if (count == -1)
+ count = _vscprintf(format, ap);
+
+ return count;
+}
diff --git a/lib/parser.c b/lib/parser.c
index 2e42db6..3ffbea6 100644
--- a/lib/parser.c
+++ b/lib/parser.c
@@ -1,21 +1,24 @@
-/* A Bison parser, made by GNU Bison 2.5. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -26,7 +29,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +47,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.5"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -52,28 +55,57 @@
/* Pure parsers. */
#define YYPURE 0
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse utparse
-#define yylex utlex
-#define yyerror uterror
-#define yylval utlval
-#define yychar utchar
-#define yydebug utdebug
-#define yynerrs utnerrs
+#define yyparse utparse
+#define yylex utlex
+#define yyerror uterror
+#define yylval utlval
+#define yychar utchar
+#define yydebug utdebug
+#define yynerrs utnerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ERR = 258,
+ SHIFT = 259,
+ MULTIPLY = 260,
+ DIVIDE = 261,
+ INT = 262,
+ EXPONENT = 263,
+ REAL = 264,
+ ID = 265,
+ DATE = 266,
+ CLOCK = 267,
+ TIMESTAMP = 268,
+ LOGREF = 269
+ };
+#endif
+/* Tokens. */
+#define ERR 258
+#define SHIFT 259
+#define MULTIPLY 260
+#define DIVIDE 261
+#define INT 262
+#define EXPONENT 263
+#define REAL 264
+#define ID 265
+#define DATE 266
+#define CLOCK 267
+#define TIMESTAMP 268
+#define LOGREF 269
+
-/* Copy the first part of user declarations. */
-/* Line 268 of yacc.c */
+/* Copy the first part of user declarations. */
#line 1 "parser.y"
/*
@@ -101,10 +133,12 @@
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
-#ifndef _MSC_VER
#include <string.h>
+
+#ifndef _MSC_VER
#include <strings.h>
#endif
+
#include "udunits2.h"
static ut_unit* _finalUnit; /* fully-parsed specification */
@@ -278,9 +312,6 @@ static int isTime(
-/* Line 268 of yacc.c */
-#line 283 "parser.c"
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -299,57 +330,29 @@ static int isTime(
# define YYTOKEN_TABLE 0
#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- ERR = 258,
- SHIFT = 259,
- MULTIPLY = 260,
- DIVIDE = 261,
- INT = 262,
- EXPONENT = 263,
- REAL = 264,
- ID = 265,
- DATE = 266,
- CLOCK = 267,
- TIMESTAMP = 268,
- LOGREF = 269
- };
-#endif
-
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+#line 203 "parser.y"
{
-
-/* Line 293 of yacc.c */
-#line 204 "parser.y"
-
char* id; /* identifier */
ut_unit* unit; /* "unit" structure */
double rval; /* floating-point numerical value */
long ival; /* integer numerical value */
-
-
-
-/* Line 293 of yacc.c */
-#line 342 "parser.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 193 of yacc.c. */
+#line 341 "parser.c"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
+
/* Copy the second part of user declarations. */
-/* Line 343 of yacc.c */
+/* Line 216 of yacc.c. */
#line 354 "parser.c"
#ifdef short
@@ -425,14 +428,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -453,11 +456,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# endif
@@ -480,24 +483,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -513,9 +516,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -526,27 +529,6 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
@@ -564,7 +546,24 @@ union yyalloc
while (YYID (0))
# endif
# endif
-#endif /* !YYCOPY_NEEDED */
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 15
@@ -649,10 +648,10 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 234, 234, 238, 242, 247, 250, 256, 262, 268,
- 276, 280, 288, 294, 302, 308, 316, 324, 327, 333,
- 339, 347, 400, 403, 409, 415, 421, 427, 430, 435,
- 438, 441, 444, 463, 466, 469
+ 0, 233, 233, 237, 241, 246, 249, 255, 261, 267,
+ 275, 279, 287, 293, 301, 307, 315, 323, 326, 332,
+ 338, 346, 399, 402, 408, 414, 420, 426, 429, 434,
+ 437, 440, 443, 462, 465, 468
};
#endif
@@ -696,8 +695,8 @@ static const yytype_uint8 yyr2[] =
2, 3, 3, 1, 2, 2
};
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
@@ -734,7 +733,8 @@ static const yytype_int8 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -26
static const yytype_int8 yytable[] =
{
@@ -750,12 +750,6 @@ static const yytype_int8 yytable[] =
4, 0, 0, 0, 5, 6
};
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-10))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
static const yytype_int8 yycheck[] =
{
0, 1, 0, 12, 4, 5, 6, 7, 8, 9,
@@ -793,18 +787,9 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
+ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -814,6 +799,7 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -855,10 +841,19 @@ while (YYID (0))
#endif
-/* This macro is provided for backward compatibility. */
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
@@ -962,20 +957,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -1009,11 +1001,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -1050,6 +1042,7 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
+
#if YYERROR_VERBOSE
@@ -1152,142 +1145,115 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = 0;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
+ int yyn = yypact[yystate];
- switch (yycount)
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
{
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
}
#endif /* YYERROR_VERBOSE */
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1319,9 +1285,10 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1337,16 +1304,18 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-/* The lookahead symbol. */
+
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
+
/*----------.
| yyparse. |
`----------*/
@@ -1373,37 +1342,14 @@ yyparse ()
#endif
#endif
{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
+
+ int yystate;
int yyn;
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -1411,28 +1357,51 @@ yyparse ()
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
@@ -1462,6 +1431,7 @@ yyparse ()
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
+
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -1469,6 +1439,7 @@ yyparse ()
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
+
&yystacksize);
yyss = yyss1;
@@ -1491,8 +1462,9 @@ yyparse ()
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1503,6 +1475,7 @@ yyparse ()
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1512,9 +1485,6 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -1523,16 +1493,16 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
+ if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1558,22 +1528,26 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1613,9 +1587,7 @@ yyreduce:
switch (yyn)
{
case 2:
-
-/* Line 1806 of yacc.c */
-#line 234 "parser.y"
+#line 233 "parser.y"
{
_finalUnit = ut_get_dimensionless_unit_one(_unitSystem);
YYACCEPT;
@@ -1623,9 +1595,7 @@ yyreduce:
break;
case 3:
-
-/* Line 1806 of yacc.c */
-#line 238 "parser.y"
+#line 237 "parser.y"
{
_finalUnit = (yyvsp[(1) - (1)].unit);
YYACCEPT;
@@ -1633,27 +1603,21 @@ yyreduce:
break;
case 4:
-
-/* Line 1806 of yacc.c */
-#line 242 "parser.y"
+#line 241 "parser.y"
{
YYABORT;
}
break;
case 5:
-
-/* Line 1806 of yacc.c */
-#line 247 "parser.y"
+#line 246 "parser.y"
{
(yyval.unit) = (yyvsp[(1) - (1)].unit);
}
break;
case 6:
-
-/* Line 1806 of yacc.c */
-#line 250 "parser.y"
+#line 249 "parser.y"
{
(yyval.unit) = ut_offset((yyvsp[(1) - (3)].unit), (yyvsp[(3) - (3)].rval));
ut_free((yyvsp[(1) - (3)].unit));
@@ -1663,9 +1627,7 @@ yyreduce:
break;
case 7:
-
-/* Line 1806 of yacc.c */
-#line 256 "parser.y"
+#line 255 "parser.y"
{
(yyval.unit) = ut_offset((yyvsp[(1) - (3)].unit), (yyvsp[(3) - (3)].ival));
ut_free((yyvsp[(1) - (3)].unit));
@@ -1675,9 +1637,7 @@ yyreduce:
break;
case 8:
-
-/* Line 1806 of yacc.c */
-#line 262 "parser.y"
+#line 261 "parser.y"
{
(yyval.unit) = ut_offset_by_time((yyvsp[(1) - (3)].unit), (yyvsp[(3) - (3)].rval));
ut_free((yyvsp[(1) - (3)].unit));
@@ -1687,9 +1647,7 @@ yyreduce:
break;
case 9:
-
-/* Line 1806 of yacc.c */
-#line 268 "parser.y"
+#line 267 "parser.y"
{
ut_status prev = ut_get_status();
ut_free((yyvsp[(1) - (3)].unit));
@@ -1699,9 +1657,7 @@ yyreduce:
break;
case 10:
-
-/* Line 1806 of yacc.c */
-#line 276 "parser.y"
+#line 275 "parser.y"
{
(yyval.unit) = (yyvsp[(1) - (1)].unit);
_isTime = isTime((yyval.unit));
@@ -1709,9 +1665,7 @@ yyreduce:
break;
case 11:
-
-/* Line 1806 of yacc.c */
-#line 280 "parser.y"
+#line 279 "parser.y"
{
(yyval.unit) = ut_multiply((yyvsp[(1) - (2)].unit), (yyvsp[(2) - (2)].unit));
_isTime = isTime((yyval.unit));
@@ -1723,9 +1677,7 @@ yyreduce:
break;
case 12:
-
-/* Line 1806 of yacc.c */
-#line 288 "parser.y"
+#line 287 "parser.y"
{
ut_status prev = ut_get_status();
ut_free((yyvsp[(1) - (2)].unit));
@@ -1735,9 +1687,7 @@ yyreduce:
break;
case 13:
-
-/* Line 1806 of yacc.c */
-#line 294 "parser.y"
+#line 293 "parser.y"
{
(yyval.unit) = ut_multiply((yyvsp[(1) - (3)].unit), (yyvsp[(3) - (3)].unit));
_isTime = isTime((yyval.unit));
@@ -1749,9 +1699,7 @@ yyreduce:
break;
case 14:
-
-/* Line 1806 of yacc.c */
-#line 302 "parser.y"
+#line 301 "parser.y"
{
ut_status prev = ut_get_status();
ut_free((yyvsp[(1) - (3)].unit));
@@ -1761,9 +1709,7 @@ yyreduce:
break;
case 15:
-
-/* Line 1806 of yacc.c */
-#line 308 "parser.y"
+#line 307 "parser.y"
{
(yyval.unit) = ut_divide((yyvsp[(1) - (3)].unit), (yyvsp[(3) - (3)].unit));
_isTime = isTime((yyval.unit));
@@ -1775,9 +1721,7 @@ yyreduce:
break;
case 16:
-
-/* Line 1806 of yacc.c */
-#line 316 "parser.y"
+#line 315 "parser.y"
{
ut_status prev = ut_get_status();
ut_free((yyvsp[(1) - (3)].unit));
@@ -1787,18 +1731,14 @@ yyreduce:
break;
case 17:
-
-/* Line 1806 of yacc.c */
-#line 324 "parser.y"
+#line 323 "parser.y"
{
(yyval.unit) = (yyvsp[(1) - (1)].unit);
}
break;
case 18:
-
-/* Line 1806 of yacc.c */
-#line 327 "parser.y"
+#line 326 "parser.y"
{
(yyval.unit) = ut_raise((yyvsp[(1) - (2)].unit), (yyvsp[(2) - (2)].ival));
ut_free((yyvsp[(1) - (2)].unit));
@@ -1808,9 +1748,7 @@ yyreduce:
break;
case 19:
-
-/* Line 1806 of yacc.c */
-#line 333 "parser.y"
+#line 332 "parser.y"
{
(yyval.unit) = ut_raise((yyvsp[(1) - (2)].unit), (yyvsp[(2) - (2)].ival));
ut_free((yyvsp[(1) - (2)].unit));
@@ -1820,9 +1758,7 @@ yyreduce:
break;
case 20:
-
-/* Line 1806 of yacc.c */
-#line 339 "parser.y"
+#line 338 "parser.y"
{
ut_status prev = ut_get_status();
ut_free((yyvsp[(1) - (2)].unit));
@@ -1832,9 +1768,7 @@ yyreduce:
break;
case 21:
-
-/* Line 1806 of yacc.c */
-#line 347 "parser.y"
+#line 346 "parser.y"
{
double prefix = 1;
ut_unit* unit = NULL;
@@ -1891,18 +1825,14 @@ yyreduce:
break;
case 22:
-
-/* Line 1806 of yacc.c */
-#line 400 "parser.y"
+#line 399 "parser.y"
{
(yyval.unit) = (yyvsp[(2) - (3)].unit);
}
break;
case 23:
-
-/* Line 1806 of yacc.c */
-#line 403 "parser.y"
+#line 402 "parser.y"
{
ut_status status = ut_get_status();
ut_free((yyvsp[(2) - (3)].unit));
@@ -1912,9 +1842,7 @@ yyreduce:
break;
case 24:
-
-/* Line 1806 of yacc.c */
-#line 409 "parser.y"
+#line 408 "parser.y"
{
(yyval.unit) = ut_log((yyvsp[(1) - (3)].rval), (yyvsp[(2) - (3)].unit));
ut_free((yyvsp[(2) - (3)].unit));
@@ -1924,9 +1852,7 @@ yyreduce:
break;
case 25:
-
-/* Line 1806 of yacc.c */
-#line 415 "parser.y"
+#line 414 "parser.y"
{
ut_status status = ut_get_status();
ut_free((yyvsp[(2) - (3)].unit));
@@ -1936,9 +1862,7 @@ yyreduce:
break;
case 26:
-
-/* Line 1806 of yacc.c */
-#line 421 "parser.y"
+#line 420 "parser.y"
{
(yyval.unit) = ut_scale((yyvsp[(1) - (1)].rval),
ut_get_dimensionless_unit_one(_unitSystem));
@@ -1946,54 +1870,42 @@ yyreduce:
break;
case 27:
-
-/* Line 1806 of yacc.c */
-#line 427 "parser.y"
+#line 426 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (1)].ival);
}
break;
case 28:
-
-/* Line 1806 of yacc.c */
-#line 430 "parser.y"
+#line 429 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (1)].rval);
}
break;
case 29:
-
-/* Line 1806 of yacc.c */
-#line 435 "parser.y"
+#line 434 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (1)].rval);
}
break;
case 30:
-
-/* Line 1806 of yacc.c */
-#line 438 "parser.y"
+#line 437 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (2)].rval) + (yyvsp[(2) - (2)].rval);
}
break;
case 31:
-
-/* Line 1806 of yacc.c */
-#line 441 "parser.y"
+#line 440 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (3)].rval) + ((yyvsp[(2) - (3)].rval) - (yyvsp[(3) - (3)].rval));
}
break;
case 32:
-
-/* Line 1806 of yacc.c */
-#line 444 "parser.y"
+#line 443 "parser.y"
{
int error = 0;
@@ -2016,27 +1928,21 @@ yyreduce:
break;
case 33:
-
-/* Line 1806 of yacc.c */
-#line 463 "parser.y"
+#line 462 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (1)].rval);
}
break;
case 34:
-
-/* Line 1806 of yacc.c */
-#line 466 "parser.y"
+#line 465 "parser.y"
{
(yyval.rval) = (yyvsp[(1) - (2)].rval) - (yyvsp[(2) - (2)].rval);
}
break;
case 35:
-
-/* Line 1806 of yacc.c */
-#line 469 "parser.y"
+#line 468 "parser.y"
{
int error = 0;
@@ -2059,22 +1965,10 @@ yyreduce:
break;
-
-/* Line 1806 of yacc.c */
-#line 2065 "parser.c"
+/* Line 1267 of yacc.c. */
+#line 1967 "parser.c"
default: break;
}
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -2083,6 +1977,7 @@ yyreduce:
*++yyvsp = yyval;
+
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -2102,10 +1997,6 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -2113,36 +2004,37 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
{
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
}
-# undef YYSYNTAX_ERROR
#endif
}
@@ -2150,7 +2042,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -2167,7 +2059,7 @@ yyerrlab:
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2201,7 +2093,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
+ if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2224,6 +2116,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
@@ -2248,7 +2143,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2259,14 +2154,9 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
@@ -2290,9 +2180,7 @@ yyreturn:
}
-
-/* Line 2067 of yacc.c */
-#line 490 "parser.y"
+#line 489 "parser.y"
#define yymaxdepth utmaxdepth
diff --git a/lib/scanner.c b/lib/scanner.c
index 870f941..10df962 100644
--- a/lib/scanner.c
+++ b/lib/scanner.c
@@ -97,6 +97,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -127,8 +128,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
/* %endif */
@@ -203,15 +202,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -978,7 +969,7 @@ char *uttext;
* @retval DATE Success
* @retval ERR Error
*/
-static double decodeDate(
+static int decodeDate(
const char* const text,
const char* const format,
double* const date)
@@ -1039,7 +1030,7 @@ static int decodeReal(
}
-#line 1043 "scanner.c"
+#line 1034 "scanner.c"
#define INITIAL 0
#define ID_SEEN 1
@@ -1154,12 +1145,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1183,7 +1169,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( utin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1297,7 +1283,7 @@ YY_DECL
_restartScanner = 0;
}
-#line 1301 "scanner.c"
+#line 1287 "scanner.c"
if ( !(yy_init) )
{
@@ -1664,7 +1650,7 @@ YY_RULE_SETUP
#line 342 "scanner.l"
ECHO;
YY_BREAK
-#line 1668 "scanner.c"
+#line 1654 "scanner.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ID_SEEN):
case YY_STATE_EOF(SHIFT_SEEN):
@@ -2533,8 +2519,8 @@ YY_BUFFER_STATE ut_scan_string (yyconst char * yystr )
/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to utlex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
diff --git a/lib/scanner.l b/lib/scanner.l
index 2fa05e1..85c6623 100644
--- a/lib/scanner.l
+++ b/lib/scanner.l
@@ -32,7 +32,7 @@
* @retval DATE Success
* @retval ERR Error
*/
-static double decodeDate(
+static int decodeDate(
const char* const text,
const char* const format,
double* const date)
diff --git a/lib/systemMap.c b/lib/systemMap.c
index 1f2dcc3..ee865b9 100644
--- a/lib/systemMap.c
+++ b/lib/systemMap.c
@@ -100,7 +100,7 @@ smFind(
Entry** treeEntry;
targetEntry.system = system;
- treeEntry = tfind(&targetEntry, &map->tree, compareEntries);
+ treeEntry = tfind(&targetEntry, (void**)&map->tree, compareEntries);
return
treeEntry == NULL
diff --git a/lib/testUnits-1.c b/lib/testUnits-1.c
index 2ab5e5f..8af03c4 100644
--- a/lib/testUnits-1.c
+++ b/lib/testUnits-1.c
@@ -97,6 +97,20 @@ test_utCalendar(void)
CU_ASSERT_EQUAL(hour, 0);
CU_ASSERT_EQUAL(minute, 0);
CU_ASSERT_EQUAL(second, 1);
+ utFree(&unit);
+
+ utIni(&unit);
+ CU_ASSERT_EQUAL(utScan("hours since 1901-01-01 00:00:00", &unit), 0);
+ (void)utCalendar(876595, &unit, &year, &month, &day, &hour, &minute,
+ &second);
+ (void)printf(" Decoded date and time: %d-%02d-%02d %02d:%02d:%.7g UTC\n",
+ year, month, day, hour, minute, second);
+ CU_ASSERT_EQUAL(year, 2000);
+ CU_ASSERT_EQUAL(month, 12);
+ CU_ASSERT_EQUAL(day, 31);
+ CU_ASSERT_EQUAL(hour, 19);
+ CU_ASSERT_EQUAL(minute, 0);
+ utFree(&unit);
}
diff --git a/lib/testUnits.c b/lib/testUnits.c
index 59a27dc..19b9031 100644
--- a/lib/testUnits.c
+++ b/lib/testUnits.c
@@ -322,9 +322,13 @@ test_utToString(void)
CU_ASSERT_PTR_NOT_NULL(unit);
CU_ASSERT(ut_format(unit, buf, sizeof(buf), asciiSymbolDef) != -1);
CU_ASSERT_STRING_EQUAL(buf, string);
+ if (strcmp(buf, string))
+ printf("%d: buf=%s\n", __LINE__, buf);
n = ut_format(unit, buf, 1, asciiSymbolDef);
CU_ASSERT_EQUAL(n, strlen(string));
+ if (n != strlen(string))
+ printf("%d: n=%d\n", __LINE__, n);
ut_free(unit);
}
@@ -1460,6 +1464,8 @@ test_utOffsetByTime(void)
CU_ASSERT_TRUE_FATAL(nchar < sizeof(buf));
buf[nchar] = 0;
CU_ASSERT_STRING_EQUAL(buf, "s @ 19700101T000000.0000000 UTC");
+ if (strcmp(buf, "s @ 19700101T000000.0000000 UTC"))
+ fprintf(stderr, "buf=%s\n", buf);
minutesSinceTheMillenium =
ut_offset_by_time(minute, ut_encode_time(2001, 1, 1, 0, 0, 0));
@@ -1596,13 +1602,13 @@ test_utOffsetByTime(void)
}
unit = ut_parse(unitSystem,
- "second since 1970-01-01 0 +1", UT_ASCII);
+ "second since 1970-01-01 0 -1", UT_ASCII);
CU_ASSERT_PTR_NOT_NULL(unit);
if (unit) {
converter = ut_get_converter(unit, secondsSinceTheEpoch);
CU_ASSERT_PTR_NOT_NULL(converter);
if (converter) {
- CU_ASSERT_TRUE(areCloseDoubles(cv_convert_double(converter, 0), -3600));
+ CU_ASSERT_TRUE(areCloseDoubles(cv_convert_double(converter, 0), 3600));
cv_free(converter);
}
ut_free(unit);
@@ -1638,8 +1644,22 @@ test_ut_decode_time(void)
CU_ASSERT_EQUAL(minute1, minute2);
CU_ASSERT_EQUAL(second1, second2);
CU_ASSERT_EQUAL(resolution1, resolution2);
-}
+ /*
+ * User reported getting 60 seconds back from ut_decode_time() for a time
+ * value of -3240.0.
+ */
+ //timeval = ut_encode_time(2000, 12, 31, 23, 5, 60);
+ timeval = -3240.0;
+ ut_decode_time(timeval, &year2, &month2, &day2, &hour2, &minute2,
+ &second2, &resolution2);
+ CU_ASSERT_EQUAL(year2, 2000);
+ CU_ASSERT_EQUAL(month2, 12);
+ CU_ASSERT_EQUAL(day2, 31);
+ CU_ASSERT_EQUAL(hour2, 23);
+ CU_ASSERT_EQUAL(minute2, 6);
+ CU_ASSERT_EQUAL(second2, 0);
+}
static void
diff --git a/lib/tsearch.c b/lib/tsearch.c
new file mode 100644
index 0000000..a3ae70a
--- /dev/null
+++ b/lib/tsearch.c
@@ -0,0 +1,113 @@
+/*
+ * Tree search generalized from Knuth (6.2.2) Algorithm T just like
+ * the AT&T man page says.
+ *
+ * The node_t structure is for internal use only, lint doesn't grok it.
+ *
+ * Written by reading the System V Interface Definition, not the code.
+ *
+ * Totally public domain.
+ */
+/*LINTLIBRARY*/
+
+#include "tsearch.h"
+#include <stdlib.h>
+
+typedef struct node_t {
+ char *key;
+ struct node_t *left, *right;
+} node;
+
+/* find or insert datum into search tree */
+void *
+tsearch(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *))
+{
+ node *q;
+ char *key = (char *)vkey;
+ node **rootp = (node **)vrootp;
+
+ if (rootp == (struct node_t **)0)
+ return ((void *)0);
+ while (*rootp != (struct node_t *)0) { /* Knuth's T1: */
+ int r;
+
+ if ((r = (*compar)(key, (*rootp)->key)) == 0) /* T2: */
+ return ((void *)*rootp); /* we found it! */
+ rootp = (r < 0) ?
+ &(*rootp)->left : /* T3: follow left branch */
+ &(*rootp)->right; /* T4: follow right branch */
+ }
+ q = (node *) malloc(sizeof(node)); /* T5: key not found */
+ if (q != (struct node_t *)0) { /* make new node */
+ *rootp = q; /* link new node to old */
+ q->key = key; /* initialize new node */
+ q->left = q->right = (struct node_t *)0;
+ }
+ return ((void *)q);
+}
+/* find datum in search tree */
+void *
+tfind(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *))
+{
+
+ char *key = (char *)vkey;
+ node **rootp = (node **)vrootp;
+
+ if (rootp == (struct node_t **)0)
+ return ((void *)0);
+ while (*rootp != (struct node_t *)0) { /* Knuth's T1: */
+ int r;
+
+ if ((r = (*compar)(key, (*rootp)->key)) == 0) /* T2: */
+ return ((void *)*rootp); /* we found it! */
+ rootp = (r < 0) ?
+ &(*rootp)->left : /* T3: follow left branch */
+ &(*rootp)->right; /* T4: follow right branch */
+ }
+ return ((void *)0); /* T5: key not found */
+}
+
+
+/* delete node with given key */
+void *
+tdelete(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *))
+{
+ node **rootp = (node **)vrootp;
+ char *key = (char *)vkey;
+ node *p = (node *)1;
+ node *q;
+ node *r;
+ int cmp;
+
+ if (rootp == (struct node_t **)0 || *rootp == (struct node_t *)0)
+ return ((struct node_t *)0);
+ while ((cmp = (*compar)(key, (*rootp)->key)) != 0) {
+ p = *rootp;
+ rootp = (cmp < 0) ?
+ &(*rootp)->left : /* follow left branch */
+ &(*rootp)->right; /* follow right branch */
+ if (*rootp == (struct node_t *)0)
+ return ((void *)0); /* key not found */
+ }
+ r = (*rootp)->right; /* D1: */
+ if ((q = (*rootp)->left) == (struct node_t *)0) /* Left (struct node_t *)0? */
+ q = r;
+ else if (r != (struct node_t *)0) { /* Right link is null? */
+ if (r->left == (struct node_t *)0) { /* D2: Find successor */
+ r->left = q;
+ q = r;
+ } else { /* D3: Find (struct node_t *)0 link */
+ for (q = r->left; q->left != (struct node_t *)0; q = r->left)
+ r = q;
+ r->left = q->right;
+ q->left = (*rootp)->left;
+ q->right = (*rootp)->right;
+ }
+ }
+ free((struct node_t *) *rootp); /* D4: Free node */
+ *rootp = q; /* link parent to new node */
+ return(p);
+}
diff --git a/lib/tsearch.h b/lib/tsearch.h
new file mode 100644
index 0000000..421802a
--- /dev/null
+++ b/lib/tsearch.h
@@ -0,0 +1,14 @@
+#ifndef TSEARCH_H
+#define TSEARCH_H
+
+void * tsearch(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *));
+
+void * tfind(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *));
+
+void * tdelete(const void *vkey, void **vrootp,
+ int (*compar)(const void *, const void *));
+
+
+#endif
\ No newline at end of file
diff --git a/lib/udunits-1.c b/lib/udunits-1.c
index 7e19903..7ac86df 100644
--- a/lib/udunits-1.c
+++ b/lib/udunits-1.c
@@ -27,7 +27,7 @@ static int buflen = 80;
static void* unit2s = NULL;
/*
- * Initialize the units(3) package.
+ * Initialize the udunits(3) package.
*/
int
utInit(
@@ -163,9 +163,30 @@ utScan(
return status;
}
-/*
- * Convert a temporal value into a UTC Gregorian date and time.
+static int isLeapYear(const int year)
+{
+ return (year % 4 == 0) && !(year % 100 == 0 && year % 400 != 0);
+}
+
+/**
+ * Returns the number of days in a particular month.
*/
+static int daysInMonth(
+ const int year,
+ const int month)
+{
+ static int daysInMonth[2][12] = {
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, // Leap year
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} // Regular year
+ };
+ return isLeapYear(year)
+ ? daysInMonth[0][month-1]
+ : daysInMonth[1][month-1];
+}
+
+/*
+* Convert a temporal value into a UTC Gregorian date and time.
+*/
int
utCalendar(
double value,
@@ -181,14 +202,34 @@ utCalendar(
cv_converter* converter = ut_get_converter(unit->unit2, encodedTimeUnit);
if (converter == NULL) {
- status = encodedTimeUnit == NULL ? UT_ENOINIT : UT_EINVALID;
+ status = encodedTimeUnit == NULL ? UT_ENOINIT : UT_EINVALID;
}
else {
- double encodedTime = cv_convert_double(converter, value);
- double sec, res;
-
- ut_decode_time(encodedTime, year, month, day, hour, minute, &sec, &res);
- *second = (float)sec;
+ double encodedTime = cv_convert_double(converter, value);
+ double sec, res;
+
+ ut_decode_time(encodedTime, year, month, day, hour, minute, &sec, &res);
+ *second = (float)sec;
+ if (*second > 59) {
+ *second = 0;
+ *minute += 1;
+ if (*minute > 59) {
+ *minute = 0;
+ *hour += 1;
+ if (*hour > 23) {
+ *hour = 0;
+ *day += 1;
+ if (*day > daysInMonth(*year, *month)) {
+ *day = 1;
+ *month += 1;
+ if (*month > 12) {
+ *month = 1;
+ *year += 1;
+ }
+ }
+ }
+ }
+ }
cv_free(converter);
}
return status;
diff --git a/lib/udunits2-common.xml b/lib/udunits2-common.xml
index e992b85..1801407 100644
--- a/lib/udunits2-common.xml
+++ b/lib/udunits2-common.xml
@@ -128,6 +128,20 @@ elements appear only within <aliases>.
</aliases>
<definition>number of parts per hundred</definition>
</unit>
+ <!-- I loathe and despise units like this: one's that contain
+ information about the physical quantity in their name or symbol (e.g.,
+ "parts by volume". Such information is better conveyed by the name of
+ the physical quantity (e.g., "volume fraction"). Eschewing such
+ information in the unit provides for a better separation between
+ physical quantities and units and enables fewer and simpler units. -->
+ <unit>
+ <comment>Constant</comment>
+ <def>1</def>
+ <aliases>
+ <symbol>ppv</symbol>
+ </aliases>
+ <definition>parts per volume</definition>
+ </unit>
<unit>
<comment>Constant</comment>
<def>1e-6</def>
diff --git a/lib/udunits2lib.pdf b/lib/udunits2lib.pdf
index 6965109..c51a140 100644
Binary files a/lib/udunits2lib.pdf and b/lib/udunits2lib.pdf differ
diff --git a/lib/unitcore.c b/lib/unitcore.c
index a6da804..e61d78c 100644
--- a/lib/unitcore.c
+++ b/lib/unitcore.c
@@ -336,7 +336,7 @@ gregorianDateToJulianDay(year, month, day)
if (jy >= 0)
{
julday += 365 * jy;
- julday += 0.25 * jy;
+ julday += (long)(0.25 * jy);
}
else
{
@@ -397,48 +397,29 @@ ut_encode_clock(
return (hours*60 + minutes)*60 + seconds;
}
+static int
+mydiv( const double numer,
+ const unsigned denom,
+ double* const rem)
+{
+ int n = (int)(abs(numer)/denom);
+ if (numer < 0)
+ n = -n;
+ *rem = numer - (long)n * (long)denom;
+ return n;
+}
-/*
- * Decompose a value into a set of values accounting for uncertainty.
- */
static void
-decompose(value, uncer, nbasis, basis, count)
- double value;
- double uncer; /* >= 0 */
- int nbasis;
- const double *basis; /* all values > 0 */
- double *count;
+decomp( double value,
+ int* const days,
+ int* const hours,
+ int* const minutes,
+ double* const seconds)
{
- int i;
-
- for (i = 0; i < nbasis; i++)
- {
- double r = fmod(value, basis[i]); /* remainder */
-
- /* Adjust remainder to minimum magnitude. */
- if (ABS(2*r) > basis[i])
- r += r > 0
- ? -basis[i]
- : basis[i];
-
- if (ABS(r) <= uncer)
- {
- /* The value equals a basis multiple within the uncertainty. */
- double half = value < 0 ? -basis[i]/2 : basis[i]/2;
- modf((value+half)/basis[i], count+i);
- break;
- }
-
- value = basis[i] * modf(value/basis[i], count+i);
- }
-
- if (i >= nbasis) {
- count[--i] += value;
- }
- else {
- for (i++; i < nbasis; i++)
- count[i] = 0;
- }
+ double rem;
+ *days = mydiv(value, 86400, &rem);
+ *hours = mydiv(rem, 3600, &rem);
+ *minutes = mydiv(rem, 60, seconds);
}
@@ -516,40 +497,19 @@ ut_decode_time(
double *second,
double *resolution)
{
- int days;
- int hours;
- int minutes;
- double seconds;
- double uncer; /* uncertainty of input value */
- typedef union
- {
- double vec[7];
- struct
- {
- double days;
- double hours12;
- double hours;
- double minutes10;
- double minutes;
- double seconds10;
- double seconds;
- } ind;
- } Basis;
- Basis counts;
- static const Basis basis = {86400, 43200, 3600, 600, 60, 10, 1};
-
- uncer = ldexp(value < 0 ? -value : value, -DBL_MANT_DIG);
-
- days = (int)floor(value/basis.ind.days);
- value -= days * basis.ind.days; /* make positive excess */
-
- decompose(value, uncer, (int)(sizeof(basis.vec)/sizeof(basis.vec[0])),
- basis.vec, counts.vec);
-
- days += counts.ind.days;
- hours = (int)counts.ind.hours12 * 12 + (int)counts.ind.hours;
- minutes = (int)counts.ind.minutes10 * 10 + (int)counts.ind.minutes;
- seconds = (int)counts.ind.seconds10 * 10 + counts.ind.seconds;
+ int days;
+ int hours;
+ int minutes;
+ int d;
+ double seconds;
+ /* Uncertainty of input value */
+ double uncer = ldexp(value < 0 ? -value : value, -DBL_MANT_DIG);
+
+ days = (int)floor(value/86400.0);
+ // `long long` is necessary for dates like `1-01-01`
+ value -= days * (long long)86400; /* make positive excess */
+ decomp(value, &d, &hours, &minutes, &seconds);
+ days += d;
if (seconds >= 60) {
seconds -= 60;
diff --git a/lib/xml.c b/lib/xml.c
index 48527a2..997f6f8 100644
--- a/lib/xml.c
+++ b/lib/xml.c
@@ -1800,7 +1800,13 @@ endImport(
path = text;
}
else {
- (void)snprintf(buf, sizeof(buf), "%s/%s",
+ (void)snprintf(buf, sizeof(buf),
+#ifdef _MSC_VER
+ // The directory pathname has a trailing backslash on Windows
+ "%s%s",
+#else
+ "%s/%s",
+#endif
XML_GetBase(currFile->parser), text);
buf[sizeof(buf)-1] = 0;
@@ -2070,21 +2076,24 @@ readXml(
ut_handle_error_message("Couldn't create XML parser");
}
else {
- char base[_XOPEN_PATH_MAX];
-
- (void)strncpy(base, path, sizeof(base));
- base[sizeof(base)-1] = 0;
-#ifndef _MSC_VER
- (void)memmove(base, dirname(base), sizeof(base));
+ char base[_XOPEN_PATH_MAX];
+#ifdef _MSC_VER
+ {
+ char drive[_MAX_DRIVE+1]; // Will have trailing colon
+ char directory[_MAX_DIR+1]; // Will have trailing backslash
+ _splitpath(path, drive, directory, NULL, NULL);
+ (void)snprintf(base, sizeof(base), "%s%s", drive, directory);
+ base[sizeof(base)-1] = 0;
+ }
#else
- {
- char *m_dir = (char*)malloc(sizeof(char)*1024);
- _splitpath(base,NULL,m_dir,NULL,NULL);
- (void)memmove(base,m_dir,sizeof(base));
- free(m_dir);
- }
+ {
+ // str*cpy() must not copy overlapping strings
+ char tmp[_XOPEN_PATH_MAX];
+ (void)strncpy(tmp, path, sizeof(tmp));
+ tmp[sizeof(tmp)-1] = 0;
+ (void)strcpy(base, dirname(tmp));
+ }
#endif
- base[sizeof(base)-1] = 0;
if (XML_SetBase(parser, base) != XML_STATUS_OK) {
status = UT_OS;
diff --git a/prog/Makefile.am b/prog/Makefile.am
index 0a22c79..b7df903 100644
--- a/prog/Makefile.am
+++ b/prog/Makefile.am
@@ -19,7 +19,8 @@ TAGS_FILES = $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*.h
EXTRA_DIST = \
CMakeLists.txt \
udunits2prog.html \
- udunits2prog.pdf
+ udunits2prog.pdf \
+ XGetopt.c XGetopt.h
.c.ln:
$(LINT.c) $(AM_CPPFLAGS) $(CPPFLAGS) -c $<
diff --git a/prog/Makefile.in b/prog/Makefile.in
index 86c8595..97325ca 100644
--- a/prog/Makefile.in
+++ b/prog/Makefile.in
@@ -241,7 +241,8 @@ TAGS_FILES = $(top_srcdir)/lib/*.c $(top_srcdir)/lib/*.h
EXTRA_DIST = \
CMakeLists.txt \
udunits2prog.html \
- udunits2prog.pdf
+ udunits2prog.pdf \
+ XGetopt.c XGetopt.h
all: all-am
diff --git a/prog/XGetopt.c b/prog/XGetopt.c
new file mode 100644
index 0000000..3ff2fa8
--- /dev/null
+++ b/prog/XGetopt.c
@@ -0,0 +1,214 @@
+// XGetopt.cpp Version 1.2
+//
+// Author: Hans Dietrich
+// hdietrich2 at hotmail.com
+//
+// Description:
+// XGetopt.cpp implements getopt(), a function to parse command lines.
+//
+// History
+// Version 1.2 - 2003 May 17
+// - Added Unicode support
+//
+// Version 1.1 - 2002 March 10
+// - Added example to XGetopt.cpp module header
+//
+// This software is released into the public domain.
+// You are free to use it in any way you like.
+//
+// This software is provided "as is" with no expressed
+// or implied warranty. I accept no liability for any
+// damage or loss of business that this software may cause.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+// if you are not using precompiled headers then include these lines:
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "XGetopt.h"
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// X G e t o p t . c p p
+//
+//
+// NAME
+// getopt -- parse command line options
+//
+// SYNOPSIS
+// int getopt(int argc, TCHAR *argv[], TCHAR *optstring)
+//
+// extern TCHAR *optarg;
+// extern int optind;
+//
+// DESCRIPTION
+// The getopt() function parses the command line arguments. Its
+// arguments argc and argv are the argument count and array as
+// passed into the application on program invocation. In the case
+// of Visual C++ programs, argc and argv are available via the
+// variables __argc and __argv (double underscores), respectively.
+// getopt returns the next option letter in argv that matches a
+// letter in optstring. (Note: Unicode programs should use
+// __targv instead of __argv. Also, all character and string
+// literals should be enclosed in _T( ) ).
+//
+// optstring is a string of recognized option letters; if a letter
+// is followed by a colon, the option is expected to have an argument
+// that may or may not be separated from it by white space. optarg
+// is set to point to the start of the option argument on return from
+// getopt.
+//
+// Option letters may be combined, e.g., "-ab" is equivalent to
+// "-a -b". Option letters are case sensitive.
+//
+// getopt places in the external variable optind the argv index
+// of the next argument to be processed. optind is initialized
+// to 0 before the first call to getopt.
+//
+// When all options have been processed (i.e., up to the first
+// non-option argument), getopt returns EOF, optarg will point
+// to the argument, and optind will be set to the argv index of
+// the argument. If there are no non-option arguments, optarg
+// will be set to NULL.
+//
+// The special option "--" may be used to delimit the end of the
+// options; EOF will be returned, and "--" (and everything after it)
+// will be skipped.
+//
+// RETURN VALUE
+// For option letters contained in the string optstring, getopt
+// will return the option letter. getopt returns a question mark (?)
+// when it encounters an option letter not included in optstring.
+// EOF is returned when processing is finished.
+//
+// BUGS
+// 1) Long options are not supported.
+// 2) The GNU double-colon extension is not supported.
+// 3) The environment variable POSIXLY_CORRECT is not supported.
+// 4) The + syntax is not supported.
+// 5) The automatic permutation of arguments is not supported.
+// 6) This implementation of getopt() returns EOF if an error is
+// encountered, instead of -1 as the latest standard requires.
+//
+// EXAMPLE
+// BOOL CMyApp::ProcessCommandLine(int argc, TCHAR *argv[])
+// {
+// int c;
+//
+// while ((c = getopt(argc, argv, _T("aBn:"))) != EOF)
+// {
+// switch (c)
+// {
+// case _T('a'):
+// TRACE(_T("option a\n"));
+// //
+// // set some flag here
+// //
+// break;
+//
+// case _T('B'):
+// TRACE( _T("option B\n"));
+// //
+// // set some other flag here
+// //
+// break;
+//
+// case _T('n'):
+// TRACE(_T("option n: value=%d\n"), atoi(optarg));
+// //
+// // do something with value here
+// //
+// break;
+//
+// case _T('?'):
+// TRACE(_T("ERROR: illegal option %s\n"), argv[optind-1]);
+// return FALSE;
+// break;
+//
+// default:
+// TRACE(_T("WARNING: no handler for option %c\n"), c);
+// return FALSE;
+// break;
+// }
+// }
+// //
+// // check for non-option args here
+// //
+// return TRUE;
+// }
+//
+///////////////////////////////////////////////////////////////////////////////
+
+TCHAR *optarg; // global argument pointer
+int optind = 0; // global argv index
+
+int getopt(int argc, TCHAR *argv[], TCHAR *optstring)
+{
+ static TCHAR *next = NULL;
+ TCHAR c;
+ TCHAR *cp = malloc(sizeof(TCHAR)*1024);
+
+ if (optind == 0)
+ next = NULL;
+
+ optarg = NULL;
+
+ if (next == NULL || *next == _T('\0'))
+ {
+ if (optind == 0)
+ optind++;
+
+ if (optind >= argc || argv[optind][0] != _T('-') || argv[optind][1] == _T('\0'))
+ {
+ optarg = NULL;
+ if (optind < argc)
+ optarg = argv[optind];
+ return EOF;
+ }
+
+ if (_tcscmp(argv[optind], _T("--")) == 0)
+ {
+ optind++;
+ optarg = NULL;
+ if (optind < argc)
+ optarg = argv[optind];
+ return EOF;
+ }
+
+ next = argv[optind];
+ next++; // skip past -
+ optind++;
+ }
+
+ c = *next++;
+ cp = strchr(optstring, c);
+
+ if (cp == NULL || c == _T(':'))
+ return _T('?');
+
+ cp++;
+ if (*cp == _T(':'))
+ {
+ if (*next != _T('\0'))
+ {
+ optarg = next;
+ next = NULL;
+ }
+ else if (optind < argc)
+ {
+ optarg = argv[optind];
+ optind++;
+ }
+ else
+ {
+ return _T('?');
+ }
+ }
+
+ return c;
+}
diff --git a/prog/XGetopt.h b/prog/XGetopt.h
new file mode 100644
index 0000000..e066116
--- /dev/null
+++ b/prog/XGetopt.h
@@ -0,0 +1,40 @@
+// XGetopt.h Version 1.2
+//
+// Author: Hans Dietrich
+// hdietrich2 at hotmail.com
+//
+// This software is released into the public domain.
+// You are free to use it in any way you like.
+//
+// This software is provided "as is" with no expressed
+// or implied warranty. I accept no liability for any
+// damage or loss of business that this software may cause.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef XGETOPT_H
+#define XGETOPT_H
+
+#include <windows.h>
+#include <stdio.h>
+#include <tchar.h>
+
+#if defined(DLL_NETCDF)
+# if defined(DLL_EXPORT)
+# define GTOPT_EXTRA __declspec(dllexport)
+# else
+# define GTOPT_EXTRA __declspec(dllimport)
+# endif
+
+GTOPT_EXTRA extern int optind, opterr;
+#else
+extern int optind, opterr;
+#endif
+
+
+extern TCHAR *optarg;
+
+int getopt(int argc, TCHAR *argv[], TCHAR *optstring);
+
+#endif //XGETOPT_H
diff --git a/prog/udunits2prog.pdf b/prog/udunits2prog.pdf
index 9d3073d..82b7eac 100644
Binary files a/prog/udunits2prog.pdf and b/prog/udunits2prog.pdf differ
diff --git a/stamp-vti b/stamp-vti
index ad9c6e3..9846a2c 100644
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
- at set UPDATED 22 October 2015
- at set UPDATED-MONTH October 2015
- at set EDITION 2.2.20
- at set VERSION 2.2.20
+ at set UPDATED 16 May 2017
+ at set UPDATED-MONTH May 2017
+ at set EDITION 2.2.25
+ at set VERSION 2.2.25
diff --git a/udunits2.html b/udunits2.html
index b062e98..e0b3a62 100644
--- a/udunits2.html
+++ b/udunits2.html
@@ -1,8 +1,8 @@
<html lang="en">
<head>
-<title>UDUNITS 2.2.20 Manual</title>
+<title>UDUNITS 2.2.25 Manual</title>
<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="UDUNITS 2.2.20 Manual">
+<meta name="description" content="UDUNITS 2.2.25 Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
@@ -55,7 +55,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
--></style>
</head>
<body>
-<h1 class="settitle">UDUNITS 2.2.20 Manual</h1>
+<h1 class="settitle">UDUNITS 2.2.25 Manual</h1>
<div class="contents">
<h2>Table of Contents</h2>
<ul>
@@ -352,7 +352,7 @@ and unpack it in an appropriate place. For example,
<pre class="example"> su -
cd /usr/local/src
- wget -O - ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.20-Source.tar.gz |
+ wget -O - ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25-Source.tar.gz |
gunzip -c | pax -r
</pre>
<div class="node">
@@ -396,7 +396,7 @@ Up: <a rel="up" accesskey="u" href="#Unix">Unix</a>
<ol type=1 start=1>
<li>Go to the top-level source-directory of this package, e.g.,
- <pre class="example"> cd udunits-2.2.20
+ <pre class="example"> cd udunits-2.2.25
</pre>
<li>If necessary, clean-up from a previous installation attempt by making
the <code>distclean</code> target using the <var>make</var> utility from step 2:
diff --git a/udunits2.info b/udunits2.info
index e9c4f1b..0abcdcb 100644
--- a/udunits2.info
+++ b/udunits2.info
@@ -256,7 +256,7 @@ appropriate place. For example,
su -
cd /usr/local/src
- wget -O - ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.20-Source.tar.gz |
+ wget -O - ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25-Source.tar.gz |
gunzip -c | pax -r
@@ -290,7 +290,7 @@ Short instructions:
Long instructions:
1. Go to the top-level source-directory of this package, e.g.,
- cd udunits-2.2.20
+ cd udunits-2.2.25
2. If necessary, clean-up from a previous installation attempt by
making the `distclean' target using the MAKE utility from step 2:
diff --git a/udunits2.pdf b/udunits2.pdf
index 1f5eebc..40f9a4d 100644
Binary files a/udunits2.pdf and b/udunits2.pdf differ
diff --git a/version.texi b/version.texi
index ad9c6e3..9846a2c 100644
--- a/version.texi
+++ b/version.texi
@@ -1,4 +1,4 @@
- at set UPDATED 22 October 2015
- at set UPDATED-MONTH October 2015
- at set EDITION 2.2.20
- at set VERSION 2.2.20
+ at set UPDATED 16 May 2017
+ at set UPDATED-MONTH May 2017
+ at set EDITION 2.2.25
+ at set VERSION 2.2.25
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/udunits.git
More information about the debian-science-commits
mailing list