Browse Source

Plan 9 from Bell Labs 2006-04-02

David du Colombier 15 years ago
parent
commit
e894da136d

+ 11 - 11
adm/timezone/US_Alaska

@@ -11,14 +11,14 @@ AKS -32400 AKD -28800
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_Central

@@ -11,14 +11,14 @@ CST -21600 CDT -18000
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_East-Indiana

@@ -1,12 +1,12 @@
 EST -18000 EDT -14400
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_Eastern

@@ -11,14 +11,14 @@ EST -18000 EDT -14400
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 12 - 11
adm/timezone/US_Michigan

@@ -1,4 +1,5 @@
 EST -18000 EDT -14400
+   9943200   25664400   41392800   57718800   73447200   89168400
  104896800  120618000  126669600  152067600  162352800  183517200
  199245600  215571600  230695200  247021200  262749600  278470800
  294199200  309920400  325648800  341370000  357098400  372819600
@@ -10,14 +11,14 @@ EST -18000 EDT -14400
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_Mountain

@@ -11,14 +11,14 @@ MST -25200 MDT -21600
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_Pacific

@@ -11,14 +11,14 @@ PST -28800 PDT -25200
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 11 - 11
adm/timezone/US_Yukon

@@ -11,14 +11,14 @@ YST -32400 YDT -28800
  860292000  877827600  891741600  909277200  923191200  941331600
  954640800  972781200  986090400 1004230800 1018144800 1035680400
 1049594400 1067130000 1081044000 1099184400 1112493600 1130634000
-1143943200 1162083600 1175392800 1193533200 1207447200 1224982800
-1238896800 1256432400 1270346400 1288486800 1301796000 1319936400
-1333245600 1351386000 1365300000 1382835600 1396749600 1414285200
-1428199200 1445734800 1459648800 1477789200 1491098400 1509238800
-1522548000 1540688400 1554602400 1572138000 1586052000 1603587600
-1617501600 1635642000 1648951200 1667091600 1680400800 1698541200
-1712455200 1729990800 1743904800 1761440400 1775354400 1792890000
-1806804000 1824944400 1838253600 1856394000 1869703200 1887843600
-1901757600 1919293200 1933207200 1950742800 1964656800 1982797200
-1996106400 2014246800 2027556000 2045696400 2059005600 2077146000
-2091060000 2108595600 2122509600 2140045200
+1143943200 1162083600 1173578400 1194141600 1205028000 1225591200
+1236477600 1257040800 1268532000 1289095200 1299981600 1320544800
+1331431200 1351994400 1362880800 1383444000 1394330400 1414893600
+1425780000 1446343200 1457834400 1478397600 1489284000 1509847200
+1520733600 1541296800 1552183200 1572746400 1583632800 1604196000
+1615687200 1636250400 1647136800 1667700000 1678586400 1699149600
+1710036000 1730599200 1741485600 1762048800 1772935200 1793498400
+1804989600 1825552800 1836439200 1857002400 1867888800 1888452000
+1899338400 1919901600 1930788000 1951351200 1962842400 1983405600
+1994292000 2014855200 2025741600 2046304800 2057191200 2077754400
+2088640800 2109204000 2120090400 2140653600

+ 20 - 19
dist/replica/_plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1131317303 216948
-386/9loaddebug - 775 sys sys 1143146512 312489
+386/9loaddebug - 775 sys sys 1143931720 312489
 386/9loadlite - 775 sys sys 1131317306 135668
-386/9loadlitedebug - 775 sys sys 1143146513 200137
+386/9loadlitedebug - 775 sys sys 1143931720 200137
 386/9pc - 775 sys sys 1143137104 1913157
 386/9pc.gz - 664 sys sys 1141258202 668936
 386/9pccpu - 775 sys sys 1141258205 1583315
@@ -149,7 +149,7 @@
 386/bin/aux/trampoline - 775 sys sys 1143777767 83990
 386/bin/aux/typepasswd - 775 sys sys 1143777767 69833
 386/bin/aux/usage - 775 sys sys 1143777768 59904
-386/bin/aux/vga - 775 sys sys 1143777769 334185
+386/bin/aux/vga - 775 sys sys 1143950134 334335
 386/bin/aux/vmmousepoll - 775 sys sys 1032480572 41434
 386/bin/aux/vmware - 775 sys sys 1049428256 453
 386/bin/aux/vmwarefs - 775 sys sys 1095563640 99117
@@ -784,16 +784,16 @@ adm/timezone/ROC - 664 adm adm 1020313577 20
 adm/timezone/ROK - 664 adm adm 1020313577 64
 adm/timezone/Singapore - 664 adm adm 1020313577 20
 adm/timezone/Turkey - 664 adm adm 1020313577 1164
-adm/timezone/US_Alaska - 664 adm adm 1020313577 1518
+adm/timezone/US_Alaska - 664 adm adm 1143927130 1518
 adm/timezone/US_Arizona - 664 adm adm 1020313577 22
-adm/timezone/US_Central - 664 adm adm 1020313577 1518
-adm/timezone/US_East-Indiana - 664 adm adm 1143844688 726
-adm/timezone/US_Eastern - 664 adm adm 1020313577 1518
+adm/timezone/US_Central - 664 adm adm 1143927129 1518
+adm/timezone/US_East-Indiana - 664 adm adm 1143927129 726
+adm/timezone/US_Eastern - 664 adm adm 1143927130 1518
 adm/timezone/US_Hawaii - 664 adm adm 1020313577 22
