#define americano 0 #define europeo 1 #define lmax 200 #define posin 18 #define ladat 90+posin #define estac 62+posin // llamadas entrantes #define linea 71+posin #define durac 39+posin //hora de termino #define hor 25+posin //hora inicio #define fech 18+posin #define tranf 5 +posin #define numero 125+posin #define ccost 0 #define proye 149+posin #define cuenta 164+posin #define pulsos 0 #define ruta 109+posin #define prinum 179+posin #define ring 0 #define antran 125+posin // anexo transferido (pendiente) #define fofech europeo // formato de fecha int k, posi_dura, dura_cero; 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() { } resta_horas(char *buf, char *tel, int pos_fin) { int a, b, dur_val, hora, minu, segu; a= (buf[pos_fin+0]-'0')*36000; //hora final en segundos a=a+(buf[pos_fin+1]-'0')*3600; a=a+(buf[pos_fin+2]-'0')*600; a=a+(buf[pos_fin+3]-'0')*60; a=a+(buf[pos_fin+4]-'0')*10; a=a+(buf[pos_fin+5]-'0'); b= (buf[pos_fin-7+0]-'0')*36000; //hora inicial en segundos b=b+(buf[pos_fin-7+1]-'0')*3600; b=b+(buf[pos_fin-7+2]-'0')*600; b=b+(buf[pos_fin-7+3]-'0')*60; b=b+(buf[pos_fin-7+4]-'0')*10; b=b+(buf[pos_fin-7+5]-'0'); if (avprinum && !line_only && !no_contesta && buf[vfech-1]==' ' && isdigit(buf[vfech]) && buf[vhor-1]==' ' && buf[vestac-1]==' ' && isdigit(buf[vhor+1]) && isdigit(buf[vdurac]) && buf[vtranf-1]==' ' && buf[estac-1]==' ' && (isdigit(buf[vestac]) || buf[vestac]=='-') && buf[vprinum-1]==' ' && isdigit(buf[vprinum]) && isdigit(buf[vprinum+1]) && (isdigit(buf[vruta]) || buf[vruta]=='-') && (buf[vlinea]=='-' || isdigit(buf[vlinea])) && (isdigit(buf[vnumero]) || buf[vnumero]=='-') && buf[vnumero-1]==' ' && buf[vdurac-1]==' ' && isdigit(buf[vdurac]) && isdigit(buf[hor+5]) && isdigit(buf[vdurac+5]) && buf[vestac+4]==' ' && buf[vproye-1]==' ' && isdigit(buf[vfech+2]) && isdigit(buf[vfech+5]) ) { if (buf[vestac]=='-' && buf[vruta-5]=='-' && buf[vruta]=='-') goto henry; k = 0 ; posi_dura=vdurac; if (buf[vtranf+1]=='0' && buf[vtranf+2]=='4' && tandem==0) tandem=1; //troncal-troncal for(j=0;j<17 && isdigit(buf[vnumero+j]);j++) lar_num=j+1; for(j=0;j<14 && isdigit(buf[vproye +j]);j++) lar_ani=j+1; //anexo if (buf[vestac-5]=='-' && buf[vestac]=='-' && buf[vruta-5]=='-' && buf[vnumero]=='-') goto henry;//tel[k++]='*'; else if (tandem==1) { tel[k++]='R'; tel[k++]=buf[vlinea-4]; tel[k++]=buf[vlinea-3]; tel[k++]=buf[vlinea-2]; } else if isdigit(buf[vestac]) { for(j=0;jlar_anexo+1)// && tandem!=1) { for(j=0;jlar_anexo+1) { for(j=0;j