diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-11-23 10:53:30 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-23 10:53:51 +0100 |
commit | a05a5b462d9af5bd333b640079bf05c6bf3b6dce (patch) | |
tree | e49b8bd8d128b5284344591e214bd6fec01eef22 | |
parent | 7a830d934ad2c962aefd9c44878d97f6c2852260 (diff) | |
download | mupdf-a05a5b462d9af5bd333b640079bf05c6bf3b6dce.tar.xz |
Make time stamps 64-bit integers.
Future proof the API for the Year 2038 problem.
-rw-r--r-- | include/mupdf/pdf/annot.h | 4 | ||||
-rw-r--r-- | source/pdf/pdf-annot-edit.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 3ec2bc1f..c55f22c5 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -207,12 +207,12 @@ void pdf_set_annot_author(fz_context *ctx, pdf_annot *annot, const char *author) /* pdf_annot_modification_date: Get annotation's modification date in seconds since the epoch. */ -int pdf_annot_modification_date(fz_context *ctx, pdf_annot *annot); +int64_t pdf_annot_modification_date(fz_context *ctx, pdf_annot *annot); /* pdf_set_annot_modification_date: Set annotation's modification date in seconds since the epoch. */ -void pdf_set_annot_modification_date(fz_context *ctx, pdf_annot *annot, int time); +void pdf_set_annot_modification_date(fz_context *ctx, pdf_annot *annot, int64_t time); /* pdf_set_free_text_details: set the position, text, font and color for a free text annotation. diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c index 3454ad97..64678240 100644 --- a/source/pdf/pdf-annot-edit.c +++ b/source/pdf/pdf-annot-edit.c @@ -863,7 +863,7 @@ pdf_format_date(fz_context *ctx, char *s, int n, time_t secs) strftime(s, n, "D:%Y%m%d%H%M%SZ", tm); } -static int +static int64_t pdf_parse_date(fz_context *ctx, const char *s) { int tz_sign, tz_hour, tz_min, tz_adj; @@ -969,7 +969,7 @@ static pdf_obj *markup_subtypes[] = { NULL, }; -int +int64_t pdf_annot_modification_date(fz_context *ctx, pdf_annot *annot) { pdf_obj *date = pdf_dict_get(ctx, annot->obj, PDF_NAME_M); @@ -977,7 +977,7 @@ pdf_annot_modification_date(fz_context *ctx, pdf_annot *annot) } void -pdf_set_annot_modification_date(fz_context *ctx, pdf_annot *annot, int secs) +pdf_set_annot_modification_date(fz_context *ctx, pdf_annot *annot, int64_t secs) { pdf_document *doc = annot->page->doc; char s[40]; |