Commit graph

2761 commits

Author SHA1 Message Date
Russ Cox
60f06594cc gview: fix int vs ulong confusion causing silent exit 1 at startup 2018-01-03 09:49:11 -05:00
Russ Cox
2023d484f2 9term: re-enable sys: child note for child processes
Fixes #6.

Change-Id: Id9950f59c7970575866a7c22a69bfbf3a271f2bb
2017-11-27 11:10:27 +01:00
Russ Cox
3d6e5cb56a acme: preserve window position and selection during Get
Before, executing Get in a file rewound the window offset and
selection to the start of the file.

After this CL, Get preserves the window offset and selection,
where preserve is defined as "the same line number and rune
offset within the line". So if the window started at line 10
before and the selection was line 13 chars 5-7, then that
will still be true after Get, provided the new content is large
enough.

This should help the common situation of plumbing a
compiler error, realizing the window is out of date,
clicking Get, and then losing the positioning from the
plumb operation.
2017-11-02 12:01:14 -04:00
Russ Cox
ff9d331db4 acme: free buf in checksha1
Thanks to Lorenzo Beretta for noticing.
2017-10-14 19:51:10 -04:00
David du Colombier
7321ed031c 9term: fix getpts on macOS 10.13
Since macOS 10.13, opening the /dev/ptyXX files
always return ENOENT.

Consequently, we changed getpts to use openpty to
open a pseudoterminal, like on Linux and OpenBSD.

Fixes #90.
Fixes #110.
2017-10-13 10:26:51 +02:00
David du Colombier
a6a3528868 upas/nfs: fix warnings
decode.c:146:8: warning: variable ‘argv’ set but not used
fs.c:953:47: warning: variable ‘reset’ set but not used
imap.c:348:6: warning: variable ‘prefix’ set but not used

Updates #114.
2017-10-13 10:16:20 +02:00
Russ Cox
67dbeee5fe acme: check file content before declaring file "modified since last read"
Bad remote file systems can change mtime unexpectedly,
and then there is the problem that git rebase and similar
operations like to change the files and then change them back,
modifying the mtimes but not the content.

Avoid spurious Put errors on both of those by checking file
content.

(False positive "modified since last read" make the real ones
difficult to notice.)
2017-10-10 13:51:24 -04:00
Rudá Moura
680c57a15c devdraw: fix build on macOS < 10.12
After making the build on macOS silent on commit 310ae03,
the build was broken on macOS lesser than 10.12 (Sierra).

This commit conditionally checks the version the of the
SDK before using the defined values for silent build.

Fixes #66.
2017-10-09 10:26:14 +02:00
Leah Neukirchen
c665ab76a8 xd: add -R for runewise dump
Ported from Plan 9 2013-05-21.
b377a116d1

Closes #16.
2017-10-01 11:46:06 +02:00
Kare Nuorteva
b3336e5cbb all: remove .cvsignore files
Rename following .cvsignore files to .gitkeep since they are
required by the build (directories must exist before build):
	- bin/fossil/.gitkeep
	- bin/fs/.gitkeep
	- bin/venti/.gitkeep

Change-Id: I9c2865058480cffb3a4613f25e2eca1f7e5578c0
2017-09-14 17:25:17 +02:00
David du Colombier
a8a775abbe lib9: import frand function from Plan 9
Fixes #15.
2017-09-01 22:51:14 +02:00
David du Colombier
bb044732c6 svgpic: fix warnings
plsvg.c:291:21: warning: variable ‘y2’ set but not used
plsvg.c:291:17: warning: variable ‘x2’ set but not used
2017-09-01 22:37:59 +02:00
David du Colombier
cf303e5baa libmach: initialize ss variable in stabsline2pc function
Fixes #58.
2017-09-01 22:37:05 +02:00
Russ Cox
a399388593 all: update site from swtch.com to 9fans.github.io 2017-09-01 13:25:20 -04:00
Russ Cox
a9e20eb10a ed: allow larger temp files
Requested by rob.
2017-09-01 12:06:25 -04:00
Michael Stroucken
4a8c0c75ff venti: fix venti graph on 64-bit
A pixel is 32 bits wide in RGBA, regardless of system's word size.

Change-Id: Iea36a8dafdec9ce8d593f944ef5ed1ea08e11d25
Reviewed-on: https://plan9port-review.googlesource.com/2980
Reviewed-by: David du Colombier <0intro@gmail.com>
2017-07-23 11:11:56 +00:00
Russ Cox
b15fd97627 acme: implement Cmd-Shift-Z for Redo on Mac
Change-Id: Ie9332ed473609bd6ca156be0843dc5411cbf7b93
Reviewed-on: https://plan9port-review.googlesource.com/2941
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-07-16 02:24:41 +00:00
Russ Cox
00b50225c2 devdraw: fix Mac Kcmd+Shift
Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190
Reviewed-on: https://plan9port-review.googlesource.com/2940
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-07-16 02:24:34 +00:00
Russ Cox
711336c348 fontsrv: avoid quote mapping on fonts with indistinguishable quotes
Fixes #86.

Change-Id: Id487219a0fcfdb68133fc81b11383365a1431c1c
Reviewed-on: https://plan9port-review.googlesource.com/2922
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-06-19 13:58:51 +00:00
Russ Cox
1f1ab4ccbb lib9: fix needsrcquote
As written, it is passing a rune to strchr, which likely ignores
all but the bottom 8 bits of the rune. Long-standing Plan 9 bug too.

Fixes #87.

Change-Id: I6a833373b308bed8760d6989972c7f77b4ef3838
Reviewed-on: https://plan9port-review.googlesource.com/2921
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-06-19 13:51:23 +00:00
Russ Cox
3ebbd193dc svgpic: new program to convert pic to svg
This is an experiment.
Like tpic it's a copy-and-paste fork of pic.

