/*
Programmazione II - Include file
Example code: common definitions for ex1_w.c and ex1_r.c
(20000808 prelz@mi.infn.it)
*/
#ifndef EX1_H_INCLUDED
#define EX1_H_INCLUDED
typedef struct date_time_s
{
int day;
int month;
int year;
int hours;
int minutes;
} date_time;
typedef struct measurement_s
{
char observer_name[80];
date_time dt;
double temperature;
double value;
char comments[120];
} measurement;
#define SAFE_ASSIGN(string,value) \
(string)[sizeof(string)-1] = '\000'; \
strncpy((string),value,sizeof(string)-1);
#endif /* not def EX1_H_INCLUDED */