All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregor Jasny <gjasny@googlemail.com>
To: Konke Radlow <kradlow@cisco.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] Initial version of RDS Control utility Signed-off-by: Konke Radlow <kradlow@cisco.com>
Date: Thu, 26 Jul 2012 21:13:08 +0200	[thread overview]
Message-ID: <501196C4.1020909@googlemail.com> (raw)
In-Reply-To: <89e7f656fc45f12f2cb5369738b3afd1f712674f.1343237398.git.kradlow@cisco.com>

On 7/25/12 7:44 PM, Konke Radlow wrote:

> +static void print_rds_af(struct v4l2_rds_af_set *af_set)
> +{
> +	int counter = 0;
> +
> +	printf("\nAnnounced AFs: %u", af_set->announced_af);
> +	for (int i = 0; i < af_set->size && i < af_set->announced_af; i++, counter++) {
> +		if (af_set->af[i] >= 87500000 ) {
> +			printf("\nAF%02d: %.1fMHz", counter, af_set->af[i] / 1000000.0);
> +			continue;
> +		}
> +		printf("\nAF%02d: %.1fkHz", counter, af_set->af[i] / 1000.0);
> +	}
> +}
> +
> +static void print_rds_pi(const struct v4l2_rds *handle)
> +{
> +	printf("\nArea Coverage: %s", v4l2_rds_get_coverage_str(handle));
> +}
> +
> +static void print_rds_data(struct v4l2_rds *handle, uint32_t updated_fields)
> +{
> +	if (params.options[OptPrintBlock])
> +		updated_fields = 0xFFFFFFFF;

You could use UINT32_MAX here

> +
> +	if (updated_fields & V4L2_RDS_PI && 
> +			handle->valid_fields & V4L2_RDS_PI) {
> +		printf("\nPI: %04x", handle->pi);
> +		print_rds_pi(handle);
> +	}

> +static int parse_cl(int argc, char **argv)
> +{
> +	int i = 0;
> +	int idx = 0;
> +	int opt = 0;
> +	char short_options[26 * 2 * 2 + 1];

Where comes the 26 and 2 from?
Could this be (ARRAY_SIZE(long_options) + 1 ) * 2?


  parent reply	other threads:[~2012-07-26 19:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 17:43 [RFC PATCH 0/2] Add support for RDS decoding Konke Radlow
2012-07-25 17:44 ` [RFC PATCH 1/2] Initial version of the RDS-decoder library Signed-off-by: Konke Radlow <kradlow@cisco.com> Konke Radlow
2012-07-25 17:44   ` [RFC PATCH 2/2] Initial version of RDS Control utility " Konke Radlow
2012-07-26 19:02     ` Gregor Jasny
2012-07-26 19:13     ` Gregor Jasny [this message]
2012-07-26 19:46       ` Konke Radlow
2012-07-27  6:50       ` Hans Verkuil
2012-07-28 11:11     ` Hans de Goede
2012-07-30  6:50       ` Hans Verkuil
2012-07-26 14:28   ` [RFC PATCH 1/2] Initial version of the RDS-decoder library " Ezequiel Garcia
2012-07-26 14:39     ` Hans Verkuil
2012-07-26 14:41       ` Ezequiel Garcia
2012-07-26 18:46   ` Gregor Jasny
2012-07-26 18:49   ` Gregor Jasny
2012-07-26 18:41 ` [RFC PATCH 0/2] Add support for RDS decoding Gregor Jasny
2012-07-27 14:27   ` Konke Radlow
2012-07-29 17:07     ` Gregor Jasny
2012-07-30  9:36       ` Konke Radlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501196C4.1020909@googlemail.com \
    --to=gjasny@googlemail.com \
    --cc=kradlow@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.