LinkedListEntry_t * BURGERCALL LinkedListFindStringEntry(const LinkedList_t *Input,const char *TextPtr) { LinkedListEntry_t *EntryPtr; EntryPtr = 0; if (TextPtr) { EntryPtr = LinkedListGetFirst(Input); /* Check the list for a string */ if (EntryPtr) { /* Any data in the list? */ do { if (!stricmp(TextPtr,(char *)EntryPtr->Data)) { /* Does this match? */ break; } EntryPtr = EntryPtr->Next; /* Follow the list */ } while (EntryPtr); /* Still more */ } } return EntryPtr; /* Return the match or NULL */ }
Word BURGERCALL LinkedListFindString(const LinkedList_t *Input,const char *TextPtr) { LinkedListEntry_t *EntryPtr; if (TextPtr) { EntryPtr = LinkedListGetFirst(Input); /* Check the list for a string */ if (EntryPtr) { /* Any data in the list? */ Word i; i = 0; do { if (!stricmp(TextPtr,(char *)EntryPtr->Data)) { /* Does this match? */ return i; } ++i; EntryPtr = EntryPtr->Next; /* Follow the list */ } while (EntryPtr); /* Still more */ } } return (Word)-1; /* You suck */ }
int PushDownStackPop(struct PushDownStack* self, int* OutResult) { if (!self) return 1; if (LinkedListGetCount(&self->_list) < 1U) return 2; *OutResult = LinkedListGetFirst(&self->_list)->key; return LinkedListRemoveFirst(&self->_list); }