Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' into cpp

  • Loading branch information...
commit 11cbc171d59d5f42d5d7106df19ce7f54e366834 2 parents cc95139 + cde04d8
Nelson Elhage authored

Showing 2 changed files with 3 additions and 9 deletions. Show diff stats Hide diff stats

  1. +1 7 bconsole.cpp
  2. +2 2 uasm/uasm.c
8 bconsole.cpp
@@ -11,7 +11,6 @@ static pthread_mutex_t console_mutex;
11 11 static pthread_t console_thread;
12 12
13 13 static struct termios saved_termios;
14   -static int saved_flags;
15 14 static int kbd_char;
16 15 extern beta_cpu CPU;
17 16
@@ -61,7 +60,7 @@ void* console_process(void *arg UNUSED) {
61 60 void console_open(bool interrupt) {
62 61 LOG("console_open(%d)", interrupt);
63 62 struct termios termios;
64   - int flags;
  63 +
65 64 /* Disable echo */
66 65 if(tcgetattr(0, &saved_termios) == 0) {
67 66 termios = saved_termios;
@@ -73,10 +72,6 @@ void console_open(bool interrupt) {
73 72
74 73 signal(SIGIO, SIG_IGN);
75 74
76   - saved_flags = fcntl(0, F_GETFL);
77   - flags = saved_flags|O_ASYNC;
78   - fcntl(0, F_SETFL, flags);
79   -
80 75 atexit(console_close);
81 76
82 77 setvbuf(stdout, NULL, _IONBF, 0);
@@ -98,7 +93,6 @@ void console_open(bool interrupt) {
98 93
99 94 void console_close() {
100 95 tcsetattr(0, TCSANOW, &saved_termios);
101   - fcntl(0, F_SETFL, saved_flags);
102 96 }
103 97
104 98 void beta_wrchr(int chr) {
4 uasm/uasm.c
@@ -77,7 +77,7 @@ struct symbol {
77 77 #define SMACRO 3 /* symbol is name of a macro */
78 78
79 79 struct symbol Dot = { NULL, ".", 0, SASSIGN, -1 }; /* the symbol "." */
80   -int MaxDotValue = 8192; /* no smaller than 8Kbytes: default for ROMS */
  80 +int MaxDotValue = 8191; /* no smaller than 8Kbytes: default for ROMS */
81 81
82 82 /* skip to next non-spacing character */
83 83 #define skipb(p) while (cinfo[*p] & SPC) p += 1
@@ -1050,7 +1050,7 @@ main(argc,argv)
1050 1050 exit(-1);
1051 1051 } else {
1052 1052 write(romfd, rom, romsize);
1053   - ftruncate(romfd, MaxDotValue);
  1053 + ftruncate(romfd, (MaxDotValue+3)&~3);
1054 1054 close(romfd);
1055 1055 }
1056 1056

0 comments on commit 11cbc17

Please sign in to comment.
Something went wrong with that request. Please try again.