diff options
| author | Paul Eggert | 2011-03-11 12:24:09 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-11 12:24:09 -0800 |
| commit | 8be6f3188dd265704c5d19d09e84a36c5e33d403 (patch) | |
| tree | 50647ee1188e06abc05f1d8162099ce8c7c18023 /src | |
| parent | 14239447d34591d3bc90d0d447dd8253a37e49eb (diff) | |
| download | emacs-8be6f3188dd265704c5d19d09e84a36c5e33d403.tar.gz emacs-8be6f3188dd265704c5d19d09e84a36c5e33d403.zip | |
Move 'make_time' to be next to its inverse 'lisp_time_argument'.
* dired.c (make_time): Move to ...
* editfns.c (make_time): ... here.
* systime.h: Note the move.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/dired.c | 7 | ||||
| -rw-r--r-- | src/editfns.c | 13 | ||||
| -rw-r--r-- | src/systime.h | 5 |
4 files changed, 21 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4b54abe08dd..85100149c92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-03-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Move 'make_time' to be next to its inverse 'lisp_time_argument'. | ||
| 4 | * dired.c (make_time): Move to ... | ||
| 5 | * editfns.c (make_time): ... here. | ||
| 6 | * systime.h: Note the move. | ||
| 7 | |||
| 1 | 2011-03-11 Tom Tromey <tromey@redhat.com> | 8 | 2011-03-11 Tom Tromey <tromey@redhat.com> |
| 2 | 9 | ||
| 3 | * buffer.c (syms_of_buffer): Remove obsolete comment. | 10 | * buffer.c (syms_of_buffer): Remove obsolete comment. |
diff --git a/src/dired.c b/src/dired.c index 96063680d4d..d201418d78b 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -848,13 +848,6 @@ file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_ad | |||
| 848 | return value; | 848 | return value; |
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | Lisp_Object | ||
| 852 | make_time (time_t time) | ||
| 853 | { | ||
| 854 | return Fcons (make_number (time >> 16), | ||
| 855 | Fcons (make_number (time & 0177777), Qnil)); | ||
| 856 | } | ||
| 857 | |||
| 858 | static char * | 851 | static char * |
| 859 | stat_uname (struct stat *st) | 852 | stat_uname (struct stat *st) |
| 860 | { | 853 | { |
diff --git a/src/editfns.c b/src/editfns.c index 28690e7c76d..ec477f0e010 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1476,6 +1476,19 @@ on systems that do not provide resolution finer than a second. */) | |||
| 1476 | } | 1476 | } |
| 1477 | 1477 | ||
| 1478 | 1478 | ||
| 1479 | /* Make a Lisp list that represents the time T. */ | ||
| 1480 | Lisp_Object | ||
| 1481 | make_time (time_t t) | ||
| 1482 | { | ||
| 1483 | return Fcons (make_number (t >> 16), | ||
| 1484 | Fcons (make_number (t & 0177777), Qnil)); | ||
| 1485 | } | ||
| 1486 | |||
| 1487 | /* Decode a Lisp list SPECIFIED_TIME that represents a time. | ||
| 1488 | If SPECIFIED_TIME is nil, use the current time. | ||
| 1489 | Set *RESULT to seconds since the Epoch. | ||
| 1490 | If USEC is not null, set *USEC to the microseconds component. | ||
| 1491 | Return nonzero if successful. */ | ||
| 1479 | int | 1492 | int |
| 1480 | lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) | 1493 | lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) |
| 1481 | { | 1494 | { |
diff --git a/src/systime.h b/src/systime.h index eae302904fa..cb1ea230f7d 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -144,10 +144,8 @@ extern void set_waiting_for_input (EMACS_TIME *); | |||
| 144 | happen when this files is used outside the src directory). | 144 | happen when this files is used outside the src directory). |
| 145 | Use GCPRO1 to determine if lisp.h was included. */ | 145 | Use GCPRO1 to determine if lisp.h was included. */ |
| 146 | #ifdef GCPRO1 | 146 | #ifdef GCPRO1 |
| 147 | /* defined in dired.c */ | ||
| 148 | extern Lisp_Object make_time (time_t); | ||
| 149 | |||
| 150 | /* defined in editfns.c*/ | 147 | /* defined in editfns.c*/ |
| 148 | extern Lisp_Object make_time (time_t); | ||
| 151 | extern int lisp_time_argument (Lisp_Object, time_t *, int *); | 149 | extern int lisp_time_argument (Lisp_Object, time_t *, int *); |
| 152 | #endif | 150 | #endif |
| 153 | 151 | ||
| @@ -172,4 +170,3 @@ extern int lisp_time_argument (Lisp_Object, time_t *, int *); | |||
| 172 | #define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0) | 170 | #define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0) |
| 173 | 171 | ||
| 174 | #endif /* EMACS_SYSTIME_H */ | 172 | #endif /* EMACS_SYSTIME_H */ |
| 175 | |||