Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1860905ybt; Thu, 2 Jul 2020 16:12:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIc3dWE8dcsqTagmzFR48gbb8jpDcIioc7v8uMwic4B7zRe+KDU4BhwWwcP77inDWGLSxV X-Received: by 2002:a17:906:398f:: with SMTP id h15mr23059647eje.391.1593731524403; Thu, 02 Jul 2020 16:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593731524; cv=none; d=google.com; s=arc-20160816; b=BupGy0FgAq4sxjR7aemYYhar1/9Z8gEWamlsy07+ET/Jf9piIelG8r1fk5lWhgyyp/ 7D5SdmYi7Jo5zbOSPNnZlesNI3AqKVql9ZY4GXaAL+hx7diXC6t8DWBw/LrTs6Hs3auU MkoekJB9WNlMkkYam4Oyi8Ox0ecAnshAB2Jpr3NVGFNeWNYCIloz+giGRplNDS4rz0OZ /s8JJ47WcFp6oobm6KAl4b3C//QQkeWRGZjMSqXKLjD3x1kpuMwPHS5vaSBzgHzKUBFJ vAroGiv0dl/FOPeWcdvng+5aK46EWrE4aZQDieGAE3+z4M8td9P9LiIAKfDu+I5YuaWI oUvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3eElLZDK+73Sru8uMZkWstDbXOPX/1Q4jpihY7SIwDg=; b=HAQPAxyFDchQIPK+k5uqOj0XDwdrlSYj1APA2WnmTV/eTbeTHJrqhWPPO67K+Qbirk 43Z5/LVttWO1R2ZcGoebx+mLqgci2+uG22ceTqaanyS41MTlQUoCMz2AsB5wzchnKt8/ xjcolulbuVJlqkkmuC5YfAgp96OvgE6qUmvGKykr9wnij1uzmHKhLKIPHv5PuxvH7m10 CJkCzduBJGJwmFJ2FuXBgnoNq4WPCrcCxkAuoYkbGvpYh7/qf0BXO1ieYxzm2MuHkDWV qVs5xtJbPCtVyoGlVCTlyynm/1CSALSAWSS5ws7AVdy33Zf8lXmjafiiojNAEieOVCD0 eoog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lcDxMf0I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si2089457edr.41.2020.07.02.16.11.41; Thu, 02 Jul 2020 16:12:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lcDxMf0I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbgGBXLV (ORCPT + 99 others); Thu, 2 Jul 2020 19:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgGBXLQ (ORCPT ); Thu, 2 Jul 2020 19:11:16 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECFDAC08C5DD for ; Thu, 2 Jul 2020 16:11:15 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id n2so16733119edr.5 for ; Thu, 02 Jul 2020 16:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3eElLZDK+73Sru8uMZkWstDbXOPX/1Q4jpihY7SIwDg=; b=lcDxMf0IacgbtirBv3TneTRSLmivWFZ8G0sKQ+zHbklLEfk9Tj5gzWoZUd00sezx5G 7YDpuVsmpp5Hi292141ilwszaWWjST4UGX/xLHZybvkYVzqEjV0Je6inT+QQGxIGIIVk HcGTo8r3zubNe+E1PgIBsZydUpPjLKWlJE3JVoZhMv1pYfwNm+SekT67BtHpYZ4NEtLj 7o5grDJv3YNmGXM8zMbrymN6OWvfrGOiFZX9X71nOqX1h/Z33a6+1BGp3h7EGno7qTMp up2hbfK6vvoXPXQ5zitOVrhJh8kkHoGpZS2c1ITR2lDHF7iYcdGUI2RivbxHsHOpzonL 3ZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3eElLZDK+73Sru8uMZkWstDbXOPX/1Q4jpihY7SIwDg=; b=A94cYQeiUFPALex4kKwPvvr8+CWkslS7GkYCCP5Ij+WWHf43crk+s/Bc5r9CDAc10N zDNgTz2UVIyXy0uMynWNPv1Fbw/pA5V6IaQmb3aLBJynrwpQwtzweO1e4o6hQZVsqsRE fqTgCLht+VJWhroWUbcj/mCaiprbj/cHqswf7FolWetNVlZT37Wgu3g3MPsyc+yfuGVs A/m2+VusKZ9UA8MCN1JLwT7f04VpaFcLJBbo1OWql0i5i4e8GliNzAnBbfJ5ALjkpBkn 0dxLYcc4Jil4K0BTZtQhxdVPTgHTJJ54aePicME+Qer1DN67cbKJwb30udmynmVZfTit P0Jg== X-Gm-Message-State: AOAM533wjAWPUB6ldsdxi+q3b+DAXn7Cty9ah7cAcqNmkjDirT6gEfZa 7XoLCXkIOr3gES2VIAqgC0+EnA8R X-Received: by 2002:a05:6402:318d:: with SMTP id di13mr26663466edb.172.1593731474444; Thu, 02 Jul 2020 16:11:14 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:b7f9:7600:bd38:c82d:5283:9f1]) by smtp.gmail.com with ESMTPSA id x9sm8214031ejw.28.2020.07.02.16.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 16:11:13 -0700 (PDT) From: Luc Van Oostenryck To: linux-kernel@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH 10/15] options: add a small helper: handle_switch_finalize() Date: Fri, 3 Jul 2020 01:10:34 +0200 Message-Id: <20200702231039.55015-11-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200702231039.55015-1-luc.vanoostenryck@gmail.com> References: <20200702231039.55015-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is just to isolate the details about which switch need an extra 'finalization' in a separate function in preparation to moving all the parsing code in a separate file. Signed-off-by: Luc Van Oostenryck --- lib.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib.c b/lib.c index b3bacb180cac..a56efcaa64fd 100644 --- a/lib.c +++ b/lib.c @@ -1220,6 +1220,12 @@ static char **handle_switch(char *arg, char **next) return next; } +static void handle_switch_finalize(void) +{ + handle_switch_v_finalize(); + handle_switch_W_finalize(); +} + //////////////////////////////////////////////////////////////////////////////// // Predefines @@ -1576,8 +1582,7 @@ struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list } add_ptr_list(filelist, arg); } - handle_switch_W_finalize(); - handle_switch_v_finalize(); + handle_switch_finalize(); // Redirect stdout if needed if (dump_macro_defs || preprocess_only) -- 2.27.0