Commit graph

3564 commits

Author SHA1 Message Date
Russ Cox
d213189122 acme: fix Get of dir in nameless window (thanks Colton Lewis)
TBR=r
https://codereview.appspot.com/89390043
2014-04-18 14:03:46 -04:00
Shenghou Ma
2f902c4138 dist/main.html: update supported systems and commit log link.
LGTM=rsc
R=rsc
https://codereview.appspot.com/72340043
2014-03-25 23:23:10 -04:00
Shenghou Ma
c9ed9e13bf man/man1/0intro.1: update supported systems.
LGTM=rsc
R=rsc
https://codereview.appspot.com/71070050
2014-03-14 10:10:20 -04:00
Ethan Burns
4030a6c905 acme: copy/cut/paste with ctl+c,x,v
LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045
2014-03-13 18:48:41 -04:00
Russ Cox
219cf22d68 acme, sam: handle >1GB files correctly
TBR=rsc
https://codereview.appspot.com/74060043
2014-03-13 18:46:28 -04:00
Shenghou Ma
e78ed7a67b INSTALL: fix architecture detection on Solaris.
And uses gcc for i386 and x86_64.

LGTM=rsc
R=rsc
https://codereview.appspot.com/69860044
2014-03-05 16:43:20 -05:00
David du Colombier
63002b3e5a fix gcc 4.8 warnings
LGTM=rsc
R=rsc
https://codereview.appspot.com/33240044
2014-03-03 22:30:34 +01:00
David du Colombier
24b8994d3d fossil: fix p9p changes on view
LGTM=rsc
R=rsc
https://codereview.appspot.com/31130043
2014-03-03 22:23:07 +01:00
Shenghou Ma
20035ed43c all: DragonFly port.
Fix compilation problems, libdraw still doesn't work right yet.

LGTM=rsc
R=rsc
https://codereview.appspot.com/67820046
2014-02-27 23:17:47 -05:00
Shenghou Ma
db800afb4e codereview: sync from Go.
LGTM=rsc
R=rsc
https://codereview.appspot.com/67820044
2014-02-24 01:21:48 -05:00
Rob Kroeger
66ad987412 mac/Plumb: add URL scheme to Info.plist
LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/40780044
2014-01-22 13:43:39 -05:00
Russ Cox
042a069825 devdraw: clear altdown on focus out (thanks Ethan Burns)
TBR=rsc
https://codereview.appspot.com/53820044
2014-01-22 13:41:13 -05:00
Russ Cox
baf127ad04 INSTALL: diagnose missing gcc on Darwin
TBR=rsc
https://codereview.appspot.com/55700043
2014-01-22 11:23:19 -05:00
Jonathan Cast
f9781769d5 keyboard: add more sequences, from existing ones or RFC 1345
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/43990046
2014-01-06 22:19:32 -05:00
David du Colombier
b29ebaab99 fossil: fix remaining warnings
R=rsc
https://codereview.appspot.com/15100044
2013-10-23 22:10:31 +02:00
Rob Pike
5a69e405fc acme: scroll a directory window when navigating if:
- the cursor is on the last line
        - the navigation would put the cursor over the tag of the following text

R=rsc
CC=smckean83
https://codereview.appspot.com/15280045
2013-10-22 16:47:48 -07:00
David du Colombier
075c3bdc54 xd: fix build by declaring swizz8
R=rsc
https://codereview.appspot.com/13982043
2013-09-26 22:34:05 +02:00
David du Colombier
25f54d6f52 fossil: cleanup mkfile
R=rsc
https://codereview.appspot.com/13988043
2013-09-26 22:33:27 +02:00
David du Colombier
f92e70dc11 fossil: create directory
R=rsc
https://codereview.appspot.com/13984043
2013-09-26 22:32:37 +02:00
David du Colombier
68beda2144 fossil: import conf.rc
R=rsc
https://codereview.appspot.com/13983043
2013-09-26 22:31:57 +02:00
David du Colombier
3fcc209df9 fossil: cast Qid.vers, Dir.mode and Qid.mtime to u32int (thanks Tim Kack)
R=rsc
https://codereview.appspot.com/13981043
2013-09-26 22:31:11 +02:00
David du Colombier
3c612e13a1 fossil: fix various warnings
R=rsc
https://codereview.appspot.com/13980043
2013-09-26 22:30:24 +02:00
David du Colombier
b32de4ae73 fossil: required p9p changes
R=rsc
https://codereview.appspot.com/13352057
2013-09-26 20:12:45 +02:00
David du Colombier
4b57665805 fossil: move from liboventi to libthread and libventi
R=rsc
https://codereview.appspot.com/13504049
2013-09-23 23:16:25 +02:00
David du Colombier
6f4d00ee45 fossil: import from plan 9
R=rsc
https://codereview.appspot.com/7988047
2013-09-23 23:00:39 +02:00
Marius Eriksen
fea86f0639 acme: execute commands with / using shell
This allows commands in bin subdirectories.

R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/13254044
2013-09-06 16:23:49 -04:00
Akshat Kumar
7603066e73 acme Mail: add Search command
Introduces the Search command for mailboxes.
Arguments passed are treated as one space-
separated string, passed on to mailfs' IMAP
search interface.

R=rsc, david.ducolombier
CC=plan9port.codebot
https://codereview.appspot.com/13238044
2013-09-06 16:19:57 -04:00
Akshat Kumar
951fef52c9 mailfs: allow spaces in box name
Mail services (such as Google Mail) will often have
directories with names that contain spaces. Acme
does not support spaces in window names. So, replace
spaces in mail directory names with the Unicode
character for visible space.

The code is a bit of an over-approximation and
generally non-optimal.

R=rsc, david.ducolombier, 0intro
CC=plan9port.codebot
https://codereview.appspot.com/13010048
2013-09-06 16:10:26 -04:00
Akshat Kumar
6541f1798b mailfs: support for UTF-8 searches
UTF-8 searches with the SEARCH command must
be conducted in two steps: the first sends
the SEARCH command with the length of the
UTF-8 encoded string and the second sends
the literal search term. The searches need
to not be quoted.

R=rsc, david.ducolombier, rsc, 0intro
CC=plan9port.codebot
https://codereview.appspot.com/13244043
2013-09-06 16:09:29 -04:00
Steve McCoy
1889a25783 rcmain: use new $termprog variable
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/12505045
2013-08-13 12:46:38 -04:00
Russ Cox
1670a244d9 devdraw: set window name to argv[0]
R=rsc
CC=r
https://codereview.appspot.com/12577043
2013-08-06 23:44:06 -04:00
Russ Cox
bf63f986ff 9term: set TERM=dumb instead of TERM=9term
Everyone seems to assume that TERM != dumb implies
ANSI escape codes are okay. In fact, many people assume
that unconditionally, but it is easier to argue back about
TERM=dumb than TERM=9term.

This applies to acme win too, because they share the code.

Set termprog=9term or termprog=win for clients who
need to know.

R=rsc
CC=r
https://codereview.appspot.com/12532043
2013-08-06 09:42:10 -04:00
Russ Cox
2bc9a13faf acme: allow :6 in 5-line file
R=rsc
https://codereview.appspot.com/12162043
2013-07-31 09:15:30 -04:00
Roger Peppe
d74fdb6edb cmd/devdraw: clear keyboard state on lost focus.
See https://bitbucket.org/rsc/plan9port/issue/128/alt-button-sticks-in-acme-sometimes-after

R=rsc
https://codereview.appspot.com/11453043
2013-07-17 17:55:09 +01:00
David du Colombier
3d31240bfd libregexp: update from Plan 9
R=rsc
https://codereview.appspot.com/10690044
2013-07-02 06:39:17 +02:00
Russ Cox
da3ed55e4e devdraw: fix x11 input
R=rsc
https://codereview.appspot.com/10458043
2013-06-21 15:28:02 -04:00
Xi Wang
1bfec89b99 rc: avoid undefined C
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-19 14:36:50 -04:00
Xi Wang
8a2a5b8f25 libsec: avoid undefined C
gcc compiles `p + length < p' into 'length < 0' since pointer overflow is undefined behavior in C.  This breaks the check against a large `length'.

Use `length > pend - p' instead.

There's no need to check `length < 0' since `length' is from length_decode() and should be non-negative.

===

Try the simplified code.

void bar(void);
void foo(unsigned char *p, int length)
{
        if (p + length < p)
                bar();
}

$ gcc -S -o - t.c -O2
...
foo:
.LFB0:
        .cfi_startproc
        testl	%esi, %esi
        js	.L4
        rep
        ret
.L4:
        jmp	bar
        .cfi_endproc

Clearly `p' is not used at all.

R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7231069
2013-03-19 14:35:16 -04:00
Russ Cox
01e3847b7e xd: accept -S for 8-byte swap
R=rsc
https://codereview.appspot.com/7565045
2013-03-11 17:26:11 -04:00
Russ Cox
36bb28dc63 devdraw: control+click = button 2, alt/shift+click = button 3
For single-button mouse users.

R=rsc
https://codereview.appspot.com/7620043
2013-03-07 22:40:47 -05:00
Russ Cox
17934beda0 devdraw: silence unused variable warnings
R=rsc
https://codereview.appspot.com/7304064
2013-02-08 12:46:59 -05:00
Russ Cox
5154e54d8b devdraw: disable XCopyArea optimization
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-02-08 12:44:56 -05:00
Alessandro Arzilli
cac1425c4a fontsrv: fix on X11 when X11H is not defined
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7228044
2013-01-30 17:46:16 -08:00
Xi Wang
0dc3aa4b1d libmach: fix crash in dwarfpc (misuse of realloc)
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7225059
2013-01-30 17:46:12 -08:00
Martin Neubauer
dad9d0ac8f fontserv: fix build on FreeBSD 9.1
R=rsc
https://codereview.appspot.com/7095050
2013-01-30 17:45:28 -08:00
Russ Cox
0497ad9724 CONTRIBUTORS: three more
R=rsc
https://codereview.appspot.com/7225073
2013-01-30 17:45:21 -08:00
David du Colombier
d5baaf984f jpegdump: fix build and warnings
R=rsc
https://codereview.appspot.com/7070070
2013-01-19 10:05:12 +01:00
David du Colombier
23efb34d47 freq: fix crash with utf > 0xffff (thanks Andrey Mirtchovski)
R=rsc
https://codereview.appspot.com/7029054
2013-01-04 20:06:08 +01:00
David du Colombier
0798d6b741 venti/wrarena: fix arenapart breakage
R=rsc
https://codereview.appspot.com/7027044
2013-01-03 06:48:36 +01:00
Russ Cox
cb71c0bdc4 fontsrv: only build when the pieces are there 2012-12-18 07:22:19 -08:00