diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eet/src/lib/eet_data.c | 238 |
1 files changed, 119 insertions, 119 deletions
diff --git a/libraries/eet/src/lib/eet_data.c b/libraries/eet/src/lib/eet_data.c index 23b0b97..56b9ee0 100644 --- a/libraries/eet/src/lib/eet_data.c +++ b/libraries/eet/src/lib/eet_data.c | |||
@@ -651,7 +651,7 @@ eet_data_get_char(const Eet_Dictionary *ed __UNUSED__, | |||
651 | *d = *s; | 651 | *d = *s; |
652 | CONV8(*d); | 652 | CONV8(*d); |
653 | return sizeof(char); | 653 | return sizeof(char); |
654 | } /* eet_data_get_char */ | 654 | } |
655 | 655 | ||
656 | static void * | 656 | static void * |
657 | eet_data_put_char(Eet_Dictionary *ed __UNUSED__, | 657 | eet_data_put_char(Eet_Dictionary *ed __UNUSED__, |
@@ -669,7 +669,7 @@ eet_data_put_char(Eet_Dictionary *ed __UNUSED__, | |||
669 | CONV8(*d); | 669 | CONV8(*d); |
670 | *size_ret = sizeof(char); | 670 | *size_ret = sizeof(char); |
671 | return d; | 671 | return d; |
672 | } /* eet_data_put_char */ | 672 | } |
673 | 673 | ||
674 | /* SHORT TYPE */ | 674 | /* SHORT TYPE */ |
675 | static int | 675 | static int |
@@ -687,7 +687,7 @@ eet_data_get_short(const Eet_Dictionary *ed __UNUSED__, | |||
687 | d = (short *)dst; | 687 | d = (short *)dst; |
688 | CONV16(*d); | 688 | CONV16(*d); |
689 | return sizeof(short); | 689 | return sizeof(short); |
690 | } /* eet_data_get_short */ | 690 | } |
691 | 691 | ||
692 | static void * | 692 | static void * |
693 | eet_data_put_short(Eet_Dictionary *ed __UNUSED__, | 693 | eet_data_put_short(Eet_Dictionary *ed __UNUSED__, |
@@ -705,7 +705,7 @@ eet_data_put_short(Eet_Dictionary *ed __UNUSED__, | |||
705 | CONV16(*d); | 705 | CONV16(*d); |
706 | *size_ret = sizeof(short); | 706 | *size_ret = sizeof(short); |
707 | return d; | 707 | return d; |
708 | } /* eet_data_put_short */ | 708 | } |
709 | 709 | ||
710 | /* INT TYPE */ | 710 | /* INT TYPE */ |
711 | static inline int | 711 | static inline int |
@@ -723,7 +723,7 @@ eet_data_get_int(const Eet_Dictionary *ed __UNUSED__, | |||
723 | d = (int *)dst; | 723 | d = (int *)dst; |
724 | CONV32(*d); | 724 | CONV32(*d); |
725 | return sizeof(int); | 725 | return sizeof(int); |
726 | } /* eet_data_get_int */ | 726 | } |
727 | 727 | ||
728 | static void * | 728 | static void * |
729 | eet_data_put_int(Eet_Dictionary *ed __UNUSED__, | 729 | eet_data_put_int(Eet_Dictionary *ed __UNUSED__, |
@@ -741,7 +741,7 @@ eet_data_put_int(Eet_Dictionary *ed __UNUSED__, | |||
741 | CONV32(*d); | 741 | CONV32(*d); |
742 | *size_ret = sizeof(int); | 742 | *size_ret = sizeof(int); |
743 | return d; | 743 | return d; |
744 | } /* eet_data_put_int */ | 744 | } |
745 | 745 | ||
746 | /* LONG LONG TYPE */ | 746 | /* LONG LONG TYPE */ |
747 | static int | 747 | static int |
@@ -759,7 +759,7 @@ eet_data_get_long_long(const Eet_Dictionary *ed __UNUSED__, | |||
759 | d = (unsigned long long *)dst; | 759 | d = (unsigned long long *)dst; |
760 | CONV64(*d); | 760 | CONV64(*d); |
761 | return sizeof(unsigned long long); | 761 | return sizeof(unsigned long long); |
762 | } /* eet_data_get_long_long */ | 762 | } |
763 | 763 | ||
764 | static void * | 764 | static void * |
765 | eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, | 765 | eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, |
@@ -777,7 +777,7 @@ eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, | |||
777 | CONV64(*d); | 777 | CONV64(*d); |
778 | *size_ret = sizeof(unsigned long long); | 778 | *size_ret = sizeof(unsigned long long); |
779 | return d; | 779 | return d; |
780 | } /* eet_data_put_long_long */ | 780 | } |
781 | 781 | ||
782 | /* STRING TYPE */ | 782 | /* STRING TYPE */ |
783 | static inline int | 783 | static inline int |
@@ -796,7 +796,7 @@ eet_data_get_string_hash(const Eet_Dictionary *ed, | |||
796 | } | 796 | } |
797 | 797 | ||
798 | return -1; | 798 | return -1; |
799 | } /* eet_data_get_string_hash */ | 799 | } |
800 | 800 | ||
801 | static inline int | 801 | static inline int |
802 | eet_data_get_string(const Eet_Dictionary *ed, | 802 | eet_data_get_string(const Eet_Dictionary *ed, |
@@ -833,7 +833,7 @@ eet_data_get_string(const Eet_Dictionary *ed, | |||
833 | 833 | ||
834 | *d = s; | 834 | *d = s; |
835 | return strlen(s) + 1; | 835 | return strlen(s) + 1; |
836 | } /* eet_data_get_string */ | 836 | } |
837 | 837 | ||
838 | static void * | 838 | static void * |
839 | eet_data_put_string(Eet_Dictionary *ed, | 839 | eet_data_put_string(Eet_Dictionary *ed, |
@@ -871,7 +871,7 @@ eet_data_put_string(Eet_Dictionary *ed, | |||
871 | memcpy(d, s, len + 1); | 871 | memcpy(d, s, len + 1); |
872 | *size_ret = len + 1; | 872 | *size_ret = len + 1; |
873 | return d; | 873 | return d; |
874 | } /* eet_data_put_string */ | 874 | } |
875 | 875 | ||
876 | /* ALWAYS INLINED STRING TYPE */ | 876 | /* ALWAYS INLINED STRING TYPE */ |
877 | static int | 877 | static int |
@@ -881,7 +881,7 @@ eet_data_get_istring(const Eet_Dictionary *ed __UNUSED__, | |||
881 | void *dst) | 881 | void *dst) |
882 | { | 882 | { |
883 | return eet_data_get_string(NULL, src, src_end, dst); | 883 | return eet_data_get_string(NULL, src, src_end, dst); |
884 | } /* eet_data_get_istring */ | 884 | } |
885 | 885 | ||
886 | static void * | 886 | static void * |
887 | eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, | 887 | eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, |
@@ -889,7 +889,7 @@ eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, | |||
889 | int *size_ret) | 889 | int *size_ret) |
890 | { | 890 | { |
891 | return eet_data_put_string(NULL, src, size_ret); | 891 | return eet_data_put_string(NULL, src, size_ret); |
892 | } /* eet_data_put_istring */ | 892 | } |
893 | 893 | ||
894 | /* ALWAYS NULL TYPE */ | 894 | /* ALWAYS NULL TYPE */ |
895 | static int | 895 | static int |
@@ -904,7 +904,7 @@ eet_data_get_null(const Eet_Dictionary *ed __UNUSED__, | |||
904 | 904 | ||
905 | *d = NULL; | 905 | *d = NULL; |
906 | return 1; | 906 | return 1; |
907 | } /* eet_data_get_null */ | 907 | } |
908 | 908 | ||
909 | static void * | 909 | static void * |
910 | eet_data_put_null(Eet_Dictionary *ed __UNUSED__, | 910 | eet_data_put_null(Eet_Dictionary *ed __UNUSED__, |
@@ -913,7 +913,7 @@ eet_data_put_null(Eet_Dictionary *ed __UNUSED__, | |||
913 | { | 913 | { |
914 | *size_ret = 0; | 914 | *size_ret = 0; |
915 | return NULL; | 915 | return NULL; |
916 | } /* eet_data_put_null */ | 916 | } |
917 | 917 | ||
918 | /** | 918 | /** |
919 | * Fast lookups of simple doubles/floats. | 919 | * Fast lookups of simple doubles/floats. |
@@ -941,7 +941,7 @@ _eet_data_float_cache_get(const char *s, | |||
941 | } | 941 | } |
942 | 942 | ||
943 | return 0; | 943 | return 0; |
944 | } /* _eet_data_float_cache_get */ | 944 | } |
945 | 945 | ||
946 | static inline int | 946 | static inline int |
947 | _eet_data_double_cache_get(const char *s, | 947 | _eet_data_double_cache_get(const char *s, |
@@ -963,7 +963,7 @@ _eet_data_double_cache_get(const char *s, | |||
963 | } | 963 | } |
964 | 964 | ||
965 | return 0; | 965 | return 0; |
966 | } /* _eet_data_double_cache_get */ | 966 | } |
967 | 967 | ||
968 | /* FLOAT TYPE */ | 968 | /* FLOAT TYPE */ |
969 | static int | 969 | static int |
@@ -1006,7 +1006,7 @@ eet_data_get_float(const Eet_Dictionary *ed, | |||
1006 | return -1; | 1006 | return -1; |
1007 | 1007 | ||
1008 | return 1; | 1008 | return 1; |
1009 | } /* eet_data_get_float */ | 1009 | } |
1010 | 1010 | ||
1011 | static void * | 1011 | static void * |
1012 | eet_data_put_float(Eet_Dictionary *ed, | 1012 | eet_data_put_float(Eet_Dictionary *ed, |
@@ -1038,7 +1038,7 @@ eet_data_put_float(Eet_Dictionary *ed, | |||
1038 | return NULL; | 1038 | return NULL; |
1039 | 1039 | ||
1040 | return eet_data_put_int(ed, &idx, size_ret); | 1040 | return eet_data_put_int(ed, &idx, size_ret); |
1041 | } /* eet_data_put_float */ | 1041 | } |
1042 | 1042 | ||
1043 | /* DOUBLE TYPE */ | 1043 | /* DOUBLE TYPE */ |
1044 | static int | 1044 | static int |
@@ -1082,7 +1082,7 @@ eet_data_get_double(const Eet_Dictionary *ed, | |||
1082 | return -1; | 1082 | return -1; |
1083 | 1083 | ||
1084 | return 1; | 1084 | return 1; |
1085 | } /* eet_data_get_double */ | 1085 | } |
1086 | 1086 | ||
1087 | static void * | 1087 | static void * |
1088 | eet_data_put_double(Eet_Dictionary *ed, | 1088 | eet_data_put_double(Eet_Dictionary *ed, |
@@ -1115,7 +1115,7 @@ eet_data_put_double(Eet_Dictionary *ed, | |||
1115 | return NULL; | 1115 | return NULL; |
1116 | 1116 | ||
1117 | return eet_data_put_int(ed, &idx, size_ret); | 1117 | return eet_data_put_int(ed, &idx, size_ret); |
1118 | } /* eet_data_put_double */ | 1118 | } |
1119 | 1119 | ||
1120 | static int | 1120 | static int |
1121 | eet_data_get_f32p32(const Eet_Dictionary *ed, | 1121 | eet_data_get_f32p32(const Eet_Dictionary *ed, |
@@ -1151,7 +1151,7 @@ eet_data_get_f32p32(const Eet_Dictionary *ed, | |||
1151 | return -1; | 1151 | return -1; |
1152 | 1152 | ||
1153 | return 1; | 1153 | return 1; |
1154 | } /* eet_data_get_f32p32 */ | 1154 | } |
1155 | 1155 | ||
1156 | static void * | 1156 | static void * |
1157 | eet_data_put_f32p32(Eet_Dictionary *ed, | 1157 | eet_data_put_f32p32(Eet_Dictionary *ed, |
@@ -1184,7 +1184,7 @@ eet_data_put_f32p32(Eet_Dictionary *ed, | |||
1184 | return NULL; | 1184 | return NULL; |
1185 | 1185 | ||
1186 | return eet_data_put_int(ed, &idx, size_ret); | 1186 | return eet_data_put_int(ed, &idx, size_ret); |
1187 | } /* eet_data_put_f32p32 */ | 1187 | } |
1188 | 1188 | ||
1189 | static int | 1189 | static int |
1190 | eet_data_get_f16p16(const Eet_Dictionary *ed, | 1190 | eet_data_get_f16p16(const Eet_Dictionary *ed, |
@@ -1202,7 +1202,7 @@ eet_data_get_f16p16(const Eet_Dictionary *ed, | |||
1202 | 1202 | ||
1203 | *fp = eina_f32p32_to_f16p16(tmp); | 1203 | *fp = eina_f32p32_to_f16p16(tmp); |
1204 | return 1; | 1204 | return 1; |
1205 | } /* eet_data_get_f16p16 */ | 1205 | } |
1206 | 1206 | ||
1207 | static void * | 1207 | static void * |
1208 | eet_data_put_f16p16(Eet_Dictionary *ed, | 1208 | eet_data_put_f16p16(Eet_Dictionary *ed, |
@@ -1213,7 +1213,7 @@ eet_data_put_f16p16(Eet_Dictionary *ed, | |||
1213 | 1213 | ||
1214 | tmp = eina_f16p16_to_f32p32((Eina_F16p16)(*(Eina_F16p16 *)src)); | 1214 | tmp = eina_f16p16_to_f32p32((Eina_F16p16)(*(Eina_F16p16 *)src)); |
1215 | return eet_data_put_f32p32(ed, &tmp, size_ret); | 1215 | return eet_data_put_f32p32(ed, &tmp, size_ret); |
1216 | } /* eet_data_put_f16p16 */ | 1216 | } |
1217 | 1217 | ||
1218 | static int | 1218 | static int |
1219 | eet_data_get_f8p24(const Eet_Dictionary *ed, | 1219 | eet_data_get_f8p24(const Eet_Dictionary *ed, |
@@ -1231,7 +1231,7 @@ eet_data_get_f8p24(const Eet_Dictionary *ed, | |||
1231 | 1231 | ||
1232 | *fp = eina_f32p32_to_f8p24(tmp); | 1232 | *fp = eina_f32p32_to_f8p24(tmp); |
1233 | return 1; | 1233 | return 1; |
1234 | } /* eet_data_get_f8p24 */ | 1234 | } |
1235 | 1235 | ||
1236 | static void * | 1236 | static void * |
1237 | eet_data_put_f8p24(Eet_Dictionary *ed, | 1237 | eet_data_put_f8p24(Eet_Dictionary *ed, |
@@ -1242,7 +1242,7 @@ eet_data_put_f8p24(Eet_Dictionary *ed, | |||
1242 | 1242 | ||
1243 | tmp = eina_f8p24_to_f32p32((Eina_F8p24)(*(Eina_F8p24 *)src)); | 1243 | tmp = eina_f8p24_to_f32p32((Eina_F8p24)(*(Eina_F8p24 *)src)); |
1244 | return eet_data_put_f32p32(ed, &tmp, size_ret); | 1244 | return eet_data_put_f32p32(ed, &tmp, size_ret); |
1245 | } /* eet_data_put_f8p24 */ | 1245 | } |
1246 | 1246 | ||
1247 | static inline int | 1247 | static inline int |
1248 | eet_data_get_type(const Eet_Dictionary *ed, | 1248 | eet_data_get_type(const Eet_Dictionary *ed, |
@@ -1255,7 +1255,7 @@ eet_data_get_type(const Eet_Dictionary *ed, | |||
1255 | 1255 | ||
1256 | ret = eet_basic_codec[type - 1].get(ed, src, src_end, dest); | 1256 | ret = eet_basic_codec[type - 1].get(ed, src, src_end, dest); |
1257 | return ret; | 1257 | return ret; |
1258 | } /* eet_data_get_type */ | 1258 | } |
1259 | 1259 | ||
1260 | static inline void * | 1260 | static inline void * |
1261 | eet_data_put_type(Eet_Dictionary *ed, | 1261 | eet_data_put_type(Eet_Dictionary *ed, |
@@ -1267,7 +1267,7 @@ eet_data_put_type(Eet_Dictionary *ed, | |||
1267 | 1267 | ||
1268 | ret = eet_basic_codec[type - 1].put(ed, src, size_ret); | 1268 | ret = eet_basic_codec[type - 1].put(ed, src, size_ret); |
1269 | return ret; | 1269 | return ret; |
1270 | } /* eet_data_put_type */ | 1270 | } |
1271 | 1271 | ||
1272 | static inline Eina_Bool | 1272 | static inline Eina_Bool |
1273 | eet_data_type_match(int type1, | 1273 | eet_data_type_match(int type1, |
@@ -1301,10 +1301,10 @@ eet_data_type_match(int type1, | |||
1301 | 1301 | ||
1302 | default: | 1302 | default: |
1303 | break; | 1303 | break; |
1304 | } /* switch */ | 1304 | } |
1305 | 1305 | ||
1306 | return EINA_FALSE; | 1306 | return EINA_FALSE; |
1307 | } /* eet_data_type_match */ | 1307 | } |
1308 | 1308 | ||
1309 | /* chunk format... | 1309 | /* chunk format... |
1310 | * | 1310 | * |
@@ -1359,7 +1359,7 @@ case EET_I_ ## Type: chnk->type = EET_T_ ## Type; break; | |||
1359 | 1359 | ||
1360 | default: | 1360 | default: |
1361 | return; | 1361 | return; |
1362 | } /* switch */ | 1362 | } |
1363 | } | 1363 | } |
1364 | else if (chnk->type > EET_T_LAST) | 1364 | else if (chnk->type > EET_T_LAST) |
1365 | { | 1365 | { |
@@ -1409,7 +1409,7 @@ case EET_I_ ## Type: chnk->type = EET_T_ ## Type; break; | |||
1409 | } | 1409 | } |
1410 | 1410 | ||
1411 | return; | 1411 | return; |
1412 | } /* eet_data_chunk_get */ | 1412 | } |
1413 | 1413 | ||
1414 | static inline Eet_Data_Chunk * | 1414 | static inline Eet_Data_Chunk * |
1415 | eet_data_chunk_new(void *data, | 1415 | eet_data_chunk_new(void *data, |
@@ -1441,7 +1441,7 @@ eet_data_chunk_new(void *data, | |||
1441 | chnk->type = type; | 1441 | chnk->type = type; |
1442 | chnk->group_type = group_type; | 1442 | chnk->group_type = group_type; |
1443 | return chnk; | 1443 | return chnk; |
1444 | } /* eet_data_chunk_new */ | 1444 | } |
1445 | 1445 | ||
1446 | static inline void | 1446 | static inline void |
1447 | eet_data_chunk_free(Eet_Data_Chunk *chnk) | 1447 | eet_data_chunk_free(Eet_Data_Chunk *chnk) |
@@ -1450,7 +1450,7 @@ eet_data_chunk_free(Eet_Data_Chunk *chnk) | |||
1450 | free(chnk->name); | 1450 | free(chnk->name); |
1451 | 1451 | ||
1452 | free(chnk); | 1452 | free(chnk); |
1453 | } /* eet_data_chunk_free */ | 1453 | } |
1454 | 1454 | ||
1455 | static inline Eet_Data_Stream * | 1455 | static inline Eet_Data_Stream * |
1456 | eet_data_stream_new(void) | 1456 | eet_data_stream_new(void) |
@@ -1462,7 +1462,7 @@ eet_data_stream_new(void) | |||
1462 | return NULL; | 1462 | return NULL; |
1463 | 1463 | ||
1464 | return ds; | 1464 | return ds; |
1465 | } /* eet_data_stream_new */ | 1465 | } |
1466 | 1466 | ||
1467 | static inline void | 1467 | static inline void |
1468 | eet_data_stream_free(Eet_Data_Stream *ds) | 1468 | eet_data_stream_free(Eet_Data_Stream *ds) |
@@ -1471,13 +1471,13 @@ eet_data_stream_free(Eet_Data_Stream *ds) | |||
1471 | free(ds->data); | 1471 | free(ds->data); |
1472 | 1472 | ||
1473 | free(ds); | 1473 | free(ds); |
1474 | } /* eet_data_stream_free */ | 1474 | } |
1475 | 1475 | ||
1476 | static inline void | 1476 | static inline void |
1477 | eet_data_stream_flush(Eet_Data_Stream *ds) | 1477 | eet_data_stream_flush(Eet_Data_Stream *ds) |
1478 | { | 1478 | { |
1479 | free(ds); | 1479 | free(ds); |
1480 | } /* eet_data_stream_flush */ | 1480 | } |
1481 | 1481 | ||
1482 | static inline void | 1482 | static inline void |
1483 | eet_data_stream_write(Eet_Data_Stream *ds, | 1483 | eet_data_stream_write(Eet_Data_Stream *ds, |
@@ -1502,7 +1502,7 @@ eet_data_stream_write(Eet_Data_Stream *ds, | |||
1502 | p = ds->data; | 1502 | p = ds->data; |
1503 | memcpy(p + ds->pos, data, size); | 1503 | memcpy(p + ds->pos, data, size); |
1504 | ds->pos += size; | 1504 | ds->pos += size; |
1505 | } /* eet_data_stream_write */ | 1505 | } |
1506 | 1506 | ||
1507 | static void | 1507 | static void |
1508 | eet_data_chunk_put(Eet_Dictionary *ed, | 1508 | eet_data_chunk_put(Eet_Dictionary *ed, |
@@ -1541,7 +1541,7 @@ case EET_T_ ## Type: type += EET_I_ ## Type; break; | |||
1541 | 1541 | ||
1542 | default: | 1542 | default: |
1543 | return; | 1543 | return; |
1544 | } /* switch */ | 1544 | } |
1545 | 1545 | ||
1546 | buf[3] = type; | 1546 | buf[3] = type; |
1547 | } | 1547 | } |
@@ -1578,7 +1578,7 @@ case EET_T_ ## Type: type += EET_I_ ## Type; break; | |||
1578 | free(string); | 1578 | free(string); |
1579 | on_error: | 1579 | on_error: |
1580 | free(size); | 1580 | free(size); |
1581 | } /* eet_data_chunk_put */ | 1581 | } |
1582 | 1582 | ||
1583 | /*---*/ | 1583 | /*---*/ |
1584 | 1584 | ||
@@ -1611,7 +1611,7 @@ _eet_descriptor_hash_new(Eet_Data_Descriptor *edd) | |||
1611 | edd->elements.hash.buckets[hash].next = bucket; | 1611 | edd->elements.hash.buckets[hash].next = bucket; |
1612 | } | 1612 | } |
1613 | } | 1613 | } |
1614 | } /* _eet_descriptor_hash_new */ | 1614 | } |
1615 | 1615 | ||
1616 | static void | 1616 | static void |
1617 | _eet_descriptor_hash_free(Eet_Data_Descriptor *edd) | 1617 | _eet_descriptor_hash_free(Eet_Data_Descriptor *edd) |
@@ -1632,7 +1632,7 @@ _eet_descriptor_hash_free(Eet_Data_Descriptor *edd) | |||
1632 | } | 1632 | } |
1633 | if (edd->elements.hash.buckets) | 1633 | if (edd->elements.hash.buckets) |
1634 | free(edd->elements.hash.buckets); | 1634 | free(edd->elements.hash.buckets); |
1635 | } /* _eet_descriptor_hash_free */ | 1635 | } |
1636 | 1636 | ||
1637 | static Eet_Data_Element * | 1637 | static Eet_Data_Element * |
1638 | _eet_descriptor_hash_find(Eet_Data_Descriptor *edd, | 1638 | _eet_descriptor_hash_find(Eet_Data_Descriptor *edd, |
@@ -1677,31 +1677,31 @@ _eet_descriptor_hash_find(Eet_Data_Descriptor *edd, | |||
1677 | bucket = bucket->next; | 1677 | bucket = bucket->next; |
1678 | } | 1678 | } |
1679 | return NULL; | 1679 | return NULL; |
1680 | } /* _eet_descriptor_hash_find */ | 1680 | } |
1681 | 1681 | ||
1682 | static void * | 1682 | static void * |
1683 | _eet_mem_alloc(size_t size) | 1683 | _eet_mem_alloc(size_t size) |
1684 | { | 1684 | { |
1685 | return calloc(1, size); | 1685 | return calloc(1, size); |
1686 | } /* _eet_mem_alloc */ | 1686 | } |
1687 | 1687 | ||
1688 | static void | 1688 | static void |
1689 | _eet_mem_free(void *mem) | 1689 | _eet_mem_free(void *mem) |
1690 | { | 1690 | { |
1691 | free(mem); | 1691 | free(mem); |
1692 | } /* _eet_mem_free */ | 1692 | } |
1693 | 1693 | ||
1694 | static char * | 1694 | static char * |
1695 | _eet_str_alloc(const char *str) | 1695 | _eet_str_alloc(const char *str) |
1696 | { | 1696 | { |
1697 | return strdup(str); | 1697 | return strdup(str); |
1698 | } /* _eet_str_alloc */ | 1698 | } |
1699 | 1699 | ||
1700 | static void | 1700 | static void |
1701 | _eet_str_free(const char *str) | 1701 | _eet_str_free(const char *str) |
1702 | { | 1702 | { |
1703 | free((char *)str); | 1703 | free((char *)str); |
1704 | } /* _eet_str_free */ | 1704 | } |
1705 | 1705 | ||
1706 | static Eina_Hash * | 1706 | static Eina_Hash * |
1707 | _eet_eina_hash_add_alloc(Eina_Hash *hash, | 1707 | _eet_eina_hash_add_alloc(Eina_Hash *hash, |
@@ -1716,7 +1716,7 @@ _eet_eina_hash_add_alloc(Eina_Hash *hash, | |||
1716 | 1716 | ||
1717 | eina_hash_add(hash, key, data); | 1717 | eina_hash_add(hash, key, data); |
1718 | return hash; | 1718 | return hash; |
1719 | } /* _eet_eina_hash_add_alloc */ | 1719 | } |
1720 | 1720 | ||
1721 | static Eina_Hash * | 1721 | static Eina_Hash * |
1722 | _eet_eina_hash_direct_add_alloc(Eina_Hash *hash, | 1722 | _eet_eina_hash_direct_add_alloc(Eina_Hash *hash, |
@@ -1731,18 +1731,18 @@ _eet_eina_hash_direct_add_alloc(Eina_Hash *hash, | |||
1731 | 1731 | ||
1732 | eina_hash_direct_add(hash, key, data); | 1732 | eina_hash_direct_add(hash, key, data); |
1733 | return hash; | 1733 | return hash; |
1734 | } /* _eet_eina_hash_direct_add_alloc */ | 1734 | } |
1735 | 1735 | ||
1736 | static char * | 1736 | static char * |
1737 | _eet_str_direct_alloc(const char *str) | 1737 | _eet_str_direct_alloc(const char *str) |
1738 | { | 1738 | { |
1739 | return (char *)str; | 1739 | return (char *)str; |
1740 | } /* _eet_str_direct_alloc */ | 1740 | } |
1741 | 1741 | ||
1742 | static void | 1742 | static void |
1743 | _eet_str_direct_free(const char *str __UNUSED__) | 1743 | _eet_str_direct_free(const char *str __UNUSED__) |
1744 | { | 1744 | { |
1745 | } /* _eet_str_direct_free */ | 1745 | } |
1746 | 1746 | ||
1747 | static void | 1747 | static void |
1748 | _eet_eina_hash_foreach(void *hash, | 1748 | _eet_eina_hash_foreach(void *hash, |
@@ -1751,14 +1751,14 @@ _eet_eina_hash_foreach(void *hash, | |||
1751 | { | 1751 | { |
1752 | if (hash) | 1752 | if (hash) |
1753 | eina_hash_foreach(hash, cb, fdata); | 1753 | eina_hash_foreach(hash, cb, fdata); |
1754 | } /* _eet_eina_hash_foreach */ | 1754 | } |
1755 | 1755 | ||
1756 | static void | 1756 | static void |
1757 | _eet_eina_hash_free(void *hash) | 1757 | _eet_eina_hash_free(void *hash) |
1758 | { | 1758 | { |
1759 | if (hash) | 1759 | if (hash) |
1760 | eina_hash_free(hash); | 1760 | eina_hash_free(hash); |
1761 | } /* _eet_eina_hash_free */ | 1761 | } |
1762 | 1762 | ||
1763 | /*---*/ | 1763 | /*---*/ |
1764 | EAPI Eina_Bool | 1764 | EAPI Eina_Bool |
@@ -1792,7 +1792,7 @@ eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, | |||
1792 | eddc->func.array_free = _eet_mem_free; | 1792 | eddc->func.array_free = _eet_mem_free; |
1793 | 1793 | ||
1794 | return EINA_TRUE; | 1794 | return EINA_TRUE; |
1795 | } /* eet_eina_stream_data_descriptor_class_set */ | 1795 | } |
1796 | 1796 | ||
1797 | EAPI Eina_Bool | 1797 | EAPI Eina_Bool |
1798 | eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, | 1798 | eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, |
@@ -1811,7 +1811,7 @@ eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, | |||
1811 | eddc->func.str_direct_free = _eet_str_direct_free; | 1811 | eddc->func.str_direct_free = _eet_str_direct_free; |
1812 | 1812 | ||
1813 | return EINA_TRUE; | 1813 | return EINA_TRUE; |
1814 | } /* eet_eina_file_data_descriptor_class_set */ | 1814 | } |
1815 | 1815 | ||
1816 | static Eet_Data_Descriptor * | 1816 | static Eet_Data_Descriptor * |
1817 | _eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, | 1817 | _eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, |
@@ -1872,7 +1872,7 @@ _eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, | |||
1872 | } | 1872 | } |
1873 | 1873 | ||
1874 | return edd; | 1874 | return edd; |
1875 | } /* _eet_data_descriptor_new */ | 1875 | } |
1876 | 1876 | ||
1877 | EAPI Eet_Data_Descriptor * | 1877 | EAPI Eet_Data_Descriptor * |
1878 | eet_data_descriptor_new(const char *name, | 1878 | eet_data_descriptor_new(const char *name, |
@@ -1905,31 +1905,31 @@ eet_data_descriptor_new(const char *name, | |||
1905 | eddc.func.hash_free = func_hash_free; | 1905 | eddc.func.hash_free = func_hash_free; |
1906 | 1906 | ||
1907 | return _eet_data_descriptor_new(&eddc, 0); | 1907 | return _eet_data_descriptor_new(&eddc, 0); |
1908 | } /* eet_data_descriptor_new */ | 1908 | } |
1909 | 1909 | ||
1910 | EAPI Eet_Data_Descriptor * | 1910 | EAPI Eet_Data_Descriptor * |
1911 | eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc) | 1911 | eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc) |
1912 | { | 1912 | { |
1913 | return _eet_data_descriptor_new(eddc, 1); | 1913 | return _eet_data_descriptor_new(eddc, 1); |
1914 | } /* eet_data_descriptor2_new */ | 1914 | } |
1915 | 1915 | ||
1916 | EAPI Eet_Data_Descriptor * | 1916 | EAPI Eet_Data_Descriptor * |
1917 | eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc) | 1917 | eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc) |
1918 | { | 1918 | { |
1919 | return _eet_data_descriptor_new(eddc, 2); | 1919 | return _eet_data_descriptor_new(eddc, 2); |
1920 | } /* eet_data_descriptor3_new */ | 1920 | } |
1921 | 1921 | ||
1922 | EAPI Eet_Data_Descriptor * | 1922 | EAPI Eet_Data_Descriptor * |
1923 | eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc) | 1923 | eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc) |
1924 | { | 1924 | { |
1925 | return _eet_data_descriptor_new(eddc, 1); | 1925 | return _eet_data_descriptor_new(eddc, 1); |
1926 | } /* eet_data_descriptor_stream_new */ | 1926 | } |
1927 | 1927 | ||
1928 | EAPI Eet_Data_Descriptor * | 1928 | EAPI Eet_Data_Descriptor * |
1929 | eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc) | 1929 | eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc) |
1930 | { | 1930 | { |
1931 | return _eet_data_descriptor_new(eddc, 2); | 1931 | return _eet_data_descriptor_new(eddc, 2); |
1932 | } /* eet_data_descriptor_file_new */ | 1932 | } |
1933 | 1933 | ||
1934 | EAPI void | 1934 | EAPI void |
1935 | eet_data_descriptor_free(Eet_Data_Descriptor *edd) | 1935 | eet_data_descriptor_free(Eet_Data_Descriptor *edd) |
@@ -1942,7 +1942,7 @@ eet_data_descriptor_free(Eet_Data_Descriptor *edd) | |||
1942 | free(edd->elements.set); | 1942 | free(edd->elements.set); |
1943 | 1943 | ||
1944 | free(edd); | 1944 | free(edd); |
1945 | } /* eet_data_descriptor_free */ | 1945 | } |
1946 | 1946 | ||
1947 | EAPI void | 1947 | EAPI void |
1948 | eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, | 1948 | eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, |
@@ -2039,7 +2039,7 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, | |||
2039 | ede->counter_name = counter_name; | 2039 | ede->counter_name = counter_name; |
2040 | 2040 | ||
2041 | ede->subtype = subtype; | 2041 | ede->subtype = subtype; |
2042 | } /* eet_data_descriptor_element_add */ | 2042 | } |
2043 | 2043 | ||
2044 | EAPI void * | 2044 | EAPI void * |
2045 | eet_data_read_cipher(Eet_File *ef, | 2045 | eet_data_read_cipher(Eet_File *ef, |
@@ -2075,7 +2075,7 @@ eet_data_read_cipher(Eet_File *ef, | |||
2075 | free((void *)data); | 2075 | free((void *)data); |
2076 | 2076 | ||
2077 | return data_dec; | 2077 | return data_dec; |
2078 | } /* eet_data_read_cipher */ | 2078 | } |
2079 | 2079 | ||
2080 | EAPI Eet_Node * | 2080 | EAPI Eet_Node * |
2081 | eet_data_node_read_cipher(Eet_File *ef, | 2081 | eet_data_node_read_cipher(Eet_File *ef, |
@@ -2110,7 +2110,7 @@ eet_data_node_read_cipher(Eet_File *ef, | |||
2110 | free((void *)data); | 2110 | free((void *)data); |
2111 | 2111 | ||
2112 | return result; | 2112 | return result; |
2113 | } /* eet_data_node_read_cipher */ | 2113 | } |
2114 | 2114 | ||
2115 | EAPI void * | 2115 | EAPI void * |
2116 | eet_data_read(Eet_File *ef, | 2116 | eet_data_read(Eet_File *ef, |
@@ -2118,7 +2118,7 @@ eet_data_read(Eet_File *ef, | |||
2118 | const char *name) | 2118 | const char *name) |
2119 | { | 2119 | { |
2120 | return eet_data_read_cipher(ef, edd, name, NULL); | 2120 | return eet_data_read_cipher(ef, edd, name, NULL); |
2121 | } /* eet_data_read */ | 2121 | } |
2122 | 2122 | ||
2123 | EAPI int | 2123 | EAPI int |
2124 | eet_data_write_cipher(Eet_File *ef, | 2124 | eet_data_write_cipher(Eet_File *ef, |
@@ -2142,7 +2142,7 @@ eet_data_write_cipher(Eet_File *ef, | |||
2142 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); | 2142 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); |
2143 | free(data_enc); | 2143 | free(data_enc); |
2144 | return val; | 2144 | return val; |
2145 | } /* eet_data_write_cipher */ | 2145 | } |
2146 | 2146 | ||
2147 | EAPI int | 2147 | EAPI int |
2148 | eet_data_write(Eet_File *ef, | 2148 | eet_data_write(Eet_File *ef, |
@@ -2152,7 +2152,7 @@ eet_data_write(Eet_File *ef, | |||
2152 | int compress) | 2152 | int compress) |
2153 | { | 2153 | { |
2154 | return eet_data_write_cipher(ef, edd, name, NULL, data, compress); | 2154 | return eet_data_write_cipher(ef, edd, name, NULL, data, compress); |
2155 | } /* eet_data_write */ | 2155 | } |
2156 | 2156 | ||
2157 | static void | 2157 | static void |
2158 | eet_free_context_init(Eet_Free_Context *context) | 2158 | eet_free_context_init(Eet_Free_Context *context) |
@@ -2222,7 +2222,7 @@ _eet_free_hash(void *data) | |||
2222 | #endif /* if defined (_WIN64) || ((!defined (_WIN32)) && (LONG_BIT != 32)) */ | 2222 | #endif /* if defined (_WIN64) || ((!defined (_WIN32)) && (LONG_BIT != 32)) */ |
2223 | 2223 | ||
2224 | return hash & 0xFF; | 2224 | return hash & 0xFF; |
2225 | } /* _eet_free_hash */ | 2225 | } |
2226 | 2226 | ||
2227 | static void | 2227 | static void |
2228 | _eet_free_add(Eet_Free *ef, | 2228 | _eet_free_add(Eet_Free *ef, |
@@ -2240,7 +2240,7 @@ _eet_free_add(Eet_Free *ef, | |||
2240 | return; | 2240 | return; |
2241 | 2241 | ||
2242 | eina_array_push(&ef->list[hash], data); | 2242 | eina_array_push(&ef->list[hash], data); |
2243 | } /* _eet_free_add */ | 2243 | } |
2244 | 2244 | ||
2245 | #if 0 | 2245 | #if 0 |
2246 | static void | 2246 | static void |
@@ -2274,19 +2274,19 @@ _eet_free_reset(Eet_Free *ef) | |||
2274 | 2274 | ||
2275 | for (i = 0; i < EET_FREE_COUNT; ++i) | 2275 | for (i = 0; i < EET_FREE_COUNT; ++i) |
2276 | eina_array_clean(&ef->list[i]); | 2276 | eina_array_clean(&ef->list[i]); |
2277 | } /* _eet_free_reset */ | 2277 | } |
2278 | 2278 | ||
2279 | static void | 2279 | static void |
2280 | _eet_free_ref(Eet_Free *ef) | 2280 | _eet_free_ref(Eet_Free *ef) |
2281 | { | 2281 | { |
2282 | ef->ref++; | 2282 | ef->ref++; |
2283 | } /* _eet_free_ref */ | 2283 | } |
2284 | 2284 | ||
2285 | static void | 2285 | static void |
2286 | _eet_free_unref(Eet_Free *ef) | 2286 | _eet_free_unref(Eet_Free *ef) |
2287 | { | 2287 | { |
2288 | ef->ref--; | 2288 | ef->ref--; |
2289 | } /* _eet_free_unref */ | 2289 | } |
2290 | 2290 | ||
2291 | #define _eet_freelist_add(Ctx, Data) _eet_free_add(&Ctx->freelist, Data); | 2291 | #define _eet_freelist_add(Ctx, Data) _eet_free_add(&Ctx->freelist, Data); |
2292 | #define _eet_freelist_del(Ctx, Data) _eet_free_del(&Ctx->freelist, Data); | 2292 | #define _eet_freelist_del(Ctx, Data) _eet_free_del(&Ctx->freelist, Data); |
@@ -2316,7 +2316,7 @@ _eet_freelist_free(Eet_Free_Context *context, | |||
2316 | free(track); | 2316 | free(track); |
2317 | } | 2317 | } |
2318 | _eet_free_reset(&context->freelist); | 2318 | _eet_free_reset(&context->freelist); |
2319 | } /* _eet_freelist_free */ | 2319 | } |
2320 | 2320 | ||
2321 | #define _eet_freelist_array_add(Ctx, Data) _eet_free_add(&Ctx->freelist_array, Data); | 2321 | #define _eet_freelist_array_add(Ctx, Data) _eet_free_add(&Ctx->freelist_array, Data); |
2322 | #define _eet_freelist_array_del(Ctx, Data) _eet_free_del(&Ctx->freelist_array, Data); | 2322 | #define _eet_freelist_array_del(Ctx, Data) _eet_free_del(&Ctx->freelist_array, Data); |
@@ -2351,7 +2351,7 @@ _eet_freelist_array_free(Eet_Free_Context *context, | |||
2351 | free(track); | 2351 | free(track); |
2352 | } | 2352 | } |
2353 | _eet_free_reset(&context->freelist_array); | 2353 | _eet_free_reset(&context->freelist_array); |
2354 | } /* _eet_freelist_array_free */ | 2354 | } |
2355 | 2355 | ||
2356 | #define _eet_freelist_list_add(Ctx, Data) _eet_free_add(&Ctx->freelist_list, Data); | 2356 | #define _eet_freelist_list_add(Ctx, Data) _eet_free_add(&Ctx->freelist_list, Data); |
2357 | #define _eet_freelist_list_del(Ctx, Data) _eet_free_del(&Ctx->freelist_list, Data); | 2357 | #define _eet_freelist_list_del(Ctx, Data) _eet_free_del(&Ctx->freelist_list, Data); |
@@ -2379,7 +2379,7 @@ _eet_freelist_list_free(Eet_Free_Context *context, | |||
2379 | edd->func.list_free(*((void **)(track))); | 2379 | edd->func.list_free(*((void **)(track))); |
2380 | } | 2380 | } |
2381 | _eet_free_reset(&context->freelist_list); | 2381 | _eet_free_reset(&context->freelist_list); |
2382 | } /* _eet_freelist_list_free */ | 2382 | } |
2383 | 2383 | ||
2384 | #define _eet_freelist_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_str, Data); | 2384 | #define _eet_freelist_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_str, Data); |
2385 | #define _eet_freelist_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_str, Data); | 2385 | #define _eet_freelist_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_str, Data); |
@@ -2409,7 +2409,7 @@ _eet_freelist_str_free(Eet_Free_Context *context, | |||
2409 | free(track); | 2409 | free(track); |
2410 | } | 2410 | } |
2411 | _eet_free_reset(&context->freelist_str); | 2411 | _eet_free_reset(&context->freelist_str); |
2412 | } /* _eet_freelist_str_free */ | 2412 | } |
2413 | 2413 | ||
2414 | #define _eet_freelist_direct_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_direct_str, Data); | 2414 | #define _eet_freelist_direct_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_direct_str, Data); |
2415 | #define _eet_freelist_direct_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_direct_str, Data); | 2415 | #define _eet_freelist_direct_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_direct_str, Data); |
@@ -2439,7 +2439,7 @@ _eet_freelist_direct_str_free(Eet_Free_Context *context, | |||
2439 | free(track); | 2439 | free(track); |
2440 | } | 2440 | } |
2441 | _eet_free_reset(&context->freelist_direct_str); | 2441 | _eet_free_reset(&context->freelist_direct_str); |
2442 | } /* _eet_freelist_direct_str_free */ | 2442 | } |
2443 | 2443 | ||
2444 | #define _eet_freelist_hash_add(Ctx, Data) _eet_free_add(&Ctx->freelist_hash, Data); | 2444 | #define _eet_freelist_hash_add(Ctx, Data) _eet_free_add(&Ctx->freelist_hash, Data); |
2445 | #define _eet_freelist_hash_del(Ctx, Data) _eet_free_del(&Ctx->freelist_hash, Data); | 2445 | #define _eet_freelist_hash_del(Ctx, Data) _eet_free_del(&Ctx->freelist_hash, Data); |
@@ -2469,7 +2469,7 @@ _eet_freelist_hash_free(Eet_Free_Context *context, | |||
2469 | free(track); | 2469 | free(track); |
2470 | } | 2470 | } |
2471 | _eet_free_reset(&context->freelist_hash); | 2471 | _eet_free_reset(&context->freelist_hash); |
2472 | } /* _eet_freelist_hash_free */ | 2472 | } |
2473 | 2473 | ||
2474 | static void | 2474 | static void |
2475 | _eet_freelist_all_ref(Eet_Free_Context *freelist_context) | 2475 | _eet_freelist_all_ref(Eet_Free_Context *freelist_context) |
@@ -2479,7 +2479,7 @@ _eet_freelist_all_ref(Eet_Free_Context *freelist_context) | |||
2479 | _eet_freelist_list_ref(freelist_context); | 2479 | _eet_freelist_list_ref(freelist_context); |
2480 | _eet_freelist_hash_ref(freelist_context); | 2480 | _eet_freelist_hash_ref(freelist_context); |
2481 | _eet_freelist_direct_str_ref(freelist_context); | 2481 | _eet_freelist_direct_str_ref(freelist_context); |
2482 | } /* _eet_freelist_all_ref */ | 2482 | } |
2483 | 2483 | ||
2484 | static void | 2484 | static void |
2485 | _eet_freelist_all_unref(Eet_Free_Context *freelist_context) | 2485 | _eet_freelist_all_unref(Eet_Free_Context *freelist_context) |
@@ -2489,7 +2489,7 @@ _eet_freelist_all_unref(Eet_Free_Context *freelist_context) | |||
2489 | _eet_freelist_list_unref(freelist_context); | 2489 | _eet_freelist_list_unref(freelist_context); |
2490 | _eet_freelist_hash_unref(freelist_context); | 2490 | _eet_freelist_hash_unref(freelist_context); |
2491 | _eet_freelist_direct_str_unref(freelist_context); | 2491 | _eet_freelist_direct_str_unref(freelist_context); |
2492 | } /* _eet_freelist_all_unref */ | 2492 | } |
2493 | 2493 | ||
2494 | static int | 2494 | static int |
2495 | eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, | 2495 | eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, |
@@ -2556,7 +2556,7 @@ eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, | |||
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | return 1; | 2558 | return 1; |
2559 | } /* eet_data_descriptor_encode_hash_cb */ | 2559 | } |
2560 | 2560 | ||
2561 | static char * | 2561 | static char * |
2562 | _eet_data_dump_token_get(const char *src, | 2562 | _eet_data_dump_token_get(const char *src, |
@@ -2639,7 +2639,7 @@ _eet_data_dump_token_get(const char *src, | |||
2639 | free(tok); | 2639 | free(tok); |
2640 | 2640 | ||
2641 | return NULL; | 2641 | return NULL; |
2642 | } /* _eet_data_dump_token_get */ | 2642 | } |
2643 | 2643 | ||
2644 | static void | 2644 | static void |
2645 | eet_data_encode(Eet_Dictionary *ed, | 2645 | eet_data_encode(Eet_Dictionary *ed, |
@@ -2663,7 +2663,7 @@ eet_data_encode(Eet_Dictionary *ed, | |||
2663 | eet_data_chunk_put(ed, echnk, ds); | 2663 | eet_data_chunk_put(ed, echnk, ds); |
2664 | eet_data_chunk_free(echnk); | 2664 | eet_data_chunk_free(echnk); |
2665 | free(data); | 2665 | free(data); |
2666 | } /* eet_data_encode */ | 2666 | } |
2667 | 2667 | ||
2668 | static void * | 2668 | static void * |
2669 | _eet_data_dump_encode(int parent_type, | 2669 | _eet_data_dump_encode(int parent_type, |
@@ -2976,7 +2976,7 @@ case Eet_Type: \ | |||
2976 | eet_data_chunk_free(chnk); | 2976 | eet_data_chunk_free(chnk); |
2977 | 2977 | ||
2978 | return cdata; | 2978 | return cdata; |
2979 | } /* _eet_data_dump_encode */ | 2979 | } |
2980 | 2980 | ||
2981 | static void * | 2981 | static void * |
2982 | _eet_data_dump_parse(Eet_Dictionary *ed, | 2982 | _eet_data_dump_parse(Eet_Dictionary *ed, |
@@ -3238,7 +3238,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed, | |||
3238 | } | 3238 | } |
3239 | 3239 | ||
3240 | return cdata; | 3240 | return cdata; |
3241 | } /* _eet_data_dump_parse */ | 3241 | } |
3242 | 3242 | ||
3243 | #define NEXT_CHUNK(P, Size, Echnk, Ed) \ | 3243 | #define NEXT_CHUNK(P, Size, Echnk, Ed) \ |
3244 | { \ | 3244 | { \ |
@@ -3352,7 +3352,7 @@ _eet_data_descriptor_decode(Eet_Free_Context *context, | |||
3352 | case EET_G_VARIANT: | 3352 | case EET_G_VARIANT: |
3353 | default: | 3353 | default: |
3354 | goto error; | 3354 | goto error; |
3355 | } /* switch */ | 3355 | } |
3356 | } | 3356 | } |
3357 | 3357 | ||
3358 | while (size > 0) | 3358 | while (size > 0) |
@@ -3477,7 +3477,7 @@ error: | |||
3477 | 3477 | ||
3478 | /* FIXME: Warn that something goes wrong here. */ | 3478 | /* FIXME: Warn that something goes wrong here. */ |
3479 | return NULL; | 3479 | return NULL; |
3480 | } /* _eet_data_descriptor_decode */ | 3480 | } |
3481 | 3481 | ||
3482 | static int | 3482 | static int |
3483 | eet_data_get_list(Eet_Free_Context *context, | 3483 | eet_data_get_list(Eet_Free_Context *context, |
@@ -3544,7 +3544,7 @@ eet_data_get_list(Eet_Free_Context *context, | |||
3544 | 3544 | ||
3545 | on_error: | 3545 | on_error: |
3546 | return 0; | 3546 | return 0; |
3547 | } /* eet_data_get_list */ | 3547 | } |
3548 | 3548 | ||
3549 | static int | 3549 | static int |
3550 | eet_data_get_hash(Eet_Free_Context *context, | 3550 | eet_data_get_hash(Eet_Free_Context *context, |
@@ -3629,7 +3629,7 @@ eet_data_get_hash(Eet_Free_Context *context, | |||
3629 | 3629 | ||
3630 | on_error: | 3630 | on_error: |
3631 | return 0; | 3631 | return 0; |
3632 | } /* eet_data_get_hash */ | 3632 | } |
3633 | 3633 | ||
3634 | /* var arrays and fixed arrays have to | 3634 | /* var arrays and fixed arrays have to |
3635 | * get all chunks at once. for fixed arrays | 3635 | * get all chunks at once. for fixed arrays |
@@ -3793,7 +3793,7 @@ on_error: | |||
3793 | eet_node_del(tmp); | 3793 | eet_node_del(tmp); |
3794 | 3794 | ||
3795 | return 0; | 3795 | return 0; |
3796 | } /* eet_data_get_array */ | 3796 | } |
3797 | 3797 | ||
3798 | static void | 3798 | static void |
3799 | eet_data_put_union(Eet_Dictionary *ed, | 3799 | eet_data_put_union(Eet_Dictionary *ed, |
@@ -3849,7 +3849,7 @@ eet_data_put_union(Eet_Dictionary *ed, | |||
3849 | 3849 | ||
3850 | break; | 3850 | break; |
3851 | } | 3851 | } |
3852 | } /* eet_data_put_union */ | 3852 | } |
3853 | 3853 | ||
3854 | static int | 3854 | static int |
3855 | eet_data_get_union(Eet_Free_Context *context, | 3855 | eet_data_get_union(Eet_Free_Context *context, |
@@ -3947,7 +3947,7 @@ eet_data_get_union(Eet_Free_Context *context, | |||
3947 | 3947 | ||
3948 | on_error: | 3948 | on_error: |
3949 | return 0; | 3949 | return 0; |
3950 | } /* eet_data_get_union */ | 3950 | } |
3951 | 3951 | ||
3952 | static void | 3952 | static void |
3953 | eet_data_put_variant(Eet_Dictionary *ed, | 3953 | eet_data_put_variant(Eet_Dictionary *ed, |
@@ -4058,7 +4058,7 @@ eet_data_put_variant(Eet_Dictionary *ed, | |||
4058 | 4058 | ||
4059 | break; | 4059 | break; |
4060 | } | 4060 | } |
4061 | } /* eet_data_put_variant */ | 4061 | } |
4062 | 4062 | ||
4063 | static int | 4063 | static int |
4064 | eet_data_get_variant(Eet_Free_Context *context, | 4064 | eet_data_get_variant(Eet_Free_Context *context, |
@@ -4213,7 +4213,7 @@ eet_data_get_variant(Eet_Free_Context *context, | |||
4213 | 4213 | ||
4214 | on_error: | 4214 | on_error: |
4215 | return 0; | 4215 | return 0; |
4216 | } /* eet_data_get_variant */ | 4216 | } |
4217 | 4217 | ||
4218 | static Eet_Node * | 4218 | static Eet_Node * |
4219 | eet_data_node_simple_type(int type, | 4219 | eet_data_node_simple_type(int type, |
@@ -4249,8 +4249,8 @@ case Eet_Type: \ | |||
4249 | default: | 4249 | default: |
4250 | ERR("Unknow type passed to eet_data_node_simple_type"); | 4250 | ERR("Unknow type passed to eet_data_node_simple_type"); |
4251 | return NULL; | 4251 | return NULL; |
4252 | } /* switch */ | 4252 | } |
4253 | } /* eet_data_node_simple_type */ | 4253 | } |
4254 | 4254 | ||
4255 | static int | 4255 | static int |
4256 | eet_data_get_unknown(Eet_Free_Context *context, | 4256 | eet_data_get_unknown(Eet_Free_Context *context, |
@@ -4366,7 +4366,7 @@ eet_data_get_unknown(Eet_Free_Context *context, | |||
4366 | } | 4366 | } |
4367 | 4367 | ||
4368 | return 1; | 4368 | return 1; |
4369 | } /* eet_data_get_unknown */ | 4369 | } |
4370 | 4370 | ||
4371 | static void | 4371 | static void |
4372 | eet_data_put_array(Eet_Dictionary *ed, | 4372 | eet_data_put_array(Eet_Dictionary *ed, |
@@ -4442,7 +4442,7 @@ eet_data_put_array(Eet_Dictionary *ed, | |||
4442 | 4442 | ||
4443 | offset += subsize; | 4443 | offset += subsize; |
4444 | } | 4444 | } |
4445 | } /* eet_data_put_array */ | 4445 | } |
4446 | 4446 | ||
4447 | static void | 4447 | static void |
4448 | eet_data_put_unknown(Eet_Dictionary *ed, | 4448 | eet_data_put_unknown(Eet_Dictionary *ed, |
@@ -4471,7 +4471,7 @@ eet_data_put_unknown(Eet_Dictionary *ed, | |||
4471 | size, | 4471 | size, |
4472 | ede->type, | 4472 | ede->type, |
4473 | ede->group_type); | 4473 | ede->group_type); |
4474 | } /* eet_data_put_unknown */ | 4474 | } |
4475 | 4475 | ||
4476 | static void | 4476 | static void |
4477 | eet_data_put_list(Eet_Dictionary *ed, | 4477 | eet_data_put_list(Eet_Dictionary *ed, |
@@ -4512,7 +4512,7 @@ eet_data_put_list(Eet_Dictionary *ed, | |||
4512 | ede->group_type); | 4512 | ede->group_type); |
4513 | } | 4513 | } |
4514 | } | 4514 | } |
4515 | } /* eet_data_put_list */ | 4515 | } |
4516 | 4516 | ||
4517 | static void | 4517 | static void |
4518 | eet_data_put_hash(Eet_Dictionary *ed, | 4518 | eet_data_put_hash(Eet_Dictionary *ed, |
@@ -4529,7 +4529,7 @@ eet_data_put_hash(Eet_Dictionary *ed, | |||
4529 | fdata.ede = ede; | 4529 | fdata.ede = ede; |
4530 | fdata.ed = ed; | 4530 | fdata.ed = ed; |
4531 | edd->func.hash_foreach(l, eet_data_descriptor_encode_hash_cb, &fdata); | 4531 | edd->func.hash_foreach(l, eet_data_descriptor_encode_hash_cb, &fdata); |
4532 | } /* eet_data_put_hash */ | 4532 | } |
4533 | 4533 | ||
4534 | EAPI int | 4534 | EAPI int |
4535 | eet_data_dump_cipher(Eet_File *ef, | 4535 | eet_data_dump_cipher(Eet_File *ef, |
@@ -4570,7 +4570,7 @@ eet_data_dump_cipher(Eet_File *ef, | |||
4570 | free((void *)data); | 4570 | free((void *)data); |
4571 | 4571 | ||
4572 | return result ? 1 : 0; | 4572 | return result ? 1 : 0; |
4573 | } /* eet_data_dump_cipher */ | 4573 | } |
4574 | 4574 | ||
4575 | EAPI int | 4575 | EAPI int |
4576 | eet_data_dump(Eet_File *ef, | 4576 | eet_data_dump(Eet_File *ef, |
@@ -4579,7 +4579,7 @@ eet_data_dump(Eet_File *ef, | |||
4579 | void *dumpdata) | 4579 | void *dumpdata) |
4580 | { | 4580 | { |
4581 | return eet_data_dump_cipher(ef, name, NULL, dumpfunc, dumpdata); | 4581 | return eet_data_dump_cipher(ef, name, NULL, dumpfunc, dumpdata); |
4582 | } /* eet_data_dump */ | 4582 | } |
4583 | 4583 | ||
4584 | EAPI int | 4584 | EAPI int |
4585 | eet_data_text_dump_cipher(const void *data_in, | 4585 | eet_data_text_dump_cipher(const void *data_in, |
@@ -4624,7 +4624,7 @@ eet_data_text_dump_cipher(const void *data_in, | |||
4624 | free(ret); | 4624 | free(ret); |
4625 | 4625 | ||
4626 | return result ? 1 : 0; | 4626 | return result ? 1 : 0; |
4627 | } /* eet_data_text_dump_cipher */ | 4627 | } |
4628 | 4628 | ||
4629 | EAPI int | 4629 | EAPI int |
4630 | eet_data_text_dump(const void *data_in, | 4630 | eet_data_text_dump(const void *data_in, |
@@ -4633,7 +4633,7 @@ eet_data_text_dump(const void *data_in, | |||
4633 | void *dumpdata) | 4633 | void *dumpdata) |
4634 | { | 4634 | { |
4635 | return eet_data_text_dump_cipher(data_in, NULL, size_in, dumpfunc, dumpdata); | 4635 | return eet_data_text_dump_cipher(data_in, NULL, size_in, dumpfunc, dumpdata); |
4636 | } /* eet_data_text_dump */ | 4636 | } |
4637 | 4637 | ||
4638 | EAPI void * | 4638 | EAPI void * |
4639 | eet_data_text_undump_cipher(const char *text, | 4639 | eet_data_text_undump_cipher(const char *text, |
@@ -4666,7 +4666,7 @@ eet_data_text_undump_cipher(const char *text, | |||
4666 | } | 4666 | } |
4667 | 4667 | ||
4668 | return ret; | 4668 | return ret; |
4669 | } /* eet_data_text_undump_cipher */ | 4669 | } |
4670 | 4670 | ||
4671 | EAPI void * | 4671 | EAPI void * |
4672 | eet_data_text_undump(const char *text, | 4672 | eet_data_text_undump(const char *text, |
@@ -4674,7 +4674,7 @@ eet_data_text_undump(const char *text, | |||
4674 | int *size_ret) | 4674 | int *size_ret) |
4675 | { | 4675 | { |
4676 | return eet_data_text_undump_cipher(text, NULL, textlen, size_ret); | 4676 | return eet_data_text_undump_cipher(text, NULL, textlen, size_ret); |
4677 | } /* eet_data_text_undump */ | 4677 | } |
4678 | 4678 | ||
4679 | EAPI int | 4679 | EAPI int |
4680 | eet_data_undump_cipher(Eet_File *ef, | 4680 | eet_data_undump_cipher(Eet_File *ef, |
@@ -4698,7 +4698,7 @@ eet_data_undump_cipher(Eet_File *ef, | |||
4698 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); | 4698 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); |
4699 | free(data_enc); | 4699 | free(data_enc); |
4700 | return val; | 4700 | return val; |
4701 | } /* eet_data_undump_cipher */ | 4701 | } |
4702 | 4702 | ||
4703 | EAPI int | 4703 | EAPI int |
4704 | eet_data_undump(Eet_File *ef, | 4704 | eet_data_undump(Eet_File *ef, |
@@ -4708,7 +4708,7 @@ eet_data_undump(Eet_File *ef, | |||
4708 | int compress) | 4708 | int compress) |
4709 | { | 4709 | { |
4710 | return eet_data_undump_cipher(ef, name, NULL, text, textlen, compress); | 4710 | return eet_data_undump_cipher(ef, name, NULL, text, textlen, compress); |
4711 | } /* eet_data_undump */ | 4711 | } |
4712 | 4712 | ||
4713 | EAPI void * | 4713 | EAPI void * |
4714 | eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, | 4714 | eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, |
@@ -4744,7 +4744,7 @@ eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, | |||
4744 | free(deciphered); | 4744 | free(deciphered); |
4745 | 4745 | ||
4746 | return ret; | 4746 | return ret; |
4747 | } /* eet_data_descriptor_decode_cipher */ | 4747 | } |
4748 | 4748 | ||
4749 | EAPI void * | 4749 | EAPI void * |
4750 | eet_data_descriptor_decode(Eet_Data_Descriptor *edd, | 4750 | eet_data_descriptor_decode(Eet_Data_Descriptor *edd, |
@@ -4752,7 +4752,7 @@ eet_data_descriptor_decode(Eet_Data_Descriptor *edd, | |||
4752 | int size_in) | 4752 | int size_in) |
4753 | { | 4753 | { |
4754 | return eet_data_descriptor_decode_cipher(edd, data_in, NULL, size_in); | 4754 | return eet_data_descriptor_decode_cipher(edd, data_in, NULL, size_in); |
4755 | } /* eet_data_descriptor_decode */ | 4755 | } |
4756 | 4756 | ||
4757 | EAPI Eet_Node * | 4757 | EAPI Eet_Node * |
4758 | eet_data_node_decode_cipher(const void *data_in, | 4758 | eet_data_node_decode_cipher(const void *data_in, |
@@ -4787,7 +4787,7 @@ eet_data_node_decode_cipher(const void *data_in, | |||
4787 | free(deciphered); | 4787 | free(deciphered); |
4788 | 4788 | ||
4789 | return ret; | 4789 | return ret; |
4790 | } /* eet_data_node_decode_cipher */ | 4790 | } |
4791 | 4791 | ||
4792 | static void * | 4792 | static void * |
4793 | _eet_data_descriptor_encode(Eet_Dictionary *ed, | 4793 | _eet_data_descriptor_encode(Eet_Dictionary *ed, |
@@ -4849,7 +4849,7 @@ _eet_data_descriptor_encode(Eet_Dictionary *ed, | |||
4849 | eet_data_chunk_free(chnk); | 4849 | eet_data_chunk_free(chnk); |
4850 | 4850 | ||
4851 | return cdata; | 4851 | return cdata; |
4852 | } /* _eet_data_descriptor_encode */ | 4852 | } |
4853 | 4853 | ||
4854 | EAPI int | 4854 | EAPI int |
4855 | eet_data_node_write_cipher(Eet_File *ef, | 4855 | eet_data_node_write_cipher(Eet_File *ef, |
@@ -4872,7 +4872,7 @@ eet_data_node_write_cipher(Eet_File *ef, | |||
4872 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); | 4872 | val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); |
4873 | free(data_enc); | 4873 | free(data_enc); |
4874 | return val; | 4874 | return val; |
4875 | } /* eet_data_node_write_cipher */ | 4875 | } |
4876 | 4876 | ||
4877 | EAPI void * | 4877 | EAPI void * |
4878 | eet_data_node_encode_cipher(Eet_Node *node, | 4878 | eet_data_node_encode_cipher(Eet_Node *node, |
@@ -4909,7 +4909,7 @@ eet_data_node_encode_cipher(Eet_Node *node, | |||
4909 | *size_ret = size; | 4909 | *size_ret = size; |
4910 | 4910 | ||
4911 | return ret; | 4911 | return ret; |
4912 | } /* eet_data_node_encode_cipher */ | 4912 | } |
4913 | 4913 | ||
4914 | EAPI void * | 4914 | EAPI void * |
4915 | eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, | 4915 | eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, |
@@ -4947,7 +4947,7 @@ eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, | |||
4947 | *size_ret = size; | 4947 | *size_ret = size; |
4948 | 4948 | ||
4949 | return ret; | 4949 | return ret; |
4950 | } /* eet_data_descriptor_encode_cipher */ | 4950 | } |
4951 | 4951 | ||
4952 | EAPI void * | 4952 | EAPI void * |
4953 | eet_data_descriptor_encode(Eet_Data_Descriptor *edd, | 4953 | eet_data_descriptor_encode(Eet_Data_Descriptor *edd, |
@@ -4955,7 +4955,7 @@ eet_data_descriptor_encode(Eet_Data_Descriptor *edd, | |||
4955 | int *size_ret) | 4955 | int *size_ret) |
4956 | { | 4956 | { |
4957 | return eet_data_descriptor_encode_cipher(edd, data_in, NULL, size_ret); | 4957 | return eet_data_descriptor_encode_cipher(edd, data_in, NULL, size_ret); |
4958 | } /* eet_data_descriptor_encode */ | 4958 | } |
4959 | 4959 | ||
4960 | EAPI void * | 4960 | EAPI void * |
4961 | eet_data_xattr_cipher_get(const char *filename, | 4961 | eet_data_xattr_cipher_get(const char *filename, |