#define americano 0 #define europeo 1 #define lmax 300 #define posin 18 #define ladat 120+posin #define estac 38+posin #define linea 15+posin #define durac 7+posin #define hor 3 +posin #define fech 0 #define tranf 13+posin //#define numero 14+posin #define numero 14+posin+4 #define ccost 0 #define proye 43+posin // check #define cuenta 0 #define pulsos 0 #define ruta 0 #define prinum 0 #define ring 0 #define antran 0 // anexo transferido (pendiente) #define fofech americano // formato de fecha #define larnum 34 extern void gua_rut(char *buf); char ruanex[(lmax+1)*2][7] ; /* Rutas Consideradas como Anexos */ extern char rgua[]; // Procesos Inicialiales (Inicializar Variables, Abrir // Archivos especiales, etc) void in_central() { rgua[0] = '\0'; } // Procesos de Finalización (Cerrar Archivos especiales, etc) void fi_central() { } // Driver Propiamente tal. Las posiciones de los campos se // ingresan como parámetros, lo que permite modificar desde // Aplicación de Tarificación la posición de estos en el // Registro de Llamados. 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) { char segu[3],tilla ; int i=strlen(buf),it,k,ka,minu; char aux; aux = 0; if (i>(vestac+2)) { tilla = (buf[vtranf]==' ' || buf[vtranf]=='A' || buf[vtranf]=='D' || buf[vtranf]=='G' || buf[vtranf]=='H' || buf[vtranf]=='I' || buf[vtranf]=='J' || buf[vtranf]=='L') ; tilla = (tilla || buf[vtranf]=='N' || buf[vtranf]=='M' || buf[vtranf]=='T' || buf[vtranf]=='V' || buf[vtranf]=='X' || buf[vtranf]=='Y') ; tilla = (tilla && isdigit(buf[vfech]) && isdigit(buf[vhor]) && isdigit(buf[vdurac+1]) ) ; } else tilla = FALSE; if (tilla) { k = 0 ; ka = 0 ; // if (buf[vtranf]!='I'&& buf[vtranf]!='J') // { for (it=0;it<5;it++) tel[k++] = buf[vestac+it] ; // } // else if (buf[vtranf-1]=='N' && buf[vtranf]=='I') { for (it=0;it<5 && (vlinea-1+it)