Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : libs/epsilon
Dir : e17/libs/epsilon/src/lib
Modified Files:
Epsilon.c
Log Message:
Expect a full path to the file, grip and return NULL otherwise
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/epsilon/src/lib/Epsilon.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -3 -r1.1.1.1 -r1.2
--- Epsilon.c 10 Dec 2003 04:46:36 -0000 1.1.1.1
+++ Epsilon.c 10 Dec 2003 05:27:43 -0000 1.2
@@ -30,10 +30,18 @@
Epsilon *result = NULL;
if(file)
{
- result = malloc(sizeof(Epsilon));
- memset(result, 0, sizeof(Epsilon));
- result->src = strdup(file);
- result->hash = epsilon_hash(result->src);
+ if(file[0] == '/')
+ {
+ result = malloc(sizeof(Epsilon));
+ memset(result, 0, sizeof(Epsilon));
+ result->src = strdup(file);
+ result->hash = epsilon_hash(result->src);
+ }
+ else
+ {
+ fprintf(stderr, "Invalid filename given: %s\n", file);
+ fprintf(stderr, "Epsilon expects the full path to file\n");
+ }
}
return(result);
}
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs