1
0
mirror of https://github.com/golang/go synced 2024-11-25 15:57:57 -07:00

all: fix typos

R=golang-dev, bradfitz, khr, r
CC=golang-dev
https://golang.org/cl/7461046
This commit is contained in:
Shenghou Ma 2013-06-09 21:50:24 +08:00
parent 822da40814
commit faef52c214
30 changed files with 36 additions and 36 deletions

View File

@ -462,7 +462,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %Drar; return 0\n", v2);
return 0;

View File

@ -1905,7 +1905,7 @@ odot:
for(i=1; i<o; i++) {
if(oary[i] >= 0)
fatal("cant happen");
fatal("can't happen");
gins(AMOVW, &n1, reg);
n1.xoffset = -(oary[i]+1);
}

View File

@ -496,7 +496,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %Drar; return 0\n", v2);
return 0;
@ -973,7 +973,7 @@ copyu(Prog *p, Adr *v, Adr *s)
switch(p->as) {
default:
print("copyu: cant find %A\n", p->as);
print("copyu: can't find %A\n", p->as);
return 2;
case AMOVM:
@ -1288,7 +1288,7 @@ copyau1(Prog *p, Adr *v)
return 1;
return 0;
}
print("copyau1: cant tell %P\n", p);
print("copyau1: can't tell %P\n", p);
}
return 0;
}

View File

@ -816,7 +816,7 @@ addmove(Reg *r, int bn, int rn, int f)
a->type = D_CONST;
if(v->addr)
fatal("addmove: shouldnt be doing this %A\n", a);
fatal("addmove: shouldn't be doing this %A\n", a);
switch(v->etype) {
default:

View File

@ -130,7 +130,7 @@ loop:
r = prg();
*r = *p;
if(!(r->mark&FOLL))
print("cant happen 1\n");
print("can't happen 1\n");
r->mark |= FOLL;
if(p != q) {
p = p->link;
@ -150,7 +150,7 @@ loop:
if(!(r->link->mark&FOLL))
xfol(r->link, last);
if(!(r->cond->mark&FOLL))
print("cant happen 2\n");
print("can't happen 2\n");
return;
}
}

View File

@ -483,7 +483,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %D rar; return 0\n", v2);
return 0;

View File

