]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
10 years agodevmouse: differential handling of /dev/mousein buttons
cinap_lenrek [Mon, 7 Oct 2013 04:34:24 +0000 (06:34 +0200)]
devmouse: differential handling of /dev/mousein buttons

10 years agoexportfs: fix more filedescriptor leaks
cinap_lenrek [Mon, 7 Oct 2013 21:18:37 +0000 (23:18 +0200)]
exportfs: fix more filedescriptor leaks

just closing the pipe isnt enough, we have to
close all remaining file descriptors except sfd
before executing sub exportfs.

10 years agoexportfs: fix openmount() rfork flags and filedescriptor leak, silence of on initstr...
cinap_lenrek [Sun, 6 Oct 2013 02:42:46 +0000 (04:42 +0200)]
exportfs: fix openmount() rfork flags and filedescriptor leak, silence of on initstr error

fork child exportfs with new rendezvous group.
fix missing close of pipe filedescriptors on error.
fix missing close of other end of pipe in child.

dont bark when we get eof on the first init string read.
this condition can happen when unmount opens and
immidiately closes a exported srv file.

10 years ago5l: apply richard millers 5l-incfloat patch (from sources)
cinap_lenrek [Sat, 5 Oct 2013 23:49:15 +0000 (01:49 +0200)]
5l: apply richard millers 5l-incfloat patch (from sources)

Generate correct ARM vfp code for x++ where x is single precision float.
Example test program (link with '5l -f'): void _main() { float x; x++;}

