svn commit: r366805 - head/usr.bin/calendar/calendars

2020-10-17 Thread Greg Lehey
Author: grog
Date: Sun Oct 18 03:01:26 2020
New Revision: 366805
URL: https://svnweb.freebsd.org/changeset/base/366805

Log:
  Correct location and date of the Boston Shoemakers' organization,
  which significantly predated the USA.
  
  Reference: 
http://www.famousdaily.com/history/boston-shoemakers-form-first-us-labor-organization.html

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historySun Oct 18 01:57:49 
2020(r366804)
+++ head/usr.bin/calendar/calendars/calendar.historySun Oct 18 03:01:26 
2020(r366805)
@@ -582,9 +582,9 @@
 10/16  The Walt Disney Company is founded by Walt Disney
and his brother, Roy Disney, 1923
 10/17  Al Capone convicted of income tax evasion, 1931
-10/18  Boston Shoemakers form first US labor org., 1648
 10/18  Soviets announce their probe took photos of the Moon's far side, 1959
 10/18  The Grand Ole Opry opens its doors, 1925
+10/19  Boston Shoemakers form first American labor organization, 1648
 10/19  Mao Tse-tung establishes the People's Republic of China, 1949
 10/19  Napoleon's beaten army begins the long retreat from Moscow, 1812
 10/20  "Saturday Night Massacre", 1973
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366804 - stable/10/usr.bin/calendar/calendars

2020-10-17 Thread Greg Lehey
Author: grog
Date: Sun Oct 18 01:57:49 2020
New Revision: 366804
URL: https://svnweb.freebsd.org/changeset/base/366804

Log:
  Correct location and date of the Boston Shoemakers' organization,
  which significantly predated the USA.
  
  Reference: 
http://www.famousdaily.com/history/boston-shoemakers-form-first-us-labor-organization.html

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.history

Modified: stable/10/usr.bin/calendar/calendars/calendar.history
==
--- stable/10/usr.bin/calendar/calendars/calendar.history   Sun Oct 18 
01:13:41 2020(r366803)
+++ stable/10/usr.bin/calendar/calendars/calendar.history   Sun Oct 18 
01:57:49 2020(r366804)
@@ -368,8 +368,8 @@
 10/14  Battle of Hastings won by William the Conqueror and the Normans, 1066
 10/14  Chuck Yeager breaks sound barrier, 1947
 10/15  First draft card burned, 1965
-10/18  Boston Shoemakers form first US labor org., 1648
 10/18  Soviets announce their probe took photos of the Moon's far side, 1959
+10/19  Boston Shoemakers form first American labor organization, 1648
 10/19  Mao Tse-tung establishes the People's Republic of China, 1949
 10/19  Napoleon's beaten army begins the long retreat from Moscow, 1812
 10/20  "Saturday Night Massacre", 1973
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366243 - head/usr.bin/calendar

2020-09-28 Thread Greg Lehey
Author: grog
Date: Tue Sep 29 05:49:45 2020
New Revision: 366243
URL: https://svnweb.freebsd.org/changeset/base/366243

Log:
  Document the fact (bug?) that the -a option will normally process
  root's calendar files three times, once each for root, toor and
  daemon.
  
  This relates to bug 246943, but does not solve it.  See discussion in
  bug report for more details.
  
  PR:   246943
  Reported by:  wcarson.bugzi...@disillusion.net

Modified:
  head/usr.bin/calendar/calendar.1

Modified: head/usr.bin/calendar/calendar.1
==
--- head/usr.bin/calendar/calendar.1Tue Sep 29 05:08:45 2020
(r366242)
+++ head/usr.bin/calendar/calendar.1Tue Sep 29 05:49:45 2020
(r366243)
@@ -70,9 +70,24 @@ Print lines from today and the next
 .Ar num
 days (forward, future).
 .It Fl a
-Process the ``calendar'' files of all users and mail the results
+Process the ``calendar'' files for users found in
+.Pa /etc/passwd
+and mail the results
 to them.
-This requires super-user privileges.
+This can result in multiple messages for specific files, since
+.Pa /etc/passwd
+does not require home directories to be unique.
+In particular, by default
+.Ar root ,
+.Ar toor
+and
+.Ar daemon
+share the same home directory.
+If this directory contains calendar information,
+.Nm
+will process the file three times.
+.Pp
+This option requires super-user privileges.
 .It Fl B Ar num
 Print lines from today and the previous
 .Ar num
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365984 - head/usr.bin/calendar/calendars

2020-09-21 Thread Greg Lehey
Author: grog
Date: Mon Sep 21 22:55:51 2020
New Revision: 365984
URL: https://svnweb.freebsd.org/changeset/base/365984

Log:
  Remove claim that Allied Forces created "West Germany" in 1953.  I can
  find no historic substantiation for such a claim.  The Federal
  Republic of Germany was created by Germans on 23 May 1949, as also
  noted in this file.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historyMon Sep 21 22:52:57 
2020(r365983)
+++ head/usr.bin/calendar/calendars/calendar.historyMon Sep 21 22:55:51 
2020(r365984)
@@ -521,7 +521,6 @@
 09/20  Magellan leaves Spain on the first Round the World passage, 1519
 09/20  The Roxy Theater opens in Hollywood, 1973
 09/21  J. R. R. Tolkien's The Hobbit is published, 1937
-09/22  Allied forces form the independent nation West Germany, 1953
 09/22  US President Lincoln issues the Emancipation Proclamation, 1862
 09/22  Special prosecutor Leon Jeworski subpoenas US President Nixon, 1974
 09/22  The first Soviet atomic bomb explodes, 1949
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364854 - head/usr.bin/calendar/calendars

2020-08-26 Thread Greg Lehey
Author: grog
Date: Thu Aug 27 03:50:34 2020
New Revision: 364854
URL: https://svnweb.freebsd.org/changeset/base/364854

Log:
  Update Hong Kong Liberation Day (hah!)

Modified:
  head/usr.bin/calendar/calendars/calendar.holiday

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidayThu Aug 27 00:33:01 
2020(r364853)
+++ head/usr.bin/calendar/calendars/calendar.holidayThu Aug 27 03:50:34 
2020(r364854)
@@ -350,7 +350,7 @@
 08/25  Independence Day in Uruguay
 08/26  Susan B. Anthony Day in Massachusetts
 08/26* Bank Holiday in England and Wales
-08/27  Liberation Day in Hong Kong
+08/MonLast Liberation Day in Hong Kong
 08/28  Heroes Day in Philippines
 08/30  Huey P. Long Day in Louisiana
 08/30  Victory Day in Turkey
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364057 - head/usr.bin/calendar/calendars/de_DE.ISO8859-1

2020-08-08 Thread Greg Lehey
Author: grog
Date: Sun Aug  9 00:35:47 2020
New Revision: 364057
URL: https://svnweb.freebsd.org/changeset/base/364057

Log:
  Correct date for Nagasaki bombing.

Modified:
  head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte

Modified: head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte
==
--- head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Sun Aug 
 9 00:34:35 2020(r364056)
+++ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Sun Aug 
 9 00:35:47 2020(r364057)
@@ -104,7 +104,7 @@ LANG=de_DE.ISO8859-1
 10/01  Verk�ndigung der Urteile im N�rnberger Hauptkriegsverbrecherproze�, 1946
 02/25  Aufl�sung der Landes Preu�en durch den Kontrollrat, 1947
 08/06  Erster Atombombenabwurf auf Hiroshima, 1945
-08/08  Atombombenabwurf auf Nagasaki, 1945
+08/09  Atombombenabwurf auf Nagasaki, 1945
 04/19  Aufstand im Warschauer Ghetto, 1943
 12/07  Japan bombardiert Pearl Harbor, 1941
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364056 - head/usr.bin/calendar/calendars

2020-08-08 Thread Greg Lehey
Author: grog
Date: Sun Aug  9 00:34:35 2020
New Revision: 364056
URL: https://svnweb.freebsd.org/changeset/base/364056

Log:
  Remove incorrect duplicate.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historySat Aug  8 19:48:15 
2020(r364055)
+++ head/usr.bin/calendar/calendars/calendar.historySun Aug  9 00:34:35 
2020(r364056)
@@ -408,7 +408,6 @@
 08/06  Caricom in Barbados
 08/06  Cy Young pitches first game, 1890
 08/07  Jack the Ripper makes his first kill, 1888
-08/08  Atomic bomb dropped on Nagasaki, 1945
 08/08  Montenegro declares war on Germany, 1914
 08/08  Richard Nixon resigns the US presidency, 1974
 08/08  The Great Train Robbery -- $7,368,000, 1963
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363000 - head/usr.bin/calendar/calendars

2020-07-07 Thread Greg Lehey
Author: grog
Date: Wed Jul  8 01:47:20 2020
New Revision: 363000
URL: https://svnweb.freebsd.org/changeset/base/363000

Log:
  Be more precise about Percy Grainger's place of birth.

Modified:
  head/usr.bin/calendar/calendars/calendar.music

Modified: head/usr.bin/calendar/calendars/calendar.music
==
--- head/usr.bin/calendar/calendars/calendar.music  Tue Jul  7 20:42:35 
2020(r362999)
+++ head/usr.bin/calendar/calendars/calendar.music  Wed Jul  8 01:47:20 
2020(r363000)
@@ -287,7 +287,7 @@
 07/06  The Jefferson Airplane is formed in San Francisco, 1965
 07/07  Ringo Starr (Richard Starkey) born in Liverpool, England, 1940
 07/07  Leo Sowerby dies in Port Clinton, Ohio, 1968
-07/08  Percy Grainger is born near Melbourne, Australia, 1882
+07/08  Percy Grainger is born in Brighton, Victoria, Australia, 1882
 07/08  Hans Leo Hassler is born in Nuremberg, Germany, 1564
 07/09  Ottorino Respighi is born in Bologna, Italy, 1879
 07/09  Randall Thompson dies, 1984
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r362901 - head/usr.bin/calendar/calendars/de_DE.ISO8859-1

2020-07-02 Thread Greg Lehey
Author: grog
Date: Thu Jul  2 22:59:05 2020
New Revision: 362901
URL: https://svnweb.freebsd.org/changeset/base/362901

Log:
  Use canonical description for Schlacht bei Königgrätz, add year.

Modified:
  head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte

Modified: head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte
==
--- head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Thu Jul 
 2 21:04:08 2020(r362900)
+++ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Thu Jul 
 2 22:59:05 2020(r362901)
@@ -36,7 +36,7 @@ LANG=de_DE.ISO8859-1
Paulskirche, Wahl von Friedrich Wilhelm IV von Preu�en zum
deutschen Kaiser, 1849
 04/28  Ablehnung der deutschen Kaiserkrone durch den preu�ischen K�nig, 1849
-07/03  Schlacht von K�niggr�tz
+07/03  Schlacht bei K�niggr�tz, 1866
 07/13  Emser Depesche, 1870
 07/18  Verk�ndung des Dogmas von der p�pstlichen Unfehlbarkeit
durch das I. Vatikanische Konzil
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360057 - head/usr.bin/calendar/calendars

2020-04-17 Thread Greg Lehey
Author: grog
Date: Fri Apr 17 23:14:51 2020
New Revision: 360057
URL: https://svnweb.freebsd.org/changeset/base/360057

Log:
  Tidy up syntax and punctuation of some entries.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historyFri Apr 17 21:33:45 
2020(r360056)
+++ head/usr.bin/calendar/calendars/calendar.historyFri Apr 17 23:14:51 
2020(r360057)
@@ -202,7 +202,7 @@
 04/15  Ray Kroc opens first McDonalds in Des Plaines, IL, 1955
 04/16  Syria becomes an independent Republic, 1946
 04/17  Bay of Pigs invasion crushed by Castro forces, 1961
-04/18  Einstein's Death, 1955
+04/18  Albert Einstein dies, 1955
 04/18  First Laundromat opens, Fort Worth Texas, 1934
 04/18  San Francisco earthquake, 1906
 04/18  The League of Nations is dissolved after 27 years, 1946
@@ -211,7 +211,7 @@
 04/20  In Bulgaria, the April Uprising takes place, 1876
 04/20  Supreme Court unanimously rules in favor of busing, 1971
 04/21  Lyrid meteor shower
-04/21  Rome is founded by Romulus and Remus, 753BC
+04/21  Rome is founded by Romulus and Remus, 753 BC
 04/22  Portuguese navigator Pedro Alvares Cabral becomes the first European to
sight Brazil, 1500
 04/22  The first Earth Day is celebrated, 1970
@@ -339,7 +339,7 @@
 06/28  World War I ended with the signing of the Treaty of Versailles, 1919
 06/29  The Seychelles gains independence from the United Kingdom, 1976
 06/30  "That" explosion in Siberia at 7:17 local time, 1908
-06/30  Albert Einstein published his theory of special relativity, 1905
+06/30  Albert Einstein publishes his theory of special relativity, 1905
 06/30  China and Soviet Union announce split over ideology, 1960
 07/01  Battle of Gettysburg begins, 1863
 07/01  Hong Kong becomes a special administrative region of the People's
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359419 - head/usr.bin/ncal

2020-03-28 Thread Greg Lehey
Author: grog
Date: Sun Mar 29 04:18:27 2020
New Revision: 359419
URL: https://svnweb.freebsd.org/changeset/base/359419

Log:
  Remove spurious transition from Julian to Gregorian for country
  "Latin".
  
  Arguably the entire -p option should be removed.  It shows only a few
  countries, and it doesn't have any relationship with the rest of the
  program.
  
  PR:   244801
  Submitted by: grog@
  Reported by:  Hamid Ali

Modified:
  head/usr.bin/ncal/ncal.c

Modified: head/usr.bin/ncal/ncal.c
==
--- head/usr.bin/ncal/ncal.cSun Mar 29 04:14:57 2020(r359418)
+++ head/usr.bin/ncal/ncal.cSun Mar 29 04:18:27 2020(r359419)
@@ -95,7 +95,6 @@ static struct djswitch {
{"IT", "Italy", {1582, 10,  4}},
{"JP", "Japan", {1918, 12, 18}},
{"LI", "Lithuania", {1918,  2,  1}},
-   {"LN", "Latin", {, 05, 31}},
{"LU", "Luxembourg",{1582, 12, 14}},
{"LV", "Latvia",{1918,  2,  1}},
{"NL", "Netherlands",   {1582, 12, 14}},
@@ -580,7 +579,7 @@ printeaster(int y, int julian, int orthodox)
(y)++;  \
}
 #defineM2Y(m)  ((m) / 12)
-#defineM2M(m)  (1 + (m) % 12) 
+#defineM2M(m)  (1 + (m) % 12)
 
 /* Print all months for the period in the range [ before .. y-m .. after ]. */
 static void