@ -1188,7 +1188,7 @@ print("botch in doindex\n");
else if(n->left->op == OREGISTER)
idx.ptr = n->left->reg;
else if(n->left->op != OADDR) {
reg[D_BP]++; // cant be used as a base
reg[D_BP]++; // can't be used as a base
regalloc(&nod1, &qregnode, Z);
cgen(n->left, &nod1);
idx.ptr = nod1.reg;

View File

@ -1480,7 +1480,7 @@ cadable(Node *n)
* Small structs or arrays with elements of basic type are
* also supported.
* nr is N when assigning a zero value.
* return 1 if can do, 0 if cant.
* return 1 if can do, 0 if can't.
*/
int
componentgen(Node *nr, Node *nl)

View File

@ -494,7 +494,7 @@ fp:
break;
case 2: // offset output arg
fatal("shouldnt be used");
fatal("shouldn't be used");
n->op = OINDREG;
n->val.u.reg = D_SP;
n->xoffset += types[tptr]->width;
@ -2038,7 +2038,7 @@ odot:
for(i=1; i<o; i++) {
if(oary[i] >= 0)
fatal("cant happen");
fatal("can't happen");
gins(AMOVQ, &n1, reg);
n1.xoffset = -(oary[i]+1);
}

View File

@ -843,7 +843,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %D rar; return 0\n", v2);
return 0;

View File

@ -403,7 +403,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %D rar; return 0\n", v2);
return 0;

View File

@ -963,7 +963,7 @@ print("botch in doindex\n");
else if(n->left->op == OREGISTER)
idx.ptr = n->left->reg;
else if(n->left->op != OADDR) {
reg[D_BP]++; // cant be used as a base
reg[D_BP]++; // can't be used as a base
regalloc(&nod1, &regnode, Z);
cgen(n->left, &nod1);
idx.ptr = nod1.reg;

View File

@ -1319,7 +1319,7 @@ cadable(Node *n)
* copy a composite value by moving its individual components.
* Slices, strings and interfaces are supported.
* nr is N when assigning a zero value.
* return 1 if can do, 0 if cant.
* return 1 if can do, 0 if can't.
*/
int
componentgen(Node *nr, Node *nl)

View File

@ -608,7 +608,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
}
t = copyu(p, v2, A);
switch(t) {
case 2: /* rar, cant split */
case 2: /* rar, can't split */
if(debug['P'])
print("; %D rar; return 0\n", v2);
return 0;

View File

@ -1824,7 +1824,7 @@ hash32to16(uint32 h)
static void
fixtemp(Prog *firstp)
{
static uint8 counts[1<<16]; // A hash table to count variable occurences.
static uint8 counts[1<<16]; // A hash table to count variable occurrences.
int i;
Prog *p, *p2;
uint32 h;

View File

@ -235,7 +235,7 @@ no:
return 0;
bad:
diag(n, "cant rewrite typestr for op %O\n", o);
diag(n, "can't rewrite typestr for op %O\n", o);
prtree(n, "isfunct");
n->type = T;
return 1;

View File

@ -762,7 +762,7 @@ ieeedtod(Ieee *ieee, double native)
return;
}
fr = frexp(native, &exp);
f = 2097152L; /* shouldnt use fp constants here */
f = 2097152L; /* shouldn't use fp constants here */
fr = modf(fr*f, &ho);
ieee->h = ho;
ieee->h &= 0xfffffL;

View File

@ -75,7 +75,7 @@ codgen(Node *n, Node *nn)
*/
for(n1 = nn;; n1 = n1->left) {
if(n1 == Z) {
diag(nn, "cant find function name");
diag(nn, "can't find function name");
return;
}
if(n1->op == ONAME)

View File

@ -156,7 +156,7 @@ ieeedtod(Ieee *ieee, double native)
return;
}
fr = frexp(native, &exp);
f = 2097152L; /* shouldnt use fp constants here */
f = 2097152L; /* shouldn't use fp constants here */
fr = modf(fr*f, &ho);
ieee->h = ho;
ieee->h &= 0xfffffL;

View File

@ -578,7 +578,7 @@ hassuffix(char *p, char *suffix)
return np >= ns && strcmp(p+np-ns, suffix) == 0;
}
// hasprefix reports whether p begins wtih prefix.
// hasprefix reports whether p begins with prefix.
bool
hasprefix(char *p, char *prefix)
{

2
src/cmd/dist/unix.c vendored
View File

@ -548,7 +548,7 @@ hassuffix(char *p, char *suffix)
return np >= ns && strcmp(p+np-ns, suffix) == 0;
}
// hasprefix reports whether p begins wtih prefix.
// hasprefix reports whether p begins with prefix.
bool
hasprefix(char *p, char *prefix)
{

View File

@ -235,7 +235,7 @@ ieeedtod(uint64 *ieee, double native)
return;
}
fr = frexp(native, &exp);
f = 2097152L; /* shouldnt use fp constants here */
f = 2097152L; /* shouldn't use fp constants here */
fr = modf(fr*f, &ho);
h = ho;
h &= 0xfffffL;

View File

@ -315,7 +315,7 @@ casebody(Node *sw, Node *typeswvar)
}
stat = concat(stat, n->nbody);
// botch - shouldnt fall thru declaration
// botch - shouldn't fall thru declaration
last = stat->end->n;
if(last->op == OXFALL) {
if(typeswvar) {

View File

@ -151,7 +151,7 @@ if ! ./testgo list std | cmp -s test_std.list - ; then
fi
rm -f test_std.list
# issue 4096. Validate the output of unsucessful go install foo/quxx
# issue 4096. Validate the output of unsuccessful go install foo/quxx
if [ $(./testgo install 'foo/quxx' 2>&1 | grep -c 'cannot find package "foo/quxx" in any of') -ne 1 ] ; then
echo 'go install foo/quxx expected error: .*cannot find package "foo/quxx" in any of'
ok=false

View File

@ -367,7 +367,7 @@ dynreloc(void)
{
Sym *s;
// -d supresses dynamic loader format, so we may as well not
// -d suppresses dynamic loader format, so we may as well not
// compute these sections or mark their symbols as reachable.
if(debug['d'] && HEADTYPE != Hwindows)
return;

View File

@ -133,7 +133,7 @@ sleb128put(vlong v)
/*
* Defining Abbrevs. This is hardcoded, and there will be
* only a handful of them. The DWARF spec places no restriction on
* the ordering of atributes in the Abbrevs and DIEs, and we will
* the ordering of attributes in the Abbrevs and DIEs, and we will
* always write them out in the order of declaration in the abbrev.
* This implementation relies on tag, attr < 127, so they serialize as
* a char. Higher numbered user-defined tags or attributes can be used
@ -1646,7 +1646,7 @@ guesslang(char *s)
}
/*
* Generate short opcodes when possible, long ones when neccesary.
* Generate short opcodes when possible, long ones when necessary.
* See section 6.2.5
*/
@ -1938,7 +1938,7 @@ enum
{
CIERESERVE = 16,
DATAALIGNMENTFACTOR = -4, // TODO -PtrSize?
FAKERETURNCOLUMN = 16 // TODO gdb6 doesnt like > 15?
FAKERETURNCOLUMN = 16 // TODO gdb6 doesn't like > 15?
};
static void

View File

@ -481,7 +481,7 @@ mgd megagal/day
mh millihenry
mhz 1e+6/sec
mil 1e-3 in
millenium 1000 year
millennium 1000 year
minersinch 1.5 ft³/min
minim 1|60 fldr
mo month

View File

@ -52,7 +52,7 @@ _is6(char *t)
{
uchar *s = (uchar*)t;
return s[0] == (ANAME&0xff) /* aslo = ANAME */
return s[0] == (ANAME&0xff) /* also = ANAME */
&& s[1] == ((ANAME>>8)&0xff)
&& s[2] == D_FILE /* type */
&& s[3] == 1 /* sym */

View File

@ -52,7 +52,7 @@ _is8(char *t)
{
uchar *s = (uchar*)t;
return s[0] == (ANAME&0xff) /* aslo = ANAME */
return s[0] == (ANAME&0xff) /* also = ANAME */
&& s[1] == ((ANAME>>8)&0xff)
&& s[2] == D_FILE /* type */
&& s[3] == 1 /* sym */

View File

@ -36,7 +36,7 @@ func sender(n int, c1, c2, c3, c4 chan<- int) {
}
// mux receives the values from sender and forwards them onto another channel.
// It would be simplier to just have sender's four cases all be the same
// It would be simpler to just have sender's four cases all be the same
// channel, but this doesn't actually trigger the bug.
func mux(out chan<- int, in <-chan int, done chan<- bool) {
for v := range in {