10 years agorio: gone windows gone wrong (fix missing recv(x->flushc, nil) when gone but request...
cinap_lenrek [Sat, 5 Oct 2013 20:55:10 +0000 (22:55 +0200)]
rio: gone windows gone wrong (fix missing recv(x->flushc, nil) when gone but request flushing)

10 years agomothra: avoid intermediate rc shell processes, use rfork(RFREND) to isolate rendezvou...
cinap_lenrek [Fri, 4 Oct 2013 19:11:56 +0000 (21:11 +0200)]
mothra: avoid intermediate rc shell processes, use rfork(RFREND) to isolate rendezvous group

10 years agopage: avoid intermediate rc shell processes with using exec, move newwindow() before...
cinap_lenrek [Fri, 4 Oct 2013 19:10:33 +0000 (21:10 +0200)]
page: avoid intermediate rc shell processes with using exec, move newwindow() before forking namespace

use exec to avoid intermediate rc processes.

avoid capturing old namespace in the waiting process by doing the
newwindow() call before it.

10 years agomothra: run page in own note group, close unneeded filedescriptors after forking
cinap_lenrek [Fri, 4 Oct 2013 14:08:19 +0000 (16:08 +0200)]
mothra: run page in own note group, close unneeded filedescriptors after forking

running page in own note group avoids killing it when we
exit mothra.

copypaste dupfds() function from page and use it to close
unneeded file descriptors.

10 years agopage: close stdout, reopen stdout/stderr for external viewer and removed useless...
cinap_lenrek [Fri, 4 Oct 2013 14:03:41 +0000 (16:03 +0200)]
page: close stdout, reopen stdout/stderr for external viewer and removed useless RFNAMEG flag

we are not using stdout (fd=1) and it, so dup nullfd over it.
this drops the old window reference when using with -w flag.

the RFNAMEG flag isnt needed because we are calling newwindow()
which forks the namespace for us.

reopen stdin/stdout for the external viewer to the new window.

10 years agolibdraw: make newwindow() unmount the old window
cinap_lenrek [Fri, 4 Oct 2013 13:57:05 +0000 (15:57 +0200)]
libdraw: make newwindow() unmount the old window

newwindow() used to mount the new window directly on /dev, resulting
in the old window and the new one being mounted over each other.

we now try to unmount the old window from /dev first, mount new
window to /mnt/wsys (replacing the old) and then bind /mnt/wsys
before /dev.

if theres no /mnt/wsys, just mount window directly before /dev.

10 years agoadd sdp(3) from sources
cinap_lenrek [Fri, 4 Oct 2013 11:52:22 +0000 (13:52 +0200)]
add sdp(3) from sources

10 years agomerge
cinap_lenrek [Fri, 4 Oct 2013 00:27:53 +0000 (02:27 +0200)]
merge

10 years agopage: dont tell rio our pid
cinap_lenrek [Fri, 4 Oct 2013 00:26:40 +0000 (02:26 +0200)]
page: dont tell rio our pid

$wsys might be from a remote system so pid will not work.

new rio errors out on mouse/cons instead.

10 years agorio: gone windows, window resize, rectonscreen, goodrect
cinap_lenrek [Fri, 4 Oct 2013 00:17:53 +0000 (02:17 +0200)]
rio: gone windows, window resize, rectonscreen, goodrect

dont rely on postnote to shutdown client. instead, make reads on
cons, kbd and mouse error. when we mount a window system over
exportfs, the pid useless and even dangerous! pid should be
only used by clients forked by rio itself.

fix bug in resized(), goodrect() takes rect in screen coordinates!

make rectonscreen() fix window size if the window doesnt fit
on the screen.

improve goodrect() to check for windows outside of the screen or
bigger than screen without borders visible.

10 years agoio.h: change indentation from spaces to tabs
ppatience0 [Thu, 3 Oct 2013 21:15:11 +0000 (17:15 -0400)]
io.h: change indentation from spaces to tabs

10 years agoether83815: fix `auto neg timed out' error with sis 900 rev 635.
ppatience0 [Thu, 3 Oct 2013 21:13:08 +0000 (17:13 -0400)]
ether83815: fix `auto neg timed out' error with sis 900 rev 635.
the openbsd sis(4) driver does not actually go through the rest
of softreset() with sis cards. also, rev 635 reads the mac address
differently, so copy-paste code from openbsd to handle that.

10 years agomerge
cinap_lenrek [Thu, 3 Oct 2013 15:31:55 +0000 (17:31 +0200)]
merge

10 years agotarfs: make file name safe, canonical and free of . and .. (from sources)
cinap_lenrek [Thu, 3 Oct 2013 15:30:03 +0000 (17:30 +0200)]
tarfs: make file name safe, canonical and free of . and .. (from sources)

10 years agolibmach: fix wrong formating for arm LDRH/STRH/LDRSB/LDRSH (MOVHU/MOVBU) instructions
cinap_lenrek [Wed, 2 Oct 2013 18:52:13 +0000 (20:52 +0200)]
libmach: fix wrong formating for arm LDRH/STRH/LDRSB/LDRSH (MOVHU/MOVBU) instructions

10 years agonusb/ether: add rtl8150 driver, remove unused includes
ppatience0 [Wed, 2 Oct 2013 06:25:43 +0000 (02:25 -0400)]
nusb/ether: add rtl8150 driver, remove unused includes

10 years agofortunes: I think we're done here.
stanley lieber [Wed, 2 Oct 2013 22:02:49 +0000 (18:02 -0400)]
fortunes: I think we're done here.

10 years agovt: dont pollute the outer environment (thanks mischief!)
cinap_lenrek [Wed, 2 Oct 2013 00:25:50 +0000 (02:25 +0200)]
vt: dont pollute the outer environment (thanks mischief!)

10 years agobootrc: +x
cinap_lenrek [Wed, 2 Oct 2013 00:01:43 +0000 (02:01 +0200)]
bootrc: +x

10 years agolib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler...
cinap_lenrek [Tue, 1 Oct 2013 23:36:05 +0000 (01:36 +0200)]
lib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler issue

10 years agoaudiohda: allow manual pin routing, more verbose audiostat, initial mute of al widgets
cinap_lenrek [Sun, 29 Sep 2013 13:44:26 +0000 (15:44 +0200)]
audiohda: allow manual pin routing, more verbose audiostat, initial mute of al widgets

the automatic routing from jack to dac/adc sometimes gets us
a path thats not audible. manually specifying a route path
gets us arround these. the syntax is just a comma separated
list of node ids in the "pin" and "inpin" audioctl commands
instead of a single pin node id.

to find alternative paths, audiostat now lists all the widgets;
not just the pins; and ther input connections.

initially mute all pins and amps of all function groups.
connectpath() and disconnectpath() will mute and unmute
the widgets as required later.

10 years agopkg/list: handle more directory listings
stanley lieber [Sat, 28 Sep 2013 05:57:31 +0000 (01:57 -0400)]
pkg/list: handle more directory listings

10 years agopc kernel: make syscall() return thru forkret() to handle exceptions
cinap_lenrek [Fri, 27 Sep 2013 17:24:45 +0000 (19:24 +0200)]
pc kernel: make syscall() return thru forkret() to handle exceptions

forkret() labels the instructions that can raise exceptions
so they can be handled in trap(). this can happen when
segment descriptors get invalidated.

10 years agofortunes: I gave up, back to 9front. -- Aram
stanley lieber [Thu, 26 Sep 2013 16:22:09 +0000 (12:22 -0400)]
fortunes: I gave up, back to 9front. -- Aram

10 years agotcs: eleminate ambigous html entity runes.
cinap_lenrek [Thu, 26 Sep 2013 13:16:12 +0000 (15:16 +0200)]
tcs: eleminate ambigous html entity runes.

10 years agoaudioac97: remove i/o bar magic, fix ac97mixreset busywait-forever timeout
cinap_lenrek [Thu, 26 Sep 2013 21:34:06 +0000 (23:34 +0200)]
audioac97: remove i/o bar magic, fix ac97mixreset busywait-forever timeout

the standard is i/o bar 0 is the mixer and bar 1 is status/control.
the magic with the bar sizes made it fail in qemu. so removing it
for now as all devices seen so far comply to the standard.

if we ever see a sis7012 where this might be swaped uncomment the i=0;

the busywait timeout is too long in ac97mixreset() because rd/wr
have a timeout on ther own. just remove the busy looping and do
a one second delay after mixer reset. (tested with t23)

10 years agomerge
cinap_lenrek [Wed, 25 Sep 2013 18:27:34 +0000 (20:27 +0200)]
merge

10 years agoreverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)
cinap_lenrek [Thu, 26 Sep 2013 20:24:31 +0000 (22:24 +0200)]
reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)

semaphore locks have much higher overhead than initially presented
in the "Semaphores in Plan9" paper. until the reason for it has been
found out i will revert the changes.

10 years agofix null dereference crash in mothra
jpathy [Tue, 24 Sep 2013 22:50:35 +0000 (15:50 -0700)]
fix null dereference crash in mothra

10 years agosyssem*: eleminate redundant validaddr() checks
cinap_lenrek [Mon, 23 Sep 2013 23:52:20 +0000 (01:52 +0200)]
syssem*: eleminate redundant validaddr() checks

validaddr looks up the segments for an address range
and checks the flags and if the address range lies
within bounds on the segments.

as we'r going to lookup the segment in the syssem*
syscalls anyway, we can do the checks ourselfs avoiding
the double segment array lookups.

the implication of this tho is that now a semaphore cannot
span multiple segments. but this would be highly unusual
given that segments are page aligned.

10 years ago9bootfat: only check for fat at block 0 on floppy drives (thanks aap)
cinap_lenrek [Mon, 23 Sep 2013 19:12:41 +0000 (21:12 +0200)]
9bootfat: only check for fat at block 0 on floppy drives (thanks aap)

smart boot manager has a "FAT" signature in its mbr causing
9bootfat to "detect" it as a fat filesystem and then fails
to find plan9.ini.

there shouldnt be a fat filesystem on harddrives at block 0, only
on floppy drives. but some bioses use floppy drive numbers
for usb harddrives so still check for a partition table.

thanks aap for debugging this.

10 years agodevproc: check for p->dot == nil, run closeproc with up->dot = up->slash
cinap_lenrek [Sun, 22 Sep 2013 17:49:59 +0000 (19:49 +0200)]
devproc: check for p->dot == nil, run closeproc with up->dot = up->slash

p->dot can be nil when process exits (see pexit())

set closeprocs dot to up->slash so it will show up
right in devproc.

10 years agoaudiohda: vmware support (thanks dreadlorde)
cinap_lenrek [Sun, 22 Sep 2013 16:26:52 +0000 (18:26 +0200)]
audiohda: vmware support (thanks dreadlorde)

10 years agomkfs(8): also list -U option in table
cinap_lenrek [Sun, 22 Sep 2013 01:30:04 +0000 (03:30 +0200)]
mkfs(8): also list -U option in table

10 years agorootstub: create directories for mips
cinap_lenrek [Sat, 21 Sep 2013 19:21:18 +0000 (21:21 +0200)]
rootstub: create directories for mips

10 years agomerge
cinap_lenrek [Sat, 21 Sep 2013 18:06:53 +0000 (20:06 +0200)]
merge

10 years agoape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)
cinap_lenrek [Sat, 21 Sep 2013 17:55:52 +0000 (19:55 +0200)]
ape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)

10 years agolibc: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)
cinap_lenrek [Sat, 21 Sep 2013 17:53:27 +0000 (19:53 +0200)]
libc: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)

spinlocks have been changed to use the new semacquire/semrelease
syscalls in combination with atomic compare and swap operations.

10 years agotcs: add html5 rune entities
cinap_lenrek [Sat, 21 Sep 2013 20:17:40 +0000 (22:17 +0200)]
tcs: add html5 rune entities

10 years agohget(1): usage for webpaste
cinap_lenrek [Fri, 20 Sep 2013 15:46:25 +0000 (17:46 +0200)]
hget(1): usage for webpaste

10 years agopushssl(2), pushtls(2): clarify filedescriptor closing
cinap_lenrek [Fri, 20 Sep 2013 15:44:14 +0000 (17:44 +0200)]
pushssl(2), pushtls(2): clarify filedescriptor closing

10 years agomerge
cinap_lenrek [Fri, 20 Sep 2013 15:41:51 +0000 (17:41 +0200)]
merge

10 years agohpost: dont emit /bin/hpost but just hpost
cinap_lenrek [Fri, 20 Sep 2013 15:39:33 +0000 (17:39 +0200)]
hpost: dont emit /bin/hpost but just hpost

just emiting "hpost" makes it simpler to override it as a
rc function.

10 years agorename /rc/bin/ok to /rc/bin/webpaste
stanley lieber [Fri, 20 Sep 2013 15:32:42 +0000 (11:32 -0400)]
rename /rc/bin/ok to /rc/bin/webpaste

10 years agoacid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
cinap_lenrek [Fri, 20 Sep 2013 14:02:10 +0000 (16:02 +0200)]
acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)

go seems to accidently creates ridiculous long symbol names
causing acid to crash.

10 years agomerge
cinap_lenrek [Fri, 20 Sep 2013 13:00:49 +0000 (15:00 +0200)]
merge

10 years ago5c: apply richard millers 5c-nan-cmp patch (from sources)
cinap_lenrek [Fri, 20 Sep 2013 12:58:43 +0000 (14:58 +0200)]
5c: apply richard millers 5c-nan-cmp patch (from sources)

On ARM, it turns out that comparisons with NaN can be made to do the
right thing with no code penalty, by a more careful selection of
condition code values in the subsequent conditional branch.  The
meaning of the CC bits in the PSR is subtly different when they've
been copied from the floating point status register.

Suggested patch is 5c-nan-cmp (works on both vfp and emulated arm7500).

10 years agorc-httpd(8): fix typo (thanks, _trav)
stanley lieber [Fri, 20 Sep 2013 07:09:40 +0000 (03:09 -0400)]
rc-httpd(8): fix typo (thanks, _trav)

10 years agopkg(1): fix for plan9.bell-labs.com; update repository list
stanley lieber [Wed, 18 Sep 2013 19:25:18 +0000 (15:25 -0400)]
pkg(1): fix for plan9.bell-labs.com; update repository list

10 years agoadd /rc/bin/ok, tool for okturing.com pastebin
stanley lieber [Wed, 18 Sep 2013 19:03:50 +0000 (15:03 -0400)]
add /rc/bin/ok, tool for okturing.com pastebin

10 years agofaces: fix callerpc for realloctag in erealloc (thanks qrstuv)
cinap_lenrek [Wed, 18 Sep 2013 07:53:20 +0000 (09:53 +0200)]
faces: fix callerpc for realloctag in erealloc (thanks qrstuv)

10 years agolibevent: drop queued mouse events
cinap_lenrek [Tue, 17 Sep 2013 23:54:22 +0000 (01:54 +0200)]
libevent: drop queued mouse events

the changeset r541ead66e8af:

"libdraw: make ebread() return buffer immidiately if available"

makes mouse sluggish when the program cant keep up as mouse
events queue up. this more or less restores the original
behaviour but only for mouse events.

10 years agokernel: reset up->setargs on sysexec(), fix race with devproc
cinap_lenrek [Tue, 17 Sep 2013 23:07:06 +0000 (01:07 +0200)]
kernel: reset up->setargs on sysexec(), fix race with devproc

up->setargs wasnt reset in sysexec(). also, up->args should only
be exchanged/freed under up->debug qlock. otherwise double free
could happen.

