diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-23 18:46:38 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-23 19:03:57 +0100 |
commit | 1f0f05ecc1aae138b700df9ff2200abf4fd110f2 (patch) | |
tree | 1430bfcd2f79c47b2329c40320e67ecf3fa783c2 /src/args.c | |
parent | 7733d52f3249fee2a1d875d6923b8d2506dea5e4 (diff) | |
parent | 0ea23c24bf06e153bb075804e195e1733fd67d3f (diff) | |
download | calcurse-1f0f05ecc1aae138b700df9ff2200abf4fd110f2.zip |
Merge branch 'maint'
Conflicts:
src/day.c
src/recur.c
Diffstat (limited to 'src/args.c')
-rw-r--r-- | src/args.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -270,11 +270,11 @@ static void arg_print_date(long date) { char date_str[BUFSIZ]; time_t t; - struct tm *lt; + struct tm lt; t = date; - lt = localtime(&t); - strftime(date_str, BUFSIZ, conf.output_datefmt, lt); + localtime_r(&t, <); + strftime(date_str, BUFSIZ, conf.output_datefmt, <); fputs(date_str, stdout); fputs(":\n", stdout); } @@ -366,7 +366,7 @@ date_arg(const char *ddate, int add_line, const char *fmt_apt, * to format the output correctly. */ timer = time(NULL); - t = *localtime(&timer); + localtime_r(&timer, &t); display_app(&t, numdays, add_line, fmt_apt, fmt_rapt, fmt_ev, fmt_rev, regex); } else { /* a date was entered */ @@ -412,7 +412,7 @@ date_arg_extended(const char *startday, const char *range, int add_line, numdays = atoi(range); } timer = time(NULL); - t = *localtime(&timer); + localtime_r(&timer, &t); if (startday != NULL) { if (parse_date(startday, conf.input_datefmt, (int *)&t.tm_year, (int *)&t.tm_mon, (int *)&t.tm_mday, NULL)) { |