-adm/timezone/US_Michigan - 664 adm adm 1020313577 1452
-adm/timezone/US_Mountain - 664 adm adm 1020313577 1518
-adm/timezone/US_Pacific - 664 adm adm 1020313578 1518
-adm/timezone/US_Yukon - 664 adm adm 1020313578 1518
+adm/timezone/US_Michigan - 664 adm adm 1143927131 1518
+adm/timezone/US_Mountain - 664 adm adm 1143927130 1518
+adm/timezone/US_Pacific - 664 adm adm 1143927129 1518
+adm/timezone/US_Yukon - 664 adm adm 1143927130 1518
 adm/timezone/W-SU - 664 adm adm 1020313578 1164
 adm/timezone/WET - 664 adm adm 1020313578 1159
 adm/timezone/local - 664 adm adm 1020313578 1518
@@ -5213,7 +5213,7 @@ lib/tftpd - 20000000775 sys sys 944944178 0
 lib/unicode - 664 sys sys 958440028 223312
 lib/unicode.notice - 664 sys sys 958504386 1398
 lib/units - 664 sys sys 1071415518 9997
-lib/vgadb - 664 sys sys 1142693929 29319
+lib/vgadb - 664 sys sys 1143927653 29342
 lib/volcanoes - 664 sys sys 944944024 119831
 lib/words - 664 sys sys 1014923442 247097
 lp - 20000000775 sys sys 958199268 0
@@ -5408,7 +5408,7 @@ rc/bin/ape/false - 775 sys sys 945617285 17
 rc/bin/ape/grep - 775 sys sys 1023738308 60
 rc/bin/ape/install - 775 sys sys 1015089725 572
 rc/bin/ape/ld - 775 sys sys 1107957880 98
-rc/bin/ape/ls - 775 sys sys 1139841321 1018
+rc/bin/ape/ls - 775 sys sys 1143927118 1032
 rc/bin/ape/printf - 664 sys sys 1139841311 60
 rc/bin/ape/psh - 775 sys sys 1040481105 240
 rc/bin/ape/ranlib - 775 sys sys 1099176402 18
@@ -8045,7 +8045,7 @@ sys/src/9/pc/vgahiqvideo.c - 664 sys sys 1131290601 4098
 sys/src/9/pc/vgai81x.c - 664 sys sys 1135487942 4421
 sys/src/9/pc/vgamach64xx.c - 664 sys sys 1131290601 28257
 sys/src/9/pc/vgamga2164w.c - 664 sys sys 1132331257 4769
-sys/src/9/pc/vgamga4xx.c - 664 sys sys 1143648125 9489
+sys/src/9/pc/vgamga4xx.c - 664 sys sys 1143927896 9573
 sys/src/9/pc/vganeomagic.c - 664 sys sys 1131422294 10255
 sys/src/9/pc/vganvidia.c - 664 sys sys 1137689150 12395
 sys/src/9/pc/vgargb524.c - 664 sys sys 1131290602 4251
@@ -9708,7 +9708,7 @@ sys/src/cmd/aux/vga/mach64.c - 664 sys sys 1014925009 8279
 sys/src/cmd/aux/vga/mach64xx.c - 664 sys sys 1097900455 30266
 sys/src/cmd/aux/vga/main.c - 664 sys sys 1131741978 9725
 sys/src/cmd/aux/vga/mga2164w.c - 664 sys sys 1135487945 13173
-sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1135487948 35804
+sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1143927895 36098
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
@@ -12774,7 +12774,7 @@ sys/src/cmd/postscript/common/path.h - 664 sys sys 944961053 1369
 sys/src/cmd/postscript/common/request.c - 664 sys sys 944961053 3707
 sys/src/cmd/postscript/common/request.h - 664 sys sys 944961053 794
 sys/src/cmd/postscript/common/rune.c - 664 sys sys 944961053 2137
-sys/src/cmd/postscript/common/rune.h - 664 sys sys 944961053 374
+sys/src/cmd/postscript/common/rune.h - 664 sys sys 1143918283 376
 sys/src/cmd/postscript/common/tempnam.c - 664 sys sys 944961054 554
 sys/src/cmd/postscript/config - 664 sys sys 953348309 176
 sys/src/cmd/postscript/cropmarks - 20000000775 sys sys 944961054 0
@@ -13956,14 +13956,15 @@ sys/src/cmd/upas/filterkit/pipeto.sample-hold - 664 sys sys 1019837081 872
 sys/src/cmd/upas/filterkit/readaddrs.c - 664 sys sys 1143759341 1331
 sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1018549521 1312
 sys/src/cmd/upas/fs - 20000000775 sys sys 988250018 0
-sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143845990 4272
-sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143845990 27463
+sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143929916 4189
+sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143946869 26924
 sys/src/cmd/upas/fs/imap4.c - 664 sys sys 1133147970 16258
-sys/src/cmd/upas/fs/mbox.c - 664 sys sys 1143845990 29022
+sys/src/cmd/upas/fs/mbox.c - 664 sys sys 1143929917 26636
 sys/src/cmd/upas/fs/mkfile - 664 sys sys 1047490336 321
 sys/src/cmd/upas/fs/plan9.c - 664 sys sys 1071334861 7465
 sys/src/cmd/upas/fs/pop3.c - 664 sys sys 1133988332 13024
 sys/src/cmd/upas/fs/readdir.c - 664 sys sys 944961331 203
+sys/src/cmd/upas/fs/rfc2047-test - 664 sys sys 1143946985 1146
 sys/src/cmd/upas/fs/strtotm.c - 664 sys sys 1041137528 1904
 sys/src/cmd/upas/fs/tester.c - 664 sys sys 985037420 1418
 sys/src/cmd/upas/marshal - 20000000775 sys sys 1015009721 0

+ 20 - 19
dist/replica/plan9.db

@@ -1,8 +1,8 @@
 386 - 20000000775 sys sys 1010957353 0
 386/9load - 775 sys sys 1131317303 216948
-386/9loaddebug - 775 sys sys 1143146512 312489
+386/9loaddebug - 775 sys sys 1143931720 312489
 386/9loadlite - 775 sys sys 1131317306 135668
-386/9loadlitedebug - 775 sys sys 1143146513 200137
+386/9loadlitedebug - 775 sys sys 1143931720 200137
 386/9pc - 775 sys sys 1143137104 1913157
 386/9pc.gz - 664 sys sys 1141258202 668936
 386/9pccpu - 775 sys sys 1141258205 1583315
@@ -149,7 +149,7 @@
 386/bin/aux/trampoline - 775 sys sys 1143777767 83990
 386/bin/aux/typepasswd - 775 sys sys 1143777767 69833
 386/bin/aux/usage - 775 sys sys 1143777768 59904
-386/bin/aux/vga - 775 sys sys 1143777769 334185
+386/bin/aux/vga - 775 sys sys 1143950134 334335
 386/bin/aux/vmmousepoll - 775 sys sys 1032480572 41434
 386/bin/aux/vmware - 775 sys sys 1049428256 453
 386/bin/aux/vmwarefs - 775 sys sys 1095563640 99117
@@ -784,16 +784,16 @@ adm/timezone/ROC - 664 adm adm 1020313577 20
 adm/timezone/ROK - 664 adm adm 1020313577 64
 adm/timezone/Singapore - 664 adm adm 1020313577 20
 adm/timezone/Turkey - 664 adm adm 1020313577 1164
-adm/timezone/US_Alaska - 664 adm adm 1020313577 1518
+adm/timezone/US_Alaska - 664 adm adm 1143927130 1518
 adm/timezone/US_Arizona - 664 adm adm 1020313577 22
-adm/timezone/US_Central - 664 adm adm 1020313577 1518
-adm/timezone/US_East-Indiana - 664 adm adm 1143844688 726
-adm/timezone/US_Eastern - 664 adm adm 1020313577 1518
+adm/timezone/US_Central - 664 adm adm 1143927129 1518
+adm/timezone/US_East-Indiana - 664 adm adm 1143927129 726
+adm/timezone/US_Eastern - 664 adm adm 1143927130 1518
 adm/timezone/US_Hawaii - 664 adm adm 1020313577 22
-adm/timezone/US_Michigan - 664 adm adm 1020313577 1452
-adm/timezone/US_Mountain - 664 adm adm 1020313577 1518
-adm/timezone/US_Pacific - 664 adm adm 1020313578 1518
-adm/timezone/US_Yukon - 664 adm adm 1020313578 1518
+adm/timezone/US_Michigan - 664 adm adm 1143927131 1518
+adm/timezone/US_Mountain - 664 adm adm 1143927130 1518
+adm/timezone/US_Pacific - 664 adm adm 1143927129 1518
+adm/timezone/US_Yukon - 664 adm adm 1143927130 1518
 adm/timezone/W-SU - 664 adm adm 1020313578 1164
 adm/timezone/WET - 664 adm adm 1020313578 1159
 adm/timezone/local - 664 adm adm 1020313578 1518
@@ -5213,7 +5213,7 @@ lib/tftpd - 20000000775 sys sys 944944178 0
 lib/unicode - 664 sys sys 958440028 223312
 lib/unicode.notice - 664 sys sys 958504386 1398
 lib/units - 664 sys sys 1071415518 9997
-lib/vgadb - 664 sys sys 1142693929 29319
+lib/vgadb - 664 sys sys 1143927653 29342
 lib/volcanoes - 664 sys sys 944944024 119831
 lib/words - 664 sys sys 1014923442 247097
 lp - 20000000775 sys sys 958199268 0
@@ -5408,7 +5408,7 @@ rc/bin/ape/false - 775 sys sys 945617285 17
 rc/bin/ape/grep - 775 sys sys 1023738308 60
 rc/bin/ape/install - 775 sys sys 1015089725 572
 rc/bin/ape/ld - 775 sys sys 1107957880 98
-rc/bin/ape/ls - 775 sys sys 1139841321 1018
+rc/bin/ape/ls - 775 sys sys 1143927118 1032
 rc/bin/ape/printf - 664 sys sys 1139841311 60
 rc/bin/ape/psh - 775 sys sys 1040481105 240
 rc/bin/ape/ranlib - 775 sys sys 1099176402 18
@@ -8045,7 +8045,7 @@ sys/src/9/pc/vgahiqvideo.c - 664 sys sys 1131290601 4098
 sys/src/9/pc/vgai81x.c - 664 sys sys 1135487942 4421
 sys/src/9/pc/vgamach64xx.c - 664 sys sys 1131290601 28257
 sys/src/9/pc/vgamga2164w.c - 664 sys sys 1132331257 4769
-sys/src/9/pc/vgamga4xx.c - 664 sys sys 1143648125 9489
+sys/src/9/pc/vgamga4xx.c - 664 sys sys 1143927896 9573
 sys/src/9/pc/vganeomagic.c - 664 sys sys 1131422294 10255
 sys/src/9/pc/vganvidia.c - 664 sys sys 1137689150 12395
 sys/src/9/pc/vgargb524.c - 664 sys sys 1131290602 4251
@@ -9708,7 +9708,7 @@ sys/src/cmd/aux/vga/mach64.c - 664 sys sys 1014925009 8279
 sys/src/cmd/aux/vga/mach64xx.c - 664 sys sys 1097900455 30266
 sys/src/cmd/aux/vga/main.c - 664 sys sys 1131741978 9725
 sys/src/cmd/aux/vga/mga2164w.c - 664 sys sys 1135487945 13173
-sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1135487948 35804
+sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1143927895 36098
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
@@ -12774,7 +12774,7 @@ sys/src/cmd/postscript/common/path.h - 664 sys sys 944961053 1369
 sys/src/cmd/postscript/common/request.c - 664 sys sys 944961053 3707
 sys/src/cmd/postscript/common/request.h - 664 sys sys 944961053 794
 sys/src/cmd/postscript/common/rune.c - 664 sys sys 944961053 2137
-sys/src/cmd/postscript/common/rune.h - 664 sys sys 944961053 374
+sys/src/cmd/postscript/common/rune.h - 664 sys sys 1143918283 376
 sys/src/cmd/postscript/common/tempnam.c - 664 sys sys 944961054 554
 sys/src/cmd/postscript/config - 664 sys sys 953348309 176
 sys/src/cmd/postscript/cropmarks - 20000000775 sys sys 944961054 0
@@ -13956,14 +13956,15 @@ sys/src/cmd/upas/filterkit/pipeto.sample-hold - 664 sys sys 1019837081 872
 sys/src/cmd/upas/filterkit/readaddrs.c - 664 sys sys 1143759341 1331
 sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1018549521 1312
 sys/src/cmd/upas/fs - 20000000775 sys sys 988250018 0
-sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143845990 4272
-sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143845990 27463
+sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143929916 4189
+sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143946869 26924
 sys/src/cmd/upas/fs/imap4.c - 664 sys sys 1133147970 16258
-sys/src/cmd/upas/fs/mbox.c - 664 sys sys 1143845990 29022
+sys/src/cmd/upas/fs/mbox.c - 664 sys sys 1143929917 26636
 sys/src/cmd/upas/fs/mkfile - 664 sys sys 1047490336 321
 sys/src/cmd/upas/fs/plan9.c - 664 sys sys 1071334861 7465
 sys/src/cmd/upas/fs/pop3.c - 664 sys sys 1133988332 13024
 sys/src/cmd/upas/fs/readdir.c - 664 sys sys 944961331 203
+sys/src/cmd/upas/fs/rfc2047-test - 664 sys sys 1143946985 1146
 sys/src/cmd/upas/fs/strtotm.c - 664 sys sys 1041137528 1904
 sys/src/cmd/upas/fs/tester.c - 664 sys sys 985037420 1418
 sys/src/cmd/upas/marshal - 20000000775 sys sys 1015009721 0

+ 21 - 0
dist/replica/plan9.log

@@ -29211,3 +29211,24 @@
 1143864032 0 c 386/bin/upas/fs - 775 sys sys 1143863649 334451
 1143864032 1 c 386/bin/upas/marshal - 775 sys sys 1143863649 134381
 1143864032 2 c 386/lib/libmach.a - 664 sys sys 1143863651 782098
+1143919848 0 c sys/src/cmd/postscript/common/rune.h - 664 sys sys 1143918283 376
+1143928853 0 c adm/timezone/US_Alaska - 664 adm adm 1143927130 1518
+1143928853 1 c adm/timezone/US_Central - 664 adm adm 1143927129 1518
+1143928853 2 c adm/timezone/US_East-Indiana - 664 adm adm 1143927129 726
+1143928853 3 c adm/timezone/US_Eastern - 664 adm adm 1143927130 1518
+1143928853 4 c adm/timezone/US_Michigan - 664 adm adm 1143927131 1518
+1143928853 5 c adm/timezone/US_Mountain - 664 adm adm 1143927130 1518
+1143928853 6 c adm/timezone/US_Pacific - 664 adm adm 1143927129 1518
+1143928853 7 c adm/timezone/US_Yukon - 664 adm adm 1143927130 1518
+1143928853 8 c lib/vgadb - 664 sys sys 1143927653 29342
+1143928853 9 c rc/bin/ape/ls - 775 sys sys 1143927118 1032
+1143928853 10 c sys/src/9/pc/vgamga4xx.c - 664 sys sys 1143927896 9573
+1143928853 11 c sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1143927895 36098
+1143930653 0 c sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143929916 4189
+1143930653 1 c sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143929917 26776
+1143930653 2 c sys/src/cmd/upas/fs/mbox.c - 664 sys sys 1143929917 26636
+1143932454 0 c 386/9loaddebug - 775 sys sys 1143931720 312489
+1143932454 1 c 386/9loadlitedebug - 775 sys sys 1143931720 200137
+1143946859 0 c sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143946869 26924
+1143948659 0 a sys/src/cmd/upas/fs/rfc2047-test - 664 sys sys 1143946985 1146
+1143950460 0 c 386/bin/aux/vga - 775 sys sys 1143950134 334335

+ 3 - 3
lib/vgadb

@@ -380,9 +380,9 @@ ctlr
 	hwgc=vmwarehwgc
 
 ctlr
-	0xC002D="MATROX/Matrox G400"
-	0xC002D="MATROX/Matrox G450"
-	0xC002D="MATROX/MGA-G200 VGA"
+	vid=0x102B did=0x0521		# Matrox G200
+	vid=0x102B did=0x0525		# Matrox G450
+	vid=0x102B did=0x2527		# Matrox G550
 	link=vga
 	ctlr=mga4xx linear=1
 	hwgc=mga4xxhwgc

+ 1 - 1
rc/bin/ape/ls

