#define SYSTEM_RESUME "system_wakeup"
-#define TIME_FONT_SIZE_24 ELM_SCALE_SIZE(14)
-#define TIME_FONT_SIZE_12 ELM_SCALE_SIZE(14)
-#define AMPM_FONT_SIZE ELM_SCALE_SIZE(13)
+#define TIME_FONT_SIZE_24 ELM_SCALE_SIZE(30)
+#define TIME_FONT_SIZE_12 ELM_SCALE_SIZE(30)
+#define AMPM_FONT_SIZE ELM_SCALE_SIZE(29)
#define TIME_FONT_COLOR 200, 200, 200, 255
#define AMPM_FONT_COLOR 200, 200, 200, 255
/* Set time */
ctime = time(NULL);
- ts = localtime(&ctime);
+ localtime_r(&ctime, ts);
if (ts == NULL) {
_E("Fail to get localtime !");
return;
static int unregister_clock_module(void)
{
- int ret;
+ int ret = 0;
//ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED);
ret = ret | vconf_ignore_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, regionformat_changed);
int idx = 0;
int out_idx = 0;
int out_sz = 0;
+ int replace_len = 0;
+
enum {
STATE_START,
STATE_FIND,
return NULL;
}
+ replace_len = strlen(replace);
+ if (replace_len) {
+ ERR("Ratio");
+ return NULL;
+ }
+
out_idx = 0;
for (state = STATE_START, ptr = src; state != STATE_END; ptr++) {
switch (state) {
* If there is no space for copying the replacement,
* Extend size of the return buffer.
*/
- if (out_sz - out_idx < strlen(replace) + 1) {
+ if (out_sz - out_idx < replace_len + 1) {
tmp = _extend_heap(ret, &out_sz, strlen(replace) + 1);
if (!tmp) {
free(ret);
ret = tmp;
}
- strcpy(ret + out_idx, replace);
+ strncpy(ret + out_idx, replace, replace_len);
out_idx += strlen(replace);
state = STATE_FIND;
if(clock_mode == INDICATOR_CLOCK_MODE_12H)
{
- strcpy(time_skeleton,"hm");
+ strncpy(time_skeleton,"hm", 2);
}
else
{
- strcpy(time_skeleton,"Hm");
+ strncpy(time_skeleton,"Hm", 2);
}
char* timezone_id = NULL;
timezone_id = util_get_timezone_str();
bestPatternCapacity, &status);
char a_best_pattern[64] = {0,};
+ char *last_pattern = NULL;
u_austrcpy(a_best_pattern, bestPattern);
- char *a_best_pattern_fixed = strtok(a_best_pattern, "a");
- a_best_pattern_fixed = strtok(a_best_pattern_fixed, " ");
+ char *a_best_pattern_fixed = strtok_r(a_best_pattern, "a", &last_pattern);
+ a_best_pattern_fixed = strtok_r(a_best_pattern_fixed, " ", &last_pattern);
if(a_best_pattern_fixed)
{
u_uastrcpy(bestPattern, a_best_pattern_fixed);