GRASS Programmer's Manual 6.4.1(2011)
|
00001 00015 #include <stdlib.h> 00016 #include <grass/dbmi.h> 00017 #include "macros.h" 00018 #include "dbstubs.h" 00019 00026 int db_d_create_index(void) 00027 { 00028 dbIndex index; 00029 int stat; 00030 00031 /* get the arg(s) */ 00032 db_init_index(&index); 00033 DB_RECV_INDEX(&index); 00034 00035 /* call the procedure */ 00036 stat = db_driver_create_index(&index); 00037 00038 /* send the return code */ 00039 if (stat != DB_OK) { 00040 db_free_index(&index); 00041 DB_SEND_FAILURE(); 00042 return DB_OK; 00043 } 00044 DB_SEND_SUCCESS(); 00045 00046 /* send results */ 00047 DB_SEND_STRING(&index.indexName); 00048 db_free_index(&index); 00049 return DB_OK; 00050 }