From 8ccbc025c4aeda5aeacf36b494ebc508fd7ff9c2 Mon Sep 17 00:00:00 2001 From: thib Date: Sat, 21 Apr 2001 08:52:16 +0000 Subject: [PATCH] Initial revision --- save.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 save.h diff --git a/save.h b/save.h new file mode 100644 index 0000000..6a1ca32 --- /dev/null +++ b/save.h @@ -0,0 +1,73 @@ +/* + * FCRON - periodic command scheduler + * + * Copyright 2000-2001 Thibault Godouet + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The GNU General Public License can also be found in the file + * `LICENSE' that comes with the fcron source distribution. + */ + + /* $Id: save.h,v 1.1 2001-04-21 08:52:16 thib Exp $ */ + + +/* here is the format fcron(tab) uses to save the fcrontabs : + * type(short int) + * size(short int) + * data + * unless for the options, which only have a type */ + + +/* kept for backward compatibility : we now have an extended + * save format with no use of such a fileversion (unless to know that + * the save file is in extended format, not an old one) */ +#define S_FILEVERSION 100 /* syntax's version of fcrontabs */ + + +/* type constants : DO NOT REMOVE ANY of them : they are used for backward + * compatibility. + * If necessary, add some. */ + +/* type is an unsigned short int */ + +/* header file types */ +#define S_HEADER_T 1 /* file version */ +#define S_USER_T 2 /* name of the fcrontab's owner */ +#define S_TIMEDATE_T 3 /* time and date of saving */ + +/* env var */ +#define S_ENVVAR_T 1000 /* an environment variable */ + +/* line field types */ +#define S_ENDLINE_T 2000 /* we need to know where a new line begin */ +#define S_SHELL_T 2001 /* shell command of the line */ +#define S_NUMEXE_T 2002 /* number of entries in lavg/serial queue */ +#define S_LAVG_T 2003 /* load averages needed (1, 5, 15 mins) */ +#define S_UNTIL_T 2004 /* timeout of the wait for a lavg value */ +#define S_NICE_T 2005 /* nice value to control priority */ +#define S_RUNAS_T 2006 /* determine permissions of the job */ +#define S_MAILTO_T 2007 /* mail output to cl_mailto */ +#define S_NEXTEXE_T 2008 /* time and date of the next execution */ +#define S_REMAIN_T 2009 /* remaining until next execution */ +#define S_TIMEFREQ_T 2010 /* Run every n seconds */ +#define S_RUNFREQ_T 2011 /* Run once every n matches */ +#define S_MINS_T 2012 /* mins boolean array */ +#define S_HRS_T 2013 /* hrs boolean array */ +#define S_DAYS_T 2014 /* days boolean array */ +#define S_MONS_T 2015 /* mons boolean array */ +#define S_DOW_T 2016 /* dow boolean array */ +#define S_OPTION_T 2017 /* options for that line (see option.h) */ + -- 2.40.0