1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
/*
spinner.h
vers 1.2.1
$Revision: 1.3 $
Copyright (C) 2002 Joe Laffey <joe@-REMOVE-THIS-laffeycomputer.com>
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
*/
#ifndef SPINNER_H
#define SPINNER_H
#ifndef VERSION
#define VERSION "1.2"
#endif
#ifndef PACKAGE
#define PACKAGE "spinner"
#endif
#include <sys/types.h>
/* deafult delay in seconds */
#define DEFAULT_DELAY 2
/*default process priority */
#define DEFAULT_PRIORITY 10
/* the name of the file to which to write our pid */
#define DEFAULT_PID_FILENAME ".spinner.pid"
/* the name of the file to which to write our log msgs*/
#define DEFAULT_LOG_FILENAME ".spinner.log"
/* timeout for opening a tty in seconds */
#define TTY_OPEN_TIMEOUT 8
/* path separator character - ought to determine dynamically */
#define PATH_SEPARATOR '/'
/* max length of the fail message */
#define MAX_FAIL_MSG_LEN 256
/* maximum length of the TERM env var - bounds are checked */
#define MAX_TERM_TYPE_LEN 64
#ifndef _POSIX_PATH_MAX
/* Not good */
#define _POSIX_PATH_MAX 256
#endif
#define MAXINT (~((unsigned int)1 << ((8 * sizeof(int)) - 1)))
#define ESCAPE 27
#define MAX( a , b ) ((a > b)?a:b)
/* max len of output string.. change if strings are changed below ( for cache )*/
#define OUTPUT_STR_MAX 16
#define VT100_RESET_CODE "\033c"
#define VT100_RESTORE_POS_AND_SETTINGS_CODE "\0338"
#define VT100_STORE_POS_AND_SETTINGS_CODE "\0337"
#define VT100_HOME_CODE "\033[H"
#define VT100_INVERSE_CODE "\033[7m"
#endif /* SPINNER_H */
|