aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/9term')
-rw-r--r--src/cmd/9term/Darwin.c21
-rw-r--r--src/cmd/9term/wind.c9
2 files changed, 18 insertions, 12 deletions
diff --git a/src/cmd/9term/Darwin.c b/src/cmd/9term/Darwin.c
index 0bd4ece7..369f7da2 100644
--- a/src/cmd/9term/Darwin.c
+++ b/src/cmd/9term/Darwin.c
@@ -2,16 +2,19 @@
#include "bsdpty.c"
#undef getpts
-#include <util.h>
-
int
getpts(int fd[], char *slave)
{
- if(openpty(&fd[1], &fd[0], NULL, NULL, NULL) >= 0){
- fchmod(fd[1], 0620);
- strcpy(slave, ttyname(fd[0]));
- return 0;
- }
- sysfatal("no ptys");
- return 0;
+ fd[1] = posix_openpt(ORDWR);
+ if (fd[1] >= 0) {
+ grantpt(fd[1]);
+ unlockpt(fd[1]);
+ fchmod(fd[1], 0620);
+ strcpy(slave, ptsname(fd[1]));
+ if ((fd[0] = open(slave, ORDWR)) >= 0)
+ return 0;
+ close(fd[1]);
+ }
+ sysfatal("no ptys");
+ return 0;
}
diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c
index 7dc20443..13be22bc 100644
--- a/src/cmd/9term/wind.c
+++ b/src/cmd/9term/wind.c
@@ -53,9 +53,12 @@ wmk(Image *i, Mousectl *mc, Channel *ck, Channel *cctl, int scrolling)
/* greys are multiples of 0x11111100+0xFF, 14* being palest */
grey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xEEEEEEFF);
darkgrey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF);
- cols[BACK] = display->white;
- cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);
- cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x999999FF);
+ //cols[BACK] = display->white;
+ cols[BACK] = allocimagemix(display, DPaleyellow, DWhite);
+ //cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);
+ cols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkyellow);
+ //cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x999999FF);
+ cols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DYellowgreen);
cols[TEXT] = display->black;
cols[HTEXT] = display->black;
titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreygreen);