#define americano 0 #define europeo 1 #define lmax 200 #define posin 18 #define estac 4+posin #define linea 9+posin #define durac 39+posin #define hor 27 +posin #define fech 19 +posin #define tranf 47+posin #define numero 58+posin #define ccost 34+posin #define proye 68+posin #define cuenta 0 #define pulsos 0 #define ruta 0 #define prinum 0 #define ring 0 #define antran 0 // anexo transferido #define fofech americano extern char rgua[]; void in_central() { rgua[0]='\0'; } void fi_central() { } void DatCentral(char *buf, char *tel, int vestac, int vlinea,int vdurac,int vhor, int vfech, int vtranf, int vnumero, int vccost,int vproye, int vcuenta, int vpulsos, int vruta, int vprinum, int vring, int vantran, int vfofech) { int ka,it,k,i=strlen(buf); char aux; aux = 0; if (i>vnumero && buf[vfech+2]=='/'&& buf[vhor+2]==':' && buf[vhor+5]==':' && buf[vdurac+2]==':'&& buf[vdurac+5]==':' ) { k=0; tel[k++] = buf[vestac] ; tel[k++] = buf[vestac+1] ; tel[k++] = buf[vestac+2] ; tel[k++] = ' ' ; tel[k++] = buf[vlinea] ; tel[k++] = buf[vlinea+1] ; tel[k++] = ' ' ; ka=k; tel[k++] = buf[vdurac+0] ; tel[k++] = buf[vdurac+1] ; tel[k++] = buf[vdurac+2] ; tel[k++] = buf[vdurac+3] ; tel[k++] = buf[vdurac+4] ; tel[k++] = buf[vdurac+5] ; tel[k++] = buf[vdurac+6] ; tel[k++] = buf[vdurac+7] ; tel[k++] = ' ' ; tel[k++] = buf[vhor+0] ; tel[k++] = buf[vhor+1] ; tel[k++] = buf[vhor+2] ; tel[k++] = buf[vhor+3] ; tel[k++] = buf[vhor+4] ; tel[k++] = ' ' ; if (vfofech==europeo) { tel[k++] = buf[vfech+3]; tel[k++] = buf[vfech+4]; tel[k++] = '/'; tel[k++] = buf[vfech+0]; tel[k++] = buf[vfech+1]; } else { tel[k++] = buf[vfech+0]; tel[k++] = buf[vfech+1]; tel[k++] = '/'; tel[k++] = buf[vfech+3]; tel[k++] = buf[vfech+4]; } tel[k++] = '/'; tel[k++] = buf[6]; tel[k++] = buf[7]; tel[k++] = ' ' ; tel[k++] = 'O'; tel[k++] = ' ' ; for (it=0;isdigit(buf[vnumero+it]) && it