@@ -33,7 +33,7 @@ if(! ifs=() eval `{aux/getflags $*}){
 
 fn fixlong {
 	echo total 1000
-	sed 's/^(.).(.........) . [0-9]+ /\1\2 1 /'
+	/$cputype/bin/sed 's/^(.).(.........) . [0-9]+ /\1\2 1 /'
 }
 
 post=cat

+ 7 - 4
sys/src/9/pc/vgamga4xx.c

@@ -20,6 +20,7 @@
 
 enum {
 	MATROX			= 0x102B,
+	MGA550			= 0x2527,
 	MGA4xx			= 0x0525,
 	MGA200			= 0x0521,
 
@@ -77,6 +78,8 @@ mgapcimatch(void)
 	Pcidev *p;
 	
 	p = pcimatch(nil, MATROX, MGA4xx);
+	if(p == nil)
+		p = pcimatch(nil, MATROX, MGA550);
 	if(p == nil)
 		p = pcimatch(nil, MATROX, MGA200);
 	return p;
@@ -132,7 +135,7 @@ mga4xxenable(VGAscr* scr)
 	addvgaseg("mga4xxmmio", pci->mem[1].bar&~0x0F, pci->mem[1].size);
 
 	/* need to map frame buffer here too, so vga can find memory size */
-	if(pci->did == MGA4xx)
+	if(pci->did == MGA4xx || pci->did == MGA550)
 		size = 32*MB;
 	else
 		size = 8*MB;
@@ -464,9 +467,9 @@ mga4xxdrawinit(VGAscr *scr)
 	uchar *mga;
  	Pcidev *p;
 
-	p = pcimatch(nil, MATROX, MGA4xx);
-	if(p == nil)
-		return ;
+	p = mgapcimatch();
+	if(p->did == MGA200)
+		return;
 
 	if(scr->mmio == 0)
 		return;

+ 21 - 13
sys/src/cmd/aux/vga/mga4xx.c

@@ -8,6 +8,7 @@
 				  Big Endian format ! (+ Fix for the palette init. )
 	- 2001-09-06 : Added Full 2D Accel ! (see drivers in /sys/src/9/pc)
 	- 2001-10-01 : Rid Fix.
+	- 2006-04-01 : Add MGA550 support.
 
      Greets and Acknowledgements go to :
      	- Sylvain Chipaux <a.k.a. asle>.
@@ -34,7 +35,8 @@ enum {
 	Meg			= 1024*1024,
 	
 	MATROX			= 0x102B,	/* pci chip manufacturer */
-	MGA4XX			= 0x0525,	/* pci chip device ids */
+	MGA550			= 0x2527, /* pci chip device ids */
+	MGA4XX			= 0x0525,
 	MGA200			= 0x0521,
 
 	/* Pci configuration space mapping */
@@ -513,16 +515,21 @@ snarf(Vga* vga, Ctlr* ctlr)
 	trace("%s->snarf\n", ctlr->name);
 	if(vga->private == nil) {
 		pci = pcimatch(nil, MATROX, MGA4XX);
-		if(pci == nil) {
+		if(pci == nil)
+			pci = pcimatch(nil, MATROX, MGA550);
+		if(pci == nil)
 			pci = pcimatch(nil, MATROX, MGA200);
-			if(pci == nil) {
-				error("%s: no Pcidev with Vid=0x102B, Did=0x052[51]\n", ctlr->name);
-			}
-		}
+		if(pci == nil)
+			error("%s: cannot find matrox adapter\n", ctlr->name);
 
 		rid = pcicfgr8(pci, PciRID); // PciRID = 0x08
 
-		trace("%s: G%d%d0 rev %d\n", ctlr->name, pci->did==0x0521?2:4, rid&0x80?5:0, rid&(~0x80));
+		trace("%s: G%d%d0 rev %d\n", ctlr->name, 
+			2*(pci->did==MGA200)
+			+4*(pci->did==MGA4XX)
+			+5*(pci->did==MGA550),
+			rid&0x80 ? 5 : 0,
+			rid&~0x80);
 		i = pcicfgr32(pci, PCfgMgaDevCtrl);
 		if ((i & 2) != 2)
 			error("%s: Memory Space not enabled ... Aborting ...\n", ctlr->name);	
@@ -982,7 +989,7 @@ g400_calcclock(Mga* mga, long Fneeded)
 	double 	Ferr, Fcalc;
 	int		m, n, p;
 	
-	if (mga->devid == 0x0525) {
+	if (mga->devid == MGA4XX || mga->devid == MGA550) {
 		/* These values are taken from Matrox G400 Specification - p 4-91 */
 		Fref     		= 27000000.0;
 		pixpll_n_min 	= 7;
@@ -990,7 +997,7 @@ g400_calcclock(Mga* mga, long Fneeded)
 		pixpll_m_min	= 1;
 		pixpll_m_max	= 31;
 		pixpll_p_max 	= 7;
-	} else { 				/* 0x0521 */
+	} else { 				/* MGA200 */
 		/* These values are taken from Matrox G200 Specification - p 4-77 */
 		//Fref     		= 14318180.0;
 		Fref     		= 27050500.0;
@@ -1024,7 +1031,7 @@ g400_calcclock(Mga* mga, long Fneeded)
 	
 	Fvco = Fref * (mga->pixpll_n + 1) / (mga->pixpll_m + 1);
 
-	if (mga->devid == 0x0525) {
+	if (mga->devid == MGA4XX || mga->devid == MGA550) {
 		if ( (50000000.0 <= Fvco) && (Fvco < 110000000.0) )
 			mga->pixpll_p |= 0;	
 		if ( (110000000.0 <= Fvco) && (Fvco < 170000000.0) )
@@ -1089,7 +1096,7 @@ init(Vga* vga, Ctlr* ctlr)
 	trace("%s: Interlace = %d\n", 			ctlr->name, mode->interlace);
 
 	/* TODO : G400 Max : 360000000 */
-	if (mga->devid == 0x0525)
+	if (mga->devid == MGA4XX || mga->devid == MGA550)
 		mga->maxpclk	= 300000000;
 	else
 		mga->maxpclk	= 250000000;
@@ -1103,7 +1110,7 @@ init(Vga* vga, Ctlr* ctlr)
 			mode->frequency, mga->maxpclk);
 	
 	trace("mga: revision ID is %x\n", mga->revid);
-	if ((mga->revid == 0x0521) || ((mga->revid & 0x80) == 0x00)) { 
+	if ((mga->devid == MGA200) || ((mga->devid == MGA4XX) && (mga->revid & 0x80) == 0x00)) {
 		/* Is it G200/G400 or G450 ? */
 		Fpll = g400_calcclock(mga, mode->frequency);
 		trace("Fpll set to %f\n", Fpll);
@@ -1483,7 +1490,7 @@ load(Vga* vga, Ctlr* ctlr)
 	for (i = 0; i < 50; i++)
 		mgaread32(mga, MGA_STATUS);
 
-	if ((mga->devid == 0x0521) || ((mga->revid & 0x80) == 0x00))	{ 
+	if ((mga->devid == MGA200) || ((mga->devid == MGA4XX) && (mga->revid & 0x80) == 0x00)) { 
 		dacset(mga, Dac_Xpixpllcm, mga->pixpll_m, 0xff);
 		dacset(mga, Dac_Xpixpllcn, mga->pixpll_n, 0xff);
 		dacset(mga, Dac_Xpixpllcp, mga->pixpll_p, 0xff);
@@ -1494,6 +1501,7 @@ load(Vga* vga, Ctlr* ctlr)
 			;
 		trace("mga: pixpll locked !\n");
 	} else {
+	/* MGA450 and MGA550 */
 		/* Wait until new clock becomes stable */
 		trace("mga450: waiting for the clock source becomes stable ...\n");
 		while ((dacget(mga, Dac_Xpixpllstat) & Pixlock) != Pixlock)

+ 1 - 1
sys/src/cmd/postscript/common/rune.h

@@ -14,6 +14,6 @@ enum
 	UTFmax		= 3,		/* maximum bytes per rune */
 	Runesync	= 0x80,		/* cannot represent part of a utf sequence (<) */
 	Runeself	= 0x80,		/* rune and utf sequences are the same (<) */
-	Runeerror	= 0x80,		/* decoding error in utf */
+	Runeerror	= 0xFFFD,		/* decoding error in utf */
 };
 #endif

+ 0 - 2
sys/src/cmd/upas/fs/dat.h

@@ -132,8 +132,6 @@ void		convert(Message*);
 void		decode(Message*);
 int		cistrncmp(char*, char*, int);
 int		cistrcmp(char*, char*);
-int		latin1toutf(char*, char*, char*);
-int		windows1257toutf(char*, char*, char*);
 int		decquoted(char*, char*, char*, int);
 int		xtoutf(char*, char**, char*, char*);
 void		countlines(Message*);

+ 30 - 62
sys/src/cmd/upas/fs/fs.c

@@ -2,6 +2,7 @@
 #include <auth.h>
 #include <fcall.h>
 #include <libsec.h>
+#include <ctype.h>
 #include "dat.h"
 
 enum
@@ -139,7 +140,7 @@ int	logging;
 void
 usage(void)
 {
-	fprint(2, "usage: %s [-b -m mountpoint]\n", argv0);
+	fprint(2, "usage: upas/fs [-bdlnps] [-f mboxfile] [-m mountpoint]\n");
 	exits("usage");
 }
 
@@ -176,10 +177,10 @@ main(int argc, char *argv[])
 		break;
 	case 'f':
 		fflag = 1;
-		mboxfile = ARGF();
+		mboxfile = EARGF(usage());
 		break;
 	case 'm':
-		mntpt = ARGF();
+		mntpt = EARGF(usage());
 		break;
 	case 'd':
 		debug = 1;
@@ -200,6 +201,8 @@ main(int argc, char *argv[])
 		usage();
 	}ARGEND
 
+	if(argc)
+		usage();
 	if(pipe(p) < 0)
 		error("pipe failed");
 	mfd[0] = p[0];
@@ -1349,32 +1352,12 @@ hdrlen(char *p, char *e)
 	return ep - p;
 }
 
-// rfc2047 non-ascii
-typedef struct Charset Charset;
-struct Charset {
-	char *name;
-	int len;
-	int convert;
-	char *tcsname;
-} charsets[] =
-{
-	{ "us-ascii",		8,	1, nil, },
-	{ "utf-8",		5,	0, nil, },
-	{ "iso-8859-1",		10,	1, nil, },
-	{ "iso-8859-2",		10,	2, "8859-2", },
-	{ "big5",		4,	2, "big5", },
-	{ "iso-2022-jp",	11, 2, "jis", },
-	{ "windows-1251",	12,	2, "cp1251"},
-	{ "koi8-r",		6,	2, "koi8"},
-};
-
+// rfc2047 non-ascii: =?charset?q?encoded-text?=
 int
 rfc2047convert(String *s, char *token, int len)
 {
-	char decoded[1024];
-	char utfbuf[2*1024];
-	int i;
-	char *e, *x;
+	char charset[100], decoded[1024], *e, *x;
+	int l;
 
 	if(len == 0)
 		return -1;
@@ -1382,15 +1365,13 @@ rfc2047convert(String *s, char *token, int len)
 	e = token+len-2;
 	token += 2;
 
-	// bail if we don't understand the character set
-	for(i = 0; i < nelem(charsets); i++)
-		if(cistrncmp(charsets[i].name, token, charsets[i].len) == 0)
-		if(token[charsets[i].len] == '?'){
-			token += charsets[i].len + 1;
-			break;
-		}
-	if(i >= nelem(charsets))
+	x = memchr(token, '?', e-token);
+	if(x == nil || (l=x-token) >= sizeof charset)
 		return -1;
+	memmove(charset, token, l);
+	charset[l] = 0;
+
+	token = x+1;
 
 	// bail if it doesn't fit 
 	if(e-token > sizeof(decoded)-1)
@@ -1410,24 +1391,12 @@ rfc2047convert(String *s, char *token, int len)
 	} else
 		return -1;
 
-	switch(charsets[i].convert){
-	case 0:
+	if(xtoutf(charset, &x, decoded, decoded+len) <= 0)
 		s_append(s, decoded);
-		break;
-	case 1:
-		latin1toutf(utfbuf, decoded, decoded+len);
-		s_append(s, utfbuf);
-		break;
-	case 2:
-		if(xtoutf(charsets[i].tcsname, &x, decoded, decoded+len) <= 0){
-			s_append(s, decoded);
-		} else {
-			s_append(s, x);
-			free(x);
-		}
-		break;
+	else {
+		s_append(s, x);
+		free(x);
 	}
-
 	return 0;
 }
 
@@ -1466,21 +1435,20 @@ rfc2047start(char *start, char *end)
 String*
 stringconvert(String *s, char *uneaten, int len)
 {
-	char *token;
-	char *p;
-	int i;
+	char *token, *p, *e;
 
 	s = s_reset(s);
 	p = uneaten;
-	for(i = 0; i < len; i++){
-		if(*p++ == '='){
-			token = rfc2047start(uneaten, p);
-			if(token != nil){
-				s_nappend(s, uneaten, token-uneaten);
-				if(rfc2047convert(s, token, p - token) < 0)
-					s_nappend(s, token, p - token);
-				uneaten = p;
-			}
+	for(e = p+len; p < e; ){
+		while(*p++ == '=' && (token = rfc2047start(uneaten, p))){
+			s_nappend(s, uneaten, token-uneaten);
+			if(rfc2047convert(s, token, p - token) < 0)
+				s_nappend(s, token, p - token);
+			uneaten = p;
+			for(; p<e && isspace(*p);)
+				p++;
+			if(p+2 < e && p[0] == '=' && p[1] == '?')
+				uneaten = p;	// paste
 		}
 	}
 	if(p > uneaten)

+ 52 - 164
sys/src/cmd/upas/fs/mbox.c

@@ -1070,112 +1070,17 @@ convert(Message *m)
 	if(cistrncmp(s_to_c(m->type), "text", 4) != 0)
 		return;
 
-	if(cistrcmp(s_to_c(m->charset), "us-ascii") == 0 ||
-	   cistrcmp(s_to_c(m->charset), "iso-8859-1") == 0){
-		len = is8bit(m);
-		if(len > 0){
-			len = 2*len + m->bend - m->body + 1;
-			x = emalloc(len);
-			len = latin1toutf(x, m->body, m->bend);
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "iso-8859-2") == 0){
-		len = xtoutf("8859-2", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "iso-8859-15") == 0){
-		len = xtoutf("8859-15", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "big5") == 0){
-		len = xtoutf("big5", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "iso-2022-jp") == 0){
-		len = xtoutf("jis", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "windows-1257") == 0
-			|| cistrcmp(s_to_c(m->charset), "windows-1252") == 0){
-		len = is8bit(m);
-		if(len > 0){
-			len = 2*len + m->bend - m->body + 1;
-			x = emalloc(len);
-			len = windows1257toutf(x, m->body, m->bend);
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "windows-1251") == 0){
-		len = xtoutf("cp1251", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
-	} else if(cistrcmp(s_to_c(m->charset), "koi8-r") == 0){
-		len = xtoutf("koi8", &x, m->body, m->bend);
-		if(len != 0){
-			if(m->ballocd)
-				free(m->body);
-			m->body = x;
-			m->bend = x + len;
-			m->ballocd = 1;
-		}
+	len = xtoutf(s_to_c(m->charset), &x, m->body, m->bend);
+	if(len > 0){
+		if(m->ballocd)
+			free(m->body);
+		m->body = x;
+		m->bend = x + len;
+		m->ballocd = 1;
 	}
-
 	m->converted = 1;
 }
 
-enum
-{
-	Self=	1,
-	Hex=	2,
-};
-uchar	tableqp[256];
-
-static void
-initquoted(void)
-{
-	int c;
-
-	memset(tableqp, 0, 256);
-	for(c = ' '; c <= '<'; c++)
-		tableqp[c] = Self;
-	for(c = '>'; c <= '~'; c++)
-		tableqp[c] = Self;
-	tableqp['\t'] = Self;
-	tableqp['='] = Hex;
-}
-
 static int
 hex2int(int x)
 {
@@ -1188,6 +1093,8 @@ hex2int(int x)
 	return 0;
 }
 
+// underscores are translated in 2047 headers (uscores=1) 
+// but not in the body (uscores=0)
 static char*
 decquotedline(char *out, char *in, char *e, int uscores)
 {
@@ -1206,13 +1113,16 @@ decquotedline(char *out, char *in, char *e, int uscores)
 
 	while(in <= e){
 		c = (*in++) & 0xff;
-		switch(tableqp[c]){
-		case Self:
-			if(uscores && c == '_')
-				c = ' ';
+		switch(c){
+		case '_':
+			if(uscores){
+				*out++ = ' ';
+				break;
+			}
+		default:
 			*out++ = c;
 			break;
-		case Hex:
+		case '=':
 			c = hex2int(*in++)<<4;
 			c |= hex2int(*in++);
 			*out++ = c;
@@ -1231,9 +1141,6 @@ decquoted(char *out, char *in, char *e, int uscores)
 {
 	char *p, *nl;
 
-	if(tableqp[' '] == 0)
-		initquoted();
-
 	p = out;
 	while((nl = strchr(in, '\n')) != nil && nl < e){
 		p = decquotedline(p, in, nl, uscores);
@@ -1263,38 +1170,35 @@ lowercase(char *p)
 	return op;
 }
 
-/*
- *  return number of 8 bit characters
- */
+// translate latin1 directly since it fits neatly in utf
 static int
-is8bit(Message *m)
+latin1toutf(char **out, char *in, char *e)
 {
-	int count = 0;
+	int n;
 	char *p;
+	Rune r;
 
-	for(p = m->body; p < m->bend; p++)
+	n = 0;
+	for(p = in; p < e; p++)
 		if(*p & 0x80)
-			count++;
-	return count;
-}
+			n++;
+	if(n == 0)
+		return 0;
 
-// translate latin1 directly since it fits neatly in utf
-int
-latin1toutf(char *out, char *in, char *e)
-{
-	Rune r;
-	char *p;
+	n += e-in;
+	*out = p = malloc(n+1);
+	if(p == nil)
+		return 0;
 
-	p = out;
 	for(; in < e; in++){
-		r = (*in) & 0xff;
+		r = (uchar)*in;
 		p += runetochar(p, &r);
 	}
 	*p = 0;
-	return p - out;
+	return p - *out;
 }
 
-// translate any thing else using the tcs program
+// translate any thing using the tcs program
 int
 xtoutf(char *charset, char **out, char *in, char *e)
 {
@@ -1304,6 +1208,12 @@ xtoutf(char *charset, char **out, char *in, char *e)
 	int n, len, sofar;
 	char *p;
 
+	// might not need to convert
+	if(cistrcmp(charset, "us-ascii") == 0 || cistrcmp(charset, "utf-8") == 0)
+		return 0;
+	if(cistrcmp(charset, "iso-8859-1") == 0)
+		return latin1toutf(out, in, e);
+
 	len = e-in+1;
 	sofar = 0;
 	*out = p = malloc(len+1);
@@ -1315,16 +1225,16 @@ xtoutf(char *charset, char **out, char *in, char *e)
 	av[2] = charset;
 	av[3] = 0;
 	if(pipe(totcs) < 0)
-		return 0;
+		goto error;
 	if(pipe(fromtcs) < 0){
 		close(totcs[0]); close(totcs[1]);
-		return 0;
+		goto error;
 	}
 	switch(rfork(RFPROC|RFFDG|RFNOWAIT)){
 	case -1:
 		close(fromtcs[0]); close(fromtcs[1]);
 		close(totcs[0]); close(totcs[1]);
-		return 0;
+		goto error;
 	case 0:
 		close(fromtcs[0]); close(totcs[1]);
 		dup(fromtcs[1], 1);
@@ -1338,7 +1248,7 @@ xtoutf(char *charset, char **out, char *in, char *e)
 		switch(rfork(RFPROC|RFFDG|RFNOWAIT)){
 		case -1:
 			close(fromtcs[0]); close(totcs[1]);
-			return 0;
+			goto error;
 		case 0:
 			close(fromtcs[0]);
 			while(in < e){
@@ -1359,9 +1269,10 @@ xtoutf(char *charset, char **out, char *in, char *e)
 				p[sofar] = 0;
 				if(sofar == len){
 					len += 1024;
-					*out = p = realloc(p, len+1);
+					p = realloc(p, len+1);
 					if(p == nil)
-						return 0;
+						goto error;
+					*out = p;
 				}
 			}
 			close(fromtcs[0]);
@@ -1369,37 +1280,14 @@ xtoutf(char *charset, char **out, char *in, char *e)
 		}
 		break;
 	}
+	if(sofar == 0)
+		goto error;
 	return sofar;
-}
-
-enum {
-	Winstart= 0x7f,
-	Winend= 0x9f,
-};
-
-Rune winchars[] = {
-	L'•',
-	L'•', L'•', L'‚', L'ƒ', L'„', L'…', L'†', L'‡',
-	L'ˆ', L'‰', L'Š', L'‹', L'Œ', L'•', L'•', L'•',
-	L'•', L'‘', L'’', L'“', L'”', L'•', L'–', L'—',
-	L'˜', L'™', L'š', L'›', L'œ', L'•', L'•', L'Ÿ',
-};
 
-int
-windows1257toutf(char *out, char *in, char *e)
-{
-	Rune r;
-	char *p;
-
-	p = out;
-	for(; in < e; in++){
-		r = (*in) & 0xff;
-		if(r >= 0x7f && r <= 0x9f)
-			r = winchars[r-0x7f];
-		p += runetochar(p, &r);
-	}
-	*p = 0;
-	return p - out;
+error:
+	free(*out);
+	*out = nil;
+	return 0;
 }
 
 void *

+ 28 - 0
sys/src/cmd/upas/fs/rfc2047-test

@@ -0,0 +1,28 @@
+From moore@cs.utk.edu Tue Mar 28 21:58:10 CST 2006
+From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>
+To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>
+CC: =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>
+Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
+    =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=
+
+From moore@cs.utk.edu Tue Mar 28 21:58:10 CST 2006
+From: =?ISO-8859-1?Q?Olle_J=E4rnefors?= <ojarnef@admin.kth.se>
+To: ietf-822@dimacs.rutgers.edu, ojarnef@admin.kth.se
+Subject: Time for ISO 10646?
+
+From moore@cs.utk.edu Tue Mar 28 21:58:10 CST 2006
+To: Dave Crocker <dcrocker@mordor.stanford.edu>
+Cc: ietf-822@dimacs.rutgers.edu, paf@comsol.se
+From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@nada.kth.se>
+Subject: Re: RFC-HDR care and feeding
+
+From moore@cs.utk.edu Tue Mar 28 21:58:10 CST 2006
+From: Nathaniel Borenstein <nsb@thumper.bellcore.com>
+	(=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)
+To: Greg Vaudreuil <gvaudre@NRI.Reston.VA.US>, Ned Freed
+      <ned@innosoft.com>, Keith Moore <moore@cs.utk.edu>
+Subject: Test of new header generator
+MIME-Version: 1.0
+Content-type: text/plain; charset=ISO-8859-1
+
+