[comp.sources.misc] v17i102: calentool - day/week/month/year-at-a-glance SunView tool, Part21/23

billr@saab.CNA.TEK.COM (Bill Randle) (04/07/91)

Submitted-by: Bill Randle <billr@saab.CNA.TEK.COM>
Posting-number: Volume 17, Issue 102
Archive-name: calentool/part21

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 21 (of 23)."
# Contents:  dates/events2 moon.c
# Wrapped by billr@saab on Thu Mar 28 08:38:33 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'dates/events2' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dates/events2'\"
else
echo shar: Extracting \"'dates/events2'\" \(27275 characters\)
sed "s/^X//" >'dates/events2' <<'END_OF_FILE'
X# CalenTool V2.2 - nflag=1 range=3,4  - DO NOT REMOVE THIS LINE
X# $Header: events2,v 1.1 91/03/07 16:19:05 billr Exp $
X# Notable events in history (Mar-Apr)
X# Today in History dates provided by Robert Heckendorn at
X# Hewlett-Packard in Fort Collins, Colorado.
X# Any corrections or additions may be sent to robert@fc.hp.com
X#
X# Additional dates provided from ProLine's today file
X#
X# Converted to calentool format by Larry Virden (lwv27%cas.BITNET@CUNYVM.CUNY.Edu)
X# and further edited and merged by Bill Randle (billr@saab.cna.tek.com).
X# All dates in this file are New Style unless otherwise noted.
X# Some duplicates may exist where I haven't been able to verify which
X# one is correct.
X#
X** 03 01 99 99 00 Bank of Italy becomes a National Bank. (1927)
X** 03 01 99 99 00 EPA orders emergency ban on 2,4,5T and Silvex used to kill weeds (1979)
X** 03 01 99 99 00 Nebraska becomes the 37th state (1867)
X** 03 01 99 99 00 Ohio becomes the 17th state (1803)
X** 03 01 99 99 00 Sarah Goode, Sarah Osborne, and Tituba arrested for witchcraft in Salem, Massachusetts (1692)
X** 03 01 99 99 00 The world's first national park was established, when Pres. Ulysses S. Grant signed an act of Congress designating more than 2 million acres (800,000 hectares), mostly in Wyoming, as Yellowstone National Park. (1872)
X** 03 01 99 99 00 patent issued for taking & projecting motion pictures to Louis Ducos du Hauron (he never did build such a machine, though) (1864)
X** 03 01 99 99 00 the 22nd amendment, limiting the number of terms of presidential office is passed (1951)
X** 03 01 99 99 00 the Articles of Confederation adopted by Continental Congress. (1781)
X** 03 02 99 99 00 Congress creates the Territory of Nevada. (1861)
X** 03 02 99 99 00 First Class postage raised to 10 cents from 8 cents. (1974)
X** 03 02 99 99 00 Roman Catholic Cardinal Eugino Pacelli becomes Pope Pius XII (1939)
X** 03 02 99 99 00 Standard US letter postage goes to $.10 (1974)
X** 03 02 99 99 00 Texas declares independence (1836)
X** 03 02 99 99 00 U.S. Forest Service founded (1901)
X** 03 02 99 99 00 US Court of Customs & Patent Appeals created by US Congress. (1929)
X** 03 03 99 99 00 A president's salary was raised from $25000 to $50000 per year (1873)
X** 03 03 99 99 00 American Telephone and Telegraph incorporated. (1885)
X** 03 03 99 99 00 Congress authorizes smallest US silver coin, the 3-cent piece. (1851)
X** 03 03 99 99 00 Congress passed a resolution ordering U.S. Mint be established. (1791)
X** 03 03 99 99 00 Congress passes 1st foreign aid bill. (1812)
X** 03 03 99 99 00 Florida becomes the 27th state (1845)
X** 03 03 99 99 00 Gold Coinage Act passed, allowing gold coins to be minted. (1849)
X** 03 03 99 99 00 Morocco gains it's independence. (1956)
X** 03 03 99 99 00 The Marines make their first amphibious landing. (1776)
X** 03 03 99 99 00 a 20-cent coin was authorized by Congress (It only lasted 3 years). (1875)
X** 03 04 99 99 00 1st railroad in US chartered, the Granite Railway in Quincy, Mass (1826)
X** 03 04 99 99 00 Congress declares the Constitution to be in effect. (1789)
X** 03 04 99 99 00 First meeting of Congress, in N.Y.C. (1789)
X** 03 04 99 99 00 Hernando Cortez lands in Mexico (1519)
X** 03 04 99 99 00 Roosevelt inaugurated, said "We have nothing to fear but fear itself" (1933)
X** 03 04 99 99 00 Vermont becomes the 14th state (1791)
X** 03 04 99 99 00 William Penn is given land by King Charles II for a "holy experiment" of a Colony in Pennsylvania (1681)
X** 03 05 99 99 00 Boston Massacre (1770)
X** 03 05 99 99 00 Congress appropriates $30,000 to ship camels to western US. (1845)
X** 03 05 99 99 00 Southern Colorado gets the new area code 719 (1988)
X** 03 05 99 99 00 railway between Bombay and Calcutta is completed (1870)
X** 03 05 99 99 00 the Nazi party wins nearly half the seats in German elections (1933)
X** 03 05 99 99 00 uprising by Irish convicts at Castle Hill, New South Wales, is crushed by government troops (1804)
X** 03 06 99 99 00 All US banks closed (1933)
X** 03 06 99 99 00 American bombers begin daytime attacks on Berlin (1944)
X** 03 06 99 99 00 The Alamo finally falls after 13 days of siege by Santa Anna's troops (1836)
X** 03 07 99 99 00 Flare up of racial tension during a civil rights march in Selma, Alabama (1965)
X** 03 07 99 99 00 The first successful transatlantic radio telephone call took place between London and New York (1926)
X** 03 07 99 99 00 coin vended locker patented (1911)
X** 03 07 99 99 00 the game "Monopoly" is invented. (1933)
X** 03 08 99 99 00 Accession of Queen Anne of Britain (1702)
X** 03 08 99 99 00 First annual International Women's Day (1909)
X** 03 08 99 99 00 The beginning of the February Revolution in Russia. (It is February in the Old Style aka the Julian calendar.) (1917)
X** 03 09 99 99 00 Japanese defeat the Russians at Mukden (1905)
X** 03 09 99 99 00 Pancho Villa invades U.S. (1916)
X** 03 09 99 99 00 The Monitor and the Merrimack do battle at Hampton Roads (1862)
X** 03 09 99 99 00 The war between Mexico and France ends (1839)
X** 03 10 99 99 00 Big earthquake in Long Beach (W.C. Fields was making a movie when it struck & the cameras kept running) (1933)
X** 03 10 99 99 00 James Earl Ray pleads guilty to murder of Martin Luther King Jr. (1969)
X** 03 10 99 99 00 Japanese soldier found on Lubang Island in the Philippines who believes World War II is still on (1974)
X** 03 10 99 99 00 The Vatican declares that conception in vitro is a sin. Childless parents are to look to the example of Jesus on the cross for comfort. (1987)
X** 03 10 99 99 00 the 1st telephone call made by Alexander Graham Bell (1876)
X** 03 10 99 99 00 the first incendiary raids on Japan (1945)
X** 03 11 99 99 00 Bradfield Reservoir in Sheffield bursts and over 250 people drown (1864)
X** 03 11 99 99 00 General McClellan is relieved of command (1862)
X** 03 11 99 99 00 Great New England blizzard begins (1888)
X** 03 11 99 99 00 H-Bomb accidentally dropped on Mars Bluff, South Carolina (but did not explode, since there still *is* a South Carolina) (1958)
X** 03 11 99 99 00 The last Heath Hen alive in the world, dies (1932)
X** 03 12 99 99 00 1st $20 Gold piece issued. (1850)
X** 03 12 99 99 00 FDR conducts his first "Fireside Chat" (1936)
X** 03 12 99 99 00 Juliette Low founds an organization called Girl Guides that later became the Girl Scouts (1912)
X** 03 12 99 99 00 Mahatma Gandhi begins a campaign of civil disobedience with 200 mile march to protest British tax on salt (1930)
X** 03 12 99 99 00 a speed limit of 30mph is introduced in towns and other built up areas in Britain (1935)
X** 03 13 99 99 00 "Striptease" introduced, Paris (1894)
X** 03 13 99 99 00 Dr. Lee de Forest demonstrates a sound motion picture system in New York (1923)
X** 03 13 99 99 00 New York stock market crash (1907)
X** 03 13 99 99 00 The Huguenots defeated at Jarnac (1569)
X** 03 13 99 99 00 The Lancasters defeat the Yorks at the battle of Stamforn (1470)
X** 03 14 99 99 00 Eli Whitney received a patent for his cotton gin (1794)
X** 03 14 99 99 00 Great New England blizzard ends (1888)
X** 03 14 99 99 00 Teddy Roosevelt excludes Japanese laborers from continental U.S. (1907)
X** 03 14 99 99 00 Xerxes army is scared by a solar eclipse (479 BC)
X** 03 15 99 99 00 Ides of March; Julius Caesar assassinated by Brutus (44 BC)
X** 03 15 99 99 00 Maine becomes the 23rd state (1820)
X** 03 15 99 99 00 US Mint stops buying and selling gold. (1968)
X** 03 15 99 99 00 Watts, Los Angeles, riots kill two, injure 25 (1966)
X** 03 15 99 99 00 Woodrow Wilson holds the 1st Presidential Press Conference. (1913)
X** 03 15 99 99 00 riots and the abduction of Czar Nicholas II mark the beginning of the Russian revolution (1917)
X** 03 16 99 99 00 Army Corps of Engineers is established (1802)
X** 03 16 99 99 00 MyLai Massacre; 300 non-combatant villagers killed by U.S. infantrymen (1968)
X** 03 16 99 99 00 Terry Anderson chief Middle East correspondent of the Associated Press is kidnapped in Lebanon (1985)
X** 03 17 99 99 00 Bill establishing the White Sands National Monument in New Mexico is approved (1933)
X** 03 17 99 99 00 Rubber bands are invented (1845)
X** 03 17 99 99 00 The Dalai Lama escapes to India (1959)
X** 03 17 99 99 00 The city of Dublin, Ireland founded (988)
X** 03 17 99 99 00 Tibetans rise against occupying Chinese. (1959)
X** 03 18 99 99 00 American Express founded. (1850)
X** 03 18 99 99 00 Barnum & Bailey's Greatest Show on Earth opens in Madison Square Garden in New York City (1881)
X** 03 18 99 99 00 End of the OPEC oil embargo (1974)
X** 03 18 99 99 00 first use of Paris to London telephone line (1891)
X** 03 19 99 99 00 Los Angeles Railway established to provide streetcar service. (1895)
X** 03 19 99 99 00 Second Maori War ends in New Zealand (1861)
X** 03 19 99 99 00 The Treaty of Versailles is rejected by the US Senate (1920)
X** 03 19 99 99 00 US and British oil sources are expropriated by Mexico (1938)
X** 03 20 99 99 00 Patty Hearst is convicted of bank robbery (1973)
X** 03 20 99 99 00 Radio Caroline, original British pirate radio station, sinks (1980)
X** 03 20 99 99 00 The Burlington Arcade in London is opened (1819)
X** 03 21 99 99 00 Accession of Henry V of England (1413)
X** 03 21 99 99 00 Florenz Ziegfeld, of Follies fame. (1869)
X** 03 21 99 99 00 Geronimo is captured (1886)
X** 03 21 99 99 00 Martin Luther King marched in Montgomery, Alabama (1965)
X** 03 21 99 99 00 The massacre of 69 protesters at Sharpeville by South African police (1961)
X** 03 21 99 99 00 The second battle of the Somme begins with a German offensive (1918)
X** 03 22 99 99 00 A worker looking for air leaks with a candle causes $150 million fire at the Brown's Ferry reactor in Decatur, Alabama (1975)
X** 03 22 99 99 00 Construction begins on Grand Coulee Dam in central Washington state (1941)
X** 03 22 99 99 00 Cornstarch is patented (1841)
X** 03 22 99 99 00 First Class Postage raised to 18 cents from 15 cents. (1981)
X** 03 22 99 99 00 Joseph Priestly (father of soda pop) invents carbonated water. (1733)
X** 03 22 99 99 00 There is an attempt to abduct Princess Anne in "The Mall" in London (1973)
X** 03 23 99 99 00 1st telephone installed in the White House. (1929)
X** 03 23 99 99 00 British scientist Martin Fleischman and University of Utah Chemist Stanley Pons claim they have discovered a way of causing fusion at room temperature (1989)
X** 03 23 99 99 00 Los Angeles Railway Co starts using PCC streetcars. (1937)
X** 03 23 99 99 00 Patrick Henry asks for Liberty or Death. (1775)
X** 03 23 99 99 00 The Pope meets the Archbishop of Canterbury for the first time in 400 years, in the Sistine chapel (1966)
X** 03 23 99 99 00 The Stamp Act is passed by parliament taxing the American Colonies (1765)
X** 03 24 99 99 00 Construction of New York City subway system begins (1900)
X** 03 25 99 99 00 Accession of Robert I of Scotland (1306)
X** 03 25 99 99 00 Greece gains it's independence. (1821)
X** 03 25 99 99 00 Triangle Shirt Waist Fire (1911)
X** 03 25 99 99 00 a summit eruption on Mauna Loa was spotted at 1:25 AM. The Northeast rift zone was fountaining by 4:30 PM. During the next 21 days lava would flow almost to the city of Hilo. (1984)
X** 03 26 99 99 00 First driving tests are given in England (1934)
X** 03 26 99 99 00 For the first time since the revolution voters in the Soviet Union were given more than one candidate to vote for in a parliamentary election as part of Gorbachev's Democratization Plan (1989)
X** 03 26 99 99 00 Hastings College of Law founded. (1878)
X** 03 26 99 99 00 Judge Robert Warren is the first judge to issue a prior restraint to prevent the publication of workings of an H bomb in Progressive Magazine (1979)
X** 03 26 99 99 00 Popeye statue unveiled, Crystal City TX Spinach Festival (1937)
X** 03 26 99 99 00 The Camp David Accords are signed bring peace between Egypt and Israel after a 30 year state of war (1979)
X** 03 27 99 99 00 Alaska Good Friday earthquake kills 117 (1964)
X** 03 27 99 99 00 First Mormon temple is dedicated, in Kirtland, Ohio (1836)
X** 03 27 99 99 00 Khrushchev becomes Premier of Soviet Union (1958)
X** 03 28 99 99 00 First electric lights installed in Westminster Palace (1878)
X** 03 28 99 99 00 Last German V rocket lands in Britain (1945)
X** 03 28 99 99 00 Madrid surrenders to General Franco's rebel forces ending the Spanish civil war (1939)
X** 03 28 99 99 00 Nathan Briggs gets patent for the washing machine. (1794)
X** 03 28 99 99 00 Three Mile Island has a reactor accident, releases radioactive gas (1979)
X** 03 29 99 99 00 Coca-Cola is created (1886)
X** 03 29 99 99 00 Ice jam caused Niagara Falls to dry up (1848)
X** 03 29 99 99 00 Last US troops leave Vietnam (1973)
X** 03 29 99 99 00 Royal Albert Hall in London is opened by Queen Victoria (1871)
X** 03 29 99 99 00 Swedish settled Christiana (Wilmington, Delaware) (1638)
X** 03 30 99 99 00 15th Amendment passes, guarantees right to vote regardless of race. (1870)
X** 03 30 99 99 00 A Sicilian woman of Palermo was sexually assaulted by a French soldier while on her way to evening prayers. The people of Palermo attacked all the French in town not sparing any and took the garrison of 8000 French beginning the success
ful revolt know as the Sicilian Vespers Revolt. (1282)
X** 03 30 99 99 00 A directive from Washington decrees that suits will be made without trouser cuffs, pleats and patch pockets until the end of the war. (1942)
X** 03 30 99 99 00 Da Nang falls to the North Vietnamese (1975)
X** 03 30 99 99 00 Hinckley shoots President Reagan but only wounds him (1981)
X** 03 30 99 99 00 Patent granted to Hyman Lipman for a pencil with an ERASER (1853)
X** 03 30 99 99 00 Russia sold Alaska to the U.S. (1867)
X** 03 30 99 99 00 The 15th amendment, black suffrage, proclaimed (1870)
X** 03 31 99 99 00 Japan invades Mongolia (1936)
X** 03 31 99 99 00 Los Angeles ends streetcar service after nearly 90 years. (1963)
X** 03 31 99 99 00 Newfoundland becomes a province (1949)
X** 03 31 99 99 00 The Eiffel Tower is officially opened in Paris (1889)
X** 03 31 99 99 00 The Marshall Aid Act is passed by Congress (1948)
X** 03 31 99 99 00 The first U.S. treaty with Japan (1854)
X** 03 31 99 99 00 There are violent riots against the new British Poll Tax in London (1990)
X** 04 01 99 99 00 Oliver Pollock, a New Orleans Businessman, creates the "$". (1778)
X** 04 01 99 99 00 invasion of Okinawa by US forces (1945)
X** 04 02 99 99 00 Charles Lindbergh and Dr.John F. Condou turned over $50000 to an unidentified man in a New York City cemetery as Ransom for the Lindbergh baby (1932)
X** 04 02 99 99 00 Congress adopts the plan of Hamilton and Jefferson to establish a bimetallic monetary standard for the United States. The bimetallic mint ratio was set at 15:1. (1792)
X** 04 02 99 99 00 NACA was renamed National Aeronautics Space Agency (1958)
X** 04 02 99 99 00 The Calcutta and Bombay Railroad opened for through traffic (1870)
X** 04 02 99 99 00 The Faulken Islands, owned by Britain, are invaded by the Argentinians (1982)
X** 04 02 99 99 00 The first meeting of the American Congress (1718)
X** 04 02 99 99 00 Watson Watt granted a patent for RADAR. (1935)
X** 04 02 99 99 00 Woodrow Wilson calls for a declaration of war on Germany (1917)
X** 04 03 99 99 00 Pony Express is initiated (1860)
X** 04 03 99 99 00 Standard US letter postage goes to $.25 (1988)
X** 04 03 99 99 00 The 23rd amendment is passed allowing people in Washington DC to vote for president (1961)
X** 04 04 99 99 00 12 nations including U.S. sign N. Atlantic Treaty. (1949)
X** 04 04 99 99 00 130 people died in USAF plane accident in evacuation from Viet Nam. (1975)
X** 04 04 99 99 00 Arizona governor Evan Meacham is impeached (1988)
X** 04 04 99 99 00 Congress sets the number of stripes for the American flag at 13 and declares that a new star shall be added to the flag for each state that enters the union on the July fourth following the date of entry (1818)
X** 04 04 99 99 00 NATO Established (1949)
X** 04 04 99 99 00 Tandy Corp. acquires Radio Shack (9 stores) (1963)
X** 04 05 99 99 00 Pocahontas marries John Rolfe. (1614)
X** 04 06 99 99 00 Battle of Shiloh. (1862)
X** 04 06 99 99 00 Commander R. E. Peary arrives at the North Pole (1909)
X** 04 06 99 99 00 Earthquake in London badly damages St Paul's and other churches (1580)
X** 04 06 99 99 00 Joseph Smith founds The Church of Jesus Christ of Latter-day Saints (the Mormons) (1830)
X** 04 06 99 99 00 New York City ends trolley car service. (1957)
X** 04 06 99 99 00 US declares war on Germany (1917)
X** 04 06 99 99 00 Vancouver, BC is founded by the Canadian Pacific Railway Company (1886)
X** 04 07 99 99 00 Albert Hofmann synthesizes LSD (Switzerland, 1943)
X** 04 07 99 99 00 General Ulysses S. Grant's Union forces win the battle of Shiloh, Tennessee (1862)
X** 04 07 99 99 00 Prohibition ends. (1933)
X** 04 07 99 99 00 World Health Organization is established. (1948)
X** 04 08 99 99 00 17th Amendment, requiring direct election of senators, ratified (1913)
X** 04 08 99 99 00 Ponce de Leon lands at the site of St. Augustine naming the place Florida (1513)
X** 04 09 99 99 00 Lee surrenders to Grant at Appomattox Courthouse (1865)
X** 04 09 99 99 00 United Nations Charter hearing. (1955)
X** 04 10 99 99 00 Gov Morton of Nebraska suggests a holiday for planting trees to be known as Arbor Day (1872)
X** 04 10 99 99 00 The American Society for the Prevention of Cruelty to Animals was incorporated (1866)
X** 04 10 99 99 00 The luxury Liner RMS Titanic set sail on its ill-fated (1912)maiden voyage.
X** 04 11 99 99 00 Anaheim completes it's new electric light system. (1895)
X** 04 11 99 99 00 Benevolent and Protective Order of Elks organized. (1876)
X** 04 11 99 99 00 British troops land in Norway (1940)
X** 04 11 99 99 00 General Douglas MacArthur is fired from his post as five star general (1951)
X** 04 11 99 99 00 Gibralter becomes British after the signing of a peace treaty with Spain (1713)
X** 04 11 99 99 00 Henry VI of England was deposed for losing the war of the roses (1471)
X** 04 11 99 99 00 Lincoln gives his last public speech (1865)
X** 04 11 99 99 00 Pres. Reagan returned to the White House, 12 days after being wounded in an assassination attempt (1981)
X** 04 11 99 99 00 The trial of Adolph Eichmann begins in Jerusalem (1961)
X** 04 11 99 99 00 The trial of Milo for the murder of Claudius begins in Rome (52)
X** 04 12 99 99 00 Confederate troops fire first shots of Civil War at Ft Sumter (1861)
X** 04 12 99 99 00 Lake Eola Fountain's name changed from Centennial Fountain to Linton Allen Fountain to honor one of the originators of the project (1966)
X** 04 12 99 99 00 The Salk vaccine against polio was declared safe and effective. (1955)
X** 04 12 99 99 00 The government issues the first patent on an animal, a laboratory mouse that is more sensitive to cancer (1988)
X** 04 13 99 99 00 $2 bill re-introduced as United States currency. (1976)
X** 04 13 99 99 00 President Franklin D. Roosevelt dedicated the Jefferson Memorial in Washington (1943)
X** 04 13 99 99 00 The Metropolitan Museum of Art was founded in New York (1870)
X** 04 13 99 99 00 The first elephant arrives in the US. (1796)
X** 04 14 99 99 00 American planes firebomb Tokyo (1945)
X** 04 14 99 99 00 J.C. Penney opened his first store in Kemmerer, Wyo. (1902)
X** 04 14 99 99 00 The RMS Titanic hits iceberg and begins to sink, eventually killing 1503 people of the 2224 aboard (1912)
X** 04 14 99 99 00 The first American society for the abolition of slavery was organized by Benjamin Franklin and Benjamin Rush (1775)
X** 04 14 99 99 00 Veteran's Hospital at Fort Miley established. (1900)
X** 04 15 99 99 00 Actor Clint Eastwood becomes mayor of Carmel, California (1986)
X** 04 15 99 99 00 Chiang Kai-Shek forms a government in Hankow (1927)
X** 04 15 99 99 00 Ray Kroc starts the McDonald's chain of fast food restaurants. (1955)
X** 04 15 99 99 00 Sir James Ross discovers the North magnetic pole (1800)
X** 04 15 99 99 00 The first American school for the deaf opened in Hartford, Conn. (1817)
X** 04 15 99 99 00 Titanic sinks at 2:20 AM. (1912)
X** 04 15 99 99 00 insulin becomes generally available for diabetics. (1923)
X** 04 15 99 99 00 the famed Poodle Dog Restaurant closes. (1922)
X** 04 15 99 99 00 the first McDonalds opens (1955)
X** 04 16 99 99 00 Lenin returns to Russia after ten years of exile (1917)
X** 04 16 99 99 00 The Chinese gift to Pres. Nixon of two giant pandas arrives in the U.S. (1972)
X** 04 16 99 99 00 U.S. troops entered Nuremberg, Germany during World War II (1945)
X** 04 16 99 99 00 the first mass production factory starts up making pistols (1813)
X** 04 17 99 99 00 Bay of Pigs invasion, crushed by Castro forces (1961)
X** 04 17 99 99 00 Ford Motor Company unveiled the Mustang (1964)
X** 04 17 99 99 00 Giovanni da Verrazano discovered New York Harbor (1524)
X** 04 17 99 99 00 Office of Price Administration established (handled rationing) (1941)
X** 04 17 99 99 00 Sirhan Sirhan was convicted of assassinating Sen Robert Kennedy (1969)
X** 04 17 99 99 00 Treaty of Shimonoseki signed, ends 1st Sino-Japanese War (1894-95). (1895)
X** 04 17 99 99 00 Yugoslavia surrendered to Germany in World War II (1941)
X** 04 17 99 99 00 a contract was signed between Christopher Columbus and Spain to seek a westward ocean passage to Asia (1492)
X** 04 18 99 99 00 17 Americans killed at the U.S. Embassy in Beirut, in an explosion set off by a suicide bomber (1983)
X** 04 18 99 99 00 Doolittle bombs Tokyo (1942)
X** 04 18 99 99 00 First laundromat opens, in Fort Worth, Texas (1934)
X** 04 18 99 99 00 Paul Revere began his famous ride from Charleston to Lexington (1775)
X** 04 18 99 99 00 San Francisco Earthquake and Fire (1906)
X** 04 18 99 99 00 a car bomb demolishes US embassy in Beirut, Lebanon killing more than 60 people (1983)
X** 04 19 99 99 00 47 sailors killed when a gun turret exploded on battleship, Iowa (1989)
X** 04 19 99 99 00 California Historical Society founded. (1852)
X** 04 19 99 99 00 Charles Duryea takes the 1st American-made auto out for a spin. (1892)
X** 04 19 99 99 00 Connecticut finally approves the Bill of Rights (only 148 years late) (1939)
X** 04 19 99 99 00 General Douglas MacArthur bids farewell to congress saying "Old soldiers never die; they just fade away." (1951)
X** 04 19 99 99 00 The US goes off the Gold Standard (1933)
X** 04 19 99 99 00 The battles of Lexington and Concord take place starting the Revolutionary war (1775)
X** 04 19 99 99 00 Thousands of Jews begin Warsaw Ghetto uprising (1943)
X** 04 20 99 99 00 Marie and Pierre Curie isolated the radioactove element radium (1902)
X** 04 20 99 99 00 Supreme Court unanimously rules in favor of busing to achieve racial desegregation (1971)
X** 04 20 99 99 00 The U.S. 7th army captures the city of Nuremburg in World War II (1945)
X** 04 21 99 99 00 Congress establishes US Mint in Denver, Colorado. (1862)
X** 04 21 99 99 00 Sam Houston's Texas army defeats the Mexicans at San Jacinto (1836)
X** 04 21 99 99 00 The Mona Lisa is stolen from the Louvre in Paris (1911)
X** 04 21 99 99 00 The Red Baron, Baron Von Richthofen is shot down (perhaps by ground fire) as he flies low in pursuit of Lt. Wilford May's Sopwith Camel (1918)
X** 04 21 99 99 00 legend claims that Rome was founded on this day (753 BC)
X** 04 21 99 99 00 the first train crosses the Mississippi river (1856)
X** 04 22 99 99 00 Congress authorizes use of the motto "In God We Trust" for US coins (1864)
X** 04 22 99 99 00 Henry VIII ascended the throne of England (1509)
X** 04 22 99 99 00 Oklahoma opened by land run (1889)
X** 04 22 99 99 00 President L.B. Johnson opened the New York World Fair. (1964)
X** 04 22 99 99 00 The New York World's Fairs opens (1964)
X** 04 22 99 99 00 The countess of Salisbury was dancing with Edward II when one of her garters became dislodged and fell to the floor. He gallantly put it on his own leg and thus began the Order of the Garter (1348)
X** 04 22 99 99 00 The first "Earth Day" observed (1970)
X** 04 22 99 99 00 poison gas is used by the Germans for the first time in World War I (1915)
X** 04 23 99 99 00 Coda-Cola Company announced it was changing its Coke formula only to later reintroduce the original formula as Coke Classic (1985)
X** 04 23 99 99 00 Methodist and Evangelical Bretheren merged to become the United Methodist Church (1968)
X** 04 23 99 99 00 Stephen Douglas, the "Little Giant", debated Lincoln (1813)
X** 04 23 99 99 00 The vitascope system for projecting onto a screen (1896)
X** 04 24 99 99 00 8 Americans killed and 5 wounded in ill-fated military attempt to rescue US hostages in Iran (1980)
X** 04 24 99 99 00 Congress approved a bill establishing the Library of Congress (1800)
X** 04 24 99 99 00 Irish nationalists in Dublin launch the Easter rebellion, which is put down by the British (1916)
X** 04 24 99 99 00 President Kennedy issues a statement in which he claims "sole responsibility" for the Bay of Pigs failure (1961)
X** 04 24 99 99 00 Spain declares war on the United States (1898)
X** 04 24 99 99 00 Winston Churchill is knighted by Queen Elizabeth II (1953)
X** 04 25 99 99 00 Ground broken for the Suez Canal (1859)
X** 04 25 99 99 00 New York becomes 1st state requiring license plates for cars (1901)
X** 04 25 99 99 00 Robert Noyce granted a patent for the integrated circuit. (1961)
X** 04 25 99 99 00 US declares war on Spain (1898)
X** 04 25 99 99 00 United Nations Conference starts. (1945)
X** 04 25 99 99 00 a Convention Parliament meets and votes restoration of Charles II (1660)
X** 04 25 99 99 00 workers at nuclear power plant in Tsurga, Japan exposed to radioactive material during repairs (1981)
X** 04 26 99 99 00 1st British to establish an American colony land at Cape Henry, Va. (1607)
X** 04 26 99 99 00 Worst nuclear power plant disaster in history happens as a reactor in Chernobyl USSR catches fire and melts down releasing radiation into the atmosphere (1986)
X** 04 26 99 99 00 nationwide test of the Salk anti-polio begins. (1954)
X** 04 27 99 99 00 1st Spanish settlement in Phillipines, Cebu City, founded. (1565)
X** 04 27 99 99 00 Germany's liability is declared to be 6.65 billion pounds by the Reparations Commission (1921)
X** 04 27 99 99 00 Grant's Tomb (famed of song & legend) is dedicated. (1897)
X** 04 27 99 99 00 Quang Tri is cut off from the rest of South Vietnam by North Vietnamese troops (1972)
X** 04 27 99 99 00 The Scots are defeated at Dunbar (1296)
X** 04 27 99 99 00 The accession of David I of Scotland (1124)
X** 04 27 99 99 00 The state of Israel, is recognized by the British government (1950)
X** 04 27 99 99 00 US Social Security system makes its first benefit payment. (1937)
X** 04 27 99 99 00 founding of the Second Republic, in Austria. (1945)
X** 04 28 99 99 00 1st successful parachute jump is made. (1919)
X** 04 28 99 99 00 Last Americans evacuated from Saigon. (1974)
X** 04 28 99 99 00 Maryland becomes the 7th state (1788)
X** 04 28 99 99 00 The crew of the H.M.S Bounty mutiny (1789)
X** 04 29 99 99 00 Gideon Sandback receives patent for the zipper (1913)
X** 04 30 99 99 00 Department of the Navy established. (1798)
X** 04 30 99 99 00 George Washington inaugurated as 1st president of the US (1789)
X** 04 30 99 99 00 Louisiana becomes the 18th state (1812)
X** 04 30 99 99 00 Saigon, Vietnam, falls to communist forces (1975)
X** 04 30 99 99 00 US more than doubles its size thru the Louisiana Purchase. (1803)
X** 04 30 99 99 00 for the first time since 1948 a ship with an Israeli flag passes through the Suez Canal (1979)
END_OF_FILE
if test 27275 -ne `wc -c <'dates/events2'`; then
    echo shar: \"'dates/events2'\" unpacked with wrong size!
fi
# end of 'dates/events2'
fi
if test -f 'moon.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'moon.c'\"
else
echo shar: Extracting \"'moon.c'\" \(24795 characters\)
sed "s/^X//" >'moon.c' <<'END_OF_FILE'
X/*
X * $Header: moon.c,v 2.3 91/02/01 12:20:13 billr Exp $
X */
X/*
X * moon.c
X *
X * Compute various interesting data about the moon.  Based on the
X * moontool program by John Walker (see below), and modified by
X * Bill Randle, Tektronix, Inc. to interface to the calentool
X * program.
X */
X#include "ct.h"     /* for the NO_SUN_MOON #define */
X#ifndef NO_SUN_MOON
X
X/*
X
X    A Moon for the Sun
X
X    Release 2.3
X
X    Designed and implemented by John Walker in December 1987,
X    revised and updated in February of 1988.
X    revised and updated again in June of 1988 by Ron Hitchens
X
X    Make with:
X
X    cc -O moontool.c -o moontool -lm -lsuntool -lsunwindow -lpixrect
X
X    Adding  appropriate  floating  point  options  to your hardware.  This
X    program is a SunView tool which displays, as the  icon  for  a  closed
X    window,  the  current phase of the Moon.  A subtitle in the icon gives
X    the age of the Moon in days  and  hours.   If  called  with  the  "-t"
X    switch,  it  rapidly  increments  forward  through time to display the
X    cycle of phases.
X
X    If you open the window, additional information is displayed  regarding
X    the  Moon.	 The  information  is  generally  accurate  to	within ten
X    minutes.
X
X    The algorithms used in this program to calculate the positions Sun and
X    Moon as seen from the Earth are given in the book "Practical Astronomy
X    With  Your  Calculator"  by  Peter  Duffett-Smith,   Second   Edition,
X    Cambridge University Press, 1981.  Ignore the word "Calculator" in the
X    title;  this  is  an  essential  reference  if  you're  interested  in
X    developing	software  which  calculates  planetary	positions, orbits,
X    eclipses, and  the  like.   If  you're  interested  in  pursuing  such
X    programming, you should also obtain:
X
X    "Astronomical  Formulae for Calculators" by Jean Meeus, Third Edition,
X    Willmann-Bell, 1985.  A must-have.
X
X    "Planetary  Programs  and  Tables  from  -4000  to  +2800"  by  Pierre
X    Bretagnon  and Jean-Louis Simon, Willmann-Bell, 1986.  If you want the
X    utmost  (outside  of  JPL)  accuracy  for  the  planets,  it's   here.
X
X    "Celestial BASIC" by Eric Burgess, Revised Edition, Sybex, 1985.  Very
X    cookbook oriented, and many of the algorithms are hard to dig  out	of
X    the turgid BASIC code, but you'll probably want it anyway.
X
X    Many of these references can be obtained from Willmann-Bell, P.O.  Box
X    35025,  Richmond,  VA 23235, USA.  Phone: (804) 320-7016.  In addition
X    to their own publications, they stock most of the standard	references
X    for mathematical and positional astronomy.
X
X    This program was written by:
X
X       John Walker
X       Autodesk, Inc.
X       2320 Marinship Way
X       Sausalito, CA  94965
X       (415) 332-2344 Ext. 829
X
X       Usenet: {sun!well}!acad!kelvin
X
X    This  program is in the public domain: "Do what thou wilt shall be the
X    whole of the law".  I'd appreciate  receiving  any  bug  fixes  and/or
X    enhancements,  which  I'll  incorporate  in  future  versions  of  the
X    program.  Please leave the original attribution information intact	so
X    that credit and blame may be properly apportioned.
X
X   Revision history:
X
X        1.0  11/5/87   First version.  Only displayed icon, no
X                       open window information display.
X
X        2.0  3/27/88   First posting to comp.sources.unix.
X
X        2.1  6/16/88   Bug fix.  Table of phases didn't update
X                       at the moment of the new moon.  Call on
X                       phasehunt didn't convert civil Julian date
X                       to astronomical Julian date.  Reported by
X                       Dag Bruck (dag@control.lth.se).
X
X        2.2  2/27/89   Michael McClary  (michael@xanadu.COM)
X                       Added moon map, derived from the sun "fullmoon"
X                       image file.  (It has not been checked for
X                       rotation from the correct orientation.  Also, a
X                       fixed icon doesn't model the librations of the
X                       moon as viewed from the earth.) Also: tweaked
X                       corners of icon.
X
X        2.3  6/7/89    Bug fix.  Table of phases skipped the phases
X                       for July 1989.  This occurred due to sloppy
X                       maintenance of the synodic month index in the
X                       interchange of information between phasehunt()
X                       and meanphase().  I simplified and corrected
X                       the handling of the month index as phasehunt()
X                       steps along and removed unneeded code from
X                       meanphase().  Reported by Bill Randle of
X                       Tektronix, Inc. (billr@saab.CNA.TEK.COM).
X
XAdditional History:
X
X	June 1988	Modified by Ron Hitchens to produce version 2.1
X			modified icon generation to show surface texture
X			 on visible moon face.  Eliminated "illegal" direct
X			 modification of icon image memory.
X			added a menu to allow switching in and out of
X			 test mode, for entertainment value mostly.
X			reworked timer behaviour so that process doesn't
X			 wake up unnecessarily.
X			trap sigwinch signals to notice more easily when the
X			 tool opens and closes.
X			modified layout of information in open window display
X			 to reduce the amount of pixels modified in each
X			 update.  Batched pixwin updates so that only one
X			 screen rasterop per cycle is done.
X			changed open window to display white-on-black for a
X			 more aesthetic look, and to suggest the effect of
X			 looking at the moon in the nighttime sky.
X			setup default tool and canvas colors to be the same
X			 as B&W monochrome, for those us lucky enough to have
X			 color monitors and who have the default monochrome
X			 colors set to something other than B&W (I like white
X			 on dark blue myself)
X			various code reformatting and pretty-printing to suit
X			 my own coding taste (I got a bit carried away).
X			code tweaking to make lint happy.
X			returned my hacked version to John.
X
X			Ron Hitchens
X				ronbo@vixen.uucp
X				...!uunet!cs.utexas.edu!vixen!ronbo
X				hitchens@cs.utexas.edu
X*/
X
X
X#include <stdio.h>
X#include <math.h>
X#include <sys/time.h>
X
X#include <suntool/sunview.h>
X#include <suntool/canvas.h>
X
X#define TINYFONT	"/usr/lib/fonts/fixedwidthfonts/screen.r.7"
X
X/*
X * define standard B/W monochrome colors as defaults in case we're running
X * on a color system with the monochrome colors set differently
X */
X#define FG_DEFAULT	{ 0, 0, 0 }		/* black */
X#define BG_DEFAULT	{ 255, 255, 255 }	/* white */
X
X
X/*  Astronomical constants  */
X
X#define epoch	    2444238.5	   /* 1980 January 0.0 */
X#define J1970       2440587.5      /* VAX clock Epoch 1970 Jan 1 (0h UT) */
X
X/*  Constants defining the Sun's apparent orbit  */
X
X#define elonge	    278.833540	   /* Ecliptic longitude of the Sun
X				      at epoch 1980.0 */
X#define elongp	    282.596403	   /* Ecliptic longitude of the Sun at
X				      perigee */
X#define eccent      0.016718       /* Eccentricity of Earth's orbit */
X#define sunsmax     1.495985e8     /* Semi-major axis of Earth's orbit, km */
X#define sunangsiz   0.533128       /* Sun's angular size, degrees, at
X				      semi-major axis distance */
X
X/*  Elements of the Moon's orbit, epoch 1980.0  */
X
X#define mmlong      64.975464      /* Moon's mean lonigitude at the epoch */
X#define mmlongp     349.383063	   /* Mean longitude of the perigee at the
X				      epoch */
X#define mlnode	    151.950429	   /* Mean longitude of the node at the
X				      epoch */
X#define minc        5.145396       /* Inclination of the Moon's orbit */
X#define mecc        0.054900       /* Eccentricity of the Moon's orbit */
X#define mangsiz     0.5181         /* Moon's angular size at distance a
X				      from Earth */
X#define msmax       384401.0       /* Semi-major axis of Moon's orbit in km */
X#define mparallax   0.9507	   /* Parallax at distance a from Earth */
X#define synmonth    29.53058868    /* Synodic month (new Moon to new Moon) */
X#define lunatbase   2423436.0      /* Base date for E. W. Brown's numbered
X				      series of lunations (1923 January 16) */
X
X/*  Properties of the Earth  */
X
X#define earthrad    6378.16	   /* Radius of Earth in kilometres */
X
X
X#define PI 3.14159265358979323846  /* Assume not near black hole nor in
X				      Tennessee */
X
X/*  Handy mathematical functions  */
X
X#define sgn(x) (((x) < 0) ? -1 : ((x) > 0 ? 1 : 0))	  /* Extract sign */
X#define abs(x) ((x) < 0 ? (-(x)) : (x)) 		  /* Absolute val */
X#define fixangle(a) ((a) - 360.0 * (floor((a) / 360.0)))  /* Fix angle	  */
X#define torad(d) ((d) * (PI / 180.0))			  /* Deg->Rad	  */
X#define todeg(d) ((d) * (180.0 / PI))			  /* Rad->Deg	  */
X#define dsin(x) (sin(torad((x))))			  /* Sin from deg */
X#define dcos(x) (cos(torad((x))))			  /* Cos from deg */
X
X
X/*
X * Moon image.  This is a standard icon-sized picture of the moon's face.
X * The visible part, as calculated by the current time, is extracted from
X * this image to create the displayed image.
X */
X
Xstatic short moon_img [] = {
X#include "moon.icon"
X};
Xmpr_static(moon_mpr, 64, 64, 1, moon_img);
X
Xextern Pixfont	*font;			/* pointer to regular icon font */
Xextern Pixfont	*sfont;			/* pointer to tiny icon font */
Xextern Canvas	mcanvas;			/* handle for the canvas */
Xextern char *monthnames[];
Xstatic Pixrect	*icon_mpr;		/* actual displayed pixrect */
Xstatic Pixwin	*cpw;			/* pointer to the canvas' pixwin */
Xstatic int	charhgt, charwid;	/* default std font height/width */
Xstatic int info_col;
Xstatic struct timezone tzp;
X
Xstatic char *labels [] = {
X	"Moon phase:",
X	"Age of moon:",
X	"Moon's distance:",
X	"Moon subtends:",
X	"Last new moon:",
X	"First quarter:",
X	"Full moon:",
X	"Last quarter:",
X	"Next new moon:"
X};
X
X/*  Forward functions  */
Xstatic double		jtime(), phase();
Xstatic void		phasehunt();
Xstatic void		drawmoon(), jyear(), jhms();
X
X
X/*
X * DRAWMOON  --  Construct icon for moon, given phase of moon.
X */
X
Xstatic void drawmoon (ph, src_pr, dst_pr)
Xdouble		ph;
XPixrect		*src_pr, *dst_pr;
X{
X	register int	i, lx, rx;
X	register double	cp, xscale;
X#define RADIUS		27.0
X#define IRADIUS		27
X#define OFFSET		28
X#define CENTER		32
X
X	/* Clear the destination pixrect to all one-bits (black) */
X	pr_rop (dst_pr, 0, 0, 64, 64, PIX_SET, (Pixrect *)0, 0, 0);
X
X	xscale = cos (2 * PI * ph);
X	for (i = 0; i < IRADIUS; i++) {
X		cp = RADIUS * cos (asin (i / RADIUS));
X		if (ph < 0.5) {
X			rx = CENTER + cp;
X			lx = CENTER + xscale * cp;
X		} else {
X			lx = CENTER - cp;
X			rx = CENTER - xscale * cp;
X		}
X
X		/*
X		 * We now know the left and right endpoints of the scan line
X		 * for this y coordinate.  We raster-op the corresponding
X		 * scanlines from the source pixrect to the destination
X		 * pixrect, offsetting to properly place it in the pixrect and
X		 * reflecting vertically.
X		 */
X		pr_rop (dst_pr, lx, OFFSET + i, (rx - lx) + 1, 1, PIX_SRC,
X			src_pr, lx, OFFSET + i);
X		pr_rop (dst_pr, lx, OFFSET - i, (rx - lx) + 1, 1, PIX_SRC,
X			src_pr, lx, OFFSET - i);
X	}
X}
X
X#define prt(y) pw_text(cpw, info_col, charhgt*(y), PIX_SRC, font, tbuf)
X#define prtxy(x,y) pw_text(cpw, charwid*(y+1), charhgt*(x), PIX_SRC,\
X	font,tbuf)
X#define EPL(x) (x), (x) == 1 ? "" : "s"
X#define APOS(x) (x + 11)
X
X/*  MOON_DATA  -- print useful info about the moon */
X
Xmoon_data(seconds)
Xlong seconds;
X{
X	int		lunation, wclosed;
X	int		i, yy, mm, dd, hh, mmm, ss;
X	int		aom_d, aom_h, aom_m;
X	long		t;
X	double		jd, p, aom, cphase, cdist, cangdia, csund, csuang;
X	double		phasar [5];
X	char		tbuf[80];
X	struct tm	*gm, *ltm, *localtime();
X	struct timeval tvp;
X	struct pr_prpos	tloc;
X	struct pr_size	txt_size;
X	long clock;
X	char *atp, *asctime();
X
X	icon_mpr = mem_create (64, 64, 1);
X	pr_rop (icon_mpr, 0, 0, 64, 64, PIX_SRC, &moon_mpr, 0, 0);
X	cpw = canvas_pixwin(mcanvas);
X	charwid = font->pf_defaultsize.x;
X	charhgt = font->pf_defaultsize.y;
X	info_col = charwid * 20;
X	jd = jtime ((gm = gmtime (&seconds)));
X	gettimeofday(&tvp, &tzp); /* for timezone info */
X	p = phase (jd, &cphase, &aom, &cdist, &cangdia, &csund, &csuang);
X	aom_d = (int) aom;
X	aom_h = (int) (24 * (aom - floor(aom)));
X	aom_m = (int) (1440 * (aom - floor(aom))) % 60;
X
X	drawmoon(p, &moon_mpr, icon_mpr);
X
X	if (aom_d == 0) {
X		(void)sprintf(tbuf, "%dh %dm", aom_h, aom_m);
X	} else {
X		(void)sprintf(tbuf, "%dd %dh", aom_d, aom_h);
X	}
X	txt_size = pf_textwidth (strlen (tbuf), sfont, tbuf);
X	tloc.pos.x = (64 - txt_size.x) / 2;
X	tloc.pos.y = 63;
X	tloc.pr = icon_mpr;
X	pf_text (tloc, PIX_NOT(PIX_SRC), sfont, tbuf);
X
X	/* Update textual information for open window */
X
X	/* start batching updates to the pixwin */
X	pw_batch_on (cpw);
X
X	paint_labels();
X	/* moon phase */
X	(void)sprintf (tbuf, "%d%%   [0%% = New, 100%% = Full]  ",
X		(int) (cphase * 100));
X	prt(1);
X
X	/* Information about the Moon */
X
X	/* age of moon */
X	(void)sprintf (tbuf, "%d day%s, %d hour%s, %d minute%s.       ",
X		EPL(aom_d), EPL(aom_h), EPL(aom_m));
X	prt(2);
X
X	/* moon distance */
X	(void)sprintf (tbuf, "%ld kilometres, %.1f Earth radii.  ",
X		(long) cdist, cdist / earthrad);
X	prt(3);
X
X	/* moon subtends */
X	(void)sprintf (tbuf, "%.4f degrees.       ", cangdia);
X	prt(4);
X
X	/* paint the moon's image in the upper right of the canvas */
X	pw_rop (cpw, 60 * charwid, charhgt, 64, 64, PIX_SRC, icon_mpr, 0, 0);
X
X	/*
X	 * Calculate times of phases of this lunation.
X	 */
X	phasehunt(jd + 0.5, phasar);
X
X	for (i = 0; i < 5; i++) {
X		fmt_phase_time (phasar[i], tbuf);
X		prt(APOS(i));
X	}
X
X	lunation = floor(((phasar[0] + 7) - lunatbase) / synmonth) + 1;
X	(void)sprintf(tbuf, "Lunation %d ", lunation);
X	prtxy(APOS(0), 49);			      
X	(void)sprintf(tbuf, "Lunation %d ", lunation + 1);
X	prtxy(APOS(4), 49);
X
X	/* flush the pixwin updates to the screen */
X	pw_batch_off (cpw);
X
X	return;
X}
X#undef APOS
X
X
X/*
X * FMT_PHASE_TIME -- Format the provided julian date into the provided buffer
X *		in local time format for screen display
X */
X
Xfmt_phase_time (utime, buf)
X	double	utime;
X	char	*buf;
X{
X	long	clock;
X	struct tm	*ltm, *localtime();
X
X	/* convert to seconds local time, so we can use localtime()
X	   to handle dst calculations */
X	clock = (long)((utime - J1970) * 24. * 3600.);
X	ltm = localtime(&clock);
X	(void)sprintf (buf, " %02d:%02d %s %2d %s %d             ",
X	ltm->tm_hour, ltm->tm_min, timezone(tzp.tz_minuteswest, ltm->tm_isdst), ltm->tm_mday, monthnames[ltm->tm_mon], ltm->tm_year+1900);
X}
X
X
X/*
X * PAINT_LABELS -- Draw the labels into the canvas (open) window and right
X *		justify them.  Done once at startup.  We paint the labels
X *		separately to minimize the amount of screen real-estate
X *		being modified on each update.
X */
X
Xpaint_labels ()
X{
X	int	i;
X
X	for (i = 0; i < 4; i++) {
X		pw_text (cpw, charwid * (17 - strlen (labels [i])),
X			charhgt * (i + 1), PIX_SRC,
X			font, labels[i]);
X	}
X	for (i = 4; i < 9; i++) {
X		pw_text (cpw, charwid * (17 - strlen (labels [i])),
X			charhgt * (i + 7), PIX_SRC,
X			font, labels[i]);
X	}
X}
X
X
X/*
X * JDATE  --  Convert internal GMT date and time to Julian day
X *	       and fraction.
X */
X
Xstatic
Xlong
Xjdate (t)
X	struct tm	*t;
X{
X	long		c, m, y;
X
X	y = t->tm_year + 1900;
X	m = t->tm_mon + 1;
X	if (m > 2) {
X		m = m - 3;
X	} else {
X		m = m + 9;
X		y--;
X	}
X	c = y / 100L;		   /* Compute century */
X	y -= 100L * c;
X	return (t->tm_mday + (c * 146097L) / 4 + (y * 1461L) / 4 +
X	    (m * 153L + 2) / 5 + 1721119L);
X}
X
X
X/*
X * JTIME --    Convert internal GMT date and time to astronomical Julian
X *	       time (i.e. Julian date plus day fraction, expressed as
X *	       a double).
X */
X
Xstatic
Xdouble
Xjtime (t)
X	struct tm *t;
X{
X	return (jdate (t) - 0.5) + 
X	   (t->tm_sec + 60 * (t->tm_min + 60 * t->tm_hour)) / 86400.0;
X}
X
X
X/*
X * JYEAR  --  Convert Julian date to year, month, day, which are
X *	       returned via integer pointers to integers.  
X */
X
Xstatic
Xvoid
Xjyear (td, yy, mm, dd)
X	double	td;
X	int	*yy, *mm, *dd;
X{
X	double j, d, y, m;
X
X	td += 0.5;				/* Astronomical to civil */
X	j = floor(td);
X	j = j - 1721119.0;
X	y = floor(((4 * j) - 1) / 146097.0);
X	j = (j * 4.0) - (1.0 + (146097.0 * y));
X	d = floor(j / 4.0);
X	j = floor(((4.0 * d) + 3.0) / 1461.0);
X	d = ((4.0 * d) + 3.0) - (1461.0 * j);
X	d = floor((d + 4.0) / 4.0);
X	m = floor(((5.0 * d) - 3) / 153.0);
X	d = (5.0 * d) - (3.0 + (153.0 * m));
X	d = floor((d + 5.0) / 5.0);
X	y = (100.0 * y) + j;
X	if (m < 10.0)
X		m = m + 3;
X	else {
X		m = m - 9;
X		y = y + 1;
X	}
X	*yy = y;
X	*mm = m;
X	*dd = d;
X}
X
X
X/*
X * JHMS  --  Convert Julian time to hour, minutes, and seconds.
X */
X
Xstatic
Xvoid
Xjhms(j, h, m, s)
X	double j;
X	int *h, *m, *s;
X{
X	long ij;
X
X	j += 0.5;				/* Astronomical to civil */
X	ij = (j - floor(j)) * 86400.0;
X	*h = ij / 3600L;
X	*m = (ij / 60L) % 60L;
X	*s = ij % 60L;
X}
X
X
X/*
X * MEANPHASE  --  Calculates mean phase of the Moon for a given
X *		base date.  This argument K to this function is
X *		the precomputed synodic month index, given by:
X *
X *			K = (year - 1900) * 12.3685
X *
X *		where year is expressed as a year and fractional
X *		year.
X */
X
Xstatic
Xdouble
Xmeanphase (sdate, k)
X	double	sdate, k;
X{
X	double	t, t2, t3, nt1;
X
X	/* Time in Julian centuries from 1900 January 0.5 */
X	t = (sdate - 2415020.0) / 36525;
X	t2 = t * t;		   /* Square for frequent use */
X	t3 = t2 * t;		   /* Cube for frequent use */
X
X	nt1 = 2415020.75933 + synmonth * k
X		+ 0.0001178 * t2
X		- 0.000000155 * t3
X		+ 0.00033 * dsin(166.56 + 132.87 * t - 0.009173 * t2);
X
X	return nt1;
X}
X
X
X/*
X * TRUEPHASE  --  Given a K value used to determine the
X *		mean phase of the new moon, and a phase
X *		selector (0.0, 0.25, 0.5, 0.75), obtain
X *		the true, corrected phase time.
X */
X
Xstatic
Xdouble
Xtruephase(k, phase)
X	double k, phase;
X{
X	double t, t2, t3, pt, m, mprime, f;
X	int apcor = FALSE;
X
X	k += phase;		   /* Add phase to new moon time */
X	t = k / 1236.85;	   /* Time in Julian centuries from
X				      1900 January 0.5 */
X	t2 = t * t;		   /* Square for frequent use */
X	t3 = t2 * t;		   /* Cube for frequent use */
X	pt = 2415020.75933	   /* Mean time of phase */
X	     + synmonth * k
X	     + 0.0001178 * t2
X	     - 0.000000155 * t3
X	     + 0.00033 * dsin(166.56 + 132.87 * t - 0.009173 * t2);
X
X        m = 359.2242               /* Sun's mean anomaly */
X	    + 29.10535608 * k
X	    - 0.0000333 * t2
X	    - 0.00000347 * t3;
X        mprime = 306.0253          /* Moon's mean anomaly */
X	    + 385.81691806 * k
X	    + 0.0107306 * t2
X	    + 0.00001236 * t3;
X        f = 21.2964                /* Moon's argument of latitude */
X	    + 390.67050646 * k
X	    - 0.0016528 * t2
X	    - 0.00000239 * t3;
X	if ((phase < 0.01) || (abs(phase - 0.5) < 0.01)) {
X
X	   /* Corrections for New and Full Moon */
X
X	   pt +=     (0.1734 - 0.000393 * t) * dsin(m)
X		    + 0.0021 * dsin(2 * m)
X		    - 0.4068 * dsin(mprime)
X		    + 0.0161 * dsin(2 * mprime)
X		    - 0.0004 * dsin(3 * mprime)
X		    + 0.0104 * dsin(2 * f)
X		    - 0.0051 * dsin(m + mprime)
X		    - 0.0074 * dsin(m - mprime)
X		    + 0.0004 * dsin(2 * f + m)
X		    - 0.0004 * dsin(2 * f - m)
X		    - 0.0006 * dsin(2 * f + mprime)
X		    + 0.0010 * dsin(2 * f - mprime)
X		    + 0.0005 * dsin(m + 2 * mprime);
X	   apcor = TRUE;
X	} else if ((abs(phase - 0.25) < 0.01 || (abs(phase - 0.75) < 0.01))) {
X	   pt +=     (0.1721 - 0.0004 * t) * dsin(m)
X		    + 0.0021 * dsin(2 * m)
X		    - 0.6280 * dsin(mprime)
X		    + 0.0089 * dsin(2 * mprime)
X		    - 0.0004 * dsin(3 * mprime)
X		    + 0.0079 * dsin(2 * f)
X		    - 0.0119 * dsin(m + mprime)
X		    - 0.0047 * dsin(m - mprime)
X		    + 0.0003 * dsin(2 * f + m)
X		    - 0.0004 * dsin(2 * f - m)
X		    - 0.0006 * dsin(2 * f + mprime)
X		    + 0.0021 * dsin(2 * f - mprime)
X		    + 0.0003 * dsin(m + 2 * mprime)
X		    + 0.0004 * dsin(m - 2 * mprime)
X		    - 0.0003 * dsin(2 * m + mprime);
X	   if (phase < 0.5)
X	      /* First quarter correction */
X	      pt += 0.0028 - 0.0004 * dcos(m) + 0.0003 * dcos(mprime);
X	   else
X	      /* Last quarter correction */
X	      pt += -0.0028 + 0.0004 * dcos(m) - 0.0003 * dcos(mprime);
X	   apcor = TRUE;
X	}
X	if (!apcor) {
X           (void)fprintf (stderr,
X		"TRUEPHASE called with invalid phase selector.\n");
X	   abort();
X	}
X	return pt;
X}
X
X
X/*
X * PHASEHUNT  --  Find time of phases of the moon which surround
X *		the current date.  Five phases are found, starting
X *		and ending with the new moons which bound the
X *		current lunation.
X */
X
Xstatic
Xvoid
Xphasehunt (sdate, phases)
X	double	sdate;
X	double	phases [5];
X{
X	int	yy, mm, dd;
X	double	adate, k1, k2, nt1, nt2;
X
X	adate = sdate - 45;
X	jyear(adate, &yy, &mm, &dd);
X	k1 = floor((yy + ((mm - 1) * (1.0 / 12.0)) - 1900) * 12.3685);
X
X	adate = nt1 = meanphase(adate, k1);
X	while (TRUE) {
X		adate += synmonth;
X		k2 = k1 + 1;
X		nt2 = meanphase(adate, k2);
X		if (nt1 <= sdate && nt2 > sdate)
X			break;
X		nt1 = nt2;
X		k1 = k2;
X	}
X	phases[0] = truephase(k1, 0.0);
X	phases[1] = truephase(k1, 0.25);
X	phases[2] = truephase(k1, 0.5);
X	phases[3] = truephase(k1, 0.75);
X	phases[4] = truephase(k2, 0.0);
X}
X
X
X/*
X * KEPLER  --	Solve the equation of Kepler.
X */
X
Xstatic
Xdouble
Xkepler(m, ecc)
X	double m, ecc;
X{
X	double e, delta;
X#define EPSILON 1E-6
X
X	e = m = torad(m);
X	do {
X		delta = e - ecc * sin(e) - m;
X		e -= delta / (1 - ecc * cos(e));
X	} while (abs (delta) > EPSILON);
X	return e;
X}
X
X
X/*
X * PHASE  --  Calculate phase of moon as a fraction:
X *
X *	The argument is the time for which the phase is requested,
X *	expressed as a Julian date and fraction.  Returns the terminator
X *	phase angle as a percentage of a full circle (i.e., 0 to 1),
X *	and stores into pointer arguments the illuminated fraction of
X *	the Moon's disc, the Moon's age in days and fraction, the
X *	distance of the Moon from the centre of the Earth, and the
X *	angular diameter subtended by the Moon as seen by an observer
X *	at the centre of the Earth.
X */
X
Xstatic
Xdouble
Xphase (pdate, pphase, mage, dist, angdia, sudist, suangdia)
X	double	pdate;
X	double	*pphase;		/* Illuminated fraction */
X	double	*mage;			/* Age of moon in days */
X	double	*dist;			/* Distance in kilometres */
X	double	*angdia;		/* Angular diameter in degrees */
X	double	*sudist;		/* Distance to Sun */
X	double	*suangdia;		/* Sun's angular diameter */
X{
X
X	double	Day, N, M, Ec, Lambdasun, ml, MM, MN, Ev, Ae, A3, MmP,
X		mEc, A4, lP, V, lPP, NP, y, x, Lambdamoon, BetaM,
X		MoonAge, MoonPhase,
X		MoonDist, MoonDFrac, MoonAng, MoonPar,
X		F, SunDist, SunAng;
X
X        /* Calculation of the Sun's position */
X
X	Day = pdate - epoch;			/* Date within epoch */
X	N = fixangle((360 / 365.2422) * Day);	/* Mean anomaly of the Sun */
X	M = fixangle(N + elonge - elongp);	/* Convert from perigee
X				 		co-ordinates to epoch 1980.0 */
X	Ec = kepler(M, eccent);			/* Solve equation of Kepler */
X	Ec = sqrt((1 + eccent) / (1 - eccent)) * tan(Ec / 2);
X	Ec = 2 * todeg(atan(Ec));		/* True anomaly */
X        Lambdasun = fixangle(Ec + elongp);	/* Sun's geocentric ecliptic
X							longitude */
X	/* Orbital distance factor */
X	F = ((1 + eccent * cos(torad(Ec))) / (1 - eccent * eccent));
X	SunDist = sunsmax / F;			/* Distance to Sun in km */
X        SunAng = F * sunangsiz;		/* Sun's angular size in degrees */
X
X
X        /* Calculation of the Moon's position */
X
X        /* Moon's mean longitude */
X	ml = fixangle(13.1763966 * Day + mmlong);
X
X        /* Moon's mean anomaly */
X	MM = fixangle(ml - 0.1114041 * Day - mmlongp);
X
X        /* Moon's ascending node mean longitude */
X	MN = fixangle(mlnode - 0.0529539 * Day);
X
X	/* Evection */
X	Ev = 1.2739 * sin(torad(2 * (ml - Lambdasun) - MM));
X
X	/* Annual equation */
X	Ae = 0.1858 * sin(torad(M));
X
X	/* Correction term */
X	A3 = 0.37 * sin(torad(M));
X
X	/* Corrected anomaly */
X	MmP = MM + Ev - Ae - A3;
X
X	/* Correction for the equation of the centre */
X	mEc = 6.2886 * sin(torad(MmP));
X
X	/* Another correction term */
X	A4 = 0.214 * sin(torad(2 * MmP));
X
X	/* Corrected longitude */
X	lP = ml + Ev + mEc - Ae + A4;
X
X	/* Variation */
X	V = 0.6583 * sin(torad(2 * (lP - Lambdasun)));
X
X	/* True longitude */
X	lPP = lP + V;
X
X	/* Corrected longitude of the node */
X	NP = MN - 0.16 * sin(torad(M));
X
X	/* Y inclination coordinate */
X	y = sin(torad(lPP - NP)) * cos(torad(minc));
X
X	/* X inclination coordinate */
X	x = cos(torad(lPP - NP));
X
X	/* Ecliptic longitude */
X	Lambdamoon = todeg(atan2(y, x));
X	Lambdamoon += NP;
X
X	/* Ecliptic latitude */
X	BetaM = todeg(asin(sin(torad(lPP - NP)) * sin(torad(minc))));
X
X	/* Calculation of the phase of the Moon */
X
X	/* Age of the Moon in degrees */
X	MoonAge = lPP - Lambdasun;
X
X	/* Phase of the Moon */
X	MoonPhase = (1 - cos(torad(MoonAge))) / 2;
X
X	/* Calculate distance of moon from the centre of the Earth */
X
X	MoonDist = (msmax * (1 - mecc * mecc)) /
X	   (1 + mecc * cos(torad(MmP + mEc)));
X
X        /* Calculate Moon's angular diameter */
X
X	MoonDFrac = MoonDist / msmax;
X	MoonAng = mangsiz / MoonDFrac;
X
X        /* Calculate Moon's parallax */
X
X	MoonPar = mparallax / MoonDFrac;
X
X	*pphase = MoonPhase;
X	*mage = synmonth * (fixangle(MoonAge) / 360.0);
X	*dist = MoonDist;
X	*angdia = MoonAng;
X	*sudist = SunDist;
X	*suangdia = SunAng;
X	return fixangle(MoonAge) / 360.0;
X}
X#endif  /* NO_SUN_MOON */
END_OF_FILE
if test 24795 -ne `wc -c <'moon.c'`; then
    echo shar: \"'moon.c'\" unpacked with wrong size!
fi
# end of 'moon.c'
fi
echo shar: End of archive 21 \(of 23\).
cp /dev/null ark21isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 23 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.