correcting unicode superscripts for 1 2 and 3

front
cinap_lenrek 2012-02-23 16:58:53 +01:00
parent e482b39f8d
commit f2b6ec3140
14 changed files with 76 additions and 142 deletions

View File

@ -15,14 +15,14 @@
00AF __ ¯ spacing macron
00B0 de ° degree sign
00B1 +- ± plus-or-minus sign
00B2 S2 ² superscript digit two
00B3 S3 ³ superscript digit three
00B2 s2 ² superscript digit two
00B3 s3 ³ superscript digit three
00B4 '' ´ spacing acute
00B5 mi µ micro sign
00B6 pg ¶ paragraph sign
00B7 .. · middle dot
00B8 ,, ¸ spacing cedilla
00B9 S1 ¹ superscript digit one
00B9 s1 ¹ superscript digit one
00BA so º masculine ordinal indicator
00BB >> » right pointing guillemet
00BC 14 ¼ fraction one quarter
@ -397,9 +397,6 @@
2026 3. … horizontal ellipsis
203D !? ?! ‽ interrobang
2070 s0 ⁰ superscript digit zero
2071 s1 ⁱ superscript digit one
2072 s2 ⁲ superscript digit two
2073 s3 ⁳ superscript digit three
2074 s4 ⁴ superscript digit four
2075 s5 ⁵ superscript digit five
2076 s6 ⁶ superscript digit six

View File

