[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-users
Subject:    [elinks-users] LIST_HEAD and *prev *next
From:       Yan Seiner <yan () seiner ! com>
Date:       2007-04-30 18:05:06
Message-ID: 46362FD2.90309 () seiner ! com
[Download RAW message or body]

Could someone please clue me in on how to use *prev and *next pointers 
for struct form_control?

I seem to be traversing the list OK, but it segfaults at some point and 
I have no idea why...

I haven't found the right way to test for the end of the list.  The ptr 
values seem OK when they print.

Here's the code snippet:

    while (temp_fc->prev != NULL) {
        temp_fc = temp_fc->prev;
        syslog(LOG_DEBUG,"Prev element ptr: %p\n",temp_fc);
        if(strncmp(fc->_P_idindex, temp_fc->_P_idindex,3) == 0) break;
//        temp_fs = find_form_state(doc_view, temp_fc);
        syslog(LOG_DEBUG,"Prev element ID: %s value 
%s\n",temp_fc->_P_idindex,"yyy");
//        free(temp_fs);
        }

On another topic, I've commented out the find_form_state and subsequent 
free.  I haven't been able to find a 'free_form_state' type of 
function.  Could someone please clue me in on how to free the structure 
allocated with find_form_state?

Thanks,

--Yan
_______________________________________________
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic