xdrchar.c

Go to the documentation of this file.
00001 #include "xdr.h"
00002 
00003 
00004 int db__send_char(int d)
00005 {
00006     int stat = DB_OK;
00007     char c = (char)d;
00008 
00009     if (!db__send(&c, sizeof(c)))
00010         stat = DB_PROTOCOL_ERR;
00011 
00012     if (stat == DB_PROTOCOL_ERR)
00013         db_protocol_error();
00014 
00015     return stat;
00016 }
00017 
00018 
00019 int db__recv_char(char *d)
00020 {
00021     int stat = DB_OK;
00022 
00023     if (!db__recv(d, sizeof(*d)))
00024         stat = DB_PROTOCOL_ERR;
00025 
00026     if (stat == DB_PROTOCOL_ERR)
00027         db_protocol_error();
00028 
00029     return stat;
00030 }

Generated on Thu Jul 16 13:20:15 2009 for GRASS Programmer's Manual by  doxygen 1.5.6