summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-22 07:02:41 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-22 07:02:41 +0000
commita8beb0950cc96d1589d8540e10fc389b0676f5f7 (patch)
tree0713723103ed9a099bb8b14ff85b92b040f86944 /src/bin
parentb565b6ca04d96addde112e0f435d6073141e1b14 (diff)
fix usage of PATH_MAX when not working with files
SVN revision: 75518
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/e_alert_main.c6
-rw-r--r--src/bin/e_bg.c2
-rw-r--r--src/bin/e_border.c4
-rw-r--r--src/bin/e_deskenv.c2
-rw-r--r--src/bin/e_desklock.c4
-rw-r--r--src/bin/e_error.h2
-rw-r--r--src/bin/e_exec.c10
-rw-r--r--src/bin/e_icon.c4
-rw-r--r--src/bin/e_int_shelf_config.c2
-rw-r--r--src/bin/e_main.c4
-rw-r--r--src/bin/e_module.c4
-rw-r--r--src/bin/e_shelf.c4
-rw-r--r--src/bin/e_startup.c2
-rw-r--r--src/bin/e_sys.c2
-rw-r--r--src/bin/e_update.c2
-rw-r--r--src/bin/e_utils.c12
-rw-r--r--src/bin/e_utils.h2
17 files changed, 32 insertions, 36 deletions
diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c
index 635b847..bb62d17 100644
--- a/src/bin/e_alert_main.c
+++ b/src/bin/e_alert_main.c
@@ -14,10 +14,6 @@
14#include <xcb/xcb.h> 14#include <xcb/xcb.h>
15#include <xcb/shape.h> 15#include <xcb/shape.h>
16 16
17#ifndef PATH_MAX
18#define PATH_MAX 4096
19#endif
20
21#define WINDOW_WIDTH 320 17#define WINDOW_WIDTH 320
22#define WINDOW_HEIGHT 240 18#define WINDOW_HEIGHT 240
23 19
@@ -451,7 +447,7 @@ static void
451_e_alert_draw_text(void) 447_e_alert_draw_text(void)
452{ 448{
453 xcb_void_cookie_t cookie; 449 xcb_void_cookie_t cookie;
454 char warn[1024], msg[PATH_MAX], line[1024]; 450 char warn[1024], msg[4096], line[1024];
455 unsigned int i = 0, j = 0, k = 0; 451 unsigned int i = 0, j = 0, k = 0;
456 452
457 snprintf(msg, sizeof(msg), 453 snprintf(msg, sizeof(msg),
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index 401621b..4b1bd3a 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -447,7 +447,7 @@ EAPI void
447e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__) 447e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
448{ 448{
449 E_Container *con; 449 E_Container *con;
450 char buf[PATH_MAX]; 450 char buf[4096];
451 int copy = 1; 451 int copy = 1;
452 E_Zone *zone; 452 E_Zone *zone;
453 E_Desk *desk; 453 E_Desk *desk;
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 08e695f..d371335 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -1148,7 +1148,7 @@ _e_border_frame_replace(E_Border *bd, Eina_Bool argb)
1148{ 1148{
1149 Ecore_X_Window win; 1149 Ecore_X_Window win;
1150 Ecore_Evas *bg_ecore_evas; 1150 Ecore_Evas *bg_ecore_evas;
1151 char buf[PATH_MAX]; 1151 char buf[4096];
1152 1152
1153 bd->argb = argb; 1153 bd->argb = argb;
1154 1154
@@ -7554,7 +7554,7 @@ _e_border_eval0(E_Border *bd)
7554 if ((!bd->client.border.name) || (strcmp(bd->client.border.name, bordername))) 7554 if ((!bd->client.border.name) || (strcmp(bd->client.border.name, bordername)))
7555 { 7555 {
7556 Evas_Object *o; 7556 Evas_Object *o;
7557 char buf[PATH_MAX]; 7557 char buf[4096];
7558 int ok; 7558 int ok;
7559 7559
7560 bd->changes.border = 1; 7560 bd->changes.border = 1;
diff --git a/src/bin/e_deskenv.c b/src/bin/e_deskenv.c
index e08f248..ca96cf4 100644
--- a/src/bin/e_deskenv.c
+++ b/src/bin/e_deskenv.c
@@ -3,7 +3,7 @@
3EINTERN int 3EINTERN int
4e_deskenv_init(void) 4e_deskenv_init(void)
5{ 5{
6 char buf[PATH_MAX], buf2[PATH_MAX]; 6 char buf[PATH_MAX], buf2[4096];
7 7
8 // run xdrb -load .Xdefaults & .Xresources 8 // run xdrb -load .Xdefaults & .Xresources
9 // NOTE: one day we should replace this with an e based config + service 9 // NOTE: one day we should replace this with an e based config + service
diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index eb794b1..1ef77f3 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -54,8 +54,8 @@ struct _E_Desklock_Auth
54 pam_handle_t *handle; 54 pam_handle_t *handle;
55 } pam; 55 } pam;
56 56
57 char user[PATH_MAX]; 57 char user[4096];
58 char passwd[PATH_MAX]; 58 char passwd[4096];
59}; 59};
60#endif 60#endif
61 61
diff --git a/src/bin/e_error.h b/src/bin/e_error.h
index 70e617b..205b7d4 100644
--- a/src/bin/e_error.h
+++ b/src/bin/e_error.h
@@ -2,7 +2,7 @@
2 2
3#define e_error_message_show(args...) do \ 3#define e_error_message_show(args...) do \
4{ \ 4{ \
5 char __tmpbuf[PATH_MAX]; \ 5 char __tmpbuf[4096]; \
6 \ 6 \
7 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ 7 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
8 e_error_message_show_internal(__tmpbuf); \ 8 e_error_message_show_internal(__tmpbuf); \
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 7052df4..051d502 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -161,7 +161,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
161 Eina_List *l, *lnew; 161 Eina_List *l, *lnew;
162 Ecore_Exe *exe = NULL; 162 Ecore_Exe *exe = NULL;
163 char *penv_display; 163 char *penv_display;
164 char buf[PATH_MAX]; 164 char buf[4096];
165 165
166 launch = data; 166 launch = data;
167 inst = E_NEW(E_Exec_Instance, 1); 167 inst = E_NEW(E_Exec_Instance, 1);
@@ -427,7 +427,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
427 "E", "_e_exec_run_error_dialog"); 427 "E", "_e_exec_run_error_dialog");
428 if (dia) 428 if (dia)
429 { 429 {
430 char buf[PATH_MAX]; 430 char buf[4096];
431 431
432 e_dialog_title_set(dia, _("Application run error")); 432 e_dialog_title_set(dia, _("Application run error"));
433 snprintf(buf, sizeof(buf), 433 snprintf(buf, sizeof(buf),
@@ -539,7 +539,7 @@ _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_
539static void 539static void
540_fill_data(E_Config_Dialog_Data *cfdata) 540_fill_data(E_Config_Dialog_Data *cfdata)
541{ 541{
542 char buf[PATH_MAX]; 542 char buf[4096];
543 543
544 if (!cfdata->label) 544 if (!cfdata->label)
545 { 545 {
@@ -693,7 +693,7 @@ _dialog_scrolltext_create(Evas *evas, char *title, Ecore_Exe_Event_Data_Line *li
693static Evas_Object * 693static Evas_Object *
694_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata) 694_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
695{ 695{
696 char buf[PATH_MAX]; 696 char buf[4096];
697 int error_length = 0; 697 int error_length = 0;
698 Evas_Object *o, *ob, *os; 698 Evas_Object *o, *ob, *os;
699 699
@@ -736,7 +736,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
736static Evas_Object * 736static Evas_Object *
737_advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata) 737_advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
738{ 738{
739 char buf[PATH_MAX]; 739 char buf[4096];
740 int read_length = 0; 740 int read_length = 0;
741 int error_length = 0; 741 int error_length = 0;
742 Evas_Object *o, *of, *ob, *ot; 742 Evas_Object *o, *of, *ob, *ot;
diff --git a/src/bin/e_icon.c b/src/bin/e_icon.c
index 7fa9261..9ad0788 100644
--- a/src/bin/e_icon.c
+++ b/src/bin/e_icon.c
@@ -973,7 +973,7 @@ _e_icon_cache_find(Evas_Object *obj, const char *file)
973{ 973{
974 E_Smart_Data *sd; 974 E_Smart_Data *sd;
975 Cache_Item *ci; 975 Cache_Item *ci;
976 char buf[PATH_MAX]; 976 char buf[4096];
977 const char *id; 977 const char *id;
978 Eina_List *l; 978 Eina_List *l;
979 979
@@ -982,7 +982,7 @@ _e_icon_cache_find(Evas_Object *obj, const char *file)
982 if (!(sd = evas_object_smart_data_get(obj))) 982 if (!(sd = evas_object_smart_data_get(obj)))
983 return EINA_FALSE; 983 return EINA_FALSE;
984 984
985 snprintf(buf, PATH_MAX, "%d:%s", sd->size, file); 985 snprintf(buf, sizeof(buf), "%d:%s", sd->size, file);
986 986
987 if ((ci = eina_hash_find(_cache->hash, buf))) 987 if ((ci = eina_hash_find(_cache->hash, buf)))
988 { 988 {
diff --git a/src/bin/e_int_shelf_config.c b/src/bin/e_int_shelf_config.c
index 0e5dd87..e153936 100644
--- a/src/bin/e_int_shelf_config.c
+++ b/src/bin/e_int_shelf_config.c
@@ -421,7 +421,7 @@ _fill_styles(E_Config_Dialog_Data *cfdata, Evas_Object *obj)
421 EINA_LIST_FOREACH(styles, l, style) 421 EINA_LIST_FOREACH(styles, l, style)
422 { 422 {
423 Evas_Object *thumb, *ow; 423 Evas_Object *thumb, *ow;
424 char buff[PATH_MAX]; 424 char buff[4096];
425 425
426 thumb = e_livethumb_add(evas); 426 thumb = e_livethumb_add(evas);
427 e_livethumb_vsize_set(thumb, 120, 40); 427 e_livethumb_vsize_set(thumb, 120, 40);
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 103df28..3b217a8 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -195,7 +195,7 @@ _xdg_data_dirs_augment(void)
195{ 195{
196 const char *s = getenv("XDG_DATA_DIRS"); 196 const char *s = getenv("XDG_DATA_DIRS");
197 const char *p = e_prefix_get(); 197 const char *p = e_prefix_get();
198 char newpath[PATH_MAX], buf[PATH_MAX]; 198 char newpath[4096], buf[4096];
199 199
200 if (!p) return; 200 if (!p) return;
201 201
@@ -1296,7 +1296,7 @@ _e_main_parse_arguments(int argc, char **argv)
1296 s = getenv("DISPLAY"); 1296 s = getenv("DISPLAY");
1297 if (s) 1297 if (s)
1298 { 1298 {
1299 char *p, buff[PATH_MAX]; 1299 char *p, buff[4096];
1300 1300
1301 if (!(p = strrchr(s, ':'))) 1301 if (!(p = strrchr(s, ':')))
1302 { 1302 {
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index 65f08ca..ba1d99a 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -112,7 +112,7 @@ e_module_new(const char *name)
112{ 112{
113 E_Module *m; 113 E_Module *m;
114 char buf[PATH_MAX]; 114 char buf[PATH_MAX];
115 char body[PATH_MAX], title[1024]; 115 char body[4096], title[1024];
116 const char *modpath; 116 const char *modpath;
117 char *s; 117 char *s;
118 Eina_List *l; 118 Eina_List *l;
@@ -502,7 +502,7 @@ static void
502_e_module_dialog_disable_show(const char *title, const char *body, E_Module *m) 502_e_module_dialog_disable_show(const char *title, const char *body, E_Module *m)
503{ 503{
504 E_Dialog *dia; 504 E_Dialog *dia;
505 char buf[PATH_MAX]; 505 char buf[4096];
506 506
507 printf("MODULE ERR:\n%s\n", body); 507 printf("MODULE ERR:\n%s\n", body);
508 dia = e_dialog_new(e_container_current_get(e_manager_current_get()), 508 dia = e_dialog_new(e_container_current_get(e_manager_current_get()),
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 4d33e4b..dacd59f 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -585,7 +585,7 @@ e_shelf_unsave(E_Shelf *es)
585EAPI void 585EAPI void
586e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient) 586e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient)
587{ 587{
588 char buf[PATH_MAX]; 588 char buf[4096];
589 589
590 E_OBJECT_CHECK(es); 590 E_OBJECT_CHECK(es);
591 E_OBJECT_IF_NOT_TYPE(es, E_SHELF_DUMMY_TYPE) 591 E_OBJECT_IF_NOT_TYPE(es, E_SHELF_DUMMY_TYPE)
@@ -1235,7 +1235,7 @@ _e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *styl
1235{ 1235{
1236 E_Shelf *es; 1236 E_Shelf *es;
1237 Evas_Object *o; 1237 Evas_Object *o;
1238 char buf[PATH_MAX]; 1238 char buf[4096];
1239 1239
1240 es = data; 1240 es = data;
1241 o = edje_object_add(gcc->gadcon->evas); 1241 o = edje_object_add(gcc->gadcon->evas);
diff --git a/src/bin/e_startup.c b/src/bin/e_startup.c
index a11b52c..2702bc3 100644
--- a/src/bin/e_startup.c
+++ b/src/bin/e_startup.c
@@ -45,7 +45,7 @@ static void
45_e_startup(void) 45_e_startup(void)
46{ 46{
47 Efreet_Desktop *desktop; 47 Efreet_Desktop *desktop;
48 char buf[PATH_MAX]; 48 char buf[8192];
49 49
50 if (!startup_apps) 50 if (!startup_apps)
51 { 51 {
diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c
index c23537f..40b9315 100644
--- a/src/bin/e_sys.c
+++ b/src/bin/e_sys.c
@@ -312,7 +312,7 @@ _e_sys_cb_logout_abort(void *data __UNUSED__, E_Dialog *dia)
312static void 312static void
313_e_sys_logout_confirm_dialog_update(int remaining) 313_e_sys_logout_confirm_dialog_update(int remaining)
314{ 314{
315 char txt[PATH_MAX]; 315 char txt[4096];
316 316
317 if (!_e_sys_logout_confirm_dialog) 317 if (!_e_sys_logout_confirm_dialog)
318 { 318 {
diff --git a/src/bin/e_update.c b/src/bin/e_update.c
index 50dcfc5..68bb61a 100644
--- a/src/bin/e_update.c
+++ b/src/bin/e_update.c
@@ -152,7 +152,7 @@ static void
152_update_machid_get(void) 152_update_machid_get(void)
153{ 153{
154 FILE *f; 154 FILE *f;
155 char buf[PATH_MAX], *c; 155 char buf[4096], *c;
156 size_t len; 156 size_t len;
157 157
158 f = fopen("/etc/machine-id", "r"); 158 f = fopen("/etc/machine-id", "r");
diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c
index 956d2a1..dd07f15 100644
--- a/src/bin/e_utils.c
+++ b/src/bin/e_utils.c
@@ -160,7 +160,7 @@ e_util_head_exec(int head, const char *cmd)
160{ 160{
161 char *penv_display; 161 char *penv_display;
162 char *p1, *p2; 162 char *p1, *p2;
163 char buf[PATH_MAX], buf2[32]; 163 char buf[4096], buf2[32];
164 int ok = 0; 164 int ok = 0;
165 Ecore_Exe *exe; 165 Ecore_Exe *exe;
166 166
@@ -359,7 +359,7 @@ EAPI int
359e_util_edje_icon_check(const char *name) 359e_util_edje_icon_check(const char *name)
360{ 360{
361 const char *file; 361 const char *file;
362 char buf[PATH_MAX]; 362 char buf[4096];
363 363
364 if ((!name) || (!name[0])) return 0; 364 if ((!name) || (!name[0])) return 0;
365 snprintf(buf, sizeof(buf), "e/icons/%s", name); 365 snprintf(buf, sizeof(buf), "e/icons/%s", name);
@@ -375,7 +375,7 @@ EAPI int
375e_util_edje_icon_set(Evas_Object *obj, const char *name) 375e_util_edje_icon_set(Evas_Object *obj, const char *name)
376{ 376{
377 const char *file; 377 const char *file;
378 char buf[PATH_MAX]; 378 char buf[4096];
379 379
380 if ((!name) || (!name[0])) return 0; 380 if ((!name) || (!name[0])) return 0;
381 snprintf(buf, sizeof(buf), "e/icons/%s", name); 381 snprintf(buf, sizeof(buf), "e/icons/%s", name);
@@ -392,7 +392,7 @@ static int
392_e_util_icon_theme_set(Evas_Object *obj, const char *icon, Eina_Bool fallback) 392_e_util_icon_theme_set(Evas_Object *obj, const char *icon, Eina_Bool fallback)
393{ 393{
394 const char *file; 394 const char *file;
395 char buf[PATH_MAX]; 395 char buf[4096];
396 396
397 if ((!icon) || (!icon[0])) return 0; 397 if ((!icon) || (!icon[0])) return 0;
398 snprintf(buf, sizeof(buf), "e/icons/%s", icon); 398 snprintf(buf, sizeof(buf), "e/icons/%s", icon);
@@ -455,7 +455,7 @@ int
455_e_util_menu_item_edje_icon_set(E_Menu_Item *mi, const char *name, Eina_Bool fallback) 455_e_util_menu_item_edje_icon_set(E_Menu_Item *mi, const char *name, Eina_Bool fallback)
456{ 456{
457 const char *file; 457 const char *file;
458 char buf[PATH_MAX]; 458 char buf[4096];
459 459
460 if ((!name) || (!name[0])) return 0; 460 if ((!name) || (!name[0])) return 0;
461 461
@@ -1246,7 +1246,7 @@ static Eina_Bool
1246_e_util_conf_timer_old(void *data) 1246_e_util_conf_timer_old(void *data)
1247{ 1247{
1248 char *module_name = data; 1248 char *module_name = data;
1249 char buf[PATH_MAX]; 1249 char buf[4096];
1250 char *msg = 1250 char *msg =
1251 _("Configuration data needed " 1251 _("Configuration data needed "
1252 "upgrading. Your old configuration<br> has been" 1252 "upgrading. Your old configuration<br> has been"
diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h
index 759d12c..338bd97 100644
--- a/src/bin/e_utils.h
+++ b/src/bin/e_utils.h
@@ -6,7 +6,7 @@
6 6
7#define e_util_dialog_show(title, args...) \ 7#define e_util_dialog_show(title, args...) \
8{ \ 8{ \
9 char __tmpbuf[PATH_MAX]; \ 9 char __tmpbuf[4096]; \
10 \ 10 \
11 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ 11 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
12 e_util_dialog_internal(title, __tmpbuf); \ 12 e_util_dialog_internal(title, __tmpbuf); \