aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)AuthorFilesLines
2013-07-17cmd/devdraw: clear keyboard state on lost focus.Roger Peppe1-0/+6
See https://bitbucket.org/rsc/plan9port/issue/128/alt-button-sticks-in-acme-sometimes-after R=rsc https://codereview.appspot.com/11453043
2013-06-21devdraw: fix x11 inputRuss Cox1-1/+1
R=rsc https://codereview.appspot.com/10458043
2013-03-19rc: avoid undefined CXi Wang1-4/+4
There are two bugs in pdec() on INT_MIN: * wrong output. `n = 1-n' should be `n = -1-n' when n is INT_MIN. * infinite loop. gcc optimizes `if(n>=0)' into `if(true)' because `-INT_MIN' (signed integer overflow) is undefined behavior in C, and gcc assumes the negation of a negative number must be positive. The resulting binary keeps printing '-' forever given INT_MIN. Try the simplified pdec.c below. $ gcc pdec.c $ ./a.out -2147483648 --214748364* $ gcc pdec.c -O2 $ ./a.out -2147483648 <infinite loop> $ gcc pdec.c -O2 -D__PATCH__ $ ./a.out -2147483648 -2147483648 === pdec.c === #include <stdio.h> #include <stdlib.h> #include <limits.h> #define io void void pchr(io *f, int c) { putchar(c); } void pdec(io *f, int n) { if(n<0){ #ifndef __PATCH__ n=-n; if(n>=0){ pchr(f, '-'); pdec(f, n); return; } /* n is two's complement minimum integer */ n = 1-n; #else if(n!=INT_MIN){ pchr(f, '-'); pdec(f, -n); return; } /* n is two's complement minimum integer */ n = -(INT_MIN+1); #endif pchr(f, '-'); pdec(f, n/10); pchr(f, n%10+'1'); return; } if(n>9) pdec(f, n/10); pchr(f, n%10+'0'); } int main(int argc, char **argv) { int n = atoi(argv[1]); pdec(NULL, n); putchar('\n'); } R=rsc CC=plan9port.codebot https://codereview.appspot.com/7241055
2013-03-11xd: accept -S for 8-byte swapRuss Cox1-0/+36
R=rsc https://codereview.appspot.com/7565045
2013-03-07devdraw: control+click = button 2, alt/shift+click = button 3Russ Cox3-26/+111
For single-button mouse users. R=rsc https://codereview.appspot.com/7620043
2013-02-08devdraw: silence unused variable warningsRuss Cox1-2/+6
R=rsc https://codereview.appspot.com/7304064
2013-02-08devdraw: disable XCopyArea optimizationRuss Cox1-2/+5
Ubuntu Precise seems to have a buggy X server that sometimes fails at XCopyArea. Let devdraw do it itself. This will slow down remote X a little bit, but slow and correct is better than fast and broken. R=rsc https://codereview.appspot.com/7310069
2013-01-30fontsrv: fix on X11 when X11H is not definedAlessandro Arzilli1-1/+1
R=rsc CC=plan9port.codebot https://codereview.appspot.com/7228044
2013-01-19jpegdump: fix build and warningsDavid du Colombier1-7/+8
R=rsc https://codereview.appspot.com/7070070
2013-01-04freq: fix crash with utf > 0xffff (thanks Andrey Mirtchovski)David du Colombier1-2/+2
R=rsc https://codereview.appspot.com/7029054
2013-01-03venti/wrarena: fix arenapart breakageDavid du Colombier1-3/+4
R=rsc https://codereview.appspot.com/7027044
2012-12-18fontsrv: only build when the pieces are thereRuss Cox1-2/+2
2012-12-11fontsrv: fix build on OpenBSD 5.2Christian Kellermann3-2/+8
R=rsc CC=plan9port.codebot https://codereview.appspot.com/6850108
2012-12-09auth/factotum: fix password prompt hang with secstoreDavid du Colombier1-3/+3
R=rsc http://codereview.appspot.com/6906057
2012-12-03fontsrv: make single quotes look like quotesRuss Cox1-3/+15
R=rsc https://codereview.appspot.com/6864051
2012-12-01fontsrv: scaled pjwRuss Cox5-11/+369
R=rsc https://codereview.appspot.com/6854130
2012-11-26acme: retina scaling for scroll bars, buttonRuss Cox2-26/+34
R=rsc http://codereview.appspot.com/6854094
2012-11-26samterm: retina scaling for scroll bars, bordersRuss Cox3-14/+24
R=rsc http://codereview.appspot.com/6844083
2012-11-269term: adjust to dpi changesRuss Cox1-15/+23
R=rsc http://codereview.appspot.com/6847105
2012-11-25devdraw: fake dpi calculation on MacRuss Cox1-0/+8
R=rsc http://codereview.appspot.com/6782115
2012-11-25devdraw: use %R not Fn-F3 for retina toggleRuss Cox1-1/+1
R=rsc http://codereview.appspot.com/6854093
2012-11-25devdraw: add forcedpi toggled by Fn+F3 on MacRuss Cox4-3/+20
R=rsc http://codereview.appspot.com/6846104
2012-11-25acme: set $samfile (same as $%) during executionMarius Eriksen1-0/+1
R=rsc CC=plan9port.codebot http://codereview.appspot.com/6854092
2012-11-25fontsrv: work around a few crashesRuss Cox1-2/+6
Probably not the right fix, but gets us going. R=rsc http://codereview.appspot.com/6782113
2012-11-25devdraw: fix retina modeRuss Cox1-1/+1
R=rsc http://codereview.appspot.com/6847104
2012-11-25devdraw, libdraw: add display->dpiRuss Cox2-2/+28
Fixed at 100 right now, but the plan is to make it accurate and then use it. R=rsc http://codereview.appspot.com/6856091
2012-11-25devdraw: restore compilation on OS X 10.6Shenghou Ma1-0/+2
Also add some ignored files to .hgignore R=rsc http://codereview.appspot.com/6842089
2012-10-22acme: use threadspawnd to avoid changing "." of current processRuss Cox1-29/+8
R=rsc http://codereview.appspot.com/6736060
2012-10-21acme: add $acmeshell to control execution shellMarius Eriksen3-2/+12
R=rsc CC=plan9port.codebot http://codereview.appspot.com/6614056
2012-10-21fontsrv: x11 supportYuval Pavel Zholkover4-3/+274
R=rsc, 0intro CC=plan9port.codebot http://codereview.appspot.com/6739047
2012-10-21plumb.app: accept plumb:foo as alias for fooRob Kroeger1-1/+16
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5495046
2012-10-21devdraw: map X11 dead_diaresis to double quoteCaio Oliveira1-39/+42
R=rsc CC=plan9port.codebot http://codereview.appspot.com/6690049
2012-10-21silence more warningsRuss Cox13-298/+305
R=rsc http://codereview.appspot.com/6744056
2012-10-21fix clang warnings reported by Tuncer AyazRuss Cox14-601/+602
R=rsc http://codereview.appspot.com/6744054
2012-10-20fix gcc 4.7 warnings (thanks Tuncer Ayaz)Russ Cox11-35/+7
R=rsc http://codereview.appspot.com/6744053
2012-10-16devdraw: MacBook retina supportRob Kroeger1-8/+121
Enable with export devdrawretina=1 (everything will be smaller). R=rsc CC=plan9port.codebot http://codereview.appspot.com/6592072
2012-10-07devdraw: prefer 24-bit over 15-bit or 16-bit.Russ Cox1-6/+6
Fixes remote X11 use via XQuartz 2.7.4. R=rsc http://codereview.appspot.com/6624058
2012-10-05acme: correct writes of runes on auspicious byte boundariesErik Quanstrom1-23/+34
R=rsc, r CC=plan9port.codebot http://codereview.appspot.com/6586067
2012-09-24src/cmd: Add a repurposed import(4), called `9import', to the ports.Akshat Kumar1-0/+239
The code is adapted from Plan 9's import(4); this allows us to speak that protocol. We don't currently support AAN (in the works) or TLS/SSL. Thanks to David for help with the man page, testing, and development. R=0intro, rsc CC=plan9port.codebot http://codereview.appspot.com/6458100
2012-09-23acme: mouse movement for DelRuss Cox5-8/+62
If the mouse was in the tag of the old window, it was most likely pointing at Del. If bringing up a new window from below and not moving the mouse somewhere else, adjust it so that it ends up pointing at Del in the replacement window's tag too. This makes it easy to Del a sequence of windows in a column, from top to bottom. http://www.youtube.com/watch?v=ET8w6RT6u5M R=r http://codereview.appspot.com/6558047
2012-09-18snarfer: disable during buildRuss Cox1-1/+1
Don't want to require X11 during OS X build anymore. R=rsc http://codereview.appspot.com/6531045
2012-09-17sam: add $% as an alias for $samfileRuss Cox1-0/+1
R=r http://codereview.appspot.com/6488137
2012-09-109pfuse: fix memory leak, avoid memory explosionTies Bos1-2/+11
Change is to handle FUSE_FORGET in main loop instead of separate thread for each as 10s of thousands can come in at once. Fixes issue 104. R=0intro, rsc http://codereview.appspot.com/6498081
2012-09-089pfuse: osxfuse supportRuss Cox1-8/+16
R=rsc http://codereview.appspot.com/6503093
2012-08-05disk/mkfs,disk/mkext: fix mkdir conflictRuss Cox2-0/+3
R=rsc http://codereview.appspot.com/6445076
2012-08-03vacfs: fix create srv with ORCLOSE on plan 9David du Colombier1-9/+11
In the current code, the srv file is removed just after the main thread exits, while the srv thread is still running, which is not the expected behavior. We moved the srv creation just before the procrfork, in order that the srv file will not be removed until the srv thread exits. R=rsc http://codereview.appspot.com/6397047
2012-08-03devdraw: make it 3 times faster on OS XDavid Jeannot1-42/+49
This patch reverts the recent patch named "devdraw: fix for OS X 10.8", and fixes redrawing on OSX 10.8 differently, making scrolling under Acme 3 times faster. R=rsc, mirtchovski CC=plan9port.codebot http://codereview.appspot.com/6452087
2012-07-31devdraw: fix for OS X 10.8 (Mountain Lion)Rob Kroeger1-31/+40
In MacOS 10.8, the NSBitmapImageRep class appears to cache the specified image data at the time of construction. As a result updates to the backing memimage object do not get pushed to the screen in flushimg. This patch creates the NSBitmapImageRep object over again for each flushimg which would appear to fix the problem. R=rsc CC=plan9port.codebot http://codereview.appspot.com/6443063
2012-07-17disk/mkfs, disk/mkext: add from Plan 9Russ Cox3-0/+1169
R=rsc, rsc http://codereview.appspot.com/6405057
2012-07-14auth/factotum: fix flush (thanks Erik Quanstrom)Russ Cox1-2/+3
R=rsc http://codereview.appspot.com/6402044