从C中的结构返回值的函数

我在C语言中有这个结构。

struct webit{ char indice[10]; int prid; double latitude; char date[20]; double longitude; int xspeed; int rEvt; int alti; int seq1; int seq2; int presi; char cod1[5]; char cod2[5]; int iint1; int iint2; int x15; }; 

我已经在struct webit之前推出了这个函数

 tramafunction(); 

这是函数的工作方式:接收一个用逗号分隔的字符串,然后将数据拆分为15个不同的变量,这是一个字符串的示例:

  /*¶bL0 L3,01,+08590323,-079343001,010215,00000000000000,-tN,000,012689997,001219456,000,7FF2,C07F,0,4,*/ 

function:

 trama function(){ struct webit wbt; char buf[103]=""; scanf("%[^\t\n]s",buf); printf("\n \n Trama Recibida=[%s]\n\n", buf); int z; z=strlen(buf); printf("TAMANO DE LA TRAMA: %d",z); int i = 0; char *p = strtok (buf, ","); char *array[16]={0}; while (p != NULL) { array[i++] = p; p = strtok (NULL, ","); } for (i = 0; i <16; ++i){ wbt.x15 = 0; if (array[15] != NULL){ wbt.x15=atoi(array[15]); } printf("DATA: [%s]\n", array[i]); } strcpy(wbt.indice,array[0]); printf("INDEX: [%s]\n",wbt.indice); /*AND EVENTUALLY WITH ALL OTHER DIFERENT DATA TYPES VARIABLES*/ } 

在主要

 int main() { tramafunction(); return 0; } 

最后,他们将数组的15种数据类型转换为webit的变量,在这种情况下定义为wbt。 示例“wbt.indice”

如何使functionTRAMA返回所有的价值。 所以我可以在程序中的任何地方使用它,另一个函数,另一个结构。 等等