GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
xdrprocedure.c
Go to the documentation of this file.
1
#include "
xdr.h
"
2
#include "
macros.h
"
3
4
5
/******** client only ***************/
6
int
db__start_procedure_call
(
int
procnum
)
7
{
8
int
reply;
9
10
DB_SEND_INT
(procnum);
11
DB_RECV_INT
(&reply);
12
if
(reply != procnum) {
13
if
(reply == 0) {
14
db_noproc_error
(procnum);
15
}
16
else
{
17
db_protocol_error
();
18
}
19
return
DB_PROTOCOL_ERR;
20
}
21
22
return
DB_OK;
23
}
24
25
/***** driver only *******************/
26
27
/* return codes:
28
* DB_OK ok
29
* DB_EOF eof from client
30
*/
31
int
db__recv_procnum
(
int
*n)
32
{
33
int
stat = DB_OK;
34
35
if
(!
db__recv
(n,
sizeof
(*n)))
36
stat = DB_EOF;
37
38
return
stat;
39
}
40
41
int
db__send_procedure_ok
(
int
n)
42
{
43
return
db__send_int
(n);
44
}
45
46
int
db__send_procedure_not_implemented
(
int
n)
47
{
48
return
db__send_int
(n ? 0 : -1);
49
}
lib
db
dbmi_base
xdrprocedure.c
Generated on Sun Sep 9 2012 18:55:35 for GRASS Programmer's Manual by
1.8.1.2