[haiku-commits] Re: r40852 - in haiku/trunk/src: apps/deskcalc bin/rc bin/rc/tests

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 06 Mar 2011 21:41:46 +0100

jonas@xxxxxxxxxxx wrote:
> Support added to the resource compiler and resource definition files 
> (.rdef)
> for application name catalog reference. Please review.

It's been some time since I looked at rc's code, but it looks fine from 
what I can tell.
I would suggest to add defaults for the catalog entry, btw, so that 
only the catalog entry itself needs to be specified in the usual case.

> +     field_t* fields  = (field_t*)alloc_mem(1 * sizeof(field_t));
> +     fields[0].type   = get_type("string");
> +     fields[0].name   = "catalog_entry";
> +     fields[0].resize = 0;
> +     fields[0].data   = make_default(fields[0].type);
> +
> +     type_t type;
> +     type.code     = B_STRING_TYPE;
> +     type.name     = "app_name_catalog_entry";
> +     type.fields   = fields;
> +     type.count    = 1;
> +     type.def_id   = 1;
> +     type.def_name = "SYS:NAME";

You probably mostly copied this, but spacing looks odd, and rc should 
follow our style guide.

Bye,
   Axel.


Other related posts: