18 #include <sys/types.h>
47 if ((modestr = getenv(
"GRASS_DB_DRIVER_GISRC_MODE"))) {
91 _setmode(_fileno(stdin), _O_BINARY);
92 _setmode(_fileno(stdout), _O_BINARY);
103 sscanf(argv[1],
"%d", &rfd);
104 sscanf(argv[2],
"%d", &wfd);
105 send = fdopen(wfd,
"w");
110 recv = fdopen(rfd,
"r");
124 #ifndef USE_BUFFERED_IO
147 for (i = 0; procedure[i].routine; i++)
164 exit(stat ==
DB_OK ? 0 : 1);
int db_driver(int argc, char *argv[])
Get driver (?)
#define DB_PROC_SHUTDOWN_DRIVER
int(* db_driver_finish)(void)
int(* db_driver_init)(int, char **)
int db__send_procedure_ok(int)
?
int db__recv_procnum(int *)
? (driver only)
void db_clear_error(void)
Clear error status.
int db__send_success(void)
Send success code.
int db__send_failure(void)
Send failure code.
int db__send_procedure_not_implemented(int)
?
void db_auto_print_protocol_errors(int)
Set auto print protocol error.
void db__init_driver_state(void)
Initialize driver state.
void db__set_protocol_fds(FILE *, FILE *)
?
void db_syserror(const char *)
Report system error.
void db_auto_print_errors(int)
Toggles printing of DBMI error messages.
void G_set_gisrc_mode(int)
Set where to find/store variables.
const char * G_getenv(const char *)
Get environment variable.
int G_debug(int, const char *,...) __attribute__((format(printf
void G_setenv_nogisrc(const char *, const char *)
Set environment name to value (doesn't update .gisrc)
#define G_GISRC_MODE_MEMORY