GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
xdrdatetime.c
Go to the documentation of this file.
1 #include <grass/dbmi.h>
2 #include "macros.h"
3 
4 
5 int db__send_datetime(dbDateTime * t)
6 {
7  DB_SEND_CHAR(t->current);
8  if (!t->current) {
9  DB_SEND_INT(t->year);
10  DB_SEND_INT(t->month);
11  DB_SEND_INT(t->day);
12  DB_SEND_INT(t->hour);
13  DB_SEND_INT(t->minute);
14  DB_SEND_DOUBLE(t->seconds);
15  }
16 
17  return DB_OK;
18 }
19 
20 int db__recv_datetime(dbDateTime * t)
21 {
22  DB_RECV_CHAR(&t->current);
23  if (!t->current) {
24  DB_RECV_INT(&t->year);
25  DB_RECV_INT(&t->month);
26  DB_RECV_INT(&t->day);
27  DB_RECV_INT(&t->hour);
28  DB_RECV_INT(&t->minute);
29  DB_RECV_DOUBLE(&t->seconds);
30  }
31 
32  return DB_OK;
33 }
int db__recv_datetime(dbDateTime *t)
Definition: xdrdatetime.c:20
#define DB_SEND_CHAR(x)
Definition: macros.h:23
#define DB_SEND_INT(x)
Definition: macros.h:37
#define DB_RECV_INT(x)
Definition: macros.h:39
#define DB_RECV_DOUBLE(x)
Definition: macros.h:49
int db__send_datetime(dbDateTime *t)
Definition: xdrdatetime.c:5
#define DB_SEND_DOUBLE(x)
Definition: macros.h:47
#define DB_RECV_CHAR(x)
Definition: macros.h:25