l'applicazione deve semplicemente fare il tokenizer del buffer passato al main e salvare i valori nella struttura mia che è dichiarata nell'include Gestore.h così come l'avevo scritta ieri. io non faccio altro che fare le stesse cose per ogni elemento della struttura, per questo avevo postato solo una porzione di codice.....

codice:
#include <stdio.h> 
#include <string.h> 
#include "../INC/Gestore.h"

void tokenizer(char * bufferIn, struct mia mia)
{
	char *pch;
	
	pch = strtok (bufferIn, "|");
	if (pch != NULL)
	{
	   strcpy(mia.primo, pch); 	    
           strcat(mia.primo, "\n"); 
           printf("primo: %s\n", mia.primo); 	    
	}
........
........
}

int gestore_licenze (char *bufferIn, char *bufferOut)
{
 	struct mia mia;
	char risposta[15];
	
        tokenizer(bufferIn,mia);

	if (strcmp(mia.primo, "F") != 0)
	{
	    	strcpy(risposta, "OK|");
                printf("%s\n", mia.primo);
                strcat(risposta, mia.primo);		
	}

............
............
}

int main (int argc, char *argv[])
{
		
	char *bufferIn;
	char *bufferOut;
	int ret;
	
	bufferIn = "F|V|F|1|0|0|0";
	
	printf("Avviato main\n");
	printf("buffer da spacchettare: %s\n", bufferIn);	
	ret = gestore(bufferIn, bufferOut);
	printf("Terminato main\n");
	return 0;
}
grazie