From patchwork Sun Mar 30 16:21:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 3909841 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 970F19F1E1 for ; Sun, 30 Mar 2014 16:22:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C14C920357 for ; Sun, 30 Mar 2014 16:22:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27E38202DD for ; Sun, 30 Mar 2014 16:22:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbaC3QWY (ORCPT ); Sun, 30 Mar 2014 12:22:24 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:63269 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbaC3QVy (ORCPT ); Sun, 30 Mar 2014 12:21:54 -0400 Received: by mail-ee0-f41.google.com with SMTP id t10so5862208eei.0 for ; Sun, 30 Mar 2014 09:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=FYVy8U1iVM87PALfPQh4wuKY5exigXaBg4XedalPfDw=; b=EKxBBRH+jl9th+IkjHUJhl0l71q8y7ipcdiriDYmHLbsxbtkyKB9uM0/O40SxkPL6T 4n6VqdwA1fyDd2ObvGoftMlQuSkvHX8URrB6x07EOUhYeHN+ZCszs5AWWDF07/gzQLkZ /j4Tq/G1S7bLb1ARuXzPW7h6oiJXW3bgxVABtxPR7SthDP+QUTgaK2QiEd7N82ppedBT 4r56Yy63SrZsiEr+zFFVspCR4IsKajVXjzoLY4k7O1q/h4YnUxmyrySACUd8Wl5fVn8r XrL4Znd8jIshoRCmtp0cN8PRqP09ncCNdDge2hW4b7QD+0d6AQOLjB5ZAid8Wm7qKlIO nRCw== X-Received: by 10.15.63.66 with SMTP id l42mr2764138eex.63.1396196512660; Sun, 30 Mar 2014 09:21:52 -0700 (PDT) Received: from neutrino.exnihilo (29-206.60-188.cust.bluewin.ch. [188.60.206.29]) by mx.google.com with ESMTPSA id a4sm26747642eep.12.2014.03.30.09.21.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Mar 2014 09:21:51 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Roth?= To: linux-media@vger.kernel.org Cc: =?UTF-8?q?Andr=C3=A9=20Roth?= Subject: [PATCH 3/8] libdvbv5: make dvb_desc_default_init and dvb_desc_default_print private Date: Sun, 30 Mar 2014 18:21:13 +0200 Message-Id: <1396196478-996-3-git-send-email-neolynx@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396196478-996-1-git-send-email-neolynx@gmail.com> References: <1396196478-996-1-git-send-email-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dvb_desc_default_init and dvb_desc_default_print are used internaly only, remove them from the header file. add extern "C" to the parser functions, so they can be used from C++ directly. Signed-off-by: André Roth --- lib/include/libdvbv5/descriptors.h | 16 ++++++++-------- lib/libdvbv5/descriptors.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/include/libdvbv5/descriptors.h b/lib/include/libdvbv5/descriptors.h index b869a14..1ea0957 100644 --- a/lib/include/libdvbv5/descriptors.h +++ b/lib/include/libdvbv5/descriptors.h @@ -65,14 +65,6 @@ struct dvb_desc { uint8_t data[]; } __attribute__((packed)); -void dvb_desc_default_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc); -#ifdef __cplusplus -extern "C" { -#endif -void dvb_desc_default_print (struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc); -#ifdef __cplusplus -} -#endif #define dvb_desc_foreach( _desc, _tbl ) \ for( struct dvb_desc *_desc = _tbl->descriptor; _desc; _desc = _desc->next ) \ @@ -81,6 +73,10 @@ void dvb_desc_default_print (struct dvb_v5_fe_parms *parms, const struct dvb_de for( _struct *_desc = (_struct *) _tbl->descriptor; _desc; _desc = (_struct *) _desc->next ) \ if(_desc->type == _type) \ +#ifdef __cplusplus +extern "C" { +#endif + uint32_t bcd(uint32_t bcd); void hexdump(struct dvb_v5_fe_parms *parms, const char *prefix, const unsigned char *buf, int len); @@ -89,6 +85,10 @@ void dvb_parse_descriptors(struct dvb_v5_fe_parms *parms, const uint8_t *buf, ui void dvb_free_descriptors(struct dvb_desc **list); void dvb_print_descriptors(struct dvb_v5_fe_parms *parms, struct dvb_desc *desc); +#ifdef __cplusplus +} +#endif + struct dvb_v5_fe_parms; typedef void (*dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc); diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c index 4694b98..86bc7af 100644 --- a/lib/libdvbv5/descriptors.c +++ b/lib/libdvbv5/descriptors.c @@ -66,12 +66,12 @@ static void dvb_desc_init(uint8_t type, uint8_t length, struct dvb_desc *desc) desc->next = NULL; } -void dvb_desc_default_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) +static void dvb_desc_default_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) { memcpy(desc->data, buf, desc->length); } -void dvb_desc_default_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) +static void dvb_desc_default_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) { if (!parms) parms = dvb_fe_dummy();