-# $OpenBSD: Makefile,v 1.26 2013/12/28 15:16:28 jsing Exp $
+# $OpenBSD: Makefile,v 1.27 2014/07/12 21:54:57 jasper Exp $
COPTS?=
MAN?= boot.8
.endif
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c ctime.c exit.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
+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
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.22 2013/12/28 02:51:06 deraadt Exp $
+# $OpenBSD: Makefile,v 1.23 2014/07/12 21:54:57 jasper Exp $
MAN= cdboot.8
SRCS+= cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c exit.c strcmp.c strlen.c \
+SRCS+= alloc.c exit.c getchar.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.13 2012/10/30 14:06:29 jsing Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.14 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
}
}
-int
-getchar(void)
-{
- register int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.18 2013/12/28 02:51:07 deraadt Exp $
+# $OpenBSD: Makefile,v 1.19 2014/07/12 21:54:58 jasper Exp $
MAN= pxeboot.8
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \
+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 \
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.9 2011/06/26 23:19:11 tedu Exp $ */
+/* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
}
}
-int
-getchar(void)
-{
- register int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.9 2012/09/11 17:11:35 deraadt Exp $
+# $OpenBSD: Makefile,v 1.10 2014/07/12 21:54:58 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
+SRCS+= ctime.c strtol.c getchar.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.2 2010/12/06 18:44:49 jasper Exp $ */
+/* $OpenBSD: dev_armish.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
}
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return(c);
-
- putchar(c);
-
- return(c);
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.16 2012/08/31 16:13:20 pascal Exp $
+# $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
ct.c dk.c lf.c lif.c cmd_hppa.c loadfile.c elf32.c elf64.c
# stand routines
-SRCS+= alloc.c exit.c getfile.c gets.c globals.c \
+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
# io routines
-/* $OpenBSD: dev_hppa.c,v 1.15 2012/02/25 20:12:00 miod Exp $ */
+/* $OpenBSD: dev_hppa.c,v 1.16 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
}
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return(c);
-
- putchar(c);
-
- return(c);
-}
-
char ttyname_buf[8];
char *
ttyname(fd)
-# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $
+# $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
ct.c dk.c lf.c lif.c cmd_hppa64.c
# stand routines
-SRCS+= alloc.c exit.c getfile.c gets.c globals.c \
+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
# io routines
-/* $OpenBSD: dev_hppa64.c,v 1.6 2012/02/25 20:12:00 miod Exp $ */
+/* $OpenBSD: dev_hppa64.c,v 1.7 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
}
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return(c);
-
- putchar(c);
-
- return(c);
-}
-
char ttyname_buf[8];
char *
ttyname(fd)
-# $OpenBSD: Makefile,v 1.54 2013/12/28 15:16:28 jsing Exp $
+# $OpenBSD: Makefile,v 1.55 2014/07/12 21:54:58 jasper Exp $
COPTS?=
MAN?= boot.8
.endif
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c ctime.c exit.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
+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
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.20 2013/12/28 02:51:07 deraadt Exp $
+# $OpenBSD: Makefile,v 1.21 2014/07/12 21:54:58 jasper Exp $
MAN= cdboot.8
SRCS+= bootarg.c cmd.c vars.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c ctime.c exit.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
+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
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.38 2012/11/01 00:55:38 jsing Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.39 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
}
}
-int
-getchar(void)
-{
- register int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.16 2013/12/28 02:51:07 deraadt Exp $
+# $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $
MAN= pxeboot.8
SRCS+= boot.c cmd.c vars.c bootarg.c
.PATH: ${S}/lib/libsa
-SRCS+= alloc.c ctime.c exit.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
+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
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.9 2011/06/26 23:19:11 tedu Exp $ */
+/* $OpenBSD: devopen.c,v 1.10 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
}
}
-int
-getchar(void)
-{
- register int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.8 2012/09/02 16:21:05 deraadt Exp $
+# $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 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+= strlen.c strlcpy.c
+SRCS+= getchar.c strlen.c strlcpy.c
SAREL=
SA_ZLIB=
-/* $OpenBSD: devs.c,v 1.7 2011/03/13 00:13:53 deraadt Exp $ */
+/* $OpenBSD: devs.c,v 1.8 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
break;
}
}
-
-int
-getchar(void)
-{
- int c = scif_getc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
- return c;
-}
-/* $OpenBSD: libsa.h,v 1.4 2011/03/13 00:13:53 deraadt Exp $ */
+/* $OpenBSD: libsa.h,v 1.5 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
int blkdevclose(struct open_file *);
int blkdevstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
void scif_init(unsigned int);
-int scif_getc(void);
+int getc(void);
void scif_putc(int);
void cache_flush(void);
void cache_disable(void);
-/* $OpenBSD: scifcons.c,v 1.3 2008/06/27 06:03:08 ray Exp $ */
+/* $OpenBSD: scifcons.c,v 1.4 2014/07/12 21:54:58 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 */
}
int
-scif_getc(void)
+getc(void)
{
unsigned char c, err_c;
unsigned short err_c2;
-/* $OpenBSD: machdep.c,v 1.5 2013/09/30 19:27:02 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.6 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
return 9600;
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
int pch_pos;
void
-# $OpenBSD: Makefile,v 1.4 2013/01/02 12:29:33 deraadt Exp $
+# $OpenBSD: Makefile,v 1.5 2014/07/12 21:54:58 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
-I${.OBJDIR}
# stand routines
-SRCS= alloc.c cons.c ctime.c exit.c getfile.c gets.c globals.c \
+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 \
snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c
-/* $OpenBSD: Locore.c,v 1.15 2008/05/25 16:55:31 miod Exp $ */
+/* $OpenBSD: Locore.c,v 1.16 2014/07/12 21:54:58 jasper Exp $ */
/* $NetBSD: Locore.c,v 1.1 1997/04/16 20:29:11 thorpej Exp $ */
/*
OF_write(stdout, &ch, 1);
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return(c);
-
- putchar(c);
-
- return(c);
-}
-
void
ofc_probe(struct consdev *cn)
{
-# $OpenBSD: Makefile,v 1.8 2012/09/02 23:07:26 deraadt Exp $
+# $OpenBSD: Makefile,v 1.9 2014/07/12 21:54:58 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+= strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c
+SRCS+= getchar.c strlcpy.c memcpy.c strlen.c strrchr.c strlcat.c ashrdi3.c
SRCS+= moddi3.c
NEWVERSWHAT= "OpenFirmware Boot"
-/* $OpenBSD: machdep.c,v 1.3 2014/07/12 20:36:52 jasper Exp $ */
+/* $OpenBSD: machdep.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
return (CONSPEED);
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
int pch_pos;
void
-# $OpenBSD: Makefile,v 1.2 2013/06/05 01:32:11 jasper Exp $
+# $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
-I${.OBJDIR}
# stand routines
-SRCS= alloc.c cons.c ctime.c exit.c getfile.c gets.c globals.c \
+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 \
snprintf.c strchr.c strcmp.c strerror.c strncmp.c strncpy.c strtol.c
-# $OpenBSD: Makefile,v 1.13 2012/09/02 17:22:53 pascal Exp $
+# $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 jasper Exp $
.include "${.CURDIR}/../Makefile.inc"
SRCS+= ctime.c strtol.c cmd_socppc.c
.PATH: ${S}/lib/libkern/arch/powerpc ${S}/lib/libkern
-SRCS+= strlcpy.c strlen.c ashrdi3.c moddi3.c
+SRCS+= getchar.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.2 2010/12/06 18:44:49 jasper Exp $ */
+/* $OpenBSD: dev_socppc.c,v 1.3 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
}
}
-int
-getchar()
-{
- int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return(c);
-
- putchar(c);
-
- return(c);
-}
-
char ttyname_buf[8];
char *
-# $OpenBSD: Makefile,v 1.13 2013/09/10 21:00:26 deraadt Exp $
+# $OpenBSD: Makefile,v 1.14 2014/07/12 21:54:58 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+= strcmp.c strlcpy.c strlen.c strncmp.c strncpy.c write.c \
+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
# local overrides and additions
-/* $OpenBSD: devopen.c,v 1.10 2011/06/26 23:19:11 tedu Exp $ */
+/* $OpenBSD: devopen.c,v 1.11 2014/07/12 21:54:58 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
}
}
-int
-getchar(void)
-{
- register int c = cngetc();
-
- if (c == '\r')
- c = '\n';
-
- if ((c < ' ' && c != '\n') || c == '\177')
- return c;
-
- putchar(c);
-
- return c;
-}
-
char ttyname_buf[8];
char *
--- /dev/null
+/* $OpenBSD: getchar.c,v 1.1 2014/07/12 21:54:58 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
+getchar(void)
+{
+ int c = cngetc();
+
+ if (c == '\r')
+ c = '\n';
+
+ if ((c < ' ' && c != '\n') || c == '\177')
+ return c;
+
+ putchar(c);
+
+ return c;
+}
-/* $OpenBSD: stand.h,v 1.56 2013/12/28 02:51:07 deraadt Exp $ */
+/* $OpenBSD: stand.h,v 1.57 2014/07/12 21:54:58 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 *);