00001 00015 #include <grass/dbmi.h> 00016 #include "macros.h" 00017 #include "dbstubs.h" 00018 00025 int db_d_list_tables(void) 00026 { 00027 dbString *names; 00028 int count; 00029 int system; 00030 int stat; 00031 00032 /* arg(s) */ 00033 DB_RECV_INT(&system); 00034 00035 /* call the procedure */ 00036 stat = db_driver_list_tables(&names, &count, system); 00037 00038 /* send the return code */ 00039 if (stat != DB_OK) { 00040 DB_SEND_FAILURE(); 00041 return DB_OK; 00042 } 00043 DB_SEND_SUCCESS(); 00044 00045 /* send results */ 00046 DB_SEND_STRING_ARRAY(names, count); 00047 00048 return DB_OK; 00049 }