int getyear(void) { long t; struct tm *tm; t = time(NULL); tm = localtime(&t); return(1900+tm->tm_year); }