CVS commit: src/bin/echo

2024-05-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Tue May 14 01:32:25 UTC 2024

Modified Files:
src/bin/echo: echo.1

Log Message:
echo.1: borrow advice about printf(1) from the OpenBSD man page


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/echo/echo.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/echo/echo.1
diff -u src/bin/echo/echo.1:1.19 src/bin/echo/echo.1:1.20
--- src/bin/echo/echo.1:1.19	Wed Feb 26 07:14:47 2020
+++ src/bin/echo/echo.1	Tue May 14 01:32:24 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: echo.1,v 1.19 2020/02/26 07:14:47 wiz Exp $
+.\"	$NetBSD: echo.1,v 1.20 2024/05/14 01:32:24 gutteridge Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)echo.1	8.1 (Berkeley) 7/22/93
 .\"
-.Dd February 26, 2020
+.Dd May 14, 2024
 .Dt ECHO 1
 .Os
 .Sh NAME
@@ -63,6 +63,8 @@ provide a built-in
 .Nm
 command which tends to differ from this utility in the treatment of options
 and backslashes.
+Where portability is paramount, use
+.Xr printf 1 .
 .Sh EXIT STATUS
 .Ex -std echo
 .Sh SEE ALSO



CVS commit: src/bin/echo

2024-05-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Tue May 14 01:32:25 UTC 2024

Modified Files:
src/bin/echo: echo.1

Log Message:
echo.1: borrow advice about printf(1) from the OpenBSD man page


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/echo/echo.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man8

2024-05-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon May 13 23:10:47 UTC 2024

Modified Files:
src/share/man/man8: creds_msdos.8

Log Message:
creds_msdos.8: consistently include a hypen in "MS-DOS"


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man8/creds_msdos.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man8/creds_msdos.8
diff -u src/share/man/man8/creds_msdos.8:1.5 src/share/man/man8/creds_msdos.8:1.6
--- src/share/man/man8/creds_msdos.8:1.5	Sun Feb  4 05:43:06 2024
+++ src/share/man/man8/creds_msdos.8	Mon May 13 23:10:47 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: creds_msdos.8,v 1.5 2024/02/04 05:43:06 mrg Exp $
+.\"	$NetBSD: creds_msdos.8,v 1.6 2024/05/13 23:10:47 gutteridge Exp $
 .\"
 .\" Copyright (c) 2019 Matthew R. Green
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm creds_msdos
-.Nd automatically add login credentials from MSDOS partition
+.Nd automatically add login credentials from MS-DOS partition
 .Sh SYNOPSIS
 .Nm
 .Ar start
@@ -37,18 +37,18 @@
 The
 .Nm
 rc.d script allows automatic addition of login credentials during boot
-using a special file found on the MSDOS partition of a bootable image.
+using a special file found on the MS-DOS partition of a bootable image.
 This script is not distributed with the normal system and is only
 included with pre-installed bootable images.
 The goal is to allow remote access of the system without having to
 edit the primary root file system (which may not be accessible from
 the host the image is being written from), but place this information
-in the MSDOS partition that most platforms can easily access.
+in the MS-DOS partition that most platforms can easily access.
 .Pp
 Typically, an installable image (such as
 .Pa arm64.img )
 is written to an SD card or similar media, and has both a native FFS
-partition as well as an MSDOS partition for booting.
+partition as well as an MS-DOS partition for booting.
 If this script is enabled and has been pointed at the boot partition
 it will inspect the file
 .Pa creds.txt
@@ -65,7 +65,7 @@ group.
 .It Ic sshkeyfile Ar user Ar keyfile
 Look for the
 .Ar keyfile
-in the MSDOS boot partition and merge ssh keys from this file into user's
+in the MS-DOS boot partition and merge ssh keys from this file into user's
 .Pa ~/.ssh/authorized_keys
 file.
 .\"



CVS commit: src/share/man/man8

2024-05-13 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon May 13 23:10:47 UTC 2024

Modified Files:
src/share/man/man8: creds_msdos.8

Log Message:
creds_msdos.8: consistently include a hypen in "MS-DOS"


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man8/creds_msdos.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/conf

2024-05-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon May 13 21:50:47 UTC 2024

Modified Files:
src/sys/arch/i386/conf: LEGACY

Log Message:
also exclude DRM_LEGACY from the ISA kernel


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/conf/LEGACY

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/i386/conf/LEGACY
diff -u src/sys/arch/i386/conf/LEGACY:1.3 src/sys/arch/i386/conf/LEGACY:1.4
--- src/sys/arch/i386/conf/LEGACY:1.3	Sun Apr 28 08:12:44 2024
+++ src/sys/arch/i386/conf/LEGACY	Mon May 13 21:50:47 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: LEGACY,v 1.3 2024/04/28 08:12:44 nia Exp $
+#	$NetBSD: LEGACY,v 1.4 2024/05/13 21:50:47 nia Exp $
 
 # LEGACY kernel -- includes vga@isa and pcdisplay@isa for pre-PCI
 # systems, due to significant pain making them fail to attach when
@@ -24,3 +24,5 @@ no radeondrmkmsfb*	at radeonfbbus?  
 
 no nouveau*		at pci?
 no nouveaufb*		at nouveaufbbus?
+
+no options		DRM_LEGACY



CVS commit: src/sys/arch/i386/conf

2024-05-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon May 13 21:50:47 UTC 2024

Modified Files:
src/sys/arch/i386/conf: LEGACY

Log Message:
also exclude DRM_LEGACY from the ISA kernel


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/conf/LEGACY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/gdtoa

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 21:17:24 UTC 2024

Modified Files:
src/lib/libc/gdtoa: Makefile.inc

Log Message:
libc/hdtoa: suppress lint warning about possible accuracy loss

on sparc64: hdtoa.c(340): warning: conversion from 'unsigned long'
to 'char' may lose accuracy [132]


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gdtoa/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/lib/libc/gdtoa/Makefile.inc
diff -u src/lib/libc/gdtoa/Makefile.inc:1.13 src/lib/libc/gdtoa/Makefile.inc:1.14
--- src/lib/libc/gdtoa/Makefile.inc:1.13	Sat Oct  7 12:15:53 2023
+++ src/lib/libc/gdtoa/Makefile.inc	Mon May 13 21:17:24 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.13 2023/10/07 12:15:53 rin Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2024/05/13 21:17:24 rillig Exp $
 
 # gdtoa sources
 .PATH: ${.CURDIR}/gdtoa
@@ -44,3 +44,5 @@ SRCS+=	dmisc.c \
 .if ${MACHINE_ARCH} != "vax"
 SRCS+=	strtord.c
 .endif
+
+LINTFLAGS.hdtoa.c+=	-X 132	# conversion may lose accuracy



CVS commit: src/lib/libc/gdtoa

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 21:17:24 UTC 2024

Modified Files:
src/lib/libc/gdtoa: Makefile.inc

Log Message:
libc/hdtoa: suppress lint warning about possible accuracy loss

on sparc64: hdtoa.c(340): warning: conversion from 'unsigned long'
to 'char' may lose accuracy [132]


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gdtoa/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/flashctl

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 20:38:05 UTC 2024

Modified Files:
src/usr.sbin/flashctl: Makefile flashctl.c

Log Message:
usr.sbin/flashctl: skip lint's strict bool mode with Clang

The strict bool mode is already checked in GCC mode, so restore the
previous idiomatic code.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/flashctl/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/flashctl/flashctl.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.sbin/flashctl/Makefile
diff -u src/usr.sbin/flashctl/Makefile:1.3 src/usr.sbin/flashctl/Makefile:1.4
--- src/usr.sbin/flashctl/Makefile:1.3	Sun Jan  8 15:49:51 2023
+++ src/usr.sbin/flashctl/Makefile	Mon May 13 20:38:05 2024
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.3 2023/01/08 15:49:51 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2024/05/13 20:38:05 rillig Exp $
 
 SRCS=		flashctl.c
 
 PROG=		flashctl
 MAN=		flashctl.8
-LINTFLAGS+=	-T		# strict bool mode
+LINTFLAGS+=	${MKLLVM:U-T:D}	# strict bool mode
 
 WARNS=		4
 
 .include 
+

Index: src/usr.sbin/flashctl/flashctl.c
diff -u src/usr.sbin/flashctl/flashctl.c:1.10 src/usr.sbin/flashctl/flashctl.c:1.11
--- src/usr.sbin/flashctl/flashctl.c:1.10	Sun May 12 19:03:55 2024
+++ src/usr.sbin/flashctl/flashctl.c	Mon May 13 20:38:05 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: flashctl.c,v 1.10 2024/05/12 19:03:55 rillig Exp $	*/
+/*	$NetBSD: flashctl.c,v 1.11 2024/05/13 20:38:05 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: flashctl.c,v 1.10 2024/05/12 19:03:55 rillig Exp $");
+__RCSID("$NetBSD: flashctl.c,v 1.11 2024/05/13 20:38:05 rillig Exp $");
 
 #include 
 #include 
@@ -233,11 +233,11 @@ to_intmax(intmax_t *num, const char *str
 
 	errno = 0;
 	if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) {
-		if (isxdigit((unsigned char)str[2]) == 0)
+		if (!isxdigit((unsigned char)str[2]))
 			return EINVAL;
 		*num = strtoimax(str, , 16);
 	} else {
-		if (isdigit((unsigned char)str[0]) == 0)
+		if (!isdigit((unsigned char)str[0]))
 			return EINVAL;
 		*num = strtoimax(str, , 10);
 	}



CVS commit: src/usr.sbin/flashctl

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 20:38:05 UTC 2024

Modified Files:
src/usr.sbin/flashctl: Makefile flashctl.c

Log Message:
usr.sbin/flashctl: skip lint's strict bool mode with Clang

The strict bool mode is already checked in GCC mode, so restore the
previous idiomatic code.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/flashctl/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/flashctl/flashctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libm

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 20:28:15 UTC 2024

Modified Files:
src/tests/lib/libm: t_hypot.c

Log Message:
tests/t_hypot: actually add nan test


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_hypot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libm

2024-05-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon May 13 20:28:15 UTC 2024

Modified Files:
src/tests/lib/libm: t_hypot.c

Log Message:
tests/t_hypot: actually add nan test


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_hypot.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/libm/t_hypot.c
diff -u src/tests/lib/libm/t_hypot.c:1.7 src/tests/lib/libm/t_hypot.c:1.8
--- src/tests/lib/libm/t_hypot.c:1.7	Sun May 12 20:58:44 2024
+++ src/tests/lib/libm/t_hypot.c	Mon May 13 20:28:15 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_hypot.c,v 1.7 2024/05/12 20:58:44 riastradh Exp $ */
+/* $NetBSD: t_hypot.c,v 1.8 2024/05/13 20:28:15 rillig Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -689,6 +689,7 @@ ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, hypot_exact);
+	ATF_TP_ADD_TC(tp, hypot_nan);
 	ATF_TP_ADD_TC(tp, hypot_trivial);
 	ATF_TP_ADD_TC(tp, hypotf_exact);
 	ATF_TP_ADD_TC(tp, hypotf_trivial);



lint's strict bool mode (was: Re: CVS commit: src/usr.sbin/flashctl)

2024-05-13 Thread Roland Illig
Am 13.05.2024 um 16:06 schrieb Taylor R Campbell:
>> Module Name:src
>> Committed By:   rillig
>> Date:   Sun May 12 19:03:55 UTC 2024
>>
>> Modified Files:
>> src/usr.sbin/flashctl: flashctl.c
>>
>> Log Message:
>> flashctl: fix lint's strict bool mode with Clang preprocessor
>>
>> Treating the return value from the  character classification
>> functions as an 'int' is neither elegant nor idiomatic, but it works for
>> now.
>>
>> -   if (!isxdigit((unsigned char)str[2]))
>> +   if (isxdigit((unsigned char)str[2]) == 0)
>
> Why is this change necessary?  Weren't you teaching lint to handle
> this case without complaining?

Yes, I did. The thing is that I only ever tested lint's strict bool mode
with the GCC preprocessor, and that preprocessor marks every token from
a macro expansion as coming from a system header or coming from the
user's code. Therefore, lint could be more lenient when checking the
result of the isxdigit macro, as its main operator, the cast to '(int)',
is from a system header, so it's OK that it has the "wrong" type.

On the other hand, the strcmp function is not listed in "namespace.h"
and does not have a macro definition, and although the function
declaration comes from a system header, the GCC preprocessor does not
mark the function call expression as coming from a system header.

This is the difference by which lint treats 'isxdigit(ch)' as bool-like
but 'strcmp(s1, s2)' as strictly 'int'.

A few days or weeks ago, Christos started builds that have both
MKLLVM=yes and MKLINT=yes, thus using the Clang preprocessor as lint's
preprocessor. Apparently nobody else has done this in the last few
years. Clang's preprocessor's output does not mark the tokens from macro
expansions as coming from a system header or from the user's code. Due
to this, lint can no longer be lenient for system header macro
expansions as it doesn't get the system header information anymore.

> We shouldn't change anything like
>
>   if (!isxdigit(...))
>   if (ferror(...))
>
> to
>
>   if (isxdigit(...) == 0)
>   if (ferror(...) != 0)
>
> The original is clearer and idiomatic code, even if it's a little
> silly that the return value is declared as int and not bool
> (presumably for historical reasons, if the interfaces were defined
> before bool existed).

I agree. For usr.bin/error, I tried a different variant, namely to only
activate lint's strict bool mode when MKLLVM is undefined, thus when the
GCC preprocessor is used. I guess activating the strict bool mode only
in GCC mode is good enough to catch all type mismatches.

The combination of MKLLVM=yes MKLINT=yes is also the cause why lint now
allows do-while-0 even in strict bool mode, as the FD_ZERO macro uses
that idiom and I didn't dare to change the macro to do-while-false, as
that would either require , or to deviate from the idiom
by using 'do { ... } while (0 != 0)', as that would look suspicious.

I will switch usr.sbin/flashctl to the only-in-GCC-mode variant and
restore the previous idiomatic code.

Roland



CVS commit: src/distrib/sets/lists/xcomp

2024-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 13 14:59:31 UTC 2024

Modified Files:
src/distrib/sets/lists/xcomp: shl.mi

Log Message:
more Xf86misc obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/distrib/sets/lists/xcomp/shl.mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xcomp/shl.mi
diff -u src/distrib/sets/lists/xcomp/shl.mi:1.57 src/distrib/sets/lists/xcomp/shl.mi:1.58
--- src/distrib/sets/lists/xcomp/shl.mi:1.57	Thu Jul 14 03:41:49 2022
+++ src/distrib/sets/lists/xcomp/shl.mi	Mon May 13 10:59:31 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: shl.mi,v 1.57 2022/07/14 07:41:49 mrg Exp $
+#	$NetBSD: shl.mi,v 1.58 2024/05/13 14:59:31 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -50,7 +50,7 @@
 ./usr/X11R7/lib/libXvMC_pic.axcomp-libXvMC-lib	xorg,picinstall,compatx11file
 ./usr/X11R7/lib/libXv_pic.axcomp-libXv-lib	xorg,picinstall,compatx11file
 ./usr/X11R7/lib/libXxf86dga_pic.a			xcomp-libXxf86dga-lib	xorg,picinstall,compatx11file
-./usr/X11R7/lib/libXxf86misc_pic.a			xcomp-libXxf86misc-lib	xorg,picinstall,compatx11file
+./usr/X11R7/lib/libXxf86misc_pic.a			xcomp-obsolete	obsolete
 ./usr/X11R7/lib/libXxf86vm_pic.a			xcomp-libXxf86vm-lib	xorg,picinstall,compatx11file
 ./usr/X11R7/lib/libdrm_pic.axcomp-libdrm-lib	xorg,picinstall,compatx11file
 ./usr/X11R7/lib/libdrm_radeon_pic.a			xcomp-libdrm_radeon-lib	xorg,picinstall,compatx11file



CVS commit: src/distrib/sets/lists/xcomp

2024-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 13 14:59:31 UTC 2024

Modified Files:
src/distrib/sets/lists/xcomp: shl.mi

Log Message:
more Xf86misc obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/distrib/sets/lists/xcomp/shl.mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists

2024-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 13 14:56:44 UTC 2024

Modified Files:
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xdebug: mi

Log Message:
mark more of libXxf86misc obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/xdebug/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.242 src/distrib/sets/lists/xcomp/mi:1.243
--- src/distrib/sets/lists/xcomp/mi:1.242	Thu May  9 02:38:27 2024
+++ src/distrib/sets/lists/xcomp/mi	Mon May 13 10:56:44 2024
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.242 2024/05/09 06:38:27 nia Exp $
+#	 $NetBSD: mi,v 1.243 2024/05/13 14:56:44 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5962,7 +5962,7 @@
 ./usr/libdata/lint/llib-lXvMC.ln			xcomp-libXvMC-lintlib	lint,xorg
 ./usr/libdata/lint/llib-lXvMCW.ln			xcomp-libXvMCW-lintlib	lint,xorg
 ./usr/libdata/lint/llib-lXxf86dga.ln			xcomp-libXxf86dga-lintlib	lint,xorg
-./usr/libdata/lint/llib-lXxf86misc.ln			xcomp-libXxf86misc-lintlib	lint,xorg
+./usr/libdata/lint/llib-lXxf86misc.ln			xcomp-obsolete	obsolete
 ./usr/libdata/lint/llib-lXxf86vm.ln			xcomp-libXxf86vm-lintlib	lint,xorg
 ./usr/libdata/lint/llib-ldrm.lnxcomp-libdrm-lintlib	lint,xorg
 ./usr/libdata/lint/llib-ldrm_radeon.ln			xcomp-libdrm_radeon-lintlib	lint,xorg

Index: src/distrib/sets/lists/xdebug/mi
diff -u src/distrib/sets/lists/xdebug/mi:1.46 src/distrib/sets/lists/xdebug/mi:1.47
--- src/distrib/sets/lists/xdebug/mi:1.46	Sat Feb  4 11:34:36 2023
+++ src/distrib/sets/lists/xdebug/mi	Mon May 13 10:56:44 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.46 2023/02/04 16:34:36 wiz Exp $
+# $NetBSD: mi,v 1.47 2024/05/13 14:56:44 christos Exp $
 ./etc/mtree/set.xdebug	comp-sys-root
 ./usr/X11R7/lib		base-x11-root	xorg,debuglib,compatx11dir
 ./usr/X11R7/lib/libEGL_g.axdebug-libEGL-debuglib	xorg,debuglib,compatx11file,xorg_glamor
@@ -48,7 +48,7 @@
 ./usr/X11R7/lib/libXvMC_g.axdebug-libXvMC-debuglib	xorg,debuglib,compatx11file
 ./usr/X11R7/lib/libXv_g.axdebug-libXv-debuglib	xorg,debuglib,compatx11file
 ./usr/X11R7/lib/libXxf86dga_g.axdebug-libXxf86dga-debuglib	xorg,debuglib,compatx11file
-./usr/X11R7/lib/libXxf86misc_g.a			xdebug-libXxf86misc-debuglib	xorg,debuglib,compatx11file
+./usr/X11R7/lib/libXxf86misc_g.a			xdebug-obsolete	obsolete
 ./usr/X11R7/lib/libXxf86vm_g.axdebug-libXxf86vm-debuglib	xorg,debuglib,compatx11file
 ./usr/X11R7/lib/libdrm_g.axdebug-libdrm-debuglib	xorg,debuglib,compatx11file
 ./usr/X11R7/lib/libdrm_radeon_g.a			xdebug-libdrm_radeon-debuglib	xorg,debuglib,compatx11file



CVS commit: src/distrib/sets/lists

2024-05-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 13 14:56:44 UTC 2024

Modified Files:
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xdebug: mi

Log Message:
mark more of libXxf86misc obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/xdebug/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.sbin/flashctl

2024-05-13 Thread Taylor R Campbell
> Module Name:src
> Committed By:   rillig
> Date:   Sun May 12 19:03:55 UTC 2024
> 
> Modified Files:
> src/usr.sbin/flashctl: flashctl.c
> 
> Log Message:
> flashctl: fix lint's strict bool mode with Clang preprocessor
> 
> Treating the return value from the  character classification
> functions as an 'int' is neither elegant nor idiomatic, but it works for
> now.
> 
> -   if (!isxdigit((unsigned char)str[2]))
> +   if (isxdigit((unsigned char)str[2]) == 0)

Why is this change necessary?  Weren't you teaching lint to handle
this case without complaining?  We shouldn't change anything like

if (!isxdigit(...))
if (ferror(...))

to

if (isxdigit(...) == 0)
if (ferror(...) != 0)

The original is clearer and idiomatic code, even if it's a little
silly that the return value is declared as int and not bool
(presumably for historical reasons, if the interfaces were defined
before bool existed).


CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src

2024-05-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Mon May 13 10:13:11 UTC 2024

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c
cg14_driver.c

Log Message:
support 16bit colour
This requires kernel support, which was committed yesterday.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c
cvs rdiff -u -r1.21 -r1.22 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.32 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.33
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.32	Wed May 11 21:13:13 2022
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c	Mon May 13 10:13:10 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cg14_accel.c,v 1.32 2022/05/11 21:13:13 macallan Exp $ */
+/* $NetBSD: cg14_accel.c,v 1.33 2024/05/13 10:13:10 macallan Exp $ */
 /*
  * Copyright (c) 2013 Michael Lorenz
  * All rights reserved.
@@ -68,6 +68,7 @@ int src_formats[] = {PICT_a8r8g8b8, PICT
 int tex_formats[] = {PICT_a8r8g8b8, PICT_a8b8g8r8, PICT_a8};
 
 static void CG14Copy32(PixmapPtr, int, int, int, int, int, int);
+static void CG14Copy16(PixmapPtr, int, int, int, int, int, int);
 static void CG14Copy8(PixmapPtr, int, int, int, int, int, int);
 
 static inline void
@@ -121,6 +122,9 @@ CG14PrepareCopy(PixmapPtr pSrcPixmap, Pi
 		case 8:
 			p->pExa->Copy = CG14Copy8;
 			break;
+		case 16:
+			p->pExa->Copy = CG14Copy16;
+			break;
 		case 32:
 			p->pExa->Copy = CG14Copy32;
 			break;
@@ -610,6 +614,13 @@ CG14Copy8_short_norop(Cg14Ptr p, int src
 }
 
 static void
+CG14Copy16(PixmapPtr pDstPixmap,
+ int srcX, int srcY, int dstX, int dstY, int w, int h)
+{
+	CG14Copy8(pDstPixmap, srcX << 1, srcY, dstX << 1, dstY, w << 1, h);
+}
+
+static void
 CG14Copy8(PixmapPtr pDstPixmap,
  int srcX, int srcY, int dstX, int dstY, int w, int h)
 {
@@ -896,10 +907,12 @@ CG14PrepareSolid(PixmapPtr pPixmap, int 
 			fg = 0x;
 			break;
 	}
-	/* repeat the colour in every sub byte if we're in 8 bit */
+	/* repeat the colour in every sub byte if we're in 8 or 16 bit */
 	if (pPixmap->drawable.bitsPerPixel == 8) {
 		fg |= fg << 8;
 		fg |= fg << 16;
+	} else if (pPixmap->drawable.bitsPerPixel == 16) {
+		fg |= fg << 16;
 	}
 	write_sx_reg(p, SX_QUEUED(8), fg);
 	write_sx_reg(p, SX_QUEUED(9), fg);
@@ -974,6 +987,90 @@ CG14Solid32(Cg14Ptr p, uint32_t start, u
 }
 
 static void
+CG14Solid16(Cg14Ptr p, uint32_t start, uint32_t pitch, int w, int h)
+{
+	int line, num, pre, cnt;
+	uint32_t ptr;
+
+	ENTER;
+	pre = start & 2;
+	if (pre != 0) pre = 1;
+
+	if (p->last_rop == 0xcc) {
+		/* simple fill */
+		for (line = 0; line < h; line++) {
+			ptr = start;
+			cnt = w;
+			if (pre) {
+sxm(SX_STW, ptr, 8, 0);
+ptr += 2;
+cnt -= 1;
+if (cnt == 0) goto next;
+			}
+			/* now do the aligned pixels in 32bit chunks */
+			if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr);
+			while(cnt > 1) {
+num = min(32, cnt >> 1);
+sxm(SX_STS, ptr, 8, num - 1);
+ptr += num << 2;
+cnt -= num << 1;
+			}
+			if (cnt > 1) xf86Msg(X_ERROR, "%s cnt %d\n", __func__, cnt);
+			if (cnt > 0) {
+sxm(SX_STW, ptr, 8, 0);
+			}
+next:
+			start += pitch;
+		}
+	} else if (p->last_rop == 0xaa) {
+		/* nothing to do here */
+		return;
+	} else {
+		/* alright, let's do actual ROP stuff */
+
+		/* first repeat the fill colour into 16 registers */
+		sxi(SX_SELECT_S, 8, 8, 10, 15);
+
+		for (line = 0; line < h; line++) {
+			ptr = start;
+			cnt = w;
+			pre = min(pre, cnt);
+			if (pre) {
+sxm(SX_LDW, ptr, 26, 0);
+sxi(SX_ROP, 10, 26, 42, 0);
+sxm(SX_STW, ptr, 42, 0);
+ptr += 2;
+cnt -= 1;
+if (cnt == 0) goto next2;
+			}
+			/* now do the aligned pixels in 32bit chunks */
+			if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr);
+			while(cnt > 1) {
+num = min(32, cnt >> 1);
+sxm(SX_LD, ptr, 26, num - 1);
+if (num <= 16) {
+	sxi(SX_ROP, 10, 26, 58, num - 1);
+} else {
+	sxi(SX_ROP, 10, 26, 58, 15);
+	sxi(SX_ROP, 10, 42, 74, num - 17);
+}
+sxm(SX_ST, ptr, 58, num - 1);
+ptr += num << 2;
+cnt -= num << 1;
+			}
+			if (cnt > 1) xf86Msg(X_ERROR, "%s cnt %d\n", __func__, cnt);
+			if (cnt > 0) {
+sxm(SX_LDW, ptr, 26, 0);
+sxi(SX_ROP, 10, 26, 42, 0);
+sxm(SX_STW, ptr, 42, 0);
+			}
+next2:
+			start += pitch;
+		}
+	}
+}
+
+static void
 CG14Solid8(Cg14Ptr p, uint32_t start, uint32_t pitch, int w, int h)
 {
 	int line, num, pre, cnt;
@@ -1078,6 +1175,10 @@ CG14Solid(PixmapPtr pPixmap, int x1, int
 			start = dstoff + (y1 * dstpitch) + (x1 << 2);
 			CG14Solid32(p, start, dstpitch, w, h);
 			break;
+		case 16:
+			start 

CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src

2024-05-13 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Mon May 13 10:13:11 UTC 2024

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c
cg14_driver.c

Log Message:
support 16bit colour
This requires kernel support, which was committed yesterday.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c
cvs rdiff -u -r1.21 -r1.22 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2024-05-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon May 13 08:58:59 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
doc: we've been busy


To generate a diff of this commit:
cvs rdiff -u -r1.3055 -r1.3056 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.3055 src/doc/CHANGES:1.3056
--- src/doc/CHANGES:1.3055	Fri May 10 09:15:27 2024
+++ src/doc/CHANGES	Mon May 13 08:58:59 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3055 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3056 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -385,3 +385,19 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	lint(1): Support new keywords in C23 mode, including nullptr.
 		[rillig 20240509]
 	install(1): Support -v (verbose). [wiz 20240510]
+	acpivga(4): Add quirk for machines where the getting the screen
+		brightness always returns the same result.  [maya 20240510]
+	compat_netbsd32(8): Support SIOCGIFDATA and SIOCZIFDATA ioctls on
+		network interfaces.  [martin 20240511]
+	libm: Expand tests for hypotl(3).  [riastradh 20240511]
+	sparc: Add support for 16-bit (RGB565) colour mode in
+		the cgfourteen(4) framebuffer driver.
+		[macallan 20240512]
+	ure(4): Support TP-Link UE300 USB LAN adapter (from RVP).
+		[christos 20240512]
+	procfs: Add support for proc/self/limits as used by Linux.
+		(from Ricardo Branco).  [christos 20240512]
+	procfs: Add support for proc/sysvipc in Linux emulator
+		(from Ricardo Branco).  [christos 20240512]
+	cgdconfig(8): Add zfs verification method (from Malte Dehling)
+		[christos 20240512]



CVS commit: src/doc

2024-05-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon May 13 08:58:59 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
doc: we've been busy


To generate a diff of this commit:
cvs rdiff -u -r1.3055 -r1.3056 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.