diff options
| author | Richard M. Stallman | 1995-04-07 18:49:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-07 18:49:03 +0000 |
| commit | 57937a87a6f35e1b10e6f5ea7c63c90f5e5f2d7e (patch) | |
| tree | 00fd0d4ac3f5422e0b156ef32f29f307d4f98bb7 /src | |
| parent | 8d50503997ebc7e55d098e85ad1a77e4cce61f05 (diff) | |
| download | emacs-57937a87a6f35e1b10e6f5ea7c63c90f5e5f2d7e.tar.gz emacs-57937a87a6f35e1b10e6f5ea7c63c90f5e5f2d7e.zip | |
(Fformat): Cast int to pointer by way of EMACS_INT.
(Fformat_time_string): Use emacs_strftime. Doc fix.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c index 21e20485980..b08ac4c5d0b 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -666,7 +666,7 @@ FORMAT-STRING may contain %-sequences to substitute parts of the time.\n\ | |||
| 666 | %Y is replaced by the year with century.\n\ | 666 | %Y is replaced by the year with century.\n\ |
| 667 | %Z is replaced by the time zone abbreviation.\n\ | 667 | %Z is replaced by the time zone abbreviation.\n\ |
| 668 | \n\ | 668 | \n\ |
| 669 | The number of options reflects the strftime(3) function.") | 669 | The number of options reflects the `strftime' function.") |
| 670 | (format_string, time) | 670 | (format_string, time) |
| 671 | Lisp_Object format_string, time; | 671 | Lisp_Object format_string, time; |
| 672 | { | 672 | { |
| @@ -684,8 +684,8 @@ The number of options reflects the strftime(3) function.") | |||
| 684 | while (1) | 684 | while (1) |
| 685 | { | 685 | { |
| 686 | char *buf = (char *) alloca (size); | 686 | char *buf = (char *) alloca (size); |
| 687 | if (strftime (buf, size, XSTRING (format_string)->data, | 687 | if (emacs_strftime (buf, size, XSTRING (format_string)->data, |
| 688 | localtime (&value))) | 688 | localtime (&value))) |
| 689 | return build_string (buf); | 689 | return build_string (buf); |
| 690 | /* If buffer was too small, make it bigger. */ | 690 | /* If buffer was too small, make it bigger. */ |
| 691 | size *= 2; | 691 | size *= 2; |
| @@ -1773,8 +1773,8 @@ Use %% to put a single % into the output.") | |||
| 1773 | union { double d; int half[2]; } u; | 1773 | union { double d; int half[2]; } u; |
| 1774 | 1774 | ||
| 1775 | u.d = XFLOAT (args[n])->data; | 1775 | u.d = XFLOAT (args[n])->data; |
| 1776 | strings[i++] = (unsigned char *) u.half[0]; | 1776 | strings[i++] = (unsigned char *) (EMACS_INT) u.half[0]; |
| 1777 | strings[i++] = (unsigned char *) u.half[1]; | 1777 | strings[i++] = (unsigned char *) (EMACS_INT) u.half[1]; |
| 1778 | } | 1778 | } |
| 1779 | #endif | 1779 | #endif |
| 1780 | else | 1780 | else |