GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
d_add_col.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 
26 int db_d_add_column(void)
27 {
28  dbColumn column;
29  dbString name;
30  int stat;
31 
32  db_init_string(&name);
33  db_init_column(&column);
34 
35  /* get the arg(s) */
36  DB_RECV_STRING(&name);
38 
39  /* call the procedure */
40  stat = db_driver_add_column(&name, &column);
41  db_free_string(&name);
42  db_free_column(&column);
43 
44  /* send the return code */
45  if (stat != DB_OK) {
47  return DB_OK;
48  }
50 
51  /* no results */
52 
53  return DB_OK;
54 }
#define DB_RECV_COLUMN_DEFINITION(x)
Definition: macros.h:84
int db_d_add_column(void)
Add column to table.
Definition: d_add_col.c:26
string name
Definition: render.py:1314
void db_init_column(dbColumn *column)
int stat
Definition: g3dcolor.c:369
int(* db_driver_add_column)()
#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_free_column(dbColumn *column)
frees column structure
void db_init_string(dbString *x)
Definition: string.c:11
#define DB_RECV_STRING(x)
Definition: macros.h:18