"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/udunits2lib.info" 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.info  (udunits-2.2.26):udunits2lib.info  (udunits-2.2.28)
skipping to change at line 118 skipping to change at line 118
* Complete Index:: Complete index * Complete Index:: Complete index
 
File: udunits2lib.info, Node: Synopsis, Next: Why, Prev: Top, Up: Top File: udunits2lib.info, Node: Synopsis, Next: Why, Prev: Top, Up: Top
1 Synopsis 1 Synopsis
********** **********
Coding: Coding:
#include <udunits2.h> #include <udunits2.h>
const char* *note ut_get_path_xml: ut_get_path_xml().(c onst char* PATH); const char* *note ut_get_path_xml: ut_get_path_xml().(c onst char* PATH, ut_status* STATUS);
ut_system* *note ut_read_xml: ut_read_xml().(const cha r* PATH); ut_system* *note ut_read_xml: ut_read_xml().(const cha r* PATH);
ut_system* *note ut_new_system: ut_new_system().(void) ; ut_system* *note ut_new_system: ut_new_system().(void) ;
void *note ut_free_system: ut_free_system().(ut_ system* SYSTEM); void *note ut_free_system: ut_free_system().(ut_ system* SYSTEM);
ut_system* *note ut_get_system: ut_get_system().(const ut_unit* UNIT); ut_system* *note ut_get_system: ut_get_system().(const ut_unit* UNIT);
ut_unit* *note ut_get_dimensionless_unit_one: ut_get _dimensionless_unit_one().(const ut_system* SYSTEM); ut_unit* *note ut_get_dimensionless_unit_one: ut_get _dimensionless_unit_one().(const ut_system* SYSTEM);
ut_unit* *note ut_get_unit_by_name: ut_get_unit_by_n ame().(const ut_system* SYSTEM, const char* NAME); ut_unit* *note ut_get_unit_by_name: ut_get_unit_by_n ame().(const ut_system* SYSTEM, const char* NAME);
ut_unit* *note ut_get_unit_by_symbol: ut_get_unit_by _symbol().(const ut_system* SYSTEM, const char* SYMBOL); ut_unit* *note ut_get_unit_by_symbol: ut_get_unit_by _symbol().(const ut_system* SYSTEM, const char* SYMBOL);
ut_status *note ut_set_second: ut_set_second().(const ut_unit* SECOND); ut_status *note ut_set_second: ut_set_second().(const ut_unit* SECOND);
ut_status *note ut_add_name_prefix: ut_add_name_prefi x().(ut_system* SYSTEM, const char* NAME, double VALUE); ut_status *note ut_add_name_prefix: ut_add_name_prefi x().(ut_system* SYSTEM, const char* NAME, double VALUE);
ut_status *note ut_add_symbol_prefix: ut_add_symbol_p refix().(ut_system* SYSTEM, const char* SYMBOL, double VALUE); ut_status *note ut_add_symbol_prefix: ut_add_symbol_p refix().(ut_system* SYSTEM, const char* SYMBOL, double VALUE);
skipping to change at line 195 skipping to change at line 195
Where _libdir_ is the installation-directory for object code Where _libdir_ is the installation-directory for object code
libraries (e.g., '/usr/local/lib'). libraries (e.g., '/usr/local/lib').
 
File: udunits2lib.info, Node: Why, Next: Unit-Systems, Prev: Synopsis, Up: T op File: udunits2lib.info, Node: Why, Next: Unit-Systems, Prev: Synopsis, Up: T op
2 What's a Unit Package Good For? 2 What's a Unit Package Good For?
********************************* *********************************
The existance of a software package is justified by what you can do with 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 it. The three main things you can do with the UDUNIT-2 package are
1. *note Convert numeric values between compatible units: Value 1. *note Convert numeric values between compatible units: Value
Conversion. Conversion.
2. Convert a string representation of a unit into a binary one -- 2. Convert a string representation of a unit into a binary one --
enabling the programatic manipulation of units. There are three enabling the programatic manipulation of units. There are three
ways to do this: ways to do this:
* *note Get the unit: Extracting. from a *note unit-system::. * *note Get the unit: Extracting. from a *note unit-system::.
This requires that you know the unit's name or symbol and that This requires that you know the unit's name or symbol and that
the unit is in a unit-system. the unit is in a unit-system.
* *note Parse a string representation of the unit into its * *note Parse a string representation of the unit into its
skipping to change at line 242 skipping to change at line 242
different unit-systems always compare unequal. different 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.
 
File: udunits2lib.info, Node: Obtaining, Next: Extracting, Up: Unit-Systems File: udunits2lib.info, Node: Obtaining, Next: Extracting, Up: Unit-Systems
3.1 Obtaining a Unit-System 3.1 Obtaining a Unit-System
=========================== ===========================
Typically, you would obtain a unit-system of predefined units by reading Typically, you would obtain a unit-system of predefined units by reading
the default unit database using '*note ut_read_xml()::' with a 'NULL' the default unit database using '*note ut_read_xml()::' with a 'NULL'
pathname argument. If this doesn't quite match your needs, then there pathname argument. If this doesn't quite match your needs, then there
skipping to change at line 343 skipping to change at line 343
Operating-system error. See 'errno'. Operating-system error. See 'errno'.
 
File: udunits2lib.info, Node: Extracting, Next: Adding, Prev: Obtaining, Up: Unit-Systems File: udunits2lib.info, Node: Extracting, Next: Adding, Prev: Obtaining, Up: Unit-Systems
3.2 Extracting Units from a Unit-System 3.2 Extracting Units from a Unit-System
======================================= =======================================
*NOTE\:* This section covers low-level access to the indidual units of a *NOTE\:* This section covers low-level access to the indidual units of a
*note unit-system::. General parsing of arbitrary unit specifications *note unit-system::. General parsing of arbitrary unit specifications
is coverted in the section *note Parsing::. is covered in the section *note Parsing::.
A *note unit-system:: contains mappings from identifiers to units A *note unit-system:: contains mappings from identifiers to units
(and vice versa). Consequently, once you have a unit-system, you can (and vice versa). Consequently, once you have a unit-system, you can
easily obtain a unit for which you know the name or symbol using the easily obtain a unit for which you know the name or symbol using the
function '*note ut_get_unit_by_name()::' or '*note function '*note ut_get_unit_by_name()::' or '*note
ut_get_unit_by_symbol()::'. ut_get_unit_by_symbol()::'.
-- Function: 'ut_unit*' ut_get_unit_by_name '(const ut_system* SYSTEM, -- Function: 'ut_unit*' ut_get_unit_by_name '(const ut_system* SYSTEM,
const char* NAME)' const char* NAME)'
Returns the unit to which NAME maps from the unit-system referenced Returns the unit to which NAME maps from the unit-system referenced
skipping to change at line 493 skipping to change at line 493
'UT_BAD_ARG' 'UT_BAD_ARG'
SYSTEM or SYMBOL is 'NULL', or VALUE is '0'. SYSTEM or SYMBOL is 'NULL', or VALUE is '0'.
'UT_EXISTS' 'UT_EXISTS'
SYMBOL already maps to a different value. SYMBOL already maps to a different value.
'UT_OS' 'UT_OS'
Operating-system failure. See 'errno'. Operating-system failure. See 'errno'.
 
File: udunits2lib.info, Node: Misc, Prev: Prefixes, Up: Unit-Systems File: udunits2lib.info, Node: Misc, Prev: Prefixes, Up: Unit-Systems
3.5 Miscelaneous Operations on Unit-Systems 3.5 Miscellaneous Operations on Unit-Systems
=========================================== ============================================
-- Function: 'void' ut_free_system '(ut_system* SYSTEM)' -- Function: 'void' ut_free_system '(ut_system* SYSTEM)'
Frees the unit-system referenced by SYSTEM. All unit-to-identifier Frees the unit-system referenced by SYSTEM. All unit-to-identifier
and identifier-to-unit mappings are removed. Use of 'system' after and identifier-to-unit mappings are removed. Use of 'system' after
this function returns results in undefined behavior. this function returns results in undefined behavior.
-- Function: '*note ut_status::' ut_set_second '(const ut_unit* -- Function: '*note ut_status::' ut_set_second '(const ut_unit*
SECOND)' SECOND)'
Sets the "second" unit of a unit-system. This function must be Sets the "second" unit of a unit-system. This function must be
called before the first call to 'ut_offset_by_time()' for a unit in called before the first call to 'ut_offset_by_time()' for a unit in
skipping to change at line 839 skipping to change at line 839
<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 1103 skipping to change at line 1103
UNIT doesn't map to a symbol in the given character-set. UNIT doesn't map to a symbol in the given character-set.
-- Function: 'ut_system*' ut_get_system '(const ut_unit* UNIT)' -- Function: 'ut_system*' ut_get_system '(const ut_unit* UNIT)'
Returns the unit-system to which the unit referenced by UNIT Returns the unit-system to which the unit referenced by UNIT
belongs. If UNIT is 'NULL', then this function writes an belongs. If UNIT is 'NULL', then this function writes an
error-message using '*note ut_handle_error_message()::' and returns error-message using '*note ut_handle_error_message()::' and returns
'NULL'. Also, '*note ut_get_status()::' will return 'UT_BAD_ARG'. 'NULL'. Also, '*note ut_get_status()::' will return 'UT_BAD_ARG'.
-- Function: 'int' ut_is_dimensionless '(const ut_unit* UNIT)' -- Function: 'int' ut_is_dimensionless '(const ut_unit* UNIT)'
Indicates if unit UNIT is dimensionless (like "radian"). This Indicates if unit UNIT is dimensionless (like "radian"). This
function returns a non-zero value if the unit is dimensionfull; function returns a non-zero value if the unit is dimensionless;
otherwise, '0' is returned and *note ut_get_status():: will return otherwise, '0' is returned and *note ut_get_status():: will return
one of the following: one of the following:
'UT_BAD_ARG' 'UT_BAD_ARG'
UNIT1 is 'NULL'. UNIT1 is 'NULL'.
'UT_SUCCESS' 'UT_SUCCESS'
The unit is dimensionless. The unit is dimensionless.
-- Function: 'ut_unit*' ut_clone '(const ut_unit* UNIT)' -- Function: 'ut_unit*' ut_clone '(const ut_unit* UNIT)'
Returns a copy of the unit referenced by UNIT. You should pass the Returns a copy of the unit referenced by UNIT. You should pass the
skipping to change at line 1408 skipping to change at line 1408
-- Function: 'double' ut_encode_date '(int YEAR, int MONTH, int DAY)' -- Function: 'double' ut_encode_date '(int YEAR, int MONTH, int DAY)'
Encodes a date as a double-precision value. You probably won't use Encodes a date as a double-precision value. You probably won't use
this function. Dates on or after 1582-10-15 are assumed to be this function. Dates on or after 1582-10-15 are assumed to be
Gregorian dates; dates before that are assumed to be Julian dates. Gregorian dates; dates before that are assumed to be Julian dates.
In particular, the year 1 BCE is immediately followed by the year 1 In particular, the year 1 BCE is immediately followed by the year 1
CE. CE.
-- Function: 'double' ut_encode_clock '(int HOUR, int MINUTE, double -- Function: 'double' ut_encode_clock '(int HOUR, int MINUTE, double
SECOND)' SECOND)'
Encodes a clock-time as a double-precision value. You probably Encodes a clock-time as a double-precision value. 'abs(hour)' must
be less than 24; 'abs(minute)' must be less than 60; and
'fabs(second)' must be less than or equal to 62. You probably
won't use this function. won't use this function.
-- Function: 'void' ut_decode_time '(double TIME, int* YEAR, int* -- Function: 'void' ut_decode_time '(double TIME, int* YEAR, int*
MONTH, int* DAY, int* HOUR, int* MINUTE, double* SECOND, MONTH, int* DAY, int* HOUR, int* MINUTE, double* SECOND,
double* RESOLUTION)' double* RESOLUTION)'
Decodes a time from a double-precision value into its individual Decodes a time from a double-precision value into its individual
components. The variable referenced by RESOLUTION will be set to components. The variable referenced by RESOLUTION will be set to
the resolution (i.e., uncertainty) of the time in seconds. the resolution (i.e., uncertainty) of the time in seconds.
 
skipping to change at line 1641 skipping to change at line 1643
* unit-system, obtaining predefined: Obtaining. (line 6) * unit-system, obtaining predefined: Obtaining. (line 6)
* units database: Database. (line 6) * units database: Database. (line 6)
* units, mapping to identifiers: Mapping. (line 6) * units, mapping to identifiers: Mapping. (line 6)
* units, obtaining predefined: Obtaining. (line 6) * units, obtaining predefined: Obtaining. (line 6)
* ut_accept_visitor: Unary. (line 204) * ut_accept_visitor: Unary. (line 204)
* ut_add_name_prefix: Prefixes. (line 14) * ut_add_name_prefix: Prefixes. (line 14)
* ut_add_symbol_prefix: Prefixes. (line 30) * ut_add_symbol_prefix: Prefixes. (line 30)
* ut_are_convertible: Value Conversion. (line 23) * ut_are_convertible: Value Conversion. (line 23)
* ut_clone: Unary. (line 190) * ut_clone: Unary. (line 190)
* ut_compare: Binary. (line 40) * ut_compare: Binary. (line 40)
* ut_decode_time: Time. (line 36) * ut_decode_time: Time. (line 38)
* ut_divide: Binary. (line 26) * ut_divide: Binary. (line 26)
* ut_encode_clock: Time. (line 31) * ut_encode_clock: Time. (line 31)
* ut_encode_date: Time. (line 24) * ut_encode_date: Time. (line 24)
* ut_encode_time: Time. (line 18) * ut_encode_time: Time. (line 18)
* ut_encoding: Types. (line 9) * ut_encoding: Types. (line 9)
* ut_error_message_handler: Messages. (line 37) * ut_error_message_handler: Messages. (line 37)
* ut_format: Formatting. (line 26) * ut_format: Formatting. (line 26)
* ut_free: Unary. (line 6) * ut_free: Unary. (line 6)
* ut_free_system: Misc. (line 6) * ut_free_system: Misc. (line 6)
* ut_get_converter: Value Conversion. (line 40) * ut_get_converter: Value Conversion. (line 40)
skipping to change at line 1698 skipping to change at line 1700
* ut_unmap_symbol_to_unit: Symbols. (line 24) * ut_unmap_symbol_to_unit: Symbols. (line 24)
* ut_unmap_unit_to_name: Names. (line 51) * ut_unmap_unit_to_name: Names. (line 51)
* ut_unmap_unit_to_symbol: Symbols. (line 52) * ut_unmap_unit_to_symbol: Symbols. (line 52)
* ut_visitor: Unary. (line 218) * ut_visitor: Unary. (line 218)
* ut_write_to_stderr: Messages. (line 23) * ut_write_to_stderr: Messages. (line 23)
 
