GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
d_priv.c
Go to the documentation of this file.
1 
15 #include <stdlib.h>
16 #include <grass/dbmi.h>
17 #include "macros.h"
18 #include "dbstubs.h"
19 
27 {
28  dbString tableName;
29  int priv, to;
30  int stat;
31 
32  db_init_string(&tableName);
33 
34  /* get the arg(s) */
35  DB_RECV_STRING(&tableName);
36  DB_RECV_INT(&priv);
37  DB_RECV_INT(&to);
38 
39  /* call the procedure */
40  stat = db_driver_grant_on_table(&tableName, priv, to);
41  db_free_string(&tableName);
42 
43  /* send the return code */
44  if (stat != DB_OK) {
46  return DB_OK;
47  }
49 
50  /* no results */
51 
52  return DB_OK;
53 }
int(* db_driver_grant_on_table)()
int db_d_grant_on_table(void)
Grant privileges on table.
Definition: d_priv.c:26
#define DB_RECV_INT(x)
Definition: macros.h:39
int stat
Definition: g3dcolor.c:369
#define DB_SEND_FAILURE()
Definition: macros.h:9
#define DB_SEND_SUCCESS()
Definition: macros.h:7
void db_free_string(dbString *x)
Definition: string.c:142
void db_init_string(dbString *x)
Definition: string.c:11
#define DB_RECV_STRING(x)
Definition: macros.h:18