10 years agoether8169, etherdp83820, ethervt6102: fix snprint READSTR bugs (thanks pap)
cinap_lenrek [Tue, 17 Sep 2013 01:08:32 +0000 (03:08 +0200)]
ether8169, etherdp83820, ethervt6102: fix snprint READSTR bugs (thanks pap)

should probably use seprint() instead.

10 years agorio: translate window when scaling results in bad window rect on screen resize
cinap_lenrek [Mon, 16 Sep 2013 23:30:35 +0000 (01:30 +0200)]
rio: translate window when scaling results in bad window rect on screen resize

when the screen is resized, we scale the windows to
match the new screen size. when the screen is too
small tho, the scaled down window rect might result
in a bad window rect. before, we kept the window
in its original position and size making it possible
to move a window out of the screen by resizing its
outer rio.

now, if we get a bad rectangle after scaling, we
just tralslate position to the new scaled r.min
point but preserve its orginal size. this keeps
the window always accessible.

10 years agofaces: fix minor image memory leak
cinap_lenrek [Mon, 16 Sep 2013 22:45:11 +0000 (00:45 +0200)]
faces: fix minor image memory leak

10 years agorio: fix Xfidwrite memory leak on flush
cinap_lenrek [Mon, 16 Sep 2013 15:28:49 +0000 (17:28 +0200)]
rio: fix Xfidwrite memory leak on flush

10 years agoapm: fix wrong segment load, zero segment registers
cinap_lenrek [Mon, 16 Sep 2013 14:23:51 +0000 (16:23 +0200)]
apm: fix wrong segment load, zero segment registers

we loaded APMDSEG instead of APMDSEL into DS. (ouch!)

its not really clear why we loaded DS (wong) in the
first place as bios is supposed to do this. for the
machines where this worked it could have no effect
anyway because it was wrong so removing the DS load
and just zero all segment registers.

10 years agolibauth: add sanity check for auth_proxy write size
cinap_lenrek [Mon, 16 Sep 2013 01:56:53 +0000 (03:56 +0200)]
libauth: add sanity check for auth_proxy write size

10 years agoaux/statusbar, aux/statusmsg: dont fork in background for window, cleanup
cinap_lenrek [Mon, 16 Sep 2013 00:10:18 +0000 (02:10 +0200)]
aux/statusbar, aux/statusmsg: dont fork in background for window, cleanup

10 years agoe820: handle duplicate and overlapping e820 entries, handle overflows
cinap_lenrek [Mon, 16 Sep 2013 21:36:06 +0000 (23:36 +0200)]
e820: handle duplicate and overlapping e820 entries, handle overflows

new algorithm:

sort entries by top address first. then for each entry we use:

base = max(base, last)

so we'll never map the same addresses twice.

10 years agokbdfs: set exit status
cinap_lenrek [Sun, 15 Sep 2013 14:22:21 +0000 (16:22 +0200)]
kbdfs: set exit status

10 years agonusb/serial: set exit status
cinap_lenrek [Sun, 15 Sep 2013 14:21:43 +0000 (16:21 +0200)]
nusb/serial: set exit status

10 years agovncs: fix cmdpid fork bug
cinap_lenrek [Sun, 15 Sep 2013 14:04:32 +0000 (16:04 +0200)]
vncs: fix cmdpid fork bug

we cannot do:

cmdpid = rfork(... RFMEM);

because cmdpid is a global variable in the data segment
and hence shared between parent and child process. use a
temporary variable on the stack.

10 years agovncv: fix missing free for window label
cinap_lenrek [Sun, 15 Sep 2013 13:14:12 +0000 (15:14 +0200)]
vncv: fix missing free for window label

10 years agoupas/fs: fix potential filedescriptor leaks
cinap_lenrek [Sun, 15 Sep 2013 12:45:57 +0000 (14:45 +0200)]
upas/fs: fix potential filedescriptor leaks

10 years agopmmc: add support for Ricoh 5U23 SD/MMC controller
cinap_lenrek [Sat, 14 Sep 2013 23:24:08 +0000 (01:24 +0200)]
pmmc: add support for Ricoh 5U23 SD/MMC controller

10 years agotls: fix various tlsClient()/tlsServer() related bugs
cinap_lenrek [Sat, 14 Sep 2013 17:19:08 +0000 (19:19 +0200)]
tls: fix various tlsClient()/tlsServer() related bugs