Change-Id: Ia22772bd5881c7904a6d8f8e0b46fde8cea89cbd
Reviewed-on: https://plan9port-review.googlesource.com/2920
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-06-19 13:51:14 +00:00
Dan Cross
c976381d67 factotum: Fix an operator precedence bug in the secstore code
`==` is higher precedence than `&`. Parenthesize.

Change-Id: I2c7ee588fea0d8a66e1c8424f26630015388d61a
Signed-off-by: Dan Cross <cross@gajendra.net>
Reviewed-on: https://plan9port-review.googlesource.com/2860
Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-05-05 20:04:17 +00:00
Dan Cross
9e52ea8a29 yacc: Fix a bug from at least 1995.
Fix a bug folding newlines in strings constants in C code snippets
in YACC.  This code has existed since at least 2nd Edition Plan 9.

Change-Id: Iba17b89a6529ac9fa6610bf0b44f551904174c26
Signed-off-by: Dan Cross <cross@gajendra.net>
Reviewed-on: https://plan9port-review.googlesource.com/2840
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-04-21 14:09:47 +00:00
Ray Lai
94b38bdb72 libdraw: replace hand-rolled realloc, preventing buffer overflow.
The original buffer is f->nsubf*sizeof *subf bytes (oldsize) large.
Once it's full, a new buffer of (f->nsubf+DSUBF)*sizeof *subf
(newsize) is mallocated.  Unfortunately memmove() reads (newsize)
bytes from the original (oldsize) buffer, causing a buffer overflow.

By switching to realloc(), we don't need to do buffer size calculation,
memmoving, and freeing of the original buffer.

Change-Id: Ibf85bc06abe1c8275b11acb1d7d346a14291d2cd
Reviewed-on: https://plan9port-review.googlesource.com/1520
Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-04-08 00:06:42 +00:00
Ray Lai
669713d43f 9term: Add missing parentheses, preventing buffer overflow.
(el-sr) is the string length and (sizeof wdir - strlen(name) - 20)
is the buffer size. When the string length is greater than the
buffer size, the beginning of the string is supposed to be trimmed
to fit in the buffer size. Unfortunately a pair of parentheses were
missing, pointing sr outside the buffer, and the for loop below
then reads outside the buffer. For certain binary data printed in
a window, it causes a segfault.

Change-Id: Iffeaa348260ee2a5a36d9577308fb8d1c1688d05
Reviewed-on: https://plan9port-review.googlesource.com/1540
Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-04-08 00:04:32 +00:00
James Porter
9f34853f7c 9pfuse: support osxfuse>=3.3.0
Change-Id: Ibca68261016b0f588e169e9f319748b5ba7d15ac
Reviewed-on: https://plan9port-review.googlesource.com/2700
Reviewed-by: michaelian ennis <michaelian.ennis@gmail.com>
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-02-10 13:37:44 +00:00
Russ Cox
c819ee640c 9term: c nits
Change-Id: Ia18ebb28f24bc69f404004896f9ce54ddb53faf9
Reviewed-on: https://plan9port-review.googlesource.com/2782
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-09 15:44:30 +00:00
Dave Presotto
be7485e1da cmd/9term: A hack because I'm constantly getting confused about ^C vs fn+delete
Since Google (and a lot of the outside) is so engrained with using
^C as interrupt, I'd like to be able to use it in 9term if I've
stty'd my intr to ^C. Without this, hitting ^C still works but if
the program behind the window isn't reading from /dev/cons, it won't
take effect till after I hit a newline which is often very confusing.

I know this is a hack since it only works if I stty intr ^C but that
seems the only other character that gets used anyways.

Change-Id: I0597e63b2d7628f5668c648e6dba6f281e4b27fd
Reviewed-on: https://plan9port-review.googlesource.com/2742
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-09 15:42:59 +00:00
Dave Presotto
82112d0434 src/cmd: take fontsrv out of BUGGERED
Change-Id: Iac5726f13039fba818536dc375d38cc3e27aca3a
Reviewed-on: https://plan9port-review.googlesource.com/2741
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-07 18:18:46 +00:00
Russ Cox
310ae03327 all: fix or silence all INSTALL warnings on macOS
Should be a clean build now.

Change-Id: Id3460371cb5e8d4071f8faa9c2aec870d213a067
Reviewed-on: https://plan9port-review.googlesource.com/2781
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-06 21:37:31 +00:00
Russ Cox
9e0d3750c5 9term, win: work around bsd linker nonsense
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318
Reviewed-on: https://plan9port-review.googlesource.com/2780
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-06 20:20:33 +00:00
Russ Cox
d296c18e37 9term, mc: conspire to handle hidpi displays
9term now uses the low bit of ws.ws_ypixel to signal
whether this is a hidpi display, and mc adjusts the font
it uses for columnation accordingly.

Makes 'lc' work right on hidpi displays.

Change-Id: I52928871ffb7f4c6fd6722f3d59f1836379148c6
Reviewed-on: https://plan9port-review.googlesource.com/2760
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-06 15:36:59 +00:00
David du Colombier
657f699ef7 include: define _DEFAULT_SOURCE
Since glibc 2.20, the _BSD_SOURCE and _SVID_SOURCE macros are
deprecated in favor of the _DEFAULT_SOURCE macro.

See https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes

Change-Id: I18dd6a698f3f5aa51d1e45bf53b031bb061e17e8
Reviewed-on: https://plan9port-review.googlesource.com/1500
Reviewed-by: David du Colombier <0intro@gmail.com>
2016-11-20 09:37:58 +00:00
David du Colombier
1b68dbef7b libregexp: various fixes
- Check before dereference.
- Fix memory leak
- Remove duplicate if statement.
- Remove trailing spaces.

Change-Id: I140a05c8f7006493dddae753aebfa5b4577c65ef
Reviewed-on: https://plan9port-review.googlesource.com/1301
Reviewed-by: Neven Sajko <nsajko@gmail.com>
Reviewed-by: Russ Cox <rsc@swtch.com>
2016-11-02 23:17:40 +00:00
Gleydson Soares
2d82ef9d98 fix segfaults on OpenBSD: int cannot hold all the values a ptrdiff_t can take.
Change-Id: I90806e6f2e46a94f38aa0a8a7038aa6599b448b3
Reviewed-on: https://plan9port-review.googlesource.com/2660
Reviewed-by: Russ Cox <rsc@swtch.com>
2016-11-02 23:16:21 +00:00
Russ Cox
c499ab911d fontsrv: do not try to look up surrogate pairs
Change-Id: Ib0a680e123ba02b41e1029e356543c24e8b4647e
Reviewed-on: https://plan9port-review.googlesource.com/1430
Reviewed-by: Russ Cox <rsc@swtch.com>
2016-01-22 11:52:32 +00:00
Gleydson Soares
009b0cb5eb auxstats: fix OpenBSD by using getifaddrs(3) instead of kvm(3)
Change-Id: I6a096ba24809a402911c30406d384d16c03fc96c
Reviewed-on: https://plan9port-review.googlesource.com/1410
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-12-08 16:41:13 +00:00
sqweek
6a93bd5c92 devdraw: cocoa: set window title on main thread
Change-Id: Ie818f9246f749a9d3293019a1e01be4ce7e368b9
Reviewed-on: https://plan9port-review.googlesource.com/1400
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-11-11 15:09:34 +00:00
Russ Cox
8db40354c5 win: local \r cancellation
Change-Id: I4becec052af58c5a52b777004867eb23023b9403
Reviewed-on: https://plan9port-review.googlesource.com/1391
Reviewed-by: Russ Cox <rsc@google.com>
2015-11-10 15:34:42 +00:00
Russ Cox
0d2dfbc84f 9term, win: better \r handling (thanks, git)
Change-Id: I75563b911b54d8957d2d004b9c27d0a2f8f043b3
Reviewed-on: https://plan9port-review.googlesource.com/1390
Reviewed-by: Russ Cox <rsc@google.com>
2015-11-10 15:34:06 +00:00
Russ Cox
44eb208829 mk: avoid infinite loop when targets are repeated
Fixes "mk -f /tmp/x.mk y x" or "mk -f /tmp/x.mk" where /tmp/x.mk is:

x y x: f
	echo hi

Change-Id: I7fa87dc4750c04fdba010b990c190722b432b333
Reviewed-on: https://plan9port-review.googlesource.com/1361
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-08-27 00:36:40 +00:00
Russ Cox
775cb933ec fontsrv: use 64 chars per subfont instead of 256
Makes loading faster, and makes larger sizes not too wide.

Change-Id: I076c83fdb9577c1e596de45558f38ea93e3a2a31
Reviewed-on: https://plan9port-review.googlesource.com/1360
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-08-27 00:36:32 +00:00
Gleydson Soares
71de840f05 upas/nfs: search for stunnele3 in $PATH
Do not hardcode stunnel directory path, just make sure that is installed
in user '$PATH'. it is required for 'mailfs -t' TLS support, so printout
an error string if it was not found.

Tested with latest stunnel version 5.17 on OpenBSD and macosx.

% mailfs -t imap.gmail.com ; echo $?
0

Change-Id: Icbd507c7efa81ef2aa7aed37bec5f639b37526cb
Reviewed-on: https://plan9port-review.googlesource.com/1280
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-06-29 02:25:42 +00:00
Aram Hăvărneanu
3f1c876e14 all: linux/arm64 port
Really trivial port.

Change-Id: Ib2e3ad48df555ca4bd9339ddf79a832be895bd95
Reviewed-on: https://plan9port-review.googlesource.com/1030
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:34:38 +00:00
David du Colombier
7a6f3d9d6d libregexp: fix copy-paste error
Change-Id: I042d63ea62e2abd599bf9767acb3374bb39ddc7d
Reviewed-on: https://plan9port-review.googlesource.com/1050
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:34:13 +00:00
Aram Hăvărneanu
37d81a2915 all: linux/mips port
Change-Id: I0af67bc44c7bb62a8e5a47eac597367f521f1c11
Reviewed-on: https://plan9port-review.googlesource.com/1210
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:34:06 +00:00
Aram Hăvărneanu
0c2926638b all: fix openbsd build
Change-Id: I6eaeebc9b6a4d78ce07efe7680ba8f2eff16462f
Reviewed-on: https://plan9port-review.googlesource.com/1230
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:31:44 +00:00
Sergiusz Urbaniak
fdf6ef3337 acme: add focus change to log
Currently new, put and del events are being logged.
This patch adds a focus event to the log
whenever the user changes the focus to another window.

This lets programs react to files being edited in acme
without the need of being restarted.

Change-Id: Idf35c0d7dbfca30e79724dc9f49e44c6a4eb6a1e
Reviewed-on: https://plan9port-review.googlesource.com/1140
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:31:21 +00:00
marius a. eriksen
d52bdd3356 devdraw: plumb drag-n-dropped files
Change-Id: I7585870aee57c7482ebdd19c117be7982123ce79
Reviewed-on: https://plan9port-review.googlesource.com/1130
Reviewed-by: Russ Cox <rsc@google.com>
2015-06-03 15:26:27 +00:00
Gleydson Soares
25822e8da3 libdraw, acme: fix acme segfault triggered passing an invalid font
acme -f nosuchfont

Change-Id: Iaa727db02b43e63082130796ec97c0efb7fe2b19
Reviewed-on: https://plan9port-review.googlesource.com/1220
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-05-15 02:30:27 +00:00
Russ Cox
3aca22118d fontsrv: fix x11 build
Change-Id: I60eca10d7749ec71dc2ffbb0fbde564a1b711fa1
Reviewed-on: https://plan9port-review.googlesource.com/1180
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-18 14:46:24 +00:00
Russ Cox
4eac378eba devdraw: enable retina behavior by default on OS X
Change-Id: I243a1fe3f9ec0841570c4cd69c02be9cfd9ade50
Reviewed-on: https://plan9port-review.googlesource.com/1172
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17 20:52:59 +00:00
Russ Cox
79555a9987 libdraw: refine hidpi font selection
Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e
Reviewed-on: https://plan9port-review.googlesource.com/1171
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17 20:52:06 +00:00
Russ Cox
213fc4f6fb libdraw: autoscale fonts when moving between low and high dpi screens
Change-Id: I6093955b222db89dfe437fb723593b173d888d01
Reviewed-on: https://plan9port-review.googlesource.com/1170
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17 20:51:23 +00:00
Russ Cox
77f23268f7 libdraw: add 2*font syntax for scaled fonts
An experiment.

Change-Id: I40660a211b8372701597d80f7e86917e94cccbaa
Reviewed-on: https://plan9port-review.googlesource.com/1161
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17 05:58:37 +00:00
Russ Cox
32dc15fa62 fontsrv: use CoreText API on OS X
This gets us font fallback for free and avoids use of a
deprecated API that might go away some day.

Change-Id: I4b9b1a1ce3e6d98bfb407e3baea13f4adfe2c26a
Reviewed-on: https://plan9port-review.googlesource.com/1160
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17 05:00:09 +00:00
Ethan Burns
d67a3d3083 fontsrv: disable X11 hinting
Discussion at:
https://groups.google.com/d/topic/plan9port-dev/L7RVkXPmrdY/discussion
https://github.com/9fans/plan9port/pull/7

Change-Id: I4f3a6791436120388ad8798e519f5e8473dd9306
Reviewed-on: https://plan9port-review.googlesource.com/1095
2014-12-02 01:51:11 +00:00
Merlijn Wajer
9bcee1f034 9pfuse: Disable glibc workaround for O_LARGEFILE on ARM
9pfuse fails on ARM when O_LARGEFILE is supported.
glibc does define O_LARGEFILE properly on ARM,
and the value is different than what that this workaround suggests,
causing it to wrongly detect bad flags.

Change-Id: I02b0cc222ca7785c4b1739c3df3caa17cf7bc265
Reviewed-on: https://plan9port-review.googlesource.com/1094
Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02 01:46:43 +00:00
Russ Cox
fff818fe87 libdraw, libframe, acme: fix, guard against inverted range in textsetselect
Credit to Roi Martin <jroi.martin@gmail.com> for noticing that
libdraw was being passed a negative string length and for finding the
sequence of keystrokes that make acme do it reproducibly.

Change-Id: If3f3d04a25c506175f740d3e887d5d83b5cd1bfe
Reviewed-on: https://plan9port-review.googlesource.com/1092
Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02 01:18:40 +00:00
Roi Martin
d3a47e14e5 devdraw: fix title and "open in top" on OS X
On OSX 10.10, when you open an application that depends on devdraw, the
title bar only shows the first letter of the application's name. The
patch sets a default title as soon as the window is created, which
fixes this issue.

On OSX 10.10, when you open an application that depends on devdraw, this
application is opened in top of other windows, however the menu bar is
not updated. The patch calls topwin() at the end of makewin() in
src/cmd/devdraw/cocoa-screen.m .

Change-Id: Ie036928b5574c8df20ad8b2b54047e2f7a22bb41
Reviewed-on: https://plan9port-review.googlesource.com/1091
Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02 00:51:49 +00:00
Russ Cox
c9ed52730b cmd: rename *.C to *.c
These were *.C back in 2003, before the 9 script, to avoid conflicts
with the system utilities. A later change renamed them, but that
change seems to have been lost during the hg->git conversion
because I ran the conversion on a case-insensitive file system.

Change-Id: Id32c99cb9571ef0e185c3cc9e8c8d6d5b48ca195
2014-11-17 11:21:06 -05:00
David du Colombier
6c7443a653 fix clang 3.4 warnings and ignore uninteresting ones
fixed warnings:
src/cmd/fossil/disk.c:37:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:38:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:39:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:40:13: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:41:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/libndb/ndbreorder.c:41:55: warning: for loop has empty body [-Wempty-body]

ignored warnings:
src/cmd/acid/dbg.y:393:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/lex/parser.y:886:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/rc/syn.y:303:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/units.y:1003:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/libregexp/regcomp.c:19:16: warning: variable 'reprog' is not needed and will not be emitted [-Wunneeded-internal-declaration]

LGTM=rsc
R=rsc
https://codereview.appspot.com/158250043
2014-10-21 14:22:12 +02:00
Russ Cox
2763a6d832 venti/copy: fix bug writing directories that zero truncate
Found by nwf.

TBR=rsc
https://codereview.appspot.com/162860045
2014-10-21 07:25:13 -04:00
Russ Cox
72197f89d4 col: import from plan 9, by popular demand
TBR=rsc
https://codereview.appspot.com/158240043
2014-10-20 20:41:41 -04:00
David du Colombier
fd3496d3ef 9l: link with -lresolv on Linux
LGTM=rsc
R=rsc
https://codereview.appspot.com/136520044
2014-10-20 22:21:43 +02:00
David du Colombier
738e890b19 vbackup: fix compilation on NetBSD (thanks Álvaro Jurado)
On NetBSD 5.0 and upper, mount() require
data_len as a fifth argument.

LGTM=rsc
R=rsc
CC=elbingmiss
https://codereview.appspot.com/111600043
2014-08-06 14:43:21 +02:00
Russ Cox
f5ae255cc3 mc: use $termprog to identify 9term
TBR=rsc
https://codereview.appspot.com/112890043
2014-07-09 10:26:09 -04:00
David du Colombier
32c6e78c6c upas: fix nil pointer dereference
R=rsc
https://codereview.appspot.com/92650043
2014-06-05 18:46:28 +02:00
Russ Cox
c99867c9e0 upas/common: rename aux to auxx
TBR=rsc
https://codereview.appspot.com/107760043
2014-06-03 14:30:52 -04:00
Russ Cox
50ababbd55 acme: fix bufread crash due to typing-point scrolling
Acme tracks the most recent typing insertion point and
the home and end keys stop there on their way
up to the top or down to the bottom of the file.
That point should be iq1, and it should be adjusted
properly so that it's always between 0 and t->file->b.nc inclusive.
(This is all code from an external contributor, years old at this
point but new since Plan 9.)

Somehow, sometimes iq1 ends up a little beyond b.nc,
and when passed to textbacknl it crashes acme in bufread.
I can't see how that can happen but if it does, avoid the crash.

It's tempting to pull the insertion point code out entirely
but this is a little less invasive and should fix things for now.

TBR=rsc
https://codereview.appspot.com/107730043
2014-06-03 00:16:48 -04:00
Russ Cox
6400c9f20c acme: increase timer resolution to 10ms
We ran for a long time with 10ms kernel resolution,
so 10ms user space resolution here should be fine.
Some systems actually provide 1ms sleeps, which
makes this polling use a bit more cpu than we'd like.
Since the timers are for user-visible things, 10ms should
still be far from noticeable.

Reduces acme's cpu usage on Macs when plumber is missing
(and plumbproc is sleeping waiting for it to appear).

LGTM=aram, r
R=r, aram
https://codereview.appspot.com/99570043
2014-06-03 00:09:29 -04:00
Russ Cox
113ea95f7b undo CL 69070045 / 8539a916d98a
This breaks ^C in win windows, as expected.
People use ^C, win expects and handles ^C,
so I don't think we can just take it away.

I've noticed that it is broken but assumed my ssh
was screwed up.

If you want to make WindowsKey+C,X,V do the
operations, by analogy with command+C,X,V
on Mac, that's fine with me.

««« original CL description
acme: copy/cut/paste with ctl+c,x,v

LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045

»»»

TBR=rsc
CC=burns.ethan, r
https://codereview.appspot.com/96410045
2014-05-19 09:39:34 -04:00
David du Colombier
bae34df843 upas: fix warnings
smtp.c:232: warning: comparison with string literal results in unspecified behavior
smtp.c:244: warning: comparison with string literal results in unspecified behavior
marshal.c:1179: warning: variable ‘err’ set but not used

LGTM=rsc
R=rsc
https://codereview.appspot.com/93290043
2014-05-15 06:28:54 +02:00
David du Colombier
954e03ccfe libndb: add AUTOLIB(resolv)
LGTM=rsc
R=rsc
https://codereview.appspot.com/97370043
2014-05-15 06:28:05 +02:00
Russ Cox
45f8ba5414 acme: fix two flush bugs in new log file
TBR=rsc
https://codereview.appspot.com/95010048
2014-05-05 22:28:03 -04:00
Russ Cox
4a3fb87264 acme: add log file in acme root directory
Reading /mnt/acme/log reports a log of window create,
put, and delete events, as they happen. It blocks until the
next event is available.

Example log output:

8 new /Users/rsc/foo.go
8 put /Users/rsc/foo.go
8 del /Users/rsc/foo.go

This lets acme-aware programs react to file writes, for example
compiling code, running a test, or updating an import block.

TBR=r
R=r
https://codereview.appspot.com/89560044
2014-04-30 12:14:29 -04:00
Russ Cox
833216fef8 acme: add comment for aligned writes
TBR=r
https://codereview.appspot.com/89510044
2014-04-19 13:44:06 -04:00
Russ Cox
1d2c3c3945 acme: use buffered i/o to write file
Bakul Shah has observed corrupted files being written
when acme writes over osxfuse to sshfs to a remote file system.
In one example we examined, acme is writing an 0xf03-byte
file in two system calls, first an 0x806-byte write and then a 0x6fd-byte
write. (0x806 is BUFSIZE/sizeof(Rune); this file has no multibyte UTF-8.)

What actually ends up happening is that an 0x806-byte file is written:

        0x000-0x6fd contains what should be 0x806-0xf03
        0x6fd-0x7fa contains zeros
        0x7fa-0x806 contains what should be 0x7fa-0x806 (correct!)

The theory is that fuse or sshfs or perhaps the remote file server is
mishandling the unaligned writes. acme does not seem to be at fault.

Using bio here will make the writes align to 8K boundaries,
avoiding the bugs in whatever underlying piece is broken.

TBR=r
https://codereview.appspot.com/89550043
2014-04-19 10:09:22 -04:00
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
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
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
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
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
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
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
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
Christian Kellermann
1a512ec048 fontsrv: fix build on OpenBSD 5.2
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/6850108
2012-12-11 12:45:45 -05:00
David du Colombier
0b4fd92105 auth/factotum: fix password prompt hang with secstore
R=rsc
http://codereview.appspot.com/6906057
2012-12-09 11:24:30 +01:00
Russ Cox
09adcb0901 fontsrv: make single quotes look like quotes
R=rsc
https://codereview.appspot.com/6864051
2012-12-03 15:55:13 -05:00
Russ Cox
1785490baa fontsrv: scaled pjw
R=rsc
https://codereview.appspot.com/6854130
2012-12-01 00:35:06 -05:00
Russ Cox
c96d832508 acme: retina scaling for scroll bars, button
R=rsc
http://codereview.appspot.com/6854094
2012-11-26 00:33:05 -05:00
Russ Cox
c28224992a samterm: retina scaling for scroll bars, borders
R=rsc
http://codereview.appspot.com/6844083
2012-11-26 00:23:06 -05:00
Russ Cox
a8a0a6422c 9term: adjust to dpi changes
R=rsc
http://codereview.appspot.com/6847105
2012-11-26 00:13:18 -05:00
Russ Cox
58b1904e3e devdraw: fake dpi calculation on Mac
R=rsc
http://codereview.appspot.com/6782115
2012-11-25 23:55:27 -05:00
Russ Cox
cc9547960e libframe: auto scale tick for retina
R=rsc
http://codereview.appspot.com/6850102
2012-11-25 23:48:19 -05:00
Russ Cox
ffaaaf9dae devdraw: use %R not Fn-F3 for retina toggle
R=rsc
http://codereview.appspot.com/6854093
2012-11-25 23:47:54 -05:00
Russ Cox
55905845f3 devdraw: add forcedpi toggled by Fn+F3 on Mac
R=rsc
http://codereview.appspot.com/6846104
2012-11-25 23:38:14 -05:00
Marius Eriksen
2589c5c6ee acme: set $samfile (same as $%) during execution
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6854092
2012-11-25 22:56:08 -05:00
Russ Cox
e19fde3584 fontsrv: work around a few crashes
Probably not the right fix, but gets us going.

R=rsc
http://codereview.appspot.com/6782113
2012-11-25 22:45:32 -05:00
Russ Cox
c6d1f20537 devdraw: fix retina mode
R=rsc
http://codereview.appspot.com/6847104
2012-11-25 22:43:57 -05:00
Russ Cox
9f3851871e libdraw: add scalesize
R=rsc
http://codereview.appspot.com/6855092
2012-11-25 22:15:57 -05:00
Russ Cox
d0e0701913 devdraw, libdraw: add display->dpi
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-25 21:41:52 -05:00
Shenghou Ma
7b9ef735a8 devdraw: restore compilation on OS X 10.6
Also add some ignored files to .hgignore

R=rsc
http://codereview.appspot.com/6842089
2012-11-25 21:20:18 -05:00
Russ Cox
9ca6e21f3d acme: use threadspawnd to avoid changing "." of current process
R=rsc
http://codereview.appspot.com/6736060
2012-10-22 12:32:31 -04:00
Russ Cox
9e4b56e764 libthread: add threadspawnd
R=rsc
http://codereview.appspot.com/6742064
2012-10-22 12:32:09 -04:00
Marius Eriksen
81c2c5e775 acme: add $acmeshell to control execution shell
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6614056
2012-10-21 16:52:08 -04:00
Yuval Pavel Zholkover
9c61127928 fontsrv: x11 support
R=rsc, 0intro
CC=plan9port.codebot
http://codereview.appspot.com/6739047
2012-10-21 16:49:13 -04:00
Rob Kroeger
e13727e3c4 plumb.app: accept plumb:foo as alias for foo
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5495046
2012-10-21 12:53:33 -04:00
Caio Oliveira
e4122a42b9 devdraw: map X11 dead_diaresis to double quote
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6690049
2012-10-21 12:12:00 -04:00
Erik Quanstrom
33cdf63251 libmemdraw: fix int size bug
R=rsc, quanstro
CC=plan9port.codebot
http://codereview.appspot.com/6657043
2012-10-21 12:08:49 -04:00
Russ Cox
c5bfba483f silence more warnings
R=rsc
http://codereview.appspot.com/6744056
2012-10-21 12:04:56 -04:00
Russ Cox
0cfb376070 fix clang warnings reported by Tuncer Ayaz
R=rsc
http://codereview.appspot.com/6744054
2012-10-21 11:25:08 -04:00
Russ Cox
caade78487 lib9: fix Mac warning
R=rsc
http://codereview.appspot.com/6749053
2012-10-20 13:42:39 -04:00
Russ Cox
220c15d2b7 fix gcc 4.7 warnings (thanks Tuncer Ayaz)
R=rsc
http://codereview.appspot.com/6744053
2012-10-20 13:36:52 -04:00
Rob Kroeger
c3feb5c5c1 libframe: use correct text color when painting
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6625065
2012-10-16 13:57:43 -04:00
Rob Kroeger
ef99c9f1ae devdraw: MacBook retina support
Enable with export devdrawretina=1 (everything will be smaller).

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6592072
2012-10-16 13:55:44 -04:00
Russ Cox
60a47420a8 devdraw: prefer 24-bit over 15-bit or 16-bit.
Fixes remote X11 use via XQuartz 2.7.4.

