-# $OpenBSD: Makefile,v 1.27 2014/07/12 21:54:57 jasper Exp $
+# $OpenBSD: Makefile,v 1.28 2014/07/13 09:26:08 jasper Exp $
COPTS?=
MAN?= boot.8
.PATH: ${S}/lib/libsa
SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \
- snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \
- strtoll.c
+ putchar.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \
+ strtol.c strtoll.c
SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \
lseek.c open.c read.c readdir.c stat.c
SRCS+= elf32.c elf64.c loadfile.c
-# $OpenBSD: Makefile,v 1.23 2014/07/12 21:54:57 jasper Exp $
+# $OpenBSD: Makefile,v 1.24 2014/07/13 09:26:08 jasper Exp $
MAN= cdboot.8
SRCS+= cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c exit.c getchar.c strcmp.c strlen.c \
+SRCS+= alloc.c exit.c getchar.c putchar.c strcmp.c strlen.c \
strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \
strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c lseek.c \
-/* $OpenBSD: dev_i386.c,v 1.14 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.15 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
*p = '\0';
}
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do {
- cnputc(' ');
- } while (++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.19 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.20 2014/07/13 09:26:08 jasper Exp $
MAN= pxeboot.8
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c exit.c getchar.c getfile.c gets.c globals.c strcmp.c strlen.c \
- strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \
+SRCS+= alloc.c exit.c getchar.c getfile.c gets.c globals.c putchar.c strcmp.c \
+ strlen.c strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \
strerror.c strncpy.c strtol.c strtoll.c ctime.c strlcpy.c strlcat.c
SRCS+= aes_xts.c explicit_bzero.c hmac_sha1.c pbkdf2.c rijndael.c sha1.c
-/* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: devopen.c,v 1.11 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
*p = '\0';
}
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while (++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.10 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.11 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
SRCS+= boot.c cmd.c vars.c
SRCS+= conf.c devopen.c exec.c machdep.c dev_armish.c time.c
SRCS+= clock.c ns16550.c wd.c wdc.c pciide.c
-SRCS+= ctime.c strtol.c getchar.c
+SRCS+= ctime.c strtol.c getchar.c putchar.c
.PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern
SRCS+= divsi3.S divdi3.c moddi3.c qdivrem.c strlcpy.c strlen.c ashrdi3.c
-/* $OpenBSD: dev_armish.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_armish.c,v 1.4 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
return CONSPEED;
}
-int pch_pos;
-
-void
-putchar(c)
- int c;
-{
- switch(c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while(++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.18 2014/07/12 23:34:54 jasper Exp $
+# $OpenBSD: Makefile,v 1.19 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
# stand routines
SRCS+= alloc.c exit.c getfile.c gets.c getchar.c globals.c \
- printf.c strerror.c strtol.c strchr.c ctime.c snprintf.c
+ printf.c putchar.c strerror.c strtol.c strchr.c ctime.c snprintf.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \
-/* $OpenBSD: dev_hppa.c,v 1.16 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_hppa.c,v 1.17 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
*p = '\0';
}
-int pch_pos;
-
-void
-putchar(c)
- int c;
-{
- switch(c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while(++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
+
char *
ttyname(fd)
int fd;
-# $OpenBSD: Makefile,v 1.4 2014/07/12 23:34:54 jasper Exp $
+# $OpenBSD: Makefile,v 1.5 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
# stand routines
SRCS+= alloc.c exit.c getfile.c gets.c getchar.c globals.c \
- printf.c strerror.c strtol.c strchr.c ctime.c loadfile.c snprintf.c
+ printf.c putchar.c strerror.c strtol.c strchr.c ctime.c loadfile.c \
+ snprintf.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \
-/* $OpenBSD: dev_hppa64.c,v 1.7 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_hppa64.c,v 1.8 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
*p = '\0';
}
-int pch_pos;
-
-void
-putchar(c)
- int c;
-{
- switch(c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while(++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
ttyname(fd)
-# $OpenBSD: Makefile,v 1.55 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.56 2014/07/13 09:26:08 jasper Exp $
COPTS?=
MAN?= boot.8
.PATH: ${S}/lib/libsa
SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \
- snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \
- strtoll.c
+ putchar.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \
+ strtol.c strtoll.c
SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \
lseek.c open.c read.c readdir.c stat.c
SRCS+= elf32.c elf64.c loadfile.c
-# $OpenBSD: Makefile,v 1.21 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.22 2014/07/13 09:26:08 jasper Exp $
MAN= cdboot.8
.PATH: ${S}/lib/libsa
SRCS+= alloc.c ctime.c exit.c getchar.c memcmp.c memcpy.c memset.c printf.c \
- snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c strtol.c \
- strtoll.c
+ putchar.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \
+ strtol.c strtoll.c
SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \
lseek.c open.c read.c readdir.c stat.c
SRCS+= elf32.c elf64.c loadfile.c
-/* $OpenBSD: dev_i386.c,v 1.39 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.40 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
*p = '\0';
}
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do {
- cnputc(' ');
- } while (++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.18 2014/07/13 09:26:08 jasper Exp $
MAN= pxeboot.8
.PATH: ${S}/lib/libsa
SRCS+= alloc.c ctime.c exit.c getchar.c globals.c memcmp.c memcpy.c memset.c \
- printf.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c strncpy.c \
- strtol.c strtoll.c
+ printf.c putchar.c snprintf.c strcmp.c strerror.c strlen.c strncmp.c \
+ strncpy.c strtol.c strtoll.c
SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \
lseek.c read.c readdir.c stat.c
SRCS+= elf32.c elf64.c loadfile.c
-/* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: devopen.c,v 1.11 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
*p = '\0';
}
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while (++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.10 2014/07/13 09:26:08 jasper Exp $
MAN= boot.8
MLINKS= boot.8 boot.conf.5
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libkern/arch/sh ${S}/lib/libkern
-SRCS+= getchar.c strlen.c strlcpy.c
+SRCS+= getchar.c putchar.c strlen.c strlcpy.c
SAREL=
SA_ZLIB=
-/* $OpenBSD: devs.c,v 1.8 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: devs.c,v 1.9 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
{
return 0;
}
-
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- scif_putc('\b');
- scif_putc(' ');
- case '\b':
- scif_putc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- scif_putc(' ');
- while (++pch_pos % 8);
- break;
- case '\n':
- scif_putc(c);
- case '\r':
- scif_putc('\r');
- pch_pos=0;
- break;
- default:
- scif_putc(c);
- pch_pos++;
- break;
- }
-}
-/* $OpenBSD: libsa.h,v 1.5 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: libsa.h,v 1.6 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
void scif_init(unsigned int);
int getc(void);
-void scif_putc(int);
+void putc(int);
void cache_flush(void);
void cache_disable(void);
-/* $OpenBSD: scifcons.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: scifcons.c,v 1.5 2014/07/13 09:26:08 jasper Exp $ */
/* $NetBSD: scifcons.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/* NetBSD: scif.c,v 1.38 2004/12/13 02:14:13 chs Exp */
}
void
-scif_putc(int c)
+putc(int c)
{
/* wait for ready */
-/* $OpenBSD: machdep.c,v 1.7 2014/07/12 23:34:54 jasper Exp $ */
+/* $OpenBSD: machdep.c,v 1.8 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
return CONSPEED;
}
-int pch_pos;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while (++pch_pos % 8) ;
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos = 0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char *
ttyname(int fd)
{
-# $OpenBSD: Makefile,v 1.5 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.6 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
# stand routines
SRCS= alloc.c cons.c ctime.c exit.c getchar.c getfile.c gets.c globals.c \
- memcmp.c memcpy.c memset.c printf.c \
+ memcmp.c memcpy.c memset.c printf.c putchar.c \
snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c
# io routines
-# $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.10 2014/07/13 09:26:08 jasper Exp $
# $NetBSD: Makefile,v 1.2 1997/04/17 07:46:24 thorpej Exp $
S= ${.CURDIR}/../../../..
.PATH: ${S}/lib/libsa
.PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern
-SRCS+= getchar.c strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c
+SRCS+= getchar.c putchar.c strlcpy.c memcpy.c strlen.c strrchr.c \
+ strlcat.c ashrdi3.c
SRCS+= moddi3.c
NEWVERSWHAT= "OpenFirmware Boot"
-/* $OpenBSD: machdep.c,v 1.5 2014/07/12 23:34:54 jasper Exp $ */
+/* $OpenBSD: machdep.c,v 1.6 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
return CONSPEED;
}
-int pch_pos;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while (++pch_pos % 8) ;
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos = 0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char *
ttyname(int fd)
{
-# $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.4 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
# stand routines
SRCS= alloc.c cons.c ctime.c exit.c getchar.c getfile.c gets.c globals.c \
- memcmp.c memcpy.c memset.c printf.c \
+ memcmp.c memcpy.c memset.c printf.c putchar.c \
snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c
# io routines
-# $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.15 2014/07/13 09:26:08 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
SRCS+= ctime.c strtol.c cmd_socppc.c
.PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern
-SRCS+= getchar.c strlcpy.c strlen.c ashrdi3.c moddi3.c
+SRCS+= getchar.c putchar.c strlcpy.c strlen.c ashrdi3.c moddi3.c
### find out what to use for libz
Z_AS= library
-/* $OpenBSD: dev_socppc.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: dev_socppc.c,v 1.4 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
return CONSPEED;
}
-int pch_pos;
-
-void
-putchar(c)
- int c;
-{
- switch(c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while(++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 jasper Exp $
+# $OpenBSD: Makefile,v 1.15 2014/07/13 09:26:08 jasper Exp $
MAN= boot.8
MANSUBDIR=zaurus
readdir.c snprintf.c stat.c strerror.c strtol.c ufs.c
.PATH: ${S}/lib/libkern/arch/arm ${S}/lib/libkern
-SRCS+= getchar.c strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c write.c \
- ashrdi3.c divsi3.S divdi3.c moddi3.c qdivrem.c
+SRCS+= getchar.c putchar.c strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c \
+ write.c ashrdi3.c divsi3.S divdi3.c moddi3.c qdivrem.c
# local overrides and additions
SRCS+= alloc.c cmd.c devopen.c diskprobe.c exec.c exit.c loadfile.c \
-/* $OpenBSD: devopen.c,v 1.11 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: devopen.c,v 1.12 2014/07/13 09:26:08 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
*p = '\0';
}
-int pch_pos = 0;
-
-void
-putchar(int c)
-{
- switch (c) {
- case '\177': /* DEL erases */
- cnputc('\b');
- cnputc(' ');
- case '\b':
- cnputc('\b');
- if (pch_pos)
- pch_pos--;
- break;
- case '\t':
- do
- cnputc(' ');
- while (++pch_pos % 8);
- break;
- case '\n':
- case '\r':
- cnputc(c);
- pch_pos=0;
- break;
- default:
- cnputc(c);
- pch_pos++;
- break;
- }
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.24 2013/01/01 18:49:33 miod Exp $
+# $OpenBSD: Makefile,v 1.25 2014/07/13 09:26:08 jasper Exp $
# $NetBSD: Makefile,v 1.13 1996/10/02 16:19:51 ws Exp $
LIB= sa
.endif
# stand routines
-SRCS+= alloc.c memcpy.c exit.c getfile.c gets.c globals.c \
- printf.c snprintf.c strerror.c strcmp.c memset.c memcmp.c \
+SRCS+= alloc.c memcpy.c exit.c getfile.c getchar.c gets.c globals.c \
+ printf.c putchar.c snprintf.c strerror.c strcmp.c memset.c memcmp.c \
strncpy.c strncmp.c strchr.c
# math from libkern
--- /dev/null
+/* $OpenBSD: putchar.c,v 1.1 2014/07/13 09:26:08 jasper Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include "stand.h"
+
+int pch_pos = 0;
+
+void
+putchar(int c)
+{
+ switch (c) {
+ case '\177': /* DEL erases */
+ cnputc('\b');
+ cnputc(' ');
+ case '\b':
+ cnputc('\b');
+ if (pch_pos)
+ pch_pos--;
+ break;
+ case '\t':
+ do
+ cnputc(' ');
+ while (++pch_pos % 8);
+ break;
+ case '\n':
+ case '\r':
+ cnputc(c);
+ pch_pos=0;
+ break;
+ default:
+ cnputc(c);
+ pch_pos++;
+ break;
+ }
+}
-/* $OpenBSD: stand.h,v 1.57 2014/07/12 21:54:58 jasper Exp $ */
+/* $OpenBSD: stand.h,v 1.58 2014/07/13 09:26:08 jasper Exp $ */
/* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */
/*-
int cngetc(void);
int cnischar(void);
int cnspeed(dev_t, int);
-int getchar(void);
u_int sleep(u_int);
void usleep(u_int);
char *ctime(const time_t *);