GRASS Programmer's Manual
6.4.2(2012)
|
00001 #include <grass/dbmi.h> 00002 #include "macros.h" 00003 00004 00005 int db__send_datetime(dbDateTime * t) 00006 { 00007 DB_SEND_CHAR(t->current); 00008 if (!t->current) { 00009 DB_SEND_INT(t->year); 00010 DB_SEND_INT(t->month); 00011 DB_SEND_INT(t->day); 00012 DB_SEND_INT(t->hour); 00013 DB_SEND_INT(t->minute); 00014 DB_SEND_DOUBLE(t->seconds); 00015 } 00016 00017 return DB_OK; 00018 } 00019 00020 int db__recv_datetime(dbDateTime * t) 00021 { 00022 DB_RECV_CHAR(&t->current); 00023 if (!t->current) { 00024 DB_RECV_INT(&t->year); 00025 DB_RECV_INT(&t->month); 00026 DB_RECV_INT(&t->day); 00027 DB_RECV_INT(&t->hour); 00028 DB_RECV_INT(&t->minute); 00029 DB_RECV_DOUBLE(&t->seconds); 00030 } 00031 00032 return DB_OK; 00033 }