int flags = 0; /* Flag for common options and system state */
long interval = 0;
-char timestamp[64];
+char timestamp[TIMESTAMP_LEN];
struct sigaction alrm_act;
int print_gal_header(struct tm *rectime, char *sysname, char *release,
char *nodename, char *machine, int cpu_nr, int format)
{
- char cur_date[64];
+ char cur_date[TIMESTAMP_LEN];
int rc = 0;
if (rectime == NULL) {
#define DISP_HDR 1
+/* Timestamp buffer length */
+#define TIMESTAMP_LEN 64
+
/* Number of seconds per day */
#define SEC_PER_DAY 3600 * 24
unsigned int dm_major; /* Device-mapper major number */
long interval = 0;
-char timestamp[64];
+char timestamp[TIMESTAMP_LEN];
struct sigaction alrm_act;
*/
void write_stats(int curr, int dis)
{
- char cur_time[2][16];
+ char cur_time[2][TIMESTAMP_LEN];
/* Get previous timestamp */
if (is_iso_time_fmt()) {
*/
int write_stats(int curr, int dis)
{
- char cur_time[2][16];
+ char cur_time[2][TIMESTAMP_LEN];
/* Get previous timestamp */
if (is_iso_time_fmt()) {
#define BITMAP_SIZE(m) ((((m) + 1) / 8) + 1)
#define UTSNAME_LEN 65
-#define TIMESTAMP_LEN 64
#define HEADER_LINE_LEN 512
/*
struct file_magic *file_magic, struct file_header *file_hdr,
struct activity *act[], struct report_format *ofmt)
{
- char cur_date[32], cur_time[32];
+ char cur_date[TIMESTAMP_LEN], cur_time[TIMESTAMP_LEN];
int dp = 1;
unsigned int new_cpu_nr;
else {
/* Set date and time strings to be displayed for current record */
set_record_timestamp_string(l_flags, record_hdr,
- cur_date, cur_time, 32, rectime);
+ cur_date, cur_time, TIMESTAMP_LEN, rectime);
}
if (rtype == R_RESTART) {
{
int i;
unsigned long long dt, itv, g_itv;
- char cur_date[32], cur_time[32], *pre = NULL;
+ char cur_date[TIMESTAMP_LEN], cur_time[TIMESTAMP_LEN], *pre = NULL;
static int cross_day = FALSE;
if (reset_cd) {
/* Set date and time strings for current record */
set_record_timestamp_string(flags, &record_hdr[curr],
- cur_date, cur_time, 32, rectime);
+ cur_date, cur_time, TIMESTAMP_LEN, rectime);
if (*fmt[f_position]->f_timestamp) {
pre = (char *) (*fmt[f_position]->f_timestamp)(parm, F_BEGIN, cur_date, cur_time,
struct activity *act[], unsigned int id_seq[])
{
struct tm rectime, *loc_t;
- char cur_time[32];
+ char cur_time[TIMESTAMP_LEN];
int *tab = (int *) parm;
if (action & F_BEGIN) {
struct activity *act[], unsigned int id_seq[])
{
struct tm rectime, *loc_t;
- char cur_time[32];
+ char cur_time[TIMESTAMP_LEN];
int *tab = (int *) parm;
if (action & F_BEGIN) {
{
int i, p;
struct tm rectime, *loc_t;
- char cur_time[32];
+ char cur_time[TIMESTAMP_LEN];
/* Actions F_MAIN and F_END ignored */
if (action & F_BEGIN) {
{
struct record_header stamp;
struct tm rectime;
- char cur_time[32];
+ char cur_time[TIMESTAMP_LEN];
int j;
stamp.ust_time = svg_p->ust_time_ref; /* Only ust_time field needs to be set. TRUE_TIME not allowed */
/* Display vertical lines */
sa_get_record_timestamp_struct(flags, &stamp, &rectime, NULL);
- set_record_timestamp_string(flags, &stamp, NULL, cur_time, 32, &rectime);
+ set_record_timestamp_string(flags, &stamp, NULL, cur_time, TIMESTAMP_LEN, &rectime);
printf("<polyline points=\"%ld,0 %ld,%d\" style=\"vector-effect: non-scaling-stroke; "
"stroke: #202020\" transform=\"scale(%f,1)\"/>\n",
xpos * j, xpos * j, -SVG_G_YSIZE, xfactor);
int flags = 0; /* Flag for common options and system state */
long interval = 0;
-char timestamp[64];
+char timestamp[TIMESTAMP_LEN];
struct sigaction alrm_act;