ahahahahaha... this is funny. Aside from embryo code, it's trivial to
regenerate the source. Actually editje willl use that function as it ignores
the actual edc contents and creates from eet structures.

On Sun, Oct 9, 2011 at 11:49 PM, Enlightenment SVN <
[email protected]> wrote:

> Log:
> edje: Add a --no-save option to edje_cc
>
>  Some people don't want to reveal their edc files...
>
>  Signed-off-by: Mike McCormack <[email protected]>
>
> Author:       mike_m
> Date:         2011-10-09 19:49:50 -0700 (Sun, 09 Oct 2011)
> New Revision: 63937
> Trac:         http://trac.enlightenment.org/e/changeset/63937
>
> Modified:
>  trunk/edje/src/bin/edje_cc.c trunk/edje/src/bin/edje_cc.h
> trunk/edje/src/bin/edje_cc_out.c
>
> Modified: trunk/edje/src/bin/edje_cc.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc.c        2011-10-09 22:10:45 UTC (rev 63936)
> +++ trunk/edje/src/bin/edje_cc.c        2011-10-10 02:49:50 UTC (rev 63937)
> @@ -25,6 +25,7 @@
>  int        no_lossy = 0;
>  int        no_comp = 0;
>  int        no_raw = 0;
> +int        no_save = 0;
>  int        min_quality = 0;
>  int        max_quality = 100;
>
> @@ -44,6 +45,7 @@
>       "-no-lossy                Do NOT allow images to be lossy\n"
>       "-no-comp                 Do NOT allow images to be stored with
> lossless compression\n"
>       "-no-raw                  Do NOT allow images to be stored with zero
> compression (raw)\n"
> +      "-no-save                 Do NOT store the input EDC file in the EDJ
> file\n"
>       "-min-quality VAL         Do NOT allow lossy images with quality <
> VAL (0-100)\n"
>       "-max-quality VAL         Do NOT allow lossy images with quality >
> VAL (0-100)\n"
>       "-Ddefine_val=to          CPP style define to define input macro
> definitions to the .edc source\n"
> @@ -97,6 +99,10 @@
>          {
>             no_raw = 1;
>          }
> +       else if (!strcmp(argv[i], "-no-save"))
> +         {
> +            no_save = 1;
> +         }
>        else if ((!strcmp(argv[i], "-id") || !strcmp(argv[i],
> "--image_dir")) && (i < (argc - 1)))
>          {
>             i++;
>
> Modified: trunk/edje/src/bin/edje_cc.h
> ===================================================================
> --- trunk/edje/src/bin/edje_cc.h        2011-10-09 22:10:45 UTC (rev 63936)
> +++ trunk/edje/src/bin/edje_cc.h        2011-10-10 02:49:50 UTC (rev 63937)
> @@ -205,6 +205,7 @@
>  extern int                    no_lossy;
>  extern int                    no_comp;
>  extern int                    no_raw;
> +extern int                    no_save;
>  extern int                    min_quality;
>  extern int                    max_quality;
>  extern int                    line;
>
> Modified: trunk/edje/src/bin/edje_cc_out.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_out.c    2011-10-09 22:10:45 UTC (rev 63936)
> +++ trunk/edje/src/bin/edje_cc_out.c    2011-10-10 02:49:50 UTC (rev 63937)
> @@ -847,12 +847,9 @@
>      {
>        char tmpn[PATH_MAX];
>        char tmpo[PATH_MAX];
> -        char buf[PATH_MAX];
>        int fd;
>        Code *cd = eina_list_data_get(l);
> -        Eina_List *ll;
> -        Code_Program *cp;
> -
> +
>        if (cd->is_lua)
>          continue;
>        if ((!cd->shared) && (!cd->programs))
> @@ -879,19 +876,26 @@
>        unlink(tmpn);
>        unlink(tmpo);
>
> -        if (cd->original)
> +        if (!no_save)
>           {
> -             snprintf(buf, PATH_MAX, "edje/scripts/embryo/source/%i", i);
> -             eet_write(ef, buf, cd->original, strlen(cd->original) + 1,
> 1);
> +             char buf[PATH_MAX];
> +             Eina_List *ll;
> +             Code_Program *cp;
> +
> +             if (cd->original)
> +               {
> +                  snprintf(buf, PATH_MAX, "edje/scripts/embryo/source/%i",
> i);
> +                  eet_write(ef, buf, cd->original, strlen(cd->original) +
> 1, 1);
> +               }
> +             EINA_LIST_FOREACH(cd->programs, ll, cp)
> +               {
> +                  if (!cp->original)
> +                    continue;
> +                  snprintf(buf, PATH_MAX,
> "edje/scripts/embryo/source/%i/%i", i,
> +                           cp->id);
> +                  eet_write(ef, buf, cp->original, strlen(cp->original) +
> 1, 1);
> +               }
>           }
> -        EINA_LIST_FOREACH(cd->programs, ll, cp)
> -          {
> -             if (!cp->original)
> -               continue;
> -             snprintf(buf, PATH_MAX, "edje/scripts/embryo/source/%i/%i",
> i,
> -                      cp->id);
> -             eet_write(ef, buf, cp->original, strlen(cp->original) + 1,
> 1);
> -          }
>      }
>  }
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to