Tag Table: Tag Table:
Node: Top2105 Node: Top2105
Node: Synopsis5221 Node: Synopsis5221
Node: Why12645 Node: Why12664
Ref: unit-system14037 Ref: unit-system14056
Node: Unit-Systems14037 Node: Unit-Systems14056
Node: Obtaining15062 Node: Obtaining15082
Ref: ut_get_path_xml()16536 Ref: ut_get_path_xml()16556
Ref: ut_read_xml()17406 Ref: ut_read_xml()17426
Ref: ut_new_system()18743 Ref: ut_new_system()18763
Node: Extracting19299 Node: Extracting19319
Ref: ut_get_unit_by_name()19954 Ref: ut_get_unit_by_name()19973
Ref: ut_get_unit_by_symbol()20537 Ref: ut_get_unit_by_symbol()20556
Ref: ut_get_dimensionless_unit_one()21130 Ref: ut_get_dimensionless_unit_one()21149
Node: Adding21622 Node: Adding21641
Ref: ut_new_base_unit()22554 Ref: ut_new_base_unit()22573
Ref: ut_new_dimensionless_unit()23263 Ref: ut_new_dimensionless_unit()23282
Node: Prefixes23999 Node: Prefixes24018
Ref: ut_add_name_prefix()24557 Ref: ut_add_name_prefix()24576
Ref: ut_add_symbol_prefix()25161 Ref: ut_add_symbol_prefix()25180
Node: Misc25772 Node: Misc25791
Ref: ut_free_system()25936 Ref: ut_free_system()25957
Ref: ut_set_second()26199 Ref: ut_set_second()26220
Node: Value Conversion26824 Node: Value Conversion26845
Ref: ut_are_convertible()27624 Ref: ut_are_convertible()27645
Ref: ut_get_converter()28388 Ref: ut_get_converter()28409
Ref: cv_convert_float()29319 Ref: cv_convert_float()29340
Ref: cv_convert_double()29506 Ref: cv_convert_double()29527
Ref: cv_convert_floats()29698 Ref: cv_convert_floats()29719
Ref: cv_convert_doubles()30031 Ref: cv_convert_doubles()30052
Ref: cv_free()30370 Ref: cv_free()30391
Node: Parsing30630 Node: Parsing30651
Ref: ut_parse()31293 Ref: ut_parse()31314
Ref: ut_trim()32142 Ref: ut_trim()32163
Node: Syntax32394 Node: Syntax32415
Node: Examples32983 Node: Examples33004
Node: Grammar34347 Node: Grammar34368
Node: Formatting37469 Node: Formatting37491
Ref: ut_format()38292 Ref: ut_format()38314
Node: Operations39721 Node: Operations39743
Node: Unary40047 Node: Unary40069
Ref: ut_free()40172 Ref: ut_free()40194
Ref: ut_scale()40420 Ref: ut_scale()40442
Ref: ut_offset()40861 Ref: ut_offset()40883
Ref: ut_offset_by_time()41574 Ref: ut_offset_by_time()41596
Ref: ut_invert()43274 Ref: ut_invert()43296
Ref: ut_raise()43914 Ref: ut_raise()43936
Ref: ut_root()44478 Ref: ut_root()44500
Ref: ut_log()45309 Ref: ut_log()45331
Ref: ut_get_name()46760 Ref: ut_get_name()46782
Ref: ut_get_symbol()47212 Ref: ut_get_symbol()47234
Ref: ut_get_system()47672 Ref: ut_get_system()47694
Ref: ut_is_dimensionless()48012 Ref: ut_is_dimensionless()48034
Ref: ut_clone()48414 Ref: ut_clone()48436
Ref: ut_accept_visitor()49034 Ref: ut_accept_visitor()49056
Ref: ut_visitor49525 Ref: ut_visitor49547
Node: Binary51732 Node: Binary51754
Ref: ut_multiply()52054 Ref: ut_multiply()52076
Ref: ut_divide()52638 Ref: ut_divide()52660
Ref: ut_compare()53219 Ref: ut_compare()53241
Ref: ut_same_system()53624 Ref: ut_same_system()53646
Node: Mapping54113 Node: Mapping54135
Node: Names54722 Node: Names54744
Ref: ut_map_name_to_unit()54941 Ref: ut_map_name_to_unit()54963
Ref: ut_unmap_name_to_unit()55485 Ref: ut_unmap_name_to_unit()55507
Ref: ut_map_unit_to_name()55868 Ref: ut_map_unit_to_name()55890
Ref: ut_unmap_unit_to_name()56448 Ref: ut_unmap_unit_to_name()56470
Node: Symbols56819 Node: Symbols56841
Ref: ut_map_symbol_to_unit()57044 Ref: ut_map_symbol_to_unit()57066
Ref: ut_unmap_symbol_to_unit()57600 Ref: ut_unmap_symbol_to_unit()57622
Ref: ut_map_unit_to_symbol()57993 Ref: ut_map_unit_to_symbol()58015
Ref: ut_unmap_unit_to_symbol()58609 Ref: ut_unmap_unit_to_symbol()58631
Node: Time58984 Node: Time59006
Ref: ut_encode_time()59807 Ref: ut_encode_time()59829
Ref: ut_encode_date()60154 Ref: ut_encode_date()60176
Ref: ut_encode_clock()60521 Ref: ut_encode_clock()60543
Ref: ut_decode_time()60710 Ref: ut_decode_time()60866
Node: Errors61081 Node: Errors61237
Node: Status61453 Node: Status61609
Ref: ut_get_status()61738 Ref: ut_get_status()61894
Ref: ut_set_status()61880 Ref: ut_set_status()62036
Ref: ut_status61996 Ref: ut_status62152
Node: Messages63237 Node: Messages63393
Ref: ut_handle_error_message()63349 Ref: ut_handle_error_message()63505
Ref: ut_set_error_message_handler()63882 Ref: ut_set_error_message_handler()64038
Ref: ut_write_to_stderr()64205 Ref: ut_write_to_stderr()64361
Ref: ut_ignore()64668 Ref: ut_ignore()64824
Ref: ut_error_message_handler65009 Ref: ut_error_message_handler65165
Node: Database65203 Node: Database65359
Node: Types66070 Node: Types66226
Ref: ut_encoding66313 Ref: ut_encoding66469
Node: Complete Index66767 Node: Complete Index66923
 
End Tag Table End Tag Table
 End of changes. 10 change blocks. 
99 lines changed or deleted 101 lines changed or added

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