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