[hipl-dev] Re: Minor Style Cleanup

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Tue, 04 Jan 2011 20:00:30 +0100

On Tue, Jan 04, 2011 at 05:22:42PM +0100, Stefan Götz wrote:
> 
> The attached patch changes a weird macro/fprintf() combination to
> 
> 1) turn it into a sane fprintf() statement
> 
> 2) make uncrustify survive this onslaught of weirdness and re-format this file
> just fine instead of introducing even more weirdness
> 
> It would be great if someone from hipl-core could commit this.
> 
> --- hipd/hiprelay.c   2011-01-03 19:36:44 +0000
> +++ hipd/hiprelay.c   2011-01-04 16:21:48 +0000
> @@ -880,7 +839,39 @@
>      HIP_IFEL(((fp = fopen(HIP_RELAY_CONFIG_FILE, "w")) == NULL), -ENOENT,
>               "Cannot open file %s for writing.\n", HIP_RELAY_CONFIG_FILE);
>  
> -    fprintf(fp, HIP_RC_FILE_FORMAT_STRING, HIP_RC_FILE_CONTENT);
> +    fprintf(fp, "# HIP relay / RVS configuration file.\n\
> +#\n\
> +# This file consists of stanzas of the following form:\n\
> +#\n\
> +# parametername = \"value1\", \"value2\", ... \"valueN\"\n\
> +#\n\

I think you can now drop all the ugly backslashes.

Diego

Other related posts: