#define americano 0 #define europeo 1 #define lmax 300 #define posin 18 #define ladat 120+posin #define estac 58+posin // llamadas salientes #define nanexo 51+posin // llamadas entrantes #define linea 105+posin #define durac 12+posin #define hor 7 +posin #define fech 3 +posin #define tranf 23+posin #define numero 32+posin #define ccost 0 #define proye 92+posin #define cuenta 68+posin #define pulsos 17+posin #define ruta 102+posin #define prinum 0 #define ring 99+posin #define antran 0 // anexo transferido (pendiente) #define fofech americano // formato de fecha #define larnum 25 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>(vlinea+2)) { tilla = (buf[vtranf]==' ' || buf[vtranf]=='A' || buf[vtranf]=='D' || buf[vtranf]=='G' || 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]) && isdigit(buf[vring])) ; } else tilla = FALSE; if (tilla) { k = 0 ; if((buf[vtranf]=='N' && buf[vtranf+1]=='I') || buf[vtranf]=='I' || (buf[vtranf]=='T' && buf[vruta]==' ')) { if (buf[vtranf]=='I' || buf[vtranf]=='T') for (it=0;it<6;it++) tel[k++] = buf[nanexo+it] ; else for (it=0;it<6 && (vruta+it)