00001 #include <grass/dbmi.h> 00002 #include "macros.h" 00003 #include "dbstubs.h" 00004 00011 int 00012 db_d_list_tables() 00013 { 00014 dbString *names; 00015 int count; 00016 int system; 00017 int stat; 00018 00019 /* arg(s) */ 00020 DB_RECV_INT (&system); 00021 00022 /* call the procedure */ 00023 stat = db_driver_list_tables (&names, &count, system); 00024 00025 /* send the return code */ 00026 if (stat != DB_OK) 00027 { 00028 DB_SEND_FAILURE(); 00029 return DB_OK; 00030 } 00031 DB_SEND_SUCCESS(); 00032 00033 /* send results */ 00034 DB_SEND_STRING_ARRAY (names, count); 00035 00036 return DB_OK; 00037 }