Enlightenment CVS committal Author : devilhorns Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_value.c Log Message: Format to 'E' style. Note: No functional changes, only formatting. =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_value.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ecore_value.c 6 Jan 2006 17:58:12 -0000 1.8 +++ ecore_value.c 23 Jun 2006 06:43:00 -0000 1.9 @@ -28,20 +28,23 @@ #include "Ecore_Data.h" #include "ecore_private.h" -EAPI const unsigned int ecore_prime_table[] = { 17, 31, 61, 127, 257, 509, 1021, - 2053, 4093, 8191, 16381, 32771, 65537, 131071, 262147, 524287, 1048573, - 2097143, 4194301, 8388617, 16777213 +EAPI const unsigned int ecore_prime_table[] = +{ + 17, 31, 61, 127, 257, 509, 1021, + 2053, 4093, 8191, 16381, 32771, 65537, 131071, 262147, 524287, 1048573, + 2097143, 4194301, 8388617, 16777213 }; -inline void ecore_print_warning(const char *function, const char *sparam) +inline void +ecore_print_warning(const char *function, const char *sparam) { - fprintf(stderr, "***** Developer Warning ***** :\n" - "\tThis program is calling:\n\n" - "\t%s();\n\n" - "\tWith the parameter:\n\n" - "\t%s\n\n" - "\tbeing NULL. Please fix your program.\n", function, sparam); - fflush(stderr); + fprintf(stderr, "***** Developer Warning ***** :\n" + "\tThis program is calling:\n\n" + "\t%s();\n\n" + "\tWith the parameter:\n\n" + "\t%s\n\n" + "\tbeing NULL. Please fix your program.\n", function, sparam); + fflush(stderr); } /** @@ -49,9 +52,10 @@ * @param key The key to return compute a hash value * @return The key cast to an unsigned int. */ -EAPI unsigned int ecore_direct_hash(void *key) +EAPI unsigned int +ecore_direct_hash(void *key) { - return ((unsigned int) key); + return ((unsigned int) key); } /** @@ -59,21 +63,23 @@ * @param key A pointer to the string to compute a hash value * @return A computed hash value for @a key. */ -EAPI unsigned int ecore_str_hash(void *key) +EAPI unsigned int +ecore_str_hash(void *key) { - int i; - unsigned int value = 0; - char *k = (char *) key; - - if (!k) - return 0; - - for (i = 0; k[i] != '\0'; i++) { - value ^= ((unsigned int) k[i] << ((i * 5) % - (sizeof(unsigned int) * 8))); - } + int i; + unsigned int value = 0; + char *k = (char *) key; + + if (!k) + return 0; + + for (i = 0; k[i] != '\0'; i++) + { + value ^= ((unsigned int) k[i] << ((i * 5) % + (sizeof(unsigned int) * 8))); + } - return value; + return value; } /** @@ -82,20 +88,21 @@ * @param key2 The second key to compare * @return A strcmp style value to indicate the larger key */ -EAPI int ecore_direct_compare(void *key1, void *key2) +EAPI int +ecore_direct_compare(void *key1, void *key2) { - unsigned int k1, k2; + unsigned int k1, k2; - k1 = (unsigned int) key1; - k2 = (unsigned int) key2; + k1 = (unsigned int) key1; + k2 = (unsigned int) key2; - if (k1 > k2) - return 1; + if (k1 > k2) + return 1; - if (k1 < k2) - return -1; + if (k1 < k2) + return -1; - return 0; + return 0; } /** @@ -104,17 +111,18 @@ * @param key2 The second key to compare * @return A strcmp style value to indicate the larger key */ -EAPI int ecore_str_compare(void *key1, void *key2) +EAPI int +ecore_str_compare(void *key1, void *key2) { - char *k1, *k2; + char *k1, *k2; - if (!key1 || !key2) - return ecore_direct_compare(key1, key2); - else if (key1 == key2) - return 0; + if (!key1 || !key2) + return ecore_direct_compare(key1, key2); + else if (key1 == key2) + return 0; - k1 = (char *) key1; - k2 = (char *) key2; + k1 = (char *) key1; + k2 = (char *) key2; - return strcmp(k1, k2); + return strcmp(k1, k2); } Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs