Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xinit/dist Avoid exec'ing bc. Pointed out by ...



details:   https://anonhg.NetBSD.org/xsrc/rev/5cfaf9784372
branches:  trunk
changeset: 6986:5cfaf9784372
user:      nia <nia%NetBSD.org@localhost>
date:      Sun May 29 06:06:13 2022 +0000

description:
Avoid exec'ing bc. Pointed out by uwe.

diffstat:

 external/mit/xdm/dist/config/Xsession.in |  4 ++--
 external/mit/xinit/dist/xinitrc.cpp      |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 3ea590852055 -r 5cfaf9784372 external/mit/xdm/dist/config/Xsession.in
--- a/external/mit/xdm/dist/config/Xsession.in  Sun May 29 05:53:02 2022 +0000
+++ b/external/mit/xdm/dist/config/Xsession.in  Sun May 29 06:06:13 2022 +0000
@@ -1,6 +1,6 @@
 XCOMM!SHELL_CMD
 XCOMM
-XHASH $NetBSD: Xsession.in,v 1.18 2022/05/29 05:53:02 nia Exp $
+XHASH $NetBSD: Xsession.in,v 1.19 2022/05/29 06:06:14 nia Exp $
 
 XCOMM redirect errors to a file in user's home directory if we can
 
@@ -101,7 +101,7 @@
 # of 96.
 # 
     BINDIR/xrdb -merge - <<EOF
-Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
+Xft.dpi: $((96 * ($fontsize / 16)))
 *VT100.faceName: xft:Monospace:pixelsize=$fontsize
 EOF
 elif [ $fontsize -gt 13 ]; then
diff -r 3ea590852055 -r 5cfaf9784372 external/mit/xinit/dist/xinitrc.cpp
--- a/external/mit/xinit/dist/xinitrc.cpp       Sun May 29 05:53:02 2022 +0000
+++ b/external/mit/xinit/dist/xinitrc.cpp       Sun May 29 06:06:13 2022 +0000
@@ -1,5 +1,5 @@
 XCOMM!SHELL_CMD
-XHASH $NetBSD: xinitrc.cpp,v 1.20 2022/05/29 05:53:02 nia Exp $
+XHASH $NetBSD: xinitrc.cpp,v 1.21 2022/05/29 06:06:13 nia Exp $
 
 userresources=$HOME/.Xresources
 usermodmap=$HOME/.Xmodmap
@@ -72,7 +72,7 @@
 # of 96.
 # 
     XRDB -merge - <<EOF
-Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
+Xft.dpi: $((96 * ($fontsize / 16)))
 *VT100.faceName: xft:Monospace:pixelsize=$fontsize
 EOF
 elif [ $fontsize -gt 13 ]; then



Home | Main Index | Thread Index | Old Index