aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/page/page.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-03-20 02:25:59 +0000
committerrsc <devnull@localhost>2006-03-20 02:25:59 +0000
commit17157e4aa85baea6c1503e2c95d98ed66a1596f1 (patch)
tree0d5170a9f88cb8f25e2d824d0b96f57b968d426a /src/cmd/page/page.c
parent7bd7fd2f4f6fb39400f6f64feb7ec9cba89cf3a3 (diff)
downloadplan9port-17157e4aa85baea6c1503e2c95d98ed66a1596f1.tar.gz
plan9port-17157e4aa85baea6c1503e2c95d98ed66a1596f1.tar.bz2
plan9port-17157e4aa85baea6c1503e2c95d98ed66a1596f1.zip
update lucida
Diffstat (limited to 'src/cmd/page/page.c')
-rw-r--r--src/cmd/page/page.c59
1 files changed, 3 insertions, 56 deletions
diff --git a/src/cmd/page/page.c b/src/cmd/page/page.c
index 3669ebfb..4c76e033 100644
--- a/src/cmd/page/page.c
+++ b/src/cmd/page/page.c
@@ -1,6 +1,7 @@
#include <u.h>
#include <libc.h>
#include <draw.h>
+#include <cursor.h>
#include <event.h>
#include <bio.h>
#include "page.h"
@@ -19,43 +20,6 @@ int wctlfd = -1;
int stdinfd;
int truecolor;
int imagemode;
-int notewatcher;
-int notegp;
-
-int
-watcher(void *v, char *x)
-{
- USED(v);
-
- if(strcmp(x, "die") != 0)
- postnote(PNGROUP, notegp, x);
- _exits(0);
- return 0;
-}
-
-int
-bell(void *u, char *x)
-{
- if(x && strcmp(x, "hangup") == 0)
- _exits(0);
-
- if(x && strstr(x, "die") == nil)
- fprint(2, "postnote %d: %s\n", getpid(), x);
-
- /* alarms come from the gs monitor */
- if(x && strstr(x, "alarm")){
- postnote(PNGROUP, getpid(), "die (gs error)");
- postnote(PNPROC, notewatcher, "die (gs error)");
- }
-
- /* function mentions u so that it's in the stack trace */
- if((u == nil || u != x) && doabort)
- abort();
-
-/* fprint(2, "exiting %d\n", getpid()); */
- wexits("note");
- return 0;
-}
static int
afmt(Fmt *fmt)
@@ -128,23 +92,7 @@ main(int argc, char **argv)
usage();
}ARGEND;
- notegp = getpid();
-
- switch(notewatcher = fork()){
- case -1:
- sysfatal("fork\n");
- exits(0);
- default:
- break;
- case 0:
- atnotify(watcher, 1);
- for(;;)
- sleep(1000);
- _exits(0);
- }
-
rfork(RFNOTEG);
- atnotify(bell, 1);
readstdin = 0;
if(imagemode == 0 && argc == 0){
@@ -159,6 +107,8 @@ main(int argc, char **argv)
fmtinstall('R', Rfmt);
fmtinstall('P', Pfmt);
+ if(mknewwindow)
+ newwin();
if(readstdin){
b = nil;
@@ -229,8 +179,5 @@ main(int argc, char **argv)
void
wexits(char *s)
{
- if(s && *s && strcmp(s, "note") != 0 && mknewwindow)
- sleep(10*1000);
- postnote(PNPROC, notewatcher, "die");
exits(s);
}