GRASS 8 Programmer's Manual 8.6.0dev(2026)-55de52a352
Loading...
Searching...
No Matches
d_listdb.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_listdb.c
3 *
4 * \brief DBMI Library (driver) - list databases
5 *
6 * SPDX-FileCopyrightText: 1999-2008 GRASS Development Team
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 *
9 * \author Joel Jones (CERL/UIUC), Radim Blazek
10 */
11
12#include <stdlib.h>
13#include <grass/dbmi.h>
14#include "macros.h"
15#include "dbstubs.h"
16
17/*!
18 \brief List databases
19
20 \return DB_OK on success
21 \return DB_FAILED on failure
22 */
24{
27 int npaths;
28 int i, count;
29 int stat;
30
31 /* arg(s) */
33
34 /* call the procedure */
37
38 /* send the return code */
39 if (stat != DB_OK) {
41 return DB_OK;
42 }
44
45 /* send results */
47 for (i = 0; i < count; i++) {
49 }
51 return DB_OK;
52}
int db_d_list_databases(void)
List databases.
Definition d_listdb.c:23
Main header of GRASS DataBase Management Interface.
#define DB_OK
Definition dbmi.h:69
int(* db_driver_list_databases)(dbString *, int, dbHandle **, int *)
void db_free_string_array(dbString *, int)
Free allocated dbString array.
Definition string.c:161
void db_free_handle_array(dbHandle *, int)
Free array of handles.
Definition handle.c:88
int count
#define DB_SEND_INT(x)
Definition macros.h:82
#define DB_RECV_STRING_ARRAY(x, n)
Definition macros.h:44
#define DB_SEND_HANDLE(x)
Definition macros.h:126
#define DB_SEND_SUCCESS()
Definition macros.h:13
#define DB_SEND_FAILURE()
Definition macros.h:18
Definition path.h:15