diff --git a/doc/ephysics_examples.dox b/doc/ephysics_examples.dox index 6d99ed78ee..ba509b05f7 100644 --- a/doc/ephysics_examples.dox +++ b/doc/ephysics_examples.dox @@ -297,7 +297,7 @@ * The purpose of this example is to demonstrate the EPhysics_Camera usage. * * The EPhysics_Camera facilitates the usage of scenarios bigger than the - * viewport, thats because the EPhysics handles the position of objects + * viewport, that's because the EPhysics handles the position of objects * which has control. * * @image html camera.png @@ -426,7 +426,7 @@ * usage. * * The EPhysics_Camera facilitates the usage of scenarios bigger than the - * viewport, thats because the EPhysics handles the position of objects + * viewport, that's because the EPhysics handles the position of objects * which has control. * * @image html camera_track.png diff --git a/old/ChangeLog.evas b/old/ChangeLog.evas index 3bc62e3d22..4b81090e92 100644 --- a/old/ChangeLog.evas +++ b/old/ChangeLog.evas @@ -296,7 +296,7 @@ 2011-05-04 Carsten Haitzler (The Rasterman) - * Improved table layout for homogenous mode to handle not column + * Improved table layout for homogeneous mode to handle not column or row multiple sized table better. 2011-05-04 Jiyoun Park diff --git a/old/NEWS.evas b/old/NEWS.evas index 3271bbe905..3cc32ad5fa 100644 --- a/old/NEWS.evas +++ b/old/NEWS.evas @@ -240,7 +240,7 @@ Improvements: * speed and memory usage of textblock * cache handler to also use file size, mode and sub-second timestamp * textblock to re-layout only paragraphs that have changed - * homogenous table layout alignment and sizing + * homogeneous table layout alignment and sizing * textblock linebreaking by using liblinebreak * image loader to drop out instantly if image file is a directory * object allocation to use mempools diff --git a/src/bin/elementary/test_factory.c b/src/bin/elementary/test_factory.c index daae81b63d..71ca204023 100644 --- a/src/bin/elementary/test_factory.c +++ b/src/bin/elementary/test_factory.c @@ -5,7 +5,7 @@ // 16 ^ 4 = 65k #define BLOK 16 -// homogenous layout +// homogeneous layout //#define HOMOG 1 // aligned to top of box #define ZEROALIGN 1 diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index 9f50bd2afc..df102b35b8 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -4701,7 +4701,7 @@ _edje_embryo_test_run(Edje *ed, Edje_Program *pr, const char *sig, const char *s pdata = embryo_program_data_get(ed->collection->script); embryo_program_data_set(ed->collection->script, ed); /* 5 million instructions is an arbitrary number. on my p4-2.6 here */ - /* IF embryo is ONLY running embryo stuff and NO native calls thats */ + /* IF embryo is ONLY running embryo stuff and NO native calls that's */ /* about 0.016 seconds, and longer on slower cpu's. if a simple */ /* embryo script snippet hasn't managed to do its work in 5 MILLION */ /* embryo virtual machine instructions - something is wrong, or */ diff --git a/src/lib/edje/edje_match.c b/src/lib/edje/edje_match.c index c58c91e53d..021a891856 100644 --- a/src/lib/edje/edje_match.c +++ b/src/lib/edje/edje_match.c @@ -478,7 +478,7 @@ edje_match_programs_exec_check_finals(const unsigned int *signal_finals, unsigned int i; unsigned int j; - /* when not enought memory, they could be NULL */ + /* when not enough memory, they could be NULL */ if (!signal_finals || !source_finals) return EINA_TRUE; for (i = 0; i < signal_states->size; ++i) diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h index c3016d9b67..ef7832914c 100644 --- a/src/lib/eet/Eet.h +++ b/src/lib/eet/Eet.h @@ -932,7 +932,7 @@ eet_list(Eet_File *ef, * @ingroup Eet_File_Group * @brief Returns an iterator that will describe each entry of an Eet_File. * @param ef A valid eet file handle. - * @return An interator of Eet_Entry. + * @return An iterator of Eet_Entry. * * @since 1.8.0 */ diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c index 8a02f1f79b..df476921f2 100644 --- a/src/lib/efl/interfaces/efl_gfx_path.c +++ b/src/lib/efl/interfaces/efl_gfx_path.c @@ -683,7 +683,7 @@ _efl_gfx_path_append_arc_to(Eo *obj, Efl_Gfx_Path_Data *pd, cy += (sy + y) / 2.0; // step 4 (F6.5.4) - // we dont' use arccos (as per w3c doc), see + // we don't use arccos (as per w3c doc), see // http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm // note: atan2 (0.0, 1.0) == 0.0 at = atan2(((y1p - cyp) / ry), ((x1p - cxp) / rx)); @@ -1108,18 +1108,16 @@ _efl_gfx_path_append_rect(Eo *obj, Efl_Gfx_Path_Data *pd, } // clamp the rx and ry radius value. + rx = 2*rx; + ry = 2*ry; if (rx > w) rx = w; if (ry > h) ry = h; - _efl_gfx_path_append_move_to(obj, pd, x + rx, y); - _efl_gfx_path_append_line_to(obj, pd, x + (w - rx), y); - _efl_gfx_path_append_quadratic_to(obj, pd, x + w, y + ry, x + w, y); - _efl_gfx_path_append_line_to(obj, pd, x + w, y + (h - ry)); - _efl_gfx_path_append_quadratic_to(obj, pd, x + (w - rx), y + h, x + w, y + h); - _efl_gfx_path_append_line_to(obj, pd, x + rx, y + h); - _efl_gfx_path_append_quadratic_to(obj, pd, x , y + (h - ry), x, y + h); - _efl_gfx_path_append_line_to(obj, pd, x, y + ry); - _efl_gfx_path_append_quadratic_to(obj, pd, x + rx, y, x, y); + _efl_gfx_path_append_move_to(obj, pd, x, y + h/2); + _efl_gfx_path_append_arc(obj, pd, x, y + h - ry, rx, ry, 180, 90); + _efl_gfx_path_append_arc(obj, pd, x + w - rx, y + h - ry, rx, ry, 270, 90); + _efl_gfx_path_append_arc(obj, pd, x + w - rx, y, rx, ry, 0, 90); + _efl_gfx_path_append_arc(obj, pd, x, y, rx, ry, 90, 90); _efl_gfx_path_append_close(obj, pd); //update convex flag diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c index e45cb678b4..890934fc22 100644 --- a/src/lib/efreet/efreet_menu.c +++ b/src/lib/efreet/efreet_menu.c @@ -65,7 +65,7 @@ struct Efreet_Menu_Internal Eina_List *layout; /**< This menus layout */ Eina_List *default_layout; /**< Default layout */ signed char show_empty; /**< Whether to show empty menus */ - signed char in_line; /**< Whether this meny can be inlined */ + signed char in_line; /**< Whether this menu can be inlined */ signed char inline_limit; /**< Number of elements which triggers inline */ signed char inline_header; /**< Whether we should use the header name when this menu is inlined */ signed char inline_alias; /**< Whether we should use the menu name when inlining */ @@ -143,7 +143,7 @@ struct Efreet_Menu_Layout /* The items below are for Menuname Layout elements */ signed char show_empty; /**< Whether to show empty menus */ - signed char in_line; /**< Whether this meny can be inlined */ + signed char in_line; /**< Whether this menu can be inlined */ signed char inline_limit; /**< Number of elements which triggers inline */ signed char inline_header; /**< Whether we should use the header name when this menu is inlined */ signed char inline_alias; /**< Whether we should use the menu name when inlining */ diff --git a/src/lib/eina/eina_error.c b/src/lib/eina/eina_error.c index 7922933e59..b9f05a5a9d 100644 --- a/src/lib/eina/eina_error.c +++ b/src/lib/eina/eina_error.c @@ -115,7 +115,13 @@ _eina_error_msg_alloc(void) /* Windows has strerror_s(), similar to POSIX strerror_r() */ static inline int strerror_r(int errnum, char *buf, size_t buflen) { - return strerror_s(buf, buflen, errnum); + int ret; + + ret = strerror_s(buf, buflen, errnum); + if (strcmp(buf, "Unknown error") == 0) + snprintf(buf, buflen, "Unknown error %d", errnum); + + return ret; } #endif diff --git a/src/lib/eina/eina_file_common.h b/src/lib/eina/eina_file_common.h index 9aedfae755..16fb772c4d 100644 --- a/src/lib/eina/eina_file_common.h +++ b/src/lib/eina/eina_file_common.h @@ -124,6 +124,9 @@ struct _Eina_File_Map Eina_Bool hugetlb : 1; /**< Indicates if we are using HugeTLB */ Eina_Bool faulty : 1; /**< Indicates if this region was not mapped correctly (i.e. the call to mmap(2) failed). */ +#ifdef _WIN32 + void *ret; /**< A pointer to the mapped region */ +#endif }; /** diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c index ca8e78b83e..46449fdb57 100644 --- a/src/lib/eina/eina_file_win32.c +++ b/src/lib/eina/eina_file_win32.c @@ -900,7 +900,7 @@ eina_file_map_new(Eina_File *file, Eina_File_Populate rule, if (offset + length > file->length) return NULL; - if (offset == 0 && length == file->length) + if (offset == 0UL && length == file->length) return eina_file_map_all(file, rule); if (file->virtual) @@ -914,40 +914,56 @@ eina_file_map_new(Eina_File *file, Eina_File_Populate rule, map = eina_hash_find(file->map, &key); if (!map) { + SYSTEM_INFO si; HANDLE fm; + __int64 map_size; + DWORD view_offset; + DWORD view_length; + DWORD granularity; + map = malloc(sizeof (Eina_File_Map)); if (!map) - { - eina_lock_release(&file->lock); - return NULL; - } + goto on_error; - /* the length parameter is unsigned long, that is a DWORD */ - /* so the max size high parameter of CreateFileMapping is 0 */ + /* + * the size of the mapping object is the offset plus the length, + * which might be greater than a DWORD + */ + map_size = (__int64)offset + (__int64)length; fm = CreateFileMapping(file->handle, NULL, PAGE_READONLY, - 0, (DWORD)length, NULL); + (DWORD)((map_size >> 32) & 0x00000000ffffffffULL), + (DWORD)(map_size & 0x00000000ffffffffULL), + NULL); if (!fm) - return NULL; + goto on_error; + /* + * get the system allocation granularity as the + * offset passed to MapViewOfFile() must be a + * multiple of this granularity + */ + GetSystemInfo(&si); + granularity = si.dwAllocationGranularity; + + /* + * view_offset is the greatest multiple of granularity, less or equal + * than offset (and can be stored in a DWORD) + */ + view_offset = (offset / granularity) * granularity; + view_length = (offset - view_offset) + length; map->map = MapViewOfFile(fm, FILE_MAP_READ, - offset & 0xffff0000, - offset & 0x0000ffff, - length); + 0, + view_offset, + view_length); CloseHandle(fm); if (!map->map) - map->map = MAP_FAILED; + goto on_error; + map->ret = (unsigned char *)map->map + (offset - view_offset); map->offset = offset; map->length = length; map->refcount = 0; - if (map->map == MAP_FAILED) - { - free(map); - eina_lock_release(&file->lock); - return NULL; - } - eina_hash_add(file->map, &key, map); eina_hash_direct_add(file->rmap, map->map, map); } @@ -956,7 +972,13 @@ eina_file_map_new(Eina_File *file, Eina_File_Populate rule, eina_lock_release(&file->lock); - return map->map; + return map->ret; + + on_error: + free(map); + eina_lock_release(&file->lock); + + return NULL; } EAPI void diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x index 8367d61e7b..a78b674edd 100644 --- a/src/lib/eina/eina_inline_array.x +++ b/src/lib/eina/eina_inline_array.x @@ -44,16 +44,13 @@ EAPI Eina_Bool eina_array_grow(Eina_Array *array); static inline Eina_Bool eina_array_push(Eina_Array *array, const void *data) { - if (data) - { - if (EINA_UNLIKELY((array->count + 1) > array->total)) goto do_grow; + if (EINA_UNLIKELY(data == NULL)) return EINA_FALSE; + if (EINA_UNLIKELY((array->count + 1) > array->total)) goto do_grow; do_grow_back: - array->data[array->count++] = (void*) data; + array->data[array->count++] = (void*) data; - return EINA_TRUE; - } - return EINA_FALSE; + return EINA_TRUE; do_grow: if (!eina_array_grow(array)) return EINA_FALSE; goto do_grow_back; diff --git a/src/lib/eio/eio_file.c b/src/lib/eio/eio_file.c index d66b035404..ae36d50ac7 100644 --- a/src/lib/eio/eio_file.c +++ b/src/lib/eio/eio_file.c @@ -769,7 +769,7 @@ eio_file_associate_add(Eio_File *ls, { EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); - /* FIXME: Check if we are in the right worker thred */ + /* FIXME: Check if we are in the right worker thread */ if (!ls->worker.associated) ls->worker.associated = eina_hash_string_small_new(eio_associate_free); @@ -785,7 +785,7 @@ eio_file_associate_direct_add(Eio_File *ls, { EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); - /* FIXME: Check if we are in the right worker thred */ + /* FIXME: Check if we are in the right worker thread */ if (!ls->worker.associated) ls->worker.associated = eina_hash_string_small_new(eio_associate_free); diff --git a/src/lib/eio/eio_private.h b/src/lib/eio/eio_private.h index e8f9c856a4..3fd2c09237 100644 --- a/src/lib/eio/eio_private.h +++ b/src/lib/eio/eio_private.h @@ -53,7 +53,7 @@ typedef struct stat _eio_stat_t; # include #endif -/* Keeping 8 Eio_File_Progress alive should be enought */ +/* Keeping 8 Eio_File_Progress alive should be enough */ #define EIO_PROGRESS_LIMIT 8 /* Huge TLB == 16M on most system */ diff --git a/src/lib/eldbus/Eldbus.h b/src/lib/eldbus/Eldbus.h index 808084231e..d307c384ed 100644 --- a/src/lib/eldbus/Eldbus.h +++ b/src/lib/eldbus/Eldbus.h @@ -21,7 +21,7 @@ * *