From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 4 22:30:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AC17DB98 for ; Fri, 4 Jan 2013 22:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 87620CC1 for ; Fri, 4 Jan 2013 22:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id r04MU1Lw078837 for ; Fri, 4 Jan 2013 22:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id r04MU18l078834; Fri, 4 Jan 2013 22:30:01 GMT (envelope-from gnats) Date: Fri, 4 Jan 2013 22:30:01 GMT Message-Id: <201301042230.r04MU18l078834@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "J.R. Oldroyd" Subject: Re: bin/166364: [patch] make ps(1) display 8-bit characters as such X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: "J.R. Oldroyd" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 22:30:01 -0000 The following reply was made to PR bin/166364; it has been noted by GNATS. From: "J.R. Oldroyd" To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/166364: [patch] make ps(1) display 8-bit characters as such Date: Fri, 4 Jan 2013 17:08:11 -0500 --MP_/SrLCoOr8Z25xe/DdN6rIFAm Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline A minor update is needed for this patch for it to apply cleanly to the ps(1) source that's on FreeBSD-9.1. --MP_/SrLCoOr8Z25xe/DdN6rIFAm Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=ps-9.1.diff --- fmt.c.orig 2013-01-02 19:27:13.000000000 -0500 +++ fmt.c 2013-01-04 17:02:11.000000000 -0500 @@ -47,7 +47,6 @@ #include #include #include -#include #include "ps.h" @@ -82,8 +81,7 @@ if (*src == '\0') continue; len = (buf_size - 1 - (dst - buf)) / 4; - strvisx(dst, src, strlen(src) < len ? strlen(src) : len, - VIS_NL | VIS_CSTYLE); + strcpy(dst, src); while (*dst != '\0') dst++; if ((buf_size - 1 - (dst - buf)) / 4 > 0) --- print.c.orig 2013-01-02 19:27:13.000000000 -0500 +++ print.c 2013-01-04 17:03:01.000000000 -0500 @@ -60,7 +60,6 @@ #include #include #include -#include #include "ps.h" @@ -105,7 +104,7 @@ v = ve->var; if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); - strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); + strcpy(vis_args, k->ki_args); if (STAILQ_NEXT(ve, next_ve) != NULL && strlen(vis_args) > ARGUMENTS_WIDTH) vis_args[ARGUMENTS_WIDTH] = '\0'; @@ -135,7 +134,7 @@ } if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); - strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); + strcpy(vis_args, k->ki_args); if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field */ @@ -144,8 +143,7 @@ if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) == NULL) errx(1, "malloc failed"); - strvis(vis_env, k->ki_env, - VIS_TAB | VIS_NL | VIS_NOSLASH); + strcpy(vis_env, k->ki_env); } else vis_env = NULL; --MP_/SrLCoOr8Z25xe/DdN6rIFAm--