d_add_col.c

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 #include <grass/dbmi.h>
00003 #include "macros.h"
00004 #include "dbstubs.h"
00005 
00012 int
00013 db_d_add_column()
00014 {
00015     dbColumn column;
00016     dbString name;
00017     int stat;
00018 
00019     db_init_string (&name);
00020     db_init_column (&column);
00021 
00022 /* get the arg(s) */
00023     DB_RECV_STRING(&name);
00024     DB_RECV_COLUMN_DEFINITION(&column);
00025 
00026 /* call the procedure */
00027     stat = db_driver_add_column (&name, &column);
00028     db_free_string (&name);
00029     db_free_column (&column);
00030 
00031 /* send the return code */
00032     if (stat != DB_OK)
00033     {
00034         DB_SEND_FAILURE();
00035         return DB_OK;
00036     }
00037     DB_SEND_SUCCESS();
00038 
00039 /* no results */
00040 
00041     return DB_OK;
00042 }

Generated on Sun Apr 6 17:31:38 2008 for GRASS by  doxygen 1.5.5