diff options
author | David Walter Seikel | 2016-02-06 19:52:33 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-02-06 19:52:33 +1000 |
commit | a8cddde41e8682fb32832826c8ec5dbdf3c7871f (patch) | |
tree | 779b5df71c623e9d6933e89190b86678bb65f2a6 /src | |
parent | TODO++ (diff) | |
download | SledjHamr-a8cddde41e8682fb32832826c8ec5dbdf3c7871f.zip SledjHamr-a8cddde41e8682fb32832826c8ec5dbdf3c7871f.tar.gz SledjHamr-a8cddde41e8682fb32832826c8ec5dbdf3c7871f.tar.bz2 SledjHamr-a8cddde41e8682fb32832826c8ec5dbdf3c7871f.tar.xz |
Put the ~/.SledHamr/ creation code into all three main binaries. sigh
Diffstat (limited to 'src')
-rw-r--r-- | src/LuaSL/LuaSL_main.c | 6 | ||||
-rw-r--r-- | src/extantz/extantz.c | 15 | ||||
-rw-r--r-- | src/libraries/LumbrJack.c | 12 | ||||
-rw-r--r-- | src/libraries/LumbrJack.h | 2 | ||||
-rw-r--r-- | src/love/love.c | 7 |
5 files changed, 27 insertions, 15 deletions
diff --git a/src/LuaSL/LuaSL_main.c b/src/LuaSL/LuaSL_main.c index 0e70fe4..c28fe4a 100644 --- a/src/LuaSL/LuaSL_main.c +++ b/src/LuaSL/LuaSL_main.c | |||
@@ -328,7 +328,13 @@ int main(int argc, char **argv) | |||
328 | 328 | ||
329 | if (eina_init()) | 329 | if (eina_init()) |
330 | { | 330 | { |
331 | char temp[PATH_MAX]; | ||
332 | |||
331 | logDom = HamrTime(argv[0], main, logDom); | 333 | logDom = HamrTime(argv[0], main, logDom); |
334 | // Create our home directories, if not already created. | ||
335 | // This should be in HamrTime, bit I had a HardTime getting LumbrJack to link to ecore-file. | ||
336 | sprintf(temp, "%s/.SledjHamr", eina_environment_home_get()); | ||
337 | ecore_file_mksubdirs(temp, dirs); | ||
332 | ourGlobals.names = eina_hash_string_superfast_new(NULL); | 338 | ourGlobals.names = eina_hash_string_superfast_new(NULL); |
333 | if (ecore_init()) | 339 | if (ecore_init()) |
334 | { | 340 | { |
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 7a21aee..ed78b24 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -15,19 +15,6 @@ globals ourGlobals; | |||
15 | //static char *myKey = "12345678-1234-4321-abcd-0123456789ab"; | 15 | //static char *myKey = "12345678-1234-4321-abcd-0123456789ab"; |
16 | //static char *myName = "onefang rejected"; | 16 | //static char *myName = "onefang rejected"; |
17 | 17 | ||
18 | static const char *dirs[] = | ||
19 | { | ||
20 | ".cache", | ||
21 | ".cache/compiled", | ||
22 | ".cache/converted", | ||
23 | ".cache/sha1", | ||
24 | ".cache/types", | ||
25 | ".cache/unpacked", | ||
26 | ".download", | ||
27 | "inventory", | ||
28 | NULL | ||
29 | }; | ||
30 | |||
31 | 18 | ||
32 | #if USE_LOVE | 19 | #if USE_LOVE |
33 | static Eina_Bool _add(void *data, int type, Ecore_Con_Event_Server_Add *ev) | 20 | static Eina_Bool _add(void *data, int type, Ecore_Con_Event_Server_Add *ev) |
@@ -602,8 +589,8 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
602 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. | 589 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. |
603 | 590 | ||
604 | logDom = HamrTime(argv[0], elm_main, logDom); | 591 | logDom = HamrTime(argv[0], elm_main, logDom); |
605 | |||
606 | // Create our home directories, if not already created. | 592 | // Create our home directories, if not already created. |
593 | // This should be in HamrTime, bit I had a HardTime getting LumbrJack to link to ecore-file. | ||
607 | sprintf(temp, "%s/.SledjHamr", eina_environment_home_get()); | 594 | sprintf(temp, "%s/.SledjHamr", eina_environment_home_get()); |
608 | ecore_file_mksubdirs(temp, dirs); | 595 | ecore_file_mksubdirs(temp, dirs); |
609 | 596 | ||
diff --git a/src/libraries/LumbrJack.c b/src/libraries/LumbrJack.c index b92dc97..ee45f80 100644 --- a/src/libraries/LumbrJack.c +++ b/src/libraries/LumbrJack.c | |||
@@ -6,6 +6,18 @@ | |||
6 | #include <unistd.h> | 6 | #include <unistd.h> |
7 | #include "LumbrJack.h" | 7 | #include "LumbrJack.h" |
8 | 8 | ||
9 | const char *dirs[] = | ||
10 | { | ||
11 | ".cache", | ||
12 | ".cache/compiled", | ||
13 | ".cache/converted", | ||
14 | ".cache/sha1", | ||
15 | ".cache/types", | ||
16 | ".cache/unpacked", | ||
17 | ".download", | ||
18 | "inventory", | ||
19 | NULL | ||
20 | }; | ||
9 | 21 | ||
10 | static char dateTime[DATE_TIME_LEN]; | 22 | static char dateTime[DATE_TIME_LEN]; |
11 | static Eina_Prefix *prefix = NULL; | 23 | static Eina_Prefix *prefix = NULL; |
diff --git a/src/libraries/LumbrJack.h b/src/libraries/LumbrJack.h index 74249ed..ff948fc 100644 --- a/src/libraries/LumbrJack.h +++ b/src/libraries/LumbrJack.h | |||
@@ -39,7 +39,7 @@ typedef enum | |||
39 | } boolean; | 39 | } boolean; |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | 42 | extern const char *dirs[]; | |
43 | extern int logDom; | 43 | extern int logDom; |
44 | 44 | ||
45 | int HamrTime(char *argv0, void *main, int logDom); | 45 | int HamrTime(char *argv0, void *main, int logDom); |
diff --git a/src/love/love.c b/src/love/love.c index b686475..698726f 100644 --- a/src/love/love.c +++ b/src/love/love.c | |||
@@ -541,7 +541,14 @@ int main(int argc, char **argv) | |||
541 | 541 | ||
542 | if (eina_init()) | 542 | if (eina_init()) |
543 | { | 543 | { |
544 | char temp[PATH_MAX]; | ||
545 | |||
544 | logDom = HamrTime(argv[0], main, logDom); | 546 | logDom = HamrTime(argv[0], main, logDom); |
547 | // Create our home directories, if not already created. | ||
548 | // This should be in HamrTime, bit I had a HardTime getting LumbrJack to link to ecore-file. | ||
549 | sprintf(temp, "%s/.SledjHamr", eina_environment_home_get()); | ||
550 | ecore_file_mksubdirs(temp, dirs); | ||
551 | |||
545 | ourGlobals.scripts = eina_hash_string_superfast_new(NULL); | 552 | ourGlobals.scripts = eina_hash_string_superfast_new(NULL); |
546 | 553 | ||
547 | if (ecore_con_init()) | 554 | if (ecore_con_init()) |