GRASS Programmer's Manual  6.4.1(2011)
d_createdb.c
Go to the documentation of this file.
00001 
00015 #include <stdlib.h>
00016 #include <grass/dbmi.h>
00017 #include "macros.h"
00018 #include "dbstubs.h"
00019 
00026 int db_d_create_database(void)
00027 {
00028     dbHandle handle;
00029     int stat;
00030 
00031     /* get the arg(s) */
00032     db_init_handle(&handle);
00033     DB_RECV_HANDLE(&handle);
00034 
00035     /* call the procedure */
00036     stat = db_driver_create_database(&handle);
00037     db_free_handle(&handle);
00038 
00039     /* send the return code */
00040     if (stat != DB_OK) {
00041         DB_SEND_FAILURE();
00042         return DB_OK;
00043     }
00044     DB_SEND_SUCCESS();
00045 
00046     /* no results */
00047     return DB_OK;
00048 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines