git://git.jankratochvil.net
/
timeplan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9ce0318
)
Fixed some recent GCC + 64-bit arch warnings.
master
author
lace
<>
Mon, 21 May 2007 14:19:20 +0000
(14:19 +0000)
committer
lace
<>
Mon, 21 May 2007 14:19:20 +0000
(14:19 +0000)
timeplan.c
patch
|
blob
|
history
diff --git
a/timeplan.c
b/timeplan.c
index
924f0d8
..
5021932
100644
(file)
--- a/
timeplan.c
+++ b/
timeplan.c
@@
-39,9
+39,9
@@
static unsigned long lifetime_seq=1;
static void usage(void)
{
static void usage(void)
{
- fprintf(stderr,"
\
-%s\
-This command summarizes the timelog information:\n\
+ fprintf(stderr,"
%s%s%s",
+version,
+
"
This command summarizes the timelog information:\n\
\n\
Usage: timeplan [-u|--unsort] [-s|--stores] [-T|--timetot] [-t|--tree]\n\
[-c|--condition <cond>] [-f|--formtotal <fmtstring>]\n\
\n\
Usage: timeplan [-u|--unsort] [-s|--stores] [-T|--timetot] [-t|--tree]\n\
[-c|--condition <cond>] [-f|--formtotal <fmtstring>]\n\
@@
-51,6
+51,7
@@
Usage: timeplan [-u|--unsort] [-s|--stores] [-T|--timetot] [-t|--tree]\n\
-u, --unsort\t\tDon't sort the result in any way\n\
-s, --stores\t\tSort the result by stores count\n\
-T, --timetot\t\tSort the result by total time (default)\n\
-u, --unsort\t\tDon't sort the result in any way\n\
-s, --stores\t\tSort the result by stores count\n\
-T, --timetot\t\tSort the result by total time (default)\n\
+","\
-t, --tree\t\tOrganize data as hierarchy tree\n\
-a, --average\t\tDisplay all times as average-per-day value\n\
-c, --condition\tDefine condition variable\n\
-t, --tree\t\tOrganize data as hierarchy tree\n\
-a, --average\t\tDisplay all times as average-per-day value\n\
-c, --condition\tDefine condition variable\n\
@@
-59,7
+60,7
@@
Usage: timeplan [-u|--unsort] [-s|--stores] [-T|--timetot] [-t|--tree]\n\
-v, --verbose\t\tInform about phases of transfer\n\
-h, --help\t\tPrint a summary of the options\n\
-V, --version\t\tPrint the version number\n\
-v, --verbose\t\tInform about phases of transfer\n\
-h, --help\t\tPrint a summary of the options\n\
-V, --version\t\tPrint the version number\n\
-"
,version
);
+");
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
@@
-114,7
+115,7
@@
char *end,*s2;
for (s2=s+1;isdigit(*s2);s2++);
l=strtol(s+1,&end,10);
if (end!=s2) {
for (s2=s+1;isdigit(*s2);s2++);
l=strtol(s+1,&end,10);
if (end!=s2) {
- fprintf(ERRH1"Number parse error at column %
d of formtotal string!\n",ERRH2,s-formtotal
);
+ fprintf(ERRH1"Number parse error at column %
ld of formtotal string!\n",ERRH2,(long)(s-formtotal)
);
exit(EXIT_FAILURE);
}
if (*s=='*') tot*=l;
exit(EXIT_FAILURE);
}
if (*s=='*') tot*=l;
@@
-309,12
+310,12
@@
int isplus;
while (isspace(*s)) s++;
if (*s==':') break;
if (!isalpha(*s)) {
while (isspace(*s)) s++;
if (*s==':') break;
if (!isalpha(*s)) {
- fprintf(ERRH1"Invalid character at offset %
d"WHERE1,ERRH2,s-buf+1
,WHERE2);
+ fprintf(ERRH1"Invalid character at offset %
ld"WHERE1,ERRH2,(long)(s-buf+1)
,WHERE2);
exit(EXIT_FAILURE);
}
for (s2=s+1;isalpha(*s2);s2++);
if (*s2!='+' && *s2!='-') {
exit(EXIT_FAILURE);
}
for (s2=s+1;isalpha(*s2);s2++);
if (*s2!='+' && *s2!='-') {
- fprintf(ERRH1"Only plus ('+') or minus ('-'), not '%c' expected at offset %
d"WHERE1,ERRH2,*s2,s2-buf+1
,WHERE2);
+ fprintf(ERRH1"Only plus ('+') or minus ('-'), not '%c' expected at offset %
ld"WHERE1,ERRH2,*s2,(long)(s2-buf+1)
,WHERE2);
exit(EXIT_FAILURE);
}
isplus=(*s2=='+'); *s2++='\0';
exit(EXIT_FAILURE);
}
isplus=(*s2=='+'); *s2++='\0';