evas: change way of searching for Escape strings/values in textblock
authorAli Alzyod <ali198724@gmail.com>
Tue, 23 Apr 2019 16:52:55 +0000 (16:52 +0000)
committerWoochanlee <wc0917.lee@samsung.com>
Tue, 30 Apr 2019 00:55:10 +0000 (09:55 +0900)
commit039281e5c38b9b3ddb77d0a320c219b66600f1a5
treea68cfdb11952ba708fe84449e1454cf35e334795
parent80831b3f432d3e41ef8f5c8538b4988108317a54
evas: change way of searching for Escape strings/values in textblock

Instead of using old way for linear search for Escape Strings or Escape values, we will sort these values and string in compile time then binary search them.

In simple words:
Instead of having one array with pair of {escapeChar,escapeValue} and linear search it.
We will have two arrays with pair of {escapeChar,escapeValue}, one with escapeChar Sorted, and one with escapeValue sorted.
and we will use one of the array to binary search escape chars, and use the other to binary search escape values,

1- This will increase the speed for the search a lot for both Escape characters and Escape values.
2- Make code more easy to understand and trace
3- This will also fix bug for

```
int value;
const char * value = evas_textblock_string_escape_get("",&value)
//because of some unhanded case in previous code, this will return "&qout;" , which is first element in predefined escape character array
```

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8610
src/lib/evas/canvas/evas_object_textblock.c