/* uptimed - Copyright (c) 1998-2004 Rob Kaper This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA. */ #define _GNU_SOURCE #include #include #include #include #include #include #ifdef xPLATFORM_BSD #include #include #include #endif #ifdef xPLATFORM_SOLARIS #include #include #include #include #endif #ifdef xPLATFORM_HPUX #include #include extern void snprintf(char *,...); #define _INCLUDE_HPUX_SOURCE #include #endif #ifdef xPLATFORM_UNKNOWN #include #endif #include "misc.h" typedef struct milestone { time_t time; /* uptime to reach */ char desc[SYSMAX+1]; /* little description */ struct milestone *next; } Milestone; extern Milestone *milestone_list; Milestone *add_milestone(time_t, char *); void del_milestone(Milestone *milestone); Milestone *find_next_milestone(time_t); time_t scantime(char *);