Created
April 14, 2012 21:52
-
-
Save awreece/2388037 to your computer and use it in GitHub Desktop.
Go source is unreadable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ hg blame runtime.c | grep runtime·rnd | |
6707: runtime·rnd(uint32 n, uint32 m) | |
$ hg log -r 6707 | |
changeset: 6707:629c065d3679 | |
user: Russ Cox <[email protected]> | |
date: Thu Nov 04 14:00:19 2010 -0400 | |
summary: runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep runtime·rnd * | |
chan.c: ap = ae + runtime·rnd(t->elem->size, Structrnd); | |
chan.c: o = runtime·rnd(sizeof(size), Structrnd); | |
hashmap.c: datasize = runtime·rnd(datasize, sizeof (void *)); | |
hashmap.c: h->valoff = runtime·rnd(key->size, sizeof(void*)); | |
hashmap.c: av = ak + runtime·rnd(t->key->size, Structrnd); | |
hashmap.c: av = ak + runtime·rnd(t->key->size, Structrnd); | |
hashmap.c: av = ak + runtime·rnd(t->key->size, t->elem->align); | |
hashmap.c: av = ak + runtime·rnd(t->key->size, t->elem->align); | |
iface.c: ret = (Iface*)(elem + runtime·rnd(wid, Structrnd)); | |
iface.c: ret = (Eface*)(elem + runtime·rnd(wid, Structrnd)); | |
print.c: arg = runtime·rnd(arg, 4); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
print.c: arg = runtime·rnd(arg, sizeof(uintptr)); | |
runtime.c:runtime·rnd(uint32 n, uint32 m) | |
runtime.h:uint32 runtime·rnd(uint32, uint32); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32 | |
runtime·rnd(uint32 n, uint32 m) | |
{ | |
uint32 r; | |
if(m > maxround) | |
m = maxround; | |
r = n % m; | |
if(r) | |
n += m-r; | |
return n; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment