CVS commit: src/lib/libm/src
Module Name:src Committed By: martin Date: Tue Feb 12 08:21:49 UTC 2013 Modified Files: src/lib/libm/src: s_fma.c Log Message: Use __weak_alias instead of __weak_reference (obvious pasto) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/s_fma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/src/s_fma.c diff -u src/lib/libm/src/s_fma.c:1.3 src/lib/libm/src/s_fma.c:1.4 --- src/lib/libm/src/s_fma.c:1.3 Mon Feb 11 02:45:27 2013 +++ src/lib/libm/src/s_fma.c Tue Feb 12 08:21:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: s_fma.c,v 1.3 2013/02/11 02:45:27 christos Exp $ */ +/* $NetBSD: s_fma.c,v 1.4 2013/02/12 08:21:48 martin Exp $ */ /*- * Copyright (c) 2005-2011 David Schultz d...@freebsd.org @@ -30,7 +30,7 @@ #if 0 __FBSDID($FreeBSD: src/lib/msun/src/s_fma.c,v 1.8 2011/10/21 06:30:43 das Exp $); #else -__RCSID($NetBSD: s_fma.c,v 1.3 2013/02/11 02:45:27 christos Exp $); +__RCSID($NetBSD: s_fma.c,v 1.4 2013/02/12 08:21:48 martin Exp $); #endif #include machine/ieee.h @@ -289,5 +289,5 @@ fma(double x, double y, double z) } #ifndef __HAVE_LONG_DOUBLE -__weak_reference(fma, fmal); +__weak_alias(fma, fmal) #endif
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: jmcneill Date: Tue Feb 12 12:04:39 UTC 2013 Modified Files: src/distrib/utils/embedded/conf: evbarm.conf Log Message: create /proc and /kern To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/embedded/conf/evbarm.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/evbarm.conf diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.7 src/distrib/utils/embedded/conf/evbarm.conf:1.8 --- src/distrib/utils/embedded/conf/evbarm.conf:1.7 Sun Feb 10 23:37:32 2013 +++ src/distrib/utils/embedded/conf/evbarm.conf Tue Feb 12 12:04:39 2013 @@ -1,4 +1,4 @@ -# $NetBSD: evbarm.conf,v 1.7 2013/02/10 23:37:32 jmcneill Exp $ +# $NetBSD: evbarm.conf,v 1.8 2013/02/12 12:04:39 jmcneill Exp $ # evbarm shared config # image=$HOME/${board}.img @@ -85,4 +85,7 @@ EOF fi echo ${bar} running MAKEDEV ${bar} (cd ${mnt}/dev sh ${release}/dev/MAKEDEV all) + + echo ${bar} creating directories ${bar} + mkdir ${mnt}/proc ${mnt}/kern }
CVS commit: src/distrib/utils/embedded
Module Name:src Committed By: jmcneill Date: Tue Feb 12 12:45:13 UTC 2013 Modified Files: src/distrib/utils/embedded: mkimage Log Message: add extra space to root partition To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/embedded/mkimage Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/mkimage diff -u src/distrib/utils/embedded/mkimage:1.33 src/distrib/utils/embedded/mkimage:1.34 --- src/distrib/utils/embedded/mkimage:1.33 Mon Feb 11 18:11:20 2013 +++ src/distrib/utils/embedded/mkimage Tue Feb 12 12:45:12 2013 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mkimage,v 1.33 2013/02/11 18:11:20 jmcneill Exp $ +# $NetBSD: mkimage,v 1.34 2013/02/12 12:45:12 jmcneill Exp $ # # Copyright (c) 2013 The NetBSD Foundation, Inc. # All rights reserved. @@ -148,6 +148,7 @@ fi echo ${bar} Populating ffs filesystem ${bar} ${MAKEFS} -N ${release}/etc -t ffs -rx \ -O $(((${init} + ${boot} + ${swap}) / 2))m \ +-b $((${extra} / 2))m \ -F $tmp/selected_sets ${image} ${release} ${mnt} if [ ${size} = 0 ]; then
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Tue Feb 12 15:05:26 UTC 2013 Modified Files: src/sys/arch/arm/include: vfpreg.h Log Message: More fully document FPEXC register To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/include/vfpreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/vfpreg.h diff -u src/sys/arch/arm/include/vfpreg.h:1.7 src/sys/arch/arm/include/vfpreg.h:1.8 --- src/sys/arch/arm/include/vfpreg.h:1.7 Tue Feb 12 00:32:15 2013 +++ src/sys/arch/arm/include/vfpreg.h Tue Feb 12 15:05:26 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vfpreg.h,v 1.7 2013/02/12 00:32:15 matt Exp $ */ +/* $NetBSD: vfpreg.h,v 1.8 2013/02/12 15:05:26 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -64,14 +64,20 @@ #define FPU_VFP_CORTEXA8 0x410330c0 #define FPU_VFP_CORTEXA9 0x41033090 -#define VFP_FPEXC_EX 0x8000 /* Exception status bit */ +#define VFP_FPEXC_EX 0x8000 /* EXception status bit */ #define VFP_FPEXC_EN 0x4000 /* VFP Enable bit */ -#define VFP_FPEXC_FP2V 0x1000 /* FPINST2 instruction valid */ -#define VFP_FPEXC_VECITR 0x0700 /* Vector iteration count */ -#define VFP_FPEXC_INV 0x0080 /* Input exception flag */ -#define VFP_FPEXC_UFC 0x0008 /* Potential underflow flag */ -#define VFP_FPEXC_OFC 0x0004 /* Potential overflow flag */ -#define VFP_FPEXC_IOC 0x0001 /* Potential inv. op. flag */ +#define VFP_FPEXC_DEX 0x2000 /* Defined sync EXception bit */ +#define VFP_FPEXC_FP2V 0x1000 /* FPinst2 instruction Valid */ +#define VFP_FPEXC_VV 0x0800 /* Vecitr Valid */ +#define VFP_FPEXC_TFV 0x0400 /* Trapped Fault Valid */ +#define VFP_FPEXC_VECITR 0x0700 /* VECtor ITeRation count */ +#define VFP_FPEXC_IDF 0x0080 /* Input Denormal flag */ +#define VFP_FPEXC_IXF 0x0010 /* Potential inexact flag */ +#define VFP_FPEXC_UFF 0x0008 /* Potential underflow flag */ +#define VFP_FPEXC_OFF 0x0004 /* Potential overflow flag */ +#define VFP_FPEXC_DZF 0x0002 /* Potential DivByZero flag */ +#define VFP_FPEXC_IOF 0x0001 /* Potential inv. op. flag */ +#define VFP_FPEXE_FSUM 0x00ff /* all flag bits */ #define VFP_FPSCR_N 0x8000 /* set if compare = result */ #define VFP_FPSCR_Z 0x4000 /* set if compare = result */ @@ -91,7 +97,7 @@ #define VFP_FPSCR_IXE 0x1000 /* Inexact Exception Enable */ #define VFP_FPSCR_UFE 0x0800 /* Underflow Exception Enable */ #define VFP_FPSCR_OFE 0x0400 /* Overflow Exception Enable */ -#define VFP_FPSCR_DZE 0x0200 /* Inexact Exception Enable */ +#define VFP_FPSCR_DZE 0x0200 /* DivByZero Exception Enable */ #define VFP_FPSCR_IOE 0x0100 /* Invalid Operation Cumulative Flag */ #define VFP_FPSCR_IDC 0x0080 /* Input Subnormal Cumlative Flag */ #define VFP_FPSCR_CSUM 0x001f /* IXC|UFC|OFC|DZC|IOC */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Tue Feb 12 15:06:40 UTC 2013 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add inlines for cp10 (vfp) registers To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.72 src/sys/arch/arm/include/armreg.h:1.73 --- src/sys/arch/arm/include/armreg.h:1.72 Thu Jan 24 10:14:55 2013 +++ src/sys/arch/arm/include/armreg.h Tue Feb 12 15:06:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.72 2013/01/24 10:14:55 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.73 2013/02/12 15:06:40 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -586,7 +586,20 @@ static inline void armreg_##name##_write __asm __volatile(mcrr __insnstring :: r(__val)); \ } -/* c0 registers */ +/* cp10 registers */ +ARMREG_READ_INLINE(fpsid, p10,7,%0,c0,c0,0) /* VFP System ID */ +ARMREG_READ_INLINE(fpscr, p10,7,%0,c1,c0,0) /* VFP Status/Control Register */ +ARMREG_WRITE_INLINE(fpscr, p10,7,%0,c1,c0,0) /* VFP Status/Control Register */ +ARMREG_READ_INLINE(mvfr1, p10,7,%0,c6,c0,0) /* Media and VFP Feature Register 1 */ +ARMREG_READ_INLINE(mvfr0, p10,7,%0,c7,c0,0) /* Media and VFP Feature Register 0 */ +ARMREG_READ_INLINE(fpexc, p10,7,%0,c8,c0,0) /* VFP Exception Register */ +ARMREG_WRITE_INLINE(fpexc, p10,7,%0,c8,c0,0) /* VFP Exception Register */ +ARMREG_READ_INLINE(fpinst, p10,7,%0,c9,c0,0) /* VFP Exception Instruction */ +ARMREG_WRITE_INLINE(fpinst, p10,7,%0,c9,c0,0) /* VFP Exception Instruction */ +ARMREG_READ_INLINE(fpinst2, p10,7,%0,c10,c0,0) /* VFP Exception Instruction 2 */ +ARMREG_WRITE_INLINE(fpinst2, p10,7,%0,c10,c0,0) /* VFP Exception Instruction 2 */ + +/* cp15 c0 registers */ ARMREG_READ_INLINE(midr, p15,0,%0,c0,c0,0) /* Main ID Register */ ARMREG_READ_INLINE(ctr, p15,0,%0,c0,c0,1) /* Cache Type Register */ ARMREG_READ_INLINE(mpidr, p15,0,%0,c0,c0,5) /* Multiprocess Affinity Register */ @@ -606,27 +619,27 @@ ARMREG_READ_INLINE(ccsidr, p15,1,%0,c0, ARMREG_READ_INLINE(clidr, p15,1,%0,c0,c0,1) /* Cache Level ID Register */ ARMREG_READ_INLINE(csselr, p15,2,%0,c0,c0,0) /* Cache Size Selection Register */ ARMREG_WRITE_INLINE(csselr, p15,2,%0,c0,c0,0) /* Cache Size Selection Register */ -/* c1 registers */ +/* cp15 c1 registers */ ARMREG_READ_INLINE(sctrl, p15,0,%0,c1,c0,0) /* System Control Register */ ARMREG_WRITE_INLINE(sctrl, p15,0,%0,c1,c0,0) /* System Control Register */ ARMREG_READ_INLINE(auxctl, p15,0,%0,c1,c0,1) /* Auxiliary Control Register */ ARMREG_WRITE_INLINE(auxctl, p15,0,%0,c1,c0,1) /* Auxiliary Control Register */ ARMREG_READ_INLINE(cpacr, p15,0,%0,c1,c0,2) /* Co-Processor Access Control Register */ ARMREG_WRITE_INLINE(cpacr, p15,0,%0,c1,c0,2) /* Co-Processor Access Control Register */ -/* c2 registers */ +/* cp15 c2 registers */ ARMREG_READ_INLINE(ttbr, p15,0,%0,c2,c0,0) /* Translation Table Base Register 0 */ ARMREG_WRITE_INLINE(ttbr, p15,0,%0,c2,c0,0) /* Translation Table Base Register 0 */ ARMREG_READ_INLINE(ttbr1, p15,0,%0,c2,c0,1) /* Translation Table Base Register 1 */ ARMREG_WRITE_INLINE(ttbr1, p15,0,%0,c2,c0,1) /* Translation Table Base Register 1 */ ARMREG_READ_INLINE(ttbcr, p15,0,%0,c2,c0,2) /* Translation Table Base Register */ ARMREG_WRITE_INLINE(ttbcr, p15,0,%0,c2,c0,2) /* Translation Table Base Register */ -/* c5 registers */ +/* cp15 c5 registers */ ARMREG_READ_INLINE(dfsr, p15,0,%0,c5,c0,0) /* Data Fault Status Register */ ARMREG_READ_INLINE(ifsr, p15,0,%0,c5,c0,1) /* Instruction Fault Status Register */ -/* c6 registers */ +/* cp15 c6 registers */ ARMREG_READ_INLINE(dfar, p15,0,%0,c6,c0,0) /* Data Fault Address Register */ ARMREG_READ_INLINE(ifar, p15,0,%0,c6,c0,2) /* Instruction Fault Address Register */ -/* c7 registers */ +/* cp15 c7 registers */ ARMREG_WRITE_INLINE(icialluis, p15,0,%0,c7,c1,0) /* Instruction Inv All (IS) */ ARMREG_WRITE_INLINE(bpiallis, p15,0,%0,c7,c1,6) /* Branch Invalidate All (IS) */ ARMREG_READ_INLINE(par, p15,0,%0,c7,c4,0) /* Physical Address Register */ @@ -644,7 +657,7 @@ ARMREG_WRITE_INLINE(dmb, p15,0,%0,c7,c1 ARMREG_WRITE_INLINE(dccmvau, p15,0,%0,c7,c14,1) /* Data Clean MVA to PoU */ ARMREG_WRITE_INLINE(dccimvac, p15,0,%0,c7,c14,1) /* Data CleanInv MVA to PoC */ ARMREG_WRITE_INLINE(dccisw, p15,0,%0,c7,c14,2) /* Data CleanInv Set/Way */ -/* c9 registers */ +/* cp15 c9 registers */ ARMREG_READ_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */ ARMREG_WRITE_INLINE(pmcr, p15,0,%0,c9,c12,0) /* PMC Control Register */ ARMREG_READ_INLINE(pmcntenset, p15,0,%0,c9,c12,1) /* PMC Count Enable Set */ @@ -657,14 +670,14 @@ ARMREG_READ_INLINE(pmccntr, p15,0,%0,c9 ARMREG_WRITE_INLINE(pmccntr, p15,0,%0,c9,c13,0) /* PMC Cycle Counter */ ARMREG_READ_INLINE(pmuserenr, p15,0,%0,c9,c14,0) /* PMC User Enable */
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue Feb 12 19:14:50 UTC 2013 Modified Files: src/sys/kern: kern_module.c Log Message: Can you please tell us the module name that had the wrong version? Thanks. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.86 src/sys/kern/kern_module.c:1.87 --- src/sys/kern/kern_module.c:1.86 Sun Dec 4 14:24:59 2011 +++ src/sys/kern/kern_module.c Tue Feb 12 14:14:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.86 2011/12/04 19:24:59 jym Exp $ */ +/* $NetBSD: kern_module.c,v 1.87 2013/02/12 19:14:50 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.86 2011/12/04 19:24:59 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.87 2013/02/12 19:14:50 christos Exp $); #define _MODULE_INTERNAL @@ -937,8 +937,8 @@ module_do_load(const char *name, bool is goto fail; } if (!module_compatible(mi-mi_version, __NetBSD_Version__)) { - module_error(module built for `%d', system `%d', - mi-mi_version, __NetBSD_Version__); + module_error(module `%s' built for `%d', system `%d', + mi-mi_name, mi-mi_version, __NetBSD_Version__); if ((flags MODCTL_LOAD_FORCE) != 0) { module_error(forced load, system may be unstable); } else {
CVS commit: src/crypto/external
Module Name:src Committed By: christos Date: Tue Feb 12 20:31:14 UTC 2013 Modified Files: src/crypto/external: Makefile src/crypto/external/bsd: Makefile Log Message: mv the MKCRYPTO protection higher; ideally should be at the top for this To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/crypto/external/Makefile cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/Makefile diff -u src/crypto/external/Makefile:1.1 src/crypto/external/Makefile:1.2 --- src/crypto/external/Makefile:1.1 Thu Feb 7 20:54:20 2013 +++ src/crypto/external/Makefile Tue Feb 12 15:31:13 2013 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2013/02/08 01:54:20 christos Exp $ +# $NetBSD: Makefile,v 1.2 2013/02/12 20:31:13 christos Exp $ +.if (${MKCRYPTO} != no) SUBDIR+= bsd cpl +.endif .include bsd.subdir.mk Index: src/crypto/external/bsd/Makefile diff -u src/crypto/external/bsd/Makefile:1.11 src/crypto/external/bsd/Makefile:1.12 --- src/crypto/external/bsd/Makefile:1.11 Wed Apr 20 04:36:07 2011 +++ src/crypto/external/bsd/Makefile Tue Feb 12 15:31:14 2013 @@ -1,9 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2011/04/20 08:36:07 elric Exp $ +# $NetBSD: Makefile,v 1.12 2013/02/12 20:31:14 christos Exp $ .include bsd.own.mk -.if (${MKCRYPTO} != no) SUBDIR+= openssl .WAIT heimdal netpgp .WAIT openssh libsaslc -.endif .include bsd.subdir.mk
CVS commit: src/external/bsd
Module Name:src Committed By: christos Date: Tue Feb 12 20:32:11 UTC 2013 Modified Files: src/external/bsd: Makefile Log Message: This has no business going to the crypto tree and building it. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/external/bsd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/Makefile diff -u src/external/bsd/Makefile:1.34 src/external/bsd/Makefile:1.35 --- src/external/bsd/Makefile:1.34 Thu Nov 15 14:49:12 2012 +++ src/external/bsd/Makefile Tue Feb 12 15:32:11 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2012/11/15 19:49:12 jkunz Exp $ +# $NetBSD: Makefile,v 1.35 2013/02/12 20:32:11 christos Exp $ .include bsd.own.mk @@ -10,7 +10,7 @@ SUBDIR= acpica am-utils bind byacc cron SUBDIR+= atf .endif .if (${MKCRYPTO} != no) -SUBDIR+= pkg_install ../../crypto/external/bsd +SUBDIR+= pkg_install .endif # IP Filter .if (${MKIPFILTER} != no)
CVS commit: src/share/me
Module Name:src Committed By: christos Date: Tue Feb 12 20:46:10 UTC 2013 Modified Files: src/share/me: Makefile Log Message: me.7 is supplied both by groff and here. Don't include both. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/me/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/me/Makefile diff -u src/share/me/Makefile:1.26 src/share/me/Makefile:1.27 --- src/share/me/Makefile:1.26 Sat Oct 25 18:27:36 2008 +++ src/share/me/Makefile Tue Feb 12 15:46:10 2013 @@ -1,5 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 -# $NetBSD: Makefile,v 1.26 2008/10/25 22:27:36 apb Exp $ +# $NetBSD: Makefile,v 1.27 2013/02/12 20:46:10 christos Exp $ + +.include bsd.prog.mk MELIB= ${BINDIR}/me #TMLIB= ${BINDIR}/tmac @@ -7,10 +9,12 @@ MESRCS= acm.me chars.me deltext.me eqn.m index.me letterhead.me local.me null.me refer.me sh.me \ tbl.me thesis.me #TMSRCS= tmac.e + +.if ${MKGROFF} == no MAN= me.7 -CLEANFILES+= ${MESRCS:=.tmp} +.endif -.include bsd.prog.mk +CLEANFILES+= ${MESRCS:=.tmp} .for M in ${MESRCS}
CVS commit: src/share/me
Module Name:src Committed By: pgoyette Date: Tue Feb 12 20:50:22 UTC 2013 Modified Files: src/share/me: me.7 Log Message: Remove a spurious '%' in tech%nical To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/me/me.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/me/me.7 diff -u src/share/me/me.7:1.10 src/share/me/me.7:1.11 --- src/share/me/me.7:1.10 Wed Nov 14 22:54:38 2007 +++ src/share/me/me.7 Tue Feb 12 20:50:22 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: me.7,v 1.10 2007/11/14 22:54:38 wiz Exp $ +.\ $NetBSD: me.7,v 1.11 2013/02/12 20:50:22 pgoyette Exp $ .\ .\ Copyright (c) 1980, 1993 .\ The Regents of the University of California. All rights reserved. @@ -48,7 +48,7 @@ This package of and .I troff macro definitions provides a canned formatting -facility for tech%nical papers in various formats. +facility for technical papers in various formats. When producing 2-column output on a terminal, filter the output through .IR col (1).
CVS commit: src/crypto/external
Module Name:src Committed By: christos Date: Tue Feb 12 20:55:37 UTC 2013 Modified Files: src/crypto/external: Makefile Log Message: need bsd.own.mk To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/crypto/external/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/Makefile diff -u src/crypto/external/Makefile:1.2 src/crypto/external/Makefile:1.3 --- src/crypto/external/Makefile:1.2 Tue Feb 12 15:31:13 2013 +++ src/crypto/external/Makefile Tue Feb 12 15:55:37 2013 @@ -1,4 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2013/02/12 20:31:13 christos Exp $ +# $NetBSD: Makefile,v 1.3 2013/02/12 20:55:37 christos Exp $ + +.include bsd.own.mk .if (${MKCRYPTO} != no) SUBDIR+= bsd cpl
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: macallan Date: Tue Feb 12 21:17:17 UTC 2013 Modified Files: src/sys/arch/arm/omap: omapfbreg.h Log Message: be a little more consistent with register names To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/omapfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/omapfbreg.h diff -u src/sys/arch/arm/omap/omapfbreg.h:1.2 src/sys/arch/arm/omap/omapfbreg.h:1.3 --- src/sys/arch/arm/omap/omapfbreg.h:1.2 Wed Jan 30 15:55:27 2013 +++ src/sys/arch/arm/omap/omapfbreg.h Tue Feb 12 21:17:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omapfbreg.h,v 1.2 2013/01/30 15:55:27 macallan Exp $ */ +/* $NetBSD: omapfbreg.h,v 1.3 2013/02/12 21:17:17 macallan Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: omapfbreg.h,v 1.2 2013/01/30 15:55:27 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: omapfbreg.h,v 1.3 2013/02/12 21:17:17 macallan Exp $); #ifndef OMAPFB_REG_H #define OMAPFB_REG_H @@ -82,8 +82,8 @@ __KERNEL_RCSID(0, $NetBSD: omapfbreg.h, #define OMAPFB_DISPC_GFX_PRELOAD 0x062c /* VID1 */ -#define OMAPFB_DISPC_VID1_BASE0 0x04bc -#define OMAPFB_DISPC_VID1_BASE1 0x04c0 +#define OMAPFB_DISPC_VID1_BASE_0 0x04bc +#define OMAPFB_DISPC_VID1_BASE_1 0x04c0 #define OMAPFB_DISPC_VID1_POSITION 0x04c4 #define OMAPFB_DISPC_VID1_SIZE 0x04c8 /* displayed size */ #define OMAPFB_DISPC_VID1_ATTRIBUTES 0x04cc @@ -127,8 +127,8 @@ __KERNEL_RCSID(0, $NetBSD: omapfbreg.h, #define OMAPFB_DISPC_VID1_PRELOAD 0x0630 /* VID2 */ -#define OMAPFB_DISPC_VID2_BASE0 0x054c -#define OMAPFB_DISPC_VID2_BASE1 0x0550 +#define OMAPFB_DISPC_VID2_BASE_0 0x054c +#define OMAPFB_DISPC_VID2_BASE_1 0x0550 #define OMAPFB_DISPC_VID2_POSITION 0x0554 #define OMAPFB_DISPC_VID2_SIZE 0x0558 #define OMAPFB_DISPC_VID2_ATTRIBUTES 0x055c
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: macallan Date: Tue Feb 12 21:17:38 UTC 2013 Modified Files: src/sys/arch/arm/omap: omapfb.c Log Message: support a hardware cursor To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/omap/omapfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/omapfb.c diff -u src/sys/arch/arm/omap/omapfb.c:1.21 src/sys/arch/arm/omap/omapfb.c:1.22 --- src/sys/arch/arm/omap/omapfb.c:1.21 Sat Feb 9 13:28:59 2013 +++ src/sys/arch/arm/omap/omapfb.c Tue Feb 12 21:17:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omapfb.c,v 1.21 2013/02/09 13:28:59 jmcneill Exp $ */ +/* $NetBSD: omapfb.c,v 1.22 2013/02/12 21:17:37 macallan Exp $ */ /* * Copyright (c) 2010 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.21 2013/02/09 13:28:59 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.22 2013/02/12 21:17:37 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -75,6 +75,15 @@ struct omapfb_softc { int sc_width, sc_height, sc_depth, sc_stride; int sc_locked; void *sc_fbaddr, *sc_vramaddr; + + int sc_cursor_offset; + uint32_t *sc_cursor_img; + int sc_cursor_x, sc_cursor_y; + int sc_hot_x, sc_hot_y; + uint8_t sc_cursor_bitmap[8 * 64]; + uint8_t sc_cursor_mask[8 * 64]; + uint32_t sc_cursor_cmap[4]; + bus_addr_t sc_fbhwaddr; uint32_t *sc_clut; uint32_t sc_dispc_config; @@ -112,6 +121,10 @@ static void omapfb_putpalreg(struct oma static int omapfb_set_depth(struct omapfb_softc *, int); static void omapfb_set_video(struct omapfb_softc *, int); +static void omapfb_move_cursor(struct omapfb_softc *, int, int); +static int omapfb_do_cursor(struct omapfb_softc *, + struct wsdisplay_cursor *); + #if NOMAPDMA 0 static void omapfb_init(struct omapfb_softc *); static void omapfb_wait_idle(struct omapfb_softc *); @@ -300,24 +313,53 @@ omapfb_attach(device_t parent, device_t bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DSS_SYSCONFIG, OMAP_SYSCONF_AUTOIDLE); - reg = bus_space_read_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_CONFIG); - reg = OMAP_DISPC_CTRL_ACTIVE_MTRX; + + reg = OMAP_DISPC_CFG_TV_ALPHA_EN | OMAP_DISPC_CFG_LCD_ALPHA_EN; bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_CONFIG, reg); sc-sc_dispc_config = reg; + /* we use overlay 1 for the console and X */ + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GLOBAL_ALPHA, 0x00ff00ff); sc-sc_fbhwaddr = sc-sc_dmamem-ds_addr + 0x1000; - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_BASE_0, + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_BASE_0, sc-sc_fbhwaddr); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_POSITION, + 0); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_SIZE, + ((sc-sc_height - 1) 16) | (sc-sc_width - 1)); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PICTURE_SIZE, + ((sc-sc_height - 1) 16) | (sc-sc_width - 1)); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_ROW_INC, 1); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PIXEL_INC, 1); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PRELOAD, 0x60); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_ATTRIBUTES, + OMAP_VID_ATTR_ENABLE | + OMAP_VID_ATTR_BURST_16x32 | + OMAP_VID_ATTR_RGB16 | + OMAP_VID_ATTR_REPLICATION); + + /* turn off overlay 2 */ + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID2_ATTRIBUTES, 0); + + /* initialize the gfx layer for use as hardware cursor */ + sc-sc_cursor_cmap[0] = 0; + sc-sc_cursor_offset = (12 20) - (64 * 64 * 4); + sc-sc_cursor_img = (uint32_t *)((uint8_t *)sc-sc_fbaddr + sc-sc_cursor_offset); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_BASE_0, + sc-sc_fbhwaddr + sc-sc_cursor_offset); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_TABLE_BASE, sc-sc_dmamem-ds_addr); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_SIZE, + 0x003f003f); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_POSITION, - 0); + 0x00100010); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_PRELOAD, 0x60); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_ATTRIBUTES, - OMAP_DISPC_ATTR_ENABLE | + /*OMAP_DISPC_ATTR_ENABLE |*/ OMAP_DISPC_ATTR_BURST_16x32 | - /*OMAP_DISPC_ATTR_8BIT*/OMAP_DISPC_ATTR_RGB16 - | OMAP_DISPC_ATTR_REPLICATION); + OMAP_DISPC_ATTR_ARGB32 | + OMAP_DISPC_ATTR_REPLICATION); + #if 0 printf(dss_control: %08x\n, bus_space_read_4(sc-sc_iot, sc-sc_regh, OMAPFB_DSS_CONTROL)); @@ -532,6 +574,36 @@ omapfb_ioctl(void *v, void *vs, u_long c omapfb_set_video(sc, *on); } return 0; + + case WSDISPLAYIO_GCURPOS: + { +struct wsdisplay_curpos *cp = (void *)data; + +cp-x =
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: macallan Date: Tue Feb 12 21:25:13 UTC 2013 Modified Files: src/sys/arch/arm/omap: omapfb.c Log Message: break long lines To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/omap/omapfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/omapfb.c diff -u src/sys/arch/arm/omap/omapfb.c:1.22 src/sys/arch/arm/omap/omapfb.c:1.23 --- src/sys/arch/arm/omap/omapfb.c:1.22 Tue Feb 12 21:17:37 2013 +++ src/sys/arch/arm/omap/omapfb.c Tue Feb 12 21:25:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omapfb.c,v 1.22 2013/02/12 21:17:37 macallan Exp $ */ +/* $NetBSD: omapfb.c,v 1.23 2013/02/12 21:25:12 macallan Exp $ */ /* * Copyright (c) 2010 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.22 2013/02/12 21:17:37 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.23 2013/02/12 21:25:12 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -319,19 +319,24 @@ omapfb_attach(device_t parent, device_t sc-sc_dispc_config = reg; /* we use overlay 1 for the console and X */ - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GLOBAL_ALPHA, 0x00ff00ff); + bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GLOBAL_ALPHA, + 0x00ff00ff); sc-sc_fbhwaddr = sc-sc_dmamem-ds_addr + 0x1000; bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_BASE_0, sc-sc_fbhwaddr); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_POSITION, - 0); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID1_POSITION, 0); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_SIZE, ((sc-sc_height - 1) 16) | (sc-sc_width - 1)); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PICTURE_SIZE, + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID1_PICTURE_SIZE, ((sc-sc_height - 1) 16) | (sc-sc_width - 1)); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_ROW_INC, 1); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PIXEL_INC, 1); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_PRELOAD, 0x60); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID1_ROW_INC, 1); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID1_PIXEL_INC, 1); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID1_PRELOAD, 0x60); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID1_ATTRIBUTES, OMAP_VID_ATTR_ENABLE | OMAP_VID_ATTR_BURST_16x32 | @@ -339,12 +344,14 @@ omapfb_attach(device_t parent, device_t OMAP_VID_ATTR_REPLICATION); /* turn off overlay 2 */ - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_VID2_ATTRIBUTES, 0); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_VID2_ATTRIBUTES, 0); /* initialize the gfx layer for use as hardware cursor */ sc-sc_cursor_cmap[0] = 0; sc-sc_cursor_offset = (12 20) - (64 * 64 * 4); - sc-sc_cursor_img = (uint32_t *)((uint8_t *)sc-sc_fbaddr + sc-sc_cursor_offset); + sc-sc_cursor_img = + (uint32_t *)((uint8_t *)sc-sc_fbaddr + sc-sc_cursor_offset); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_BASE_0, sc-sc_fbhwaddr + sc-sc_cursor_offset); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_TABLE_BASE, @@ -353,7 +360,8 @@ omapfb_attach(device_t parent, device_t 0x003f003f); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_POSITION, 0x00100010); - bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_PRELOAD, 0x60); + bus_space_write_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_GFX_PRELOAD, 0x60); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_GFX_ATTRIBUTES, /*OMAP_DISPC_ATTR_ENABLE |*/ OMAP_DISPC_ATTR_BURST_16x32 | @@ -768,7 +776,8 @@ omapfb_set_depth(struct omapfb_softc *sc reg |= OMAP_VID_ATTR_RGB24; break; default: - aprint_error_dev(sc-sc_dev, unsupported depth (%d)\n, d); + aprint_error_dev(sc-sc_dev, + unsupported depth (%d)\n, d); return EINVAL; } @@ -1205,8 +1214,9 @@ omapfb_do_cursor(struct omapfb_softc * s mask = 0x01; for (j = 0; j 8; j++) { idx = ((sc-sc_cursor_mask[i] mask) ? 2 : 0) | - ((sc-sc_cursor_bitmap[i] mask) ? 1 : 0); -sc-sc_cursor_img[i * 8 + j] = sc-sc_cursor_cmap[idx]; +((sc-sc_cursor_bitmap[i] mask) ? 1 : 0); +sc-sc_cursor_img[i * 8 + j] = +sc-sc_cursor_cmap[idx]; mask = mask 1; } } @@ -1214,7 +1224,8 @@ omapfb_do_cursor(struct omapfb_softc * s if (whack) { uint32_t reg; - reg = bus_space_read_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_CONTROL); + reg = bus_space_read_4(sc-sc_iot, sc-sc_regh, + OMAPFB_DISPC_CONTROL); bus_space_write_4(sc-sc_iot, sc-sc_regh, OMAPFB_DISPC_CONTROL, reg | OMAP_DISPC_CTRL_GO_LCD | OMAP_DISPC_CTRL_GO_DIGITAL); }
CVS commit: src/lib/libm
Module Name:src Committed By: martin Date: Tue Feb 12 21:40:19 UTC 2013 Modified Files: src/lib/libm: Makefile src/lib/libm/src: s_fmal.c s_frexpl.c Log Message: Use __HAVE_LONG_DOUBLE instead of EXT_EXPBITS and include s_nextafterl.c as well as s_frexpl.c in the global list of common sources - as we seem to have no arch redefining the standard double variant, it seems unlikely we will have on redefining the long double version in assembler. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/lib/libm/Makefile cvs rdiff -u -r1.2 -r1.3 src/lib/libm/src/s_fmal.c \ src/lib/libm/src/s_frexpl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.132 src/lib/libm/Makefile:1.133 --- src/lib/libm/Makefile:1.132 Mon Feb 11 17:55:01 2013 +++ src/lib/libm/Makefile Tue Feb 12 21:40:18 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.132 2013/02/11 17:55:01 matt Exp $ +# $NetBSD: Makefile,v 1.133 2013/02/12 21:40:18 martin Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -68,9 +68,9 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c .endif .PATH: ${.CURDIR}/arch/i387 -COMMON_SRCS+= fenv.c s_nextafterl.c s_nexttoward.c s_nexttowardf.c \ +COMMON_SRCS+= fenv.c s_nexttoward.c s_nexttowardf.c \ s_nearbyint.c s_rintl.c \ - s_scalbln.c s_frexpl.c # s_nan.c + s_scalbln.c # s_nan.c COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \ @@ -155,7 +155,7 @@ COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c s_floor.c s_floorf.c s_frexpf.c s_ilogb.c s_ilogbf.c s_ilogbl.c \ s_isinff.c s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \ s_log1pf.c s_logb.c s_logbf.c s_logbl.c \ - s_matherr.c s_modff.c s_nextafter.c \ + s_matherr.c s_modff.c s_nextafter.c s_nextafterl.c \ s_nextafterf.c s_remquo.c s_remquof.c s_rint.c s_rintf.c s_round.c s_roundf.c s_scalbn.c \ s_scalbnf.c s_scalbnl.c s_signgam.c s_significand.c s_significandf.c s_sin.c \ s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ @@ -169,7 +169,7 @@ COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \ w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c \ lrint.c lrintf.c llrint.c llrintf.c lround.c lroundf.c llround.c \ - llroundf.c s_frexp.c s_ldexp.c s_modf.c \ + llroundf.c s_frexp.c s_frexpl.c s_ldexp.c s_modf.c \ s_fmax.c s_fmaxf.c s_fmaxl.c \ s_fmin.c s_fminf.c s_fminl.c s_fdim.c Index: src/lib/libm/src/s_fmal.c diff -u src/lib/libm/src/s_fmal.c:1.2 src/lib/libm/src/s_fmal.c:1.3 --- src/lib/libm/src/s_fmal.c:1.2 Mon Feb 11 01:29:58 2013 +++ src/lib/libm/src/s_fmal.c Tue Feb 12 21:40:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: s_fmal.c,v 1.2 2013/02/11 01:29:58 christos Exp $ */ +/* $NetBSD: s_fmal.c,v 1.3 2013/02/12 21:40:19 martin Exp $ */ /*- * Copyright (c) 2005-2011 David Schultz d...@freebsd.org @@ -30,7 +30,7 @@ #if 0 __FBSDID($FreeBSD: src/lib/msun/src/s_fmal.c,v 1.7 2011/10/21 06:30:43 das Exp $); #else -__RCSID($NetBSD: s_fmal.c,v 1.2 2013/02/11 01:29:58 christos Exp $); +__RCSID($NetBSD: s_fmal.c,v 1.3 2013/02/12 21:40:19 martin Exp $); #endif #include machine/ieee.h @@ -40,7 +40,7 @@ __RCSID($NetBSD: s_fmal.c,v 1.2 2013/02 #include math_private.h -#ifdef EXT_EXPBITS +#ifdef __HAVE_LONG_DOUBLE /* * A struct dd represents a floating-point number with twice the precision * of a long double. We maintain the invariant that hi stores the high-order Index: src/lib/libm/src/s_frexpl.c diff -u src/lib/libm/src/s_frexpl.c:1.2 src/lib/libm/src/s_frexpl.c:1.3 --- src/lib/libm/src/s_frexpl.c:1.2 Mon Feb 11 01:47:04 2013 +++ src/lib/libm/src/s_frexpl.c Tue Feb 12 21:40:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: s_frexpl.c,v 1.2 2013/02/11 01:47:04 christos Exp $ */ +/* $NetBSD: s_frexpl.c,v 1.3 2013/02/12 21:40:19 martin Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz d...@freebsd.org @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: s_frexpl.c,v 1.2 2013/02/11 01:47:04 christos Exp $); +__RCSID($NetBSD: s_frexpl.c,v 1.3 2013/02/12 21:40:19 martin Exp $); #include machine/ieee.h #include float.h @@ -37,7 +37,7 @@ __RCSID($NetBSD: s_frexpl.c,v 1.2 2013/ #include math_private.h -#ifdef EXT_EXPBITS +#ifdef __HAVE_LONG_DOUBLE #if LDBL_MAX_EXP != 0x4000 #error Unsupported long double format #endif
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Tue Feb 12 22:24:48 UTC 2013 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: break some more long lines To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.71 src/sys/arch/sparc/dev/cgfourteen.c:1.72 --- src/sys/arch/sparc/dev/cgfourteen.c:1.71 Thu Feb 7 16:14:30 2013 +++ src/sys/arch/sparc/dev/cgfourteen.c Tue Feb 12 22:24:47 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.71 2013/02/07 16:14:30 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.72 2013/02/12 22:24:47 macallan Exp $ */ /* * Copyright (c) 1996 @@ -150,7 +150,8 @@ static int cg14_do_cursor(struct cgfour #if NSX 0 static void cg14_wait_idle(struct cgfourteen_softc *); -static void cg14_rectfill(struct cgfourteen_softc *, int, int, int, int, uint32_t); +static void cg14_rectfill(struct cgfourteen_softc *, int, int, int, int, +uint32_t); static void cg14_invert(struct cgfourteen_softc *, int, int, int, int); static void cg14_bitblt(void *, int, int, int, int, int, int, int); @@ -283,7 +284,8 @@ cgfourteenattach(device_t parent, device sa-sa_size, 0 /*BUS_SPACE_MAP_LINEAR*/, bh) != 0) { - printf(%s: cannot map control registers\n, device_xname(self)); + printf(%s: cannot map control registers\n, + device_xname(self)); return; } sc-sc_regh = bh; @@ -1326,8 +1328,10 @@ cg14_bitblt(void *cookie, int xs, int ys dptr = daddr; cnt = wi; if (pre 0) { -sta(sptr, ASI_SX, SX_LDB(32, pre - 1, sptr 7)); -sta(dptr, ASI_SX, SX_STB(32, pre - 1, dptr 7)); +sta(sptr, ASI_SX, +SX_LDB(32, pre - 1, sptr 7)); +sta(dptr, ASI_SX, +SX_STB(32, pre - 1, dptr 7)); cnt -= pre; sptr += pre; dptr += pre; @@ -1342,8 +1346,10 @@ cg14_bitblt(void *cookie, int xs, int ys cnt -= num 2; } if (cnt 0) { -sta(sptr, ASI_SX, SX_LDB(32, cnt - 1, sptr 7)); -sta(dptr, ASI_SX, SX_STB(32, cnt - 1, dptr 7)); +sta(sptr, ASI_SX, +SX_LDB(32, cnt - 1, sptr 7)); +sta(dptr, ASI_SX, +SX_STB(32, cnt - 1, dptr 7)); } saddr += skip; daddr += skip; @@ -1362,8 +1368,10 @@ cg14_bitblt(void *cookie, int xs, int ys cnt -= 32; } if (cnt 0) { -sta(sptr, ASI_SX, SX_LDB(32, cnt - 1, sptr 7)); -sta(dptr, ASI_SX, SX_STB(32, cnt - 1, dptr 7)); +sta(sptr, ASI_SX, +SX_LDB(32, cnt - 1, sptr 7)); +sta(dptr, ASI_SX, +SX_STB(32, cnt - 1, dptr 7)); } saddr += skip; daddr += skip; @@ -1416,7 +1424,8 @@ cg14_putchar(void *cookie, int row, int uint32_t reg; for (i = 0; i he; i++) { reg = *data8; -sx_write(sc-sc_sx, SX_QUEUED(R_MASK), reg 24); +sx_write(sc-sc_sx, SX_QUEUED(R_MASK), +reg 24); sta(addr, ASI_SX, SX_STBS(8, wi - 1, addr 7)); data8++; addr += stride; @@ -1428,7 +1437,8 @@ cg14_putchar(void *cookie, int row, int uint32_t reg; for (i = 0; i he; i++) { reg = *data16; -sx_write(sc-sc_sx, SX_QUEUED(R_MASK), reg 16); +sx_write(sc-sc_sx, SX_QUEUED(R_MASK), +reg 16); sta(addr, ASI_SX, SX_STBS(8, wi - 1, addr 7)); data16++; addr += stride;
CVS commit: src/sys/arch/hp700/include
Module Name:src Committed By: skrll Date: Tue Feb 12 23:02:58 UTC 2013 Modified Files: src/sys/arch/hp700/include: cpu.h Log Message: The file needs opt_multiprocessor to get the CR_CURCPU define. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hp700/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/include/cpu.h diff -u src/sys/arch/hp700/include/cpu.h:1.70 src/sys/arch/hp700/include/cpu.h:1.71 --- src/sys/arch/hp700/include/cpu.h:1.70 Wed May 23 16:11:37 2012 +++ src/sys/arch/hp700/include/cpu.h Tue Feb 12 23:02:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.70 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.71 2013/02/12 23:02:58 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -55,6 +55,7 @@ #ifdef _KERNEL_OPT #include opt_cputype.h +#include opt_multiprocessor.h #endif #include machine/trap.h
CVS commit: src/sbin/fdisk
Module Name:src Committed By: christos Date: Wed Feb 13 00:40:29 UTC 2013 Modified Files: src/sbin/fdisk: fdisk.c Log Message: Don't produce spurious errors when creating labels on files. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sbin/fdisk/fdisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fdisk/fdisk.c diff -u src/sbin/fdisk/fdisk.c:1.143 src/sbin/fdisk/fdisk.c:1.144 --- src/sbin/fdisk/fdisk.c:1.143 Fri Feb 8 20:50:04 2013 +++ src/sbin/fdisk/fdisk.c Tue Feb 12 19:40:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fdisk.c,v 1.143 2013/02/09 01:50:04 christos Exp $ */ +/* $NetBSD: fdisk.c,v 1.144 2013/02/13 00:40:28 christos Exp $ */ /* * Mach Operating System @@ -39,7 +39,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: fdisk.c,v 1.143 2013/02/09 01:50:04 christos Exp $); +__RCSID($NetBSD: fdisk.c,v 1.144 2013/02/13 00:40:28 christos Exp $); #endif /* not lint */ #define MBRPTYPENAMES @@ -1645,6 +1645,8 @@ intuit_translated_geometry(void) } if (xheads == -1) { + if (F_flag) + return; warnx(Cannot determine the number of heads); return; } @@ -2671,6 +2673,8 @@ read_s0(daddr_t offset, struct mbr_secto return -1; } if (boot-mbr_magic != LE_MBR_MAGIC) { + if (F_flag boot-mbr_magic == 0) + return -1; warnx(%s partition table invalid, no magic in sector %PRIdaddr, tabletype, offset); return -1;
CVS commit: src
Module Name:src Committed By: christos Date: Wed Feb 13 02:17:55 UTC 2013 Modified Files: src: build.sh Log Message: add a disk-image=target option To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.263 src/build.sh:1.264 --- src/build.sh:1.263 Sun Feb 3 00:37:43 2013 +++ src/build.sh Tue Feb 12 21:17:54 2013 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.263 2013/02/03 05:37:43 matt Exp $ +# $NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -508,6 +508,7 @@ initdefaults() do_iso_image_source=false do_live_image=false do_install_image=false + do_disk_image=false do_params=false do_rump=false @@ -922,6 +923,8 @@ Usage: ${progname} [-EhnorUuxy] [-a arch RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. install-image Create bootable installation image in RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. +disk-image=target Creae bootable disk image in + RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz. params Display various make(1) parameters. Options: @@ -1208,6 +1211,14 @@ parseoptions() bomb Must supply a kernel name with \`${op}=...' ;; + disk-image=*) + arg=${op#*=} + op=disk_image + [ -n ${arg} ] || + bomb Must supply a target name with \`${op}=...' + + ;; + modules) op=modules ;; @@ -1719,7 +1730,7 @@ createmakewrapper() eval cat EOF ${makewrapout} #! ${HOST_SH} # Set proper variables to allow easy make building of a NetBSD subtree. -# Generated from: \$NetBSD: build.sh,v 1.263 2013/02/03 05:37:43 matt Exp $ +# Generated from: \$NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $ # with these arguments: ${_args} # @@ -1799,6 +1810,18 @@ getkernelconf() kernelbuildpath=${KERNOBJDIR}/${kernelconfname} } +diskimage() +{ + ARG=$(echo $1 | tr '[:lower:]' '[:upper:]') + [ -f ${DESTDIR}/etc/mtree/set.base ] || + bomb The release binaries must be built first + kerneldir=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel + kernel=${kerneldir}/netbsd-${ARG}.gz + [ -f ${kernel} ] || + bomb The kernel ${kernel} must be built first + make_in_dir ${NETBSDSRCDIR}/etc smp_${1} +} + buildkernel() { if ! ${do_tools} ! ${buildkernelwarned:-false}; then @@ -2066,6 +2089,11 @@ main() releasekernel ${arg} ;; + disk-image=*) + arg=${op#*=} + diskimage ${arg} + ;; + modules) buildmodules ;;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Wed Feb 13 03:29:47 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: TIcket 813. To generate a diff of this commit: cvs rdiff -u -r1.1.2.92 -r1.1.2.93 src/doc/CHANGES-6.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.92 src/doc/CHANGES-6.1:1.1.2.93 --- src/doc/CHANGES-6.1:1.1.2.92 Mon Feb 11 21:50:30 2013 +++ src/doc/CHANGES-6.1 Wed Feb 13 03:29:46 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.92 2013/02/11 21:50:30 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.93 2013/02/13 03:29:46 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -8400,3 +8400,68 @@ usr.sbin/pf/ftp-proxy/Makefile 1.8 an alternative to n-code, and minor fixes. [rmind, ticket #817] +etc/MAKEDEV.tmpl 1.160 +etc/etc.evbarm/MAKEDEV.conf1.9 +external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1 +external/broadcom/rpi-firmware/dist/bootcode.bin 1.1 +external/broadcom/rpi-firmware/dist/bootcode.bin 1.2 +external/broadcom/rpi-firmware/dist/fixup.dat 1.1 +external/broadcom/rpi-firmware/dist/fixup.dat 1.2 +external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1 +external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2 +external/broadcom/rpi-firmware/dist/start.elf 1.1 +external/broadcom/rpi-firmware/dist/start.elf 1.2 +external/broadcom/rpi-firmware/dist/start_cd.elf 1.1 +external/broadcom/rpi-firmware/dist/start_cd.elf 1.2 +sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch +sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch +sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch +sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch +sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch +sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch +sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch +sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch +sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch +sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch +sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch +sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch +sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch +sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch +sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch +sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch +sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch +sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch +sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch +sys/arch/arm/broadcom/files.bcm2835 1.14 via patch +sys/arch/evbarm/conf/RPI1.23 via patch +sys/arch/evbarm/conf/files.rpi1.3 via patch +sys/arch/evbarm/conf/mk.rpi1.2 via patch +sys/arch/evbarm/conf/std.rpi1.4 via patch +sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch +sys/arch/evbarm/rpi/rpi_start.S1.7 via patch +sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch +sys/arch/evbarm/rpi/vcio.h1.1 via patch +sys/arch/evbarm/rpi/vcprop.h1.7 via patch +sys/conf/files patch +sys/dev/sdmmc/sdhc.c 1.43 +sys/dev/sdmmc/sdhcvar.h 1.13 +sys/dev/usb/dwc_otg.c 1.45 via patch +sys/dev/usb/dwc_otgreg.h1.5 via patch +sys/dev/usb/dwc_otgvar.h1.11 via patch +sys/dev/usb/files.usb 1.126 via patch +sys/dev/usb/if_smsc.c 1.7 via patch +sys/dev/usb/if_smscreg.h1.1 via patch +sys/dev/usb/if_smscvar.h1.1 via patch +sys/dev/usb/usbdevices.configpatch +sys/dev/usb/usbdevs 1.633 via patch +sys/dev/usb/usbdevs.h regen +sys/dev/usb/usbdevs_data.hregen +sys/dev/wscons/wsconsio.h1.105,1.107 via patch +sys/dev/wscons/wsdisplayvar.h1.50 +sys/dev/wscons/wsdisplay_util.c1.2 +sys/dev/videomode/edid.c1.12 via patch + + Greatly improved Raspberry Pi support. USB and onboard + Ethernet should work. + [skrll, ticket #813] +
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: christos Date: Wed Feb 13 04:22:36 UTC 2013 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Avoid // To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.43 src/etc/etc.evbarm/Makefile.inc:1.44 --- src/etc/etc.evbarm/Makefile.inc:1.43 Sun Feb 10 17:03:49 2013 +++ src/etc/etc.evbarm/Makefile.inc Tue Feb 12 23:22:36 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.43 2013/02/10 22:03:49 jmcneill Exp $ +# $NetBSD: Makefile.inc,v 1.44 2013/02/13 04:22:36 christos Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -18,7 +18,7 @@ EVBARM_BOARDS+= ADI_BRH CP3100 GEMINI G IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR} -IMAGE.dir= ${IMAGE.rel}/binary/gzimg/ +IMAGE.dir= ${IMAGE.rel}/binary/gzimg IMAGE.kern= ${IMAGE.rel}/binary/kernel __mkimage: .USE
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Wed Feb 13 04:49:59 UTC 2013 Modified Files: src/lib/libc/gen: vis.c Log Message: Wide char support from J.R. Oldroyd To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libc/gen/vis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.c diff -u src/lib/libc/gen/vis.c:1.45 src/lib/libc/gen/vis.c:1.46 --- src/lib/libc/gen/vis.c:1.45 Fri Dec 14 16:38:18 2012 +++ src/lib/libc/gen/vis.c Tue Feb 12 23:49:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $ */ +/* $NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,8 +57,12 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $); +__RCSID($NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $); #endif /* LIBC_SCCS and not lint */ +#ifdef __FBSDID +__FBSDID($FreeBSD$); +#define _DIAGASSERT(x) assert(x) +#endif #include namespace.h #include sys/types.h @@ -67,6 +71,8 @@ __RCSID($NetBSD: vis.c,v 1.45 2012/12/1 #include vis.h #include errno.h #include stdlib.h +#include wchar.h +#include wctype.h #ifdef __weak_alias __weak_alias(strvisx,_strvisx) @@ -78,65 +84,59 @@ __weak_alias(strvisx,_strvisx) #include stdio.h #include string.h -static char *do_svis(char *, size_t *, int, int, int, const char *); +static wchar_t *do_svis(wchar_t *, int, int, int, const wchar_t *); #undef BELL -#define BELL '\a' +#define BELL L'\a' -#define isoctal(c) (((u_char)(c)) = '0' ((u_char)(c)) = '7') -#define iswhite(c) (c == ' ' || c == '\t' || c == '\n') -#define issafe(c) (c == '\b' || c == BELL || c == '\r') -#define xtoa(c) 0123456789abcdef[c] -#define XTOA(c) 0123456789ABCDEF[c] +#define iswoctal(c) (((u_char)(c)) = L'0' ((u_char)(c)) = L'7') +#define iswwhite(c) (c == L' ' || c == L'\t' || c == L'\n') +#define iswsafe(c) (c == L'\b' || c == BELL || c == L'\r') +#define xtoa(c) L0123456789abcdef[c] +#define XTOA(c) L0123456789ABCDEF[c] #define MAXEXTRAS 9 #define MAKEEXTRALIST(flag, extra, orig_str) \ do { \ - const char *orig = orig_str; \ - const char *o = orig; \ - char *e; \ + const wchar_t *orig = orig_str; \ + const wchar_t *o = orig; \ + wchar_t *e; \ while (*o++) \ continue; \ - extra = malloc((size_t)((o - orig) + MAXEXTRAS)); \ + extra = calloc((size_t)((o - orig) + MAXEXTRAS), sizeof(*extra));\ if (!extra) break; \ - for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ + for (o = orig, e = extra; (*e++ = *o++) != L'\0';) \ continue; \ e--; \ if (flag VIS_GLOB) { \ - *e++ = '*'; \ - *e++ = '?'; \ - *e++ = '['; \ - *e++ = '#'; \ + *e++ = L'*'; \ + *e++ = L'?'; \ + *e++ = L'['; \ + *e++ = L'#'; \ } \ - if (flag VIS_SP) *e++ = ' '; \ - if (flag VIS_TAB) *e++ = '\t'; \ - if (flag VIS_NL) *e++ = '\n'; \ - if ((flag VIS_NOSLASH) == 0) *e++ = '\\'; \ - *e = '\0'; \ + if (flag VIS_SP) *e++ = L' '; \ + if (flag VIS_TAB) *e++ = L'\t'; \ + if (flag VIS_NL) *e++ = L'\n'; \ + if ((flag VIS_NOSLASH) == 0) *e++ = L'\\'; \ + *e = L'\0'; \ } while (/*CONSTCOND*/0) /* * This is do_hvis, for HTTP style (RFC 1808) */ -static char * -do_hvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +do_hvis(wchar_t *dst, wint_t c, int flag, wint_t nextc, const wchar_t *extra) { - - if ((isascii(c) isalnum(c)) + if (iswalnum(c) /* safe */ - || c == '$' || c == '-' || c == '_' || c == '.' || c == '+' + || c == L'$' || c == L'-' || c == L'_' || c == L'.' || c == L'+' /* extra */ - || c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' - || c == ',') { - dst = do_svis(dst, dlen, c, flag, nextc, extra); - } else { - if (dlen) { - if (*dlen 3) -return NULL; - *dlen -= 3; - } - *dst++ = '%'; + || c == L'!' || c == L'*' || c == L'\'' || c == L'(' || c == L')' + || c == L',') + dst = do_svis(dst, c, flag, nextc, extra); + else { + *dst++ = L'%'; *dst++ = xtoa(((unsigned int)c 4) 0xf); *dst++ = xtoa((unsigned int)c 0xf); } @@ -148,27 +148,21 @@ do_hvis(char *dst, size_t *dlen, int c, * This is do_mvis, for Quoted-Printable MIME (RFC 2045) * NB: No handling of long lines or CRLF. */ -static char * -do_mvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +do_mvis(wchar_t *dst, wint_t c, int flag, wint_t nextc, const wchar_t *extra) { - if ((c != '\n') +
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: christos Date: Wed Feb 13 04:51:56 UTC 2013 Modified Files: src/tests/lib/libc/gen: t_vis.c Log Message: - check the results of the vis functions - zero output to make sure things work - don't use encodings that don't work - fix the style on decoding To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_vis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_vis.c diff -u src/tests/lib/libc/gen/t_vis.c:1.5 src/tests/lib/libc/gen/t_vis.c:1.6 --- src/tests/lib/libc/gen/t_vis.c:1.5 Sun Feb 10 23:12:48 2013 +++ src/tests/lib/libc/gen/t_vis.c Tue Feb 12 23:51:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.5 2013/02/11 04:12:48 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.6 2013/02/13 04:51:56 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -76,7 +76,9 @@ ATF_TC_BODY(strvis_basic, tc) for (i = 0; i __arraycount(styles); i++) { ATF_REQUIRE(strsvisx(visbuf, srcbuf, SIZE, styles[i], ) 0); - ATF_REQUIRE(strunvisx(dstbuf, visbuf, styles[i]) 0); + memset(dstbuf, 0, SIZE); + ATF_REQUIRE(strunvisx(dstbuf, visbuf, + styles[i] (VIS_HTTP1808|VIS_MIMESTYLE)) 0); for (j = 0; j SIZE; j++) if (dstbuf[j] != (char)j) atf_tc_fail_nonfatal(Failed for style %x,
CVS commit: src/usr.bin/vis
Module Name:src Committed By: christos Date: Wed Feb 13 04:52:31 UTC 2013 Modified Files: src/usr.bin/vis: vis.c Log Message: handle wide chars To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/vis/vis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vis/vis.c diff -u src/usr.bin/vis/vis.c:1.15 src/usr.bin/vis/vis.c:1.16 --- src/usr.bin/vis/vis.c:1.15 Wed Feb 11 01:42:31 2009 +++ src/usr.bin/vis/vis.c Tue Feb 12 23:52:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.15 2009/02/11 06:42:31 wiz Exp $ */ +/* $NetBSD: vis.c,v 1.16 2013/02/13 04:52:31 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -39,12 +39,13 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = @(#)vis.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: vis.c,v 1.15 2009/02/11 06:42:31 wiz Exp $); +__RCSID($NetBSD: vis.c,v 1.16 2013/02/13 04:52:31 christos Exp $); #endif /* not lint */ #include stdio.h #include string.h #include stdlib.h +#include wchar.h #include unistd.h #include err.h #include vis.h @@ -157,12 +158,12 @@ process(FILE *fp) static int col = 0; static char nul[] = \0; char *cp = nul + 1; /* so *(cp-1) starts out != '\n' */ - int c, rachar; + wint_t c, rachar; char buff[5]; - c = getc(fp); + c = getwc(fp); while (c != EOF) { - rachar = getc(fp); + rachar = getwc(fp); if (none) { cp = buff; *cp++ = c; @@ -177,9 +178,9 @@ process(FILE *fp) *cp++ = '\n'; *cp = '\0'; } else if (extra) - (void)svis(buff, (char)c, eflags, (char)rachar, extra); + (void)svis(buff, c, eflags, rachar, extra); else - (void)vis(buff, (char)c, eflags, (char)rachar); + (void)vis(buff, c, eflags, rachar); cp = buff; if (fold) {
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Wed Feb 13 04:58:18 UTC 2013 Modified Files: src/lib/libc/gen: vis.c Log Message: explain we we want wide character support here. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/libc/gen/vis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.c diff -u src/lib/libc/gen/vis.c:1.46 src/lib/libc/gen/vis.c:1.47 --- src/lib/libc/gen/vis.c:1.46 Tue Feb 12 23:49:59 2013 +++ src/lib/libc/gen/vis.c Tue Feb 12 23:58:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $ */ +/* $NetBSD: vis.c,v 1.47 2013/02/13 04:58:17 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $); +__RCSID($NetBSD: vis.c,v 1.47 2013/02/13 04:58:17 christos Exp $); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID($FreeBSD$); @@ -84,6 +84,14 @@ __weak_alias(strvisx,_strvisx) #include stdio.h #include string.h +/* + * The reason for going through the trouble to deal with character encodings + * in vis(3), is that we use this to safe encode output of commands. This + * safe encoding varies depending on the character set. For example if we + * display ps output in French, we don't want to display French characters + * as M-foo. + */ + static wchar_t *do_svis(wchar_t *, int, int, int, const wchar_t *); #undef BELL