- TLSconn structure on stack but not initialized (zeroed)
- original filedescriptor double closed in error case
- original filedescriptor leaked in success case
- leaked TLSconn.sessionID and TLSconn.cert
- clarify in pushtls(2) and pushssl(2)

10 years agoacme: use threadexitsall() to tear down mouse and keyboard procs on error
cinap_lenrek [Wed, 11 Sep 2013 19:23:45 +0000 (21:23 +0200)]
acme: use threadexitsall() to tear down mouse and keyboard procs on error

10 years agopci: fix compiler warning about unused variables
cinap_lenrek [Sun, 8 Sep 2013 22:51:36 +0000 (00:51 +0200)]
pci: fix compiler warning about unused variables

10 years agomp/pci: msi support for hypertransport platform
cinap_lenrek [Sun, 8 Sep 2013 22:44:08 +0000 (00:44 +0200)]
mp/pci: msi support for hypertransport platform

10 years agodossrv(4): remove reference to a:, b:, c:, d: and 9fat:
cinap_lenrek [Sun, 8 Sep 2013 18:59:09 +0000 (20:59 +0200)]
dossrv(4): remove reference to a:, b:, c:, d: and 9fat:

10 years agocpu, ratrace, trace: remove unused #include <bio.h>
cinap_lenrek [Sun, 8 Sep 2013 18:34:58 +0000 (20:34 +0200)]
cpu, ratrace, trace: remove unused #include <bio.h>

10 years agomd5sum, srv: remove unused #include <bio.h>
cinap_lenrek [Sun, 8 Sep 2013 17:52:44 +0000 (19:52 +0200)]
md5sum, srv: remove unused #include <bio.h>

10 years agomerge
cinap_lenrek [Sun, 8 Sep 2013 17:30:27 +0000 (19:30 +0200)]
merge

10 years agosha1sum: remove unused #include <bio.h> (thanks BurnZeZ)
cinap_lenrek [Sun, 8 Sep 2013 17:25:55 +0000 (19:25 +0200)]
sha1sum: remove unused #include <bio.h> (thanks BurnZeZ)

10 years agofortunes: "Not here, not here the darkness, in this twittering world." -- T.S. Eliot
stanley lieber [Sun, 8 Sep 2013 02:48:28 +0000 (22:48 -0400)]
fortunes: "Not here, not here the darkness, in this twittering world." -- T.S. Eliot

10 years agoarchacpi: make pcibusno() work on non pci bridges (fixes pciaddr()), distribute irqs...
cinap_lenrek [Sun, 8 Sep 2013 00:33:25 +0000 (02:33 +0200)]
archacpi: make pcibusno() work on non pci bridges (fixes pciaddr()), distribute irqs in setuplink(), remove debug prints

10 years agoacme: avoid useless tagline/window redraw if not needed
cinap_lenrek [Sat, 7 Sep 2013 18:07:00 +0000 (20:07 +0200)]
acme: avoid useless tagline/window redraw if not needed

window resize is only neccesary if tagline changed.

10 years agomk: handle rc blocks in shell quote
cinap_lenrek [Sat, 7 Sep 2013 16:42:40 +0000 (18:42 +0200)]
mk: handle rc blocks in shell quote

this is so we cna handle:

foo = `{echo `{echo bar}}

thanks to erik and friedrich psiorz on 9fans for
bringing the issue up.

10 years agolibaml: fix formating
cinap_lenrek [Sat, 7 Sep 2013 14:22:35 +0000 (16:22 +0200)]
libaml: fix formating

10 years agolibaml: fix uninitialized variable in getle(), make amleval() work with buildin methods
cinap_lenrek [Sat, 7 Sep 2013 14:14:08 +0000 (16:14 +0200)]
libaml: fix uninitialized variable in getle(), make amleval() work with buildin methods

10 years agolibaml: use FP->env to access method arguments instead of FP->arg in evalosi()
cinap_lenrek [Sat, 7 Sep 2013 12:50:17 +0000 (14:50 +0200)]
libaml: use FP->env to access method arguments instead of FP->arg in evalosi()

10 years agoarchacpi: implement amldelay(), remove unused variable in setuplink()
cinap_lenrek [Sat, 7 Sep 2013 12:41:08 +0000 (14:41 +0200)]
archacpi: implement amldelay(), remove unused variable in setuplink()

