On Thu, Aug 9, 2012 at 12:05 PM, Hans de Goede <hdego...@redhat.com> wrote:
> Hi,
>
> Comments inline.
>
>
> On 08/07/2012 05:11 PM, Konke Radlow wrote:
>>
>> ---
>>   Makefile.am               |    3 +-
>>   configure.ac              |    1 +
>>   utils/rds-ctl/Makefile.am |    5 +
>>   utils/rds-ctl/rds-ctl.cpp |  959
>> +++++++++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 967 insertions(+), 1 deletion(-)
>>   create mode 100644 utils/rds-ctl/Makefile.am
>>   create mode 100644 utils/rds-ctl/rds-ctl.cpp
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 621d8d9..8ef0d00 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>
>
> <Snip>
>
>
>> +static void print_rds_data(const struct v4l2_rds *handle, uint32_t
>> updated_fields)
>> +{
>> +       if (params.options[OptPrintBlock])
>> +               updated_fields = 0xffffffff;
>> +
>> +       if ((updated_fields & V4L2_RDS_PI) &&
>> +                       (handle->valid_fields & V4L2_RDS_PI)) {
>> +               printf("\nPI: %04x", handle->pi);
>> +               print_rds_pi(handle);
>> +       }
>> +
>> +       if (updated_fields & V4L2_RDS_PS &&
>> +                       handle->valid_fields & V4L2_RDS_PS) {
>> +               printf("\nPS: ");
>> +               for (int i = 0; i < 8; ++i) {
>> +                       /* filter out special characters */
>> +                       if (handle->ps[i] >= 0x20 && handle->ps[i] <=
>> 0x7E)
>> +                               printf("%lc",handle->ps[i]);
>> +                       else
>> +                               printf(" ");
>> +               }
>
>
>
> Since ps now is a 0 terminated UTF-8 string you should be able to just do:
>                 printf("\nPS: %s", handle->ps);
>
> And likewise for the other strings.
>

changed as proposed, and works like a charm :)

>
>
> Other then that this looks good to me.
>
> Regards,
>
> Hans

thank you for the review

Regards,
Konke
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to