Formatted

This commit is contained in:
Devine Lu Linvega 2023-03-18 11:12:48 -07:00
parent 5ef6a7a98a
commit 5917f409c5
2 changed files with 6 additions and 8 deletions

View File

@ -226,7 +226,7 @@ int
main(int argc, char **argv)
{
Uxn u;
int i,n;
int i, n;
char expirations[8];
char coninp[CONINBUFSIZE];
struct pollfd fds[3];
@ -263,12 +263,10 @@ main(int argc, char **argv)
read(fds[1].fd, expirations, 8); /* Indicate we handled the timer */
uxn_eval(&u, GETVEC(&u.dev[0x20])); /* Call the vector once, even if the timer fired multiple times */
}
if ((fds[2].revents & POLLIN)!=0)
{
n = read(fds[2].fd, coninp, CONINBUFSIZE-1);
if((fds[2].revents & POLLIN) != 0) {
n = read(fds[2].fd, coninp, CONINBUFSIZE - 1);
coninp[n] = 0;
for (i=0;i<n;i++)
{
for(i = 0; i < n; i++) {
console_input(&u, coninp[i]);
}
}

View File

@ -37,8 +37,8 @@ console_input(Uxn *u, char c)
static void
console_deo(Uint8 *d, Uint8 port)
{
FILE *fd = port == 0x8 ? stdout : port == 0x9 ? stderr
: 0;
FILE *fd = port == 0x8 ? stdout : port == 0x9 ? stderr :
0;
if(fd) {
fputc(d[port], fd);
fflush(fd);