~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/db/dbmi_base/token.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
  \file db/dbmi_base/token.c
 
3
  
 
4
  \brief DBMI Library (base) - tokens management
 
5
  
 
6
  (C) 1999-2009 by the GRASS Development Team
 
7
  
 
8
  This program is free software under the GNU General Public
 
9
  License (>=v2). Read the file COPYING that comes with GRASS
 
10
  for details.
 
11
  
 
12
  \author Joel Jones (CERL/UIUC), Radim Blazek
 
13
*/
1
14
#include <grass/dbmi.h>
2
15
 
3
16
/* these routines manage a mapping between tokens (ints) and memory addresses */
7
20
static dbToken count = 0;
8
21
 
9
22
/*!
10
 
   \fn 
11
 
   \brief 
12
 
   \return 
13
 
   \param 
14
 
 */
 
23
  \brief Find token
 
24
 
 
25
  \param token pointer to dbToken
 
26
 
 
27
  \return dbAddress
 
28
  \return NULL if no token found
 
29
*/
15
30
dbAddress db_find_token(dbToken token)
16
31
{
17
32
    if (token >= 0 && token < count)
20
35
}
21
36
 
22
37
/*!
23
 
   \fn 
24
 
   \brief 
25
 
   \return 
26
 
   \param 
27
 
 */
 
38
  \brief Drop token
 
39
 
 
40
  \param token pointer to dbToken
 
41
*/
28
42
void db_drop_token(dbToken token)
29
43
{
30
44
    if (token >= 0 && token < count)
32
46
}
33
47
 
34
48
/*!
35
 
   \fn 
36
 
   \brief 
37
 
   \return 
38
 
   \param 
 
49
  \brief Add new token
 
50
 
 
51
  \param address dbAddress of token to be added
 
52
 
 
53
  \return dbToken
39
54
 */
40
55
dbToken db_new_token(dbAddress address)
41
56
{