if (strcmp(p, "Default Settings")) sessions[i++] = p;
sessions[i++] = p;
void get_sesslist(int allocate) {    static char otherbuf[2048];    static char *buffer;    int buflen, bufsize, i;    char *p, *ret;    void *handle;    if (allocate) {        	if ((handle = enum_settings_start()) == NULL)	    return;	buflen = bufsize = 0;	buffer = NULL;	do {            ret = enum_settings_next(handle, otherbuf, sizeof(otherbuf));	    if (ret) {                int len = strlen(otherbuf)+1;                if (bufsize < buflen+len) {                    bufsize = buflen + len + 2048;                    buffer = srealloc(buffer, bufsize);                }		strcpy(buffer+buflen, otherbuf);		buflen += strlen(buffer+buflen)+1;	    }	} while (ret);        enum_settings_finish(handle);	buffer = srealloc(buffer, buflen+1);	buffer[buflen] = '\0';	p = buffer;	nsessions = 1;		       /* "Default Settings" counts as one */	while (*p) {	    if (strcmp(p, "Default Settings"))		nsessions++;	    while (*p) p++;	    p++;	}	sessions = smalloc(nsessions * sizeof(char *));	sessions[0] = "Default Settings";	p = buffer;	i = 1;	while (*p) {	    if (strcmp(p, "Default Settings"))		sessions[i++] = p;	    while (*p) p++;	    p++;	}    } else {	sfree (buffer);	sfree (sessions);    }}