@@ -925,7 +924,7 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines 
for (i = 0; i != 6; i++) {
l = 0;
for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7;
-   j++, k += dw) { 
+   j++, k += dw) {
if (j >= first) {
if (jd_flag)
dt.d = j - jan1 + 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359418 - head/usr.bin/ncal

2020-03-28 Thread Greg Lehey
Author: grog
Date: Sun Mar 29 04:14:57 2020
New Revision: 359418
URL: https://svnweb.freebsd.org/changeset/base/359418

Log:
  Add STANDARDS section
  
  PR:   239723
  Submitted by: Gordon Bergling
  Reported by:  Gordon Bergling

Modified:
  head/usr.bin/ncal/ncal.1

Modified: head/usr.bin/ncal/ncal.1
==
--- head/usr.bin/ncal/ncal.1Sun Mar 29 02:40:03 2020(r359417)
+++ head/usr.bin/ncal/ncal.1Sun Mar 29 04:14:57 2020(r359418)
@@ -179,6 +179,24 @@ Highlighting of dates is disabled if stdout is not a t
 .Sh SEE ALSO
 .Xr calendar 3 ,
 .Xr strftime 3
+.Sh STANDARDS
+The
+.Nm
+utility is compliant with the
+X/Open System Interfaces option of the
+.St -p1003.1-2008
+specification.
+.Pp
+The flags
+.Op Fl 3hyJeopw ,
+as well as the ability to specify a month name as a single argument,
+are extensions to that specification.
+.Pp
+The week number computed by
+.Fl w
+is compliant with the
+.St -iso8601
+specification.
 .Sh HISTORY
 A
 .Nm
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359412 - head/usr.bin/calendar/calendars

2020-03-28 Thread Greg Lehey
Author: grog
Date: Sat Mar 28 22:44:08 2020
New Revision: 359412
URL: https://svnweb.freebsd.org/changeset/base/359412

Log:
  Add year to Boganda's death.

Modified:
  head/usr.bin/calendar/calendars/calendar.holiday

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidaySat Mar 28 22:37:50 
2020(r359411)
+++ head/usr.bin/calendar/calendars/calendar.holidaySat Mar 28 22:44:08 
2020(r359412)
@@ -103,7 +103,7 @@
 03/26  Independence Day in Bangladesh
 03/26  Prince Jonah Kuhio Kalanianaole Day in Hawaii
 03/27  Armed Forces Day in Burma
-03/29  Death of President Barthelemy Boganda in Central African Republic
+03/29  Death of President Barthelemy Boganda in Central African Republic, 1959
 03/29  Memorial Day in Madagascar
 03/31  National Day in Malta
 03/MonLast Seward's Day in Alaska (last Monday)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358506 - head/usr.bin/calendar/calendars

2020-03-01 Thread Greg Lehey
Author: grog
Date: Sun Mar  1 22:10:37 2020
New Revision: 358506
URL: https://svnweb.freebsd.org/changeset/base/358506

Log:
  Remove comment about Blackthorn winds, apparently imported from 4.4BSD
  Lite.  Nowadays it's trivial to find the explanation, such as at
  https://www.deseret.com/2000/2/27/19493013/blackthorn-winds-make-bushes-bud.
  It doesn't seem appropriate to replace it with an explanation.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historySun Mar  1 22:09:11 
2020(r358505)
+++ head/usr.bin/calendar/calendars/calendar.historySun Mar  1 22:10:37 
2020(r358506)
@@ -70,7 +70,7 @@
 02/29  French and Indian raid on Deerfield MA, 1704
 03/01  Sarah Goode, Sarah Osborne, and Tituba arrested for witchcraft
in Salem, Massachusetts, 1692
-03/02  Blackthorn winds (New England) (Does anyone know what this is?)
+03/02  Blackthorn winds (New England)
 03/04  First meeting of Congress, 1789, in N.Y.C.
 03/13  "Striptease" introduced, Paris, 1894
 03/14  Teddy Roosevelt excludes Japanese laborers from continental US, 1907
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r355218 - head/usr.bin/calendar/calendars

2019-11-29 Thread Greg Lehey
Author: grog
Date: Fri Nov 29 23:04:45 2019
New Revision: 355218
URL: https://svnweb.freebsd.org/changeset/base/355218

Log:
  Correct date and time of George Harrison's death.
Source: https://www.beatlesbible.com/2001/11/29/george-harrison-dies/

Modified:
  head/usr.bin/calendar/calendars/calendar.music

Modified: head/usr.bin/calendar/calendars/calendar.music
==
--- head/usr.bin/calendar/calendars/calendar.music  Fri Nov 29 19:57:49 
2019(r355217)
+++ head/usr.bin/calendar/calendars/calendar.music  Fri Nov 29 23:04:45 
2019(r355218)
@@ -215,7 +215,7 @@
 11/26  Cream performs their farewell concert at Royal Albert Hall, 1968
 11/26  Paul Hindemith is born in Hanau, Germany, 1895
 11/27  Jimi Hendrix (Johnny Allen Hendrix) is born in Seattle, 1942
-11/30  George Harrison dies at 13:30 in L.A., 2001
+11/29  George Harrison dies at 13:20 in Los Angeles, California, 2001
 12/04  Frank Zappa dies in his Laurel Canyon home shortly before 18:00, 1993
 12/05  Wolfgang Amadeus Mozart dies in Vienna, Austria, 1791
 12/06  First sound recording made by Thomas Edison, 1877
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r355192 - head/usr.bin/calendar/calendars

2019-11-28 Thread Greg Lehey
Author: grog
Date: Thu Nov 28 21:22:04 2019
New Revision: 355192
URL: https://svnweb.freebsd.org/changeset/base/355192

Log:
  Clarify name of Pau Casals (it's Catalonian)
  Get correct birthday (from Wikipedia).

Modified:
  head/usr.bin/calendar/calendars/calendar.music

Modified: head/usr.bin/calendar/calendars/calendar.music
==
--- head/usr.bin/calendar/calendars/calendar.music  Thu Nov 28 20:46:24 
2019(r355191)
+++ head/usr.bin/calendar/calendars/calendar.music  Thu Nov 28 21:22:04 
2019(r355192)
@@ -186,7 +186,7 @@
 10/20  Three members of Lynyrd Skynyrd die in a plane crash, 1977
 10/21  Jesus Christ Super Star debuted on Broadway, 1971
 10/22  Franz Liszt born, 1811
-10/22  Pablo Casals dies in Puerto Rico, 1973
+10/22  Pau (Pablo) Casals dies in Puerto Rico, 1973
 10/25  Georges Bizet is born in Paris, France, 1838
 10/25  Jon Anderson (Yes) is born in Lancashire, England, 1944
 10/25  The Rolling Stones appear on The Ed Sullivan Show, 1964
@@ -215,7 +215,6 @@
 11/26  Cream performs their farewell concert at Royal Albert Hall, 1968
 11/26  Paul Hindemith is born in Hanau, Germany, 1895
 11/27  Jimi Hendrix (Johnny Allen Hendrix) is born in Seattle, 1942
-11/29  Pau Casals born in Vendrell, 1876
 11/30  George Harrison dies at 13:30 in L.A., 2001
 12/04  Frank Zappa dies in his Laurel Canyon home shortly before 18:00, 1993
 12/05  Wolfgang Amadeus Mozart dies in Vienna, Austria, 1791
@@ -235,6 +234,7 @@
 12/23  Joe Strummer (born John Mellor) dies in Broomfield, England, 2002
 12/28  Edgar Winter is born in Beaumont, Texas, 1946
 12/28  Paul Hindemith dies in Frankfurt/Main, Germany, 1963
+12/29  Pau (Pablo) Casals born in Vendrell, 1876
 12/31  Jimi Hendrix introduces the Band of Gypsies at the Fillmore East, 1969
 
 #endif /* !_calendar_music_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r353909 - head/usr.bin/calendar/calendars

2019-10-22 Thread Greg Lehey
Author: grog
Date: Wed Oct 23 01:11:25 2019
New Revision: 353909
URL: https://svnweb.freebsd.org/changeset/base/353909

Log:
  Correct spelling, apply appropriate respect.

Modified:
  head/usr.bin/calendar/calendars/calendar.holiday

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidayWed Oct 23 00:31:19 
2019(r353908)
+++ head/usr.bin/calendar/calendars/calendar.holidayWed Oct 23 01:11:25 
2019(r353909)
@@ -447,7 +447,7 @@
 10/20  Kenyatta Day in Kenya
 10/21  Armed Forces Day in Honduras
 10/21  Revolution Days (2 days) in Somalia
-10/23  Chulalongkron's Day in Thailand
+10/23  King Chulalongkorn Day in Thailand
 10/24  Independence Day in Zambia
 10/24  United Nations Day
 10/25  Taiwan Restoration Day in Taiwan
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349296 - stable/10/usr.bin/calendar/calendars

2019-06-22 Thread Greg Lehey
Author: grog
Date: Sat Jun 22 23:36:28 2019
New Revision: 349296
URL: https://svnweb.freebsd.org/changeset/base/349296

Log:
  Correct Konrad Zuse's year of birth.

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.birthday

Modified: stable/10/usr.bin/calendar/calendars/calendar.birthday
==
--- stable/10/usr.bin/calendar/calendars/calendar.birthday  Sat Jun 22 
22:43:40 2019(r349295)
+++ stable/10/usr.bin/calendar/calendars/calendar.birthday  Sat Jun 22 
23:36:28 2019(r349296)
@@ -167,7 +167,7 @@
 06/19  FreeBSD project born, 1993
 06/22  Carl Hubbell born, 1903
 06/22  Meryl Streep born in Summit, New Jersey, 1949
-06/22  Konrad Zuse born in Berlin, 1919
+06/22  Konrad Zuse born in Berlin, 1910
 06/23  Alan Mathison Turing born, 1912
 06/25  Eric Arthur Blair (a.k.a. George Orwell) born, 1903
 06/27  Helen Keller born, 1880
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349043 - head/usr.bin/calendar/calendars

2019-06-14 Thread Greg Lehey
Author: grog
Date: Fri Jun 14 23:53:19 2019
New Revision: 349043
URL: https://svnweb.freebsd.org/changeset/base/349043

Log:
  Edvard Hagerup Grieg parses as given name, mother's maiden name, surname

Modified:
  head/usr.bin/calendar/calendars/calendar.birthday

Modified: head/usr.bin/calendar/calendars/calendar.birthday
==
--- head/usr.bin/calendar/calendars/calendar.birthday   Fri Jun 14 22:06:43 
2019(r349042)
+++ head/usr.bin/calendar/calendars/calendar.birthday   Fri Jun 14 23:53:19 
2019(r349043)
@@ -161,7 +161,7 @@
 06/07  Alan Mathison Turing died, 1954
 06/08  Frank Lloyd Wright born in Richland Center, Wisconsin, 1867
 06/13  Alexander the Great dies (323BC)
-06/15  Edward (Edvard Hagerup) Grieg born in Bergen, Norway, 1843
+06/15  Edvard Hagerup Grieg born in Bergen, Norway, 1843
 06/16  Hammurabi the Great dies, Babylon, 1686 BC
 06/18  M.C. Escher born, 1898
 06/19  FreeBSD project born, 1993
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r345251 - head/usr.bin/calendar/calendars

2019-03-17 Thread Greg Lehey
Author: grog
Date: Sun Mar 17 22:26:50 2019
New Revision: 345251
URL: https://svnweb.freebsd.org/changeset/base/345251

Log:
  Change date of Canberra Day, now on second Monday in March.
https://en.wikipedia.org/wiki/Canberra_Day

Modified:
  head/usr.bin/calendar/calendars/calendar.australia

Modified: head/usr.bin/calendar/calendars/calendar.australia
==
--- head/usr.bin/calendar/calendars/calendar.australia  Sun Mar 17 20:43:31 
2019(r345250)
+++ head/usr.bin/calendar/calendars/calendar.australia  Sun Mar 17 22:26:50 
2019(r345251)
@@ -17,7 +17,7 @@ Jun/MonSecond Queen's Birthday Holiday (Australia, exc
 Oct/SunFirst   Daylight Savings Time starts in ACT, NSW, SA and VIC.
 
 /* ACT, NSW, common */
-Mar 18 Canberra Day (ACT)
+Mar/MonSecond  Canberra Day (ACT)
 Sep/MonLastFamily & Community Day (ACT)
 Aug/MonFirst   Bank Holiday (ACT, NSW)
 Oct/MonFirst   Labour Day (ACT, NSW, SA)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r342160 - head/sys/dev/pci

2018-12-16 Thread Greg Lehey
Author: grog
Date: Mon Dec 17 07:09:46 2018
New Revision: 342160
URL: https://svnweb.freebsd.org/changeset/base/342160

Log:
  Work around BIOS quirks on HPE Proliant MicroServer Gen10
  
  PR:   221350
  Submitted by: Bob Bishop
  Reported by:  Rafal Lukawiecki
  Reviewed by:  jhb
  MFC after:2 weeks

Modified:
  head/sys/dev/pci/pci.c

Modified: head/sys/dev/pci/pci.c
==
--- head/sys/dev/pci/pci.c  Mon Dec 17 07:03:36 2018(r342159)
+++ head/sys/dev/pci/pci.c  Mon Dec 17 07:09:46 2018(r342160)
@@ -230,6 +230,7 @@ struct pci_quirk {
 #definePCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */
 #definePCI_QUIRK_DISABLE_MSIX  5 /* MSI-X doesn't work */
 #definePCI_QUIRK_MSI_INTX_BUG  6 /* PCIM_CMD_INTxDIS disables MSI */
+#definePCI_QUIRK_REALLOC_BAR   7 /* Can't allocate memory at the 
default address */
int arg1;
int arg2;
 };
@@ -311,6 +312,12 @@ static const struct pci_quirk pci_quirks[] = {
{ 0x167814e4, PCI_QUIRK_MSI_INTX_BUG,   0,  0 }, /* BCM5715 */
{ 0x167914e4, PCI_QUIRK_MSI_INTX_BUG,   0,  0 }, /* BCM5715S */
 
+   /*
+* HPE Gen 10 VGA has a memory range that can't be allocated in the
+* expected place.
+*/
+   { 0x98741002, PCI_QUIRK_REALLOC_BAR,0,  0 },
+
{ 0 }
 };
 
@@ -3283,7 +3290,9 @@ pci_add_map(device_t bus, device_t dev, int reg, struc
 */
res = resource_list_reserve(rl, bus, dev, type, , start, end, count,
flags);
-   if (pci_do_realloc_bars && res == NULL && (start != 0 || end != ~0)) {
+   if ((pci_do_realloc_bars
+   || pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_REALLOC_BAR))
+   && res == NULL && (start != 0 || end != ~0)) {
/*
 * If the allocation fails, try to allocate a resource for
 * this BAR using any available range.  The firmware felt
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r326955 - stable/10/usr.bin/calendar/calendars

2017-12-18 Thread Greg Lehey
Author: grog
Date: Tue Dec 19 01:02:58 2017
New Revision: 326955
URL: https://svnweb.freebsd.org/changeset/base/326955

Log:
  Revert revision 326923
  
  Demanded unconditionally by:  imp@

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.birthday
  stable/10/usr.bin/calendar/calendars/calendar.holiday

Modified: stable/10/usr.bin/calendar/calendars/calendar.birthday
==
--- stable/10/usr.bin/calendar/calendars/calendar.birthday  Tue Dec 19 
00:18:17 2017(r326954)
+++ stable/10/usr.bin/calendar/calendars/calendar.birthday  Tue Dec 19 
01:02:58 2017(r326955)
@@ -292,7 +292,7 @@
 12/12  E.G. Robinson born, 1893
 12/14  George Washington dies, 1799
 12/17  William Safire (Safir) born, 1929
-12/18  Konrad Zuse died in H�nfeld, 1995
+12/18  Konrad Zuse died in Hünfeld, 1995
 12/20  Carl Sagan died, 1996
 12/21  Benjamin Disraeli born, 1804
 12/22  Giacomo Puccini born, 1858

Modified: stable/10/usr.bin/calendar/calendars/calendar.holiday
==
--- stable/10/usr.bin/calendar/calendars/calendar.holiday   Tue Dec 19 
00:18:17 2017(r326954)
+++ stable/10/usr.bin/calendar/calendars/calendar.holiday   Tue Dec 19 
01:02:58 2017(r326955)
@@ -356,7 +356,7 @@
 08/30  Victory Day in Turkey
 08/31  Independence Day (Merdeka) in Malaysia
 08/31  Independence Day in Trinidad and Tobago
-08/31  Pashtoonian Day in Afghanistan
+08/31  Pashtunistan Day in Afghanistan
 08/FriThirdAdmission Day in Hawaii, 1959 (3rd Friday)
 09/01  Army Day in Chile
 09/03  Independence Day in Qatar
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r326923 - stable/10/usr.bin/calendar/calendars

2017-12-17 Thread Greg Lehey
Author: grog
Date: Sun Dec 17 22:12:57 2017
New Revision: 326923
URL: https://svnweb.freebsd.org/changeset/base/326923

Log:
  Correct character set.

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.birthday

Modified: stable/10/usr.bin/calendar/calendars/calendar.birthday
==
--- stable/10/usr.bin/calendar/calendars/calendar.birthday  Sun Dec 17 
19:58:48 2017(r326922)
+++ stable/10/usr.bin/calendar/calendars/calendar.birthday  Sun Dec 17 
22:12:57 2017(r326923)
@@ -292,7 +292,7 @@
 12/12  E.G. Robinson born, 1893
 12/14  George Washington dies, 1799
 12/17  William Safire (Safir) born, 1929
-12/18  Konrad Zuse died in Hünfeld, 1995
+12/18  Konrad Zuse died in H�nfeld, 1995
 12/20  Carl Sagan died, 1996
 12/21  Benjamin Disraeli born, 1804
 12/22  Giacomo Puccini born, 1858
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r323135 - head/usr.bin/calendar/calendars/de_DE.ISO8859-1

2017-09-02 Thread Greg Lehey
Author: grog
Date: Sat Sep  2 23:17:35 2017
New Revision: 323135
URL: https://svnweb.freebsd.org/changeset/base/323135

Log:
  Spelling.

Modified:
  head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte

Modified: head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte
==
--- head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Sat Sep 
 2 21:58:42 2017(r323134)
+++ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Sat Sep 
 2 23:17:35 2017(r323135)
@@ -84,7 +84,7 @@ LANG=de_DE.ISO8859-1
 03/15  Einmarsch deutscher Truppen in die Tschechoslowakei, 1939
 03/23  R�ckgabe des Memelgebietes an Deutschland, 1939
 08/23  Abschlu� des Hitler-Stalin-Paktes, 1939
-09/03  Kriegserkl�rung Gro�britaniens und Frankreichs an Deutschland, 1939
+09/03  Kriegserkl�rung Gro�britanniens und Frankreichs an Deutschland, 1939
 04/09  Deutsche Besetzung D�nemarks, Invasion in Norwegen, 1940
 05/10  Deutscher Angriff auf Belgien, die Niederlande, Luxemburg
und Frankreich, 1940
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r323042 - head/usr.bin/calendar/calendars

2017-08-30 Thread Greg Lehey
Author: grog
Date: Wed Aug 30 23:49:14 2017
New Revision: 323042
URL: https://svnweb.freebsd.org/changeset/base/323042

Log:
  Spelling.

Modified:
  head/usr.bin/calendar/calendars/calendar.holiday

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidayWed Aug 30 23:41:04 
2017(r323041)
+++ head/usr.bin/calendar/calendars/calendar.holidayWed Aug 30 23:49:14 
2017(r323042)
@@ -356,7 +356,7 @@
 08/30  Victory Day in Turkey
 08/31  Independence Day (Merdeka) in Malaysia
 08/31  Independence Day in Trinidad and Tobago
-08/31  Pashtoonian Day in Afghanistan
+08/31  Pashtunistan Day in Afghanistan
 08/FriThirdAdmission Day in Hawaii, 1959 (3rd Friday)
 09/01  Army Day in Chile
 09/03  Independence Day in Qatar
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r322638 - head/usr.bin/calendar/calendars

2017-08-17 Thread Greg Lehey
Author: grog
Date: Fri Aug 18 00:25:27 2017
New Revision: 322638
URL: https://svnweb.freebsd.org/changeset/base/322638

Log:
  Goodbye, ache.

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdFri Aug 18 00:11:02 
2017(r322637)
+++ head/usr.bin/calendar/calendars/calendar.freebsdFri Aug 18 00:25:27 
2017(r322638)
@@ -300,6 +300,7 @@
 08/12  Joe Marcus Clarke  born in Lakeland, Florida, 
United States, 1976
 08/12  Max Brazhnikov  born in Leningradskaya, Russian 
Federation, 1979
 08/14  Stefan Esser  born in Cologne, Nordrhein-Westfalen, 
Germany, 1961
+08/16  Andrey Chernov  died, 2017
 08/17  Olivier Houchard  born in Nancy, France, 1980
 08/19  Chin-San Huang  born in Yi-Lan, Taiwan, Republic 
of China, 1979
 08/19  Pav Lucistnik  born in Kutna Hora, Czech Republic, 
1980
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r320427 - head/usr.bin/calendar/calendars

2017-06-27 Thread Greg Lehey
Author: grog
Date: Wed Jun 28 00:50:51 2017
New Revision: 320427
URL: https://svnweb.freebsd.org/changeset/base/320427

Log:
  Spelling.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historyTue Jun 27 22:05:06 
2017(r320426)
+++ head/usr.bin/calendar/calendars/calendar.historyWed Jun 28 00:50:51 
2017(r320427)
@@ -190,7 +190,7 @@
 06/26  Toothbrush invented, 1498
 06/27  100 degrees, Fort Yukon, 1915
 06/27  Bill Graham closes the Fillmore East, 1971
-06/28  Supreme Court decides in favor of Alan Bakke, 1978
+06/28  Supreme Court decides in favor of Allan Bakke, 1978
 06/30  "That" explosion in Siberia, 1908
 06/30  China and Soviet Union announce split over ideology, 1960
 07/01  Battle of Gettysburg begins, 1863
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r307803 - stable/10/usr.bin/calendar/calendars

2016-10-22 Thread Greg Lehey
Author: grog
Date: Sat Oct 22 22:36:32 2016
New Revision: 307803
URL: https://svnweb.freebsd.org/changeset/base/307803

Log:
  Spelling, title.

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.holiday

Modified: stable/10/usr.bin/calendar/calendars/calendar.holiday
==
--- stable/10/usr.bin/calendar/calendars/calendar.holiday   Sat Oct 22 
22:35:39 2016(r307802)
+++ stable/10/usr.bin/calendar/calendars/calendar.holiday   Sat Oct 22 
22:36:32 2016(r307803)
@@ -447,7 +447,7 @@
 10/20  Kenyatta Day in Kenya
 10/21  Armed Forces Day in Honduras
 10/21  Revolution Days (2 days) in Somalia
-10/23  Chulalongkron's Day in Thailand
+10/23  King Chulalongkorn Day in Thailand
 10/24  Independence Day in Zambia
 10/24  United Nations Day
 10/25  Taiwan Restoration Day in Taiwan
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r304065 - head/usr.bin/calendar/calendars

2016-08-13 Thread Greg Lehey
Author: grog
Date: Sat Aug 13 23:35:20 2016
New Revision: 304065
URL: https://svnweb.freebsd.org/changeset/base/304065

Log:
  Correct date ov VJ day (1945-08-15, about 03:00 UTC).

Modified:
  head/usr.bin/calendar/calendars/calendar.holiday

Modified: head/usr.bin/calendar/calendars/calendar.holiday
==
--- head/usr.bin/calendar/calendars/calendar.holidaySat Aug 13 23:00:15 
2016(r304064)
+++ head/usr.bin/calendar/calendars/calendar.holidaySat Aug 13 23:35:20 
2016(r304065)
@@ -331,8 +331,8 @@
 08/13  Proclamation of Independence in Central African Republic
 08/13  Women's Day in Tunisia
 08/14  Independence Day in Pakistan
-08/14  VJ Day, 1945
 08/14  Waddi Dhahab in Morocco
+08/15  VJ Day, 1945
 08/15  Founding of Ascuncion in Paraguay
 08/15  Independence Day in India
 08/15  Liberation Day in South Korea
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r300003 - head/share/man/man4

2016-05-16 Thread Greg Lehey
Author: grog
Date: Tue May 17 04:40:00 2016
New Revision: 33
URL: https://svnweb.freebsd.org/changeset/base/33

Log:
  Correct use of incorrect grammar.

Modified:
  head/share/man/man4/gdb.4

Modified: head/share/man/man4/gdb.4
==
--- head/share/man/man4/gdb.4   Tue May 17 04:03:45 2016(r32)
+++ head/share/man/man4/gdb.4   Tue May 17 04:40:00 2016(r33)
@@ -595,7 +595,7 @@ run the link at more than 9600 bps.
 Firewire connections do not have this problem.
 .Pp
 The debugging macros
-.Dq "just grown" .
+.Dq "just growed" .
 In general, the person who wrote them did so while looking for a specific
 problem, so they may not be general enough, and they may behave badly when used
 in ways for which they were not intended, even if those ways make sense.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r264093 - head/bin/ls

2014-04-03 Thread Greg Lehey
Author: grog
Date: Thu Apr  3 23:22:04 2014
New Revision: 264093
URL: http://svnweb.freebsd.org/changeset/base/264093

Log:
  Typo.
  
  Reported by: Igor Sobrado.

Modified:
  head/bin/ls/ls.1

Modified: head/bin/ls/ls.1
==
--- head/bin/ls/ls.1Thu Apr  3 23:10:23 2014(r264092)
+++ head/bin/ls/ls.1Thu Apr  3 23:22:04 2014(r264093)
@@ -220,7 +220,7 @@ It also negates the effect of the
 and
 .Fl t
 options.
-As allowd by
+As allowed by
 .St -p1003.1-2001 ,
 this option has no effect on the
 .Fl d ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r264098 - head/bin/ls

2014-04-03 Thread Greg Lehey
Author: grog
Date: Fri Apr  4 01:48:25 2014
New Revision: 264098
URL: http://svnweb.freebsd.org/changeset/base/264098

Log:
  -k option is compliant with POSIX.

Modified:
  head/bin/ls/ls.1

Modified: head/bin/ls/ls.1
==
--- head/bin/ls/ls.1Fri Apr  4 01:10:02 2014(r264097)
+++ head/bin/ls/ls.1Fri Apr  4 01:48:25 2014(r264098)
@@ -254,8 +254,6 @@ This has the same effect as setting envi
 to 1024, except that it also nullifies any
 .Fl h
 options to its left.
-This option is not defined in
-.St -p1003.1-2001 .
 .It Fl l
 (The lowercase letter
 .Dq ell . )
@@ -817,7 +815,7 @@ the
 utility conforms to
 .St -p1003.1-2001 .
 The options
-.Fl B , D , G , I , T , U , W , Z , b , h , k , w , y
+.Fl B , D , G , I , T , U , W , Z , b , h , w , y
 and
 .Fl ,
 are compatible extensions not defined in
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r264064 - head/bin/ls

2014-04-02 Thread Greg Lehey
Author: grog
Date: Thu Apr  3 05:48:28 2014
New Revision: 264064
URL: http://svnweb.freebsd.org/changeset/base/264064

Log:
  Make -f set -a, as required by the standard.
  
  From the original OpenBSD commit message:
  
restore the traditional behavior of -f implying -a; apparently Keith
Bostic forgot to restore it when the -f flag was put back on 2nd of
September 1989, after being removed on 16th of August as a
consequence of issues getting it working over NFS, so deviation from
traditional UNIX behavior in all BSDs looks like an historical
accident; as a side effect, this change accommodates behavior of
this option to IEEE Std 1003.1-2008 (``POSIX.1'').
  
joint work with jmc@ (who found the inaccuracy in our
implementation), schwarze@ (who provided a detailed tracking of
historical facts) and millert@
  
  Submitted by: Igor Sobrado
  Discussed with:  mckusick
  Obtained from: OpenBSD project
  MFC after:  2 weeks

Modified:
  head/bin/ls/ls.1
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.1
==
--- head/bin/ls/ls.1Thu Apr  3 01:46:03 2014(r264063)
+++ head/bin/ls/ls.1Thu Apr  3 05:48:28 2014(r264064)
@@ -194,6 +194,8 @@ Use time when file status was last chang
 Directories are listed as plain files (not searched recursively).
 .It Fl f
 Output is not sorted.
+This option turns on
+.Fl a .
 .It Fl g
 This option is deprecated and is only available for compatibility
 with

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cThu Apr  3 01:46:03 2014(r264063)
+++ head/bin/ls/ls.cThu Apr  3 05:48:28 2014(r264064)
@@ -226,6 +226,9 @@ main(int argc, char *argv[])
f_accesstime = 0;
f_statustime = 0;
break;
+   case 'f':
+   f_nosort = 1;
+  /* FALLTHROUGH */
case 'a':
fts_options |= FTS_SEEDOT;
/* FALLTHROUGH */
@@ -300,9 +303,6 @@ main(int argc, char *argv[])
f_listdir = 1;
f_recursive = 0;
break;
-   case 'f':
-   f_nosort = 1;
-   break;
case 'g':   /* Compatibility with 4.3BSD. */
break;
case 'h':
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r264066 - head/bin/ls

2014-04-02 Thread Greg Lehey
Author: grog
Date: Thu Apr  3 05:49:28 2014
New Revision: 264066
URL: http://svnweb.freebsd.org/changeset/base/264066

Log:
  Add information on standards compliance of many options.
  
  MFC after:2 weeks

Modified:
  head/bin/ls/ls.1

Modified: head/bin/ls/ls.1
==
--- head/bin/ls/ls.1Thu Apr  3 05:48:56 2014(r264065)
+++ head/bin/ls/ls.1Thu Apr  3 05:49:28 2014(r264066)
@@ -87,6 +87,8 @@ and current locale settings) in file nam
 where
 .Va xxx
 is the numeric value of the character in octal.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl C
 Force multi-column output; this is the default when output is to a terminal.
 .It Fl D Ar format
@@ -104,6 +106,8 @@ different number of columns in the outpu
 This option overrides the
 .Fl T
 option.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl F
 Display a slash
 .Pq Ql /
@@ -132,6 +136,8 @@ in the environment.
 (See below.)
 This functionality can be compiled out by removing the definition of
 .Ev COLORLS .
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl H
 Symbolic links on the command line are followed.
 This option is assumed if
@@ -144,6 +150,8 @@ options are specified.
 Prevent
 .Fl A
 from being automatically set for the super-user.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl L
 If argument is a symbolic link, list the file or directory the link references
 rather than the link itself.
@@ -171,13 +179,21 @@ month, day, hour, minute, second, and ye
 The
 .Fl D
 option gives even more control over the output format.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl U
 Use time when file was created for sorting or printing.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl W
 Display whiteouts when scanning directories.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl Z
 Display each file's MAC label; see
 .Xr maclabel 7 .
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl a
 Include directory entries whose names begin with a
 dot
@@ -188,6 +204,8 @@ As
 but use
 .Tn C
 escape codes whenever possible.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl c
 Use time when file status was last changed for sorting or printing.
 .It Fl d
@@ -196,19 +214,38 @@ Directories are listed as plain files (n
 Output is not sorted.
 This option turns on
 .Fl a .
+It also negates the effect of the
+.Fl r ,
+.Fl S
+and
+.Fl t
+options.
+As allowd by
+.St -p1003.1-2001 ,
+this option has no effect on the
+.Fl d ,
+.Fl l ,
+.Fl R
+and
+.Fl s
+options.
 .It Fl g
-This option is deprecated and is only available for compatibility
-with
-.Bx 4.3 ;
-it was used to display the group name in the long
+This option has no effect.
+It is only available for compatibility with
+.Bx 4.3 ,
+where it was used to display the group name in the long
 .Pq Fl l
 format output.
+This option is incompatible with
+.St -p1003.1-2001 .
 .It Fl h
 When used with the
 .Fl l
 option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte
 and Petabyte in order to reduce the number of digits to four or fewer
 using base 2 for sizes.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl i
 For each file, print the file's file serial number (inode number).
 .It Fl k
@@ -217,6 +254,8 @@ This has the same effect as setting envi
 to 1024, except that it also nullifies any
 .Fl h
 options to its left.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl l
 (The lowercase letter
 .Dq ell . )
@@ -234,6 +273,8 @@ output.
 Include the file flags in a long
 .Pq Fl l
 output.
+This option is incompatible with
+.St -p1003.1-2001 .
 See
 .Xr chflags 1
 for a list of file flags and their meanings.
@@ -293,6 +334,8 @@ or printing
 Force raw printing of non-printable characters.
 This is the default
 when output is not to a terminal.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl x
 The same as
 .Fl C ,
@@ -307,6 +350,8 @@ This has the same effect as setting
 See the description of the
 .Fl t
 option for more details.
+This option is not defined in
+.St -p1003.1-2001 .
 .It Fl 1
 (The numeric digit
 .Dq one . )
@@ -323,6 +368,8 @@ non-monetary separator returned by
 typically a comma or period.
 If no locale is set, or the locale does not have a non-monetary separator, this
 option has no effect.
+This option is not defined in
+.St -p1003.1-2001 .
 .El
 .Pp
 The
@@ -762,13 +809,19 @@ specification.
 .Xr getfmac 8
 .Sh STANDARDS
 With the exception of options
-.Fl I , g , n
+.Fl g , n
 and
 .Fl o ,
 the
 .Nm
 utility conforms to
 .St -p1003.1-2001 .
+The options
+.Fl B , D , G , I , T , U , W , Z , b , h , k , w , y
+and
+.Fl ,
+are compatible extensions not defined in
+.St -p1003.1-2001 .
 .Pp
 The ACL support is compatible with
 .Tn IEEE
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To 

svn commit: r251647 - head/usr.bin/calendar

2013-06-12 Thread Greg Lehey
Author: grog
Date: Wed Jun 12 07:52:49 2013
New Revision: 251647
URL: http://svnweb.freebsd.org/changeset/base/251647

Log:
  Handle some expression regressions.
  Explicitly use GNU cpp for preprocessing.
  Remove explicit debugging code.
  Change some variable names to be less confusing.
  Improve some comments.
  Improve indentation.
  
  PR:   162211
168785
  MFC after:2 weeks

Modified:
  head/usr.bin/calendar/calendar.h
  head/usr.bin/calendar/dates.c
  head/usr.bin/calendar/io.c
  head/usr.bin/calendar/parsedata.c
  head/usr.bin/calendar/pathnames.h
  head/usr.bin/calendar/sunpos.c

Modified: head/usr.bin/calendar/calendar.h
==
--- head/usr.bin/calendar/calendar.hWed Jun 12 07:07:06 2013
(r251646)
+++ head/usr.bin/calendar/calendar.hWed Jun 12 07:52:49 2013
(r251647)
@@ -101,11 +101,11 @@ extern int EastLongitude;
 * program wrong.
 */
 
-/* 
+/*
  * All the astronomical calculations are carried out for the meridian 120
  * degrees east of Greenwich.
  */
-#define UTCOFFSET_CNY  8.0 
+#define UTCOFFSET_CNY  8.0
 
 extern int debug;  /* show parsing of the input */
 extern int year1, year2;
@@ -174,7 +174,7 @@ int j2g(int);
 
 /* dates.c */
 extern int cumdaytab[][14];
-extern int mondaytab[][14];
+extern int monthdaytab[][14];
 extern int debug_remember;
 void   generatedates(struct tm *tp1, struct tm *tp2);
 void   dumpdates(void);

Modified: head/usr.bin/calendar/dates.c
==
--- head/usr.bin/calendar/dates.c   Wed Jun 12 07:07:06 2013
(r251646)
+++ head/usr.bin/calendar/dates.c   Wed Jun 12 07:52:49 2013
(r251647)
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -22,7 +22,7 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- * 
+ *
  */
 
 #include sys/cdefs.h
@@ -73,8 +73,8 @@ int   cumdaytab[][14] = {
{0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365},
 };
 /* 1-based month, individual */
-static int *mondays;
-intmondaytab[][14] = {
+static int *monthdays;
+intmonthdaytab[][14] = {
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30},
{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30},
 };
@@ -192,11 +192,11 @@ generatedates(struct tm *tp1, struct tm 
 * - Take all days from m1 .. m2
 * - Take the first days from m2
 */
-   mondays = mondaytab[isleap(y1)];
-   for (d = d1; d = mondays[m1]; d++)
+   monthdays = monthdaytab[isleap(y1)];
+   for (d = d1; d = monthdays[m1]; d++)
createdate(y1, m1, d);
for (m = m1 + 1; m  m2; m++)
-   for (d = 1; d = mondays[m]; d++)
+   for (d = 1; d = monthdays[m]; d++)
createdate(y1, m, d);
for (d = 1; d = d2; d++)
createdate(y1, m2, d);
@@ -210,21 +210,21 @@ generatedates(struct tm *tp1, struct tm 
 * - Take all days from y2-[1 .. m2
 * - Take the first days of y2-m2
 */
-   mondays = mondaytab[isleap(y1)];
-   for (d = d1; d = mondays[m1]; d++)
+   monthdays = monthdaytab[isleap(y1)];
+   for (d = d1; d = monthdays[m1]; d++)
createdate(y1, m1, d);
for (m = m1 + 1; m = 12; m++)
-   for (d = 1; d = mondays[m]; d++)
+   for (d = 1; d = monthdays[m]; d++)
createdate(y1, m, d);
for (y = y1 + 1; y  y2; y++) {
-   mondays = mondaytab[isleap(y)];
+   monthdays = monthdaytab[isleap(y)];
for (m = 1; m = 12; m++)
-   for (d = 1; d = mondays[m]; d++)
+   for (d = 1; d = monthdays[m]; d++)
createdate(y, m, d);
}
-   mondays = mondaytab[isleap(y2)];
+   monthdays = monthdaytab[isleap(y2)];
for (m = 1; m  m2; m++)
-   for (d = 1; d = mondays[m]; d++)
+   for (d = 1; d = monthdays[m]; d++)
createdate(y2, m, d);
for (d = 1; d = d2; d++)
createdate(y2, m2, d);
@@ -360,12 

svn commit: r251648 - head/usr.bin/calendar

2013-06-12 Thread Greg Lehey
Author: grog
Date: Wed Jun 12 07:53:59 2013
New Revision: 251648
URL: http://svnweb.freebsd.org/changeset/base/251648

Log:
  style(9)
  
  MFC after:2 weeks

Modified:
  head/usr.bin/calendar/calendar.c

Modified: head/usr.bin/calendar/calendar.c
==
--- head/usr.bin/calendar/calendar.cWed Jun 12 07:52:49 2013
(r251647)
+++ head/usr.bin/calendar/calendar.cWed Jun 12 07:53:59 2013
(r251648)
@@ -218,7 +218,6 @@ main(int argc, char *argv[])
 static void __dead2
 usage(void)
 {
-
fprintf(stderr, %s\n%s\n%s\n,
usage: calendar [-A days] [-a] [-B days] [-D sun|moon] [-d],
[-F friday] [-f calendarfile] [-l longitude],
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251678 - head/usr.bin/calendar

2013-06-12 Thread Greg Lehey
Author: grog
Date: Thu Jun 13 04:11:21 2013
New Revision: 251678
URL: http://svnweb.freebsd.org/changeset/base/251678

Log:
  Revert revision 251648.  style(9) requires an empty line here.
  
  Reported by:  mdf@

Modified:
  head/usr.bin/calendar/calendar.c

Modified: head/usr.bin/calendar/calendar.c
==
--- head/usr.bin/calendar/calendar.cThu Jun 13 03:23:24 2013
(r251677)
+++ head/usr.bin/calendar/calendar.cThu Jun 13 04:11:21 2013
(r251678)
@@ -218,6 +218,7 @@ main(int argc, char *argv[])
 static void __dead2
 usage(void)
 {
+
fprintf(stderr, %s\n%s\n%s\n,
usage: calendar [-A days] [-a] [-B days] [-D sun|moon] [-d],
[-F friday] [-f calendarfile] [-l longitude],
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250905 - stable/9/usr.bin/locale

2013-05-22 Thread Greg Lehey
Author: grog
Date: Wed May 22 07:52:41 2013
New Revision: 250905
URL: http://svnweb.freebsd.org/changeset/base/250905

Log:
  MFH revisions 242743 to 243202:
  
  Make parameters to -c and -k options optional.  If no parameters are
  supplied, print information for all keywords.
  
  Improve output of -c option, in particular in conjunction with -k
  option.
  
  Complete man page.
  
  Add comment on standards conformity.

Modified:
  stable/9/usr.bin/locale/locale.1
  stable/9/usr.bin/locale/locale.c
Directory Properties:
  stable/9/usr.bin/locale/   (props changed)

Modified: stable/9/usr.bin/locale/locale.1
==
--- stable/9/usr.bin/locale/locale.1Wed May 22 05:43:14 2013
(r250904)
+++ stable/9/usr.bin/locale/locale.1Wed May 22 07:52:41 2013
(r250905)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd November 1, 2005
+.Dd November 18, 2012
 .Dt LOCALE 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Op Ar prefix
 .Nm
 .Op Fl ck
-.Ar keyword ...
+.Op Ar keyword ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -70,12 +70,16 @@ will respect the
 .Ev PATH_LOCALE
 environment variable, and use it instead of the system's default locale
 directory.
-.It Fl m
-Print names of all available charmaps.
-.It Fl k
-Print the names and values of all selected keywords.
 .It Fl c
 Print the category name for all selected keywords.
+If no keywords are selected, print the category name for all defined
+keywords.
+.It Fl k
+Print the names and values of all selected keywords.
+If no keywords are selected, print the names and values of all defined
+keywords.
+.It Fl m
+Print names of all available charmaps.
 .El
 .Sh IMPLEMENTATION NOTES
 The special
@@ -89,6 +93,17 @@ a prefix string can be defined to limit 
 .Ex -std
 .Sh SEE ALSO
 .Xr setlocale 3
+.Sh STANDARDS
+The
+.Nm
+utility conforms to
+.St -p1003.1-2004 .
+The
+.Ev LC_CTYPE ,
+.Ev LC_MESSAGES
+and
+.Ev NLSPATH
+environment variables are not interpreted.
 .Sh BUGS
 Since
 .Fx

Modified: stable/9/usr.bin/locale/locale.c
==
--- stable/9/usr.bin/locale/locale.cWed May 22 05:43:14 2013
(r250904)
+++ stable/9/usr.bin/locale/locale.cWed May 22 07:52:41 2013
(r250905)
@@ -31,7 +31,7 @@
  * nl_langinfo(3) extensions)
  *
  * XXX: correctly handle reserved 'charmap' keyword and '-m' option (require
- *  localedef(1) implementation).  Currently it's handled via
+ * localedef(1) implementation).  Currently it's handled via
  * nl_langinfo(CODESET).
  */
 
@@ -79,32 +79,32 @@ struct _lcinfo {
{ LC_MONETARY,LC_MONETARY },
{ LC_MESSAGES,LC_MESSAGES }
 };
-#define NLCINFO (sizeof(lcinfo)/sizeof(lcinfo[0]))
+#defineNLCINFO (sizeof(lcinfo)/sizeof(lcinfo[0]))
 
 /* ids for values not referenced by nl_langinfo() */
 #defineKW_ZERO 1
 #defineKW_GROUPING (KW_ZERO+1)
-#define KW_INT_CURR_SYMBOL (KW_ZERO+2)
-#define KW_CURRENCY_SYMBOL (KW_ZERO+3)
-#define KW_MON_DECIMAL_POINT   (KW_ZERO+4)
-#define KW_MON_THOUSANDS_SEP   (KW_ZERO+5)
-#define KW_MON_GROUPING(KW_ZERO+6)
-#define KW_POSITIVE_SIGN   (KW_ZERO+7)
-#define KW_NEGATIVE_SIGN   (KW_ZERO+8)
-#define KW_INT_FRAC_DIGITS (KW_ZERO+9)
-#define KW_FRAC_DIGITS (KW_ZERO+10)
-#define KW_P_CS_PRECEDES   (KW_ZERO+11)
-#define KW_P_SEP_BY_SPACE  (KW_ZERO+12)
-#define KW_N_CS_PRECEDES   (KW_ZERO+13)
-#define KW_N_SEP_BY_SPACE  (KW_ZERO+14)
-#define KW_P_SIGN_POSN (KW_ZERO+15)
-#define KW_N_SIGN_POSN (KW_ZERO+16)
-#define KW_INT_P_CS_PRECEDES   (KW_ZERO+17)
-#define KW_INT_P_SEP_BY_SPACE  (KW_ZERO+18)
-#define KW_INT_N_CS_PRECEDES   (KW_ZERO+19)
-#define KW_INT_N_SEP_BY_SPACE  (KW_ZERO+20)
-#define KW_INT_P_SIGN_POSN (KW_ZERO+21)
-#define KW_INT_N_SIGN_POSN (KW_ZERO+22)
+#defineKW_INT_CURR_SYMBOL  (KW_ZERO+2)
+#defineKW_CURRENCY_SYMBOL  (KW_ZERO+3)
+#defineKW_MON_DECIMAL_POINT(KW_ZERO+4)
+#defineKW_MON_THOUSANDS_SEP(KW_ZERO+5)
+#defineKW_MON_GROUPING (KW_ZERO+6)
+#defineKW_POSITIVE_SIGN(KW_ZERO+7)
+#defineKW_NEGATIVE_SIGN(KW_ZERO+8)
+#defineKW_INT_FRAC_DIGITS  (KW_ZERO+9)
+#defineKW_FRAC_DIGITS  (KW_ZERO+10)
+#defineKW_P_CS_PRECEDES(KW_ZERO+11)
+#defineKW_P_SEP_BY_SPACE   (KW_ZERO+12)
+#defineKW_N_CS_PRECEDES(KW_ZERO+13)
+#defineKW_N_SEP_BY_SPACE   (KW_ZERO+14)
+#defineKW_P_SIGN_POSN  (KW_ZERO+15)
+#defineKW_N_SIGN_POSN  (KW_ZERO+16)
+#defineKW_INT_P_CS_PRECEDES(KW_ZERO+17)
+#defineKW_INT_P_SEP_BY_SPACE   (KW_ZERO+18)
+#defineKW_INT_N_CS_PRECEDES(KW_ZERO+19)
+#defineKW_INT_N_SEP_BY_SPACE   (KW_ZERO+20)
+#define

svn commit: r250799 - stable/9/lib/libc/stdio

2013-05-18 Thread Greg Lehey
Author: grog
Date: Sun May 19 01:58:00 2013
New Revision: 250799
URL: http://svnweb.freebsd.org/changeset/base/250799

Log:
  MFH r242738:
  
Clarify that the ' flag is an apostrophe.

Modified:
  stable/9/lib/libc/stdio/printf.3
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/stdio/printf.3
==
--- stable/9/lib/libc/stdio/printf.3Sun May 19 01:52:39 2013
(r250798)
+++ stable/9/lib/libc/stdio/printf.3Sun May 19 01:58:00 2013
(r250799)
@@ -277,7 +277,7 @@ number produced by a signed conversion.
 A
 .Cm +
 overrides a space if both are used.
-.It Sq Cm '
+.It So ' Sc (apostrophe)
 Decimal conversions
 .Cm ( d , u ,
 or
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250732 - head/bin/df

2013-05-16 Thread Greg Lehey
Author: grog
Date: Fri May 17 03:52:20 2013
New Revision: 250732
URL: http://svnweb.freebsd.org/changeset/base/250732

Log:
  Complete revision 243104.

Modified:
  head/bin/df/df.1

Modified: head/bin/df/df.1
==
--- head/bin/df/df.1Fri May 17 03:14:55 2013(r250731)
+++ head/bin/df/df.1Fri May 17 03:52:20 2013(r250732)
@@ -196,7 +196,9 @@ If the value is outside, it will be set 
 .Xr localeconv 3 ,
 .Xr fstab 5 ,
 .Xr mount 8 ,
-.Xr quot 8 .
+.Xr pstat 8 ,
+.Xr quot 8 ,
+.Xr swapinfo 8 .
 .Sh STANDARDS
 With the exception of most options,
 the
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250733 - stable/9/bin/df

2013-05-16 Thread Greg Lehey
Author: grog
Date: Fri May 17 03:55:03 2013
New Revision: 250733
URL: http://svnweb.freebsd.org/changeset/base/250733

Log:
  MFC revisions 243049,243129,244134,245871,245912,249698,249924

Modified:
  stable/9/bin/df/df.1
  stable/9/bin/df/df.c
Directory Properties:
  stable/9/bin/df/   (props changed)

Modified: stable/9/bin/df/df.1
==
--- stable/9/bin/df/df.1Fri May 17 03:52:20 2013(r250732)
+++ stable/9/bin/df/df.1Fri May 17 03:55:03 2013(r250733)
@@ -29,7 +29,7 @@
 .\ @(#)df.1   8.3 (Berkeley) 5/8/95
 .\ $FreeBSD$
 .\
-.Dd March 3, 2012
+.Dd January 24, 2013
 .Dt DF 1
 .Os
 .Sh NAME
@@ -39,6 +39,7 @@
 .Nm
 .Op Fl b | g | H | h | k | m | P
 .Op Fl acilnT
+.Op Fl \,
 .Op Fl t Ar type
 .Op Ar file | filesystem ...
 .Sh DESCRIPTION
@@ -50,7 +51,8 @@ displays statistics about the amount of 
 or on the file system of which
 .Ar file
 is a part.
-Values are displayed in 512-byte per block counts.
+By default block counts are displayed with an assumed block size of
+512 bytes.
 If neither a file or a file system operand is specified,
 statistics for all mounted file systems are displayed
 (subject to the
@@ -65,48 +67,54 @@ Show all mount points, including those t
 flag.
 This is implied for file systems specified on the command line.
 .It Fl b
-Use 512-byte blocks rather than the default.
-Note that
-this overrides the
+Explicitly use 512 byte blocks, overriding any
 .Ev BLOCKSIZE
 specification from the environment.
+This is the same as the
+.Fl P
+option.
+The
+.Fl k
+option overrides this option.
 .It Fl c
 Display a grand total.
 .It Fl g
-Use 1073741824-byte (1-Gbyte) blocks rather than the default.
-Note that
-this overrides the
+Use 1073741824 byte (1 Gibibyte) blocks rather than the default.
+This overrides any
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl H
 .Dq Human-readable
 output.
-Use unit suffixes: Byte, Kilobyte, Megabyte,
-Gigabyte, Terabyte and Petabyte in order to reduce the number of
-digits to four or fewer using base 10 for sizes.
+Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and
+Pebibyte (based on powers of 1024) in order to reduce the number of
+digits to four or fewer.
 .It Fl h
 .Dq Human-readable
 output.
 Use unit suffixes: Byte, Kilobyte, Megabyte,
-Gigabyte, Terabyte and Petabyte in order to reduce the number of
-digits to four or fewer using base 2 for sizes.
-Inodes statistics, if enabled with
-.Fl i ,
-are always printed in base 10.
+Gigabyte, Terabyte and Petabyte (based on powers of 1000) in order to
+reduce the number of
+digits to four or fewer.
 .It Fl i
-Include statistics on the number of free inodes.
+Include statistics on the number of free and used inodes.
+In conjunction with the
+.Fl h
+or
+.Fl H
+options, the number of inodes is scaled by powers of 1000.
 .It Fl k
-Use 1024-byte (1-Kbyte) blocks rather than the default.
-Note that
-this overrides the
+Use 1024 byte (1 Kibibyte) blocks rather than the default.
+This overrides the
+.Fl P
+option and any
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl l
 Only display information about locally-mounted file systems.
 .It Fl m
-Use 1048576-byte (1-Mbyte) blocks rather than the default.
-Note that
-this overrides the
+Use 1048576 byte (1 Mebibyte) blocks rather than the default.
+This overrides any
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl n
@@ -119,10 +127,15 @@ When this option is specified,
 will not request new statistics from the file systems, but will respond
 with the possibly stale statistics that were previously obtained.
 .It Fl P
-Use POSIX compliant output of 512-byte blocks rather than the default.
-Note that this overrides the
+Explicitly use 512 byte blocks, overriding any
 .Ev BLOCKSIZE
 specification from the environment.
+This is the same as the
+.Fl b
+option.
+The
+.Fl k
+option overrides this option.
 .It Fl t
 Only print out statistics for file systems of the specified types.
 More than one type may be specified in a comma separated list.
@@ -148,13 +161,29 @@ command can be used to find out the type
 that are available on the system.
 .It Fl T
 Include file system type.
+.It Fl ,
+(Comma) Print sizes grouped and separated by thousands using the
+non-monetary separator returned by
+.Xr localeconv 3 ,
+typically a comma or period.
+If no locale is set, or the locale does not have a non-monetary separator, this
+option has no effect.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width BLOCKSIZE
 .It Ev BLOCKSIZE
-If the environment variable
-.Ev BLOCKSIZE
-is set, the block counts will be displayed in units of that size block.
+Specifies the units in which to report block counts.
+This uses
+.Xr getbsize 3 ,
+which allows units of bytes or numbers scaled with the letters
+.Em k
+(for multiples of 1024 bytes),
+.Em m
+(for multiples of 1048576 bytes) or
+.Em g
+(for gibibytes).
+The allowed range is 512 bytes to 1 GB.
+If the value is 

svn commit: r244166 - head/usr.bin/calendar

2012-12-12 Thread Greg Lehey
Author: grog
Date: Thu Dec 13 01:44:58 2012
New Revision: 244166
URL: http://svnweb.freebsd.org/changeset/base/244166

Log:
  Reluctantly remove one of the most extraordinary numeric conversion
  routines I have ever seen and replace with something far more boring.

Modified:
  head/usr.bin/calendar/parsedata.c

Modified: head/usr.bin/calendar/parsedata.c
==
--- head/usr.bin/calendar/parsedata.c   Thu Dec 13 01:39:49 2012
(r244165)
+++ head/usr.bin/calendar/parsedata.c   Thu Dec 13 01:44:58 2012
(r244166)
@@ -940,15 +940,13 @@ indextooffset(char *s)
 {
int i;
struct fixs *n;
+   char *es;
 
if (s[0] == '+' || s[0] == '-') {
-   char ss[9];
-   for (i = -100; i  100; i++) {
-   sprintf(ss, %s%d, (i  0) ? + : , i);
-   if (strcmp(ss, s) == 0)
-   return (i);
-   }
-   return (0);
+   i = strtod (s, es);
+   if (*es != '\0')  /* trailing junk */
+   errx (1, Invalid specifier format: %s\n, s);
+   return (i);
}
 
for (i = 0; i  6; i++) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244168 - head/usr.bin/calendar

2012-12-12 Thread Greg Lehey
Author: grog
Date: Thu Dec 13 02:21:05 2012
New Revision: 244168
URL: http://svnweb.freebsd.org/changeset/base/244168

Log:
  Use even more conventional conversion routines.
  
  Reported by: peterj@

Modified:
  head/usr.bin/calendar/parsedata.c

Modified: head/usr.bin/calendar/parsedata.c
==
--- head/usr.bin/calendar/parsedata.c   Thu Dec 13 01:58:11 2012
(r244167)
+++ head/usr.bin/calendar/parsedata.c   Thu Dec 13 02:21:05 2012
(r244168)
@@ -943,7 +943,7 @@ indextooffset(char *s)
char *es;
 
if (s[0] == '+' || s[0] == '-') {
-   i = strtod (s, es);
+   i = strtol (s, es, 10);
if (*es != '\0')  /* trailing junk */
errx (1, Invalid specifier format: %s\n, s);
return (i);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244134 - head/bin/df

2012-12-11 Thread Greg Lehey
Author: grog
Date: Wed Dec 12 04:18:25 2012
New Revision: 244134
URL: http://svnweb.freebsd.org/changeset/base/244134

Log:
  Handle large negative block counts correctly.
  
  MFC after: 2 weeks

Modified:
  head/bin/df/df.c

Modified: head/bin/df/df.c
==
--- head/bin/df/df.cWed Dec 12 02:55:40 2012(r244133)
+++ head/bin/df/df.cWed Dec 12 04:18:25 2012(r244134)
@@ -397,7 +397,7 @@ prthumanvalinode(int64_t bytes)
 static intmax_t
 fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
 {
-   return (num * (intmax_t) fsbs / bs);
+   return (num * (intmax_t) fsbs / (int64_t) bs);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244075 - stable/9/bin/ls

2012-12-09 Thread Greg Lehey
Author: grog
Date: Mon Dec 10 03:11:19 2012
New Revision: 244075
URL: http://svnweb.freebsd.org/changeset/base/244075

Log:
  MFC to r242840:
  
Add y flag and environment variable LS_SAMESORT to specify the same
sorting order for time and name with the -t option.  IEEE Std 1003.2
(POSIX.2) mandates that the -t option sort in descending order, and
that if two files have the same timestamp, they should be sorted in
ascending order of their names.  The -r flag reverses both of these
sort orders, so they're never the same.  This creates significant
problems for sequentially named files stored on FAT file systems,
where it can be impossible to list them in the order in which they
were created.
  
Add , (comma) option to print file sizes grouped and separated by
thousands using the non-monetary separator returned by localeconv(3),
typically a comma or period.

Modified:
  stable/9/bin/ls/Makefile
  stable/9/bin/ls/cmp.c
  stable/9/bin/ls/ls.1
  stable/9/bin/ls/ls.c
  stable/9/bin/ls/ls.h
  stable/9/bin/ls/print.c
  stable/9/bin/ls/util.c

Modified: stable/9/bin/ls/Makefile
==
--- stable/9/bin/ls/MakefileMon Dec 10 02:44:47 2012(r244074)
+++ stable/9/bin/ls/MakefileMon Dec 10 03:11:19 2012(r244075)
@@ -1,6 +1,8 @@
 #  @(#)Makefile8.1 (Berkeley) 6/2/93
 # $FreeBSD$
 
+.include bsd.own.mk
+
 PROG=  ls
 SRCS=  cmp.c ls.c print.c util.c
 DPADD= ${LIBUTIL}

Modified: stable/9/bin/ls/cmp.c
==
--- stable/9/bin/ls/cmp.c   Mon Dec 10 02:44:47 2012(r244074)
+++ stable/9/bin/ls/cmp.c   Mon Dec 10 03:11:19 2012(r244075)
@@ -78,6 +78,9 @@ modcmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_mtim.tv_nsec 
a-fts_statp-st_mtim.tv_nsec)
return (-1);
+   if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -104,6 +107,9 @@ acccmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_atim.tv_nsec 
a-fts_statp-st_atim.tv_nsec)
return (-1);
+   if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -130,6 +136,9 @@ birthcmp(const FTSENT *a, const FTSENT *
if (b-fts_statp-st_birthtim.tv_nsec 
a-fts_statp-st_birthtim.tv_nsec)
return (-1);
+   if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -156,6 +165,9 @@ statcmp(const FTSENT *a, const FTSENT *b
if (b-fts_statp-st_ctim.tv_nsec 
a-fts_statp-st_ctim.tv_nsec)
return (-1);
+   if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 

Modified: stable/9/bin/ls/ls.1
==
--- stable/9/bin/ls/ls.1Mon Dec 10 02:44:47 2012(r244074)
+++ stable/9/bin/ls/ls.1Mon Dec 10 03:11:19 2012(r244075)
@@ -32,7 +32,7 @@
 .\ @(#)ls.1   8.7 (Berkeley) 7/29/94
 .\ $FreeBSD$
 .\
-.Dd April 4, 2008
+.Dd November 8, 2012
 .Dt LS 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Nd list directory contents
 .Sh SYNOPSIS
 .Nm
-.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1
+.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,
 .Op Fl D Ar format
 .Op Ar
 .Sh DESCRIPTION
@@ -130,6 +130,8 @@ This option is equivalent to defining
 .Ev CLICOLOR
 in the environment.
 (See below.)
+This functionality can be compiled out by removing the definition of
+.Ev COLORLS .
 .It Fl H
 Symbolic links on the command line are followed.
 This option is assumed if
@@ -249,12 +251,35 @@ subsection below, except (if the long fo
 the directory totals are not output when the output is in a
 single column, even if multi-column output is requested.
 .It Fl t
-Sort by time modified (most recently modified
-first) before sorting the operands in lexicographical
-order.
+Sort by descending time modified (most recently modified first).  If two files
+have the same modification timestamp, sort their names in ascending
+lexicographical order.
+The
+.Fl r
+option reverses both of these sort orders.
+.Pp
+Note that these sort orders are contradictory: the time sequence is in
+descending order, the lexicographical sort is in ascending order.
+This behavior is mandated by
+.St -p1003.2 .
+This feature can cause problems listing files stored with sequential names on
+FAT file systems, such as from digital cameras, where it is possible to have
+more than one image with the same timestamp.
+In such a case, the photos cannot be listed in the sequence in which
+they were taken.
+To ensure the 

svn commit: r243201 - head/usr.bin/locale

2012-11-17 Thread Greg Lehey
Author: grog
Date: Sat Nov 17 23:49:20 2012
New Revision: 243201
URL: http://svnweb.freebsd.org/changeset/base/243201

Log:
  Correctly handle keywords without options.
  
  Reported by: swills@
  MFC after:14 days

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cSat Nov 17 23:44:01 2012
(r243200)
+++ head/usr.bin/locale/locale.cSat Nov 17 23:49:20 2012
(r243201)
@@ -279,8 +279,8 @@ main(int argc, char *argv[])
exit(0);
}
 
-   /* process '-c' and/or '-k' */
-   if (prt_categories || prt_keywords) {
+   /* process '-c', '-k', or command line arguments. */
+   if (prt_categories || prt_keywords || argc  0) {
if (argc  0) {
setlocale(LC_ALL, );
while (argc  0) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243202 - head/usr.bin/locale

2012-11-17 Thread Greg Lehey
Author: grog
Date: Sat Nov 17 23:52:38 2012
New Revision: 243202
URL: http://svnweb.freebsd.org/changeset/base/243202

Log:
  Sort options.
  Add comment on standards conformity.
  
  MFC after:14 days

Modified:
  head/usr.bin/locale/locale.1

Modified: head/usr.bin/locale/locale.1
==
--- head/usr.bin/locale/locale.1Sat Nov 17 23:49:20 2012
(r243201)
+++ head/usr.bin/locale/locale.1Sat Nov 17 23:52:38 2012
(r243202)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd November 1, 2005
+.Dd November 18, 2012
 .Dt LOCALE 1
 .Os
 .Sh NAME
@@ -70,16 +70,16 @@ will respect the
 .Ev PATH_LOCALE
 environment variable, and use it instead of the system's default locale
 directory.
-.It Fl m
-Print names of all available charmaps.
-.It Fl k
-Print the names and values of all selected keywords.
-If no keywords are selected, print the names and values of all defined
-keywords.
 .It Fl c
 Print the category name for all selected keywords.
 If no keywords are selected, print the category name for all defined
 keywords.
+.It Fl k
+Print the names and values of all selected keywords.
+If no keywords are selected, print the names and values of all defined
+keywords.
+.It Fl m
+Print names of all available charmaps.
 .El
 .Sh IMPLEMENTATION NOTES
 The special
@@ -93,6 +93,17 @@ a prefix string can be defined to limit 
 .Ex -std
 .Sh SEE ALSO
 .Xr setlocale 3
+.Sh STANDARDS
+The
+.Nm
+utility conforms to
+.St -p1003.1-2004 .
+The
+.Ev LC_CTYPE ,
+.Ev LC_MESSAGES
+and
+.Ev NLSPATH
+environment variables are not interpreted.
 .Sh BUGS
 Since
 .Fx
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243116 - head/lib/libc/gen

2012-11-15 Thread Greg Lehey
Author: grog
Date: Fri Nov 16 01:41:42 2012
New Revision: 243116
URL: http://svnweb.freebsd.org/changeset/base/243116

Log:
  Complete man page.
  
  MFC after:2 weeks

Modified:
  head/lib/libc/gen/getbsize.3

Modified: head/lib/libc/gen/getbsize.3
==
--- head/lib/libc/gen/getbsize.3Fri Nov 16 01:37:25 2012
(r243115)
+++ head/lib/libc/gen/getbsize.3Fri Nov 16 01:41:42 2012
(r243116)
@@ -28,12 +28,12 @@
 .\ @(#)getbsize.3 8.1 (Berkeley) 6/4/93
 .\ $FreeBSD$
 .\
-.Dd June 4, 1993
+.Dd November 16, 2012
 .Dt GETBSIZE 3
 .Os
 .Sh NAME
 .Nm getbsize
-.Nd get user block size
+.Nd get preferred block size
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -43,11 +43,31 @@
 .Sh DESCRIPTION
 The
 .Fn getbsize
-function determines the user's preferred block size based on the value of the
-.Dq BLOCKSIZE
-environment variable; see
-.Xr environ 7
-for details on its use and format.
+function returns a preferred block size for reporting by system utilities
+.Xr df 1 ,
+.Xr du 1 ,
+.Xr ls 1
+and
+.Xr systat 1 ,
+based on the value of the
+.En BLOCKSIZE
+environment variable.
+.En BLOCKSIZE
+may be specified directly in bytes, or in multiples of a kilobyte by
+specifying a number followed by ``K'' or ``k'', in multiples of a
+megabyte by specifying a number followed by ``M'' or ``m'' or in
+multiples of a gigabyte by specifying a number followed by ``G'' or
+``g''.
+Multiples must be integers.
+.Pp
+Valid values of
+.En BLOCKSIZE
+are 512 bytes to 1 gigabyte.
+Sizes less than 512 bytes are rounded up to 512 bytes, and sizes
+greater than 1 GB are rounded down to 1 GB.
+In each case
+.Fn getbsize
+produces a warning message.
 .Pp
 The
 .Fn getbsize
@@ -61,10 +81,6 @@ terminating null).
 The memory referenced by
 .Fa blocksizep
 is filled in with block size, in bytes.
-.Pp
-If the user's block size is unreasonable, a warning message is
-written to standard error and the returned information reflects
-a block size of 512 bytes.
 .Sh SEE ALSO
 .Xr df 1 ,
 .Xr du 1 ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243117 - head/share/man/man7

2012-11-15 Thread Greg Lehey
Author: grog
Date: Fri Nov 16 01:43:23 2012
New Revision: 243117
URL: http://svnweb.freebsd.org/changeset/base/243117

Log:
  Move detailed description of BLOCKSIZE to getbsize(3).
  
  MFC after:2 weeks.

Modified:
  head/share/man/man7/environ.7

Modified: head/share/man/man7/environ.7
==
--- head/share/man/man7/environ.7   Fri Nov 16 01:41:42 2012
(r243116)
+++ head/share/man/man7/environ.7   Fri Nov 16 01:43:23 2012
(r243117)
@@ -56,13 +56,9 @@ The size of the block units used by seve
 .Xr du 1
 and
 .Xr ls 1 .
-.Ev BLOCKSIZE
-may be specified in units of a byte by specifying a number,
-in units of a kilobyte by specifying a number followed by ``K'' or
-``k'', in units of a megabyte by specifying a number followed by ``M''
-or ``m'' and in units of a gigabyte by specifying a number followed
-by ``G'' or ``g''.
-Sizes less than 512 bytes or greater than a gigabyte are ignored.
+This variable is processed by the
+.Xr getbsize 3
+function.
 .It Ev COLUMNS
 The user's preferred width in column positions for the terminal.
 Utilities such as
@@ -259,6 +255,7 @@ built-in command in
 .Xr execve 2 ,
 .Xr execle 3 ,
 .Xr getenv 3 ,
+.Xr getbsize 3 ,
 .Xr setenv 3 ,
 .Xr setlocale 3 ,
 .Xr system 3 ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r243129 - head/bin/df

2012-11-15 Thread Greg Lehey
Author: grog
Date: Fri Nov 16 03:33:34 2012
New Revision: 243129
URL: http://svnweb.freebsd.org/changeset/base/243129

Log:
  Update man pages and clarify a number of options.
  Rework block count calculations to work correctly with small block sizes.
  
  MFC after:14 days

Modified:
  head/bin/df/df.1
  head/bin/df/df.c

Modified: head/bin/df/df.1
==
--- head/bin/df/df.1Fri Nov 16 03:08:23 2012(r243128)
+++ head/bin/df/df.1Fri Nov 16 03:33:34 2012(r243129)
@@ -29,7 +29,7 @@
 .\ @(#)df.1   8.3 (Berkeley) 5/8/95
 .\ $FreeBSD$
 .\
-.Dd March 3, 2012
+.Dd November 16, 2012
 .Dt DF 1
 .Os
 .Sh NAME
@@ -50,7 +50,8 @@ displays statistics about the amount of 
 or on the file system of which
 .Ar file
 is a part.
-Values are displayed in 512-byte per block counts.
+By default block counts are displayed with an assumed block size of
+512 bytes.
 If neither a file or a file system operand is specified,
 statistics for all mounted file systems are displayed
 (subject to the
@@ -65,46 +66,54 @@ Show all mount points, including those t
 flag.
 This is implied for file systems specified on the command line.
 .It Fl b
-Use 512-byte blocks rather than the default.
-This overrides the
+Explicitly use 512 byte blocks, overriding any
 .Ev BLOCKSIZE
 specification from the environment.
+This is the same as the
+.Fl P
+option.
+The
+.Fl k
+option overrides this option.
 .It Fl c
 Display a grand total.
 .It Fl g
-Use 1073741824-byte (1-Gbyte) blocks rather than the default.
-This overrides the
+Use 1073741824 byte (1 Gibibyte) blocks rather than the default.
+This overrides any
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl H
 .Dq Human-readable
 output.
-Use unit suffixes: Byte, Kilobyte, Megabyte,
-Gigabyte, Terabyte and Petabyte in order to reduce the number of
-digits to four or fewer using base 10 for sizes.
+Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and
+Pebibyte (based on powers of 1024) in order to reduce the number of
+digits to four or fewer.
 .It Fl h
 .Dq Human-readable
 output.
 Use unit suffixes: Byte, Kilobyte, Megabyte,
-Gigabyte, Terabyte and Petabyte in order to reduce the number of
-digits to four or fewer using base 2 for sizes.
-Inodes statistics, if enabled with
-.Fl i ,
-are always printed in base 10.
+Gigabyte, Terabyte and Petabyte (based on powers of 1000) in order to
+reduce the number of
+digits to four or fewer.
 .It Fl i
-Include statistics on the number of free inodes.
+Include statistics on the number of free and used inodes.
+In conjunction with the
+.Fl h
+or
+.Fl H
+options, the number of inodes is scaled by powers of 1000.
 .It Fl k
-Use 1024-byte (1-Kbyte) blocks rather than the default.
+Use 1024 byte (1 Kibibyte) blocks rather than the default.
 This overrides the
-.Ev BLOCKSIZE
-specification from the environment and the
 .Fl P
-option.
+option and any
+.Ev BLOCKSIZE
+specification from the environment.
 .It Fl l
 Only display information about locally-mounted file systems.
 .It Fl m
-Use 1048576-byte (1-Mbyte) blocks rather than the default.
-This overrides the
+Use 1048576 byte (1 Mebibyte) blocks rather than the default.
+This overrides any
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl n
@@ -117,10 +126,12 @@ When this option is specified,
 will not request new statistics from the file systems, but will respond
 with the possibly stale statistics that were previously obtained.
 .It Fl P
-Use POSIX compliant output of 512-byte blocks rather than the default.
-This overrides the
+Explicitly use 512 byte blocks, overriding any
 .Ev BLOCKSIZE
 specification from the environment.
+This is the same as the
+.Fl b
+option.
 The
 .Fl k
 option overrides this option.
@@ -160,9 +171,18 @@ option has no effect.
 .Sh ENVIRONMENT
 .Bl -tag -width BLOCKSIZE
 .It Ev BLOCKSIZE
-If the environment variable
-.Ev BLOCKSIZE
-is set, the block counts will be displayed in units of that size block.
+Specifies the units in which to report block counts.
+This uses
+.Xr getbsize 3 ,
+which allows units of bytes or numbers scaled with the letters
+.Em k
+(for multiples of 1024 bytes),
+.Em m
+(for multiples of 1048576 bytes) or
+.Em g
+(for gibibytes).
+The allowed range is 512 bytes to 1 GB.
+If the value is outside, it will be set to the appropriate limit.
 .El
 .Sh SEE ALSO
 .Xr lsvfs 1 ,
@@ -170,13 +190,12 @@ is set, the block counts will be display
 .Xr fstatfs 2 ,
 .Xr getfsstat 2 ,
 .Xr statfs 2 ,
+.Xr getbsize 3 ,
 .Xr getmntinfo 3 ,
 .Xr localeconv 3 ,
 .Xr fstab 5 ,
 .Xr mount 8 ,
-.Xr pstat 8 ,
-.Xr quot 8 ,
-.Xr swapinfo 8
+.Xr quot 8 .
 .Sh STANDARDS
 With the exception of most options,
 the
@@ -200,3 +219,13 @@ flag is ignored if a file or file system
 Also, if a mount
 point is not accessible by the user, it is possible that the file system
 information could be stale.
+.Pp
+The
+.Fl b
+and
+.Fl P
+options are identical.
+The former 

svn commit: r243049 - head/bin/df

2012-11-14 Thread Greg Lehey
Author: grog
Date: Thu Nov 15 03:39:21 2012
New Revision: 243049
URL: http://svnweb.freebsd.org/changeset/base/243049

Log:
  Add , (comma) option to print sizes grouped and separated by thousands
  using the non-monetary separator returned by localeconv(3), typically
  a comma or period.
  
  MFC after:  14 days

Modified:
  head/bin/df/df.1
  head/bin/df/df.c

Modified: head/bin/df/df.1
==
--- head/bin/df/df.1Thu Nov 15 03:22:50 2012(r243048)
+++ head/bin/df/df.1Thu Nov 15 03:39:21 2012(r243049)
@@ -66,16 +66,14 @@ flag.
 This is implied for file systems specified on the command line.
 .It Fl b
 Use 512-byte blocks rather than the default.
-Note that
-this overrides the
+This overrides the
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl c
 Display a grand total.
 .It Fl g
 Use 1073741824-byte (1-Gbyte) blocks rather than the default.
-Note that
-this overrides the
+This overrides the
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl H
@@ -97,16 +95,16 @@ are always printed in base 10.
 Include statistics on the number of free inodes.
 .It Fl k
 Use 1024-byte (1-Kbyte) blocks rather than the default.
-Note that
-this overrides the
+This overrides the
 .Ev BLOCKSIZE
-specification from the environment.
+specification from the environment and the
+.Fl P
+option.
 .It Fl l
 Only display information about locally-mounted file systems.
 .It Fl m
 Use 1048576-byte (1-Mbyte) blocks rather than the default.
-Note that
-this overrides the
+This overrides the
 .Ev BLOCKSIZE
 specification from the environment.
 .It Fl n
@@ -120,9 +118,12 @@ will not request new statistics from the
 with the possibly stale statistics that were previously obtained.
 .It Fl P
 Use POSIX compliant output of 512-byte blocks rather than the default.
-Note that this overrides the
+This overrides the
 .Ev BLOCKSIZE
 specification from the environment.
+The
+.Fl k
+option overrides this option.
 .It Fl t
 Only print out statistics for file systems of the specified types.
 More than one type may be specified in a comma separated list.
@@ -148,6 +149,13 @@ command can be used to find out the type
 that are available on the system.
 .It Fl T
 Include file system type.
+.It Fl ,
+(Comma) Print sizes grouped and separated by thousands using the
+non-monetary separator returned by
+.Xr localeconv 3 ,
+typically a comma or period.
+If no locale is set, or the locale does not have a non-monetary separator, this
+option has no effect.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width BLOCKSIZE
@@ -165,9 +173,21 @@ is set, the block counts will be display
 .Xr getfsstat 2 ,
 .Xr statfs 2 ,
 .Xr getmntinfo 3 ,
+.Xr localeconv 3 ,
 .Xr fstab 5 ,
 .Xr mount 8 ,
 .Xr quot 8
+.Sh STANDARDS
+With the exception of most options,
+the
+.Nm
+utility conforms to
+.St -p1003.1-2004 ,
+which defines only the
+.Fl k , P
+and
+.Fl t
+options.
 .Sh HISTORY
 A
 .Nm

Modified: head/bin/df/df.c
==
--- head/bin/df/df.cThu Nov 15 03:22:50 2012(r243048)
+++ head/bin/df/df.cThu Nov 15 03:39:21 2012(r243049)
@@ -53,6 +53,7 @@ __FBSDID($FreeBSD$);
 #include ufs/ufs/ufsmount.h
 #include err.h
 #include libutil.h
+#include locale.h
 #include stdint.h
 #include stdio.h
 #include stdlib.h
@@ -95,6 +96,7 @@ imax(int a, int b)
 }
 
 static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag, Tflag;
+static int thousands;
 static struct  ufs_args mdev;
 
 int
@@ -111,12 +113,12 @@ main(int argc, char *argv[])
int ch, rv;
 
fstype = ufs;
-
+   (void)setlocale(LC_ALL, );
memset(totalbuf, 0, sizeof(totalbuf));
totalbuf.f_bsize = DEV_BSIZE;
strlcpy(totalbuf.f_mntfromname, total, MNAMELEN);
vfslist = NULL;
-   while ((ch = getopt(argc, argv, abcgHhiklmnPt:T)) != -1)
+   while ((ch = getopt(argc, argv, abcgHhiklmnPt:T,)) != -1)
switch (ch) {
case 'a':
aflag = 1;
@@ -180,6 +182,9 @@ main(int argc, char *argv[])
case 'T':
Tflag = 1;
break;
+   case ',':
+   thousands = 1;
+   break;
case '?':
default:
usage();
@@ -410,10 +415,18 @@ prtstat(struct statfs *sfsp, struct maxw
static int headerlen, timesthrough = 0;
static const char *header;
int64_t used, availblks, inodes;
+   const char *format;
 
if (++timesthrough == 1) {
mwp-mntfrom = imax(mwp-mntfrom, (int)strlen(Filesystem));
mwp-fstype = imax(mwp-fstype, (int)strlen(Type));
+   if (thousands) {/* make space for commas */
+   mwp-total += (mwp-total - 1) / 3;
+   mwp-used  += (mwp-used - 1) / 3;
+ 

svn commit: r242900 - head/usr.bin/calendar/calendars

2012-11-11 Thread Greg Lehey
Author: grog
Date: Sun Nov 11 22:43:36 2012
New Revision: 242900
URL: http://svnweb.freebsd.org/changeset/base/242900

Log:
  Correct date of Stanley's encounter with Livingstone.
  
  Obtained from:Henry Morton Stanley, How I met Livingstone, 
http://www.gutenberg.org/dirs/5/1/5/5157/5157-h/5157-h.htm
  MFC after:14 days

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historySun Nov 11 21:58:18 
2012(r242899)
+++ head/usr.bin/calendar/calendars/calendar.historySun Nov 11 22:43:36 
2012(r242900)
@@ -383,7 +383,6 @@
 10/23  Swallows leave Capistrano
 10/25  The UN removes Taiwan and admits the People's Republic of China, 1971
 10/26  UN's World Health Organization declares smallpox eradicated, 1978
-10/27  Henry Stanley asks David Livingstone, Dr. Livingstone, I presume?, 
1871
 10/27  New York's Boss Tweed is arrested on fraud charges, 1871
 10/27  The first New York Subway is opened, 1904
 10/28  Columbus discovers Cuba, 1492
@@ -412,6 +411,7 @@
 11/09  Roosevelt establishes the Civil Works Administration, 1933
 11/10  41 Women arrested in suffragette demonstrations near White House, 1917
 11/10  Cpt. Wirz, commandant of Andersonville Prison hanged, 1865
+11/10  Henry Stanley asks David Livingstone, Dr. Livingstone, I presume?, 
1871
 11/11  Washington becomes the 42nd state, 1889
 11/12  Dr. Sun Yat-sen's Birthday in Taiwan
 11/12  USA first exports oil to Europe, 1861
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242849 - head/usr.bin/calendar/calendars

2012-11-09 Thread Greg Lehey
Author: grog
Date: Sat Nov 10 04:49:09 2012
New Revision: 242849
URL: http://svnweb.freebsd.org/changeset/base/242849

Log:
  Correct date and spelling of encounter between Stanley and
  Livingstone.
  
  MFC after:2 weeks

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historySat Nov 10 03:44:08 
2012(r242848)
+++ head/usr.bin/calendar/calendars/calendar.historySat Nov 10 04:49:09 
2012(r242849)
@@ -383,6 +383,7 @@
 10/23  Swallows leave Capistrano
 10/25  The UN removes Taiwan and admits the People's Republic of China, 1971
 10/26  UN's World Health Organization declares smallpox eradicated, 1978
+10/27  Henry Stanley asks David Livingstone, Dr. Livingstone, I presume?, 
1871
 10/27  New York's Boss Tweed is arrested on fraud charges, 1871
 10/27  The first New York Subway is opened, 1904
 10/28  Columbus discovers Cuba, 1492
@@ -411,7 +412,6 @@
 11/09  Roosevelt establishes the Civil Works Administration, 1933
 11/10  41 Women arrested in suffragette demonstrations near White House, 1917
 11/10  Cpt. Wirz, commandant of Andersonville Prison hanged, 1865
-11/10  Henry Stanley asks David Livingston, Dr. Livingston, I presume?, 1871
 11/11  Washington becomes the 42nd state, 1889
 11/12  Dr. Sun Yat-sen's Birthday in Taiwan
 11/12  USA first exports oil to Europe, 1861
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242851 - head/usr.bin/locale

2012-11-09 Thread Greg Lehey
Author: grog
Date: Sat Nov 10 06:10:07 2012
New Revision: 242851
URL: http://svnweb.freebsd.org/changeset/base/242851

Log:
  More style(9) tabs vs. spaces:
  - tabs after #define
  - Not in comments.
  
  MFC after:2 weeks

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cSat Nov 10 06:05:04 2012
(r242850)
+++ head/usr.bin/locale/locale.cSat Nov 10 06:10:07 2012
(r242851)
@@ -79,32 +79,32 @@ struct _lcinfo {
{ LC_MONETARY,LC_MONETARY },
{ LC_MESSAGES,LC_MESSAGES }
 };
-#define NLCINFO (sizeof(lcinfo)/sizeof(lcinfo[0]))
+#defineNLCINFO (sizeof(lcinfo)/sizeof(lcinfo[0]))
 
 /* ids for values not referenced by nl_langinfo() */
 #defineKW_ZERO 1
 #defineKW_GROUPING (KW_ZERO+1)
-#define KW_INT_CURR_SYMBOL (KW_ZERO+2)
-#define KW_CURRENCY_SYMBOL (KW_ZERO+3)
-#define KW_MON_DECIMAL_POINT   (KW_ZERO+4)
-#define KW_MON_THOUSANDS_SEP   (KW_ZERO+5)
-#define KW_MON_GROUPING(KW_ZERO+6)
-#define KW_POSITIVE_SIGN   (KW_ZERO+7)
-#define KW_NEGATIVE_SIGN   (KW_ZERO+8)
-#define KW_INT_FRAC_DIGITS (KW_ZERO+9)
-#define KW_FRAC_DIGITS (KW_ZERO+10)
-#define KW_P_CS_PRECEDES   (KW_ZERO+11)
-#define KW_P_SEP_BY_SPACE  (KW_ZERO+12)
-#define KW_N_CS_PRECEDES   (KW_ZERO+13)
-#define KW_N_SEP_BY_SPACE  (KW_ZERO+14)
-#define KW_P_SIGN_POSN (KW_ZERO+15)
-#define KW_N_SIGN_POSN (KW_ZERO+16)
-#define KW_INT_P_CS_PRECEDES   (KW_ZERO+17)
-#define KW_INT_P_SEP_BY_SPACE  (KW_ZERO+18)
-#define KW_INT_N_CS_PRECEDES   (KW_ZERO+19)
-#define KW_INT_N_SEP_BY_SPACE  (KW_ZERO+20)
-#define KW_INT_P_SIGN_POSN (KW_ZERO+21)
-#define KW_INT_N_SIGN_POSN (KW_ZERO+22)
+#defineKW_INT_CURR_SYMBOL  (KW_ZERO+2)
+#defineKW_CURRENCY_SYMBOL  (KW_ZERO+3)
+#defineKW_MON_DECIMAL_POINT(KW_ZERO+4)
+#defineKW_MON_THOUSANDS_SEP(KW_ZERO+5)
+#defineKW_MON_GROUPING (KW_ZERO+6)
+#defineKW_POSITIVE_SIGN(KW_ZERO+7)
+#defineKW_NEGATIVE_SIGN(KW_ZERO+8)
+#defineKW_INT_FRAC_DIGITS  (KW_ZERO+9)
+#defineKW_FRAC_DIGITS  (KW_ZERO+10)
+#defineKW_P_CS_PRECEDES(KW_ZERO+11)
+#defineKW_P_SEP_BY_SPACE   (KW_ZERO+12)
+#defineKW_N_CS_PRECEDES(KW_ZERO+13)
+#defineKW_N_SEP_BY_SPACE   (KW_ZERO+14)
+#defineKW_P_SIGN_POSN  (KW_ZERO+15)
+#defineKW_N_SIGN_POSN  (KW_ZERO+16)
+#defineKW_INT_P_CS_PRECEDES(KW_ZERO+17)
+#defineKW_INT_P_SEP_BY_SPACE   (KW_ZERO+18)
+#defineKW_INT_N_CS_PRECEDES(KW_ZERO+19)
+#defineKW_INT_N_SEP_BY_SPACE   (KW_ZERO+20)
+#defineKW_INT_P_SIGN_POSN  (KW_ZERO+21)
+#defineKW_INT_N_SIGN_POSN  (KW_ZERO+22)
 
 struct _kwinfo {
const char  *name;
@@ -218,7 +218,7 @@ struct _kwinfo {
  (POSIX legacy) }/* compat */
 
 };
-#define NKWINFO (sizeof(kwinfo)/sizeof(kwinfo[0]))
+#defineNKWINFO (sizeof(kwinfo)/sizeof(kwinfo[0]))
 
 const char *boguslocales[] = { UTF-8 };
 #defineNBOGUS  (sizeof(boguslocales)/sizeof(boguslocales[0]))
@@ -316,7 +316,7 @@ usage(void)
  *
  * XXX actually output of this function does not guarantee that locale
  * is really available to application, since it can be broken or
- * inconsistent thus setlocale() will fail. Maybe add '-V' 
function to
+ * inconsistent thus setlocale() will fail.  Maybe add '-V' function to
  * also validate these locales?
  */
 void
@@ -664,7 +664,7 @@ showkeywordslist(char *substring)
 {
size_t  i;
 
-#define FMT %-20s %-12s %-7s %-20s\n
+#defineFMT %-20s %-12s %-7s %-20s\n
 
if (substring == NULL)
printf(List of available keywords\n\n);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242807 - head/bin/ls

2012-11-08 Thread Greg Lehey
Author: grog
Date: Thu Nov  8 23:45:19 2012
New Revision: 242807
URL: http://svnweb.freebsd.org/changeset/base/242807

Log:
  Replace spaces with tabs where appropriate.
  
  Reminded by: jh@

Modified:
  head/bin/ls/cmp.c
  head/bin/ls/extern.h
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c

Modified: head/bin/ls/cmp.c
==
--- head/bin/ls/cmp.c   Thu Nov  8 23:42:22 2012(r242806)
+++ head/bin/ls/cmp.c   Thu Nov  8 23:45:19 2012(r242807)
@@ -78,9 +78,9 @@ modcmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_mtim.tv_nsec 
a-fts_statp-st_mtim.tv_nsec)
return (-1);
-if (f_samesort)
+   if (f_samesort)
return (strcoll(b-fts_name, a-fts_name));
-else
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -107,9 +107,9 @@ acccmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_atim.tv_nsec 
a-fts_statp-st_atim.tv_nsec)
return (-1);
-if (f_samesort)
+   if (f_samesort)
return (strcoll(b-fts_name, a-fts_name));
-else
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -136,9 +136,9 @@ birthcmp(const FTSENT *a, const FTSENT *
if (b-fts_statp-st_birthtim.tv_nsec 
a-fts_statp-st_birthtim.tv_nsec)
return (-1);
-if (f_samesort)
+   if (f_samesort)
return (strcoll(b-fts_name, a-fts_name));
-else
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 
@@ -165,9 +165,9 @@ statcmp(const FTSENT *a, const FTSENT *b
if (b-fts_statp-st_ctim.tv_nsec 
a-fts_statp-st_ctim.tv_nsec)
return (-1);
-if (f_samesort)
+   if (f_samesort)
return (strcoll(b-fts_name, a-fts_name));
-else
+   else
return (strcoll(a-fts_name, b-fts_name));
 }
 

Modified: head/bin/ls/extern.h
==
--- head/bin/ls/extern.hThu Nov  8 23:42:22 2012(r242806)
+++ head/bin/ls/extern.hThu Nov  8 23:45:19 2012(r242807)
@@ -55,12 +55,12 @@ int  prn_octal(const char *);
 int prn_printable(const char *);
 #ifdef COLORLS
 voidparsecolors(const char *cs);
-void colorquit(int);
+voidcolorquit(int);
 
-extern  char*ansi_fgcol;
-extern  char*ansi_bgcol;
-extern  char*ansi_coloff;
-extern  char*attrs_off;
-extern  char*enter_bold;
+extern char*ansi_fgcol;
+extern char*ansi_bgcol;
+extern char*ansi_coloff;
+extern char*attrs_off;
+extern char*enter_bold;
 #endif
 extern int termwidth;

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cThu Nov  8 23:42:22 2012(r242806)
+++ head/bin/ls/ls.cThu Nov  8 23:45:19 2012(r242807)
@@ -78,7 +78,7 @@ __FBSDID($FreeBSD$);
 #defineSTRBUF_SIZEOF(t)(1 + CHAR_BIT * sizeof(t) / 3 + 1)
 
 /*
- * MAKENINES(n) turns n into (10**n)-1.  This is useful for converting a width
+ * MAKENINES(n) turns n into (10**n)-1. This is useful for converting 
a width
  * into a number that wide in decimal.
  * XXX: Overflows are not considered.
  */
@@ -133,7 +133,7 @@ static int f_sizesort;
int f_statustime;   /* use time of last mode change */
 static int f_stream;   /* stream the output, separate with commas */
int f_thousands;/* show file sizes with thousands 
separators */
-   char *f_timeformat;  /* user-specified time format */
+   char *f_timeformat; /* user-specified time format */
 static int f_timesort; /* sort by time vice name */
int f_type; /* add type character for non-regular files */
 static int f_whiteout; /* show whiteout entries */
@@ -185,7 +185,7 @@ main(int argc, char *argv[])
fts_options = FTS_PHYSICAL;
if (getenv(LS_SAMESORT))
f_samesort = 1;
-   while ((ch = getopt(argc, argv,
+   while ((ch = getopt(argc, argv,
1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,)) != -1) {
switch (ch) {
/*
@@ -241,7 +241,7 @@ main(int argc, char *argv[])
f_timesort = 1;
f_sizesort = 0;
break;
-/* Other flags.  Please keep alphabetic. */
+   /* Other flags.  Please keep alphabetic. */
case ',':
f_thousands = 1;
break;
@@ -250,10 +250,10 @@ main(int argc, char *argv[])
f_octal = 1;
f_octal_escape = 0;
break;
-case 'D':
-

svn commit: r242808 - head/usr.bin/locale

2012-11-08 Thread Greg Lehey
Author: grog
Date: Thu Nov  8 23:46:15 2012
New Revision: 242808
URL: http://svnweb.freebsd.org/changeset/base/242808

Log:
  Replace spaces by tabs where appropriate.
  
  Reminded by: jh@

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cThu Nov  8 23:45:19 2012
(r242807)
+++ head/usr.bin/locale/locale.cThu Nov  8 23:46:15 2012
(r242808)
@@ -31,7 +31,7 @@
  * nl_langinfo(3) extensions)
  *
  * XXX: correctly handle reserved 'charmap' keyword and '-m' option (require
- *  localedef(1) implementation).  Currently it's handled via
+ * localedef(1) implementation).  Currently it's handled via
  * nl_langinfo(CODESET).
  */
 
@@ -84,27 +84,27 @@ struct _lcinfo {
 /* ids for values not referenced by nl_langinfo() */
 #defineKW_ZERO 1
 #defineKW_GROUPING (KW_ZERO+1)
-#define KW_INT_CURR_SYMBOL (KW_ZERO+2)
-#define KW_CURRENCY_SYMBOL (KW_ZERO+3)
-#define KW_MON_DECIMAL_POINT   (KW_ZERO+4)
-#define KW_MON_THOUSANDS_SEP   (KW_ZERO+5)
-#define KW_MON_GROUPING(KW_ZERO+6)
-#define KW_POSITIVE_SIGN   (KW_ZERO+7)
-#define KW_NEGATIVE_SIGN   (KW_ZERO+8)
-#define KW_INT_FRAC_DIGITS (KW_ZERO+9)
-#define KW_FRAC_DIGITS (KW_ZERO+10)
-#define KW_P_CS_PRECEDES   (KW_ZERO+11)
-#define KW_P_SEP_BY_SPACE  (KW_ZERO+12)
-#define KW_N_CS_PRECEDES   (KW_ZERO+13)
-#define KW_N_SEP_BY_SPACE  (KW_ZERO+14)
-#define KW_P_SIGN_POSN (KW_ZERO+15)
-#define KW_N_SIGN_POSN (KW_ZERO+16)
-#define KW_INT_P_CS_PRECEDES   (KW_ZERO+17)
-#define KW_INT_P_SEP_BY_SPACE  (KW_ZERO+18)
-#define KW_INT_N_CS_PRECEDES   (KW_ZERO+19)
-#define KW_INT_N_SEP_BY_SPACE  (KW_ZERO+20)
-#define KW_INT_P_SIGN_POSN (KW_ZERO+21)
-#define KW_INT_N_SIGN_POSN (KW_ZERO+22)
+#define KW_INT_CURR_SYMBOL (KW_ZERO+2)
+#define KW_CURRENCY_SYMBOL (KW_ZERO+3)
+#define KW_MON_DECIMAL_POINT   (KW_ZERO+4)
+#define KW_MON_THOUSANDS_SEP   (KW_ZERO+5)
+#define KW_MON_GROUPING(KW_ZERO+6)
+#define KW_POSITIVE_SIGN   (KW_ZERO+7)
+#define KW_NEGATIVE_SIGN   (KW_ZERO+8)
+#define KW_INT_FRAC_DIGITS (KW_ZERO+9)
+#define KW_FRAC_DIGITS (KW_ZERO+10)
+#define KW_P_CS_PRECEDES   (KW_ZERO+11)
+#define KW_P_SEP_BY_SPACE  (KW_ZERO+12)
+#define KW_N_CS_PRECEDES   (KW_ZERO+13)
+#define KW_N_SEP_BY_SPACE  (KW_ZERO+14)
+#define KW_P_SIGN_POSN (KW_ZERO+15)
+#define KW_N_SIGN_POSN (KW_ZERO+16)
+#define KW_INT_P_CS_PRECEDES   (KW_ZERO+17)
+#define KW_INT_P_SEP_BY_SPACE  (KW_ZERO+18)
+#define KW_INT_N_CS_PRECEDES   (KW_ZERO+19)
+#define KW_INT_N_SEP_BY_SPACE  (KW_ZERO+20)
+#define KW_INT_P_SIGN_POSN (KW_ZERO+21)
+#define KW_INT_N_SIGN_POSN (KW_ZERO+22)
 
 struct _kwinfo {
const char  *name;
@@ -283,16 +283,16 @@ main(int argc, char *argv[])
if (prt_categories || prt_keywords) {
if (argc  0) {
setlocale(LC_ALL, );
-while (argc  0) {
+   while (argc  0) {
showdetails(*argv);
-argv++;
-argc--;
-}
-} else {
+   argv++;
+   argc--;
+   }
+   } else {
uint i;
-for (i = 0; i  sizeof (kwinfo) / sizeof (struct 
_kwinfo); i++)
+   for (i = 0; i  sizeof (kwinfo) / sizeof (struct 
_kwinfo); i++)
showdetails ((char *)kwinfo [i].name);
-}
+   }
exit(0);
}
 
@@ -306,8 +306,8 @@ void
 usage(void)
 {
printf(Usage: locale [ -a | -m ]\n
-  locale -k list [prefix]\n
-  locale [ -ck ] [keyword ...]\n);
+ locale -k list [prefix]\n
+ locale [ -ck ] [keyword ...]\n);
exit(1);
 }
 
@@ -316,7 +316,7 @@ usage(void)
  *
  * XXX actually output of this function does not guarantee that locale
  * is really available to application, since it can be broken or
- * inconsistent thus setlocale() will fail.  Maybe add '-V' function to
+ * inconsistent thus setlocale() will fail. Maybe add '-V' 
function to
  * also validate these locales?
  */
 void
@@ -427,10 +427,10 @@ init_locales_list(void)
}
closedir(dirp);
 
-/* make sure that 'POSIX' and 'C' locales are present in the list.
+   /* make sure that 'POSIX' and 'C' locales are present in the list.
 * POSIX 1003.1-2001 requires presence of 'POSIX' name only here, but
- * we also list 'C' for constistency
- */
+* we also list 'C' 

svn commit: r242722 - head/bin/ls

2012-11-07 Thread Greg Lehey
Author: grog
Date: Wed Nov  7 23:37:24 2012
New Revision: 242722
URL: http://svnweb.freebsd.org/changeset/base/242722

Log:
  Sort option parsing as far as practical.

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cWed Nov  7 23:15:36 2012(r242721)
+++ head/bin/ls/ls.cWed Nov  7 23:37:24 2012(r242722)
@@ -192,17 +192,9 @@ main(int argc, char *argv[])
f_longform = 0;
f_stream = 0;
break;
-   case 'B':
-   f_nonprint = 0;
-   f_octal = 1;
-   f_octal_escape = 0;
-   break;
case 'C':
f_sortacross = f_longform = f_singlecol = 0;
break;
-case 'D':
-f_timeformat = optarg;
-break;
case 'l':
f_longform = 1;
f_singlecol = 0;
@@ -229,16 +221,43 @@ main(int argc, char *argv[])
f_accesstime = 0;
f_statustime = 0;
break;
-   case 'F':
+   case 'a':
+   fts_options |= FTS_SEEDOT;
+   /* FALLTHROUGH */
+   case 'A':
+   f_listdot = 1;
+   break;
+   /* The -t and -S options override each other. */
+   case 'S':
+   f_sizesort = 1;
+   f_timesort = 0;
+   break;
+   case 't':
+   f_timesort = 1;
+   f_sizesort = 0;
+   break;
+/* Other flags.  Please keep alphabetic. */
+   case 'B':
+   f_nonprint = 0;
+   f_octal = 1;
+   f_octal_escape = 0;
+   break;
+case 'D':
+f_timeformat = optarg;
+break;
+case 'F':
f_type = 1;
f_slash = 0;
break;
+   case 'G':
+   setenv(CLICOLOR, , 1);
+   break;
case 'H':
fts_options |= FTS_COMFOLLOW;
f_nofollow = 0;
break;
-   case 'G':
-   setenv(CLICOLOR, , 1);
+   case 'I':
+   f_noautodot = 1;
break;
case 'L':
fts_options = ~FTS_PHYSICAL;
@@ -254,14 +273,19 @@ main(int argc, char *argv[])
case 'R':
f_recursive = 1;
break;
-   case 'a':
-   fts_options |= FTS_SEEDOT;
-   /* FALLTHROUGH */
-   case 'A':
-   f_listdot = 1;
+   case 'T':
+   f_sectime = 1;
break;
-   case 'I':
-   f_noautodot = 1;
+   case 'W':
+   f_whiteout = 1;
+   break;
+   case 'Z':
+   f_label = 1;
+   break;
+   case 'b':
+   f_nonprint = 0;
+   f_octal = 0;
+   f_octal_escape = 1;
break;
/* The -d option turns off the -R option. */
case 'd':
@@ -309,34 +333,11 @@ main(int argc, char *argv[])
case 's':
f_size = 1;
break;
-   case 'T':
-   f_sectime = 1;
-   break;
-   /* The -t and -S options override each other. */
-   case 't':
-   f_timesort = 1;
-   f_sizesort = 0;
-   break;
-   case 'S':
-   f_sizesort = 1;
-   f_timesort = 0;
-   break;
-   case 'W':
-   f_whiteout = 1;
-   break;
-   case 'b':
-   f_nonprint = 0;
-   f_octal = 0;
-   f_octal_escape = 1;
-   break;
case 'w':
f_nonprint = 0;
f_octal = 0;
f_octal_escape = 0;
break;
-   case 'Z':
-   f_label = 1;
-   break;
default:
case '?':

svn commit: r242725 - head/bin/ls

2012-11-07 Thread Greg Lehey
Author: grog
Date: Thu Nov  8 00:24:26 2012
New Revision: 242725
URL: http://svnweb.freebsd.org/changeset/base/242725

Log:
  Add y flag and environment variable LS_SAMESORT to specify the same
  sorting order for time and name with the -t option.  IEEE Std 1003.2
  (POSIX.2) mandates that the -t option sort in descending order, and
  that if two files have the same timestamp, they should be sorted in
  ascending order of their names.  The -r flag reverses both of these
  sort orders, so they're never the same.  This creates significant
  problems for sequentially named files stored on FAT file systems,
  where it can be impossible to list them in the order in which they
  were created.
  
  Add , (comma) option to print file sizes grouped and separated by
  thousands using the non-monetary separator returned by localeconv(3),
  typically a comma or period.
  
  MFC after:  14 days

Modified:
  head/bin/ls/cmp.c
  head/bin/ls/ls.1
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c

Modified: head/bin/ls/cmp.c
==
--- head/bin/ls/cmp.c   Wed Nov  7 23:50:28 2012(r242724)
+++ head/bin/ls/cmp.c   Thu Nov  8 00:24:26 2012(r242725)
@@ -78,7 +78,10 @@ modcmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_mtim.tv_nsec 
a-fts_statp-st_mtim.tv_nsec)
return (-1);
-   return (strcoll(a-fts_name, b-fts_name));
+if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+else
+   return (strcoll(a-fts_name, b-fts_name));
 }
 
 int
@@ -104,7 +107,10 @@ acccmp(const FTSENT *a, const FTSENT *b)
if (b-fts_statp-st_atim.tv_nsec 
a-fts_statp-st_atim.tv_nsec)
return (-1);
-   return (strcoll(a-fts_name, b-fts_name));
+if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+else
+   return (strcoll(a-fts_name, b-fts_name));
 }
 
 int
@@ -130,7 +136,10 @@ birthcmp(const FTSENT *a, const FTSENT *
if (b-fts_statp-st_birthtim.tv_nsec 
a-fts_statp-st_birthtim.tv_nsec)
return (-1);
-   return (strcoll(a-fts_name, b-fts_name));
+if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+else
+   return (strcoll(a-fts_name, b-fts_name));
 }
 
 int
@@ -156,7 +165,10 @@ statcmp(const FTSENT *a, const FTSENT *b
if (b-fts_statp-st_ctim.tv_nsec 
a-fts_statp-st_ctim.tv_nsec)
return (-1);
-   return (strcoll(a-fts_name, b-fts_name));
+if (f_samesort)
+   return (strcoll(b-fts_name, a-fts_name));
+else
+   return (strcoll(a-fts_name, b-fts_name));
 }
 
 int

Modified: head/bin/ls/ls.1
==
--- head/bin/ls/ls.1Wed Nov  7 23:50:28 2012(r242724)
+++ head/bin/ls/ls.1Thu Nov  8 00:24:26 2012(r242725)
@@ -32,7 +32,7 @@
 .\ @(#)ls.1   8.7 (Berkeley) 7/29/94
 .\ $FreeBSD$
 .\
-.Dd September 28, 2011
+.Dd November 8, 2012
 .Dt LS 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Nd list directory contents
 .Sh SYNOPSIS
 .Nm
-.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1
+.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,
 .Op Fl D Ar format
 .Op Ar
 .Sh DESCRIPTION
@@ -130,6 +130,8 @@ This option is equivalent to defining
 .Ev CLICOLOR
 in the environment.
 (See below.)
+This functionality can be compiled out by removing the definition of
+.Ev COLORLS .
 .It Fl H
 Symbolic links on the command line are followed.
 This option is assumed if
@@ -249,12 +251,35 @@ subsection below, except (if the long fo
 the directory totals are not output when the output is in a
 single column, even if multi-column output is requested.
 .It Fl t
-Sort by time modified (most recently modified
-first) before sorting the operands in lexicographical
-order.
+Sort by descending time modified (most recently modified first).  If two files
+have the same modification timestamp, sort their names in ascending
+lexicographical order.
+The
+.Fl r
+option reverses both of these sort orders.
+.Pp
+Note that these sort orders are contradictory: the time sequence is in
+descending order, the lexicographical sort is in ascending order.
+This behavior is mandated by
+.St -p1003.2 .
+This feature can cause problems listing files stored with sequential names on
+FAT file systems, such as from digital cameras, where it is possible to have
+more than one image with the same timestamp.
+In such a case, the photos cannot be listed in the sequence in which
+they were taken.
+To ensure the same sort order for time and for lexicographical sorting, set the
+environment variable
+.Ev LS_SAMESORT
+or use the
+.Fl y
+option.
+This causes
+.Nm
+to reverse the lexicographal sort order when sorting files with the
+same modification timestamp.
 .It Fl u
 Use time 

svn commit: r242738 - head/lib/libc/stdio

2012-11-07 Thread Greg Lehey
Author: grog
Date: Thu Nov  8 02:01:04 2012
New Revision: 242738
URL: http://svnweb.freebsd.org/changeset/base/242738

Log:
  Clarify that the ' flag is an apostrophe.
  
  MFC after:2 weeks

Modified:
  head/lib/libc/stdio/printf.3

Modified: head/lib/libc/stdio/printf.3
==
--- head/lib/libc/stdio/printf.3Thu Nov  8 01:51:23 2012
(r242737)
+++ head/lib/libc/stdio/printf.3Thu Nov  8 02:01:04 2012
(r242738)
@@ -267,7 +267,7 @@ number produced by a signed conversion.
 A
 .Cm +
 overrides a space if both are used.
-.It Sq Cm '
+.It So ' Sc (apostrophe)
 Decimal conversions
 .Cm ( d , u ,
 or
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242743 - head/usr.bin/locale

2012-11-07 Thread Greg Lehey
Author: grog
Date: Thu Nov  8 02:55:30 2012
New Revision: 242743
URL: http://svnweb.freebsd.org/changeset/base/242743

Log:
  Make parameters to -c and -k options optional.  If no parameters are
  supplied, print information for all keywords.
  
  Improve output of -c option, in particular in conjunction with -k
  option.
  
  MFC after:14 days

Modified:
  head/usr.bin/locale/locale.1
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.1
==
--- head/usr.bin/locale/locale.1Thu Nov  8 02:29:16 2012
(r242742)
+++ head/usr.bin/locale/locale.1Thu Nov  8 02:55:30 2012
(r242743)
@@ -40,7 +40,7 @@
 .Op Ar prefix
 .Nm
 .Op Fl ck
-.Ar keyword ...
+.Op Ar keyword ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -74,8 +74,12 @@ directory.
 Print names of all available charmaps.
 .It Fl k
 Print the names and values of all selected keywords.
+If no keywords are selected, print the names and values of all defined
+keywords.
 .It Fl c
 Print the category name for all selected keywords.
+If no keywords are selected, print the category name for all defined
+keywords.
 .El
 .Sh IMPLEMENTATION NOTES
 The special

Modified: head/usr.bin/locale/locale.c
==
--- head/usr.bin/locale/locale.cThu Nov  8 02:29:16 2012
(r242742)
+++ head/usr.bin/locale/locale.cThu Nov  8 02:55:30 2012
(r242743)
@@ -253,12 +253,10 @@ main(int argc, char *argv[])
/* validate arguments */
if (all_locales  all_charmaps)
usage();
-   if ((all_locales || all_charmaps)  argc  0) 
+   if ((all_locales || all_charmaps)  argc  0)
usage();
if ((all_locales || all_charmaps)  (prt_categories || prt_keywords))
usage();
-   if ((prt_categories || prt_keywords)  argc = 0)
-   usage();
 
/* process '-a' */
if (all_locales) {
@@ -282,13 +280,19 @@ main(int argc, char *argv[])
}
 
/* process '-c' and/or '-k' */
-   if (prt_categories || prt_keywords || argc  0) {
-   setlocale(LC_ALL, );
-   while (argc  0) {
-   showdetails(*argv);
-   argv++;
-   argc--;
-   }
+   if (prt_categories || prt_keywords) {
+   if (argc  0) {
+   setlocale(LC_ALL, );
+while (argc  0) {
+   showdetails(*argv);
+argv++;
+argc--;
+}
+} else {
+   uint i;
+for (i = 0; i  sizeof (kwinfo) / sizeof (struct 
_kwinfo); i++)
+   showdetails ((char *)kwinfo [i].name);
+}
exit(0);
}
 
@@ -303,7 +307,7 @@ usage(void)
 {
printf(Usage: locale [ -a | -m ]\n
   locale -k list [prefix]\n
-  locale [ -ck ] keyword ...\n);
+  locale [ -ck ] [keyword ...]\n);
exit(1);
 }
 
@@ -612,7 +616,10 @@ showdetails(char *kw)
}
 
if (prt_categories) {
-   printf(%s\n, lookup_localecat(cat));
+  if (prt_keywords)
+   printf(%-20s , lookup_localecat(cat));
+  else
+   printf(%-20s\t%s\n, kw, lookup_localecat(cat));
}
 
if (prt_keywords) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r227370 - head/usr.bin/calendar

2011-11-08 Thread Greg Lehey
Author: grog
Date: Wed Nov  9 01:40:46 2011
New Revision: 227370
URL: http://svn.freebsd.org/changeset/base/227370

Log:
  Tidy up command line processing:
- Add ? option to optstring.
- Sort options alphabetically.
- Vertical space.
  
  Tidy up usage() function.
  
  Bring man page in sync with source.
  
  Ensure that debug code is only executed with the -d option.
  
  Submitted by: Christiane Yeardley

Modified:
  head/usr.bin/calendar/calendar.1
  head/usr.bin/calendar/calendar.c
  head/usr.bin/calendar/io.c
  head/usr.bin/calendar/parsedata.c

Modified: head/usr.bin/calendar/calendar.1
==
--- head/usr.bin/calendar/calendar.1Tue Nov  8 23:54:39 2011
(r227369)
+++ head/usr.bin/calendar/calendar.1Wed Nov  9 01:40:46 2011
(r227370)
@@ -36,11 +36,14 @@
 .Nd reminder service
 .Sh SYNOPSIS
 .Nm
-.Op Fl a
 .Op Fl A Ar num
+.Op Fl a
 .Op Fl B Ar num
+.Op Fl D Ar moon|sun
+.Op Fl d
 .Op Fl F Ar friday
 .Op Fl f Ar calendarfile
+.Op Fl l Ar longitude
 .Oo
 .Bk -words
 .Fl t Ar dd Ns
@@ -49,16 +52,14 @@
 .Sm on
 .Ek
 .Oc
-.Op Fl W Ar num
 .Op Fl U Ar UTC-offset
-.Op Fl l Ar longitude
+.Op Fl W Ar num
 .Sh DESCRIPTION
 The
 .Nm
 utility checks the current directory for a file named
 .Pa calendar
-and displays lines that begin with either today's date
-or tomorrow's.
+and displays lines that fall into the specified date range.
 On the day before a weekend (normally Friday), events for the next
 three days are displayed.
 .Pp
@@ -76,6 +77,10 @@ This requires super-user privileges.
 Print lines from today and the previous
 .Ar num
 days (backward, past).
+.It Fl D Ar moon|sun
+Print UTC offset, longitude and moon or sun information.
+.It Fl d
+Debug option: print current date information.
 .It Fl F Ar friday
 Specify which day of the week is ``Friday'' (the day before the
 weekend begins).
@@ -84,6 +89,11 @@ Default is 5.
 Use
 .Pa calendarfile
 as the default calendar file.
+.It Fl l Ar longitude
+Perform lunar and solar calculations from this longitude.
+If neither longitude nor UTC offset is specified, the calculations will 
+be based on the difference between UTC time and localtime.
+If both are specified, UTC offset overrides longitude.
 .It Xo Fl t
 .Sm off
 .Ar dd
@@ -91,12 +101,11 @@ as the default calendar file.
 .Sm on
 .Xc
 For test purposes only: set date directly to argument values.
-.It Fl l Ar longitude , Fl U Ar UTC-offset
-Only one is needed:
-Perform lunar and solar calculations from this longitude or from
-this UTC offset.
-If neither is specified, the calculations will be based on the
-difference between UTC time and localtime.
+.It Fl U Ar UTC-offset
+Perform lunar and solar calculations from this UTC offset.
+If neither UTC offset nor longitude is specified, the calculations
+will be based on the difference between UTC time and localtime.
+If both are specified, UTC offset overrides longitude. 
 .It Fl W Ar num
 Print lines from today and the next
 .Ar num

Modified: head/usr.bin/calendar/calendar.c
==
--- head/usr.bin/calendar/calendar.cTue Nov  8 23:54:39 2011
(r227369)
+++ head/usr.bin/calendar/calendar.cWed Nov  9 01:40:46 2011
(r227370)
@@ -35,7 +35,7 @@ static const char copyright[] =
 
 #if 0
 #ifndef lint
-static char sccsid[] = @(#)calendar.c  8.3 (Berkeley) 3/25/94;
+static char sccsid[] = @(#)calendar.c 8.3 (Berkeley) 3/25/94;
 #endif
 #endif
 
@@ -79,7 +79,7 @@ main(int argc, char *argv[])
 
(void)setlocale(LC_ALL, );
 
-   while ((ch = getopt(argc, argv, -A:aB:dD:F:f:l:t:U:W:)) != -1)
+   while ((ch = getopt(argc, argv, -A:aB:D:dF:f:l:t:U:W:?)) != -1)
switch (ch) {
case '-':   /* backward contemptible */
case 'a':
@@ -90,10 +90,6 @@ main(int argc, char *argv[])
doall = 1;
break;
 
-   case 'f': /* other calendar file */
-   calendarFile = optarg;
-   break;
-
case 'W': /* we don't need no steenking Fridays */
Friday = -1;
/* FALLTHROUGH */
@@ -106,26 +102,34 @@ main(int argc, char *argv[])
f_dayBefore = atoi(optarg);
break;
 
+   case 'D': /* debug output of sun and moon info */
+   DEBUG = optarg;
+   break;
+
+   case 'd': /* debug output of current date */
+   debug = 1;
+   break;
+
case 'F': /* Change the time: When does weekend start? */
Friday = atoi(optarg);
break;
+
+   case 'f': /* other calendar file */
+   calendarFile = optarg;
+   break;
+
case 

svn commit: r189754 - head/usr.sbin/sysinstall

2009-03-12 Thread Greg Lehey
Author: grog
Date: Fri Mar 13 03:51:41 2009
New Revision: 189754
URL: http://svn.freebsd.org/changeset/base/189754

Log:
  Add menus to read install.cfg from any disk device sysinstall can see
  (eg USB key, CD) rather than just floppy.
  
  Handle \r\n line termination in a cfg file.
  
  Add keeprcconf variable.
  
  Submitted by: Daniel O'Connor

Modified:
  head/usr.sbin/sysinstall/config.c
  head/usr.sbin/sysinstall/dispatch.c
  head/usr.sbin/sysinstall/menus.c
  head/usr.sbin/sysinstall/modules.c
  head/usr.sbin/sysinstall/sysinstall.8
  head/usr.sbin/sysinstall/sysinstall.h

Modified: head/usr.sbin/sysinstall/config.c
==
--- head/usr.sbin/sysinstall/config.c   Fri Mar 13 03:00:38 2009
(r189753)
+++ head/usr.sbin/sysinstall/config.c   Fri Mar 13 03:51:41 2009
(r189754)
@@ -428,8 +428,12 @@ configRC_conf(void)
while(fgets(line, sizeof(line), rcOld)) {
if(line[0] == '#' || variable_check2(line) != 0)
fprintf(rcSite, %s, line);
-   else
-   fprintf(rcSite, #REMOVED: %s, line);
+   else {
+   if (variable_get(VAR_KEEPRCCONF) != NULL)
+   fprintf(rcSite, %s, line);
+   else
+   fprintf(rcSite, #REMOVED: %s, line);
+   }
}
fclose(rcOld);
 } else if (write_header) {

Modified: head/usr.sbin/sysinstall/dispatch.c
==
--- head/usr.sbin/sysinstall/dispatch.c Fri Mar 13 03:00:38 2009
(r189753)
+++ head/usr.sbin/sysinstall/dispatch.c Fri Mar 13 03:51:41 2009
(r189754)
@@ -47,6 +47,7 @@ static int dispatch_systemExecute(dialog
 static int dispatch_msgConfirm(dialogMenuItem *unused);
 static int dispatch_mediaOpen(dialogMenuItem *unused);
 static int dispatch_mediaClose(dialogMenuItem *unused);
+static int cfgModuleFire(dialogMenuItem *self);
 
 static struct _word {
 char *name;
@@ -90,6 +91,7 @@ static struct _word {
 { installVarDefaults,installVarDefaults  },
 { loadConfig,dispatch_load_file  },
 { loadFloppyConfig,  dispatch_load_floppy},
+{ loadCDROMConfig,   dispatch_load_cdrom },
 { mediaOpen, dispatch_mediaOpen  },
 { mediaClose,dispatch_mediaClose },
 { mediaSetCDROM, mediaSetCDROM   },
@@ -242,8 +244,9 @@ dispatchCommand(char *str)
msgConfirm(Null or zero-length string passed to dispatchCommand);
return DITEM_FAILURE;
 }
-/* If it's got a newline, trim it */
-if ((cp = index(str, '\n')) != NULL)
+
+/* Fixup DOS abuse */
+if ((cp = index(str, '\r')) != NULL)
*cp = '\0';
 
 /* If it's got a `=' sign in there, assume it's a variable setting */
@@ -294,9 +297,12 @@ dispatch_load_fp(FILE *fp)
 INITQUE(*head);
 
 while (fgets(buf, sizeof buf, fp)) {
-
-   if ((cp = strchr(buf, '\n')) != NULL)
+   /* Fix up DOS abuse */
+   if ((cp = index(buf, '\r')) != NULL)
*cp = '\0';
+   /* If it's got a new line, trim it */
+   if ((cp = index(buf, '\n')) != NULL)
+*cp = '\0';
if (*buf == '\0' || *buf == '#')
continue;
 
@@ -326,7 +332,7 @@ dispatch_execute(qelement *head)
 
 while (!EMPTYQUE(*head)) {
item = (command_buffer *) head-q_forw;
-   
+
if (DITEM_STATUS(dispatchCommand(item-string)) != DITEM_SUCCESS) {
msgConfirm(Command `%s' failed - rest of script aborted.\n,
   item-string);
@@ -401,8 +407,7 @@ dispatch_load_floppy(dialogMenuItem *sel
 
 mediaClose();
 cp = variable_get_value(VAR_INSTALL_CFG,
-   Specify the name of a configuration file\n
-   residing on a MSDOS or UFS floppy., 0);
+   Specify the name of a configuration file, 0);
 if (!cp || !*cp) {
variable_unset(VAR_INSTALL_CFG);
what |= DITEM_FAILURE;
@@ -443,3 +448,189 @@ dispatch_load_floppy(dialogMenuItem *sel
 return what;
 }
 
+int
+dispatch_load_cdrom(dialogMenuItem *self)
+{
+int what = DITEM_SUCCESS;
+extern char*distWanted;
+char   *cp;
+FILE   *fp;
+qelement  *list;
+
+mediaClose();
+cp = variable_get_value(VAR_INSTALL_CFG,
+   Specify the name of a configuration file\n
+   residing on the CDROM., 0);
+if (!cp || !*cp) {
+   variable_unset(VAR_INSTALL_CFG);
+   what |= DITEM_FAILURE;
+   return what;
+}
+
+distWanted = cp;
+/* Try to open the floppy drive */
+if (DITEM_STATUS(mediaSetCDROM(NULL)) == DITEM_FAILURE) {
+   msgConfirm(Unable to set media device to CDROM.);
+   what |= DITEM_FAILURE;
+   mediaClose();
+   return what;
+}
+
+if