Skip to content

Commit

Permalink
Merge branch 'master' into cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Jun 1, 2011
2 parents cc95139 + cde04d8 commit 11cbc17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions bconsole.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions uasm/uasm.c
Expand Up @@ -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
Expand Down Expand Up @@ -1050,7 +1050,7 @@ main(argc,argv)
exit(-1);
} else {
write(romfd, rom, romsize);
ftruncate(romfd, MaxDotValue);
ftruncate(romfd, (MaxDotValue+3)&~3);
close(romfd);
}

Expand Down

0 comments on commit 11cbc17

Please sign in to comment.