Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/embryo

Dir     : e17/libs/embryo/examples


Modified Files:
        test.sma 


Log Message:


embryo support for varargs... i was just missing native funcs to export
enough info

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/examples/test.sma,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- test.sma    15 May 2004 17:24:56 -0000      1.5
+++ test.sma    1 Jul 2004 06:08:03 -0000       1.6
@@ -97,11 +97,43 @@
    ret = testfn(12345, "A Test String", 7);

    printf("Done. Return value of testfn() was %i\n", ret);

    

+   printf("Test varargs...\n");

+   vargs(1, 2, "hello", "there", 8, 9);

+   

    printf("\n\n");

    

    return 7;

 }

 

+vargs(a, b, ...)

+{

+   printf("ARGS...\n");

+   printf("  a = %i\n", a);

+   printf("  b = %i\n", b);

+   for (new i = 2; i < numargs(); i++)

+     {

+       new val;

+       new str[100];

+       

+       printf("  GET ARG... %i\n", i);

+       if (i < 4)

+         {

+            for (new j = 0; j < (sizeof(str) - 1); j++)

+              {

+                 str[j] = getarg(i, j);

+                 if (str[j] == 0) break;

+              }

+            printf("    ARG: %s [max %i]\n", str, sizeof(str));

+         }

+       else

+         {

+            val = getarg(i);

+            printf("    ARG: %i\n", val);

+         }

+     }

+   printf("ARGS DONE.\n");

+}

+

 recurse(val)

 {

    printf("Recurse: val = %i\n", val);





-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to