aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-05-05 22:54:04 +0000
committerRichard M. Stallman1995-05-05 22:54:04 +0000
commitd65666d51d755d2ee7ddf56fc1f2c180e50e733f (patch)
tree01fdeb3a6342c7da813ebdf57222d1d019e54943 /src/editfns.c
parent66961910537b855c201407cc8416839bf432a464 (diff)
downloademacs-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.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c14
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
738DEFUN ("encode-time", Fencode_time, Sencode_time, 6, 7, 0, 738DEFUN ("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\
740This is the reverse operation of `decode-time', which see. ZONE defaults\n\ 740This is the reverse operation of `decode-time', which see. ZONE defaults\n\
741to the current time zone and daylight savings time if not specified; if\n\ 741to the current time zone and daylight savings time if not specified; if\n\
742specified, it can be either a list (as from `current-time-zone') or an\n\ 742specified, 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\
744daylight savings time.\n\ 744daylight savings time.\n\
745Year numbers less than 100 are treated just like other year numbers.\n\ 745Year numbers less than 100 are treated just like other year numbers.\n\
746If you them to stand for years above 1900, you must do that yourself.") 746If 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