[go: up one dir, main page]

File: unitAndId.h

package info (click to toggle)
udunits 2.1.23-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,024 kB
  • sloc: ansic: 21,710; sh: 9,512; xml: 2,129; yacc: 458; makefile: 391; lex: 260
file content (49 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright 2008, 2009 University Corporation for Atmospheric Research
 *
 * This file is part of the UDUNITS-2 package.  See the file LICENSE
 * in the top-level source-directory of the package for copying and
 * redistribution conditions.
 */
#ifndef UT_UNIT_SEARCH_NODE_H_INCLUDED
#define UT_UNIT_SEARCH_NODE_H_INCLUDED

#include "udunits2.h"

typedef struct {
    char*	id;
    ut_unit*	unit;
} UnitAndId;

#ifdef __cplusplus
extern "C" {
#endif


/*
 * Arguments:
 *	id	The identifier (name or symbol).  May be freed upon return.
 *	unit	The unit.  Must not be freed upon successful return until the
 *		returned unit-search-node is no longer needed.
 * Returns:
 *	NULL	"id" is NULL.
 *	NULL	"node" is NULL.
 *	NULL	Out of memory.
 *	else	Pointer to the new unit search node.
 */
UnitAndId*
uaiNew(
    const ut_unit* const	unit,
    const char* const	id);


void
uaiFree(
    UnitAndId* const	node);


#ifdef __cplusplus
}
#endif

#endif