GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
xdrchar.c
Go to the documentation of this file.
1 #include "xdr.h"
2 
3 
4 int db__send_char(int d)
5 {
6  int stat = DB_OK;
7  char c = (char)d;
8 
9  if (!db__send(&c, sizeof(c)))
10  stat = DB_PROTOCOL_ERR;
11 
12  if (stat == DB_PROTOCOL_ERR)
14 
15  return stat;
16 }
17 
18 
19 int db__recv_char(char *d)
20 {
21  int stat = DB_OK;
22 
23  if (!db__recv(d, sizeof(*d)))
24  stat = DB_PROTOCOL_ERR;
25 
26  if (stat == DB_PROTOCOL_ERR)
28 
29  return stat;
30 }