R=rsc
http://codereview.appspot.com/6624058
2012-10-07 09:48:47 -04:00
Erik Quanstrom
5b6028903d acme: correct writes of runes on auspicious byte boundaries
R=rsc, r
CC=plan9port.codebot
http://codereview.appspot.com/6586067
2012-10-05 16:42:25 -04:00
Akshat Kumar
ac3ba726f9 src/cmd: Add a repurposed import(4), called `9import', to the ports.
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-24 10:35:01 -04:00
Russ Cox
37f8ed2410 acme: mouse movement for Del
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-23 22:01:56 -04:00
Russ Cox
9dbe4a0df9 snarfer: disable during build
Don't want to require X11 during OS X build anymore.

R=rsc
http://codereview.appspot.com/6531045
2012-09-18 11:39:24 -04:00
Russ Cox
85504cda14 sam: add $% as an alias for $samfile
R=r
http://codereview.appspot.com/6488137
2012-09-17 14:53:11 -04:00
Russ Cox
54bebe6a69 libdraw: add visibleclicks mode
R=rsc
http://codereview.appspot.com/6501137
2012-09-17 12:39:49 -04:00
David du Colombier
6f568da64e lib9/p9dialparse: fix segfault on gethostbyname
In some situations, gethostbyname can
return an empty address list.

R=rsc
http://codereview.appspot.com/6443097
2012-09-11 17:11:44 +02:00
Ties Bos
d4ccb0a943 9pfuse: fix memory leak, avoid memory explosion
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-10 22:07:26 -04:00
Russ Cox
4db1ecb904 lib9: remove ss_len manipulation in _p9dialparse
Not all systems have ss_len, and we've never set it before.

R=rsc
http://codereview.appspot.com/6497102
2012-09-08 13:53:59 -04:00
Russ Cox
d905d2f5fe 9pfuse: osxfuse support
R=rsc
http://codereview.appspot.com/6503093
2012-09-08 12:49:19 -04:00
Russ Cox
1c99633848 lib9: fix announce on OS X
R=rsc
http://codereview.appspot.com/6495109
2012-09-08 12:49:03 -04:00
David du Colombier
3dade5fe59 lib9/dial: fix addrlen in connect() and bind()
On some systems, the third argument of connect() and bind()
is expected to be the length of the address family instead
of the length of the sockaddr structure.

R=rsc
http://codereview.appspot.com/6489072
2012-09-04 18:45:19 -04:00
Russ Cox
fee1a4639b disk/mkfs,disk/mkext: fix mkdir conflict
R=rsc
http://codereview.appspot.com/6445076
2012-08-05 13:10:47 -04:00
David du Colombier
d24b814167 lib9/getnetconn: add support for IPv6
R=rsc
http://codereview.appspot.com/6457077
2012-08-03 21:25:31 +02:00
David du Colombier
3a616eaa80 vacfs: fix create srv with ORCLOSE on plan 9
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-03 21:12:10 +02:00
David Jeannot
9bcf137376 devdraw: make it 3 times faster on OS X
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-08-03 13:26:46 -04:00
Rob Kroeger
ad4025bd76 devdraw: fix for OS X 10.8 (Mountain Lion)
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-31 11:24:44 -04:00
David du Colombier
4ed8efea38 libventi: fix segfault in vtgetreq
Don't call vtlog() when _vtqrecv() returns
nil on queue hangup, as reported on
http://bitbucket.org/rsc/plan9port/issue/102/

R=rsc
http://codereview.appspot.com/6373046
2012-07-29 18:53:37 -04:00
Russ Cox
d2173bb552 disk/mkfs, disk/mkext: add from Plan 9
R=rsc, rsc
http://codereview.appspot.com/6405057
2012-07-17 19:10:45 -04:00
Russ Cox
20f5692b7f openbsd updates (thanks Pascal Stumpf)
R=rsc
http://codereview.appspot.com/6401049
2012-07-14 10:16:54 -04:00
Russ Cox
c934984537 libmach: remove debug print
R=rsc
http://codereview.appspot.com/6395048
2012-07-14 09:07:10 -04:00
Russ Cox
9d4f8bfecc auth/factotum: fix flush (thanks Erik Quanstrom)
R=rsc
http://codereview.appspot.com/6402044
2012-07-14 08:30:51 -04:00
David du Colombier
d765c37110 lib9: fix openbsd build
Fix build error and warning on OpenBSD 5.1,
as reported by Dimitri Sokolyuk.

R=rsc
http://codereview.appspot.com/6350044
2012-06-27 20:02:03 +02:00
David du Colombier
3409bc9ae1 lib9/dial: add support for IPv6
The function p9dialparse() returns the host as a sockaddr_storage
structure instead of a u32int, to be able to handle both IPv4
and IPv6 addresses. Because the sockaddr_storage structure also
handle port numbers and Unix path names, there is no longer
need to set them in the calling functions. However, these values
are still returned for convenience.

The sockaddr_in and sockaddr_un structures have been replaced
by sockaddr_storage to handle Unix, IPv4 and IPv6 sockets.

Names and addresses are resolved using either gethostbyname()
or getaddrinfo() functions.

The getaddrinfo() function is documented in RFC2553 and standardized
since POSIX.1-2001. It supports both IPv4 and IPv6 addresses.
The gethostbyname() function is deprecated since POSIX.1-2008.
However, some libc implementations don't handle getaddrinfo()
properly, thus we preferred to try gethostbyname() first.

I've tried to preserve most of the old code logic to prevent
from surprising or unwanted behavior.

R=rsc
http://codereview.appspot.com/6255068
2012-06-02 21:50:59 +02:00
Russ Cox
5d03af6557 fix INSTALL warnings
R=rsc
http://codereview.appspot.com/6258060
2012-05-29 15:11:14 -04:00
Abhishek Kulkarni
71ce470a2b venti: fix VtMaxLumpSize
R=rsc, adkulkar
CC=plan9port.codebot
http://codereview.appspot.com/6108047
2012-05-29 13:34:52 -04:00
Russ Cox
c149b06f2e plumb: remove debugging print
R=rsc
http://codereview.appspot.com/6210059
2012-05-15 10:55:53 -04:00
David du Colombier
4ded140a67 venti: remove bloomlookuptime in stats
R=rsc
http://codereview.appspot.com/6197057
2012-05-07 16:20:44 +02:00
David du Colombier
3f79d3ee64 venti: fix bloom in stats
R=rsc
http://codereview.appspot.com/6201049
2012-05-07 15:55:41 +02:00
David du Colombier
d117737d44 venti: fix writedonechan size in bloom
R=rsc
http://codereview.appspot.com/6128063
2012-05-02 06:44:38 +02:00
Russ Cox
e7e953b3da venti: add bootstrap mode (write + no index)
R=rsc, rsc
http://codereview.appspot.com/6097047
2012-04-22 15:27:06 -04:00
Russ Cox
a2df31f46d venti: fix typo
R=rsc
http://codereview.appspot.com/5989059
2012-04-07 15:40:06 -04:00
Russ Cox
20271fedfb venti: add arenapart support to wrarena
R=rsc
http://codereview.appspot.com/5988058
2012-04-07 15:38:59 -04:00
David du Colombier
b27a990f9f vacfs: remove 9P2000.u relic
R=rsc
http://codereview.appspot.com/5970072
2012-04-04 16:51:27 +02:00
David Jeannot
1f4c574440 devdraw: fix mouse warping with multi-monitor on OS X
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5748043
2012-03-05 21:14:34 -05:00
Russ Cox
4a000a28d3 merge 2012-03-05 16:36:31 -05:00
David Jeannot
a319037781 Devdraw now waits for the image: this means that
there is no more blank image when toggling
fullscreen, when unminimizing, or at startup; this
also means that we can live resize, but we only
enable live resizing with Page, because it seems
useless for other apps, and Acme and Sam bug with
it. The tradeoff is that bottom corners are
sometimes automatically rounded. There is a way to
prevent the rounding here:
http://parmanoir.com/Custom_NSThemeFrame
but this would obfuscate the code. Instead, we
make sure that the corners are always rounded.

Closing the window while its content is updated
causes an exception, without this patch. This
seems to happen regularly with stats(1).

This patch avoids a possible deadlock at startup,
which I never experienced. If I recollect right,
there is little chance that this happens on a
multi-core CPU.

Minimizing now activates next app in line, and
Devdraw now stops drawing while minimized.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5499043
2012-03-05 15:54:26 -05:00
David Jeannot
7e2a1983e7 devdraw: fix winsize (-W) on OS X
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5749043
2012-03-05 15:38:59 -05:00
Russ Cox
354c6c32f1 devdraw: fix fullscreen on Lion
Now, if you full-screen an app running on a secondary
screen, it only takes over that monitor.  It does not cause
the primary screen to disappear.

Code by David Jeannot.

R=djeannot24
http://codereview.appspot.com/5708046
2012-02-28 14:56:13 -05:00
Russ Cox
443d628838 libmach, acid, db: 64-bit support 2012-02-19 18:11:39 -05:00
David du Colombier
60d96f2e43 venti: import venti/conf from plan 9
R=rsc
http://codereview.appspot.com/5572066
2012-01-26 17:33:36 +01:00
David du Colombier
83b247a771 libventi: add functions vtsha1 and vtsha1check
These functions are equivalent to vtSha1 and vtSha1Check
from the old libventi and are particularly used by Fossil.

R=rsc
http://codereview.appspot.com/5555064
2012-01-21 10:01:20 +01:00
David Jeannot
f4792e43ae devdraw: enable gestures on OS X
Remove swipe gestures.
Keep only 2-finger pinching and 3-finger tapping.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5498094
2012-01-20 22:31:00 -05:00
David du Colombier
5d434a3ff3 venti: fix settings in stats
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5558054
2012-01-20 13:13:30 -05:00
David Jeannot
fcce05982b devdraw: make OS X resizer unobtrusive
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5558051
2012-01-19 15:14:17 -05:00
David Jeannot
4464a8778d devdraw: on OS X, add menu items "hide" and "plumb devdraw(1)"
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5505092
2012-01-16 17:12:10 -05:00
David Jeannot
10ccf8df0c devdraw: OS X: neutralize menu and Dock bugs in fullscreen mode
Previously, the menu bar has been set to hidden
instead of autohidden in fullscreen mode, because
it appeared too easily.  Occasionally however, it
still appears.  This patch makes sure it won't.

With OS X Lion's fullscreen, the Dock is
autohidden, but sometimes remains hidden.  This
bug comes with visual menu bar bugs
during space transition and when exiting
fullscreen.  Those bugs happen after each
Devdraw's activation, for example.  This patch
neutralizes them.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5502091
2012-01-16 17:11:36 -05:00
David Jeannot
73b0f029e1 devdraw: fix handling of compose key on OS X
This implementation is simpler to understand.  It
removes conflicts with other modifiers and with
the virtual buttons.  Pressing alt during a
sequence now cancels it correctly.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5507049
2012-01-16 17:08:31 -05:00
David Jeannot
a995f469b3 devdraw: remove old OS X code
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5528046
2012-01-16 17:07:24 -05:00
David du Colombier
68e24566b6 vac: fix segfault on DMSYMLINK or DMDEVICE
Fix segfault when the first archived file is DMSYMLINK or DMDEVICE.
Reinitialize the buffer to zero before calling readlink.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5500097
2012-01-16 17:06:41 -05:00
David Jeannot
258cfab2fe acme: claim input focus earlier
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5505091
2012-01-16 17:05:39 -05:00
David Jeannot
e89a71ffdd cocoa devdraw: activation on receiving Ttop messages
(The new variable "willactivate" is in the input
structure "in", which is illogical.  But this
structure will soon be renamed "app".  I postpone
the renaming to avoid conflicts with simultaneous
Codereview issues.)

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5504102
2012-01-16 17:04:28 -05:00