#define americano 0 #define europeo 1 #define lmax 200 #define posin 18 #define ladat 132+posin #define estac 6+posin #define linea 10+posin #define durac 15+posin #define hor 30+posin #define fech 21+posin #define tranf 37+posin #define numero 38+posin #define ccost 57+posin #define proye 0 #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 i=strlen(buf),k,it,aux,cont,j ; aux = 0;cont=0; if (i>vtranf && buf[vfech+2]=='/' && buf[vfech+5]=='/' && buf[vhor+2]==':' && buf[vdurac+2]==':' && (buf[vtranf]=='I' || buf[vtranf]=='O' || buf[vtranf]=='t' || buf[vtranf]=='T')) { k = 0 ; for (j=0;j<3;j++) { if (isdigit(buf[vestac+j])) {tel[k++] = buf[vestac+j] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; tel[k++] = ' ' ; for (j=0;j<3;j++) { if (isdigit(buf[vlinea+j])) {tel[k++] = buf[vlinea+j] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; tel[k++] = ' ' ; tel[k++] = '0' ;tel[k++] = '0' ;tel[k++] = ':' ; for (j=0;j<5;j++) { if (isdigit(buf[vdurac+j]) || buf[vdurac+j]==':') {tel[k++] = buf[vdurac+j] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; tel[k++] = ' ' ; for (j=0;j<5;j++) { if (isdigit(buf[vhor+j]) || buf[vhor+j]==':') {tel[k++] = buf[vhor+j] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; tel[k++] = ' ' ; if (vfofech==americano) { tel[k++] = buf[vfech+0] ; tel[k++] = buf[vfech+1] ; tel[k++] = '/'; tel[k++] = buf[vfech+3] ; tel[k++] = buf[vfech+4] ; } else { tel[k++] = buf[vfech+3] ; tel[k++] = buf[vfech+4] ; tel[k++] = '/'; tel[k++] = buf[vfech+0] ; tel[k++] = buf[vfech+1] ; } tel[k++] = '/'; tel[k++] = buf[vfech+6] ; tel[k++] = buf[vfech+7] ; tel[k++] = ' ' ; if (buf[vtranf]=='O' || buf[vtranf]=='T') tel[k++]='O' ; else tel[k++] = 'I' ; tel[k++] = ' ' ; for (j=0;j<20 && (vnumero+j)