"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/udunits2lib.texi" between
udunits-2.2.26.tar.gz and udunits-2.2.28.tar.gz

About: UDUNITS supports units of physical quantities. Its C library provides for arithmetic manipulation of units and for conversion of numeric values between compatible units.

udunits2lib.texi  (udunits-2.2.26):udunits2lib.texi  (udunits-2.2.28)
skipping to change at line 69 skipping to change at line 69
@node Synopsis, Why, Top, Top @node Synopsis, Why, Top, Top
@chapter Synopsis @chapter Synopsis
@cindex synopsis @cindex synopsis
Coding: Coding:
@example @example
#include <udunits2.h> #include <udunits2.h>
@quotation @quotation
@multitable {ut_error_message_handler} {ut_get_dimensionless_unit_one(} @multitable {ut_error_message_handler} {ut_get_dimensionless_unit_one(}
@item const char* @tab @ref{ut_get_path_xml(),ut_get_path_xml}(const char* @va r{path}); @item const char* @tab @ref{ut_get_path_xml(),ut_get_path_xml}(const char* @va r{path}, ut_status* @var{status});
@item ut_system* @tab @ref{ut_read_xml(),ut_read_xml}(const char* @var{path}) ; @item ut_system* @tab @ref{ut_read_xml(),ut_read_xml}(const char* @var{path}) ;
@item ut_system* @tab @ref{ut_new_system(),ut_new_system}(void); @item ut_system* @tab @ref{ut_new_system(),ut_new_system}(void);
@item void @tab @ref{ut_free_system(), ut_free_system}(ut_system* @var{ system}); @item void @tab @ref{ut_free_system(), ut_free_system}(ut_system* @var{ system});
@item ut_system* @tab @ref{ut_get_system(),ut_get_system}(const ut_unit* @var {unit}); @item ut_system* @tab @ref{ut_get_system(),ut_get_system}(const ut_unit* @var {unit});
@item ut_unit* @tab @ref{ut_get_dimensionless_unit_one(),ut_get_dimensionle ss_unit_one}(const ut_system* @var{system}); @item ut_unit* @tab @ref{ut_get_dimensionless_unit_one(),ut_get_dimensionle ss_unit_one}(const ut_system* @var{system});
@item ut_unit* @tab @ref{ut_get_unit_by_name(),ut_get_unit_by_name}(const u t_system* @var{system}, const char* @var{name}); @item ut_unit* @tab @ref{ut_get_unit_by_name(),ut_get_unit_by_name}(const u t_system* @var{system}, const char* @var{name});
@item ut_unit* @tab @ref{ut_get_unit_by_symbol(),ut_get_unit_by_symbol}(con st ut_system* @var{system}, const char* @var{symbol}); @item ut_unit* @tab @ref{ut_get_unit_by_symbol(),ut_get_unit_by_symbol}(con st ut_system* @var{system}, const char* @var{symbol});
@item ut_status @tab @ref{ut_set_second(),ut_set_second}(const ut_unit* @var {second}); @item ut_status @tab @ref{ut_set_second(),ut_set_second}(const ut_unit* @var {second});
@item ut_status @tab @ref{ut_add_name_prefix(),ut_add_name_prefix}(ut_system * @var{system}, const char* @var{name}, double @var{value}); @item ut_status @tab @ref{ut_add_name_prefix(),ut_add_name_prefix}(ut_system * @var{system}, const char* @var{name}, double @var{value});
@item ut_status @tab @ref{ut_add_symbol_prefix(),ut_add_symbol_prefix}(ut_sy stem* @var{system}, const char* @var{symbol}, double @var{value}); @item ut_status @tab @ref{ut_add_symbol_prefix(),ut_add_symbol_prefix}(ut_sy stem* @var{system}, const char* @var{symbol}, double @var{value});
skipping to change at line 151 skipping to change at line 151
@example @example
c89 ... -L@emph{libdir} -ludunits2 -lexpat ... -lm c89 ... -L@emph{libdir} -ludunits2 -lexpat ... -lm
@end example @end example
Where @emph{libdir} is the installation-directory for object code Where @emph{libdir} is the installation-directory for object code
libraries (e.g., @code{/usr/local/lib}). libraries (e.g., @code{/usr/local/lib}).
@node Why, Unit-Systems, Synopsis, Top @node Why, Unit-Systems, Synopsis, Top
@chapter What's a Unit Package Good For? @chapter What's a Unit Package Good For?
The existance of a software package is justified by what you can do with it. The existence of a software package is justified by what you can do with it.
The three main things you can do with the UDUNIT-2 package are The three main things you can do with the UDUNIT-2 package are
@enumerate @enumerate
@item @item
@ref{Value Conversion, @ref{Value Conversion,
Convert numeric values between compatible units}. Convert numeric values between compatible units}.
@item @item
Convert a string representation of a unit into a binary one --- enabling Convert a string representation of a unit into a binary one --- enabling
the programatic manipulation of units. the programatic manipulation of units.
There are three ways to do this: There are three ways to do this:
@itemize @itemize
skipping to change at line 211 skipping to change at line 211
of different unit-systems. Similarly, units belonging to different of different unit-systems. Similarly, units belonging to different
unit-systems always compare unequal. unit-systems always compare unequal.
There are several categories of operations on unit-systems: There are several categories of operations on unit-systems:
@menu @menu
* Obtaining:: How to obtain a unit-system. * Obtaining:: How to obtain a unit-system.
* Extracting:: Getting a unit from a unit-system. * Extracting:: Getting a unit from a unit-system.
* Adding:: Adding new units to a unit-system. * Adding:: Adding new units to a unit-system.
* Prefixes:: Add new unit-prefixes to a unit-system. * Prefixes:: Add new unit-prefixes to a unit-system.
* Misc:: Miscelaneous unit-system operations. * Misc:: Miscellaneous unit-system operations.
@end menu @end menu
@node Obtaining, Extracting, , Unit-Systems @node Obtaining, Extracting, , Unit-Systems
@section Obtaining a Unit-System @section Obtaining a Unit-System
@cindex database, unit, obtaining predefined @cindex database, unit, obtaining predefined
@cindex unit database, obtaining predefined @cindex unit database, obtaining predefined
@cindex unit-system, obtaining predefined @cindex unit-system, obtaining predefined
@cindex units, obtaining predefined @cindex units, obtaining predefined
@cindex @code{ut_read_xml()}, discussion of @cindex @code{ut_read_xml()}, discussion of
Typically, you would obtain a unit-system of predefined units by reading Typically, you would obtain a unit-system of predefined units by reading
skipping to change at line 336 skipping to change at line 336
@item UT_OS @item UT_OS
Operating-system error. See @code{errno}. Operating-system error. See @code{errno}.
@end table @end table
@end deftypefun @end deftypefun
@node Extracting, Adding, Obtaining, Unit-Systems @node Extracting, Adding, Obtaining, Unit-Systems
@section Extracting Units from a Unit-System @section Extracting Units from a Unit-System
@strong{NOTE\:} This section covers low-level access to the indidual units of a @strong{NOTE\:} This section covers low-level access to the indidual units of a
@ref{unit-system}. @ref{unit-system}.
General parsing of arbitrary unit specifications is coverted in General parsing of arbitrary unit specifications is covered in
the section @ref{Parsing}. the section @ref{Parsing}.
A @ref{unit-system} contains mappings from identifiers to units (and A @ref{unit-system} contains mappings from identifiers to units (and
vice versa). vice versa).
Consequently, once you have a unit-system, you can easily Consequently, once you have a unit-system, you can easily
obtain a unit for which you know the name or symbol using obtain a unit for which you know the name or symbol using
the function @code{@ref{ut_get_unit_by_name()}} or the function @code{@ref{ut_get_unit_by_name()}} or
@code{@ref{ut_get_unit_by_symbol()}}. @code{@ref{ut_get_unit_by_symbol()}}.
@cindex getting a unit by its name @cindex getting a unit by its name
skipping to change at line 523 skipping to change at line 523
@item UT_BAD_ARG @item UT_BAD_ARG
@var{system} or @var{symbol} is @code{NULL}, or @var{value} is @code{0}. @var{system} or @var{symbol} is @code{NULL}, or @var{value} is @code{0}.
@item UT_EXISTS @item UT_EXISTS
@var{symbol} already maps to a different value. @var{symbol} already maps to a different value.
@item UT_OS @item UT_OS
Operating-system failure. See @code{errno}. Operating-system failure. See @code{errno}.
@end table @end table
@end deftypefun @end deftypefun
@node Misc, , Prefixes, Unit-Systems @node Misc, , Prefixes, Unit-Systems
@section Miscelaneous Operations on Unit-Systems @section Miscellaneous Operations on Unit-Systems
@anchor{ut_free_system()} @anchor{ut_free_system()}
@deftypefun @code{void} ut_free_system @code{(ut_system* @var{system})} @deftypefun @code{void} ut_free_system @code{(ut_system* @var{system})}
Frees the unit-system referenced by @var{system}. All unit-to-identifier and Frees the unit-system referenced by @var{system}. All unit-to-identifier and
identifier-to-unit mappings are removed. Use of @code{system} after this identifier-to-unit mappings are removed. Use of @code{system} after this
function returns results in undefined behavior. function returns results in undefined behavior.
@end deftypefun @end deftypefun
@anchor{ut_set_second()} @anchor{ut_set_second()}
@deftypefun @code{@ref{ut_status}} ut_set_second @code{(const ut_unit* @var{seco nd})} @deftypefun @code{@ref{ut_status}} ut_set_second @code{(const ut_unit* @var{seco nd})}
skipping to change at line 899 skipping to change at line 899
<month>: <month>:
"0"?[1-9]|1[0-2] "0"?[1-9]|1[0-2]
<day>: <day>:
"0"?[1-9]|[1-2][0-9]|"30"|"31" "0"?[1-9]|[1-2][0-9]|"30"|"31"
CLOCK: CLOCK:
<hour> ":" <minute> (":" <second>)? <hour> ":" <minute> (":" <second>)?
TIMSTAMP: TIMESTAMP:
<year> (<month> <day>?)? "T" <hour> (<minute> <second>?)? <year> (<month> <day>?)? "T" <hour> (<minute> <second>?)?
<hour>: <hour>:
[+-]?[0-1]?[0-9]|2[0-3] [+-]?[0-1]?[0-9]|2[0-3]
<minute>: <minute>:
[0-5]?[0-9] [0-5]?[0-9]
<second>: <second>:
(<minute>|60) (\.[0-9]*)? (<minute>|60) (\.[0-9]*)?
skipping to change at line 1232 skipping to change at line 1232
Returns the unit-system to which the unit referenced by @var{unit} belongs. Returns the unit-system to which the unit referenced by @var{unit} belongs.
If @var{unit} is @code{NULL}, then this function writes an error-message If @var{unit} is @code{NULL}, then this function writes an error-message
using @code{@ref{ut_handle_error_message()}} using @code{@ref{ut_handle_error_message()}}
and returns @code{NULL}. and returns @code{NULL}.
Also, @code{@ref{ut_get_status()}} will return @code{UT_BAD_ARG}. Also, @code{@ref{ut_get_status()}} will return @code{UT_BAD_ARG}.
@end deftypefun @end deftypefun
@anchor{ut_is_dimensionless()} @anchor{ut_is_dimensionless()}
@deftypefun @code{int} ut_is_dimensionless @code{(const ut_unit* @var{unit})} @deftypefun @code{int} ut_is_dimensionless @code{(const ut_unit* @var{unit})}
Indicates if unit @var{unit} is dimensionless (like ``radian''). Indicates if unit @var{unit} is dimensionless (like ``radian'').
This function returns a non-zero value if the unit is dimensionfull; This function returns a non-zero value if the unit is dimensionless;
otherwise, @code{0} is returned and otherwise, @code{0} is returned and
@ref{ut_get_status()} will return one of the following: @ref{ut_get_status()} will return one of the following:
@table @code @table @code
@item UT_BAD_ARG @item UT_BAD_ARG
@var{unit1} is @code{NULL}. @var{unit1} is @code{NULL}.
@item UT_SUCCESS @item UT_SUCCESS
The unit is dimensionless. The unit is dimensionless.
@end table @end table
@end deftypefun @end deftypefun
skipping to change at line 1586 skipping to change at line 1586
@deftypefun @code{double} ut_encode_date @code{(int @var{year}, int @var{month}, int @var{day})} @deftypefun @code{double} ut_encode_date @code{(int @var{year}, int @var{month}, int @var{day})}
Encodes a date as a double-precision value. Encodes a date as a double-precision value.
You probably won't use this function. You probably won't use this function.
Dates on or after 1582-10-15 are assumed to be Gregorian dates; Dates on or after 1582-10-15 are assumed to be Gregorian dates;
dates before that are assumed to be Julian dates. In particular, dates before that are assumed to be Julian dates. In particular,
the year 1 BCE is immediately followed by the year 1 CE. the year 1 BCE is immediately followed by the year 1 CE.
@end deftypefun @end deftypefun
@anchor{ut_encode_clock()} @anchor{ut_encode_clock()}
@deftypefun @code{double} ut_encode_clock @code{(int @var{hour}, int @var{minute }, double @var{second})} @deftypefun @code{double} ut_encode_clock @code{(int @var{hour}, int @var{minute }, double @var{second})}
Encodes a clock-time as a double-precision value. Encodes a clock-time as a double-precision value. @code{abs(hour)} must be less
than 24; @code{abs(minute)} must be less than 60; and @code{fabs(second)} must
be less than or equal to 62.
You probably won't use this function. You probably won't use this function.
@end deftypefun @end deftypefun
@anchor{ut_decode_time()} @anchor{ut_decode_time()}
@deftypefun @code{void} ut_decode_time @code{(double @var{time}, int* @var{year} , int* @var{month}, int* @var{day}, int* @var{hour}, int* @var{minute}, double* @var{second}, double* @var{resolution})} @deftypefun @code{void} ut_decode_time @code{(double @var{time}, int* @var{year} , int* @var{month}, int* @var{day}, int* @var{hour}, int* @var{minute}, double* @var{second}, double* @var{resolution})}
Decodes a time from a double-precision value into its individual components. Decodes a time from a double-precision value into its individual components.
The variable referenced by @var{resolution} will be set to the resolution The variable referenced by @var{resolution} will be set to the resolution
(i.e., uncertainty) of the time in seconds. (i.e., uncertainty) of the time in seconds.
@end deftypefun @end deftypefun
 End of changes. 8 change blocks. 
8 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)