Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/embryo

Dir     : e17/libs/embryo/src/lib


Modified Files:
        embryo_args.c embryo_float.c embryo_private.h embryo_rand.c 
        embryo_time.c 


Log Message:
fix gettimeofday on windows and add __UNUSED__ for unused parameters

===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_args.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- embryo_args.c       29 Apr 2005 16:32:39 -0000      1.5
+++ embryo_args.c       11 Apr 2008 05:59:42 -0000      1.6
@@ -12,7 +12,7 @@
 /* exported args api */
 
 static Embryo_Cell
-_embryo_args_numargs(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_args_numargs(Embryo_Program *ep, Embryo_Cell *params __UNUSED__)
 {
    Embryo_Header *hdr;
    unsigned char *data;
===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_float.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- embryo_float.c      4 Mar 2008 10:36:23 -0000       1.2
+++ embryo_float.c      11 Apr 2008 05:59:42 -0000      1.3
@@ -60,7 +60,7 @@
 /* exported float api */
 
 static Embryo_Cell
-_embryo_fp(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = long value to convert to a float */
    float f;
@@ -89,7 +89,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_mul(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_mul(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 */
    /* params[2] = float operand 2 */
@@ -101,7 +101,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_div(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_div(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float dividend (top) */
    /* params[2] = float divisor (bottom) */
@@ -113,7 +113,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_add(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_add(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 */
    /* params[2] = float operand 2 */
@@ -125,7 +125,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_sub(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_sub(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 */
    /* params[2] = float operand 2 */
@@ -138,7 +138,7 @@
 
 /* Return fractional part of float */
 static Embryo_Cell
-_embryo_fp_fract(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_fract(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand */
    float f;
@@ -151,7 +151,7 @@
 
 /* Return integer part of float, rounded */
 static Embryo_Cell
-_embryo_fp_round(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_round(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand */
    /* params[2] = Type of rounding (cell) */
@@ -179,7 +179,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_cmp(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_cmp(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 */
    /* params[2] = float operand 2 */
@@ -211,7 +211,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_power(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_power(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 */
    /* params[2] = float operand 2 */
@@ -245,7 +245,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_sin(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_sin(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 (angle) */
    /* params[2] = float operand 2 (radix) */
@@ -259,7 +259,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_cos(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_cos(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 (angle) */
    /* params[2] = float operand 2 (radix) */
@@ -273,7 +273,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_tan(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_tan(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand 1 (angle) */
    /* params[2] = float operand 2 (radix) */
@@ -287,7 +287,7 @@
 }
 
 static Embryo_Cell
-_embryo_fp_abs(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_fp_abs(Embryo_Program *ep __UNUSED__, Embryo_Cell *params)
 {
    /* params[1] = float operand */
    float f;
===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_private.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- embryo_private.h    21 Mar 2008 17:18:25 -0000      1.17
+++ embryo_private.h    11 Apr 2008 05:59:42 -0000      1.18
@@ -39,6 +39,12 @@
 # endif
 #endif
 
+#if HAVE___ATTRIBUTE__
+#define __UNUSED__ __attribute__((unused))
+#else
+#define __UNUSED__
+#endif
+
 typedef enum _Embryo_Opcode Embryo_Opcode;
 
 enum _Embryo_Opcode
===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_rand.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- embryo_rand.c       29 Mar 2004 11:58:57 -0000      1.1
+++ embryo_rand.c       11 Apr 2008 05:59:42 -0000      1.2
@@ -3,13 +3,13 @@
 /* exported random number api */
 
 static Embryo_Cell
-_embryo_rand_rand(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_rand_rand(Embryo_Program *ep __UNUSED__, Embryo_Cell *params 
__UNUSED__)
 {
    return (Embryo_Cell)(rand() & 0xffff);
 }
 
 static Embryo_Cell
-_embryo_rand_randf(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_rand_randf(Embryo_Program *ep __UNUSED__, Embryo_Cell *params 
__UNUSED__)
 {
    double r;
    float f;
===================================================================
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_time.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- embryo_time.c       19 Oct 2004 16:50:27 -0000      1.3
+++ embryo_time.c       11 Apr 2008 05:59:42 -0000      1.4
@@ -6,32 +6,13 @@
 #include <time.h>
 
 #ifndef HAVE_GETTIMEOFDAY
-#ifdef WIN32
-#include <sys/timeb.h>
-
-static int gettimeofday (struct timeval *tv, void *unused)
-{
-   struct _timeb t;
-
-   if (!tv)
-      return -1;
-
-   _ftime (&t);
-
-   tv->tv_sec = t.time;
-   tv->tv_usec = t.millitm * 1000;
-
-   return 0;
-}
-#else
-#error "Your platform isn't supported yet"
-#endif
+# error "Your platform isn't supported yet"
 #endif
 
 /* exported time api */
 
 static Embryo_Cell
-_embryo_time_seconds(Embryo_Program *ep, Embryo_Cell *params)
+_embryo_time_seconds(Embryo_Program *ep __UNUSED__, Embryo_Cell *params 
__UNUSED__)
 {
    struct timeval      timev;
    double t;



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to