1996-06-16 04:49:29 +02:00
|
|
|
/*
|
|
|
|
* ttyload.h
|
|
|
|
*
|
|
|
|
* support file for ttyload.c
|
|
|
|
*
|
2011-02-07 00:28:01 +01:00
|
|
|
* Copyright 1996-2011 David Lindes.
|
|
|
|
* All rights reserved.
|
1996-06-16 04:49:29 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-10-25 05:39:17 +02:00
|
|
|
#include <time.h> /* because we use time_t inside this file */
|
|
|
|
|
1996-06-16 04:49:29 +02:00
|
|
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
|
|
|
#define MAX(a,b) (((a)>(b))?(a):(b))
|
|
|
|
|
|
|
|
#define ONE 01;
|
|
|
|
#define FIVE 02;
|
|
|
|
#define FIFTEEN 04;
|
|
|
|
|
|
|
|
typedef long load_t;
|
|
|
|
|
|
|
|
typedef struct load_list {
|
|
|
|
load_t one_minute;
|
|
|
|
load_t five_minute;
|
|
|
|
load_t fifteen_minute;
|
|
|
|
int height1;
|
|
|
|
int height5;
|
|
|
|
int height15;
|
2000-05-20 03:31:30 +02:00
|
|
|
int numloads;
|
1996-06-16 04:49:29 +02:00
|
|
|
} load_list;
|
|
|
|
|
2013-03-12 14:51:48 +01:00
|
|
|
/* storage for clock display along the bottom */
|
1996-06-16 21:28:21 +02:00
|
|
|
typedef struct clock_info {
|
|
|
|
int pos;
|
|
|
|
char clock[6];
|
2013-03-12 14:51:48 +01:00
|
|
|
time_t when;
|
1996-06-16 21:28:21 +02:00
|
|
|
} clock_info;
|
2001-08-28 03:00:31 +02:00
|
|
|
|
|
|
|
/* functions in arch-specific files: */
|
|
|
|
extern void getload(load_list *);
|
|
|
|
extern void gettermsize();
|