#define americano 0 #define europeo 1 #define lmax 200 #define posin 18 #define estac 18+posin #define linea 23+posin #define durac 64+posin #define hor 10+posin #define fech 0 +posin #define tranf 26+posin #define numero 26+posin #define ccost 0 #define proye 74+posin #define cuenta 0 #define pulsos 0 #define ruta 0 #define prinum 0 #define ring 0 #define antran 0 // anexo transferido #define fofech americano #define ampm 15 #define incomin 28 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),hopm,j, cont; char shora[5]; char aux,vtip; aux = 0;cont=0; if (i>vdurac && buf[vfech+2]=='/' && buf[vfech+5]=='/' && buf[vhor+2]==':' && buf[vdurac+2]==':' ) { 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] ; tel[k++] = buf[vdurac+1] ; if (tel[ka]==' ') tel[ka]='0' ; tel[k++] = ':' ; tel[k++]= buf[vdurac+3] ; tel[k++]= buf[vdurac+4] ; tel[k++]= ':' ; tel[k++]= buf[vdurac+6] ; tel[k++]= buf[vdurac+7] ; tel[k++]= ' ' ; ka=k; // if (buf[vhor]!=' ') { shora[0] = buf[vhor] ; shora[1] = buf[vhor+1] ; shora[2] = '\0' ; } else { shora[0] = buf[vhor+1] ; shora[1] = '\0' ; } // /* shora[0] = buf[vhor] ; shora[1] = buf[vhor+1] ; shora[2] = '\0' ; */ hopm=atoi(shora) ; if (buf[vhor+5]=='P' && hopm< 12) itoa((hopm+12),shora,10) ; if (buf[vhor+5]=='A' && hopm==12) itoa((hopm-12),shora,10) ; if (shora[2]=='\0') { if (buf[vhor+5]!='A') { tel[k++] = shora[0] ; tel[k++] = shora[1] ; } else if (shora[1]!='\0') { tel[k++] = shora[0] ; tel[k++] = shora[1] ; } } if (shora[1]=='\0') { tel[k++] = '0' ; tel[k++] = shora[0] ; } if (tel[ka]==' ') tel[ka]='0' ; tel[k++] = ':' ; tel[k++] = buf[vhor+3] ; tel[k++] = buf[vhor+4] ; tel[k++] = ' ' ; if (vfofech==europeo) { tel[k++] = buf[3]; tel[k++] = buf[4]; tel[k++] = buf[2]; tel[k++] = buf[0]; tel[k++] = buf[1]; } else { tel[k++] = buf[0]; tel[k++] = buf[1]; tel[k++] = buf[2]; tel[k++] = buf[3]; tel[k++] = buf[4]; } tel[k++] = buf[5]; tel[k++] = buf[6]; tel[k++] = buf[7]; tel[k++] = ' ' ; if ( isdigit(buf[vnumero]) || buf[vnumero]=='F') vtip = 'O' ; else vtip = 'I' ; tel[k++] = vtip ; tel[k++] = ' ' ; if (vtip =='I') { for (j=0;j<15;j++) { if (isdigit(buf[vnumero+j+20])) {tel[k++]=buf[vnumero+j+20] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; } else { for (j=0;j<15;j++) { if (isdigit(buf[vnumero+j])) {tel[k++]=buf[vnumero+j] ; cont++;} } if(cont==0)tel[k++] = '*';cont=0; } tel[k++] = ' ' ; tel[k++] = '*' ; tel[k++] = '*' ; tel[k++] = '*' ; tel[k++] = ' ' ; for (it=vproye; it<(vproye+4) && it