Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xcmenu.git;a=commitdiff;h=ccb23a4e030d9b714cbfe72dae6d19128b800c93

commit ccb23a4e030d9b714cbfe72dae6d19128b800c93
Author: James Buren <[email protected]>
Date:   Mon Jan 5 07:30:21 2009 -0600

xcmenu.c
* implement the makings for the main directory in HOME

diff --git a/xcmenu.c b/xcmenu.c
index 4989b57..a600061 100644
--- a/xcmenu.c
+++ b/xcmenu.c
@@ -3,6 +3,7 @@
#define TRUE   1
#define FALSE  0
#define FERROR "No such file or directory: "
+#define PATH   "/.xcmenu/"

/* include some essential header files */
#include <stdio.h>
@@ -12,6 +13,7 @@
/* initialize some useful global variables */

static char *home;
+static char path[BUFFER];

/* define some functions */

@@ -47,8 +49,11 @@ static void init()
home = getenv("HOME");
if (!home)
error("Failed to retrieve HOME environmental variable.",NULL);
+       snprintf(path,sizeof(path),"%s%s",home,PATH);
if (!filechk(home))
error(FERROR,home);
+       if (!filechk(path))
+               error(FERROR,path);
}

/* stop defining functions */
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to