10 years agolibaml: amldelay(), _OSI(), fix bug in Load() (from plhk's acpi patch)
cinap_lenrek [Sat, 7 Sep 2013 12:40:24 +0000 (14:40 +0200)]
libaml: amldelay(), _OSI(), fix bug in Load() (from plhk's acpi patch)

export amldelay() for microsecond sleeps.

implement _OSI() method.

fix rwreg argument in evalload()

10 years agolibc: set malloctag for runesmprint()
cinap_lenrek [Fri, 6 Sep 2013 14:55:13 +0000 (16:55 +0200)]
libc: set malloctag for runesmprint()

10 years agoscram: remove amlalloc()/amlfree()
cinap_lenrek [Fri, 6 Sep 2013 14:54:02 +0000 (16:54 +0200)]
scram: remove amlalloc()/amlfree()

these are now part of libaml but can still be overridden
when needed.

10 years agoarchacpi: experimental handling of interrupt link devices, io access
cinap_lenrek [Fri, 6 Sep 2013 14:50:43 +0000 (16:50 +0200)]
archacpi: experimental handling of interrupt link devices, io access

10 years agolibaml: new io interface, add amlnew()/amltake()/amldrop(), late binding names, FindS...
cinap_lenrek [Fri, 6 Sep 2013 14:48:27 +0000 (16:48 +0200)]
libaml: new io interface, add amlnew()/amltake()/amldrop(), late binding names, FindSetLeftBit/FindSetRightBit

new io interface was added. user defines amlmapio() and amlunmapio() functions
that will fill out Amlio structure with function pointers to read/write
routines for a particular region.

amlnew() function added allowing the creation of aml objects like buffers
or packages. these can be passed to amleval() with b, p or * format.

amltake()/amldrop() exclude an aml object from garbage collection.

on load, names are not always resolvable until the whole table is loaded.
for this, we create n objects that are just name strings. after load, we
recursively traverse the namespace and resolve them (see fixnames()).

the FindSetLeftBit and FindSetRightBit opcodes got implemened.

10 years agolibhtml: fix potential linked list corruption
cinap_lenrek [Wed, 4 Sep 2013 22:55:58 +0000 (00:55 +0200)]
libhtml: fix potential linked list corruption

the difficulty is freeing items while parsing because items might already
be linked into various linked lists like in docinfo.images or form.fiels.
so we link images, tables and formfields to the docinfo as the final step
of getitems() pass using the new recursive function linkitems(). as only
reachable items get linked theres no danger of dangeling pointers.

10 years agoabaco: fix memory leaks
cinap_lenrek [Wed, 4 Sep 2013 19:27:59 +0000 (21:27 +0200)]
abaco: fix memory leaks

10 years agolibhtml: fix memory leaks
cinap_lenrek [Wed, 4 Sep 2013 19:27:15 +0000 (21:27 +0200)]
libhtml: fix memory leaks

10 years agowebfs: add exits(0) to main()
cinap_lenrek [Tue, 3 Sep 2013 19:27:48 +0000 (21:27 +0200)]
webfs: add exits(0) to main()

10 years agolibhtml: fix double free of form action
cinap_lenrek [Mon, 2 Sep 2013 21:18:46 +0000 (23:18 +0200)]
libhtml: fix double free of form action

10 years ago9bootfat: always try plan9 partition even when not marked active, fix bug
cinap_lenrek [Sun, 1 Sep 2013 19:18:11 +0000 (21:18 +0200)]
9bootfat: always try plan9 partition even when not marked active, fix bug

always look for 9fat in plan9 partition even tho the partition
is *not* maked active. marking partitions active is not
recommended anymore with grub so this makes life easier for
some people. multiple plan9 partitions on a single drive
is not supported.

have to copy partition table as buf gets trashed when reading
first block of fat partition. it worked only when the first
fat partition found (the one marked active) was the right one,
but conffat() can fail.

10 years agojpg(1), jpg: add -y flag to usage
ppatience0 [Sat, 31 Aug 2013 17:39:51 +0000 (13:39 -0400)]
jpg(1), jpg: add -y flag to usage

png: colorspace will never be CYCbCr (this is no
doubt from copy-pasting from jpg)

tif: everyone else uses colorspace as a function
argument, so we will too

readtif, writetif: credit paul bourke