00001 #include <stdlib.h> 00002 #include <grass/dbmi.h> 00003 #include "macros.h" 00004 #include "dbstubs.h" 00005 00012 int 00013 db_d_delete_database() 00014 { 00015 dbHandle handle; 00016 int stat; 00017 00018 /* get the arg(s) */ 00019 db_init_handle (&handle); 00020 DB_RECV_HANDLE(&handle); 00021 00022 /* call the procedure */ 00023 stat = db_driver_delete_database (&handle); 00024 db_free_handle (&handle); 00025 00026 /* send the return code */ 00027 if (stat != DB_OK) 00028 { 00029 DB_SEND_FAILURE(); 00030 return DB_OK; 00031 } 00032 DB_SEND_SUCCESS(); 00033 00034 /* no results */ 00035 return DB_OK; 00036 }