Mercurial > emacs
comparison src/editfns.c @ 7710:36420d9e4b41
(difftm): Don't store a long value into an int variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 May 1994 02:06:50 +0000 |
parents | 987ab382275c |
children | 0b6f46029ea2 |
comparison
equal
deleted
inserted
replaced
7709:d88d94461e5d | 7710:36420d9e4b41 |
---|---|
627 struct tm *a, *b; | 627 struct tm *a, *b; |
628 { | 628 { |
629 int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); | 629 int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); |
630 int by = b->tm_year + (TM_YEAR_ORIGIN - 1); | 630 int by = b->tm_year + (TM_YEAR_ORIGIN - 1); |
631 /* Some compilers can't handle this as a single return statement. */ | 631 /* Some compilers can't handle this as a single return statement. */ |
632 int days = ( | 632 long days = ( |
633 /* difference in day of year */ | 633 /* difference in day of year */ |
634 a->tm_yday - b->tm_yday | 634 a->tm_yday - b->tm_yday |
635 /* + intervening leap days */ | 635 /* + intervening leap days */ |
636 + ((ay >> 2) - (by >> 2)) | 636 + ((ay >> 2) - (by >> 2)) |
637 - (ay/100 - by/100) | 637 - (ay/100 - by/100) |