jcs's openbsd hax
openbsd

move getchar() into libsa where applicable

ok miod@

jasper 825dcd8d c0d3cd1c

+110 -260
+4 -3
sys/arch/amd64/stand/boot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.26 2013/12/28 15:16:28 jsing Exp $ 1 + # $OpenBSD: Makefile,v 1.27 2014/07/12 21:54:57 jasper Exp $ 2 2 3 3 COPTS?= 4 4 MAN?= boot.8 ··· 33 33 .endif 34 34 35 35 .PATH: ${S}/lib/libsa 36 - SRCS+= alloc.c ctime.c exit.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ 37 - strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c strtoll.c 36 + SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \ 37 + snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ 38 + strtoll.c 38 39 SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \ 39 40 lseek.c open.c read.c readdir.c stat.c 40 41 SRCS+= elf32.c elf64.c loadfile.c
+2 -2
sys/arch/amd64/stand/cdboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.22 2013/12/28 02:51:06 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.23 2014/07/12 21:54:57 jasper Exp $ 2 2 3 3 MAN= cdboot.8 4 4 ··· 24 24 SRCS+= cmd.c vars.c bootarg.c 25 25 26 26 .PATH: ${S}/lib/libsa 27 - SRCS+= alloc.c exit.c strcmp.c strlen.c \ 27 + SRCS+= alloc.c exit.c getchar.c strcmp.c strlen.c \ 28 28 strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ 29 29 strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c 30 30 SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c lseek.c \
+1 -17
sys/arch/amd64/stand/libsa/dev_i386.c
··· 1 - /* $OpenBSD: dev_i386.c,v 1.13 2012/10/30 14:06:29 jsing Exp $ */ 1 + /* $OpenBSD: dev_i386.c,v 1.14 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 1996-1999 Michael Shalayeff ··· 189 189 pch_pos++; 190 190 break; 191 191 } 192 - } 193 - 194 - int 195 - getchar(void) 196 - { 197 - register int c = cngetc(); 198 - 199 - if (c == '\r') 200 - c = '\n'; 201 - 202 - if ((c < ' ' && c != '\n') || c == '\177') 203 - return c; 204 - 205 - putchar(c); 206 - 207 - return c; 208 192 } 209 193 210 194 char ttyname_buf[8];
+2 -2
sys/arch/amd64/stand/pxeboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.18 2013/12/28 02:51:07 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.19 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 MAN= pxeboot.8 4 4 ··· 26 26 SRCS+= boot.c cmd.c vars.c bootarg.c 27 27 28 28 .PATH: ${S}/lib/libsa 29 - SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \ 29 + SRCS+= alloc.c exit.c getchar.c getfile.c gets.c globals.c strcmp.c strlen.c \ 30 30 strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ 31 31 strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c strlcat.c 32 32 SRCS+= aes_xts.c explicit_bzero.c hmac_sha1.c pbkdf2.c rijndael.c sha1.c
+1 -17
sys/arch/amd64/stand/pxeboot/devopen.c
··· 1 - /* $OpenBSD: devopen.c,v 1.9 2011/06/26 23:19:11 tedu Exp $ */ 1 + /* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2004 Tom Cosgrove ··· 173 173 pch_pos++; 174 174 break; 175 175 } 176 - } 177 - 178 - int 179 - getchar(void) 180 - { 181 - register int c = cngetc(); 182 - 183 - if (c == '\r') 184 - c = '\n'; 185 - 186 - if ((c < ' ' && c != '\n') || c == '\177') 187 - return c; 188 - 189 - putchar(c); 190 - 191 - return c; 192 176 } 193 177 194 178 char ttyname_buf[8];
+2 -2
sys/arch/armish/stand/boot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.9 2012/09/11 17:11:35 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.10 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 22 22 SRCS+= boot.c cmd.c vars.c 23 23 SRCS+= conf.c devopen.c exec.c machdep.c dev_armish.c time.c 24 24 SRCS+= clock.c ns16550.c wd.c wdc.c pciide.c 25 - SRCS+= ctime.c strtol.c 25 + SRCS+= ctime.c strtol.c getchar.c 26 26 27 27 .PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern 28 28 SRCS+= divsi3.S divdi3.c moddi3.c qdivrem.c strlcpy.c strlen.c ashrdi3.c
+1 -17
sys/arch/armish/stand/boot/dev_armish.c
··· 1 - /* $OpenBSD: dev_armish.c,v 1.2 2010/12/06 18:44:49 jasper Exp $ */ 1 + /* $OpenBSD: dev_armish.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2006 Mark Kettenis ··· 69 69 pch_pos++; 70 70 break; 71 71 } 72 - } 73 - 74 - int 75 - getchar() 76 - { 77 - int c = cngetc(); 78 - 79 - if (c == '\r') 80 - c = '\n'; 81 - 82 - if ((c < ' ' && c != '\n') || c == '\177') 83 - return(c); 84 - 85 - putchar(c); 86 - 87 - return(c); 88 72 } 89 73 90 74 char ttyname_buf[8];
+2 -2
sys/arch/hppa/stand/libsa/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.16 2012/08/31 16:13:20 pascal Exp $ 1 + # $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 20 20 ct.c dk.c lf.c lif.c cmd_hppa.c loadfile.c elf32.c elf64.c 21 21 22 22 # stand routines 23 - SRCS+= alloc.c exit.c getfile.c gets.c globals.c \ 23 + SRCS+= alloc.c exit.c getfile.c gets.c getchar.c globals.c \ 24 24 printf.c strerror.c strtol.c strchr.c ctime.c snprintf.c 25 25 26 26 # io routines
+1 -17
sys/arch/hppa/stand/libsa/dev_hppa.c
··· 1 - /* $OpenBSD: dev_hppa.c,v 1.15 2012/02/25 20:12:00 miod Exp $ */ 1 + /* $OpenBSD: dev_hppa.c,v 1.16 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 1998-2004 Michael Shalayeff ··· 197 197 pch_pos++; 198 198 break; 199 199 } 200 - } 201 - 202 - int 203 - getchar() 204 - { 205 - int c = cngetc(); 206 - 207 - if (c == '\r') 208 - c = '\n'; 209 - 210 - if ((c < ' ' && c != '\n') || c == '\177') 211 - return(c); 212 - 213 - putchar(c); 214 - 215 - return(c); 216 200 } 217 201 218 202 char ttyname_buf[8];
+2 -2
sys/arch/hppa64/stand/libsa/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ 1 + # $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 21 21 ct.c dk.c lf.c lif.c cmd_hppa64.c 22 22 23 23 # stand routines 24 - SRCS+= alloc.c exit.c getfile.c gets.c globals.c \ 24 + SRCS+= alloc.c exit.c getfile.c gets.c getchar.c globals.c \ 25 25 printf.c strerror.c strtol.c strchr.c ctime.c loadfile.c snprintf.c 26 26 27 27 # io routines
+1 -17
sys/arch/hppa64/stand/libsa/dev_hppa64.c
··· 1 - /* $OpenBSD: dev_hppa64.c,v 1.6 2012/02/25 20:12:00 miod Exp $ */ 1 + /* $OpenBSD: dev_hppa64.c,v 1.7 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2005 Michael Shalayeff ··· 188 188 pch_pos++; 189 189 break; 190 190 } 191 - } 192 - 193 - int 194 - getchar() 195 - { 196 - int c = cngetc(); 197 - 198 - if (c == '\r') 199 - c = '\n'; 200 - 201 - if ((c < ' ' && c != '\n') || c == '\177') 202 - return(c); 203 - 204 - putchar(c); 205 - 206 - return(c); 207 191 } 208 192 209 193 char ttyname_buf[8];
+4 -3
sys/arch/i386/stand/boot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.54 2013/12/28 15:16:28 jsing Exp $ 1 + # $OpenBSD: Makefile,v 1.55 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 COPTS?= 4 4 MAN?= boot.8 ··· 42 42 .endif 43 43 44 44 .PATH: ${S}/lib/libsa 45 - SRCS+= alloc.c ctime.c exit.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ 46 - strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c strtoll.c 45 + SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \ 46 + snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ 47 + strtoll.c 47 48 SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \ 48 49 lseek.c open.c read.c readdir.c stat.c 49 50 SRCS+= elf32.c elf64.c loadfile.c
+4 -3
sys/arch/i386/stand/cdboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.20 2013/12/28 02:51:07 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.21 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 MAN= cdboot.8 4 4 ··· 26 26 SRCS+= bootarg.c cmd.c vars.c 27 27 28 28 .PATH: ${S}/lib/libsa 29 - SRCS+= alloc.c ctime.c exit.c memcmp.c memcpy.c memset.c printf.c snprintf.c \ 30 - strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c strtoll.c 29 + SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \ 30 + snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ 31 + strtoll.c 31 32 SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \ 32 33 lseek.c open.c read.c readdir.c stat.c 33 34 SRCS+= elf32.c elf64.c loadfile.c
+1 -17
sys/arch/i386/stand/libsa/dev_i386.c
··· 1 - /* $OpenBSD: dev_i386.c,v 1.38 2012/11/01 00:55:38 jsing Exp $ */ 1 + /* $OpenBSD: dev_i386.c,v 1.39 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 1996-1999 Michael Shalayeff ··· 189 189 pch_pos++; 190 190 break; 191 191 } 192 - } 193 - 194 - int 195 - getchar(void) 196 - { 197 - register int c = cngetc(); 198 - 199 - if (c == '\r') 200 - c = '\n'; 201 - 202 - if ((c < ' ' && c != '\n') || c == '\177') 203 - return c; 204 - 205 - putchar(c); 206 - 207 - return c; 208 192 } 209 193 210 194 char ttyname_buf[8];
+4 -4
sys/arch/i386/stand/pxeboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.16 2013/12/28 02:51:07 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 MAN= pxeboot.8 4 4 ··· 27 27 SRCS+= boot.c cmd.c vars.c bootarg.c 28 28 29 29 .PATH: ${S}/lib/libsa 30 - SRCS+= alloc.c ctime.c exit.c globals.c memcmp.c memcpy.c memset.c printf.c \ 31 - snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \ 32 - strtoll.c 30 + SRCS+= alloc.c ctime.c exit.c getchar.c globals.c memcmp.c memcpy.c memset.c \ 31 + printf.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \ 32 + strtol.c strtoll.c 33 33 SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \ 34 34 lseek.c read.c readdir.c stat.c 35 35 SRCS+= elf32.c elf64.c loadfile.c
+1 -17
sys/arch/i386/stand/pxeboot/devopen.c
··· 1 - /* $OpenBSD: devopen.c,v 1.9 2011/06/26 23:19:11 tedu Exp $ */ 1 + /* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2004 Tom Cosgrove ··· 173 173 pch_pos++; 174 174 break; 175 175 } 176 - } 177 - 178 - int 179 - getchar(void) 180 - { 181 - register int c = cngetc(); 182 - 183 - if (c == '\r') 184 - c = '\n'; 185 - 186 - if ((c < ' ' && c != '\n') || c == '\177') 187 - return c; 188 - 189 - putchar(c); 190 - 191 - return c; 192 176 } 193 177 194 178 char ttyname_buf[8];
+2 -2
sys/arch/landisk/stand/boot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.8 2012/09/02 16:21:05 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 MAN= boot.8 4 4 MLINKS= boot.8 boot.conf.5 ··· 23 23 SRCS+= boot.c cmd.c vars.c bootarg.c 24 24 25 25 .PATH: ${S}/lib/libkern/arch/sh ${S}/lib/libkern 26 - SRCS+= strlen.c strlcpy.c 26 + SRCS+= getchar.c strlen.c strlcpy.c 27 27 28 28 SAREL= 29 29 SA_ZLIB=
+1 -16
sys/arch/landisk/stand/boot/devs.c
··· 1 - /* $OpenBSD: devs.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */ 1 + /* $OpenBSD: devs.c,v 1.8 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2006 Michael Shalayeff ··· 146 146 break; 147 147 } 148 148 } 149 - 150 - int 151 - getchar(void) 152 - { 153 - int c = scif_getc(); 154 - 155 - if (c == '\r') 156 - c = '\n'; 157 - 158 - if ((c < ' ' && c != '\n') || c == '\177') 159 - return c; 160 - 161 - putchar(c); 162 - return c; 163 - }
+2 -2
sys/arch/landisk/stand/boot/libsa.h
··· 1 - /* $OpenBSD: libsa.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */ 1 + /* $OpenBSD: libsa.h,v 1.5 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2006 Michael Shalayeff ··· 30 30 int blkdevclose(struct open_file *); 31 31 int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *); 32 32 void scif_init(unsigned int); 33 - int scif_getc(void); 33 + int getc(void); 34 34 void scif_putc(int); 35 35 void cache_flush(void); 36 36 void cache_disable(void);
+2 -2
sys/arch/landisk/stand/boot/scifcons.c
··· 1 - /* $OpenBSD: scifcons.c,v 1.3 2008/06/27 06:03:08 ray Exp $ */ 1 + /* $OpenBSD: scifcons.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */ 2 2 /* $NetBSD: scifcons.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ 3 3 /* NetBSD: scif.c,v 1.38 2004/12/13 02:14:13 chs Exp */ 4 4 ··· 162 162 } 163 163 164 164 int 165 - scif_getc(void) 165 + getc(void) 166 166 { 167 167 unsigned char c, err_c; 168 168 unsigned short err_c2;
+1 -17
sys/arch/loongson/stand/boot/machdep.c
··· 1 - /* $OpenBSD: machdep.c,v 1.5 2013/09/30 19:27:02 miod Exp $ */ 1 + /* $OpenBSD: machdep.c,v 1.6 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2010 Miodrag Vallat. ··· 62 62 cnspeed(dev_t dev, int sp) 63 63 { 64 64 return 9600; 65 - } 66 - 67 - int 68 - getchar() 69 - { 70 - int c = cngetc(); 71 - 72 - if (c == '\r') 73 - c = '\n'; 74 - 75 - if ((c < ' ' && c != '\n') || c == '\177') 76 - return c; 77 - 78 - putchar(c); 79 - 80 - return c; 81 65 } 82 66 83 67 int pch_pos;
+2 -2
sys/arch/loongson/stand/libsa/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.4 2013/01/02 12:29:33 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.5 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 16 16 -I${.OBJDIR} 17 17 18 18 # stand routines 19 - SRCS= alloc.c cons.c ctime.c exit.c getfile.c gets.c globals.c \ 19 + SRCS= alloc.c cons.c ctime.c exit.c getchar.c getfile.c gets.c globals.c \ 20 20 memcmp.c memcpy.c memset.c printf.c \ 21 21 snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c 22 22
+1 -17
sys/arch/macppc/stand/Locore.c
··· 1 - /* $OpenBSD: Locore.c,v 1.15 2008/05/25 16:55:31 miod Exp $ */ 1 + /* $OpenBSD: Locore.c,v 1.16 2014/07/12 21:54:58 jasper Exp $ */ 2 2 /* $NetBSD: Locore.c,v 1.1 1997/04/16 20:29:11 thorpej Exp $ */ 3 3 4 4 /* ··· 513 513 if (c == '\n') 514 514 putchar('\r'); 515 515 OF_write(stdout, &ch, 1); 516 - } 517 - 518 - int 519 - getchar() 520 - { 521 - int c = cngetc(); 522 - 523 - if (c == '\r') 524 - c = '\n'; 525 - 526 - if ((c < ' ' && c != '\n') || c == '\177') 527 - return(c); 528 - 529 - putchar(c); 530 - 531 - return(c); 532 516 } 533 517 534 518 void
+2 -2
sys/arch/macppc/stand/ofwboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.8 2012/09/02 23:07:26 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 jasper Exp $ 2 2 # $NetBSD: Makefile,v 1.2 1997/04/17 07:46:24 thorpej Exp $ 3 3 4 4 S= ${.CURDIR}/../../../.. ··· 22 22 .PATH: ${S}/lib/libsa 23 23 24 24 .PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern 25 - SRCS+= strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c 25 + SRCS+= getchar.c strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c 26 26 SRCS+= moddi3.c 27 27 28 28 NEWVERSWHAT= "OpenFirmware Boot"
+1 -17
sys/arch/octeon/stand/boot/machdep.c
··· 1 - /* $OpenBSD: machdep.c,v 1.3 2014/07/12 20:36:52 jasper Exp $ */ 1 + /* $OpenBSD: machdep.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2009, 2010 Miodrag Vallat. ··· 77 77 cnspeed(dev_t dev, int s) 78 78 { 79 79 return (CONSPEED); 80 - } 81 - 82 - int 83 - getchar() 84 - { 85 - int c = cngetc(); 86 - 87 - if (c == '\r') 88 - c = '\n'; 89 - 90 - if ((c < ' ' && c != '\n') || c == '\177') 91 - return c; 92 - 93 - putchar(c); 94 - 95 - return c; 96 80 } 97 81 98 82 int pch_pos;
+2 -2
sys/arch/octeon/stand/libsa/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.2 2013/06/05 01:32:11 jasper Exp $ 1 + # $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 16 16 -I${.OBJDIR} 17 17 18 18 # stand routines 19 - SRCS= alloc.c cons.c ctime.c exit.c getfile.c gets.c globals.c \ 19 + SRCS= alloc.c cons.c ctime.c exit.c getchar.c getfile.c gets.c globals.c \ 20 20 memcmp.c memcpy.c memset.c printf.c \ 21 21 snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c 22 22
+2 -2
sys/arch/socppc/stand/boot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.13 2012/09/02 17:22:53 pascal Exp $ 1 + # $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 .include "${.CURDIR}/../Makefile.inc" 4 4 ··· 27 27 SRCS+= ctime.c strtol.c cmd_socppc.c 28 28 29 29 .PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern 30 - SRCS+= strlcpy.c strlen.c ashrdi3.c moddi3.c 30 + SRCS+= getchar.c strlcpy.c strlen.c ashrdi3.c moddi3.c 31 31 32 32 ### find out what to use for libz 33 33 Z_AS= library
+1 -17
sys/arch/socppc/stand/boot/dev_socppc.c
··· 1 - /* $OpenBSD: dev_socppc.c,v 1.2 2010/12/06 18:44:49 jasper Exp $ */ 1 + /* $OpenBSD: dev_socppc.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2008 Mark Kettenis ··· 69 69 pch_pos++; 70 70 break; 71 71 } 72 - } 73 - 74 - int 75 - getchar() 76 - { 77 - int c = cngetc(); 78 - 79 - if (c == '\r') 80 - c = '\n'; 81 - 82 - if ((c < ' ' && c != '\n') || c == '\177') 83 - return(c); 84 - 85 - putchar(c); 86 - 87 - return(c); 88 72 } 89 73 90 74 char ttyname_buf[8];
+2 -2
sys/arch/zaurus/stand/zboot/Makefile
··· 1 - # $OpenBSD: Makefile,v 1.13 2013/09/10 21:00:26 deraadt Exp $ 1 + # $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 jasper Exp $ 2 2 3 3 MAN= boot.8 4 4 MANSUBDIR=zaurus ··· 29 29 readdir.c snprintf.c stat.c strerror.c strtol.c ufs.c 30 30 31 31 .PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern 32 - SRCS+= strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c write.c \ 32 + SRCS+= getchar.c strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c write.c \ 33 33 ashrdi3.c divsi3.S divdi3.c moddi3.c qdivrem.c 34 34 35 35 # local overrides and additions
+1 -17
sys/arch/zaurus/stand/zboot/devopen.c
··· 1 - /* $OpenBSD: devopen.c,v 1.10 2011/06/26 23:19:11 tedu Exp $ */ 1 + /* $OpenBSD: devopen.c,v 1.11 2014/07/12 21:54:58 jasper Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 1996-1999 Michael Shalayeff ··· 127 127 pch_pos++; 128 128 break; 129 129 } 130 - } 131 - 132 - int 133 - getchar(void) 134 - { 135 - register int c = cngetc(); 136 - 137 - if (c == '\r') 138 - c = '\n'; 139 - 140 - if ((c < ' ' && c != '\n') || c == '\177') 141 - return c; 142 - 143 - putchar(c); 144 - 145 - return c; 146 130 } 147 131 148 132 char ttyname_buf[8];
+53
sys/lib/libsa/getchar.c
··· 1 + /* $OpenBSD: getchar.c,v 1.1 2014/07/12 21:54:58 jasper Exp $ */ 2 + 3 + /* 4 + * Copyright (c) 1982, 1986, 1990, 1993 5 + * The Regents of the University of California. All rights reserved. 6 + * 7 + * Redistribution and use in source and binary forms, with or without 8 + * modification, are permitted provided that the following conditions 9 + * are met: 10 + * 1. Redistributions of source code must retain the above copyright 11 + * notice, this list of conditions and the following disclaimer. 12 + * 2. Redistributions in binary form must reproduce the above copyright 13 + * notice, this list of conditions and the following disclaimer in the 14 + * documentation and/or other materials provided with the distribution. 15 + * 3. All advertising materials mentioning features or use of this software 16 + * must display the following acknowledgement: 17 + * This product includes software developed by the University of 18 + * California, Berkeley and its contributors. 19 + * 4. Neither the name of the University nor the names of its contributors 20 + * may be used to endorse or promote products derived from this software 21 + * without specific prior written permission. 22 + * 23 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 + * SUCH DAMAGE. 34 + * 35 + */ 36 + 37 + #include "stand.h" 38 + 39 + int 40 + getchar(void) 41 + { 42 + int c = cngetc(); 43 + 44 + if (c == '\r') 45 + c = '\n'; 46 + 47 + if ((c < ' ' && c != '\n') || c == '\177') 48 + return c; 49 + 50 + putchar(c); 51 + 52 + return c; 53 + }
+2 -1
sys/lib/libsa/stand.h
··· 1 - /* $OpenBSD: stand.h,v 1.56 2013/12/28 02:51:07 deraadt Exp $ */ 1 + /* $OpenBSD: stand.h,v 1.57 2014/07/12 21:54:58 jasper Exp $ */ 2 2 /* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */ 3 3 4 4 /*- ··· 185 185 int cngetc(void); 186 186 int cnischar(void); 187 187 int cnspeed(dev_t, int); 188 + int getchar(void); 188 189 u_int sleep(u_int); 189 190 void usleep(u_int); 190 191 char *ctime(const time_t *);