From owner-svn-src-all@freebsd.org Sun Mar 24 20:36:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE90154300B; Sun, 24 Mar 2019 20:36:38 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F7C096251; Sun, 24 Mar 2019 20:36:38 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 789E025709; Sun, 24 Mar 2019 20:36:36 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2OKaaYZ068464; Sun, 24 Mar 2019 20:36:36 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2OKaZl7068460; Sun, 24 Mar 2019 20:36:35 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201903242036.x2OKaZl7068460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 24 Mar 2019 20:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345484 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 345484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F7C096251 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 20:36:39 -0000 Author: bde Date: Sun Mar 24 20:36:35 2019 New Revision: 345484 URL: https://svnweb.freebsd.org/changeset/base/345484 Log: Fix the type of the color args for VGLMouseFreeze(), VGLBitmapPutChar(), VGLBitmapString() and VGLSetBorder() so as to not truncate to 8 bits. Complete the corresponding fix for VGLGetXY() and VGLPutXY() (parts of the man page were out of date). Modified: head/lib/libvgl/mouse.c head/lib/libvgl/text.c head/lib/libvgl/vgl.3 head/lib/libvgl/vgl.h Modified: head/lib/libvgl/mouse.c ============================================================================== --- head/lib/libvgl/mouse.c Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/mouse.c Sun Mar 24 20:36:35 2019 (r345484) @@ -234,7 +234,7 @@ VGLMouseStatus(int *x, int *y, char *buttons) } int -VGLMouseFreeze(int x, int y, int width, int hight, byte color) +VGLMouseFreeze(int x, int y, int width, int hight, u_long color) { if (!VGLMouseFrozen) { VGLMouseFrozen = 1; Modified: head/lib/libvgl/text.c ============================================================================== --- head/lib/libvgl/text.c Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/text.c Sun Mar 24 20:36:35 2019 (r345484) @@ -74,7 +74,7 @@ FILE *fd; void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int b, Bpc, Bpl, lin, bit, topbit; @@ -126,7 +126,7 @@ VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, - byte fgcol, byte bgcol, int fill, int dir) + u_long fgcol, u_long bgcol, int fill, int dir) { int pos; Modified: head/lib/libvgl/vgl.3 ============================================================================== --- head/lib/libvgl/vgl.3 Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/vgl.3 Sun Mar 24 20:36:35 2019 (r345484) @@ -117,9 +117,9 @@ .Ft int .Fn VGLBitmapCopy "VGLBitmap *src" "int srcx" "int srcy" "VGLBitmap *dst" "int dstx" "int dsty" "int width" "int hight" .Ft void -.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void -.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "byte fgcol" "byte bgcol" "int fill" "int dir" +.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "u_long fgcol" "u_long bgcol" "int fill" "int dir" .Ft void .Fn VGLClear "VGLBitmap *object" "u_long color" .Ft void @@ -127,7 +127,7 @@ .Ft void .Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue" .Ft void -.Fn VGLSetBorder "byte color" +.Fn VGLSetBorder "u_long color" .Ft int .Fn VGLSetVScreenSize "VGLBitmap *object" "int vxsize" "int vysize" .Ft int @@ -238,7 +238,7 @@ retrieves the color of the pixel located at .Va x , y , coordinates of the .Va object -argument, and returns it as a byte value. +argument, and returns it as a u_long value. .Pp .Fn VGLSetXY sets the color of the pixel located at @@ -247,7 +247,7 @@ coordinates of the .Va object argument to .Va color -byte value. +u_long value. .Pp .Fn VGLLine draw a line from Modified: head/lib/libvgl/vgl.h ============================================================================== --- head/lib/libvgl/vgl.h Sun Mar 24 19:41:45 2019 (r345483) +++ head/lib/libvgl/vgl.h Sun Mar 24 20:36:35 2019 (r345484) @@ -131,7 +131,7 @@ void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *O void VGLMouseSetStdImage(void); int VGLMouseInit(int mode); int VGLMouseStatus(int *x, int *y, char *buttons); -int VGLMouseFreeze(int x, int y, int width, int hight, byte color); +int VGLMouseFreeze(int x, int y, int width, int hight, u_long color); void VGLMouseUnFreeze(void); /* simple.c */ void VGLSetXY(VGLBitmap *object, int x, int y, u_long color); @@ -146,11 +146,11 @@ void VGLRestorePalette(void); void VGLSavePalette(void); void VGLSetPalette(byte *red, byte *green, byte *blue); void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue); -void VGLSetBorder(byte color); +void VGLSetBorder(u_long color); void VGLBlankDisplay(int blank); /* text.c */ int VGLTextSetFontFile(char *filename); -void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir); -void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir); +void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, u_long fgcol, u_long bgcol, int fill, int dir); +void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, u_long fgcol, u_long bgcol, int fill, int dir); #endif /* !_VGL_H_ */