Skip to content

Instantly share code, notes, and snippets.

@blaquee
Created June 15, 2013 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blaquee/5788672 to your computer and use it in GitHub Desktop.
Save blaquee/5788672 to your computer and use it in GitHub Desktop.
char* findtag(llist* p){
//holds address to p
llist* nextp = p;
//traverse llist p
while(1){
if(*nextp.tag == 0x41414100){
//tag matches magic tag
//not sure if necessary but lets replace address of p with nextp, holding current tag/data
p = nextp;
//return the data at this index
return *p.data;
}else{
//incrmement to next item in list
nextp = nextp.next;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment