Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into cpp

  • Loading branch information...
commit 11cbc171d59d5f42d5d7106df19ce7f54e366834 2 parents cc95139 + cde04d8
@nelhage authored
Showing with 3 additions and 9 deletions.
  1. +1 −7 bconsole.cpp
  2. +2 −2 uasm/uasm.c
View
8 bconsole.cpp
@@ -11,7 +11,6 @@ static pthread_mutex_t console_mutex;
static pthread_t console_thread;
static struct termios saved_termios;
-static int saved_flags;
static int kbd_char;
extern beta_cpu CPU;
@@ -61,7 +60,7 @@ void* console_process(void *arg UNUSED) {
void console_open(bool interrupt) {
LOG("console_open(%d)", interrupt);
struct termios termios;
- int flags;
+
/* Disable echo */
if(tcgetattr(0, &saved_termios) == 0) {
termios = saved_termios;
@@ -73,10 +72,6 @@ void console_open(bool interrupt) {
signal(SIGIO, SIG_IGN);
- saved_flags = fcntl(0, F_GETFL);
- flags = saved_flags|O_ASYNC;
- fcntl(0, F_SETFL, flags);
-
atexit(console_close);
setvbuf(stdout, NULL, _IONBF, 0);
@@ -98,7 +93,6 @@ void console_open(bool interrupt) {
void console_close() {
tcsetattr(0, TCSANOW, &saved_termios);
- fcntl(0, F_SETFL, saved_flags);
}
void beta_wrchr(int chr) {
View
4 uasm/uasm.c
@@ -77,7 +77,7 @@ struct symbol {
#define SMACRO 3 /* symbol is name of a macro */
struct symbol Dot = { NULL, ".", 0, SASSIGN, -1 }; /* the symbol "." */
-int MaxDotValue = 8192; /* no smaller than 8Kbytes: default for ROMS */
+int MaxDotValue = 8191; /* no smaller than 8Kbytes: default for ROMS */
/* skip to next non-spacing character */
#define skipb(p) while (cinfo[*p] & SPC) p += 1
@@ -1050,7 +1050,7 @@ main(argc,argv)
exit(-1);
} else {
write(romfd, rom, romsize);
- ftruncate(romfd, MaxDotValue);
+ ftruncate(romfd, (MaxDotValue+3)&~3);
close(romfd);
}
Please sign in to comment.
Something went wrong with that request. Please try again.