GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
d_list_idx.c
Go to the documentation of this file.
1 
15 #include <stdlib.h>
16 #include <grass/dbmi.h>
17 #include "macros.h"
18 #include "dbstubs.h"
19 
27 {
28  dbIndex *list;
29  dbString table_name;
30  int count;
31  int stat;
32 
33  /* arg(s) */
34  db_init_string(&table_name);
35  DB_RECV_STRING(&table_name);
36 
37  /* call the procedure */
38  stat = db_driver_list_indexes(&table_name, &list, &count);
39  db_free_string(&table_name);
40 
41  /* send the return code */
42  if (stat != DB_OK) {
44  return DB_OK;
45  }
47 
48  /* send results */
49  DB_SEND_INDEX_ARRAY(list, count);
50  db_free_index_array(list, count);
51  return DB_OK;
52 }