You should probably take a look at Ecore_Data for a list implementation
instead of writting your own. There are both single and doublly linked
lists in there.

dan


On Mon, 2005-12-19 at 23:11, Morten Nilsen wrote:
> Phuah Yee Keat wrote:
> > Is it possible to support structures like this in your implementation? 
> > Previously the structure for the sessions are as such:
> > 
> > /entrance/session/1/name "Fluxbox"
> > /entrance/session/1/exec "startfluxbox"
> > /entrance/session/1/icon "fluxbox.png"
> > /entrance/session/2/name "kde"
> > /entrance/session/2/exec "startkde"
> > ...
> > /entrance/session/name/1 "Fluxbox"
> > /entrance/session/exec/1 "startfluxbox"
> > /entrance/session/icon/1 "fluxbox.png"
> > /entrance/session/name/2 "kde"
> > /entrance/session/exec/2 "startkde"
> > ...
> > 
> > :) I feels that the current mock up way of handling list very nicely 
> > done. The only thing which I do not like is the code that is needed to 
> > load the "count" variable, determines what is the next index that I need 
> > to add, managing lost indexes while deleting entries etc...
> 
> the list stuff I'm working on now won't work like that..
> 
> EAPI char              **ecore_config_string_list_get(const char *key);
> 
> so you would likely do something like..
> 
> char **name, **exec, **icon;
> 
> name = ecore_config_string_list_get("/entrance/session/name");
> exec = ecore_config_string_list_get("/entrance/session/exec");
> icon = ecore_config_string_list_get("/entrance/session/icon");
> 
> giving each var an array of pointers to strings..
> 
> name[0] == "Fluxbox"
> exec[0] == "startfluxbox"
> icon[0] == "fluxbox.png"
> ...
> name[n] == null
> exec[n] == null
> icon[n] == null
> 
> these lists are probably more suited for a one-to-one relation, like a 
> path list.. and they might even never see the light of day as-is in my 
> tree..
> 
> A different idea is to implement a list as a user-supplied struct.. at 
> this time, I haven't done anything to implement such an option, but I'll 
> be looking at that too when the time is right.. for now, I'm gonna try 
> getting the quirks out of my list code (it's a mess that only barely 
> compiles, and it hasn't been tested in any way yet ;)
> 
> -- 
> Morten
> :wq
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to