Ohhhhh unset feature? This might be useful.

Daniel Juyung Seo (SeoZ)

On Thu, Apr 19, 2012 at 12:35 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> small improvement - allow part names of "-" to mean "remove part name
>  itd and reset back to -1 - ie none". useful for to/to_x/to_y etc.
>
>
>
> Author:       raster
> Date:         2012-04-18 20:35:29 -0700 (Wed, 18 Apr 2012)
> New Revision: 70315
> Trac:         http://trac.enlightenment.org/e/changeset/70315
>
> Modified:
>  trunk/edje/src/bin/edje_cc_out.c
>
> Modified: trunk/edje/src/bin/edje_cc_out.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_out.c    2012-04-19 00:44:07 UTC (rev 70314)
> +++ trunk/edje/src/bin/edje_cc_out.c    2012-04-19 03:35:29 UTC (rev 70315)
> @@ -1707,25 +1707,32 @@
>        Edje_Part *ep;
>        unsigned int i;
>
> -       for (i = 0; i < part->pc->parts_count; ++i)
> -         {
> -            ep = part->pc->parts[i];
> +        if (!strcmp(part->name, "-"))
> +          {
> +             *(part->dest) = -1;
> +          }
> +        else
> +          {
> +             for (i = 0; i < part->pc->parts_count; ++i)
> +               {
> +                  ep = part->pc->parts[i];
> +
> +                  if ((ep->name) && (!strcmp(ep->name, part->name)))
> +                    {
> +                       handle_slave_lookup(part_slave_lookups, part->dest, 
> ep->id);
> +                       *(part->dest) = ep->id;
> +                       break;
> +                    }
> +               }
>
> -            if ((ep->name) && (!strcmp(ep->name, part->name)))
> -              {
> -                 handle_slave_lookup(part_slave_lookups, part->dest, ep->id);
> -                 *(part->dest) = ep->id;
> -                 break;
> -              }
> -         }
> +             if (i == part->pc->parts_count)
> +               {
> +                  ERR("%s: Error. Unable to find part name \"%s\".",
> +                      progname, part->name);
> +                  exit(-1);
> +               }
> +          }
>
> -       if (i == part->pc->parts_count)
> -         {
> -            ERR("%s: Error. Unable to find part name \"%s\".",
> -                progname, part->name);
> -            exit(-1);
> -         }
> -
>        free(part->name);
>        free(part);
>      }
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to