Get cgaputc and consputc back on the same page
This commit is contained in:
		
							parent
							
								
									5bf11c50b5
								
							
						
					
					
						commit
						08eef9eae5
					
				
					 1 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
					@ -136,8 +136,7 @@ cgaputc(int c)
 | 
				
			||||||
  if(c == '\n')
 | 
					  if(c == '\n')
 | 
				
			||||||
    pos += 80 - pos%80;
 | 
					    pos += 80 - pos%80;
 | 
				
			||||||
  else if(c == BACKSPACE){
 | 
					  else if(c == BACKSPACE){
 | 
				
			||||||
    if(pos > 0)
 | 
					    if(pos > 0) --pos;
 | 
				
			||||||
      crt[--pos] = ' ' | 0x0700;
 | 
					 | 
				
			||||||
  } else
 | 
					  } else
 | 
				
			||||||
    crt[pos++] = (c&0xff) | 0x0700;  // black on white
 | 
					    crt[pos++] = (c&0xff) | 0x0700;  // black on white
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					@ -164,15 +163,12 @@ consputc(int c)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(c == BACKSPACE){
 | 
					  if(c == BACKSPACE){
 | 
				
			||||||
    uartputc('\b');
 | 
					    uartputc('\b'); uartputc(' '); uartputc('\b');
 | 
				
			||||||
    uartputc(' ');
 | 
					 | 
				
			||||||
    uartputc('\b');
 | 
					 | 
				
			||||||
  } else
 | 
					  } else
 | 
				
			||||||
    uartputc(c);
 | 
					    uartputc(c);
 | 
				
			||||||
  cgaputc(c);
 | 
					  cgaputc(c);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//PAGEBREAK: 50
 | 
					 | 
				
			||||||
#define INPUT_BUF 128
 | 
					#define INPUT_BUF 128
 | 
				
			||||||
struct {
 | 
					struct {
 | 
				
			||||||
  struct spinlock lock;
 | 
					  struct spinlock lock;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue