{
if (!d->app_num)
{
- sprintf(path, "%s/touch_sample", SAMPLE_PATH);
+ snprintf(path, 64, "%s/touch_sample", SAMPLE_PATH);
execl(path, "touch_sample", NULL);
}
else if (d->app_num == 1)
{
- sprintf(path, "%s/thread_sample", SAMPLE_PATH);
+ snprintf(path, 64, "%s/thread_sample", SAMPLE_PATH);
execl(path, "thread_sample", NULL);
}
else if (d->app_num == 3)
{
- sprintf(path, "%s/entry_sample", SAMPLE_PATH);
+ snprintf(path, 64, "%s/entry_sample", SAMPLE_PATH);
execl(path, "entry_sample", NULL);
}
}
elm_box_pack_end(sc_bx, d->tb2);
/* border object (pre-drawing box) */
- sprintf(border_path, "%s/red.png", DATA_PATH);
+ snprintf(border_path, 64, "%s/red.png", DATA_PATH);
d->border_obj = evas_object_image_filled_add(evas_object_evas_get(d->win));
evas_object_image_file_set(d->border_obj, border_path, NULL);
#include <Elementary.h>
#include "Pepper_Efl.h"
+#include <time.h>
#define WIDTH 1920
#define HEIGHT 1080
+static unsigned int seedx = 1;
+static unsigned int seedy = 43210;
+
typedef struct
{
Evas_Object *win;
evas_object_geometry_get(img, &x, &y, &w, &h);
fprintf(stderr, "[ECOMP] _add_object_cb %p:%p(%dx%d+%d+%d)\n",obj, img, w, h, x, y);
- x = rand()%(WIDTH-w);
- y = rand()%(HEIGHT-h);
+ x = rand_r(&seedx)%(WIDTH-w);
+ y = rand_r(&seedy)%(HEIGHT-h);
evas_object_move(img, x, y);
evas_object_show(img);
}