From patchwork Mon Apr 30 20:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27061 Received: (qmail 22892 invoked by alias); 30 Apr 2018 20:26:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22774 invoked by uid 89); 30 Apr 2018 20:26:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.160.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 20:26:30 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id EDF5DA340 for ; Mon, 30 Apr 2018 15:26:28 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id DFNUfK7xWlAdrDFNUft59J; Mon, 30 Apr 2018 15:26:28 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:42256 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fDFNU-000C6E-NB; Mon, 30 Apr 2018 15:26:28 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 2/2] Minor cleanups in printcmd.c Date: Mon, 30 Apr 2018 14:26:26 -0600 Message-Id: <20180430202626.27017-3-tom@tromey.com> In-Reply-To: <20180430202626.27017-1-tom@tromey.com> References: <20180430202626.27017-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fDFNU-000C6E-NB X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:42256 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes This changes decode_format to use skip_spaces, and changes printcmd.c not to include tui.h, which apparently is not needed. ChangeLog 2018-04-30 Tom Tromey * printcmd.c: Don't include tui.h. (decode_format): Use skip_spaces. --- gdb/ChangeLog | 5 +++++ gdb/printcmd.c | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 18c41103bd..4696373b2c 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -50,10 +50,6 @@ #include "source.h" #include "common/byte-vector.h" -#ifdef TUI -#include "tui/tui.h" /* For tui_active et al. */ -#endif - /* Last specified output format. */ static char last_format = 0; @@ -215,9 +211,7 @@ decode_format (const char **string_ptr, int oformat, int osize) break; } - while (*p == ' ' || *p == '\t') - p++; - *string_ptr = p; + *string_ptr = skip_spaces (p); /* Set defaults for format and size if not specified. */ if (val.format == '?')