Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 173 of file list.c.
Referenced by print_offset().
{ PLIST_MEMBER pentry; char *s = NULL; int l; if (!path) return NULL; if (!prefix) prefix = ""; pentry = malloc(sizeof(LIST_MEMBER)); if (!pentry) return NULL; l = strlen(path) + strlen(prefix); pentry->buf = s = malloc(l + 1); if (!s) { l2l_dbg(1, "Alloc entry failed\n"); return entry_delete(pentry); } strcpy(s, prefix); strcat(s, path); if (s[l] == '\n') s[l] = '\0'; pentry->name = s; if (list) { if (entry_lookup(list, pentry->name)) { l2l_dbg(1, "Entry %s exists\n", pentry->name); pentry = entry_delete(pentry); } else { l2l_dbg(1, "Inserting entry %s\n", pentry->name); entry_insert(list, pentry); } } return pentry; }