svn commit: r211724 - in user/edwin/calendar: . calendars
calendars/ru_RU.KOI8-R
Edwin Groothuis
edwin at FreeBSD.org
Mon Aug 23 22:21:37 UTC 2010
Author: edwin
Date: Mon Aug 23 22:21:37 2010
New Revision: 211724
URL: http://svn.freebsd.org/changeset/base/211724
Log:
Merge with head to revision r211721
Modified:
user/edwin/calendar/calendars/calendar.dutch
user/edwin/calendar/calendars/calendar.freebsd
user/edwin/calendar/calendars/calendar.history
user/edwin/calendar/calendars/ru_RU.KOI8-R/calendar.common (contents, props changed)
user/edwin/calendar/io.c
user/edwin/calendar/locale.c
user/edwin/calendar/parsedata.c
user/edwin/calendar/sunpos.c
Directory Properties:
user/edwin/calendar/ (props changed)
Modified: user/edwin/calendar/calendars/calendar.dutch
==============================================================================
--- user/edwin/calendar/calendars/calendar.dutch Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/calendars/calendar.dutch Mon Aug 23 22:21:37 2010 (r211724)
@@ -18,7 +18,7 @@ mei/01 Dag van de Arbeid
mei/04 Dodenherdenking
mei/05 Bevrijdingsdag
okt/04 Dierendag
-nov/01 Allerheilingen
+nov/01 Allerheiligen
nov/02 Allerzielen
nov/11 Sint Maarten
nov/11 Elfde-van-de-elfde
Modified: user/edwin/calendar/calendars/calendar.freebsd
==============================================================================
--- user/edwin/calendar/calendars/calendar.freebsd Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/calendars/calendar.freebsd Mon Aug 23 22:21:37 2010 (r211724)
@@ -72,6 +72,7 @@
03/03 Doug White <dwhite at FreeBSD.org> born in Eugene, Oregon, United States, 1977
03/03 Gordon Tetlow <gordon at FreeBSD.org> born in Reno, Nevada, United States, 1978
03/04 Oleksandr Tymoshenko <gonzo at FreeBSD.org> born in Chernihiv, Ukraine, 1980
+03/05 Baptiste Daroussin <bapt at FreeBSD.org> born in Beauvais, France, 1980
03/05 Philip Paeps <philip at FreeBSD.org> born in Leuven, Belgium, 1983
03/05 Ulf Lilleengen <lulf at FreeBSD.org> born in Hamar, Norway, 1985
03/06 Christopher Piazza <cpiazza at FreeBSD.org> born in Kamloops, British Columbia, Canada, 1981
@@ -82,6 +83,7 @@
03/12 Greg Lewis <glewis at FreeBSD.org> born in Adelaide, South Australia, Australia, 1969
03/13 Alexander Leidinger <netchild at FreeBSD.org> born in Neunkirchen, Saarland, Germany, 1976
03/13 Will Andrews <will at FreeBSD.org> born in Pontiac, Michigan, United States, 1982
+03/14 Bernhard Froehlich <decke at FreeBSD.org> born in Graz, Styria, Austria, 1985
03/15 Paolo Pisati <piso at FreeBSD.org> born in Lodi, Italy, 1977
03/15 Brian Fundakowski Feldman <green at FreeBSD.org> born in Alexandria, Virginia, United States, 1983
03/17 Michael Smith <msmith at FreeBSD.org> born in Bankstown, New South Wales, Australia, 1971
@@ -91,6 +93,7 @@
03/20 MANTANI Nobutaka <nobutaka at FreeBSD.org> born in Hiroshima, Japan, 1978
03/20 Cameron Grant <cg at FreeBSD.org> died in Hemel Hempstead, United Kingdom, 2005
03/20 Henrik Brix Andersen <brix at FreeBSD.org> born in Aarhus, Denmark, 1978
+03/20 Joseph S. Atkinson <jsa at FreeBSD.org> born in Batesville, Arkansas, United States, 1977
03/22 Brad Davis <brd at FreeBSD.org> born in Farmington, New Mexico, United States, 1983
03/23 Daniel C. Sobral <dcs at FreeBSD.org> born in Brasilia, Distrito Federal, Brazil, 1971
03/23 Benno Rice <benno at FreeBSD.org> born in Adelaide, South Australia, Australia, 1977
@@ -198,6 +201,7 @@
07/19 Masafumi NAKANE <max at FreeBSD.org> born in Okazaki, Aichi, Japan, 1972
07/19 Simon L. Nielsen <simon at FreeBSD.org> born in Copenhagen, Denmark, 1980
07/19 Gleb Smirnoff <glebius at FreeBSD.org> born in Kharkov, USSR, 1981
+07/20 Andrey V. Elsukov <ae at FreeBSD.org> born in Kotelnich, Russian Federation, 1981
07/22 James Housley <jeh at FreeBSD.org> born in Chicago, Illinois, United States, 1965
07/22 Jens Schweikhardt <schweikh at FreeBSD.org> born in Waiblingen, Baden-Wuerttemberg, Germany, 1967
07/22 Lukas Ertl <le at FreeBSD.org> born in Weissenbach/Enns, Steiermark, Austria, 1976
@@ -247,6 +251,7 @@
09/12 Benedict Christopher Reuschling <bcr at FreeBSD.org> born in Darmstadt, Germany, 1981
09/15 Dima Panov <fluffy at FreeBSD.org> born in Khabarovsk, Russian Federation, 1978
09/17 Maxim Bolotin <mb at FreeBSD.org> born in Rostov-on-Don, Russian Federation, 1976
+09/18 Matthew Fleming <mdf at FreeBSD.org> born in Cleveland, Ohio, United States, 1975
09/20 Kevin Lo <kevlo at FreeBSD.org> born in Taipei, Taiwan, Republic of China, 1972
09/27 Neil Blakey-Milner <nbm at FreeBSD.org> born in Port Elizabeth, South Africa, 1978
09/27 Renato Botelho <garga at FreeBSD.org> born in Araras, Sao Paulo, Brazil, 1979
@@ -279,6 +284,7 @@
11/10 Gregory Neil Shapiro <gshapiro at FreeBSD.org> born in Providence, Rhode Island, United States, 1970
11/13 John Baldwin <jhb at FreeBSD.org> born in Stuart, Virginia, United States, 1977
11/15 Lars Engels <lme at FreeBSD.org> born in Hilden, Nordrhein-Westfalen, Germany, 1980
+11/15 Tijl Coosemans <tijl at FreeBSD.org> born in Duffel, Belgium, 1983
11/16 Jose Maria Alcaide Salinas <jmas at FreeBSD.org> born in Madrid, Spain, 1962
11/17 Ralf S. Engelschall <rse at FreeBSD.org> born in Dachau, Bavaria, Germany, 1972
11/18 Thomas Quinot <thomas at FreeBSD.org> born in Paris, France, 1977
Modified: user/edwin/calendar/calendars/calendar.history
==============================================================================
--- user/edwin/calendar/calendars/calendar.history Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/calendars/calendar.history Mon Aug 23 22:21:37 2010 (r211724)
@@ -80,7 +80,6 @@
03/15 Watts, Los Angeles, riots kill two, injure 25, 1966
03/15 Ides of March. Gaius Julius Caesar assassinated by senators,
including adoptive son Marcus Junius Brutus Caepio, 44BC
-03/16 First liquid-fuel-powered rocket flight, 1926
03/16 MyLai Massacre; 300 non-combatant villagers killed by US infantrymen
03/16 Robert Goddard launches first liquid-fueled rocket, Auburn MA, 1926
03/17 Vanguard I launched, 1958. Earth proved pear-shaped
Modified: user/edwin/calendar/calendars/ru_RU.KOI8-R/calendar.common
==============================================================================
--- user/edwin/calendar/calendars/ru_RU.KOI8-R/calendar.common Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/calendars/ru_RU.KOI8-R/calendar.common Mon Aug 23 22:21:37 2010 (r211724)
@@ -18,6 +18,7 @@ LANG=ru_RU.KOI8-R
10 ÆÅ× äÅÎØ ÄÉÐÌÏÍÁÔÉÞÅÓËÏÇÏ ÒÁÂÏÔÎÉËÁ
1 ÍÁÒ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÇÒÁÖÄÁÎÓËÏÊ ÏÂÏÒÏÎÙ
03/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÇÅÏÄÅÚÉÉ É ËÁÒÔÏÇÒÁÆÉÉ
+11 ÍÁÒ äÅÎØ ÒÁÂÏÔÎÉËÁ ÏÒÇÁÎÏ× ÎÁÒËÏËÏÎÔÒÏÌÑ
18 ÍÁÒ äÅÎØ ÎÁÌÏÇÏ×ÏÊ ÐÏÌÉÃÉÉ
03/SunThird äÅÎØ ÒÁÂÏÔÎÉËÏ× ÔÏÒÇÏ×ÌÉ, ÂÙÔÏ×ÏÇÏ ÏÂÓÌÕÖÉ×ÁÎÉÑ ÎÁÓÅÌÅÎÉÑ É ÖÉÌÉÝÎÏ-ËÏÍÍÕÎÁÌØÎÏÇÏ ÈÏÚÑÊÓÔ×Á
27 ÍÁÒ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÔÅÁÔÒÁ
@@ -33,22 +34,28 @@ LANG=ru_RU.KOI8-R
17 ÍÁÊ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÔÅÌÅËÏÍÍÕÎÉËÁÃÉÊ
18 ÍÁÊ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÍÕÚÅÅ×
24 ÍÁÊ äÅÎØ ÓÌÁ×ÑÎÓËÏÊ ÐÉÓØÍÅÎÎÏÓÔÉ É ËÕÌØÔÕÒÙ
+26 ÍÁÊ äÅÎØ ÒÏÓÓÉÊÓËÏÇÏ ÐÒÅÄÐÒÉÎÉÍÁÔÅÌØÓÔ×Á
27 ÍÁÊ ïÂÝÅÒÏÓÓÉÊÓËÉÊ ÄÅÎØ ÂÉÂÌÉÏÔÅË
28 ÍÁÊ äÅÎØ ÐÏÇÒÁÎÉÞÎÉËÁ
+30 ÍÁÊ äÅÎØ ÐÏÖÁÒÎÏÊ ÏÈÒÁÎÙ
+31 ÍÁÊ äÅÎØ òÏÓÓÉÊÓËÏÊ áÄ×ÏËÁÔÕÒÙ
05/SunLast äÅÎØ ÈÉÍÉËÁ
1 ÉÀÎ äÅÎØ ÚÁÝÉÔÙ ÄÅÔÅÊ
+ 5 ÉÀÎ äÅÎØ ÜËÏÌÏÇÁ
6 ÉÀÎ ðÕÛËÉÎÓËÉÊ ÄÅÎØ
8 ÉÀÎ äÅÎØ ÓÏÃÉÁÌØÎÏÇÏ ÒÁÂÏÔÎÉËÁ
06/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÌÅÇËÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ
06/SunThird äÅÎØ ÍÅÄÉÃÉÎÓËÏÇÏ ÒÁÂÏÔÎÉËÁ
22 ÉÀÎ äÅÎØ ÐÁÍÑÔÉ É ÓËÏÒÂÉ (îÁÞÁÌÏ ÷ÅÌÉËÏÊ ïÔÅÞÅÓÔ×ÅÎÎÏÊ ÷ÏÊÎÙ, 1941 ÇÏÄ)
27 ÉÀÎ äÅÎØ ÍÏÌÏÄÅÖÉ
+29 ÉÀÎ äÅÎØ ÐÁÒÔÉÚÁÎ É ÐÏÄÐÏÌØÝÉËÏ×
06/SatLast äÅÎØ ÉÚÏÂÒÅÔÁÔÅÌÑ É ÒÁÃÉÏÎÁÌÉÚÁÔÏÒÁ
07/SunFirst äÅÎØ ÒÁÂÏÔÎÉËÏ× ÍÏÒÓËÏÇÏ É ÒÅÞÎÏÇÏ ÆÌÏÔÁ
07/SunSecond äÅÎØ ÒÙÂÁËÁ
07/SunSecond äÅÎØ ÒÏÓÓÉÊÓËÏÊ ÐÏÞÔÙ
07/SunThird äÅÎØ ÍÅÔÁÌÌÕÒÇÁ
07/SunLast äÅÎØ ÷ÏÅÎÎÏ-íÏÒÓËÏÇÏ æÌÏÔÁ
+28 ÉÀÌ äÅÎØ ËÒÅÝÅÎÉÑ òÕÓÉ
6 Á×Ç äÅÎØ ÖÅÌÅÚÎÏÄÏÒÏÖÎÙÈ ×ÏÊÓË
08/SunFirst äÅÎØ ÖÅÌÅÚÎÏÄÏÒÏÖÎÉËÁ
12 Á×Ç äÅÎØ ×ÏÅÎÎÏ-×ÏÚÄÕÛÎÙÈ ÓÉÌ
@@ -59,12 +66,16 @@ LANG=ru_RU.KOI8-R
08/SunLast äÅÎØ ÛÁÈÔÅÒÁ
1 ÓÅÎ äÅÎØ ÚÎÁÎÉÊ
2 ÓÅÎ äÅÎØ ÒÏÓÓÉÊÓËÏÊ Ç×ÁÒÄÉÉ
+ 3 ÓÅÎ äÅÎØ ÓÏÌÉÄÁÒÎÏÓÔÉ × ÂÏÒØÂÅ Ó ÔÅÒÒÏÒÉÚÍÏÍ
+ 4 ÓÅÎ äÅÎØ ÓÐÅÃÉÁÌÉÓÔÁ ÐÏ ÑÄÅÒÎÏÍÕ ÏÂÅÓÐÅÞÅÎÉÀ
09/SunFirst äÅÎØ ÒÁÂÏÔÎÉËÏ× ÎÅÆÔÑÎÏÊ É ÇÁÚÏ×ÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ
09/SunSecond äÅÎØ ÔÁÎËÉÓÔÁ
09/SunThird äÅÎØ ÒÁÂÏÔÎÉËÏ× ÌÅÓÁ
+28 ÓÅÎ äÅÎØ ÒÁÂÏÔÎÉËÁ ÁÔÏÍÎÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ
09/SunLast äÅÎØ ÍÁÛÉÎÏÓÔÒÏÉÔÅÌÑ
1 ÏËÔ äÅÎØ ÐÏÖÉÌÙÈ ÌÀÄÅÊ
- 4 ÏËÔ äÅÎØ ×ÏÅÎÎÏ-ËÏÓÍÉÞÅÓËÉÈ ÓÉÌ
+ 1 ÏËÔ äÅÎØ ÓÕÈÏÐÕÔÎÙÈ ×ÏÊÓË
+ 4 ÏËÔ äÅÎØ ËÏÓÍÉÞÅÓËÉÈ ×ÏÊÓË
5 ÏËÔ äÅÎØ ÕÞÉÔÅÌÑ
14 ÏËÔ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÓÔÁÎÄÁÒÔÉÚÁÃÉÉ
10/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÓÅÌØÓËÏÇÏ ÈÏÚÑÊÓÔ×Á É ÐÅÒÅÒÁÂÁÔÙ×ÁÀÝÅÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ
@@ -73,15 +84,19 @@ LANG=ru_RU.KOI8-R
25 ÏËÔ äÅÎØ ÔÁÍÏÖÅÎÎÉËÁ
30 ÏËÔ äÅÎØ ÐÁÍÑÔÉ ÖÅÒÔ× ÐÏÌÉÔÉÞÅÓËÉÈ ÒÅÐÒÅÓÓÉÊ
10/SunLast äÅÎØ ÒÁÂÏÔÎÉËÏ× Á×ÔÏÍÏÂÉÌØÎÏÇÏ ÔÒÁÎÓÐÏÒÔÁ
+ 7 ÎÏÑ äÅÎØ ÏËÔÑÂÒØÓËÏÊ ÒÅ×ÏÌÀÃÉÉ 1917 ÇÏÄÁ
9 ÎÏÑ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ËÁÞÅÓÔ×Á
10 ÎÏÑ äÅÎØ ÍÉÌÉÃÉÉ
16 ÎÏÑ äÅÎØ ÍÏÒÓËÏÊ ÐÅÈÏÔÙ
17 ÎÏÑ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÓÔÕÄÅÎÔÏ×
-11/SunThird äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË É ÁÒÔÉÌÌÅÒÉÉ
+19 ÎÏÑ äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË É ÁÒÔÉÌÌÅÒÉÉ
21 ÎÏÑ äÅÎØ ÒÁÂÏÔÎÉËÏ× ÎÁÌÏÇÏ×ÙÈ ÏÒÇÁÎÏ×
26 ÎÏÑ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÉÎÆÏÒÍÁÃÉÉ
11/SunLast äÅÎØ ÍÁÔÅÒÉ
1 ÄÅË ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÂÏÒØÂÙ ÓÏ óðéäÏÍ
+ 3 ÄÅË äÅÎØ ÀÒÉÓÔÁ
+ 9 ÄÅË äÅÎØ çÅÒÏÅ× ïÔÅÞÅÓÔ×Á
+12 ÄÅË äÅÎØ ëÏÎÓÔÉÔÕÃÉÉ
17 ÄÅË äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË ÓÔÒÁÔÅÇÉÞÅÓËÏÇÏ ÎÁÚÎÁÞÅÎÉÑ
20 ÄÅË äÅÎØ ÒÁÂÏÔÎÉËÁ ÏÒÇÁÎÏ× ÂÅÚÏÐÁÓÎÏÓÔÉ
22 ÄÅË äÅÎØ ÜÎÅÒÇÅÔÉËÁ
Modified: user/edwin/calendar/io.c
==============================================================================
--- user/edwin/calendar/io.c Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/io.c Mon Aug 23 22:21:37 2010 (r211724)
@@ -107,8 +107,10 @@ cal(void)
tm.tm_wday = 0;
count = 0;
- if ((fp = opencal()) == NULL)
+ if ((fp = opencal()) == NULL) {
+ free(extradata);
return;
+ }
while (fgets(buf, sizeof(buf), stdin) != NULL) {
if ((pp = strchr(buf, '\n')) != NULL)
*pp = '\0';
@@ -155,15 +157,15 @@ cal(void)
}
/* Get rid of leading spaces (non-standard) */
- while (isspace(buf[0]))
- memcpy(buf, buf + 1, strlen(buf) - 1);
+ while (isspace((unsigned char)buf[0]))
+ memcpy(buf, buf + 1, strlen(buf));
/* No tab in the line, then not a valid line */
if ((pp = strchr(buf, '\t')) == NULL)
continue;
/* Trim spaces in front of the tab */
- while (isspace(pp[-1]))
+ while (isspace((unsigned char)pp[-1]))
pp--;
p = *pp;
@@ -203,6 +205,7 @@ cal(void)
event_print_all(fp);
closecal(fp);
+ free(extradata);
}
FILE *
@@ -226,7 +229,8 @@ opencal(void)
char *home = getenv("HOME");
if (home == NULL || *home == '\0')
errx(1, "cannot get home directory");
- chdir(home);
+ if (chdir(home) != 0)
+ errx(1, "cannot enter home directory");
for (found = i = 0; i < sizeof(calendarHomes) /
sizeof(calendarHomes[0]); i++)
if (chdir(calendarHomes[i]) == 0 &&
Modified: user/edwin/calendar/locale.c
==============================================================================
--- user/edwin/calendar/locale.c Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/locale.c Mon Aug 23 22:21:37 2010 (r211724)
@@ -76,6 +76,7 @@ setnnames(void)
int i, l;
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
for (i = 0; i < 7; i++) {
tm.tm_wday = i;
strftime(buf, sizeof(buf), "%a", &tm);
@@ -103,6 +104,7 @@ setnnames(void)
fndays[i].len = strlen(buf);
}
+ memset(&tm, 0, sizeof(struct tm));
for (i = 0; i < 12; i++) {
tm.tm_mon = i;
strftime(buf, sizeof(buf), "%b", &tm);
@@ -141,12 +143,12 @@ setnsequences(char *seq)
for (i = 0; i < 5; i++) {
nsequences[i].name = p;
if ((p = strchr(p, ' ')) == NULL) {
+ /* Oh oh there is something wrong. Erase! Erase! */
for (i = 0; i < 5; i++) {
nsequences[i].name = NULL;
nsequences[i].len = 0;
- return;
}
-
+ return;
}
*p = '\0';
p++;
Modified: user/edwin/calendar/parsedata.c
==============================================================================
--- user/edwin/calendar/parsedata.c Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/parsedata.c Mon Aug 23 22:21:37 2010 (r211724)
@@ -872,7 +872,7 @@ isonlydigits(char *s, int nostar)
for (i = 0; s[i] != '\0'; i++) {
if (nostar == 0 && s[i] == '*' && s[i + 1] == '\0')
return 1;
- if (!isdigit(s[i]))
+ if (!isdigit((unsigned char)s[i]))
return (0);
}
return (1);
Modified: user/edwin/calendar/sunpos.c
==============================================================================
--- user/edwin/calendar/sunpos.c Mon Aug 23 22:09:25 2010 (r211723)
+++ user/edwin/calendar/sunpos.c Mon Aug 23 22:21:37 2010 (r211724)
@@ -226,26 +226,24 @@ fequinoxsolstice(int year, double UTCoff
* It happens when the returned value "dec" goes from
* [350 ... 360> -> [0 ... 10]
*/
- found = 0;
- prevdec = 350;
for (d = 18; d < 31; d++) {
-// printf("Comparing day %d to %d.\n", d, d+1);
+ /* printf("Comparing day %d to %d.\n", d, d+1); */
sunpos(year, 3, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft);
sunpos(year, 3, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0,
&L, &decright);
-// printf("Found %g and %g.\n", decleft, decright);
+ /* printf("Found %g and %g.\n", decleft, decright); */
if (SIGN(decleft) == SIGN(decright))
continue;
dial = SECSPERDAY;
s = SECSPERDAY / 2;
while (s > 0) {
-// printf("Obtaining %d (%02d:%02d)\n",
-// dial, SHOUR(dial), SMIN(dial));
+ /* printf("Obtaining %d (%02d:%02d)\n",
+ dial, SHOUR(dial), SMIN(dial)); */
sunpos(year, 3, d, UTCoffset,
SHOUR(dial), SMIN(dial), SSEC(dial),
0.0, 0.0, &L, &decmiddle);
-// printf("Found %g\n", decmiddle);
+ /* printf("Found %g\n", decmiddle); */
if (SIGN(decleft) == SIGN(decmiddle)) {
decleft = decmiddle;
dial += s;
@@ -253,7 +251,9 @@ fequinoxsolstice(int year, double UTCoff
decright = decmiddle;
dial -= s;
}
-// printf("New boundaries: %g - %g\n", decleft, decright);
+ /*
+ printf("New boundaries: %g - %g\n", decleft, decright);
+ */
s /= 2;
}
@@ -265,26 +265,24 @@ fequinoxsolstice(int year, double UTCoff
* It happens when the returned value "dec" goes from
* [10 ... 0] -> <360 ... 350]
*/
- found = 0;
- prevdec = 10;
for (d = 18; d < 31; d++) {
-// printf("Comparing day %d to %d.\n", d, d+1);
+ /* printf("Comparing day %d to %d.\n", d, d+1); */
sunpos(year, 9, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft);
sunpos(year, 9, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0,
&L, &decright);
-// printf("Found %g and %g.\n", decleft, decright);
+ /* printf("Found %g and %g.\n", decleft, decright); */
if (SIGN(decleft) == SIGN(decright))
continue;
dial = SECSPERDAY;
s = SECSPERDAY / 2;
while (s > 0) {
-// printf("Obtaining %d (%02d:%02d)\n",
-// dial, SHOUR(dial), SMIN(dial));
+ /* printf("Obtaining %d (%02d:%02d)\n",
+ dial, SHOUR(dial), SMIN(dial)); */
sunpos(year, 9, d, UTCoffset,
SHOUR(dial), SMIN(dial), SSEC(dial),
0.0, 0.0, &L, &decmiddle);
-// printf("Found %g\n", decmiddle);
+ /* printf("Found %g\n", decmiddle); */
if (SIGN(decleft) == SIGN(decmiddle)) {
decleft = decmiddle;
dial += s;
@@ -292,7 +290,9 @@ fequinoxsolstice(int year, double UTCoff
decright = decmiddle;
dial -= s;
}
-// printf("New boundaries: %g - %g\n", decleft, decright);
+ /*
+ printf("New boundaries: %g - %g\n", decleft, decright);
+ */
s /= 2;
}
More information about the svn-src-user
mailing list