Rev 4 | Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 7 | ||
---|---|---|---|
Line 71... | Line 71... | ||
71 | { |
71 | { |
72 | static char app_path[1024] = ""; |
72 | static char app_path[1024] = ""; |
73 | if (app_path[0] == 0) |
73 | if (app_path[0] == 0) |
74 | { |
74 | { |
75 | Dl_info addr_info; |
75 | Dl_info addr_info; |
76 | if (dladdr ( |
76 | if (dladdr (sys_getbasepath, &addr_info) == 0) |
77 | return ("."); |
77 | return ("."); |
78 | strcpy_s (app_path, 1024, addr_info.dli_fname); |
78 | strcpy_s (app_path, 1024, addr_info.dli_fname); |
79 | if (strrchr (app_path, '/') != NULL) |
79 | if (strrchr (app_path, '/') != NULL) |
80 | *strrchr (app_path, '/') = 0; |
80 | *strrchr (app_path, '/') = 0; |
81 | if (strrchr (app_path, '/') != NULL) |
81 | if (strrchr (app_path, '/') != NULL) |