@ -1,6 +1,6 @@
/*
* kirkwood two-wire serial interface (TWSI) and
* inter-integrated circuit (IC) driver
* inter-integrated circuit (I²C) driver
*/
#include "u.h"
#include "../port/lib.h"
@ -222,7 +222,7 @@ twsishutdown(void)
static Chan*
twsiattach(char *param)
{
return devattach(L'', param);
return devattach(L'²', param);
}
static Walkqid*
@ -284,7 +284,7 @@ twsiwrite(Chan *c, void *v, long n, vlong off)
}
Dev twsidevtab = {
L'',
L'²',
"twsi",
devreset,

View File

@ -390,7 +390,7 @@ irq(Ureg* ureg)
switch (irqno) {
case 56:
case 57:
iprint(" (IC)");
iprint(" (I²C)");
break;
case 83:
case 86:

View File

@ -447,10 +447,10 @@ etherprobe(int cardno, int ctlrno)
mb /= 10;
if (lg > 0)
lg--;
if (lg > 14) /* 2^(14+17) = 2⁳ⁱ */
if (lg > 14) /* 2^(14+17) = 2³¹ */
lg = 14;
/* allocate larger output queues for higher-speed interfaces */
bsz = 1UL << (lg + 17); /* 2⁷ = 128K, bsz = 2ⁿ × 128K */
bsz = 1UL << (lg + 17); /* 2¹⁷ = 128K, bsz = 2ⁿ × 128K */
while (bsz > mainmem->maxsize / 8 && bsz > 128*1024)
bsz /= 2;

View File

@ -1,100 +0,0 @@
" ", " i", L"␣ı",
"!~", "-=~", L"≄≇≉",
"!", "!<=>?bmp", L"¡≮≠≯‽⊄∉⊅",
"\"*", "IUiu", L"ΪΫϊϋ",
"\"", "\"AEIOUYaeiouy", L"¨ÄËÏÖÜŸäëïöüÿ",
"$*", "fhk", L"ϕϑϰ",
"$", "BEFHILMRVaefglopv", L"ℬℰℱℋℐℒℳℛƲɑℯƒℊℓℴ℘ʋ",
"\'\"", "Uu", L"Ǘǘ",
"\'", "\'ACEILNORSUYZacegilnorsuyz", L"´ÁĆÉÍĹŃÓŔŚÚÝŹáćéģíĺńóŕśúýź",
"*", "*ABCDEFGHIKLMNOPQRSTUWXYZabcdefghiklmnopqrstuwxyz", L"∗ΑΒΞΔΕΦΓΘΙΚΛΜΝΟΠΨΡΣΤΥΩΧΗΖαβξδεφγθικλμνοπψρστυωχηζ",
"+", "-O", L"±⊕",
",", ",ACEGIKLNORSTUacegiklnorstu", L"¸ĄÇĘĢĮĶĻŅǪŖŞŢŲąçęģįķļņǫŗşţų",
"-*", "l", L"ƛ",
"-", "+-2:>DGHILOTZbdghiltuz~", L"∓­ƻ÷→ÐǤĦƗŁ⊖ŦƵƀðǥℏɨłŧʉƶ≂",
".", ".CEGILOZceglz", L"·ĊĖĠİĿ⊙Żċėġŀż",
"/", "Oo", L"Øø",
"1", ".234568", L"․½⅓¼⅕⅙⅛",
"2", "-.35", L"ƻ‥⅔⅖",
"3", ".458", L"…¾⅗⅜",
"4", "5", L"",
"5", "68", L"⅚⅝",
"7", "8", L"",
":", "()-=", L"☹☺÷≔",
"<!", "=~", L"≨⋦",
"<", "-<=>~", L"←«≤≶≲",
"=", ":<=>OV", L"≕⋜≡⋝⊜⇒",
">!", "=~", L"≩⋧",
">", "<=>~", L"≷≥»≳",
"?", "!?", L"‽¿",
"@\'", "\'", L"ъ",
"@@", "\'EKSTYZekstyz", L"ьЕКСТЫЗекстыз",
"@C", "Hh", L"ЧЧ",
"@E", "Hh", L"ЭЭ",
"@K", "Hh", L"ХХ",
"@S", "CHch", L"ЩШЩШ",
"@T", "Ss", L"ЦЦ",
"@Y", "AEOUaeou", L"ЯЕЁЮЯЕЁЮ",
"@Z", "Hh", L"ЖЖ",
"@c", "h", L"ч",
"@e", "h", L"э",
"@k", "h", L"х",
"@s", "ch", L"щш",
"@t", "s", L"ц",
"@y", "aeou", L"яеёю",
"@z", "h", L"ж",
"@", "ABDFGIJLMNOPRUVXabdfgijlmnopruvx", L"АБДФГИЙЛМНОПРУВХабдфгийлмнопрувх",
"A", "E", L"Æ",
"C", "ACU", L"⋂ℂ⋃",
"Dv", "Zz", L"DŽDž",
"D", "-e", L"Ð∆",
"G", "-", L"Ǥ",
"H", "-H", L"Ħℍ",
"I", "-J", L"ƗIJ",
"L", "&-Jj|", L"⋀ŁLJLj⋁",
"M", "#48bs", L"♮♩♪♭♯",
"N", "JNj", L"NJℕNj",
"O", "*+-./=EIcoprx", L"⊛⊕⊖⊙⊘⊜ŒƢ©⊚℗®⊗",
"P", "P", L"",
"Q", "Q", L"",
"R", "R", L"",
"S", "123S", L"¹²³§",
"T", "-u", L"Ŧ⊨",
"V", "=", L"",
"Y", "R", L"Ʀ",
"Z", "-ACSZ", L"Ƶℤ",
"^", "ACEGHIJOSUWYaceghijosuwy", L"ÂĈÊĜĤÎĴÔŜÛŴŶâĉêĝĥîĵôŝûŵŷ",
"_\"", "AUau", L"ǞǕǟǖ",
"_,", "Oo", L"Ǭǭ",
"_.", "Aa", L"Ǡǡ",
"_", "AEIOU_aeiou", L"ĀĒĪŌŪ¯āēīōū",
"`\"", "Uu", L"Ǜǜ",
"`", "AEIOUaeiou", L"ÀÈÌÒÙàèìòù",
"a", "ben", L"↔æ∠",
"b", "()+-0123456789=bknpqru", L"₍₎₊₋₀₁₂₃₄₅₆₇₈₉₌♝♚♞♟♛♜•",
"c", "$Oagu", L"¢©∩≅∪",
"dv", "z", L"dž",
"d", "-adegz", L"ð↓‡°†ʣ",
"e", "$lmns", L"€⋯—–∅",
"f", "a", L"",
"g", "$-r", L"¤ǥ∇",
"h", "-v", L"ℏƕ",
"i", "-bfjps", L"ɨ⊆∞ij⊇∫",
"l", "\"$&\'-jz|", L"“£∧‘łlj⋄∨",
"m", "iou", L"µ∈×",
"n", "jo", L"nj¬",
"o", "AOUaeiu", L"Å⊚Ůåœƣů",
"p", "Odgrt", L"℗∂¶∏∝",
"r", "\"\'O", L"”’®",
"s", "()+-0123456789=abnoprstu", L"⁽⁾⁺⁻⁰ⁱ⁲⁳⁴⁵⁶⁷⁸⁹⁼ª⊂ⁿº⊃√ß∍∑",
"t", "-efmsu", L"ŧ∃∴™ς⊢",
"u", "-AEGIOUaegiou", L"ʉĂĔĞĬŎŬ↑ĕğĭŏŭ",
"v\"", "Uu", L"Ǚǚ",
"v", "ACDEGIKLNORSTUZacdegijklnorstuz", L"ǍČĎĚǦǏǨĽŇǑŘŠŤǓŽǎčďěǧǐǰǩľňǒřšťǔž",
"w", "bknpqr", L"♗♔♘♙♕♖",
"x", "O", L"",
"y", "$", L"¥",
"z", "-", L"ƶ",
"|", "Pp|", L"Þþ¦",
"~!", "=", L"",
"~", "-=AINOUainou~", L"≃≅ÃĨÑÕŨãĩñõũ≈",

View File

@ -3,7 +3,7 @@
Geoff Collyer
July—October 2004
note: 2⁶⁳=9,223,372,036,854,775,808 or 8EB (9.2×10ⁱ⁸)
note: 2⁶³=9,223,372,036,854,775,808 or 8EB (9.2×10¹⁸)
• identified longs that refer to offsets, sizes and block numbers, and
changed them to type Off (vlong); fixed all print formats to match.
@ -39,12 +39,12 @@ handle 64-bit offsets and sizes.
• booted xtc (terminal) from fs64 (used fs64 as main file system)
note: current file server with triple-indirect blocks at 4k block size
has a maximum file size of ~505GB (5.42×10ⁱⁱ).
has a maximum file size of ~505GB (5.42×10¹¹).
with quadruple-indirect blocks, max would be ~275TB @ 4k block size.
• got igbe fs driver working (a couple small changes)
• eliminated some gotos (started with 580, down to 454)
• added quadruple indirect blocks: lets us reach 2⁶ with a 32kB block size
• added quadruple indirect blocks: lets us reach 2⁶³ with a 32kB block size
• got igbe boot driver & pxe booting working
• on-disk qid paths are now Offs, but 9p1 qids on the wire are still ulongs
• generalised & parameterised indirect block implementation

View File

@ -200,7 +200,7 @@ postservice(void)
}
/*
* compute BUFSIZE*(NDBLOCK+INDPERBUF+INDPERBUF+INDPERBUF+INDPERBUF)
* compute BUFSIZE*(NDBLOCK+INDPERBUF+INDPERBUF²+INDPERBUF³+INDPERBUF)
* while watching for overflow; in that case, return 0.
*/
@ -242,8 +242,8 @@ maxsize(void)
}
enum {
INDPERBUF = ((uvlong)INDPERBUF *INDPERBUF),
INDPERBUF = ((uvlong)INDPERBUF*INDPERBUF),
INDPERBUF² = ((uvlong)INDPERBUF*INDPERBUF),
INDPERBUF = ((uvlong)INDPERBUF²*INDPERBUF²),
};
static void
@ -261,9 +261,9 @@ printsizes(void)
max = offlim - 1;
print("max file size = %,llud\n", (Wideoff)max);
}
if (INDPERBUF/INDPERBUF != INDPERBUF)
print("overflow computing INDPERBUF\n");
if (INDPERBUF/INDPERBUF!= INDPERBUF)
if (INDPERBUF²/INDPERBUF != INDPERBUF)
print("overflow computing INDPERBUF²\n");
if (INDPERBUF/INDPERBUF² != INDPERBUF²)
print("overflow computing INDPERBUF⁴\n");
print("\tINDPERBUF = %d, INDPERBUF^4 = %,lld, ", INDPERBUF,
(Wideoff)INDPERBUF);

