mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
little things
This commit is contained in:
parent
e21fee604e
commit
1aa4e9c82e
5 changed files with 14 additions and 2069 deletions
|
@ -82,6 +82,7 @@ int procrfork(void (*f)(void *arg), void *arg, unsigned int stacksize, int flag
|
|||
void** procdata(void);
|
||||
void threadexec(Channel *, int[3], char *, char *[]);
|
||||
void threadexecl(Channel *, int[3], char *, ...);
|
||||
int threadspawn(int[3], char*, char*[]);
|
||||
int recv(Channel *c, void *v);
|
||||
void* recvp(Channel *c);
|
||||
unsigned long recvul(Channel *c);
|
||||
|
|
|
@ -12,13 +12,6 @@ DIRS=`ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"`
|
|||
|
||||
dir-all dir-install: $PLAN9/bin/9yacc
|
||||
|
||||
XLIB=draw bio 9
|
||||
$O.clock: clock.$O ${XLIB:%=$PLAN9/lib/lib%.a}
|
||||
$LD -o $target $prereq -L$X11/lib -lX11
|
||||
|
||||
$O.tweak: tweak.$O ${XLIB:%=$PLAN9/lib/lib%.a}
|
||||
$LD -o $target $prereq -L$X11/lib -lX11
|
||||
|
||||
%.tab.h %.tab.c: %.y
|
||||
$YACC $YFLAGS -s $stem $prereq
|
||||
|
||||
|
|
2058
src/cmd/tweak.c
2058
src/cmd/tweak.c
File diff suppressed because it is too large
Load diff
|
@ -96,7 +96,9 @@ __xtoplan9kbd(XEvent *e)
|
|||
k = '\n';
|
||||
break;
|
||||
case XK_Alt_L:
|
||||
case XK_Meta_L: /* Shift Alt on PCs */
|
||||
case XK_Alt_R:
|
||||
case XK_Meta_R: /* Shift Alt on PCs */
|
||||
k = Kalt;
|
||||
break;
|
||||
default: /* not ISO-1 or tty control */
|
||||
|
@ -117,7 +119,6 @@ __xtoplan9kbd(XEvent *e)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* BUG: could/should do Alt translation here! */
|
||||
return k+0;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "threadimpl.h"
|
||||
|
||||
static void efork(int[3], int[2], char*, char**);
|
||||
static void
|
||||
static int
|
||||
_threadexec(Channel *pidc, int fd[3], char *prog, char *args[], int freeargs)
|
||||
{
|
||||
int pfd[2];
|
||||
|
@ -63,18 +63,26 @@ _threadexec(Channel *pidc, int fd[3], char *prog, char *args[], int freeargs)
|
|||
sendul(pidc, pid);
|
||||
|
||||
_threaddebug(DBGEXEC, "threadexec schedexecwait");
|
||||
threadexits(0);
|
||||
return pid;
|
||||
|
||||
Bad:
|
||||
_threaddebug(DBGEXEC, "threadexec bad %r");
|
||||
if(pidc)
|
||||
sendul(pidc, ~0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
threadexec(Channel *pidc, int fd[3], char *prog, char *args[])
|
||||
{
|
||||
_threadexec(pidc, fd, prog, args, 0);
|
||||
if(_threadexec(pidc, fd, prog, args, 0) >= 0)
|
||||
threadexits(nil);
|
||||
}
|
||||
|
||||
int
|
||||
threadspawn(int fd[3], char *prog, char *args[])
|
||||
{
|
||||
return _threadexec(nil, fd, prog, args, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue