diff options
| author | Richard M. Stallman | 1995-05-05 22:54:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-05 22:54:04 +0000 |
| commit | d65666d51d755d2ee7ddf56fc1f2c180e50e733f (patch) | |
| tree | 01fdeb3a6342c7da813ebdf57222d1d019e54943 | |
| parent | 66961910537b855c201407cc8416839bf432a464 (diff) | |
| download | emacs-d65666d51d755d2ee7ddf56fc1f2c180e50e733f.tar.gz emacs-d65666d51d755d2ee7ddf56fc1f2c180e50e733f.zip | |
(Fencode_time): Rename arg from min to minute.
(Fformat): Allow 30 characters in the printed version of integers and floats.
| -rw-r--r-- | src/editfns.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/editfns.c b/src/editfns.c index 783b2558972..f2ed73c5aec 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -736,7 +736,7 @@ ZONE is an integer indicating the number of seconds east of Greenwich.\n\ | |||
| 736 | } | 736 | } |
| 737 | 737 | ||
| 738 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, 7, 0, | 738 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, 7, 0, |
| 739 | "Convert SEC, MIN, HOUR, DAY, MONTH, YEAR and ZONE to internal time.\n\ | 739 | "Convert SEC, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.\n\ |
| 740 | This is the reverse operation of `decode-time', which see. ZONE defaults\n\ | 740 | This is the reverse operation of `decode-time', which see. ZONE defaults\n\ |
| 741 | to the current time zone and daylight savings time if not specified; if\n\ | 741 | to the current time zone and daylight savings time if not specified; if\n\ |
| 742 | specified, it can be either a list (as from `current-time-zone') or an\n\ | 742 | specified, it can be either a list (as from `current-time-zone') or an\n\ |
| @@ -744,15 +744,15 @@ integer (as from `decode-time'), and is applied without consideration for\n\ | |||
| 744 | daylight savings time.\n\ | 744 | daylight savings time.\n\ |
| 745 | Year numbers less than 100 are treated just like other year numbers.\n\ | 745 | Year numbers less than 100 are treated just like other year numbers.\n\ |
| 746 | If you them to stand for years above 1900, you must do that yourself.") | 746 | If you them to stand for years above 1900, you must do that yourself.") |
| 747 | (sec, min, hour, day, month, year, zone) | 747 | (sec, minute, hour, day, month, year, zone) |
| 748 | Lisp_Object sec, min, hour, day, month, year, zone; | 748 | Lisp_Object sec, minute, hour, day, month, year, zone; |
| 749 | { | 749 | { |
| 750 | time_t time; | 750 | time_t time; |
| 751 | int fullyear, mon, days, seconds, tz = 0; | 751 | int fullyear, mon, days, seconds, tz = 0; |
| 752 | static char days_per_month[11] = { 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 }; | 752 | static char days_per_month[11] = { 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 }; |
| 753 | 753 | ||
| 754 | CHECK_NATNUM (sec, 0); | 754 | CHECK_NATNUM (sec, 0); |
| 755 | CHECK_NATNUM (min, 1); | 755 | CHECK_NATNUM (minute, 1); |
| 756 | CHECK_NATNUM (hour, 2); | 756 | CHECK_NATNUM (hour, 2); |
| 757 | CHECK_NATNUM (day, 3); | 757 | CHECK_NATNUM (day, 3); |
| 758 | CHECK_NATNUM (month, 4); | 758 | CHECK_NATNUM (month, 4); |
| @@ -782,7 +782,7 @@ If you them to stand for years above 1900, you must do that yourself.") | |||
| 782 | days += 59; /* March 1 is 59th day. */ | 782 | days += 59; /* March 1 is 59th day. */ |
| 783 | days -= 719527; /* 1970 years = 719527 days */ | 783 | days -= 719527; /* 1970 years = 719527 days */ |
| 784 | 784 | ||
| 785 | seconds = XINT (sec) + 60 * XINT (min) + 3600 * XINT (hour); | 785 | seconds = XINT (sec) + 60 * XINT (minute) + 3600 * XINT (hour); |
| 786 | 786 | ||
| 787 | if (sizeof (time_t) == 4 | 787 | if (sizeof (time_t) == 4 |
| 788 | && ((days+(seconds/86400) > 24854) || (days+(seconds/86400) < -24854))) | 788 | && ((days+(seconds/86400) > 24854) || (days+(seconds/86400) < -24854))) |
| @@ -1827,14 +1827,14 @@ Use %% to put a single % into the output.") | |||
| 1827 | if (*format == 'e' || *format == 'f' || *format == 'g') | 1827 | if (*format == 'e' || *format == 'f' || *format == 'g') |
| 1828 | args[n] = Ffloat (args[n]); | 1828 | args[n] = Ffloat (args[n]); |
| 1829 | #endif | 1829 | #endif |
| 1830 | total += 10; | 1830 | total += 30; |
| 1831 | } | 1831 | } |
| 1832 | #ifdef LISP_FLOAT_TYPE | 1832 | #ifdef LISP_FLOAT_TYPE |
| 1833 | else if (FLOATP (args[n]) && *format != 's') | 1833 | else if (FLOATP (args[n]) && *format != 's') |
| 1834 | { | 1834 | { |
| 1835 | if (! (*format == 'e' || *format == 'f' || *format == 'g')) | 1835 | if (! (*format == 'e' || *format == 'f' || *format == 'g')) |
| 1836 | args[n] = Ftruncate (args[n]); | 1836 | args[n] = Ftruncate (args[n]); |
| 1837 | total += 20; | 1837 | total += 30; |
| 1838 | } | 1838 | } |
| 1839 | #endif | 1839 | #endif |
| 1840 | else | 1840 | else |