diff --git a/rc/bin/troll b/rc/bin/troll new file mode 100644 index 000000000..f114cce63 --- /dev/null +++ b/rc/bin/troll @@ -0,0 +1,2 @@ +#!/bin/rc +fortune /sys/games/lib/trolls diff --git a/sys/games/lib/fortunes b/sys/games/lib/fortunes index d2455f382..b9adaeaf8 100644 --- a/sys/games/lib/fortunes +++ b/sys/games/lib/fortunes @@ -4535,3 +4535,8 @@ The cast spent three weeks learning how to type, rollerblade and got to know eac I knew nothing about the PowerPC and had no idea how to modify my software to run on it. One August night, after dinner, two guys showed up to announce that they would camp out in my office until the modification was done. The three of us spent the next six hours editing fifty thousand lines of code. The secret to programming is having smart friends. -- Former Apple engineer at least he's not sexist. +(#cat-v) it's hard not to get trolled in #go-nuts +Dickerson explained the change today on Etsy's blog, saying that his focus as the new CEO will be to impel Etsy to move faster "and more purposefully", and re-prioritize risk-taking and "learning by doing" and "iterating." +(#cat-v) aiju: i had the correct code in my head +Connection to Microsoft Exchange has been restored. +/* ok for now. */ diff --git a/sys/games/lib/trolls b/sys/games/lib/trolls new file mode 100644 index 000000000..ddd7c42f1 --- /dev/null +++ b/sys/games/lib/trolls @@ -0,0 +1,6 @@ +i'm so glad i live in europe and not america +azns are such shitty drivers, they should all go back to wherever the fuck they came from and smash each others' cars there +the wii is actually a pretty technically-advanced console compared to the ps3 +lighttpd is a great drop-in replacement for apache +you shouldn't really run hdd speed tests under plan9 because the controller drivers are hacked-together open-source shit, something closed-source but official like windows would give a more accurate result +the british empire had the right idea when they enslaved all those damn niggers diff --git a/sys/man/1/fortune b/sys/man/1/fortune index dfae7186a..96349ebef 100644 --- a/sys/man/1/fortune +++ b/sys/man/1/fortune @@ -1,11 +1,16 @@ .TH FORTUNE 1 .SH NAME -fortune \- sample lines from a file +fortune, troll \- sample lines from a file .SH SYNOPSIS .B fortune [ .I file ] +.br +.B troll +[ +.I file +] .SH DESCRIPTION .I Fortune prints a one-line aphorism chosen at random. @@ -14,10 +19,22 @@ If a is specified, the saying is taken from that file; otherwise it is selected from .BR /sys/games/lib/fortunes . +.LP +.I +Troll +is more specific than +.I fortune; +it specializes in inflammatory rhetoric. .SH FILES .B /sys/games/lib/fortunes .br .B /sys/games/lib/fortunes.index \ \ fast lookup table, maintained automatically +.br +.B /sys/games/lib/trolls .SH SOURCE .B /sys/src/cmd/fortune.c +.br +.B /rc/bin/troll +.SH AUTHORS +Some initial trolls were provided by ChrisPBS. diff --git a/sys/src/9/pc/etherbcm.c b/sys/src/9/pc/etherbcm.c index 376759aac..a82e748d8 100644 --- a/sys/src/9/pc/etherbcm.c +++ b/sys/src/9/pc/etherbcm.c @@ -358,18 +358,16 @@ bcmtransmit(Ether *edev) print("bcm: send queue full\n"); break; } - if(incr == ctlr->sendcleani) { - bcmtransclean(edev, 0); - if(incr == ctlr->sendcleani) - break; - } bp = qget(edev->oq); if(bp == nil) break; + setmalloctag(bp, (ulong)(void*)bcmtransmit); next = ctlr->sendr + ctlr->sendri * 4; next[0] = 0; next[1] = PADDR(bp->rp); next[2] = (BLEN(bp) << 16) | PacketEnd; next[3] = 0; + if(ctlr->sends[ctlr->sendri] != 0) + freeb(ctlr->sends[ctlr->sendri]); ctlr->sends[ctlr->sendri] = bp; csr32(ctlr, SendBDRingHostIndex) = ctlr->sendri = incr; } diff --git a/sys/src/cmd/acid/acid.h b/sys/src/cmd/acid/acid.h index ef398e7b8..a050bc51b 100644 --- a/sys/src/cmd/acid/acid.h +++ b/sys/src/cmd/acid/acid.h @@ -27,7 +27,6 @@ typedef struct Type Type; typedef struct Frtype Frtype; Extern int kernel; -Extern int remote; Extern int text; Extern int silent; Extern Fhdr fhdr; diff --git a/sys/src/cmd/acid/main.c b/sys/src/cmd/acid/main.c index bb27cc9e3..f5b67bd05 100644 --- a/sys/src/cmd/acid/main.c +++ b/sys/src/cmd/acid/main.c @@ -60,19 +60,11 @@ main(int argc, char *argv[]) case 'q': quiet = 0; break; - case 'r': - pid = 1; - remote++; - kernel++; - break; default: usage(); }ARGEND if(argc > 0) { - if(remote) - aout = argv[0]; - else if(isnumeric(argv[0])) { pid = strtol(argv[0], 0, 0); snprint(prog, sizeof(prog), "/proc/%d/text", pid); @@ -89,9 +81,7 @@ main(int argc, char *argv[]) } aout = argv[0]; } - } else - if(remote) - aout = "/mips/9ch"; + } fmtinstall('x', xfmt); fmtinstall('L', Lfmt); @@ -258,7 +248,6 @@ readtext(char *s) Value *v; uvlong length; Symbol sym; - extern Machdata mipsmach; if(mtype != 0){ symmap = newmap(0, 1); @@ -274,8 +263,6 @@ readtext(char *s) return; } - machdata = &mipsmach; - if(!crackhdr(text, &fhdr)) { print("can't decode file header\n"); return; @@ -553,20 +540,19 @@ system(void) static char *kernel; cpu = getenv("cputype"); - if(cpu == 0) { - cpu = "mips"; - print("$cputype not set; assuming %s\n", cpu); - } + if(cpu == 0) + sysfatal("$cputype not set"); p = getenv("terminal"); - if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0) { - p = "ch"; - print("missing or bad $terminal; assuming %s\n", p); - } + if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0) + sysfatal("$terminal not set"); else{ p++; q = strchr(p, ' '); if(q) *q = 0; + q = strrchr(p, '/'); + if(q) + p = q + 1; } if(kernel != nil) diff --git a/sys/src/cmd/cwfs/malloc.c b/sys/src/cmd/cwfs/malloc.c index 048a81209..aa7debd27 100644 --- a/sys/src/cmd/cwfs/malloc.c +++ b/sys/src/cmd/cwfs/malloc.c @@ -28,7 +28,7 @@ memsize(void) } } Bterm(bp); - if (pgsize > 0 && userused > userpgs) + if (pgsize > 0 && userused < userpgs) return (userpgs - userused)*pgsize; } return 64*MB;