#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main() {
	char p[] = "t=quote";

	char* token;
	char* tk;
	char* s;
	unsigned short int found;

	s = strdup(p);

	if (s != NULL) {
		while ((token = strsep(&s, "&")) != NULL) {

			found = 0;
			printf("TOKEN: %s\n\n", token);

			while ((tk = strsep(&token, "=")) != NULL) {
				printf("TK: %s\n\n", tk);
				free(tk);
			}
		}
	}

	return 0;
}

