diff options
| author | Ashkan Ghassemi <[email protected]> | 2014-09-23 00:09:01 +0330 |
|---|---|---|
| committer | Ashkan Ghassemi <[email protected]> | 2014-09-23 00:09:01 +0330 |
| commit | 268cc7793c9d91b1fa47aaa8887f5c7362680dfb (patch) | |
| tree | 93b8f13a4a5cfd341ff41b65547c84c1303817bc | |
| parent | d9200f86fc61609ed55d81784a84553dc687a9c4 (diff) | |
| download | jcal-master.tar.gz | |
fixes to Makefile.am files incorrectly looking for system installed libjalali headers instead of those supplied inside the code.HEADmaster
| -rw-r--r-- | sources/libjalali/jalali.h | 2 | ||||
| -rw-r--r-- | sources/test_kit/Makefile.am | 1 | ||||
| -rw-r--r-- | sources/test_kit/jalali/elc.c | 23 | ||||
| -rw-r--r-- | sources/test_kit/jalali/get_date.c | 8 | ||||
| -rw-r--r-- | sources/test_kit/jalali/get_diff.c | 8 | ||||
| -rw-r--r-- | sources/test_kit/jalali/jalali_update.c | 6 | ||||
| -rw-r--r-- | sources/test_kit/jalali/jyinfo.c | 11 | ||||
| -rw-r--r-- | sources/test_kit/jalali/leap.c | 8 | ||||
| -rw-r--r-- | sources/test_kit/jalali/sec_converter.c | 8 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jasctime.c | 6 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jctime.c | 5 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jgmtime.c | 5 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jlocaltime.c | 5 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jmktime.c | 5 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jstrftime.c | 11 | ||||
| -rw-r--r-- | sources/test_kit/jtime/jstrptime.c | 5 |
16 files changed, 53 insertions, 64 deletions
diff --git a/sources/libjalali/jalali.h b/sources/libjalali/jalali.h index 01d1eba..c69463d 100644 --- a/sources/libjalali/jalali.h +++ b/sources/libjalali/jalali.h @@ -31,7 +31,7 @@ extern "C" { #endif #endif -#define LIBJALALI_VERSION "0.4.1" +#define LIBJALALI_VERSION "0.4.1gitd9200f" struct jtm { int tm_sec; /* Seconds. (0-59) */ diff --git a/sources/test_kit/Makefile.am b/sources/test_kit/Makefile.am index e01f096..6177365 100644 --- a/sources/test_kit/Makefile.am +++ b/sources/test_kit/Makefile.am @@ -1,2 +1 @@ SUBDIRS = jalali jtime - diff --git a/sources/test_kit/jalali/elc.c b/sources/test_kit/jalali/elc.c index db83cee..2d1d4e4 100644 --- a/sources/test_kit/jalali/elc.c +++ b/sources/test_kit/jalali/elc.c @@ -1,33 +1,32 @@ #include <stdio.h> #include <stdlib.h> -#include <jalali/jalali.h> +#include "jalali.h" int main(int argc, char** argv) { if (argc != 3) { - printf("wrong arguments given\n"); - printf("elc: leap counter from YEAR1 to YEAR2\n"); - printf("usage: elc YEAR1 YEAR2\n"); - exit(1); + printf("wrong arguments given\n"); + printf("elc: leap counter from YEAR1 to YEAR2\n"); + printf("usage: elc YEAR1 YEAR2\n"); + exit(1); } int i, s = atoi(argv[1]), e = atoi(argv[2]), c = 0; if (s > e) { - /* tricky swap */ - s = s+e; - e = s-e; - s = s-e; + /* tricky swap */ + s = s+e; + e = s-e; + s = s-e; } printf("leap years from %d to %d... ", s, e); for (i=s; i<=e; i++) { - if (jalali_is_jleap(i)) - c++; + if (jalali_is_jleap(i)) + c++; } printf("%d.\n", c); exit(0); } - diff --git a/sources/test_kit/jalali/get_date.c b/sources/test_kit/jalali/get_date.c index d6d39cd..6fb74ea 100644 --- a/sources/test_kit/jalali/get_date.c +++ b/sources/test_kit/jalali/get_date.c @@ -1,13 +1,13 @@ #include <stdio.h> #include <stdlib.h> -#include <jalali/jalali.h> +#include "jalali.h" int main(int argc, char** argv) { if (argc != 2) { - printf("wrong arguments given\n"); - printf("usage: get_date DIFF_FROM_EPOCH_BY_DAYS\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage: get_date DIFF_FROM_EPOCH_BY_DAYS\n"); + exit(1); } int p = atoi(argv[1]); diff --git a/sources/test_kit/jalali/get_diff.c b/sources/test_kit/jalali/get_diff.c index b6073f9..1e690cf 100644 --- a/sources/test_kit/jalali/get_diff.c +++ b/sources/test_kit/jalali/get_diff.c @@ -1,13 +1,13 @@ #include <stdio.h> #include <stdlib.h> -#include <jalali/jalali.h> +#include "jalali.h" int main(int argc, char** argv) { if (argc != 4) { - printf("wrong arguments given\n"); - printf("usage: get_diff DAY MONTH YEAR\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage: get_diff DAY MONTH YEAR\n"); + exit(1); } int d = atoi(argv[1]); diff --git a/sources/test_kit/jalali/jalali_update.c b/sources/test_kit/jalali/jalali_update.c index 5527e9c..3c44ecd 100644 --- a/sources/test_kit/jalali/jalali_update.c +++ b/sources/test_kit/jalali/jalali_update.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main(int argc, char** argv) { time_t t; @@ -12,7 +12,7 @@ int main(int argc, char** argv) { jlocaltime_r(&t, &j); puts("Current time jtm:"); jalali_show_time(&j); - + char ans; int* mem_ref; char* mem_name; diff --git a/sources/test_kit/jalali/jyinfo.c b/sources/test_kit/jalali/jyinfo.c index a1b3353..c462288 100644 --- a/sources/test_kit/jalali/jyinfo.c +++ b/sources/test_kit/jalali/jyinfo.c @@ -1,22 +1,21 @@ #include <stdio.h> #include <stdlib.h> -#include <jalali/jalali.h> +#include "jalali.h" int main(int argc, char** argv) { struct jyinfo a; if (argc != 2) { - printf("wrong arguments given\n"); - printf("usage: jyinfo YEAR\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage: jyinfo YEAR\n"); + exit(1); } a.y = atoi(argv[1]); jalali_get_jyear_info(&a); fprintf(stdout, "Year %d: lf = %d, apl = %d, pl = %d, rl = %d, p = %d, r = %d.\n", a.y, a.lf, - a.apl, a.pl, a.rl, a.p, a.r); + a.apl, a.pl, a.rl, a.p, a.r); exit(0); } - diff --git a/sources/test_kit/jalali/leap.c b/sources/test_kit/jalali/leap.c index 4f5b090..9fe6dea 100644 --- a/sources/test_kit/jalali/leap.c +++ b/sources/test_kit/jalali/leap.c @@ -1,13 +1,13 @@ #include <stdio.h> #include <stdlib.h> -#include <jalali/jalali.h> +#include "jalali.h" int main(int argc, char** argv) { if (argc != 2) { - printf("wrong arguments given\n"); - printf("usage: leap YEAR\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage: leap YEAR\n"); + exit(1); } printf("year %d leap status: %d.\n", atoi(argv[1]), jalali_is_jleap(atoi(argv[1]))); diff --git a/sources/test_kit/jalali/sec_converter.c b/sources/test_kit/jalali/sec_converter.c index 9207a3c..99b6dcf 100644 --- a/sources/test_kit/jalali/sec_converter.c +++ b/sources/test_kit/jalali/sec_converter.c @@ -1,13 +1,13 @@ #include <stdio.h> #include <stdlib.h> -#include "jalali/jalali.h" +#include "jalali.h" int main(int argc, char** argv) { if (argc != 2) { - printf("wrong arguments given\n"); - printf("usage: sec_converter SECONDS\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage: sec_converter SECONDS\n"); + exit(1); } struct ab_jtm a; diff --git a/sources/test_kit/jtime/jasctime.c b/sources/test_kit/jtime/jasctime.c index 8357c4d..156462e 100644 --- a/sources/test_kit/jtime/jasctime.c +++ b/sources/test_kit/jtime/jasctime.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { time_t ltime; @@ -17,5 +17,3 @@ int main() { printf("%s", jasctime(&j)); return 0; } - - diff --git a/sources/test_kit/jtime/jctime.c b/sources/test_kit/jtime/jctime.c index c07a107..8f63c4e 100644 --- a/sources/test_kit/jtime/jctime.c +++ b/sources/test_kit/jtime/jctime.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { time_t t; @@ -13,4 +13,3 @@ int main() { printf("%s", buf); return 0; } - diff --git a/sources/test_kit/jtime/jgmtime.c b/sources/test_kit/jtime/jgmtime.c index ffc4b57..a44d741 100644 --- a/sources/test_kit/jtime/jgmtime.c +++ b/sources/test_kit/jtime/jgmtime.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { time_t t; @@ -14,4 +14,3 @@ int main() { jalali_show_time(&j); return 0; } - diff --git a/sources/test_kit/jtime/jlocaltime.c b/sources/test_kit/jtime/jlocaltime.c index ac14294..b21205a 100644 --- a/sources/test_kit/jtime/jlocaltime.c +++ b/sources/test_kit/jtime/jlocaltime.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { time_t t; @@ -14,4 +14,3 @@ int main() { jalali_show_time(&j); return 0; } - diff --git a/sources/test_kit/jtime/jmktime.c b/sources/test_kit/jtime/jmktime.c index 932315c..0883883 100644 --- a/sources/test_kit/jtime/jmktime.c +++ b/sources/test_kit/jtime/jmktime.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { time_t t; @@ -12,4 +12,3 @@ int main() { printf("%d <-> %d\n", (int) jmktime(&j), (int) t); return 0; } - diff --git a/sources/test_kit/jtime/jstrftime.c b/sources/test_kit/jtime/jstrftime.c index 9e181dc..607f1a9 100644 --- a/sources/test_kit/jtime/jstrftime.c +++ b/sources/test_kit/jtime/jstrftime.c @@ -1,14 +1,14 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main(int argc, char** argv) { if (argc != 2) { - printf("wrong arguments given\n"); - printf("usage jstrftime FORMAT\n"); - exit(1); + printf("wrong arguments given\n"); + printf("usage jstrftime FORMAT\n"); + exit(1); } const char* fmt = argv[1]; @@ -24,4 +24,3 @@ int main(int argc, char** argv) { exit(0); } - diff --git a/sources/test_kit/jtime/jstrptime.c b/sources/test_kit/jtime/jstrptime.c index 191330e..11fa109 100644 --- a/sources/test_kit/jtime/jstrptime.c +++ b/sources/test_kit/jtime/jstrptime.c @@ -2,8 +2,8 @@ #include <time.h> #include <readline/readline.h> #include <readline/history.h> -#include <jalali/jalali.h> -#include <jalali/jtime.h> +#include "jalali.h" +#include "jtime.h" int main() { char *s; @@ -15,4 +15,3 @@ int main() { jalali_show_time(&j); return 0; } - |