View File

@ -204,6 +204,7 @@ static Assoc auxtab[] = {
static Assoc spectab[] = {
{"3on4", L'¾'},
{"3on8", L''},
{"Aacu", L'Á'},
{"Aang", L'Å'},
{"Abarab", L'Ā'},
@ -237,7 +238,7 @@ static Assoc spectab[] = {
{"Lambda", L'Λ'},
{"Lbar", L'Ł'},
{"Mu", L'Μ'},
{"Naira", L'N'}, /* should have bar through */
{"Naira", L''}, /* should have bar through */
{"Nplus", L'N'}, /* should have plus above */
{"Ntilde", L'Ñ'},
{"Nu", L'Ν'},
@ -742,7 +743,7 @@ static Assoc spectab[] = {
{"ssTau", L'Τ'},
{"star", L'*'},
{"stlig", MLST},
{"sup2", L''},
{"sup2", L'²'},
{"supgt", L'˃'},
{"suplt", L'˂'},
{"sur", L'ʳ'},
@ -807,7 +808,6 @@ static Assoc spectab[] = {
equivalents in Unicode, so aren't in the above table.
22n 2^(2^n) Cf Fermat
2on4 2/4
3on8 3/8
Bantuo Bantu O. Cf Otshi-herero
Car C with circular arrow on top
albrtime cut-time: C with vertical line
@ -974,7 +974,7 @@ static Rune suptab[128] = {
NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
/*20*/ L' ', L'!', L'"', L'#', L'$', L'%', SPCS, L'\'',
L'', L'', L'*', L'', L',', L'', L'.', L'/',
/*30*/ L'', L'', L'', L'', L'', L'', L'', L'',
/*30*/ L'', L'¹', L'²', L'³', L'', L'', L'', L'',
L'', L'', L':', L';', TAGS, L'', TAGE, L'?',
/*40*/ L'@', L'A', L'B', L'C', L'D', L'E', L'F', L'G',
L'H', L'I', L'J', L'K', L'L', L'M', L'N', L'O',

View File

@ -599,7 +599,7 @@ static Assoc spectab[] = {
{"ssTau", L'Τ'},
{"star", L'*'},
{"stlig", MLST},
{"sup2", L''},
{"sup2", L'²'},
{"supgt", L'˃'},
{"suplt", L'˂'},
{"sur", L'ʳ'},
@ -831,7 +831,7 @@ static Rune suptab[128] = {
NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
/*20*/ L' ', L'!', L'"', L'#', L'$', L'%', SPCS, L'\'',
L'', L'', L'*', L'', L',', L'', L'.', L'/',
/*30*/ L'', L'', L'', L'', L'', L'', L'', L'',
/*30*/ L'', L'¹', L'²', L'³', L'', L'', L'', L'',
L'', L'', L':', L';', TAGS, L'', TAGE, L'?',
/*40*/ L'@', L'A', L'B', L'C', L'D', L'E', L'F', L'G',
L'H', L'I', L'J', L'K', L'L', L'M', L'N', L'O',

View File

@ -59,7 +59,7 @@ static Rune intab[256] = {
};
static Rune suptab[] = {
['0'] L'', ['1'] L'', ['2'] L'', ['3'] L'',
['0'] L'', ['1'] L'¹', ['2'] L'²', ['3'] L'³',
['4'] L'', ['5'] L'', ['6'] L'', ['7'] L'',
['8'] L'', ['9'] L'', ['+'] L'', ['-'] L'',
['='] L'', ['('] L'', [')'] L'', ['a'] L'ª',

View File

@ -154,7 +154,7 @@ enum {
Cmd1sili = 2, /* don't set Sd2ili */
/* limit of block #s in 24-bit ccbs */
Max24off = (1<<21) - 1, /* 2⁲ⁱ - 1 */
Max24off = (1<<21) - 1, /* 2²¹ - 1 */
/* mode pages */
Allmodepages = 0x3F,

View File

@ -144,7 +144,7 @@ enum {
Cmd1sili = 2, /* don't set Sd2ili */
/* limit of block #s in 24-bit ccbs */
Max24off = (1<<21) - 1, /* 2⁲ⁱ - 1 */
Max24off = (1<<21) - 1, /* 2²¹ - 1 */
/* mode pages */
Allmodepages = 0x3F,

View File

@ -239,17 +239,32 @@ loop:
case L'÷':
return '/';
case L'¹':
case L'ⁱ':
yylval.numb = 1;
return SUP;
case L'²':
case L'⁲':
yylval.numb = 2;
return SUP;
case L'³':
case L'⁳':
yylval.numb = 3;
return SUP;
case L'⁴':
yylval.numb = 4;
return SUP;
case L'⁵':
yylval.numb = 5;
return SUP;
case L'⁶':
yylval.numb = 6;
return SUP;
case L'⁷':
yylval.numb = 7;
return SUP;
case L'⁸':
yylval.numb = 8;
return SUP;
case L'⁹':
yylval.numb = 9;
return SUP;
}
return c;
@ -376,11 +391,14 @@ ralpha(int c)
case '|':
case '#':
case L'¹':
case L'ⁱ':
case L'²':
case L'⁲':
case L'³':
case L'⁳':
case L'⁴':
case L'⁵':
case L'⁶':
case L'⁷':
case L'⁸':
case L'⁹':
case L'×':
case L'÷':
return 0;
@ -551,6 +569,24 @@ printdim(char *str, int d, int n)
case 3:
strcat(str, "³");
break;
case 4:
strcat(str, "⁴");
break;
case 5:
strcat(str, "⁵");
break;
case 6:
strcat(str, "⁶");
break;
case 7:
strcat(str, "⁷");
break;
case 8:
strcat(str, "⁸");
break;
case 9:
strcat(str, "⁹");
break;
default:
sprint(strchr(str, 0), "^%d", n);
}

View File

@ -14,13 +14,13 @@
"-", "+-2:>DGHILOTZbdghiltuz~", L"∓­ƻ÷→ÐǤĦƗŁ⊖ŦƵƀðǥℏɨłŧʉƶ≂",
".", ".CEGILOZceglz", L"·ĊĖĠİĿ⊙Żċėġŀż",
"/", "Oo", L"Øø",
"1", "234568", L"½⅓¼⅕⅙⅛",
"2", "-35", L"ƻ⅔⅖",
"3", "458", L"¾⅗⅜",
"1", ".234568", L"½⅓¼⅕⅙⅛",
"2", "-.35", L"ƻ⅔⅖",
"3", ".458", L"¾⅗⅜",
"4", "5", L"",
"5", "68", L"⅚⅝",
"7", "8", L"",
":", ")-=", L"☺÷≔",
":", "()-=", L"☺÷≔",
"<!", "=~", L"≨⋦",
"<", "-<=>~", L"←«≤≶≲",
"=", ":<=>OV", L"≕⋜≡⋝⊜⇒",
@ -52,12 +52,13 @@
"H", "-H", L"Ħℍ",
"I", "-J", L"ƗIJ",
"L", "&-Jj|", L"⋀ŁLJLj⋁",
"M", "#48bs", L"♮♩♪♭♯",
"N", "JNj", L"NJℕNj",
"O", "*+-./=EIcoprx", L"⊛⊕⊖⊙⊘⊜ŒƢ©⊚℗®⊗",
"P", "P", L"",
"Q", "Q", L"",
"R", "R", L"",
"S", "123S", L"¹²³§",
"S", "S", L"§",
"T", "-u", L"Ŧ⊨",
"V", "=", L"",
"Y", "R", L"Ʀ",
@ -85,7 +86,7 @@
"o", "AOUaeiu", L"Å⊚Ůåœƣů",
"p", "Odgrt", L"℗∂¶∏∝",
"r", "\"\'O", L"”’®",
"s", "()+-0123456789=abnoprstu", L"⁽⁾⁺⁻⁰ⁱ⁲⁳⁴⁵⁶⁷⁸⁹⁼ª⊂ⁿº⊃√ß∍∑",
"s", "()+-0123456789=abnoprstu", L"⁽⁾⁺⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁼ª⊂ⁿº⊃√ß∍∑",
"t", "-efmsu", L"ŧ∃∴™ς⊢",
"u", "-AEGIOUaegiou", L"ʉĂĔĞĬŎŬ↑ĕğĭŏŭ",
"v\"", "Uu", L"Ǚǚ",