Only in ./trunk/src: .deps Only in ./qico/src: .gitignore Only in ./qico/src: CMakeLists.txt Only in ./trunk/src: Makefile diff -Bburw ./qico/src/Makefile.am ./trunk/src/Makefile.am --- ./qico/src/Makefile.am 2024-02-01 18:09:52.531005000 +0300 +++ ./trunk/src/Makefile.am 2024-02-01 18:10:34.599159000 +0300 @@ -1,4 +1,4 @@ -# $Id: Makefile.am,v 1.12 2005/08/22 17:21:32 mitry Exp $ +# $Id: Makefile.am 26 2010-10-25 13:14:56Z semik $ sbin_PROGRAMS = qico bin_PROGRAMS = qctl @QCC@ @@ -23,8 +23,7 @@ EXTRA_qico_SOURCES = binkp.c perl.c -qico_LDADD = @LIBOBJS@ @LIB_MALLOC@ @BINKP_O@ @PERL_O@ -qico_LDFLAGS = @PERLLDFLAGS@ +qico_LDADD = @LIBOBJS@ @LIB_MALLOC@ @BINKP_O@ @PERL_O@ @PERLLDFLAGS@ qico_DEPENDENCIES = @BINKP_O@ @PERL_O@ qctl_SOURCES = qctl.c clserv.c md5q.c qslib.c Only in ./trunk/src: Makefile.in Only in ./qico/src: anylist.c Only in ./qico/src: anylist.h diff -Bburw ./qico/src/binkp.c ./trunk/src/binkp.c --- ./qico/src/binkp.c 2024-02-01 20:44:10.345036000 +0300 +++ ./trunk/src/binkp.c 2024-02-01 20:44:15.968797000 +0300 @@ -2,9 +2,27 @@ * Binkp protocol implementation. ******************************************************************/ /* - * $Id: binkp.c,v 1.20 2005/08/22 17:19:41 mitry Exp $ + * $Id: binkp.c 48 2014-11-29 09:03:48Z semik $ * * $Log: binkp.c,v $ + * Revision 1.26 2007/03/19 23:58:06 mitry + * *** empty log message *** + * + * Revision 1.25 2007/03/19 23:39:41 mitry + * ND mode should be implemented + * + * Revision 1.24 2006/07/10 16:16:29 mitry + * Binkp: prevent infinite calling system if some files were suspended + * + * Revision 1.23 2006/04/14 18:55:10 mitry + * Drop session if secure aka is busy. + * + * Revision 1.22 2005/12/03 02:44:19 mitry + * Fixed session timeout between two qicos + * + * Revision 1.21 2005/09/06 20:42:04 mitry + * Added macros to qpreset() calls + * * Revision 1.20 2005/08/22 17:19:41 mitry * Changed names of functions to more proper form * @@ -149,7 +167,10 @@ break; case 'd': /* No dupes mode */ + break; +#if 0 bps->opt_nd |= O_NO; /*mode?O_THEY:O_NO;*/ +#endif case 'r': /* Non-reliable mode */ bps->opt_nr |= to ? O_WANT : O_NO; @@ -174,6 +195,7 @@ } bps->MD_chal = NULL; + bps->was_suspend = 0; return OK; } @@ -368,7 +390,7 @@ ti = time( NULL ); TZOFFSET = gmtoff( ti ); - memcpy( &tt, localtime( &ti ), sizeof( struct tm )); + memmove( &tt, localtime( &ti ), sizeof( struct tm )); #define BMALTL ((size_t)((byte *) buf - (byte *) arg ) < len ) @@ -496,11 +518,7 @@ { write_log("Binkp: got bad VER message: %s", buf ); } - if ( BP_VER( bp ) <= 100 ) - { - bp->delay_eob = 1; } - } else if ( !strncmp( buf, "TRF ", 4 )) { n = skip_blanks( buf + 4 ); @@ -513,11 +531,7 @@ rnode->files = atoi( n ); } } - if ( rnode->netmail + rnode->files ) - { - bp->delay_eob = 1; } - } else if( !strncmp( buf, "FREQ", 4 )) { bp->delay_eob = 1; @@ -545,6 +559,7 @@ { bp->opt_mb |= O_WE; } +#if 0 else if( !strcmp( p, "ND" )) { bp->opt_nd |= O_WE; @@ -553,6 +568,7 @@ { bp->opt_nd |= O_EXT; } +#endif else if( !strcmp( p, "CHAT" )) { bp->opt_cht |= O_WE; @@ -631,22 +647,22 @@ /* Search for duplicated remote akas */ if ( !falist_find( rnode->addrs, &fa )) { - if ( outbound_locknode( &fa, LCK_s )) + char *rpwd = findpwd( &fa ); + falist_t *xfa; + + xfa = falist_add( &rnode->addrs, &fa ); + if ( outbound_locknode( &xfa->addr, LCK_s )) { DEBUG(('B',4,"locked: %s", rem_aka)); - if ( !bp->to && !rem_pwd ) + if ( !bp->to && !rem_pwd && rpwd ) { - rem_pwd = findpwd( &fa ); - if ( rem_pwd ) - { + rem_pwd = rpwd; DEBUG(('B',4,"found pwd '%s' for %s", rem_pwd, rem_aka)); } - } rc++; - falist_add( &rnode->addrs, &fa ); makeflist( &fl, &fa, bp->to ); DEBUG(('B',4,"totalm: %lu, totalf: %lu", totalm, totalf)); @@ -654,9 +670,17 @@ } else { - write_log( "Can't lock outbound for %s", ftnaddrtoa( &fa )); + write_log( "Can't lock outbound for %saka %s", + (rpwd ? "secure " : ""), ftnaddrtoa( &fa )); + if ( rpwd ) + { + log_rinfo( rnode ); + msgs( BPM_BSY, "Secure aka is busy" ); + bp->rc = ( bp->to ? S_REDIAL | S_ADDTRY : S_BUSY ); + return 0; } } + } else { DEBUG(('B',4,"removed duplicated aka: %s", rem_aka)); @@ -761,10 +785,6 @@ bp->opt_nd = O_NO; } - if ( !rnode->phone || !*rnode->phone ) - { - restrcpy( &rnode->phone, "-Unpublished-" ); - } if ( !( rnode->options & O_PWD ) || bp->opt_md != O_YES ) { bp->opt_cr = O_NO; @@ -827,10 +847,7 @@ bp->opt_mb = O_NO; } - if ( BP_VER( bp ) > 100 ) - { - bp->delay_eob = 0; - } + bp->delay_eob = ( BP_VER( bp ) < 101 ); snprintf( tmp, 255, "Binkp%s%s%s%s%s%s%s%s%s", ( rnode->options & O_LST ) ? "/LST" : "", @@ -847,8 +864,8 @@ title( "%sbound session %s", bp->to ? "Out" : "In", ftnaddrtoa( &rnode->addrs->addr )); qemsisend( rnode ); - qpreset( 0 ); - qpreset( 1 ); + qpreset( QPR_RECV ); + qpreset( QPR_SEND ); sendf.allf = totaln; sendf.ttot = totalf + totalm; @@ -1061,7 +1078,7 @@ ( bp->opt_nd & O_THEY ) ? " ND" : "", ( bp->opt_mb & O_WANT ) ? " MB" : "", ( bp->opt_cht & O_WANT ) ? " CHAT" : "", - (( !( bp->opt_nd & O_WE )) != ( !( bp->opt_nd & O_THEY ))) ? " NDA": "", + /*(( !( bp->opt_nd & O_WE )) != ( !( bp->opt_nd & O_THEY ))) ? " NDA":*/ "", (( bp->opt_cr & O_WE ) && ( bp->opt_cr & O_THEY )) ? " CRYPT" : "" ); if ( strlen( tmp )) { @@ -1144,6 +1161,8 @@ } } + qpreset( QPR_RECV ); + DEBUG(('B',4,"cls=%d, sent_eob=%d, recv_eob=%d", bp->cls, bp->sent_eob, bp->recv_eob)); return 1; @@ -1190,7 +1209,8 @@ static int M_get(BPS *bp, byte *arg) { char *buf = (char *) arg, *fname; - long fsize, ftime, foffs; + long fsize, foffs; + time_t ftime; DEBUG(('B',3,"GET %s", buf)); @@ -1237,7 +1257,8 @@ char *buf = (char *) arg; char *fname; int id = *bp->rx_buf; - long fsize, ftime; + long fsize; + time_t ftime; DEBUG(('B',3,"%s %s", mess[id], buf)); @@ -1246,15 +1267,18 @@ if ( sendf.fname && !strncasecmp( fname, sendf.fname, MAX_PATH ) && sendf.mtime == ftime && sendf.ftot == fsize ) { + int is_skip = ( id == BPM_SKIP ); + if ( bp->send_file ) { DEBUG(('B',1,"file %s %s", sendf.fname, - ( id == BPM_GOT ) ? "skipped" : "suspended")); + is_skip ? "suspended" : "skipped")); - txclose( &txfd, ( id == BPM_GOT ) ? FOP_SKIP : FOP_SUSPEND ); - bp->ticskip = ( id == BPM_GOT ) ? 1 : 2; - bp->oflist->suspend = ( id == BPM_SKIP ); + txclose( &txfd, is_skip ? FOP_SUSPEND : FOP_SKIP ); + bp->ticskip = is_skip + 1; + bp->oflist->suspend = is_skip; + bp->was_suspend += is_skip; flexecute( bp->oflist ); bp->send_file = 0; qpfsend(); @@ -1265,13 +1289,14 @@ { DEBUG(('B',1,"file %s %s", sendf.fname, - ( id == BPM_GOT ) ? "done" : "suspended")); + is_skip ? "suspended" : "done")); bp->wait_got = 0; - txclose( &txfd, ( id == BPM_GOT ) ? FOP_OK : FOP_SUSPEND ); + txclose( &txfd, is_skip ? FOP_SUSPEND : FOP_OK ); - bp->ticskip = ( id == BPM_GOT ) ? 0 : 2; - bp->oflist->suspend = ( id == BPM_SKIP ); + bp->ticskip = is_skip ? 2 : 0; + bp->oflist->suspend = is_skip; + bp->was_suspend += is_skip; flexecute( bp->oflist ); qpfsend(); } @@ -1280,54 +1305,9 @@ write_log( "Binkp: got M_%s for unknown file", mess[id] ); } } -#if 0 - if ( bp->send_file && sendf.fname && !strncasecmp( fname, sendf.fname, MAX_PATH ) - && sendf.mtime == ftime && sendf.ftot == fsize ) - { - - DEBUG(('B',1,"file %s %s", sendf.fname, ( id == BPM_GOT ) ? "skipped" : "suspended")); - txclose( &txfd, ( id == BPM_GOT ) ? FOP_SKIP : FOP_SUSPEND ); - if ( id == BPM_GOT ) - { - flexecute( bp->oflist ); - bp->ticskip = 1; } else { - bp->ticskip = 2; - } - bp->send_file = 0; - qpfsend(); - return 1; - } - - if ( bp->wait_got && sendf.fname && !strncasecmp( fname, sendf.fname, MAX_PATH ) - && sendf.mtime == ftime && sendf.ftot == fsize ) - { - - DEBUG(('B',1,"file %s %s", sendf.fname, ( id == BPM_GOT ) ? "done" : "suspended")); - bp->wait_got = 0; - txclose( &txfd, ( id == BPM_GOT ) ? FOP_OK : FOP_SUSPEND ); - - if ( id == BPM_GOT ) - { - flexecute( bp->oflist ); - bp->ticskip = 0; - } - else - { - bp->ticskip = 2; - } - qpfsend(); - } - else - { - write_log( "Binkp: got M_%s for unknown file", mess[id] ); - } -#endif - } - else - { DEBUG(('B',1,"got unparsable fileinfo")); } return 1; @@ -1389,7 +1369,7 @@ break; } - memcpy( (void *) (bp->tx_buf + bp->tx_left), + memmove( (void *) (bp->tx_buf + bp->tx_left), bp->mqueue[i].msg, bp->mqueue[i].len ); bp->tx_left += bp->mqueue[i].len; xfree( bp->mqueue[i].msg ); @@ -1407,10 +1387,11 @@ { int blksz = MIN( BP_BLKSIZE, sendf.ftot - bp->txpos ); - if (( rc = fread( bp->tx_buf + BLK_HDR_SIZE, 1, blksz, txfd )) < 0 ) + if (( rc = fread( bp->tx_buf + BLK_HDR_SIZE, 1, blksz, txfd )) < blksz ) { sline("Binkp: file read error at pos %lu", bp->txpos); - DEBUG(('B',1,"Binkp: file read error at pos %lu", bp->txpos)); + write_log( "file read error at pos %lu: read %i, expected %i", + bp->txpos, rc, blksz ); txclose( &txfd, FOP_ERROR ); bp->send_file = 0; } @@ -1480,7 +1461,8 @@ DEBUG(('B',4,"got: data %d",bp->rx_size)); DEBUG(('B',4,"data: rxpos %lu, recvf.foff %lu", (long) bp->rxpos, (long) recvf.foff )); - snprintf( tmp, 511, "%s %lu %lu", bp->rfname, (long) recvf.ftot, bp->rmtime ); + snprintf( tmp, 511, "%s %lu %lu", bp->rfname, (long) recvf.ftot, + (long unsigned) bp->rmtime ); if ( rxstatus ) { @@ -1490,7 +1472,7 @@ return 1; } - if (( n = fwrite( bp->rx_buf, 1, bp->rx_size, rxfd )) < 0 ) + if (( n = fwrite( bp->rx_buf, 1, bp->rx_size, rxfd )) < bp->rx_size ) { bp->recv_file = 0; sline( "Binkp: file write error" ); @@ -1727,7 +1709,7 @@ if ( bp->to ) { - msgs( BPM_NUL, "OPT NDA%s%s%s%s%s", + msgs( BPM_NUL, "OPT %s%s%s%s%s", ( bp->opt_nr & O_WANT ) ? " NR" : "", ( bp->opt_nd & O_THEY ) ? " ND" : "", ( bp->opt_mb & O_WANT ) ? " MB" : "", @@ -1779,11 +1761,12 @@ } bps->remaddr = remaddr; - xfree( rnode->phone ); + restrcpy( &rnode->phone, "-Unpublished-" ); rxstatus = 0; totaln = totalf = totalm = 0; got_req = 0; + emsi_lo = ( is_freq_available() == FR_NOTHANDLED ) ? O_NOFREQS : 0; receive_callback = receivecb; write_log( "starting %sbound Binkp session", mode ? "out" : "in" ); @@ -1857,6 +1840,7 @@ { msgs( BPM_EOB, NULL ); bps->sent_eob = 1; + qpreset( QPR_SEND ); } bps->rc = S_OK; @@ -1864,11 +1848,12 @@ if ( bps->sent_eob && bps->recv_eob ) { DEBUG(('B',4,"mib=%d", bps->mib)); - if ( bps->mib < 3 || BP_VER( bps ) <= 100 ) + if ( bps->mib < 3 || BP_VER( bps ) < 101 ) { break; } bps->mib = bps->sent_eob = bps->recv_eob = 0; + continue; } wd = ( bps->nmsgs || bps->tx_left || ( bps->send_file && txfd && !bps->wait_for_get)); @@ -1911,6 +1896,11 @@ { DEBUG(('S',3,"Binkp chat autoclosed (%s)", timer_expired(chattimer) ? "timeout" : "hangup" )); msgs( BPM_EOB, NULL ); + } + + if ( bps->to && bps->was_suspend ) + { + bps->rc |= ( S_REDIAL | S_ADDTRY ); } rc = bps->rc; diff -Bburw ./qico/src/binkp.h ./trunk/src/binkp.h --- ./qico/src/binkp.h 2024-02-01 18:09:52.531635000 +0300 +++ ./trunk/src/binkp.h 2024-02-01 18:10:34.580247000 +0300 @@ -1,6 +1,6 @@ /****************************************************************** * BinkP protocol - * $Id: binkp.h,v 1.7 2005/08/22 17:19:41 mitry Exp $ + * $Id: binkp.h 53 2023-10-12 08:43:45Z semik $ ******************************************************************/ #ifdef WITH_BINKP @@ -124,6 +124,8 @@ char *rfname; /* Receiving file name */ time_t rmtime; /* ... mtime */ + + byte was_suspend; /* Remote suspended some files */ int ticskip; int nofiles; diff -Bburw ./qico/src/call.c ./trunk/src/call.c --- ./qico/src/call.c 2024-02-01 20:54:38.326070000 +0300 +++ ./trunk/src/call.c 2024-02-01 20:54:27.405472000 +0300 @@ -2,7 +2,7 @@ * outgoing call implementation **********************************************************/ /* - * $Id: call.c,v 1.10 2005/08/16 20:23:23 mitry Exp $ + * $Id: call.c 18 2010-08-23 15:50:49Z semik $ * * $Log: call.c,v $ * Revision 1.10 2005/08/16 20:23:23 mitry diff -Bburw ./qico/src/charset.h ./trunk/src/charset.h --- ./qico/src/charset.h 2024-02-01 18:09:52.531816000 +0300 +++ ./trunk/src/charset.h 2024-02-01 18:10:34.581993000 +0300 @@ -1,6 +1,6 @@ /********************************************************** * koi8r->cp866 and cp866->koi8-r tables by sisoft\\trg. - * $Id: charset.h,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ + * $Id: charset.h 18 2010-08-23 15:50:49Z semik $ **********************************************************/ #ifndef __CHARSET_H__ #define __CHARSET_H__ diff -Bburw ./qico/src/clserv.c ./trunk/src/clserv.c --- ./qico/src/clserv.c 2024-02-01 20:54:38.328604000 +0300 +++ ./trunk/src/clserv.c 2024-02-01 20:54:27.408027000 +0300 @@ -2,9 +2,12 @@ * client/server tools **********************************************************/ /* - * $Id: clserv.c,v 1.6 2005/08/22 17:12:45 mitry Exp $ + * $Id: clserv.c 48 2014-11-29 09:03:48Z semik $ * * $Log: clserv.c,v $ + * Revision 1.7 2006/07/18 22:22:09 mitry + * Make qico daemon to start on FreeBSD 4.6.2 :) + * * Revision 1.6 2005/08/22 17:12:45 mitry * Close socket fd if didn't make connection * @@ -46,30 +49,35 @@ struct sockaddr_in sa; struct servent *se; + memset( &sa, 0, sizeof sa); sa.sin_family = AF_INET; DEBUG(('I',1,"cls_conn: type=%d, port=%s, addr=%s", type, port, addr)); - if ( port && atoi( port )) + if ( port ) { + if ( atoi( port )) + { sa.sin_port = htons( atoi( port )); } - else if( port && ( se = getservbyname( port, (type & CLS_UDP ) ? "udp" : "tcp" ))) + else if (( se = getservbyname( port, ( type & CLS_UDP ) ? "udp" : "tcp" ))) { sa.sin_port = se->s_port; } - else if( !port && ( se = getservbyname( "qicoui", ( type & CLS_UDP ) ? "udp" : "tcp" ))) + else { - sa.sin_port = se->s_port; + DEBUG(('I',1,"cls_conn: can't parse port")); + errno = EINVAL; + return -1; } - else if( !port ) + } + else if (( se = getservbyname( "qicoui", ( type & CLS_UDP ) ? "udp" : "tcp" ))) { - sa.sin_port = htons( DEF_SERV_PORT ); + sa.sin_port = se->s_port; } else { - errno = EINVAL; - return -1; + sa.sin_port = htons( DEF_SERV_PORT ); } if ( addr ) @@ -83,7 +91,7 @@ } else if (( he = gethostbyname( addr ))) { - memcpy( &sa.sin_addr, he->h_addr, he->h_length ); + memmove( &sa.sin_addr, he->h_addr, he->h_length ); } else { @@ -188,7 +196,7 @@ } b = xmalloc( len + 2 ); STORE16( b, l ); - memcpy( b + 2, buf, len ); + memmove( b + 2, buf, len ); rc = sendto( sock, b, len + 2, 0, to, sizeof( struct sockaddr )); xfree( b ); return rc; @@ -260,7 +268,7 @@ { rc = len - 2; } - memcpy( buf, buf + 2, rc ); + memmove( buf, buf + 2, rc ); return rc; } return 0; diff -Bburw ./qico/src/clserv.h ./trunk/src/clserv.h --- ./qico/src/clserv.h 2024-02-01 18:09:52.531991000 +0300 +++ ./trunk/src/clserv.h 2024-02-01 18:10:34.582614000 +0300 @@ -1,4 +1,4 @@ -/* $Id: clserv.h,v 1.3 2005/05/16 11:17:30 mitry Exp $ +/* $Id: clserv.h 18 2010-08-23 15:50:49Z semik $ * * $Log: clserv.h,v $ * Revision 1.3 2005/05/16 11:17:30 mitry diff -Bburw ./qico/src/config.c ./trunk/src/config.c --- ./qico/src/config.c 2024-02-01 20:54:38.336752000 +0300 +++ ./trunk/src/config.c 2024-02-01 20:54:27.424593000 +0300 @@ -2,7 +2,7 @@ * Config parser. **********************************************************/ /* - * $Id: config.c,v 1.10 2005/08/23 16:51:29 mitry Exp $ + * $Id: config.c 32 2012-12-06 12:41:51Z semik $ * * $Log: config.c,v $ * Revision 1.10 2005/08/23 16:51:29 mitry @@ -34,6 +34,9 @@ #define IS_COMMENT( t ) ( *t == ';' || *t == '#' || ( *t== '/' && t[1] == '/' )) +#define REQUIRED_PARAM (1) +#define NONIF_PARAM (2) +#define CONFIGURED_PARAM (8) static int getstr(char **to, const char *from) { @@ -286,7 +289,7 @@ return 0; } - if ( curcond && ( configtab[i].flags & 2 )) + if ( curcond && ( configtab[i].flags & NONIF_PARAM )) { write_log( "%s:%d: keyword '%s' can't be defined inside if-expression", cfgname, line, kw ); @@ -318,11 +321,11 @@ if ( setvalue( ci, arg, configtab[i]. type )) { - if ( !( configtab[i].flags & 8 )) + if ( !( configtab[i].flags & CONFIGURED_PARAM )) { if ( !curcond ) { - configtab[i].flags |= 8; + configtab[i].flags |= CONFIGURED_PARAM; } else { @@ -647,10 +650,11 @@ return 0; } for(i=0; iaddr.z ) == 0 ) { @@ -776,7 +775,9 @@ xfree(c); } configtab[i].items=NULL; - configtab[i].flags=0; +// fprintf(stderr,"%i '%s' 0x%x -> ", i, configtab[i].keyword, configtab[i].flags); + configtab[i].flags &= (REQUIRED_PARAM | NONIF_PARAM); +// fprintf(stderr,"0x%x\n",configtab[i].flags); } } diff -Bburw ./qico/src/crc.c ./trunk/src/crc.c --- ./qico/src/crc.c 2024-02-01 20:54:38.342158000 +0300 +++ ./trunk/src/crc.c 2024-02-01 20:54:27.437612000 +0300 @@ -2,7 +2,7 @@ * CRC and crypt. **********************************************************/ /* - * $Id: crc.c,v 1.5 2005/05/06 20:26:57 mitry Exp $ + * $Id: crc.c 18 2010-08-23 15:50:49Z semik $ * * $Log: crc.c,v $ * Revision 1.5 2005/05/06 20:26:57 mitry diff -Bburw ./qico/src/crc.h ./trunk/src/crc.h --- ./qico/src/crc.h 2024-02-01 18:09:52.532349000 +0300 +++ ./trunk/src/crc.h 2024-02-01 18:10:34.581408000 +0300 @@ -2,7 +2,7 @@ * operations with CRC **********************************************************/ /* - * $Id: crc.h,v 1.6 2005/05/06 20:26:57 mitry Exp $ + * $Id: crc.h 18 2010-08-23 15:50:49Z semik $ * * $Log: crc.h,v $ * Revision 1.6 2005/05/06 20:26:57 mitry diff -Bburw ./qico/src/cvsdate.h ./trunk/src/cvsdate.h --- ./qico/src/cvsdate.h 2024-02-01 18:09:52.532393000 +0300 +++ ./trunk/src/cvsdate.h 2024-02-01 18:10:34.598222000 +0300 @@ -1 +1 @@ -char cvsdate[]="2013-02-23 10:16"; +char cvsdate[]="2012-12-27 12:00"; diff -Bburw ./qico/src/daemon.c ./trunk/src/daemon.c --- ./qico/src/daemon.c 2024-02-01 20:54:38.394799000 +0300 +++ ./trunk/src/daemon.c 2024-02-01 20:54:27.450452000 +0300 @@ -2,9 +2,15 @@ * qico daemon **********************************************************/ /* - * $Id: daemon.c,v 1.18 2005/08/16 14:46:44 mitry Exp $ + * $Id: daemon.c 48 2014-11-29 09:03:48Z semik $ * * $Log: daemon.c,v $ + * Revision 1.20 2007/03/19 23:41:39 mitry + * Fixed longrescan + * + * Revision 1.19 2007/01/28 17:55:00 mitry + * Add support for INA flag and IBN/IFC optional port number. + * * Revision 1.18 2005/08/16 14:46:44 mitry * Changed DEBUG message * @@ -71,7 +77,7 @@ static cls_ln_t *ln = NULL; static volatile int t_dial = 0; static volatile int c_delay; -static volatile int rnum; +static volatile signed int rnum; static volatile int reread_config = 0; #ifdef HAVE_DNOTIFY @@ -218,7 +224,7 @@ DEBUG(('I',4,"got emsi (%d)",lins->emsi?rc:0)); if(lins->emsi) { - memcpy(lins->emsi,buf,rc); + memmove(lins->emsi,buf,rc); } lins->emsilen=rc; } @@ -765,16 +771,14 @@ title( "Queue manager [%d]", rescanperiod - t_rescan ); if ( t_rescan >= rescanperiod || do_rescan ) { - if ( rnum < 0 ) + if ( !q_rescan( ¤t, (int)(!rnum))) { - rnum = cfgi( CFG_LONGRESCAN ) - 1; - } - do_rescan = 0; - if ( !q_rescan( ¤t, rnum == 0 )) - { write_log("can't rescan outbound"); } - rnum = rnum + 1; + rnum = ( rnum < 1 ) ? + (cfgi( CFG_LONGRESCAN ) > 0 ? cci - 1 : 0) : + rnum - 1; + do_rescan = 0; t_rescan = 0; } @@ -853,10 +857,13 @@ { xfree(rnode->tty); - if(rnode->host) + if((rnode->opt&(MO_BINKP|MO_IFC)) && rnode->host) { static struct stat s; static char lckname[MAX_PATH]; + char *newhost = NULL; + + DEBUG(('Q',3,"host: '%s'",rnode->host)); snprintf(lckname,MAX_PATH,"%s.tcpip",cfgs(CFG_NODIAL)); if(!stat(lckname,&s)) { @@ -867,6 +874,10 @@ { bink=1; } + newhost = nodehostname( rnode, bink ); + xfree( rnode->host ); + rnode->host = xstrdup( newhost ); + DEBUG(('Q',3,"host: '%s'",rnode->host)); xstrcpy(ip_id,"ipline",10); rnode->tty=xstrdup(bink?"binkp":"tcpip"); } @@ -1051,11 +1062,7 @@ bink=0; DEBUG(('Q',1,"nlkill")); nlkill(&rnode); - current=current->next; - if(!current) - { - current=q_queue; - } + current = ( current->next ? current->next : q_queue ); i=i->next; } } @@ -1139,7 +1146,7 @@ lins=xmalloc(sizeof(cls_ln_t)); lins->id=FETCH16(buf); lins->addr=xmalloc(salen); - memcpy(lins->addr,&sa,salen); + memmove(lins->addr,&sa,salen); lins->emsi=NULL; lins->emsilen=0; lins->next=NULL; diff -Bburw ./qico/src/defs.h ./trunk/src/defs.h --- ./qico/src/defs.h 2024-02-01 18:09:52.532880000 +0300 +++ ./trunk/src/defs.h 2024-02-01 18:10:34.589837000 +0300 @@ -1,6 +1,6 @@ /********************************************************** * common definitions - * $Id: defs.h,v 1.5 2005/05/16 20:33:46 mitry Exp $ + * $Id: defs.h 18 2010-08-23 15:50:49Z semik $ **********************************************************/ #ifndef __DEFS_H__ #define __DEFS_H__ @@ -51,5 +51,29 @@ #define DM_NODELIST 2 #define DM_CONFIG 3 #define DM_CALL 12 + + +/* qcc */ +#define CLN_IPLINE "ipline" +#define CLN_IPLINE_LEN 7 +#define CLN_MASTER "master" +#define CLN_MASTER_LEN 7 + +#define QPR_RECV 0 +#define QPR_SEND 1 + +#ifdef HAVE_ATTR_PACKED +#define PPACK __attribute__ ((__packed__)) +#else +#define PPACK +#endif + + +#ifdef MAXPATHLEN +# define MAX_PATH MAXPATHLEN +#else +# define MAX_PATH 1024 +#endif + #endif Only in ./qico/src: des.c Only in ./qico/src: des.h diff -Bburw ./qico/src/emsi.c ./trunk/src/emsi.c --- ./qico/src/emsi.c 2024-02-01 20:42:42.452550000 +0300 +++ ./trunk/src/emsi.c 2024-02-01 20:54:27.459930000 +0300 @@ -2,7 +2,7 @@ * EMSI management. **********************************************************/ /* - * $Id: emsi.c,v 1.24 2005/08/12 15:36:19 mitry Exp $ + * $Id: emsi.c 48 2014-11-29 09:03:48Z semik $ * * $Log: emsi.c,v $ * Revision 1.24 2005/08/12 15:36:19 mitry @@ -277,16 +277,16 @@ return 0; } - sscanf( str + 10, "%04zX", &l ); + sscanf( str + 10, "%04X", (unsigned *) &l ); if ( l != ( l1 = strlen( str ) - 18 )) { - write_log( "Bad EMSI_DAT length: %zu, should be: %zu!", l, l1 ); + write_log( "Bad EMSI_DAT length: %u, should be: %u!", l, l1 ); return 0; /* Bad EMSI length */ } DEBUG(('E',5,"EMSI_DAT length (%d) is OK!", l )); - sscanf( str + strlen( str ) - 4, "%04zX", &l); + sscanf( str + strlen( str ) - 4, "%04X", &l); if ( l != ( l1 = crc16usd( (UINT8 *) str + 2, strlen( str ) - 6 ))) { write_log( "Bad EMSI_DAT CRC: %04X, should be: %04X!", l, l1 ); @@ -649,8 +649,8 @@ EMSI_CAT( "}" ); /* Calculate emsi length */ - snprintf( tmp, TMP_LEN, "%04zX", strlen( emsi_dat ) - 14 ); - memcpy( emsi_dat + 10, tmp, 4 ); + snprintf( tmp, TMP_LEN, "%04X", strlen( emsi_dat ) - 14 ); + memmove( emsi_dat + 10, tmp, 4 ); /* EMSI crc16 */ snprintf( tmp, TMP_LEN, "%04X", crc16usds( (UINT8 *) emsi_dat + 2 )); @@ -1096,7 +1096,7 @@ if ( rew && rew != emsi_dat ) { DEBUG(('E',1,"got EMSI_DAT at offset %d", p - rew)); - memcpy( emsi_dat, rew, p - rew ); + memmove( emsi_dat, rew, p - rew ); p -= rew - emsi_dat; } else Only in ./trunk/src: emsi.c.new diff -Bburw ./qico/src/flagexp.c ./trunk/src/flagexp.c --- ./qico/src/flagexp.c 2024-02-01 20:54:38.424931000 +0300 +++ ./trunk/src/flagexp.c 2024-02-01 20:54:27.513775000 +0300 @@ -1,12 +1,14 @@ -/* A Bison parser, made from flagexp.y, by GNU bison 1.75. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Bison implementation for Yacc-like parsers in C - This program is free software; you can redistribute it and/or modify + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +16,28 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -33,66 +45,153 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30802 +/* Bison version string. */ +#define YYBISON_VERSION "3.8.2" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + /* Pure parsers. */ #define YYPURE 0 -/* Using locations. */ -#define YYLSP_NEEDED 0 +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ + + +/* First part of user prologue. */ +#line 16 "flagexp.y" + +#include "headers.h" +#include + +#ifdef NEED_DEBUG +#define YYERROR_VERBOSE 1 +#endif +#define YYDEBUG 0 + +#ifdef YYTEXT_POINTER +extern char *yytext; +#else +extern char yytext[]; +#endif +extern char *yyPTR; +extern int yylex(); +static int logic(int e1,int op,int e2); +static int checkflag(void); +static int checkconnstr(void); +static int checkspeed(int op, int speed, int real); +static int checksfree(int op, int sp); +static int checkmailer(void); +static int checkphone(void); +static int checkport(void); +static int checkcid(void); +static int checkhost(void); +static int checkfile(void); +static int checkexec(void); +static int checkline(int lnum); +static int yyerror(char *s); +static int flxpres; + +#line 104 "flagexp.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Use api.header.include to #include this header + instead of duplicating it here. */ +#ifndef YY_YY_FLAGEXP_H_INCLUDED +# define YY_YY_FLAGEXP_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE -/* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ enum yytokentype { - DATESTR = 258, - GAPSTR = 259, - PHSTR = 260, - TIMESTR = 261, - ADDRSTR = 262, - PATHSTR = 263, - ANYSTR = 264, - IDENT = 265, - NUMBER = 266, - AROP = 267, - LOGOP = 268, - EQ = 269, - NE = 270, - GT = 271, - GE = 272, - LT = 273, - LE = 274, - AND = 275, - OR = 276, - NOT = 277, - XOR = 278, - LB = 279, - RB = 280, - COMMA = 281, - ADDRESS = 282, - ITIME = 283, - CONNSTR = 284, - SPEED = 285, - CONNECT = 286, - PHONE = 287, - MAILER = 288, - CID = 289, - FLTIME = 290, - FLDATE = 291, - EXEC = 292, - FLLINE = 293, - PORT = 294, - FLFILE = 295, - HOST = 296, - SFREE = 297 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + DATESTR = 258, /* DATESTR */ + GAPSTR = 259, /* GAPSTR */ + PHSTR = 260, /* PHSTR */ + TIMESTR = 261, /* TIMESTR */ + ADDRSTR = 262, /* ADDRSTR */ + PATHSTR = 263, /* PATHSTR */ + ANYSTR = 264, /* ANYSTR */ + IDENT = 265, /* IDENT */ + NUMBER = 266, /* NUMBER */ + AROP = 267, /* AROP */ + LOGOP = 268, /* LOGOP */ + EQ = 269, /* EQ */ + NE = 270, /* NE */ + GT = 271, /* GT */ + GE = 272, /* GE */ + LT = 273, /* LT */ + LE = 274, /* LE */ + AND = 275, /* AND */ + OR = 276, /* OR */ + NOT = 277, /* NOT */ + XOR = 278, /* XOR */ + LB = 279, /* LB */ + RB = 280, /* RB */ + COMMA = 281, /* COMMA */ + ADDRESS = 282, /* ADDRESS */ + ITIME = 283, /* ITIME */ + CONNSTR = 284, /* CONNSTR */ + SPEED = 285, /* SPEED */ + CONNECT = 286, /* CONNECT */ + PHONE = 287, /* PHONE */ + MAILER = 288, /* MAILER */ + CID = 289, /* CID */ + FLTIME = 290, /* FLTIME */ + FLDATE = 291, /* FLDATE */ + EXEC = 292, /* EXEC */ + FLLINE = 293, /* FLLINE */ + PORT = 294, /* PORT */ + FLFILE = 295, /* FLFILE */ + HOST = 296, /* HOST */ + SFREE = 297 /* SFREE */ }; +typedef enum yytokentype yytoken_kind_t; #endif +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define DATESTR 258 #define GAPSTR 259 #define PHSTR 260 @@ -134,177 +233,403 @@ #define HOST 296 #define SFREE 297 +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif +extern YYSTYPE yylval; -/* Copy the first part of user declarations. */ -#line 16 "flagexp.y" -#include "headers.h" -#include +int yyparse (void); -#ifdef NEED_DEBUG -#define YYERROR_VERBOSE 1 + +#endif /* !YY_YY_FLAGEXP_H_INCLUDED */ +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_DATESTR = 3, /* DATESTR */ + YYSYMBOL_GAPSTR = 4, /* GAPSTR */ + YYSYMBOL_PHSTR = 5, /* PHSTR */ + YYSYMBOL_TIMESTR = 6, /* TIMESTR */ + YYSYMBOL_ADDRSTR = 7, /* ADDRSTR */ + YYSYMBOL_PATHSTR = 8, /* PATHSTR */ + YYSYMBOL_ANYSTR = 9, /* ANYSTR */ + YYSYMBOL_IDENT = 10, /* IDENT */ + YYSYMBOL_NUMBER = 11, /* NUMBER */ + YYSYMBOL_AROP = 12, /* AROP */ + YYSYMBOL_LOGOP = 13, /* LOGOP */ + YYSYMBOL_EQ = 14, /* EQ */ + YYSYMBOL_NE = 15, /* NE */ + YYSYMBOL_GT = 16, /* GT */ + YYSYMBOL_GE = 17, /* GE */ + YYSYMBOL_LT = 18, /* LT */ + YYSYMBOL_LE = 19, /* LE */ + YYSYMBOL_AND = 20, /* AND */ + YYSYMBOL_OR = 21, /* OR */ + YYSYMBOL_NOT = 22, /* NOT */ + YYSYMBOL_XOR = 23, /* XOR */ + YYSYMBOL_LB = 24, /* LB */ + YYSYMBOL_RB = 25, /* RB */ + YYSYMBOL_COMMA = 26, /* COMMA */ + YYSYMBOL_ADDRESS = 27, /* ADDRESS */ + YYSYMBOL_ITIME = 28, /* ITIME */ + YYSYMBOL_CONNSTR = 29, /* CONNSTR */ + YYSYMBOL_SPEED = 30, /* SPEED */ + YYSYMBOL_CONNECT = 31, /* CONNECT */ + YYSYMBOL_PHONE = 32, /* PHONE */ + YYSYMBOL_MAILER = 33, /* MAILER */ + YYSYMBOL_CID = 34, /* CID */ + YYSYMBOL_FLTIME = 35, /* FLTIME */ + YYSYMBOL_FLDATE = 36, /* FLDATE */ + YYSYMBOL_EXEC = 37, /* EXEC */ + YYSYMBOL_FLLINE = 38, /* FLLINE */ + YYSYMBOL_PORT = 39, /* PORT */ + YYSYMBOL_FLFILE = 40, /* FLFILE */ + YYSYMBOL_HOST = 41, /* HOST */ + YYSYMBOL_SFREE = 42, /* SFREE */ + YYSYMBOL_YYACCEPT = 43, /* $accept */ + YYSYMBOL_fullline = 44, /* fullline */ + YYSYMBOL_expression = 45, /* expression */ + YYSYMBOL_elemexp = 46, /* elemexp */ + YYSYMBOL_flag = 47, /* flag */ + YYSYMBOL_datestring = 48, /* datestring */ + YYSYMBOL_timestring = 49, /* timestring */ + YYSYMBOL_gapstring = 50 /* gapstring */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + + + + +#ifdef short +# undef short #endif -#define YYDEBUG 0 -#ifdef YYTEXT_POINTER -extern char *yytext; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif + +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else -extern char yytext[]; +typedef signed char yytype_int8; #endif -extern char *yyPTR; -extern int yylex(); -static int logic(int e1,int op,int e2); -static int checkflag(void); -static int checkconnstr(void); -static int checkspeed(int op, int speed, int real); -static int checksfree(int op, int sp); -static int checkmailer(void); -static int checkphone(void); -static int checkport(void); -static int checkcid(void); -static int checkhost(void); -static int checkfile(void); -static int checkexec(void); -static int checkline(int lnum); -static int yyerror(char *s); -static int flxpres; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; +#else +typedef short yytype_int16; +#endif -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -# define YYERROR_VERBOSE 0 +typedef short yytype_uint8; #endif -#ifndef YYSTYPE -typedef int yystype; -# define YYSTYPE yystype -# define YYSTYPE_IS_TRIVIAL 1 +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; #endif -#ifndef YYLTYPE -typedef struct yyltype -{ - int first_line; - int first_column; - int last_line; - int last_column; -} yyltype; -# define YYLTYPE yyltype -# define YYLTYPE_IS_TRIVIAL 1 +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ # endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif -/* Copy the second part of user declarations. */ +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif +#endif +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) -/* Line 213 of /usr/local/share/bison/yacc.c. */ -#line 210 "flagexp.c" +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -#if ! defined (yyoverflow) || YYERROR_VERBOSE -/* The parser invokes alloca or malloc; define the necessary symbols. */ +/* Stored state numbers (used for stacks). */ +typedef yytype_int8 yy_state_t; -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca +/* State numbers in computations. */ +typedef int yy_state_fast_t; + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if !defined yyoverflow + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif # endif +# endif # ifdef YYSTACK_ALLOC -/* Pacify GCC's `empty if-body' warning. */ +/* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif # else -# if defined (__STDC__) || defined (__cplusplus) +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* !defined yyoverflow */ +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - /* A type that is properly aligned for any stack member. */ union yyalloc { - short yyss; - YYSTYPE yyvs; + yy_state_t yyss_alloc; + YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAX) + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) #endif -#if defined (__STDC__) || defined (__cplusplus) -typedef signed char yysigned_char; +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) #else -typedef short yysigned_char; +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif +# endif +#endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 45 +/* YYLAST -- Last index in YYTABLE. */ #define YYLAST 54 /* YYNTOKENS -- Number of terminals. */ @@ -313,18 +638,23 @@ #define YYNNTS 8 /* YYNRULES -- Number of rules. */ #define YYNRULES 30 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 59 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 297 -#define YYTRANSLATE(X) \ - ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex. */ +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -359,34 +689,9 @@ }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned char yyprhs[] = +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int8 yyrline[] = { - 0, 0, 3, 5, 7, 10, 14, 18, 20, 24, - 28, 33, 36, 39, 42, 45, 48, 51, 54, 57, - 60, 63, 66, 69, 72, 74, 76, 80, 82, 86, - 88 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = -{ - 44, 0, -1, 45, -1, 46, -1, 22, 45, -1, - 45, 13, 45, -1, 24, 45, 25, -1, 47, -1, - 31, 12, 11, -1, 30, 12, 11, -1, 42, 12, - 11, 8, -1, 29, 29, -1, 32, 5, -1, 33, - 10, -1, 34, 5, -1, 41, 10, -1, 39, 10, - -1, 37, 9, -1, 40, 8, -1, 38, 11, -1, - 28, 49, -1, 35, 50, -1, 36, 48, -1, 27, - 7, -1, 10, -1, 3, -1, 3, 26, 48, -1, - 6, -1, 6, 26, 49, -1, 4, -1, 4, 26, - 50, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned char yyrline[] = -{ 0, 56, 56, 59, 61, 63, 65, 68, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 102, 105, 107, 110, 112, 115, @@ -394,75 +699,47 @@ }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "DATESTR", "GAPSTR", "PHSTR", "TIMESTR", - "ADDRSTR", "PATHSTR", "ANYSTR", "IDENT", "NUMBER", "AROP", "LOGOP", - "EQ", "NE", "GT", "GE", "LT", "LE", "AND", "OR", "NOT", "XOR", "LB", - "RB", "COMMA", "ADDRESS", "ITIME", "CONNSTR", "SPEED", "CONNECT", - "PHONE", "MAILER", "CID", "FLTIME", "FLDATE", "EXEC", "FLLINE", "PORT", - "FLFILE", "HOST", "SFREE", "$accept", "fullline", "expression", - "elemexp", "flag", "datestring", "timestring", "gapstring", 0 + "\"end of file\"", "error", "\"invalid token\"", "DATESTR", "GAPSTR", + "PHSTR", "TIMESTR", "ADDRSTR", "PATHSTR", "ANYSTR", "IDENT", "NUMBER", + "AROP", "LOGOP", "EQ", "NE", "GT", "GE", "LT", "LE", "AND", "OR", "NOT", + "XOR", "LB", "RB", "COMMA", "ADDRESS", "ITIME", "CONNSTR", "SPEED", + "CONNECT", "PHONE", "MAILER", "CID", "FLTIME", "FLDATE", "EXEC", + "FLLINE", "PORT", "FLFILE", "HOST", "SFREE", "$accept", "fullline", + "expression", "elemexp", "flag", "datestring", "timestring", "gapstring", YY_NULLPTR }; -#endif -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short yytoknum[] = +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297 -}; + return yytname[yysymbol]; +} # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 43, 44, 45, 45, 45, 45, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 47, 48, 48, 49, 49, 50, - 50 -}; +#define YYPACT_NINF (-24) -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 1, 1, 2, 3, 3, 1, 3, 3, - 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 1, 1, 3, 1, 3, 1, - 3 -}; +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 3, 7, 4, 0, 23, 27, 20, 11, - 0, 0, 12, 13, 14, 29, 21, 25, 22, 17, - 19, 16, 18, 15, 0, 1, 0, 6, 0, 9, - 8, 0, 0, 0, 5, 28, 30, 26, 10 -}; +#define YYTABLE_NINF (-1) -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = -{ - -1, 20, 21, 22, 23, 38, 28, 36 -}; +#define yytable_value_is_error(Yyn) \ + 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -24 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -8, -24, -8, -8, -3, -1, -23, -5, -4, 4, 0, 6, 8, 10, 9, 24, 7, 28, 27, 26, @@ -472,19 +749,36 @@ -24, 8, 10, 40, 29, -24, -24, -24, -24 }; +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int8 yydefact[] = +{ + 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 3, 7, 4, 0, 23, 27, 20, 11, + 0, 0, 12, 13, 14, 29, 21, 25, 22, 17, + 19, 16, 18, 15, 0, 1, 0, 6, 0, 9, + 8, 0, 0, 0, 5, 28, 30, 26, 10 +}; + /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -24, -24, -2, -24, -24, 1, 2, 3 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, parse error. */ -#define YYTABLE_NINF -1 -static const unsigned char yytable[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { + 0, 20, 21, 22, 23, 38, 28, 36 +}; + +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int8 yytable[] = +{ 24, 25, 1, 46, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 2, 47, 3, 41, 39, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -493,7 +787,7 @@ 55, 0, 0, 57, 56 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 2, 3, 10, 13, 7, 6, 29, 12, 12, 5, 10, 5, 4, 3, 22, 25, 24, 10, 9, 27, @@ -503,9 +797,9 @@ 48, -1, -1, 52, 51 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ +static const yytype_int8 yystos[] = { 0, 10, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, @@ -515,74 +809,60 @@ 11, 26, 26, 11, 45, 49, 50, 48, 8 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ +static const yytype_int8 yyr1[] = +{ + 0, 43, 44, 45, 45, 45, 45, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 47, 48, 48, 49, 49, 50, + 50 +}; +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 1, 1, 2, 3, 3, 1, 3, 3, + 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 1, 3, 1, 3, 1, + 3 +}; + + +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ - if (yychar == YYEMPTY && yylen == 1) \ + if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ - yyerror ("syntax error: cannot back up"); \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) -#define YYTERROR 1 -#define YYERRCODE 256 +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; -#endif - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#define YYLEX yylex () - /* Enable debugging if requested. */ #if YYDEBUG @@ -596,138 +876,138 @@ if (yydebug) \ YYFPRINTF Args; \ } while (0) -# define YYDSYMPRINT(Args) \ + + + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ - yysymprint Args; \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ } while (0) -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -#endif /* !YYDEBUG */ -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + FILE *yyoutput = yyo; + YY_USE (yyoutput); + if (!yyvaluep) + { + return; + } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + yy_symbol_value_print (yyo, yykind, yyvaluep); + YYFPRINTF (yyo, ")"); +} -#if YYERROR_VERBOSE +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) -const char *yystr; -# endif +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { - continue; + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); } - - return yys - yystr - 1; + YYFPRINTF (stderr, "\n"); } -# endif -# endif -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) -char *yydest; -const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) - while ((*yyd++ = *yys++) != '\0') + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { - continue; + int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); + YYFPRINTF (stderr, "\n"); } - - return yyd - 1; } -# endif -# endif -#endif /* !YYERROR_VERBOSE */ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ -#if YYDEBUG -/*-----------------------------. -| Print this symbol on YYOUT. | -`-----------------------------*/ - -static void -#if defined (__STDC__) || defined (__cplusplus) -yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue) -#else -yysymprint (yyout, yytype, yyvalue) -FILE* yyout; -int yytype; -YYSTYPE yyvalue; +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 #endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvalue; - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyout, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyout, yytoknum[yytype], yyvalue); +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 # endif - } - else - { - YYFPRINTF (yyout, "nterm %s (", yytname[yytype]); - } - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyout, ")"); -} -#endif /* YYDEBUG. */ @@ -735,193 +1018,154 @@ `-----------------------------------------------*/ static void -#if defined (__STDC__) || defined (__cplusplus) -yydestruct (int yytype, YYSTYPE yyvalue) -#else -yydestruct (yytype, yyvalue) -int yytype; -YYSTYPE yyvalue; -#endif +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvalue; - - switch (yytype) + YY_USE (yyvaluep); + if (!yymsg) { - default: - break; + yymsg = "Deleting"; } + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -# define YYPARSE_PARAM_DECL -# else -# define YYPARSE_PARAM_ARG YYPARSE_PARAM -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif -#else /* !YYPARSE_PARAM */ -# define YYPARSE_PARAM_ARG -# define YYPARSE_PARAM_DECL -#endif /* !YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -# ifdef YYPARSE_PARAM -int yyparse (void *); -# else -int yyparse (void); -# endif -#endif - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - -/* Number of parse errors so far. */ +/* Number of syntax errors so far. */ int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + int -yyparse (YYPARSE_PARAM_ARG) -YYPARSE_PARAM_DECL +yyparse (void) { - - register int yystate; - register int yyn; - int yyresult; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yychar1 = 0; + int yyerrstatus = 0; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp = yyvs; - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - + int yyn; + /* The return value of yyparse. */ + int yyresult; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. - | yynewstate -- Push a new state, which is found in yystate. | + | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; + + /*--------------------------------------------------------------------. + | yysetstate -- set current state (the top of the stack) to yystate. | + `--------------------------------------------------------------------*/ yysetstate: - *yyssp = yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + YYNOMEM; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYPTRDIFF_T yysize = yyssp - yyss + 1; -#ifdef yyoverflow +# if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) + if (YYMAXDEPTH <= yystacksize) { - goto yyoverflowlab; + YYNOMEM; } yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) { yystacksize = YYMAXDEPTH; } { - short *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) { - goto yyoverflowlab; + YYNOMEM; } - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) { @@ -929,84 +1173,87 @@ } } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) { YYABORT; } } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + { + YYACCEPT; + } + goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ - /* Do appropriate processing given the current state. */ - /* Read a lookahead token if we need one and don't already have one. */ - /* yyresume: */ - /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) { goto yydefault; } /* Not known => get a lookahead token if don't already have one. */ - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (); } - /* Convert token to internal form (in yychar1) for indexing tables with. */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more. */ - + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { - yychar1 = YYTRANSLATE (yychar); - - /* We have to keep this `#if YYDEBUG', since we use variables - which are defined only if `YYDEBUG' is set. */ - YYDPRINTF ((stderr, "Next token is ")); - YYDSYMPRINT ((stderr, yychar1, yylval)); - YYDPRINTF ((stderr, "\n")); + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - /* If the proper action on seeing token YYCHAR1 is to reduce or to + /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ - yyn += yychar1; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1) + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) { goto yydefault; } yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) + if (yytable_value_is_error (yyn)) { goto yyerrlab; } @@ -1014,24 +1261,6 @@ goto yyreduce; } - if (yyn == YYFINAL) - { - YYACCEPT; - } - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %d (%s), ", - yychar, yytname[yychar1])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - { - yychar = YYEMPTY; - } - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) @@ -1039,7 +1268,15 @@ yyerrstatus--; } + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1056,14 +1293,14 @@ /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1073,378 +1310,290 @@ yyval = yyvsp[1-yylen]; - -#if YYDEBUG - /* We have to keep this `#if YYDEBUG', since we use variables which - are defined only if `YYDEBUG' is set. */ - if (yydebug) - { - int yyi; - - YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", - yyn - 1, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++) - { - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - } - YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif + YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: + case 2: /* fullline: expression */ #line 57 "flagexp.y" - { - flxpres=yyvsp[0]; - } + {flxpres=yyvsp[0];} +#line 1294 "flagexp.c" break; - case 3: + case 3: /* expression: elemexp */ #line 60 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1300 "flagexp.c" break; - case 4: + case 4: /* expression: NOT expression */ #line 62 "flagexp.y" - { - yyval = !(yyvsp[0]); - } + {yyval = !(yyvsp[0]);} +#line 1306 "flagexp.c" break; - case 5: + case 5: /* expression: expression LOGOP expression */ #line 64 "flagexp.y" - { - yyval = logic(yyvsp[-2],yyvsp[-1],yyvsp[0]); - } + {yyval = logic(yyvsp[-2],yyvsp[-1],yyvsp[0]);} +#line 1312 "flagexp.c" break; - case 6: + case 6: /* expression: LB expression RB */ #line 66 "flagexp.y" - { - yyval = yyvsp[-1]; - } + {yyval = yyvsp[-1];} +#line 1318 "flagexp.c" break; - case 8: + case 8: /* elemexp: CONNECT AROP NUMBER */ #line 70 "flagexp.y" - { - yyval = checkspeed(yyvsp[-1],yyvsp[0],1); - } + {yyval = checkspeed(yyvsp[-1],yyvsp[0],1);} +#line 1324 "flagexp.c" break; - case 9: + case 9: /* elemexp: SPEED AROP NUMBER */ #line 72 "flagexp.y" - { - yyval = checkspeed(yyvsp[-1],yyvsp[0],0); - } + {yyval = checkspeed(yyvsp[-1],yyvsp[0],0);} +#line 1330 "flagexp.c" break; - case 10: + case 10: /* elemexp: SFREE AROP NUMBER PATHSTR */ #line 74 "flagexp.y" - { - yyval = checksfree(yyvsp[-2],yyvsp[-1]); - } + {yyval = checksfree(yyvsp[-2],yyvsp[-1]);} +#line 1336 "flagexp.c" break; - case 11: + case 11: /* elemexp: CONNSTR CONNSTR */ #line 76 "flagexp.y" - { - yyval = checkconnstr(); - } + {yyval = checkconnstr();} +#line 1342 "flagexp.c" break; - case 12: + case 12: /* elemexp: PHONE PHSTR */ #line 78 "flagexp.y" - { - yyval = checkphone(); - } + {yyval = checkphone();} +#line 1348 "flagexp.c" break; - case 13: + case 13: /* elemexp: MAILER IDENT */ #line 80 "flagexp.y" - { - yyval = checkmailer(); - } + {yyval = checkmailer();} +#line 1354 "flagexp.c" break; - case 14: + case 14: /* elemexp: CID PHSTR */ #line 82 "flagexp.y" - { - yyval = checkcid(); - } + {yyval = checkcid();} +#line 1360 "flagexp.c" break; - case 15: + case 15: /* elemexp: HOST IDENT */ #line 84 "flagexp.y" - { - yyval = checkhost(); - } + {yyval = checkhost();} +#line 1366 "flagexp.c" break; - case 16: + case 16: /* elemexp: PORT IDENT */ #line 86 "flagexp.y" - { - yyval = checkport(); - } + {yyval = checkport();} +#line 1372 "flagexp.c" break; - case 17: + case 17: /* elemexp: EXEC ANYSTR */ #line 88 "flagexp.y" - { - yyval = checkexec(); - } + {yyval = checkexec();} +#line 1378 "flagexp.c" break; - case 18: + case 18: /* elemexp: FLFILE PATHSTR */ #line 90 "flagexp.y" - { - yyval = checkfile(); - } + {yyval = checkfile();} +#line 1384 "flagexp.c" break; - case 19: + case 19: /* elemexp: FLLINE NUMBER */ #line 92 "flagexp.y" - { - yyval = checkline(yyvsp[0]); - } + {yyval = checkline(yyvsp[0]);} +#line 1390 "flagexp.c" break; - case 20: + case 20: /* elemexp: ITIME timestring */ #line 94 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1396 "flagexp.c" break; - case 21: + case 21: /* elemexp: FLTIME gapstring */ #line 96 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1402 "flagexp.c" break; - case 22: + case 22: /* elemexp: FLDATE datestring */ #line 98 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1408 "flagexp.c" break; - case 23: + case 23: /* elemexp: ADDRESS ADDRSTR */ #line 100 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1414 "flagexp.c" break; - case 24: + case 24: /* flag: IDENT */ #line 103 "flagexp.y" - { - yyval = checkflag(); - } + {yyval = checkflag();} +#line 1420 "flagexp.c" break; - case 25: + case 25: /* datestring: DATESTR */ #line 106 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1426 "flagexp.c" break; - case 26: + case 26: /* datestring: DATESTR COMMA datestring */ #line 108 "flagexp.y" - { - yyval = logic(yyvsp[-2],OR,yyvsp[0]); - } + {yyval = logic(yyvsp[-2],OR,yyvsp[0]);} +#line 1432 "flagexp.c" break; - case 27: + case 27: /* timestring: TIMESTR */ #line 111 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1438 "flagexp.c" break; - case 28: + case 28: /* timestring: TIMESTR COMMA timestring */ #line 113 "flagexp.y" - { - yyval = logic(yyvsp[-2],OR,yyvsp[0]); - } + {yyval = logic(yyvsp[-2],OR,yyvsp[0]);} +#line 1444 "flagexp.c" break; - case 29: + case 29: /* gapstring: GAPSTR */ #line 116 "flagexp.y" - { - yyval = yyvsp[0]; - } + {yyval = yyvsp[0];} +#line 1450 "flagexp.c" break; - case 30: + case 30: /* gapstring: GAPSTR COMMA gapstring */ #line 118 "flagexp.y" - { - yyval = logic(yyvsp[-2],OR,yyvsp[0]); - } + {yyval = logic(yyvsp[-2],OR,yyvsp[0]);} +#line 1456 "flagexp.c" break; - } +#line 1460 "flagexp.c" - /* Line 1016 of /usr/local/share/bison/yacc.c. */ -#line 1209 "flagexp.c" - - yyvsp -= yylen; - yyssp -= yylen; - - -#if YYDEBUG - if (yydebug) - { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "state stack now"); - while (yyssp1 != yyssp) - { - YYFPRINTF (stderr, " %d", *++yyssp1); + default: + break; } - YYFPRINTF (stderr, "\n"); - } -#endif + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YYPOPSTACK (yylen); + yylen = 0; + *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) { - yystate = yytable[yystate]; + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); } - else - { - yystate = yydefgoto[yyn - YYNTOKENS]; - } goto yynewstate; - /*------------------------------------. - | yyerrlab -- here on detecting error | - `------------------------------------*/ + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; + yyerror (YY_("syntax error")); + } - if (YYPACT_NINF < yyn && yyn < YYLAST) + if (yyerrstatus == 3) { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - char *yymsg; - int yyx, yycount; + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + if (yychar <= YYEOF) { - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - } - yysize += yystrlen ("parse error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) + /* Return failure if at end of input. */ + if (yychar == YYEOF) { - char *yyp = yystpcpy (yymsg, "parse error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; + YYABORT; } } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } else { - yyerror ("parse error; also virtual memory exhausted"); + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; } } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("parse error"); - } + + /* Else will try to reuse lookahead token after shifting the error + token. */ goto yyerrlab1; - /*----------------------------------------------------. - | yyerrlab1 -- error raised explicitly by an action. | - `----------------------------------------------------*/ -yyerrlab1: - if (yyerrstatus == 3) + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ +yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - /* Return failure if at end of input. */ - if (yychar == YYEOF) - { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyssp > yyss) - { - YYDPRINTF ((stderr, "Error: popping ")); - YYDSYMPRINT ((stderr, - yystos[*yyssp], - *yyvsp)); - YYDPRINTF ((stderr, "\n")); - yydestruct (yystos[*yyssp], *yyvsp); - YYPOPSTACK; + YYERROR; } - YYABORT; - } + ++yynerrs; - YYDPRINTF ((stderr, "Discarding token %d (%s).\n", - yychar, yytname[yychar1])); - yydestruct (yychar1, yylval); - yychar = YYEMPTY; - } + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; - /* Else will try to reuse lookahead token after shifting the error - token. */ + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ +yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -1460,40 +1609,22 @@ YYABORT; } - YYDPRINTF ((stderr, "Error: popping ")); - YYDSYMPRINT ((stderr, - yystos[*yyssp], *yyvsp)); - YYDPRINTF ((stderr, "\n")); - yydestruct (yystos[yystate], *yyvsp); - yyvsp--; - yystate = *--yyssp; - - -#if YYDEBUG - if (yydebug) - { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "Error: state stack now"); - while (yyssp1 != yyssp) - { - YYFPRINTF (stderr, " %d", *++yyssp1); + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - YYFPRINTF (stderr, "\n"); - } -#endif - } - if (yyn == YYFINAL) - { - YYACCEPT; - } - - YYDPRINTF ((stderr, "Shifting error token, ")); - + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -1503,26 +1634,48 @@ `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#ifndef yyoverflow - /*----------------------------------------------. - | yyoverflowlab -- parser overflow comes here. | - `----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); + + /*-----------------------------------------------------------. + | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | + `-----------------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ -#endif + goto yyreturnlab; -yyreturn: + + /*----------------------------------------------------------. + | yyreturnlab -- parsing is finished, clean up and return. | + `----------------------------------------------------------*/ +yyreturnlab: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) { diff -Bburw ./qico/src/flagexp.h ./trunk/src/flagexp.h --- ./qico/src/flagexp.h 2024-02-01 18:09:52.563019000 +0300 +++ ./trunk/src/flagexp.h 2024-02-01 19:33:30.012364000 +0300 @@ -1,12 +1,14 @@ -/* A Bison parser, made from flagexp.y, by GNU bison 1.75. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Bison interface for Yacc-like parsers in C - This program is free software; you can redistribute it and/or modify + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,66 +16,92 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -#ifndef BISON_FLAGEXP_H -# define BISON_FLAGEXP_H + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -/* Tokens. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +#ifndef YY_YY_FLAGEXP_H_INCLUDED +# define YY_YY_FLAGEXP_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE -/* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ -enum yytokentype { - DATESTR = 258, - GAPSTR = 259, - PHSTR = 260, - TIMESTR = 261, - ADDRSTR = 262, - PATHSTR = 263, - ANYSTR = 264, - IDENT = 265, - NUMBER = 266, - AROP = 267, - LOGOP = 268, - EQ = 269, - NE = 270, - GT = 271, - GE = 272, - LT = 273, - LE = 274, - AND = 275, - OR = 276, - NOT = 277, - XOR = 278, - LB = 279, - RB = 280, - COMMA = 281, - ADDRESS = 282, - ITIME = 283, - CONNSTR = 284, - SPEED = 285, - CONNECT = 286, - PHONE = 287, - MAILER = 288, - CID = 289, - FLTIME = 290, - FLDATE = 291, - EXEC = 292, - FLLINE = 293, - PORT = 294, - FLFILE = 295, - HOST = 296, - SFREE = 297 + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + DATESTR = 258, /* DATESTR */ + GAPSTR = 259, /* GAPSTR */ + PHSTR = 260, /* PHSTR */ + TIMESTR = 261, /* TIMESTR */ + ADDRSTR = 262, /* ADDRSTR */ + PATHSTR = 263, /* PATHSTR */ + ANYSTR = 264, /* ANYSTR */ + IDENT = 265, /* IDENT */ + NUMBER = 266, /* NUMBER */ + AROP = 267, /* AROP */ + LOGOP = 268, /* LOGOP */ + EQ = 269, /* EQ */ + NE = 270, /* NE */ + GT = 271, /* GT */ + GE = 272, /* GE */ + LT = 273, /* LT */ + LE = 274, /* LE */ + AND = 275, /* AND */ + OR = 276, /* OR */ + NOT = 277, /* NOT */ + XOR = 278, /* XOR */ + LB = 279, /* LB */ + RB = 280, /* RB */ + COMMA = 281, /* COMMA */ + ADDRESS = 282, /* ADDRESS */ + ITIME = 283, /* ITIME */ + CONNSTR = 284, /* CONNSTR */ + SPEED = 285, /* SPEED */ + CONNECT = 286, /* CONNECT */ + PHONE = 287, /* PHONE */ + MAILER = 288, /* MAILER */ + CID = 289, /* CID */ + FLTIME = 290, /* FLTIME */ + FLDATE = 291, /* FLDATE */ + EXEC = 292, /* EXEC */ + FLLINE = 293, /* FLLINE */ + PORT = 294, /* PORT */ + FLFILE = 295, /* FLFILE */ + HOST = 296, /* HOST */ + SFREE = 297 /* SFREE */ }; + typedef enum yytokentype yytoken_kind_t; #endif +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define DATESTR 258 #define GAPSTR 259 #define PHSTR 260 @@ -115,16 +143,18 @@ #define HOST 296 #define SFREE 297 - - - -#ifndef YYSTYPE -typedef int yystype; -# define YYSTYPE yystype +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; -#endif /* not BISON_FLAGEXP_H */ +int yyparse (void); + +#endif /* !YY_YY_FLAGEXP_H_INCLUDED */ diff -Bburw ./qico/src/flagexp.y ./trunk/src/flagexp.y --- ./qico/src/flagexp.y 2024-02-01 18:09:52.563114000 +0300 +++ ./trunk/src/flagexp.y 2024-02-01 18:10:34.586850000 +0300 @@ -2,7 +2,7 @@ * expression parser **********************************************************/ /* - * $Id: flagexp.y,v 1.3 2005/05/06 20:31:58 mitry Exp $ + * $Id: flagexp.y 18 2010-08-23 15:50:49Z semik $ * * $Log: flagexp.y,v $ * Revision 1.3 2005/05/06 20:31:58 mitry diff -Bburw ./qico/src/flaglex.c ./trunk/src/flaglex.c --- ./qico/src/flaglex.c 2024-02-01 20:54:38.455300000 +0300 +++ ./trunk/src/flaglex.c 2024-02-01 20:54:27.566929000 +0300 @@ -1,89 +1,126 @@ -/* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ - */ +#line 2 "flaglex.c" +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ #include +#include +#include +#include +/* end standard C headers. */ -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif +/* flex integer type definitions */ +#ifndef FLEXINT_H +#define FLEXINT_H -#ifdef __cplusplus +/* C99 systems have . Non-C99 systems may or may not. */ -#include -#include +#if defined(__FreeBSD__) || \ + (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; -#else /* ! __cplusplus */ +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif -#if __STDC__ +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif -#define YY_USE_PROTOS -#define YY_USE_CONST +#endif /* ! C99 */ -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ +#endif /* ! FLEXINT_H */ -#ifdef __TURBOC__ -#pragma warn -rch -#pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif +/* begin standard C++ headers. */ -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const -#else -#define yyconst -#endif - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define YY_PROTO(proto) () +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN yy_start = 1 + 2 * - +#define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START ((yy_start - 1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -95,10 +129,32 @@ #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + extern int yyleng; extern FILE *yyin, *yyout; @@ -106,42 +163,26 @@ #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) -/* Return all but the first 'n' matched characters back to the input stream. */ - +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -152,7 +193,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -178,6 +219,9 @@ */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -198,14 +244,27 @@ #define YY_BUFFER_EOF_PENDING 2 }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -static YY_BUFFER_STATE yy_current_buffer = 0; +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". + * + * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER yy_current_buffer +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +#define yy_current_buffer YY_CURRENT_BUFFER +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; @@ -217,8 +272,8 @@ int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches @@ -226,76 +281,98 @@ */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +/* Begin user sect3 */ - -#define yywrap() 1 +#define yywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef flex_uint8_t YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + typedef int yy_state_type; + +extern int yylineno; +int yylineno = 1; + extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ + (yytext_ptr) = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 40 #define YY_END_OF_BUFFER 41 -static yyconst short int yy_accept[388] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[406] = +{ 0, 0, 0, 41, 40, 1, 13, 11, 39, 14, 15, 36, 16, 37, 39, 36, 2, 2, 2, 2, 16, - 8, 4, 6, 12, 38, 38, 38, 38, 38, 38, + 8, 4, 6, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 10, 1, 5, 39, 0, 0, 0, + 38, 38, 12, 10, 1, 5, 39, 0, 0, 0, 0, 37, 3, 3, 0, 39, 37, 36, 0, 0, 39, 2, 0, 2, 39, 37, 39, 2, 0, 9, 4, 7, 38, 38, 38, 38, 38, 38, 35, 38, @@ -308,34 +385,37 @@ 36, 35, 35, 35, 36, 36, 36, 36, 0, 36, 36, 36, 36, 36, 36, 2, 2, 2, 36, 36, 36, 36, 36, 37, 36, 35, 35, 35, 36, 2, - 36, 36, 38, 17, 11, 33, 34, 18, 38, 38, - 38, 38, 38, 38, 38, 38, 13, 38, 38, 38, - 38, 33, 35, 38, 38, 12, 0, 36, 36, 36, - 36, 0, 36, 0, 39, 36, 36, 37, 35, 36, + 36, 36, 38, 17, 11, 33, 34, 34, 18, 38, + 38, 34, 38, 34, 38, 33, 38, 38, 34, 34, + 34, 38, 38, 34, 34, 33, 13, 34, 34, 38, + 38, 33, 34, 38, 38, 33, 35, 33, 35, 33, - 37, 36, 0, 36, 36, 36, 36, 39, 36, 36, - 2, 0, 2, 0, 36, 36, 36, 36, 35, 36, - 38, 34, 34, 34, 34, 34, 38, 32, 21, 22, - 23, 38, 25, 38, 38, 28, 38, 38, 31, 38, - 36, 36, 36, 35, 35, 35, 35, 0, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, - 0, 0, 35, 35, 35, 35, 36, 36, 36, 35, - 35, 35, 35, 0, 0, 38, 38, 34, 38, 38, - 24, 38, 27, 29, 30, 38, 0, 35, 0, 39, - 35, 37, 35, 35, 0, 36, 36, 35, 35, 35, + 38, 38, 33, 12, 0, 36, 36, 36, 36, 0, + 36, 0, 39, 36, 36, 37, 35, 36, 37, 36, + 0, 36, 36, 36, 36, 39, 36, 36, 2, 0, + 2, 0, 36, 36, 36, 36, 35, 36, 38, 34, + 34, 34, 34, 34, 38, 32, 21, 22, 23, 38, + 25, 38, 38, 28, 38, 38, 31, 38, 36, 36, + 36, 35, 35, 35, 35, 0, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 36, 0, 0, + 35, 35, 35, 35, 36, 36, 36, 35, 35, 35, + 35, 0, 0, 38, 38, 34, 38, 38, 24, 38, - 35, 0, 0, 0, 35, 36, 36, 36, 35, 36, - 35, 35, 35, 35, 36, 36, 36, 17, 34, 34, - 34, 38, 38, 26, 38, 35, 35, 35, 0, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 0, - 0, 35, 35, 35, 0, 35, 35, 35, 35, 36, - 19, 20, 38, 0, 0, 0, 35, 35, 35, 0, - 36, 36, 36, 38, 38, 0, 0, 0, 36, 0, - 36, 38, 0, 0, 0, 0, 0, 0, 36, 36, - 36, 38, 0, 35, 33, 0, 0 + 27, 29, 30, 38, 0, 35, 0, 39, 35, 37, + 35, 35, 0, 36, 36, 35, 35, 35, 35, 0, + 0, 0, 35, 36, 36, 36, 35, 36, 35, 35, + 35, 35, 36, 36, 36, 17, 34, 34, 34, 38, + 38, 26, 38, 35, 35, 35, 0, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 0, 0, 35, + 35, 35, 0, 35, 35, 35, 35, 36, 19, 20, + 38, 0, 0, 0, 35, 35, 35, 0, 36, 36, + 36, 38, 38, 0, 0, 0, 36, 0, 36, 38, + 0, 0, 0, 0, 0, 0, 36, 36, 36, 38, + + 0, 35, 33, 0, 0 } ; -static yyconst int yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, @@ -344,14 +424,14 @@ 1, 2, 4, 1, 1, 1, 1, 5, 6, 7, 8, 9, 6, 10, 11, 6, 12, 13, 14, 15, 16, 17, 17, 18, 18, 19, 19, 20, 21, 22, - 23, 24, 1, 25, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 1, 1, 1, 26, 6, 6, 27, 28, 29, 30, + 23, 24, 1, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 1, 1, 1, 52, 6, 6, 53, 54, 55, 56, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 1, 53, 1, 1, 1, 1, 1, 1, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 51, 1, 78, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -368,415 +448,537 @@ 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[54] = +static const YY_CHAR yy_meta[79] = { 0, 1, 1, 2, 1, 1, 3, 1, 1, 4, 3, - 5, 3, 6, 6, 6, 6, 6, 6, 6, 7, - 1, 1, 1, 1, 8, 1, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 1 + 5, 3, 6, 6, 6, 6, 6, 6, 6, 1, + 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 1 } ; -static yyconst short int yy_base[410] = +static const flex_int16_t yy_base[420] = { 0, - 0, 0, 429, 2602, 52, 386, 2602, 0, 2602, 2602, - 44, 0, 59, 78, 131, 173, 182, 191, 211, 2602, - 372, 371, 367, 2602, 82, 51, 56, 99, 259, 260, - 267, 270, 275, 278, 287, 300, 314, 322, 330, 366, - 408, 325, 338, 2602, 56, 2602, 0, 380, 378, 58, - 452, 0, 358, 471, 516, 527, 536, 547, 559, 570, - 581, 592, 603, 614, 100, 367, 386, 626, 638, 2602, - 2602, 2602, 115, 347, 337, 348, 363, 400, 405, 422, - 475, 476, 492, 497, 510, 652, 502, 505, 653, 660, - 661, 668, 669, 676, 677, 685, 688, 700, 708, 709, + 0, 0, 219, 3650, 77, 192, 3650, 0, 3650, 3650, + 69, 0, 82, 101, 179, 257, 65, 101, 335, 3650, + 183, 154, 148, 179, 80, 355, 121, 163, 358, 366, + 142, 211, 371, 396, 278, 397, 419, 430, 492, 560, + 446, 433, 3650, 3650, 85, 3650, 0, 121, 146, 278, + 297, 306, 155, 637, 497, 511, 571, 715, 538, 582, + 599, 610, 654, 663, 677, 688, 732, 741, 755, 3650, + 3650, 3650, 160, 449, 769, 320, 201, 465, 204, 770, + 388, 363, 216, 777, 481, 778, 473, 224, 231, 641, + 789, 790, 798, 232, 806, 243, 818, 821, 293, 837, - 716, 719, 724, 731, 732, 739, 740, 748, 757, 792, - 839, 81, 76, 758, 777, 770, 343, 338, 321, 879, - 81, 893, 0, 318, 311, 283, 908, 691, 923, 297, - 802, 938, 482, 809, 258, 949, 552, 816, 320, 736, - 959, 780, 976, 987, 998, 1006, 1015, 1024, 1034, 1049, - 563, 823, 846, 853, 1062, 1077, 574, 860, 1088, 1098, - 1106, 1120, 1134, 1137, 875, 1173, 589, 976, 1142, 1145, - 1152, 1153, 1160, 1161, 1187, 1192, 1195, 1202, 1203, 1210, - 1213, 1221, 1233, 1237, 1244, 1259, 1263, 294, 1274, 1291, - 0, 1304, 0, 886, 1311, 281, 0, 1320, 1327, 1334, + 642, 374, 552, 474, 845, 853, 489, 861, 864, 925, + 997, 103, 194, 900, 886, 910, 133, 932, 132, 945, + 117, 969, 0, 144, 138, 1006, 1019, 1038, 1062, 1075, + 1088, 1101, 1114, 1127, 1140, 1153, 1163, 1173, 982, 1183, + 1196, 1209, 1222, 1234, 1246, 1256, 1266, 1276, 1286, 1301, + 1316, 1331, 1346, 1359, 1366, 1379, 1392, 1405, 1418, 1428, + 1436, 1450, 922, 1054, 530, 1464, 1478, 1492, 531, 913, + 1506, 1507, 1055, 1525, 1522, 1541, 1552, 1555, 1568, 1586, + 1600, 1565, 1615, 1620, 1641, 1655, 557, 1668, 1682, 1636, + 1697, 1698, 1708, 1722, 1723, 1731, 597, 1744, 1754, 1761, - 1341, 1348, 539, 1357, 341, 306, 354, 1365, 1374, 1383, - 1392, 1404, 1413, 1425, 1436, 1447, 1458, 1466, 1473, 1484, - 1498, 1533, 596, 1501, 1510, 1512, 1523, 1524, 1547, 1550, - 1555, 1560, 1563, 1568, 1571, 1576, 1583, 1586, 1591, 1591, - 2602, 1608, 1625, 1638, 900, 0, 2602, 1645, 1664, 631, - 1705, 0, 1714, 1723, 1732, 1739, 1748, 1763, 1778, 282, - 1791, 1798, 1805, 1818, 1831, 0, 1846, 1854, 1868, 1881, - 1894, 1907, 289, 1924, 1935, 1924, 1942, 1949, 1964, 1965, - 1972, 1973, 1980, 1985, 1988, 1988, 2005, 2012, 285, 2019, - 2026, 2033, 2040, 2047, 2054, 2061, 278, 2068, 1069, 266, + 1775, 1789, 1800, 715, 1807, 1814, 1827, 1841, 0, 1854, + 1863, 1443, 1876, 1885, 1898, 1911, 1920, 1933, 1946, 1955, + 1967, 1976, 1984, 1997, 2010, 2023, 2032, 2042, 2052, 2064, + 2073, 2085, 2096, 2113, 2128, 2141, 2154, 2167, 2181, 2184, + 2198, 2216, 961, 2225, 2239, 871, 1560, 2244, 2247, 2252, + 2255, 2260, 2265, 2268, 2275, 2282, 2287, 2313, 3650, 2326, + 2340, 2353, 130, 0, 3650, 2360, 2379, 2457, 435, 0, + 2394, 2403, 2419, 2428, 2472, 2485, 2500, 2435, 2410, 2513, + 2523, 2536, 2549, 2562, 2575, 2583, 2597, 2610, 2623, 2636, + 2649, 2662, 2673, 2292, 2687, 2701, 2306, 2713, 2379, 2714, - 258, 255, 1281, 254, 2076, 2083, 2094, 2111, 2119, 0, - 2132, 2145, 2158, 396, 40, 916, 0, 2002, 2171, 2185, - 2003, 2190, 2111, 2195, 2198, 2198, 931, 2602, 2205, 2212, - 1042, 0, 2224, 2231, 2238, 2245, 2252, 2259, 2266, 2274, - 1113, 2281, 1057, 0, 2292, 786, 829, 248, 194, 0, - 2306, 2307, 2314, 2317, 1525, 114, 2325, 2332, 2339, 2346, - 2353, 2366, 2379, 2392, 2399, 2406, 2413, 2421, 2428, 2441, - 90, 2448, 869, 1615, 88, 76, 1294, 1632, 1253, 1177, - 69, 2455, 1755, 64, 2469, 2469, 2602, 2486, 2495, 2504, - 2511, 2517, 2520, 2523, 2526, 2535, 2542, 2546, 2550, 2555, + 2457, 2721, 2722, 2729, 2736, 2746, 121, 2753, 2760, 2775, + 2784, 2793, 2806, 2815, 2828, 2841, 2492, 108, 92, 2849, + 2767, 91, 2857, 2870, 2883, 2898, 2911, 2924, 2937, 2950, + 2963, 2976, 2989, 3002, 3015, 3031, 3032, 3046, 3051, 3056, + 3059, 3064, 3067, 3067, 695, 3650, 3074, 3081, 825, 0, + 3092, 3101, 3119, 3128, 3141, 3154, 3167, 3108, 1848, 3175, + 3188, 3201, 3214, 3221, 3234, 3247, 3260, 3273, 3289, 3290, + 3297, 3300, 3308, 87, 3316, 3323, 3330, 3337, 3344, 3357, + 3370, 3386, 3400, 3404, 3411, 3419, 3426, 3439, 3446, 3460, + 3465, 3473, 71, 3481, 3489, 3497, 3505, 3518, 3531, 3547, - 2560, 2562, 2567, 2573, 2577, 2580, 2582, 2590, 2594 + 2507, 65, 3561, 3561, 3650, 3578, 3584, 3590, 3596, 3602, + 3606, 3610, 3613, 3619, 3623, 3625, 3631, 3637, 3643 } ; -static yyconst short int yy_def[410] = +static const flex_int16_t yy_def[420] = { 0, - 387, 1, 387, 387, 387, 387, 387, 388, 387, 387, - 389, 388, 388, 390, 387, 15, 15, 15, 387, 387, - 387, 387, 387, 387, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 387, 391, 391, 387, 387, 387, 388, 392, 393, 394, - 395, 13, 396, 390, 387, 388, 56, 19, 387, 395, - 56, 19, 387, 19, 56, 57, 61, 19, 387, 387, - 387, 387, 391, 391, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 405, 1, 405, 405, 405, 405, 405, 406, 405, 405, + 407, 406, 406, 408, 409, 409, 16, 16, 410, 405, + 405, 405, 405, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 412, + 411, 411, 405, 405, 405, 405, 406, 405, 405, 405, + 413, 406, 414, 408, 405, 406, 406, 410, 405, 413, + 406, 58, 405, 58, 406, 406, 406, 58, 405, 405, + 405, 405, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 397, - 397, 111, 111, 391, 391, 391, 387, 398, 389, 389, - 389, 389, 399, 396, 54, 400, 387, 398, 388, 129, - 129, 129, 132, 132, 392, 19, 136, 136, 401, 402, - 387, 141, 136, 136, 136, 136, 136, 136, 389, 389, - 150, 150, 150, 57, 388, 155, 156, 156, 136, 136, - 389, 389, 391, 391, 391, 391, 166, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 166, 166, 391, 395, 398, 389, 389, - 399, 387, 128, 387, 388, 155, 155, 388, 132, 156, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 415, + 415, 111, 111, 411, 411, 411, 405, 405, 407, 407, + 407, 407, 416, 414, 54, 405, 405, 405, 406, 406, + 406, 406, 406, 406, 405, 58, 58, 58, 405, 405, + 405, 405, 58, 58, 58, 58, 58, 58, 407, 407, + 407, 407, 407, 406, 406, 406, 406, 406, 58, 58, + 407, 407, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, - 57, 136, 403, 136, 142, 128, 128, 56, 136, 136, - 136, 387, 136, 387, 150, 150, 150, 156, 156, 389, - 391, 166, 222, 391, 391, 166, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 166, - 387, 389, 389, 404, 404, 404, 387, 387, 387, 249, - 249, 388, 249, 249, 249, 198, 249, 249, 249, 405, - 387, 387, 249, 249, 249, 155, 136, 389, 389, 404, - 404, 404, 207, 387, 387, 391, 166, 222, 391, 391, - 391, 391, 391, 391, 391, 166, 387, 387, 387, 388, - 388, 198, 198, 156, 187, 156, 207, 404, 404, 404, + 411, 411, 411, 411, 413, 405, 407, 407, 416, 405, + 405, 405, 406, 406, 406, 406, 406, 406, 406, 58, + 405, 58, 405, 405, 405, 406, 58, 58, 58, 405, + 58, 405, 407, 407, 407, 406, 406, 407, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, + 411, 411, 411, 411, 411, 411, 411, 411, 405, 407, + 407, 417, 417, 417, 405, 405, 418, 418, 268, 406, + 268, 268, 268, 406, 268, 268, 268, 405, 405, 405, + 268, 268, 268, 406, 58, 407, 407, 417, 417, 417, + 405, 405, 405, 411, 411, 411, 411, 411, 411, 411, - 387, 406, 387, 387, 155, 155, 389, 150, 387, 309, - 404, 404, 404, 207, 407, 314, 314, 391, 166, 391, - 391, 391, 391, 391, 391, 387, 387, 387, 387, 388, - 388, 388, 198, 198, 198, 156, 156, 156, 387, 387, - 387, 155, 155, 155, 387, 309, 346, 314, 309, 314, - 391, 391, 391, 408, 408, 408, 387, 387, 387, 387, - 408, 408, 408, 166, 166, 387, 387, 387, 387, 187, - 369, 166, 367, 387, 387, 409, 409, 377, 369, 379, - 314, 166, 387, 387, 391, 387, 0, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 411, 411, 411, 411, 405, 405, 405, 406, 406, 406, + 406, 406, 413, 406, 405, 417, 417, 417, 405, 405, + 405, 405, 406, 406, 407, 407, 405, 405, 417, 417, + 417, 405, 405, 405, 405, 411, 411, 411, 411, 411, + 411, 411, 411, 405, 405, 405, 405, 406, 406, 406, + 406, 406, 406, 406, 406, 406, 405, 405, 405, 406, + 406, 406, 405, 405, 405, 405, 405, 405, 411, 411, + 411, 419, 419, 419, 405, 405, 405, 405, 419, 419, + 419, 411, 411, 405, 405, 405, 405, 413, 405, 411, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 411, - 387, 387, 387, 387, 387, 387, 387, 387, 387 + 405, 405, 411, 405, 0, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405 } ; -static yyconst short int yy_nxt[2656] = +static const flex_int16_t yy_nxt[3729] = { 0, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 19, 4, 20, 21, 22, 23, 4, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 26, 35, 36, 37, - 38, 39, 26, 26, 40, 41, 26, 26, 42, 43, - 26, 26, 44, 45, 45, 49, 47, 45, 45, 341, - 47, 47, 47, 50, 187, 47, 121, 47, 51, 52, - 120, 52, 52, 52, 52, 52, 52, 52, 53, 53, - 53, 53, 53, 383, 53, 53, 53, 47, 383, 47, - 78, 47, 49, 47, 79, 383, 80, 53, 53, 53, + 29, 30, 31, 32, 33, 25, 34, 35, 36, 37, + 38, 25, 25, 39, 40, 25, 25, 41, 42, 25, + 25, 43, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 25, 34, 35, 36, 37, 38, 25, 25, + 39, 40, 25, 25, 41, 42, 25, 44, 45, 45, + 49, 64, 64, 64, 401, 47, 45, 45, 50, 47, + 401, 47, 52, 51, 52, 52, 52, 52, 52, 52, - 53, 53, 53, 53, 47, 51, 182, 383, 47, 387, - 47, 74, 155, 155, 155, 155, 155, 155, 155, 183, - 47, 75, 79, 76, 47, 81, 47, 79, 77, 82, - 53, 55, 55, 368, 55, 55, 56, 55, 55, 55, - 56, 57, 56, 58, 58, 58, 58, 58, 58, 58, - 59, 55, 55, 55, 55, 60, 55, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 55, 61, 62, 62, 62, 62, 62, - 62, 62, 63, 61, 62, 62, 62, 62, 64, 64, + 52, 53, 53, 53, 53, 53, 386, 53, 53, 53, + 359, 359, 47, 64, 64, 64, 64, 64, 64, 64, + 53, 53, 53, 53, 53, 53, 47, 358, 49, 117, + 47, 347, 47, 118, 118, 118, 118, 118, 118, 118, + 199, 51, 306, 306, 306, 306, 81, 47, 197, 47, + 82, 47, 53, 47, 119, 405, 51, 205, 120, 120, + 120, 120, 120, 120, 120, 47, 124, 199, 47, 47, + 72, 47, 47, 81, 47, 197, 71, 82, 53, 55, + 55, 90, 55, 55, 47, 55, 55, 55, 47, 57, + 47, 58, 58, 58, 58, 58, 58, 58, 59, 55, - 64, 63, 61, 64, 64, 64, 64, 64, 64, 64, - 63, 48, 48, 341, 48, 48, 65, 48, 48, 48, - 65, 66, 67, 68, 68, 68, 68, 68, 68, 68, - 69, 48, 48, 48, 48, 51, 48, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 48, 47, 47, 117, 387, 47, 47, - 47, 47, 47, 341, 341, 47, 47, 341, 47, 47, - 47, 47, 187, 47, 47, 340, 47, 47, 329, 47, - 85, 195, 47, 192, 86, 329, 47, 88, 47, 387, + 55, 55, 55, 60, 83, 70, 47, 74, 90, 47, + 47, 84, 47, 47, 46, 47, 47, 75, 405, 76, + 47, 47, 47, 200, 77, 47, 405, 47, 405, 47, + 55, 83, 168, 47, 74, 47, 47, 47, 84, 197, + 47, 47, 47, 47, 75, 405, 76, 405, 47, 405, + 200, 77, 47, 405, 47, 91, 55, 55, 55, 168, + 55, 55, 405, 55, 55, 55, 197, 57, 61, 62, + 62, 62, 62, 62, 62, 62, 63, 55, 55, 55, + 55, 60, 91, 47, 405, 405, 121, 47, 405, 47, + 120, 122, 122, 122, 122, 122, 122, 405, 47, 405, - 194, 83, 194, 87, 92, 47, 187, 187, 84, 47, - 90, 47, 89, 197, 197, 197, 261, 94, 187, 47, - 91, 95, 47, 47, 93, 47, 97, 47, 117, 387, - 47, 47, 96, 47, 47, 47, 47, 118, 118, 47, - 98, 47, 47, 47, 99, 51, 47, 47, 47, 47, - 101, 387, 47, 47, 100, 114, 47, 47, 47, 47, - 387, 115, 187, 103, 262, 102, 165, 187, 47, 124, - 104, 47, 47, 387, 47, 47, 163, 47, 116, 156, - 156, 157, 158, 158, 158, 158, 119, 166, 117, 72, - 164, 167, 105, 71, 70, 167, 106, 107, 159, 159, + 405, 405, 47, 97, 47, 117, 405, 405, 55, 118, + 118, 118, 118, 118, 118, 118, 52, 98, 52, 52, + 52, 52, 52, 52, 52, 47, 405, 405, 405, 47, + 97, 47, 405, 405, 55, 48, 48, 405, 48, 48, + 405, 48, 48, 48, 98, 66, 67, 68, 68, 68, + 68, 68, 68, 68, 69, 48, 48, 48, 48, 51, + 47, 405, 167, 47, 47, 405, 47, 47, 47, 47, + 405, 47, 47, 405, 47, 47, 47, 47, 405, 47, + 47, 405, 47, 47, 405, 47, 48, 85, 78, 167, + 172, 86, 79, 47, 80, 88, 92, 47, 405, 47, - 159, 159, 159, 159, 159, 47, 387, 108, 46, 47, - 47, 47, 109, 47, 47, 341, 47, 47, 73, 47, - 73, 73, 73, 73, 73, 73, 73, 47, 387, 168, - 387, 47, 387, 47, 110, 110, 110, 110, 110, 110, - 110, 111, 112, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 113, 110, 110, 110, 73, 73, - 117, 169, 387, 387, 118, 118, 118, 118, 118, 118, - 118, 53, 53, 53, 53, 53, 387, 53, 53, 53, - 47, 47, 125, 387, 47, 47, 47, 47, 387, 387, - 53, 53, 53, 53, 53, 53, 53, 47, 200, 200, + 87, 47, 47, 405, 405, 47, 47, 47, 47, 405, + 89, 405, 48, 405, 85, 78, 93, 172, 86, 79, + 405, 80, 88, 92, 47, 94, 99, 87, 47, 95, + 47, 405, 171, 405, 405, 47, 100, 89, 47, 47, + 96, 47, 47, 93, 47, 405, 101, 308, 308, 308, + 308, 47, 94, 99, 47, 47, 95, 47, 47, 171, + 47, 102, 103, 100, 405, 405, 405, 96, 405, 104, + 47, 405, 116, 101, 47, 114, 47, 163, 47, 47, + 405, 115, 47, 47, 47, 47, 47, 405, 102, 103, + 47, 164, 47, 169, 47, 405, 104, 47, 47, 116, - 200, 47, 47, 47, 167, 387, 47, 47, 47, 387, - 47, 47, 387, 47, 47, 47, 47, 387, 387, 47, - 170, 47, 387, 53, 117, 387, 387, 171, 126, 126, - 127, 128, 128, 128, 128, 117, 115, 167, 387, 129, - 129, 130, 131, 131, 131, 131, 52, 117, 132, 132, - 133, 134, 134, 134, 134, 135, 118, 118, 65, 136, - 136, 137, 138, 138, 138, 138, 139, 117, 204, 204, - 204, 140, 140, 141, 142, 142, 128, 128, 117, 217, - 217, 217, 126, 126, 127, 128, 128, 128, 128, 119, - 200, 200, 200, 143, 143, 144, 145, 145, 145, 145, + 47, 47, 114, 47, 163, 117, 176, 174, 115, 126, + 126, 127, 128, 128, 128, 128, 191, 105, 164, 117, + 169, 106, 107, 129, 129, 130, 131, 131, 131, 131, + 405, 194, 108, 176, 174, 47, 47, 109, 405, 47, + 47, 47, 47, 191, 105, 405, 117, 405, 106, 107, + 140, 140, 141, 142, 142, 128, 128, 47, 194, 108, + 405, 47, 47, 47, 109, 47, 47, 405, 47, 47, + 73, 47, 73, 73, 73, 73, 73, 73, 73, 117, + 405, 52, 405, 132, 132, 133, 134, 134, 134, 134, + 117, 190, 111, 112, 126, 126, 127, 128, 128, 128, - 135, 226, 226, 226, 146, 146, 147, 148, 148, 148, - 148, 121, 225, 225, 225, 149, 150, 151, 152, 152, - 153, 153, 135, 387, 154, 387, 146, 146, 147, 148, - 148, 148, 148, 50, 135, 387, 154, 387, 160, 160, - 160, 160, 160, 160, 160, 50, 121, 290, 290, 290, - 161, 162, 162, 162, 162, 122, 122, 47, 47, 387, - 387, 47, 47, 47, 47, 47, 47, 387, 387, 47, - 47, 47, 47, 47, 47, 387, 387, 47, 47, 47, - 47, 47, 47, 387, 387, 47, 47, 47, 47, 172, - 47, 387, 387, 47, 47, 174, 47, 47, 387, 47, + 128, 405, 47, 405, 405, 113, 47, 119, 47, 73, + 73, 143, 143, 144, 145, 145, 145, 145, 190, 111, + 112, 67, 146, 146, 147, 148, 148, 148, 148, 69, + 405, 405, 113, 405, 405, 405, 73, 53, 53, 53, + 53, 53, 405, 53, 53, 53, 47, 47, 125, 405, + 47, 47, 47, 47, 405, 405, 53, 53, 53, 53, + 53, 53, 121, 405, 405, 405, 149, 150, 151, 152, + 152, 153, 153, 154, 67, 146, 146, 147, 148, 148, + 148, 148, 50, 405, 177, 117, 189, 405, 53, 155, + 155, 155, 155, 155, 155, 155, 117, 405, 52, 405, - 387, 192, 387, 387, 173, 47, 167, 167, 167, 47, - 194, 47, 387, 47, 47, 187, 175, 47, 47, 47, - 47, 47, 176, 387, 47, 47, 387, 47, 47, 47, - 47, 167, 387, 47, 387, 47, 47, 47, 167, 115, - 47, 47, 47, 47, 47, 47, 192, 387, 47, 47, - 47, 47, 387, 47, 177, 194, 167, 47, 387, 47, - 187, 167, 47, 47, 178, 387, 47, 47, 47, 47, - 184, 184, 185, 387, 179, 47, 387, 115, 181, 47, - 167, 47, 47, 180, 387, 387, 47, 115, 47, 184, - 184, 185, 207, 207, 207, 207, 115, 47, 348, 348, + 156, 156, 157, 158, 158, 158, 158, 346, 346, 346, + 346, 177, 405, 189, 53, 48, 48, 405, 48, 48, + 47, 48, 48, 135, 47, 66, 47, 136, 136, 137, + 138, 138, 138, 138, 139, 48, 48, 48, 48, 51, + 119, 405, 405, 405, 159, 159, 159, 159, 159, 159, + 159, 154, 67, 160, 160, 160, 160, 160, 160, 160, + 50, 405, 405, 121, 405, 405, 48, 161, 162, 162, + 162, 162, 122, 122, 47, 47, 405, 405, 47, 47, + 47, 47, 47, 47, 405, 405, 47, 47, 47, 47, + 405, 405, 48, 405, 47, 47, 405, 165, 47, 47, - 348, 47, 73, 47, 73, 73, 73, 73, 73, 73, - 73, 387, 387, 186, 197, 197, 197, 197, 197, 197, - 197, 200, 200, 200, 200, 200, 200, 200, 204, 204, - 204, 204, 204, 204, 204, 217, 217, 217, 217, 217, - 217, 217, 73, 73, 47, 188, 188, 188, 47, 73, - 47, 73, 73, 73, 73, 73, 73, 73, 190, 190, - 190, 190, 190, 190, 190, 218, 218, 218, 218, 218, - 218, 218, 200, 200, 200, 200, 200, 200, 200, 387, - 47, 375, 375, 375, 47, 182, 47, 387, 383, 73, - 73, 189, 189, 189, 189, 189, 189, 189, 248, 248, + 47, 47, 405, 47, 405, 405, 173, 47, 170, 47, + 405, 47, 405, 405, 175, 47, 405, 47, 166, 405, + 405, 405, 178, 47, 165, 405, 47, 47, 179, 47, + 47, 405, 47, 173, 180, 170, 181, 350, 350, 350, + 350, 175, 47, 405, 182, 166, 47, 405, 47, 178, + 47, 183, 405, 405, 47, 179, 47, 405, 47, 186, + 184, 180, 47, 181, 47, 405, 47, 185, 405, 47, + 47, 182, 47, 47, 405, 47, 47, 405, 183, 405, + 47, 187, 47, 188, 405, 405, 186, 184, 405, 192, + 195, 47, 405, 193, 185, 47, 405, 47, 201, 201, - 248, 248, 248, 51, 49, 190, 190, 190, 190, 190, - 190, 190, 288, 288, 288, 288, 387, 51, 192, 387, - 193, 193, 193, 193, 188, 188, 188, 194, 350, 350, - 350, 350, 187, 195, 387, 196, 196, 196, 196, 196, - 196, 196, 194, 328, 328, 328, 328, 187, 198, 387, - 199, 199, 199, 199, 199, 199, 199, 135, 387, 201, - 65, 202, 202, 202, 202, 202, 202, 202, 203, 192, - 387, 206, 206, 206, 206, 207, 207, 207, 194, 387, - 387, 47, 387, 187, 48, 47, 208, 47, 209, 209, - 209, 209, 209, 209, 209, 48, 387, 208, 387, 209, + 202, 405, 196, 405, 405, 47, 405, 405, 187, 47, + 188, 47, 201, 201, 202, 47, 192, 195, 47, 47, + 193, 47, 47, 405, 47, 405, 405, 47, 203, 196, + 47, 47, 405, 47, 47, 73, 47, 73, 73, 73, + 73, 73, 73, 73, 206, 206, 206, 206, 206, 206, + 206, 245, 204, 405, 405, 203, 205, 207, 207, 207, + 207, 207, 207, 207, 164, 405, 47, 405, 405, 51, + 47, 295, 47, 405, 73, 73, 405, 405, 245, 204, + 49, 208, 208, 208, 208, 208, 208, 208, 405, 405, + 117, 164, 405, 51, 223, 223, 223, 223, 223, 118, - 209, 209, 209, 210, 210, 210, 48, 387, 208, 387, - 210, 210, 210, 210, 210, 210, 210, 67, 211, 211, - 211, 211, 211, 211, 211, 212, 67, 211, 211, 211, - 211, 213, 213, 213, 212, 67, 213, 213, 213, 213, - 213, 213, 213, 212, 214, 387, 215, 215, 215, 215, - 215, 215, 215, 203, 332, 332, 332, 332, 51, 214, - 49, 216, 216, 216, 216, 216, 216, 216, 203, 344, - 344, 344, 344, 51, 197, 197, 197, 197, 197, 197, - 197, 339, 339, 339, 339, 387, 187, 52, 340, 219, - 219, 219, 219, 219, 219, 219, 48, 387, 65, 387, + 118, 73, 47, 405, 405, 405, 47, 73, 47, 73, + 73, 73, 73, 73, 73, 73, 210, 405, 211, 211, + 211, 211, 211, 211, 211, 212, 405, 405, 405, 210, + 205, 211, 211, 211, 211, 206, 206, 206, 212, 405, + 405, 405, 198, 205, 405, 405, 73, 73, 210, 405, + 206, 206, 206, 206, 206, 206, 206, 212, 405, 47, + 47, 405, 205, 47, 47, 47, 47, 405, 405, 198, + 405, 405, 213, 73, 214, 214, 214, 214, 214, 214, + 214, 212, 247, 239, 405, 213, 205, 214, 214, 214, + 214, 215, 215, 215, 212, 405, 405, 405, 213, 205, - 210, 210, 210, 210, 210, 210, 210, 48, 154, 67, - 213, 213, 213, 213, 213, 213, 213, 50, 220, 220, - 220, 220, 220, 220, 220, 360, 360, 360, 360, 360, - 51, 49, 217, 217, 217, 217, 217, 217, 217, 47, - 387, 387, 47, 47, 51, 47, 47, 47, 47, 387, - 47, 47, 387, 47, 47, 387, 47, 47, 47, 387, - 387, 47, 47, 47, 47, 47, 47, 221, 387, 47, - 47, 47, 47, 387, 387, 228, 387, 164, 47, 387, - 229, 227, 47, 230, 47, 222, 222, 223, 224, 225, - 225, 225, 47, 188, 188, 188, 47, 47, 47, 232, + 215, 215, 215, 215, 215, 215, 215, 212, 405, 247, + 239, 216, 205, 217, 217, 217, 217, 217, 217, 217, + 212, 405, 405, 405, 216, 205, 217, 217, 217, 217, + 218, 218, 218, 212, 405, 405, 405, 216, 205, 218, + 218, 218, 218, 218, 218, 218, 212, 405, 117, 405, + 405, 205, 118, 118, 118, 118, 118, 118, 118, 405, + 405, 405, 405, 219, 205, 220, 220, 220, 220, 220, + 220, 220, 221, 219, 405, 220, 220, 220, 220, 222, + 222, 222, 221, 219, 405, 222, 222, 222, 222, 222, + 222, 222, 221, 210, 405, 224, 224, 224, 224, 224, - 47, 47, 387, 47, 47, 231, 47, 47, 47, 387, - 387, 47, 47, 47, 47, 47, 387, 233, 47, 47, - 387, 47, 47, 387, 47, 387, 47, 387, 387, 234, - 47, 387, 47, 184, 184, 185, 387, 387, 47, 387, - 237, 235, 47, 238, 47, 387, 387, 387, 236, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 73, 73, 73, 239, 47, 381, 381, 381, 47, 387, - 47, 241, 383, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 135, 387, 387, 387, 242, 242, 242, 242, - 242, 242, 242, 304, 304, 304, 304, 387, 51, 135, + 224, 224, 212, 405, 405, 405, 210, 205, 224, 224, + 224, 224, 225, 225, 225, 212, 405, 405, 405, 210, + 205, 225, 225, 225, 225, 225, 225, 225, 212, 405, + 48, 405, 226, 205, 227, 227, 227, 227, 227, 227, + 227, 221, 48, 405, 226, 405, 227, 227, 227, 227, + 228, 228, 228, 221, 48, 405, 226, 405, 228, 228, + 228, 228, 228, 228, 228, 221, 219, 67, 229, 229, + 229, 229, 229, 229, 229, 230, 219, 67, 229, 229, + 229, 229, 231, 231, 231, 230, 219, 67, 231, 231, + 231, 231, 231, 231, 231, 230, 232, 405, 233, 233, - 341, 387, 49, 243, 243, 243, 243, 243, 243, 243, - 247, 247, 247, 383, 387, 51, 244, 244, 245, 246, - 246, 246, 247, 249, 249, 250, 251, 251, 251, 252, - 52, 387, 253, 253, 254, 255, 255, 255, 256, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 257, 257, 258, 259, 259, 259, 158, - 204, 204, 204, 204, 204, 204, 204, 154, 387, 204, - 204, 204, 204, 204, 204, 204, 48, 263, 263, 264, - 265, 265, 265, 266, 208, 387, 267, 267, 267, 267, - 267, 267, 267, 65, 387, 267, 267, 267, 267, 267, + 233, 233, 233, 233, 233, 221, 405, 405, 405, 405, + 51, 232, 49, 234, 234, 234, 234, 234, 234, 234, + 221, 405, 405, 405, 405, 51, 232, 49, 234, 234, + 234, 234, 235, 235, 235, 221, 405, 405, 405, 405, + 51, 232, 49, 235, 235, 235, 235, 235, 235, 235, + 221, 405, 405, 405, 405, 51, 232, 49, 208, 208, + 208, 208, 208, 208, 208, 221, 405, 117, 405, 52, + 51, 236, 236, 236, 236, 236, 236, 236, 215, 215, + 215, 215, 215, 215, 215, 405, 405, 405, 405, 52, + 205, 237, 237, 237, 237, 237, 237, 237, 405, 405, - 267, 267, 48, 67, 213, 213, 213, 213, 213, 213, - 213, 212, 121, 387, 387, 387, 268, 269, 269, 269, - 269, 122, 122, 154, 67, 213, 213, 213, 213, 213, - 213, 213, 50, 117, 387, 387, 387, 270, 270, 271, - 272, 272, 272, 273, 135, 387, 274, 48, 242, 242, - 242, 242, 242, 242, 242, 135, 387, 274, 387, 243, - 243, 243, 243, 243, 243, 243, 135, 387, 275, 387, - 243, 243, 243, 243, 243, 243, 243, 48, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 135, 387, 275, 387, 242, 242, 242, 242, + 405, 405, 52, 205, 237, 237, 237, 237, 218, 218, + 218, 405, 405, 405, 405, 52, 205, 218, 218, 218, + 218, 218, 218, 218, 405, 405, 48, 405, 65, 205, + 228, 228, 228, 228, 228, 228, 228, 48, 154, 67, + 231, 231, 231, 231, 231, 231, 231, 50, 238, 238, + 238, 238, 238, 238, 238, 266, 266, 266, 266, 266, + 51, 49, 235, 235, 235, 235, 235, 235, 235, 47, + 405, 405, 405, 47, 51, 47, 240, 240, 241, 242, + 243, 243, 243, 47, 405, 405, 405, 47, 405, 47, + 244, 244, 244, 242, 243, 243, 243, 47, 405, 405, - 242, 242, 242, 47, 387, 387, 47, 47, 51, 47, - 47, 277, 47, 225, 225, 47, 387, 387, 387, 47, - 277, 47, 277, 387, 225, 225, 225, 225, 47, 47, - 387, 387, 47, 47, 47, 47, 387, 367, 367, 367, - 367, 387, 276, 277, 368, 278, 278, 278, 278, 278, - 278, 278, 47, 279, 387, 47, 47, 387, 47, 47, - 47, 47, 387, 387, 47, 47, 47, 280, 47, 47, - 387, 47, 47, 47, 47, 387, 47, 47, 387, 47, - 47, 47, 47, 387, 387, 47, 387, 47, 47, 387, - 281, 47, 47, 387, 47, 47, 47, 47, 282, 387, + 405, 47, 405, 47, 244, 244, 244, 242, 243, 243, + 243, 47, 47, 405, 405, 47, 47, 47, 47, 244, + 244, 244, 242, 243, 243, 243, 405, 47, 405, 405, + 47, 47, 405, 47, 47, 246, 47, 244, 244, 244, + 242, 243, 243, 243, 405, 405, 47, 405, 405, 405, + 47, 248, 47, 201, 201, 202, 405, 47, 405, 405, + 47, 47, 246, 47, 47, 47, 47, 405, 405, 47, + 47, 47, 405, 47, 47, 405, 47, 47, 248, 47, + 244, 244, 244, 242, 243, 243, 243, 405, 405, 405, + 405, 47, 250, 405, 251, 47, 249, 47, 244, 244, - 47, 283, 47, 286, 286, 286, 286, 286, 73, 73, - 387, 387, 387, 284, 387, 285, 135, 387, 387, 387, - 242, 242, 242, 242, 242, 242, 242, 375, 375, 375, - 375, 387, 51, 135, 383, 387, 49, 243, 243, 243, - 243, 243, 243, 243, 247, 247, 247, 247, 387, 51, - 288, 288, 288, 288, 288, 288, 288, 289, 289, 289, - 289, 289, 289, 289, 287, 287, 387, 287, 287, 290, - 287, 287, 287, 290, 290, 290, 291, 291, 291, 291, - 291, 291, 291, 287, 287, 287, 287, 287, 287, 287, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 244, 242, 243, 243, 243, 47, 405, 405, 405, 47, + 405, 47, 244, 244, 244, 242, 243, 243, 243, 250, + 47, 251, 405, 249, 47, 47, 47, 405, 405, 47, + 405, 47, 244, 244, 244, 242, 243, 243, 243, 405, + 405, 47, 405, 405, 405, 47, 47, 47, 405, 405, + 47, 252, 47, 244, 244, 244, 242, 243, 243, 243, + 47, 405, 405, 405, 47, 405, 47, 201, 201, 202, + 405, 405, 405, 47, 253, 405, 405, 47, 252, 47, + 244, 244, 244, 242, 243, 243, 243, 47, 405, 405, + 405, 47, 405, 47, 244, 244, 244, 242, 243, 243, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 287, 290, 290, 290, - 290, 290, 290, 290, 292, 387, 293, 293, 293, 293, - 293, 293, 293, 292, 387, 293, 293, 293, 293, 292, - 292, 292, 292, 387, 292, 292, 292, 292, 292, 292, - 292, 52, 52, 52, 52, 52, 52, 52, 292, 387, - 294, 294, 294, 294, 294, 294, 294, 386, 386, 386, - 386, 386, 295, 292, 387, 294, 294, 294, 294, 296, - 296, 296, 387, 387, 387, 387, 387, 295, 292, 387, - 296, 296, 296, 296, 296, 296, 296, 387, 387, 387, + 243, 253, 47, 47, 405, 405, 47, 47, 47, 47, + 201, 201, 202, 47, 405, 405, 405, 47, 405, 47, + 244, 244, 244, 242, 243, 243, 243, 47, 47, 405, + 405, 47, 47, 47, 47, 405, 47, 405, 405, 405, + 47, 254, 47, 201, 201, 202, 405, 405, 405, 47, + 405, 255, 256, 47, 405, 47, 201, 201, 202, 47, + 405, 405, 405, 47, 405, 47, 47, 405, 254, 405, + 47, 405, 47, 201, 201, 202, 405, 405, 255, 256, + 47, 405, 405, 257, 47, 405, 47, 258, 258, 258, + 258, 258, 258, 258, 47, 405, 405, 405, 47, 405, - 387, 387, 295, 298, 298, 299, 300, 300, 300, 301, - 302, 302, 303, 304, 304, 304, 304, 305, 305, 305, - 305, 305, 305, 305, 387, 387, 387, 387, 387, 295, - 305, 305, 305, 305, 306, 306, 306, 387, 387, 387, - 387, 387, 295, 306, 306, 306, 306, 306, 306, 306, - 387, 387, 387, 387, 387, 295, 65, 387, 267, 267, - 267, 267, 267, 267, 267, 48, 307, 307, 307, 307, - 307, 307, 307, 387, 387, 387, 387, 387, 51, 49, - 308, 308, 308, 308, 308, 308, 308, 387, 387, 387, - 387, 387, 51, 309, 309, 309, 309, 309, 309, 309, + 47, 258, 258, 258, 258, 47, 405, 405, 405, 47, + 257, 47, 201, 201, 202, 259, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 206, 206, 206, 206, + 206, 206, 206, 405, 405, 135, 405, 405, 205, 260, + 260, 260, 260, 260, 260, 260, 405, 405, 405, 135, + 405, 51, 49, 261, 261, 261, 261, 261, 261, 261, + 378, 378, 378, 378, 378, 51, 262, 262, 263, 264, + 264, 264, 265, 210, 405, 206, 206, 206, 206, 206, + 206, 206, 212, 405, 405, 405, 405, 205, 267, 267, + 268, 269, 269, 269, 270, 213, 405, 215, 215, 215, - 387, 387, 387, 387, 387, 295, 309, 309, 309, 309, - 310, 310, 310, 387, 387, 387, 387, 387, 295, 310, - 310, 310, 310, 310, 310, 310, 387, 387, 387, 47, - 387, 295, 117, 47, 387, 47, 311, 311, 312, 313, - 313, 313, 314, 117, 387, 387, 387, 315, 315, 316, - 317, 317, 317, 317, 319, 319, 319, 320, 321, 321, - 321, 286, 286, 286, 286, 286, 73, 73, 318, 47, - 47, 387, 387, 47, 47, 47, 47, 47, 47, 387, - 387, 47, 47, 47, 47, 47, 387, 387, 387, 47, - 47, 47, 322, 47, 47, 387, 47, 47, 387, 47, + 215, 215, 215, 215, 212, 405, 405, 405, 405, 205, + 215, 215, 215, 215, 215, 215, 215, 405, 405, 405, + 405, 52, 205, 271, 271, 272, 273, 273, 273, 274, + 216, 405, 218, 218, 218, 218, 218, 218, 218, 212, + 405, 405, 405, 52, 205, 218, 218, 218, 218, 218, + 218, 218, 405, 405, 117, 405, 52, 205, 275, 275, + 276, 277, 277, 277, 158, 219, 405, 222, 222, 222, + 222, 222, 222, 222, 221, 117, 405, 405, 405, 278, + 278, 278, 278, 278, 118, 118, 154, 405, 222, 222, + 222, 222, 222, 222, 222, 48, 225, 225, 225, 225, - 325, 325, 325, 325, 325, 325, 325, 47, 47, 387, - 323, 47, 47, 47, 47, 387, 324, 326, 326, 327, - 328, 328, 328, 328, 326, 326, 327, 328, 328, 328, - 328, 330, 330, 331, 332, 332, 332, 332, 330, 330, - 331, 332, 332, 332, 332, 333, 333, 334, 335, 335, - 335, 335, 333, 333, 334, 335, 335, 335, 335, 336, - 336, 337, 338, 338, 338, 338, 326, 326, 327, 328, - 328, 328, 328, 336, 336, 337, 338, 338, 338, 338, - 339, 339, 339, 339, 339, 339, 339, 340, 342, 342, - 343, 344, 344, 344, 344, 342, 342, 343, 344, 344, + 225, 225, 225, 405, 405, 405, 405, 279, 205, 206, + 206, 206, 206, 206, 206, 206, 212, 405, 405, 405, + 280, 205, 206, 206, 206, 206, 206, 206, 206, 405, + 405, 117, 405, 405, 205, 281, 281, 282, 283, 283, + 283, 284, 226, 405, 285, 285, 285, 285, 285, 285, + 285, 221, 65, 405, 285, 285, 285, 285, 285, 285, + 285, 48, 219, 67, 231, 231, 231, 231, 231, 231, + 231, 230, 121, 405, 405, 405, 286, 287, 287, 287, + 287, 122, 122, 154, 67, 231, 231, 231, 231, 231, + 231, 231, 50, 117, 405, 405, 405, 288, 288, 289, - 344, 344, 135, 387, 345, 387, 242, 242, 242, 242, - 242, 242, 242, 387, 387, 387, 47, 387, 51, 135, - 47, 345, 47, 243, 243, 243, 243, 243, 243, 243, - 48, 346, 346, 347, 348, 348, 348, 348, 387, 387, - 387, 387, 387, 187, 349, 349, 349, 349, 349, 349, - 349, 340, 387, 387, 352, 387, 295, 349, 349, 349, - 349, 310, 310, 310, 340, 387, 387, 387, 387, 295, - 310, 310, 310, 310, 310, 310, 310, 340, 387, 387, - 387, 387, 295, 321, 321, 321, 321, 321, 321, 321, - 47, 387, 387, 387, 47, 47, 47, 321, 321, 47, + 290, 290, 290, 291, 135, 405, 292, 405, 260, 260, + 260, 260, 260, 260, 260, 221, 405, 405, 405, 405, + 51, 135, 405, 292, 49, 261, 261, 261, 261, 261, + 261, 261, 221, 405, 405, 405, 135, 51, 293, 49, + 261, 261, 261, 261, 261, 261, 261, 405, 405, 405, + 405, 52, 51, 218, 218, 218, 218, 218, 218, 218, + 405, 405, 405, 405, 52, 205, 218, 218, 218, 218, + 218, 218, 218, 405, 405, 135, 405, 293, 205, 260, + 260, 260, 260, 260, 260, 260, 47, 405, 405, 47, + 47, 51, 47, 47, 295, 47, 296, 296, 296, 296, - 47, 47, 387, 47, 47, 387, 47, 47, 353, 47, - 328, 328, 328, 328, 328, 328, 328, 354, 354, 355, - 356, 356, 356, 304, 332, 332, 332, 332, 332, 332, - 332, 387, 387, 387, 387, 351, 335, 335, 335, 335, - 335, 335, 335, 335, 335, 335, 335, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 326, 326, - 327, 328, 328, 328, 328, 341, 357, 357, 358, 359, - 359, 328, 328, 344, 344, 344, 344, 344, 344, 344, + 296, 296, 296, 47, 405, 405, 405, 47, 295, 47, + 296, 296, 296, 296, 243, 243, 243, 405, 405, 405, + 405, 47, 405, 405, 294, 47, 295, 47, 243, 243, + 47, 405, 405, 405, 47, 295, 47, 243, 243, 243, + 243, 243, 243, 243, 47, 405, 405, 405, 47, 47, + 47, 294, 47, 47, 405, 47, 47, 47, 47, 405, + 47, 47, 405, 47, 47, 47, 47, 405, 297, 47, + 47, 47, 405, 47, 47, 405, 47, 47, 405, 47, + 47, 299, 298, 405, 47, 405, 47, 47, 405, 300, + 405, 47, 47, 47, 301, 297, 47, 47, 47, 405, - 117, 387, 387, 387, 361, 361, 362, 363, 363, 363, - 317, 47, 47, 387, 387, 47, 47, 47, 47, 47, - 387, 387, 387, 47, 387, 47, 364, 364, 365, 367, - 367, 367, 367, 367, 367, 367, 368, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 247, 247, 247, 247, 369, 369, 369, 369, 369, - 369, 369, 368, 387, 387, 387, 387, 370, 369, 369, - 369, 369, 371, 371, 371, 368, 387, 387, 387, 387, - 370, 371, 371, 371, 371, 371, 371, 371, 368, 387, + 405, 47, 405, 47, 302, 405, 405, 405, 299, 298, + 303, 47, 405, 405, 405, 47, 300, 47, 47, 405, + 405, 301, 47, 405, 47, 304, 304, 304, 304, 304, + 405, 302, 405, 340, 135, 336, 405, 303, 260, 260, + 260, 260, 260, 260, 260, 405, 405, 405, 135, 405, + 51, 49, 261, 261, 261, 261, 261, 261, 261, 405, + 340, 405, 336, 405, 51, 306, 306, 306, 306, 306, + 306, 306, 307, 307, 307, 307, 307, 307, 307, 305, + 305, 405, 305, 305, 47, 305, 305, 305, 47, 405, + 47, 309, 309, 309, 309, 309, 309, 309, 305, 305, - 387, 387, 387, 370, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 73, 73, 73, 373, 373, - 374, 375, 375, 375, 375, 373, 373, 374, 375, 375, - 375, 375, 341, 376, 376, 377, 378, 378, 375, 375, - 379, 379, 380, 381, 381, 381, 381, 341, 387, 387, - 387, 387, 187, 373, 373, 374, 375, 375, 375, 375, - 382, 382, 382, 382, 382, 73, 73, 385, 385, 385, - 385, 385, 385, 385, 47, 387, 387, 387, 47, 387, - 47, 247, 247, 247, 247, 247, 247, 247, 47, 387, - 47, 47, 387, 387, 47, 48, 387, 48, 48, 48, + 305, 305, 305, 305, 310, 405, 311, 311, 311, 311, + 311, 311, 311, 310, 405, 311, 311, 311, 311, 310, + 310, 310, 316, 316, 317, 318, 318, 318, 319, 310, + 305, 310, 310, 310, 310, 310, 310, 310, 52, 405, + 52, 52, 52, 52, 52, 52, 52, 315, 315, 315, + 315, 315, 315, 315, 405, 405, 305, 305, 305, 205, + 305, 305, 47, 305, 305, 305, 47, 405, 47, 309, + 309, 309, 309, 405, 405, 405, 305, 305, 305, 305, + 305, 305, 310, 405, 312, 312, 312, 312, 312, 312, + 312, 405, 405, 405, 405, 310, 313, 312, 312, 312, - 48, 48, 48, 48, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 73, 387, 73, 73, 387, 387, 73, - 118, 387, 118, 120, 387, 120, 122, 387, 122, 123, - 387, 123, 387, 387, 123, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 79, 387, 79, 79, 387, 387, - 79, 188, 387, 188, 191, 191, 387, 387, 191, 193, - 193, 193, 193, 205, 387, 205, 206, 206, 206, 206, - 260, 387, 260, 287, 387, 287, 287, 287, 287, 287, - 287, 287, 297, 387, 297, 304, 304, 350, 350, 350, - 366, 387, 366, 366, 366, 366, 366, 366, 366, 384, + 312, 314, 314, 314, 357, 357, 357, 357, 305, 313, + 310, 358, 314, 314, 314, 314, 314, 314, 314, 404, + 404, 404, 404, 404, 313, 320, 320, 321, 322, 322, + 322, 322, 405, 405, 305, 323, 323, 323, 323, 323, + 323, 323, 405, 405, 405, 405, 405, 313, 323, 323, + 323, 323, 324, 324, 324, 405, 405, 405, 405, 405, + 313, 324, 324, 324, 324, 324, 324, 324, 405, 405, + 405, 405, 405, 313, 215, 215, 215, 215, 215, 215, + 215, 405, 405, 405, 405, 65, 205, 285, 285, 285, + 285, 285, 285, 285, 48, 325, 325, 325, 325, 325, - 384, 3, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387 + 325, 325, 405, 405, 405, 405, 405, 51, 49, 326, + 326, 326, 326, 326, 326, 326, 405, 405, 405, 405, + 405, 51, 327, 327, 327, 327, 327, 327, 327, 405, + 405, 405, 405, 405, 313, 327, 327, 327, 327, 328, + 328, 328, 405, 405, 405, 405, 405, 313, 328, 328, + 328, 328, 328, 328, 328, 405, 405, 405, 405, 405, + 313, 206, 206, 206, 206, 206, 206, 206, 405, 405, + 117, 405, 405, 205, 329, 329, 330, 331, 331, 331, + 332, 117, 405, 405, 405, 333, 333, 334, 335, 335, + 335, 335, 47, 405, 405, 405, 47, 405, 47, 337, + + 337, 337, 338, 339, 339, 339, 47, 405, 405, 405, + 47, 295, 47, 304, 304, 304, 304, 304, 47, 47, + 405, 405, 47, 47, 47, 47, 47, 47, 405, 405, + 47, 47, 47, 47, 47, 405, 405, 405, 47, 405, + 47, 343, 343, 343, 343, 343, 343, 343, 344, 344, + 345, 346, 346, 346, 346, 405, 342, 341, 344, 344, + 345, 346, 346, 346, 346, 348, 348, 349, 350, 350, + 350, 350, 348, 348, 349, 350, 350, 350, 350, 322, + 322, 322, 322, 342, 341, 52, 359, 351, 351, 352, + 353, 353, 353, 353, 52, 405, 351, 351, 352, 353, + + 353, 353, 353, 52, 405, 354, 354, 355, 356, 356, + 356, 356, 405, 405, 259, 405, 405, 205, 344, 344, + 345, 346, 346, 346, 346, 52, 405, 354, 354, 355, + 356, 356, 356, 356, 405, 405, 405, 405, 347, 205, + 206, 206, 206, 206, 206, 206, 206, 405, 405, 405, + 405, 405, 205, 357, 357, 357, 357, 357, 357, 357, + 358, 322, 322, 322, 322, 322, 322, 322, 359, 360, + 360, 361, 362, 362, 362, 362, 405, 405, 405, 405, + 405, 205, 360, 360, 361, 362, 362, 362, 362, 405, + 405, 135, 405, 363, 205, 260, 260, 260, 260, 260, + + 260, 260, 405, 405, 405, 405, 135, 51, 363, 49, + 261, 261, 261, 261, 261, 261, 261, 405, 405, 405, + 405, 405, 51, 364, 364, 365, 366, 366, 366, 366, + 405, 405, 405, 405, 405, 205, 364, 364, 365, 366, + 366, 366, 366, 405, 405, 405, 405, 405, 205, 367, + 367, 367, 367, 367, 367, 367, 358, 405, 405, 405, + 405, 313, 367, 367, 367, 367, 328, 328, 328, 358, + 405, 405, 405, 405, 313, 328, 328, 328, 328, 328, + 328, 328, 358, 405, 405, 405, 405, 313, 206, 206, + 206, 206, 206, 206, 206, 359, 405, 405, 405, 405, + + 205, 368, 368, 368, 368, 368, 368, 368, 359, 405, + 405, 405, 405, 205, 368, 368, 368, 368, 206, 206, + 206, 359, 405, 405, 405, 405, 205, 206, 206, 206, + 206, 206, 206, 206, 359, 405, 47, 47, 405, 205, + 47, 47, 47, 47, 339, 339, 339, 339, 339, 339, + 339, 47, 405, 405, 405, 47, 47, 47, 339, 339, + 47, 47, 47, 405, 47, 47, 405, 47, 47, 47, + 47, 405, 47, 47, 405, 47, 47, 371, 47, 346, + 346, 346, 346, 346, 346, 346, 372, 372, 373, 374, + 374, 374, 322, 350, 350, 350, 350, 350, 350, 350, + + 369, 370, 52, 405, 353, 353, 353, 353, 353, 353, + 353, 52, 405, 353, 353, 353, 353, 52, 52, 52, + 375, 375, 376, 377, 377, 346, 346, 369, 370, 52, + 405, 52, 52, 52, 52, 52, 52, 52, 52, 405, + 356, 356, 356, 356, 356, 356, 356, 405, 405, 405, + 405, 52, 205, 356, 356, 356, 356, 218, 218, 218, + 405, 405, 405, 405, 52, 205, 218, 218, 218, 218, + 218, 218, 218, 405, 405, 405, 405, 405, 205, 344, + 344, 345, 346, 346, 346, 346, 359, 362, 362, 362, + 362, 362, 362, 362, 405, 405, 405, 405, 405, 205, + + 362, 362, 362, 362, 215, 215, 215, 405, 405, 405, + 405, 405, 205, 215, 215, 215, 215, 215, 215, 215, + 405, 405, 117, 405, 405, 205, 379, 379, 380, 381, + 381, 381, 335, 366, 366, 366, 366, 366, 366, 366, + 405, 405, 405, 405, 405, 205, 366, 366, 366, 366, + 206, 206, 206, 405, 405, 405, 405, 405, 205, 206, + 206, 206, 206, 206, 206, 206, 405, 405, 405, 405, + 405, 205, 364, 364, 365, 366, 366, 366, 366, 359, + 405, 405, 405, 405, 205, 206, 206, 206, 206, 206, + 206, 206, 359, 405, 47, 47, 405, 205, 47, 47, + + 47, 47, 47, 405, 405, 405, 47, 405, 47, 382, + 382, 383, 385, 385, 385, 385, 385, 385, 385, 386, + 385, 385, 385, 385, 405, 405, 405, 386, 346, 346, + 346, 346, 346, 346, 346, 346, 346, 346, 346, 265, + 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 265, 265, 265, 387, 387, 387, 387, + 387, 387, 387, 386, 405, 405, 405, 405, 388, 387, + 387, 387, 387, 389, 389, 389, 386, 405, 405, 405, + 405, 388, 389, 389, 389, 389, 389, 389, 389, 386, + 405, 47, 405, 405, 388, 47, 405, 47, 390, 390, + + 390, 390, 390, 390, 390, 47, 405, 405, 405, 47, + 405, 47, 390, 390, 390, 390, 391, 391, 392, 393, + 393, 393, 393, 391, 391, 392, 393, 393, 393, 393, + 359, 394, 394, 395, 396, 396, 393, 393, 397, 397, + 398, 399, 399, 399, 399, 359, 405, 259, 405, 405, + 205, 391, 391, 392, 393, 393, 393, 393, 397, 397, + 398, 399, 399, 399, 399, 47, 405, 405, 405, 47, + 205, 47, 400, 400, 400, 400, 400, 393, 393, 393, + 393, 393, 393, 393, 401, 393, 393, 393, 393, 405, + 405, 405, 401, 402, 402, 402, 402, 402, 402, 402, + + 401, 402, 402, 402, 402, 265, 265, 265, 401, 265, + 265, 265, 265, 265, 265, 265, 401, 399, 399, 399, + 399, 399, 399, 399, 401, 405, 405, 405, 405, 205, + 399, 399, 399, 399, 206, 206, 206, 401, 405, 405, + 405, 405, 205, 206, 206, 206, 206, 206, 206, 206, + 401, 405, 47, 405, 405, 205, 47, 405, 47, 403, + 403, 403, 403, 403, 403, 403, 47, 405, 405, 405, + 47, 405, 47, 265, 265, 265, 265, 265, 265, 265, + 47, 405, 47, 47, 48, 405, 48, 48, 48, 48, + 54, 54, 54, 54, 54, 54, 56, 405, 56, 56, + + 56, 56, 65, 405, 65, 65, 65, 65, 73, 405, + 73, 73, 110, 405, 110, 110, 123, 405, 123, 53, + 53, 53, 53, 53, 53, 197, 405, 197, 197, 209, + 209, 305, 405, 305, 305, 305, 305, 308, 405, 308, + 308, 308, 308, 384, 405, 384, 384, 384, 384, 3, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405 } ; -static yyconst short int yy_chk[2656] = +static const flex_int16_t yy_chk[3729] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -784,298 +986,419 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 5, 5, 11, 26, 45, 45, 315, - 26, 27, 26, 11, 315, 27, 50, 27, 11, 13, - 50, 13, 13, 13, 13, 13, 13, 13, 14, 14, - 14, 14, 14, 384, 14, 14, 14, 25, 381, 14, - 27, 25, 121, 25, 27, 376, 27, 14, 14, 14, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, + 11, 17, 17, 17, 402, 25, 45, 45, 11, 25, + 393, 25, 13, 11, 13, 13, 13, 13, 13, 13, - 14, 14, 14, 14, 28, 121, 113, 375, 28, 371, - 28, 25, 65, 65, 65, 65, 65, 65, 65, 112, - 73, 25, 113, 25, 73, 28, 73, 112, 25, 28, - 14, 15, 15, 356, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, + 13, 14, 14, 14, 14, 14, 374, 14, 14, 14, + 322, 319, 14, 18, 18, 18, 18, 18, 18, 18, + 14, 14, 14, 14, 14, 14, 27, 318, 121, 48, + 27, 307, 27, 48, 48, 48, 48, 48, 48, 48, + 112, 121, 263, 263, 263, 263, 27, 31, 112, 125, + 27, 31, 14, 31, 49, 124, 119, 117, 49, 49, + 49, 49, 49, 49, 49, 73, 53, 112, 28, 73, + 23, 73, 28, 27, 28, 112, 22, 27, 14, 15, + 15, 31, 15, 15, 24, 15, 15, 15, 24, 15, + 24, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 19, 19, 349, 19, 19, 19, 19, 19, 19, + 15, 15, 15, 15, 28, 21, 77, 24, 31, 79, + 77, 28, 77, 79, 6, 79, 32, 24, 3, 24, + 32, 83, 32, 113, 24, 83, 0, 83, 0, 88, + 15, 28, 77, 88, 24, 88, 89, 94, 28, 113, + 89, 94, 89, 94, 24, 0, 24, 0, 96, 0, + 113, 24, 96, 0, 96, 32, 15, 16, 16, 77, + 16, 16, 0, 16, 16, 16, 113, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 32, 35, 0, 0, 50, 35, 0, 35, + 50, 50, 50, 50, 50, 50, 50, 0, 99, 0, + + 0, 0, 99, 35, 99, 51, 0, 0, 16, 51, + 51, 51, 51, 51, 51, 51, 52, 35, 52, 52, + 52, 52, 52, 52, 52, 76, 0, 0, 0, 76, + 35, 76, 0, 0, 16, 19, 19, 0, 19, 19, + 0, 19, 19, 19, 35, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 29, 30, 135, 348, 29, 30, - 29, 30, 31, 304, 302, 32, 31, 301, 31, 32, - 33, 32, 135, 34, 33, 300, 33, 34, 297, 34, - 30, 196, 35, 126, 30, 289, 35, 31, 35, 273, + 26, 0, 76, 29, 26, 0, 26, 29, 82, 29, + 0, 30, 82, 0, 82, 30, 33, 30, 0, 102, + 33, 0, 33, 102, 0, 102, 19, 29, 26, 76, + 82, 29, 26, 81, 26, 30, 33, 81, 0, 81, - 196, 29, 126, 30, 34, 36, 260, 126, 29, 36, - 32, 36, 31, 130, 130, 130, 206, 35, 188, 37, - 33, 35, 125, 37, 34, 37, 36, 38, 139, 124, - 42, 38, 35, 38, 42, 39, 42, 139, 139, 39, - 36, 39, 75, 43, 37, 119, 75, 43, 75, 43, - 38, 205, 74, 76, 37, 42, 74, 76, 74, 76, - 205, 42, 118, 39, 207, 38, 75, 117, 77, 53, - 39, 40, 77, 207, 77, 40, 74, 40, 43, 66, - 66, 66, 66, 66, 66, 66, 49, 75, 48, 23, - 74, 76, 40, 22, 21, 77, 40, 40, 67, 67, + 29, 34, 36, 0, 0, 34, 36, 34, 36, 0, + 30, 0, 19, 0, 29, 26, 33, 82, 29, 26, + 0, 26, 30, 33, 37, 34, 36, 29, 37, 34, + 37, 0, 81, 0, 0, 38, 36, 30, 42, 38, + 34, 38, 42, 33, 42, 0, 37, 269, 269, 269, + 269, 41, 34, 36, 74, 41, 34, 41, 74, 81, + 74, 37, 38, 36, 0, 0, 0, 34, 0, 38, + 78, 0, 42, 37, 78, 41, 78, 74, 87, 104, + 0, 41, 87, 104, 87, 104, 85, 0, 37, 38, + 85, 74, 85, 78, 107, 0, 38, 39, 107, 42, - 67, 67, 67, 67, 67, 78, 314, 40, 6, 78, - 79, 78, 40, 41, 79, 314, 79, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 80, 3, 78, - 0, 80, 0, 80, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 51, 80, 0, 0, 51, 51, 51, 51, 51, 51, - 51, 54, 54, 54, 54, 54, 0, 54, 54, 54, - 81, 82, 54, 0, 81, 82, 81, 82, 0, 0, - 54, 54, 54, 54, 54, 54, 54, 83, 133, 133, + 107, 39, 41, 39, 74, 55, 87, 85, 41, 55, + 55, 55, 55, 55, 55, 55, 104, 39, 74, 56, + 78, 39, 39, 56, 56, 56, 56, 56, 56, 56, + 0, 107, 39, 87, 85, 165, 169, 39, 0, 165, + 169, 165, 169, 104, 39, 0, 59, 0, 39, 39, + 59, 59, 59, 59, 59, 59, 59, 103, 107, 39, + 0, 103, 187, 103, 39, 40, 187, 0, 187, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 57, + 0, 57, 0, 57, 57, 57, 57, 57, 57, 57, + 60, 103, 40, 40, 60, 60, 60, 60, 60, 60, - 133, 83, 84, 83, 82, 0, 84, 87, 84, 0, - 88, 87, 0, 87, 88, 85, 88, 0, 0, 85, - 81, 85, 0, 54, 55, 0, 0, 84, 55, 55, - 55, 55, 55, 55, 55, 56, 87, 85, 0, 56, - 56, 56, 56, 56, 56, 56, 57, 203, 57, 57, - 57, 57, 57, 57, 57, 58, 203, 203, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 59, 137, 137, - 137, 59, 59, 59, 59, 59, 59, 59, 60, 151, - 151, 151, 60, 60, 60, 60, 60, 60, 60, 61, - 157, 157, 157, 61, 61, 61, 61, 61, 61, 61, + 60, 0, 197, 0, 0, 40, 197, 61, 197, 40, + 40, 61, 61, 61, 61, 61, 61, 61, 103, 40, + 40, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 0, 0, 40, 0, 0, 0, 40, 54, 54, 54, + 54, 54, 0, 54, 54, 54, 90, 101, 54, 0, + 90, 101, 90, 101, 0, 0, 54, 54, 54, 54, + 54, 54, 63, 0, 0, 0, 63, 63, 63, 63, + 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 90, 65, 101, 0, 54, 65, + 65, 65, 65, 65, 65, 65, 66, 0, 66, 0, - 62, 167, 167, 167, 62, 62, 62, 62, 62, 62, - 62, 63, 223, 223, 223, 63, 63, 63, 63, 63, - 63, 63, 64, 0, 64, 0, 64, 64, 64, 64, - 64, 64, 64, 64, 68, 0, 68, 0, 68, 68, - 68, 68, 68, 68, 68, 68, 69, 250, 250, 250, - 69, 69, 69, 69, 69, 69, 69, 86, 89, 0, - 0, 86, 89, 86, 89, 90, 91, 0, 0, 90, - 91, 90, 91, 92, 93, 0, 0, 92, 93, 92, - 93, 94, 95, 0, 0, 94, 95, 94, 95, 86, - 96, 0, 0, 97, 96, 91, 96, 97, 0, 97, + 66, 66, 66, 66, 66, 66, 66, 345, 345, 345, + 345, 90, 0, 101, 54, 58, 58, 0, 58, 58, + 204, 58, 58, 58, 204, 58, 204, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 67, 0, 0, 0, 67, 67, 67, 67, 67, 67, + 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 0, 0, 69, 0, 0, 58, 69, 69, 69, + 69, 69, 69, 69, 75, 80, 0, 0, 75, 80, + 75, 80, 84, 86, 0, 0, 84, 86, 84, 86, + 0, 0, 58, 0, 91, 92, 0, 75, 91, 92, - 0, 128, 0, 0, 90, 98, 93, 92, 93, 98, - 128, 98, 0, 99, 100, 128, 95, 99, 100, 99, - 100, 101, 97, 0, 102, 101, 0, 101, 102, 103, - 102, 97, 0, 103, 0, 103, 104, 105, 97, 98, - 104, 105, 104, 105, 106, 107, 140, 0, 106, 107, - 106, 107, 0, 108, 100, 140, 100, 108, 0, 108, - 140, 101, 109, 114, 103, 0, 109, 114, 109, 114, - 114, 114, 114, 0, 104, 116, 0, 105, 108, 116, - 106, 116, 115, 107, 0, 0, 115, 114, 115, 115, - 115, 115, 142, 142, 142, 142, 109, 110, 346, 346, + 91, 92, 0, 93, 0, 0, 84, 93, 80, 93, + 0, 95, 0, 0, 86, 95, 0, 95, 75, 0, + 0, 0, 91, 97, 75, 0, 98, 97, 92, 97, + 98, 0, 98, 84, 93, 80, 93, 349, 349, 349, + 349, 86, 100, 0, 95, 75, 100, 0, 100, 91, + 105, 97, 0, 0, 105, 92, 105, 0, 106, 98, + 97, 93, 106, 93, 106, 0, 108, 97, 0, 109, + 108, 95, 108, 109, 0, 109, 246, 0, 97, 0, + 246, 100, 246, 100, 0, 0, 98, 97, 0, 105, + 108, 115, 0, 106, 97, 115, 0, 115, 115, 115, - 346, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 0, 0, 116, 131, 131, 131, 131, 131, 131, - 131, 134, 134, 134, 134, 134, 134, 134, 138, 138, - 138, 138, 138, 138, 138, 152, 152, 152, 152, 152, - 152, 152, 110, 110, 111, 347, 347, 347, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 153, 153, - 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, - 154, 154, 158, 158, 158, 158, 158, 158, 158, 0, - 165, 373, 373, 373, 165, 111, 165, 0, 373, 111, - 111, 120, 120, 120, 120, 120, 120, 120, 194, 194, + 115, 0, 109, 0, 0, 114, 0, 0, 100, 114, + 100, 114, 114, 114, 114, 116, 105, 108, 170, 116, + 106, 116, 170, 0, 170, 0, 0, 163, 114, 109, + 110, 163, 0, 163, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 118, 118, 118, 118, 118, 118, + 118, 170, 116, 0, 0, 114, 118, 120, 120, 120, + 120, 120, 120, 120, 163, 0, 243, 0, 0, 120, + 243, 243, 243, 0, 110, 110, 0, 0, 170, 116, + 122, 122, 122, 122, 122, 122, 122, 122, 0, 0, + 139, 163, 0, 122, 139, 139, 139, 139, 139, 139, - 194, 194, 194, 120, 122, 122, 122, 122, 122, 122, - 122, 122, 245, 245, 245, 245, 0, 122, 127, 0, - 127, 127, 127, 127, 127, 127, 127, 127, 316, 316, - 316, 316, 127, 129, 0, 129, 129, 129, 129, 129, - 129, 129, 129, 327, 327, 327, 327, 129, 132, 0, - 132, 132, 132, 132, 132, 132, 132, 136, 0, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 141, - 0, 141, 141, 141, 141, 141, 141, 141, 141, 0, - 0, 168, 0, 141, 143, 168, 143, 168, 143, 143, - 143, 143, 143, 143, 143, 144, 0, 144, 0, 144, + 139, 110, 111, 0, 0, 0, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 126, 0, 126, 126, + 126, 126, 126, 126, 126, 126, 0, 0, 0, 127, + 126, 127, 127, 127, 127, 127, 127, 127, 127, 0, + 0, 0, 111, 127, 0, 0, 111, 111, 128, 0, + 128, 128, 128, 128, 128, 128, 128, 128, 0, 164, + 173, 0, 128, 164, 173, 164, 173, 0, 0, 111, + 0, 0, 129, 111, 129, 129, 129, 129, 129, 129, + 129, 129, 173, 164, 0, 130, 129, 130, 130, 130, + 130, 130, 130, 130, 130, 0, 0, 0, 131, 130, - 144, 144, 144, 144, 144, 144, 145, 0, 145, 0, - 145, 145, 145, 145, 145, 145, 145, 146, 146, 146, + 131, 131, 131, 131, 131, 131, 131, 131, 0, 173, + 164, 132, 131, 132, 132, 132, 132, 132, 132, 132, + 132, 0, 0, 0, 133, 132, 133, 133, 133, 133, + 133, 133, 133, 133, 0, 0, 0, 134, 133, 134, + 134, 134, 134, 134, 134, 134, 134, 0, 135, 0, + 0, 134, 135, 135, 135, 135, 135, 135, 135, 0, + 0, 0, 0, 136, 135, 136, 136, 136, 136, 136, + 136, 136, 136, 137, 0, 137, 137, 137, 137, 137, + 137, 137, 137, 138, 0, 138, 138, 138, 138, 138, + 138, 138, 138, 140, 0, 140, 140, 140, 140, 140, + + 140, 140, 140, 0, 0, 0, 141, 140, 141, 141, + 141, 141, 141, 141, 141, 141, 0, 0, 0, 142, + 141, 142, 142, 142, 142, 142, 142, 142, 142, 0, + 143, 0, 143, 142, 143, 143, 143, 143, 143, 143, + 143, 143, 144, 0, 144, 0, 144, 144, 144, 144, + 144, 144, 144, 144, 145, 0, 145, 0, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 149, 0, 149, 149, 149, 149, - 149, 149, 149, 149, 331, 331, 331, 331, 149, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 343, - 343, 343, 343, 150, 155, 155, 155, 155, 155, 155, - 155, 299, 299, 299, 299, 0, 155, 156, 299, 156, - 156, 156, 156, 156, 156, 156, 159, 0, 159, 0, + 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 149, 0, 149, 149, + 149, 149, 149, 149, 149, 149, 0, 0, 0, 0, + 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 0, 0, 0, 0, 150, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 0, 0, 0, 0, + 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 0, 0, 0, 0, 152, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 0, 154, 0, 154, + 153, 154, 154, 154, 154, 154, 154, 154, 155, 155, + 155, 155, 155, 155, 155, 0, 0, 0, 0, 156, + 155, 156, 156, 156, 156, 156, 156, 156, 0, 0, + + 0, 0, 157, 156, 157, 157, 157, 157, 157, 157, + 157, 0, 0, 0, 0, 158, 157, 158, 158, 158, + 158, 158, 158, 158, 0, 0, 159, 0, 159, 158, 159, 159, 159, 159, 159, 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 161, 161, - 161, 161, 161, 161, 161, 341, 341, 341, 341, 341, - 161, 162, 162, 162, 162, 162, 162, 162, 162, 163, - 0, 0, 164, 163, 162, 163, 164, 169, 164, 0, - 170, 169, 0, 169, 170, 0, 170, 171, 172, 0, - 0, 171, 172, 171, 172, 173, 174, 164, 0, 173, - 174, 173, 174, 0, 0, 170, 0, 163, 166, 0, - 171, 169, 166, 172, 166, 166, 166, 166, 166, 166, - 166, 166, 175, 380, 380, 380, 175, 176, 175, 174, + 161, 161, 161, 161, 161, 212, 212, 212, 212, 212, + 161, 162, 162, 162, 162, 162, 162, 162, 162, 166, + 0, 0, 0, 166, 162, 166, 166, 166, 166, 166, + 166, 166, 166, 167, 0, 0, 0, 167, 0, 167, + 167, 167, 167, 167, 167, 167, 167, 168, 0, 0, - 177, 176, 0, 176, 177, 173, 177, 178, 179, 0, - 0, 178, 179, 178, 179, 180, 0, 175, 181, 180, - 0, 180, 181, 0, 181, 0, 182, 0, 0, 176, - 182, 0, 182, 182, 182, 182, 0, 0, 183, 0, - 180, 178, 183, 181, 183, 0, 0, 0, 179, 184, - 184, 184, 184, 184, 184, 184, 185, 185, 185, 185, - 185, 185, 185, 183, 186, 379, 379, 379, 186, 0, - 186, 187, 379, 0, 0, 187, 187, 187, 187, 187, - 187, 187, 189, 0, 0, 0, 189, 189, 189, 189, - 189, 189, 189, 303, 303, 303, 303, 0, 189, 190, + 0, 168, 0, 168, 168, 168, 168, 168, 168, 168, + 168, 171, 172, 0, 0, 171, 172, 171, 172, 172, + 172, 172, 172, 172, 172, 172, 0, 175, 0, 0, + 174, 175, 0, 175, 174, 171, 174, 174, 174, 174, + 174, 174, 174, 174, 0, 0, 176, 0, 0, 0, + 176, 175, 176, 176, 176, 176, 0, 177, 0, 0, + 178, 177, 171, 177, 178, 247, 178, 0, 0, 247, + 182, 247, 0, 179, 182, 0, 182, 179, 175, 179, + 179, 179, 179, 179, 179, 179, 179, 0, 0, 0, + 0, 180, 178, 0, 182, 180, 177, 180, 180, 180, - 303, 0, 190, 190, 190, 190, 190, 190, 190, 190, - 377, 377, 377, 377, 0, 190, 192, 192, 192, 192, - 192, 192, 192, 195, 195, 195, 195, 195, 195, 195, - 198, 0, 198, 198, 198, 198, 198, 198, 198, 199, - 199, 199, 199, 199, 199, 199, 200, 200, 200, 200, - 200, 200, 200, 201, 201, 201, 201, 201, 201, 201, - 202, 202, 202, 202, 202, 202, 202, 204, 0, 204, - 204, 204, 204, 204, 204, 204, 204, 208, 208, 208, - 208, 208, 208, 208, 209, 0, 209, 209, 209, 209, - 209, 209, 209, 210, 0, 210, 210, 210, 210, 210, + 180, 180, 180, 180, 180, 181, 0, 0, 0, 181, + 0, 181, 181, 181, 181, 181, 181, 181, 181, 178, + 183, 182, 0, 177, 183, 184, 183, 0, 0, 184, + 0, 184, 184, 184, 184, 184, 184, 184, 184, 0, + 0, 190, 0, 0, 0, 190, 185, 190, 0, 0, + 185, 183, 185, 185, 185, 185, 185, 185, 185, 185, + 186, 0, 0, 0, 186, 0, 186, 186, 186, 186, + 0, 0, 0, 188, 190, 0, 0, 188, 183, 188, + 188, 188, 188, 188, 188, 188, 188, 189, 0, 0, + 0, 189, 0, 189, 189, 189, 189, 189, 189, 189, - 210, 210, 210, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 212, 0, 0, 0, 212, 212, 212, 212, - 212, 212, 212, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 214, 0, 0, 0, 214, 214, 214, - 214, 214, 214, 214, 215, 0, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 216, 0, 216, 0, 216, - 216, 216, 216, 216, 216, 216, 217, 0, 217, 0, - 217, 217, 217, 217, 217, 217, 217, 217, 218, 218, - 218, 218, 218, 218, 218, 219, 219, 219, 219, 219, - 219, 219, 220, 0, 220, 0, 220, 220, 220, 220, + 189, 190, 191, 192, 0, 0, 191, 192, 191, 192, + 192, 192, 192, 193, 0, 0, 0, 193, 0, 193, + 193, 193, 193, 193, 193, 193, 193, 194, 195, 0, + 0, 194, 195, 194, 195, 0, 196, 0, 0, 0, + 196, 191, 196, 196, 196, 196, 0, 0, 0, 198, + 0, 194, 195, 198, 0, 198, 198, 198, 198, 199, + 0, 0, 0, 199, 0, 199, 200, 0, 191, 0, + 200, 0, 200, 200, 200, 200, 0, 0, 194, 195, + 201, 0, 0, 199, 201, 0, 201, 201, 201, 201, + 201, 201, 201, 201, 202, 0, 0, 0, 202, 0, - 220, 220, 220, 221, 0, 0, 224, 221, 220, 221, - 224, 224, 224, 224, 224, 225, 0, 0, 0, 225, - 225, 225, 226, 0, 226, 226, 226, 226, 227, 228, - 0, 0, 227, 228, 227, 228, 0, 355, 355, 355, - 355, 0, 221, 222, 355, 222, 222, 222, 222, 222, - 222, 222, 229, 227, 0, 230, 229, 0, 229, 230, - 231, 230, 0, 0, 231, 232, 231, 227, 233, 232, - 0, 232, 233, 234, 233, 0, 235, 234, 0, 234, - 235, 236, 235, 0, 0, 236, 0, 236, 237, 0, - 232, 238, 237, 0, 237, 238, 239, 238, 234, 0, + 202, 202, 202, 202, 202, 203, 0, 0, 0, 203, + 199, 203, 203, 203, 203, 205, 0, 0, 0, 205, + 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, + 206, 206, 206, 0, 0, 207, 0, 0, 206, 207, + 207, 207, 207, 207, 207, 207, 0, 0, 0, 208, + 0, 207, 208, 208, 208, 208, 208, 208, 208, 208, + 359, 359, 359, 359, 359, 208, 210, 210, 210, 210, + 210, 210, 210, 211, 0, 211, 211, 211, 211, 211, + 211, 211, 211, 0, 0, 0, 0, 211, 213, 213, + 213, 213, 213, 213, 213, 214, 0, 214, 214, 214, - 239, 235, 239, 240, 240, 240, 240, 240, 240, 240, - 0, 0, 0, 237, 0, 238, 242, 0, 0, 0, - 242, 242, 242, 242, 242, 242, 242, 374, 374, 374, - 374, 0, 242, 243, 374, 0, 243, 243, 243, 243, - 243, 243, 243, 243, 378, 378, 378, 378, 0, 243, - 244, 244, 244, 244, 244, 244, 244, 248, 248, 248, - 248, 248, 248, 248, 249, 249, 0, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, + 214, 214, 214, 214, 214, 0, 0, 0, 0, 214, + 215, 215, 215, 215, 215, 215, 215, 0, 0, 0, + 0, 216, 215, 216, 216, 216, 216, 216, 216, 216, + 217, 0, 217, 217, 217, 217, 217, 217, 217, 217, + 0, 0, 0, 218, 217, 218, 218, 218, 218, 218, + 218, 218, 0, 0, 219, 0, 219, 218, 219, 219, + 219, 219, 219, 219, 219, 220, 0, 220, 220, 220, + 220, 220, 220, 220, 220, 221, 0, 0, 0, 221, + 221, 221, 221, 221, 221, 221, 222, 0, 222, 222, + 222, 222, 222, 222, 222, 222, 223, 223, 223, 223, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 251, 251, 251, - 251, 251, 251, 251, 253, 0, 253, 253, 253, 253, - 253, 253, 253, 254, 0, 254, 254, 254, 254, 254, - 254, 254, 255, 0, 255, 255, 255, 255, 255, 255, - 255, 256, 256, 256, 256, 256, 256, 256, 257, 0, - 257, 257, 257, 257, 257, 257, 257, 383, 383, 383, - 383, 383, 257, 258, 0, 258, 258, 258, 258, 258, - 258, 258, 0, 0, 0, 0, 0, 258, 259, 0, - 259, 259, 259, 259, 259, 259, 259, 0, 0, 0, + 223, 223, 223, 0, 0, 0, 0, 224, 223, 224, + 224, 224, 224, 224, 224, 224, 224, 0, 0, 0, + 225, 224, 225, 225, 225, 225, 225, 225, 225, 0, + 0, 226, 0, 0, 225, 226, 226, 226, 226, 226, + 226, 226, 227, 0, 227, 227, 227, 227, 227, 227, + 227, 227, 228, 0, 228, 228, 228, 228, 228, 228, + 228, 228, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 230, 0, 0, 0, 230, 230, 230, 230, + 230, 230, 230, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 232, 0, 0, 0, 232, 232, 232, - 0, 0, 259, 261, 261, 261, 261, 261, 261, 261, - 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, - 263, 263, 263, 263, 0, 0, 0, 0, 0, 263, - 264, 264, 264, 264, 264, 264, 264, 0, 0, 0, - 0, 0, 264, 265, 265, 265, 265, 265, 265, 265, - 0, 0, 0, 0, 0, 265, 267, 0, 267, 267, - 267, 267, 267, 267, 267, 267, 268, 268, 268, 268, - 268, 268, 268, 0, 0, 0, 0, 0, 268, 269, - 269, 269, 269, 269, 269, 269, 269, 0, 0, 0, - 0, 0, 269, 270, 270, 270, 270, 270, 270, 270, + 232, 232, 232, 232, 233, 0, 233, 0, 233, 233, + 233, 233, 233, 233, 233, 233, 0, 0, 0, 0, + 233, 234, 0, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 0, 0, 0, 235, 234, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 0, 0, 0, + 0, 236, 235, 236, 236, 236, 236, 236, 236, 236, + 0, 0, 0, 0, 237, 236, 237, 237, 237, 237, + 237, 237, 237, 0, 0, 238, 0, 238, 237, 238, + 238, 238, 238, 238, 238, 238, 239, 0, 0, 240, + 239, 238, 239, 240, 240, 240, 240, 240, 240, 240, - 0, 0, 0, 0, 0, 270, 271, 271, 271, 271, - 271, 271, 271, 0, 0, 0, 0, 0, 271, 272, - 272, 272, 272, 272, 272, 272, 0, 0, 0, 276, - 0, 272, 274, 276, 0, 276, 274, 274, 274, 274, - 274, 274, 274, 275, 0, 0, 0, 275, 275, 275, - 275, 275, 275, 275, 277, 277, 277, 277, 277, 277, - 277, 278, 278, 278, 278, 278, 278, 278, 276, 279, - 280, 0, 0, 279, 280, 279, 280, 281, 282, 0, - 0, 281, 282, 281, 282, 283, 0, 0, 0, 283, - 284, 283, 279, 285, 284, 0, 284, 285, 0, 285, + 240, 240, 240, 241, 0, 0, 0, 241, 241, 241, + 241, 241, 241, 241, 241, 241, 241, 0, 0, 0, + 0, 242, 0, 0, 239, 242, 242, 242, 242, 242, + 244, 0, 0, 0, 244, 244, 244, 244, 244, 244, + 244, 244, 244, 244, 245, 0, 0, 0, 245, 248, + 245, 239, 249, 248, 0, 248, 249, 250, 249, 0, + 251, 250, 0, 250, 251, 252, 251, 0, 245, 252, + 253, 252, 0, 254, 253, 0, 253, 254, 0, 254, + 255, 250, 245, 0, 255, 0, 255, 256, 0, 252, + 0, 256, 257, 256, 253, 245, 257, 294, 257, 0, - 286, 286, 286, 286, 286, 286, 286, 318, 321, 0, - 280, 318, 321, 318, 321, 0, 282, 287, 287, 287, - 287, 287, 287, 287, 288, 288, 288, 288, 288, 288, - 288, 290, 290, 290, 290, 290, 290, 290, 291, 291, - 291, 291, 291, 291, 291, 292, 292, 292, 292, 292, - 292, 292, 293, 293, 293, 293, 293, 293, 293, 294, - 294, 294, 294, 294, 294, 294, 295, 295, 295, 295, - 295, 295, 295, 296, 296, 296, 296, 296, 296, 296, - 298, 298, 298, 298, 298, 298, 298, 298, 305, 305, - 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, + 0, 294, 0, 294, 255, 0, 0, 0, 250, 245, + 256, 297, 0, 0, 0, 297, 252, 297, 258, 0, + 0, 253, 258, 0, 258, 258, 258, 258, 258, 258, + 0, 255, 0, 297, 260, 294, 0, 256, 260, 260, + 260, 260, 260, 260, 260, 0, 0, 0, 261, 0, + 260, 261, 261, 261, 261, 261, 261, 261, 261, 0, + 297, 0, 294, 0, 261, 262, 262, 262, 262, 262, + 262, 262, 266, 266, 266, 266, 266, 266, 266, 267, + 267, 0, 267, 267, 299, 267, 267, 267, 299, 0, + 299, 267, 267, 267, 267, 267, 267, 267, 267, 267, - 306, 306, 307, 0, 307, 0, 307, 307, 307, 307, - 307, 307, 307, 0, 0, 0, 323, 0, 307, 308, - 323, 308, 323, 308, 308, 308, 308, 308, 308, 308, - 308, 309, 309, 309, 309, 309, 309, 309, 0, 0, - 0, 0, 0, 309, 311, 311, 311, 311, 311, 311, - 311, 311, 0, 0, 323, 0, 311, 312, 312, 312, - 312, 312, 312, 312, 312, 0, 0, 0, 0, 312, - 313, 313, 313, 313, 313, 313, 313, 313, 0, 0, - 0, 0, 313, 319, 319, 319, 319, 319, 319, 319, - 320, 0, 0, 0, 320, 322, 320, 320, 320, 322, + 267, 267, 267, 267, 271, 0, 271, 271, 271, 271, + 271, 271, 271, 272, 0, 272, 272, 272, 272, 272, + 272, 272, 279, 279, 279, 279, 279, 279, 279, 273, + 267, 273, 273, 273, 273, 273, 273, 273, 274, 0, + 274, 274, 274, 274, 274, 274, 274, 278, 278, 278, + 278, 278, 278, 278, 0, 0, 267, 268, 268, 278, + 268, 268, 301, 268, 268, 268, 301, 0, 301, 268, + 268, 268, 268, 0, 0, 0, 268, 268, 268, 268, + 268, 268, 275, 0, 275, 275, 275, 275, 275, 275, + 275, 0, 0, 0, 0, 276, 275, 276, 276, 276, - 324, 322, 0, 325, 324, 0, 324, 325, 325, 325, - 326, 326, 326, 326, 326, 326, 326, 329, 329, 329, - 329, 329, 329, 329, 330, 330, 330, 330, 330, 330, - 330, 0, 0, 0, 0, 322, 333, 333, 333, 333, - 333, 333, 333, 334, 334, 334, 334, 334, 334, 334, - 335, 335, 335, 335, 335, 335, 335, 336, 336, 336, - 336, 336, 336, 336, 337, 337, 337, 337, 337, 337, - 337, 338, 338, 338, 338, 338, 338, 338, 339, 339, - 339, 339, 339, 339, 339, 339, 340, 340, 340, 340, - 340, 340, 340, 342, 342, 342, 342, 342, 342, 342, + 276, 276, 276, 276, 317, 317, 317, 317, 268, 276, + 277, 317, 277, 277, 277, 277, 277, 277, 277, 401, + 401, 401, 401, 401, 277, 280, 280, 280, 280, 280, + 280, 280, 0, 0, 268, 281, 281, 281, 281, 281, + 281, 281, 0, 0, 0, 0, 0, 281, 282, 282, + 282, 282, 282, 282, 282, 0, 0, 0, 0, 0, + 282, 283, 283, 283, 283, 283, 283, 283, 0, 0, + 0, 0, 0, 283, 284, 284, 284, 284, 284, 284, + 284, 0, 0, 0, 0, 285, 284, 285, 285, 285, + 285, 285, 285, 285, 285, 286, 286, 286, 286, 286, - 345, 0, 0, 0, 345, 345, 345, 345, 345, 345, - 345, 351, 352, 0, 0, 351, 352, 351, 352, 353, - 0, 0, 0, 353, 0, 353, 353, 353, 353, 354, - 354, 354, 354, 354, 354, 354, 354, 357, 357, 357, - 357, 357, 357, 357, 358, 358, 358, 358, 358, 358, - 358, 359, 359, 359, 359, 359, 359, 359, 360, 360, - 360, 360, 360, 360, 360, 361, 361, 361, 361, 361, - 361, 361, 361, 0, 0, 0, 0, 361, 362, 362, - 362, 362, 362, 362, 362, 362, 0, 0, 0, 0, - 362, 363, 363, 363, 363, 363, 363, 363, 363, 0, + 286, 286, 0, 0, 0, 0, 0, 286, 287, 287, + 287, 287, 287, 287, 287, 287, 0, 0, 0, 0, + 0, 287, 288, 288, 288, 288, 288, 288, 288, 0, + 0, 0, 0, 0, 288, 289, 289, 289, 289, 289, + 289, 289, 0, 0, 0, 0, 0, 289, 290, 290, + 290, 290, 290, 290, 290, 0, 0, 0, 0, 0, + 290, 291, 291, 291, 291, 291, 291, 291, 0, 0, + 292, 0, 0, 291, 292, 292, 292, 292, 292, 292, + 292, 293, 0, 0, 0, 293, 293, 293, 293, 293, + 293, 293, 295, 0, 0, 0, 295, 0, 295, 295, - 0, 0, 0, 363, 364, 364, 364, 364, 364, 364, - 364, 365, 365, 365, 365, 365, 365, 365, 366, 366, - 366, 366, 366, 366, 366, 367, 367, 367, 367, 367, - 367, 367, 367, 368, 368, 368, 368, 368, 368, 368, - 369, 369, 369, 369, 369, 369, 369, 369, 0, 0, - 0, 0, 369, 370, 370, 370, 370, 370, 370, 370, - 372, 372, 372, 372, 372, 372, 372, 382, 382, 382, - 382, 382, 382, 382, 385, 0, 0, 0, 385, 0, - 385, 386, 386, 386, 386, 386, 386, 386, 388, 0, - 388, 388, 0, 0, 388, 389, 0, 389, 389, 389, + 295, 295, 295, 295, 295, 295, 296, 0, 0, 0, + 296, 296, 296, 296, 296, 296, 296, 296, 298, 300, + 0, 0, 298, 300, 298, 300, 302, 303, 0, 0, + 302, 303, 302, 303, 304, 0, 0, 0, 304, 0, + 304, 304, 304, 304, 304, 304, 304, 304, 305, 305, + 305, 305, 305, 305, 305, 0, 300, 298, 306, 306, + 306, 306, 306, 306, 306, 308, 308, 308, 308, 308, + 308, 308, 309, 309, 309, 309, 309, 309, 309, 321, + 321, 321, 321, 300, 298, 310, 321, 310, 310, 310, + 310, 310, 310, 310, 311, 0, 311, 311, 311, 311, - 389, 389, 389, 389, 390, 390, 390, 390, 390, 390, - 390, 390, 390, 391, 0, 391, 391, 0, 0, 391, - 392, 0, 392, 393, 0, 393, 394, 0, 394, 395, - 0, 395, 0, 0, 395, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 397, 0, 397, 397, 0, 0, - 397, 398, 0, 398, 399, 399, 0, 0, 399, 400, - 400, 400, 400, 401, 0, 401, 402, 402, 402, 402, - 403, 0, 403, 404, 0, 404, 404, 404, 404, 404, - 404, 404, 405, 0, 405, 406, 406, 407, 407, 407, - 408, 0, 408, 408, 408, 408, 408, 408, 408, 409, + 311, 311, 311, 312, 0, 312, 312, 312, 312, 312, + 312, 312, 0, 0, 313, 0, 0, 312, 313, 313, + 313, 313, 313, 313, 313, 314, 0, 314, 314, 314, + 314, 314, 314, 314, 0, 0, 0, 0, 315, 314, + 315, 315, 315, 315, 315, 315, 315, 0, 0, 0, + 0, 0, 315, 316, 316, 316, 316, 316, 316, 316, + 316, 320, 320, 320, 320, 320, 320, 320, 320, 323, + 323, 323, 323, 323, 323, 323, 0, 0, 0, 0, + 0, 323, 324, 324, 324, 324, 324, 324, 324, 0, + 0, 325, 0, 325, 324, 325, 325, 325, 325, 325, - 409, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387 + 325, 325, 0, 0, 0, 0, 326, 325, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 0, 0, 0, + 0, 0, 326, 327, 327, 327, 327, 327, 327, 327, + 0, 0, 0, 0, 0, 327, 328, 328, 328, 328, + 328, 328, 328, 0, 0, 0, 0, 0, 328, 329, + 329, 329, 329, 329, 329, 329, 329, 0, 0, 0, + 0, 329, 330, 330, 330, 330, 330, 330, 330, 330, + 0, 0, 0, 0, 330, 331, 331, 331, 331, 331, + 331, 331, 331, 0, 0, 0, 0, 331, 332, 332, + 332, 332, 332, 332, 332, 332, 0, 0, 0, 0, + + 332, 333, 333, 333, 333, 333, 333, 333, 333, 0, + 0, 0, 0, 333, 334, 334, 334, 334, 334, 334, + 334, 334, 0, 0, 0, 0, 334, 335, 335, 335, + 335, 335, 335, 335, 335, 0, 336, 337, 0, 335, + 336, 337, 336, 337, 337, 337, 337, 337, 337, 337, + 337, 338, 0, 0, 0, 338, 339, 338, 338, 338, + 339, 340, 339, 0, 341, 340, 0, 340, 341, 342, + 341, 0, 343, 342, 0, 342, 343, 343, 343, 344, + 344, 344, 344, 344, 344, 344, 347, 347, 347, 347, + 347, 347, 347, 348, 348, 348, 348, 348, 348, 348, + + 340, 341, 351, 0, 351, 351, 351, 351, 351, 351, + 351, 352, 0, 352, 352, 352, 352, 352, 352, 352, + 358, 358, 358, 358, 358, 358, 358, 340, 341, 353, + 0, 353, 353, 353, 353, 353, 353, 353, 354, 0, + 354, 354, 354, 354, 354, 354, 354, 0, 0, 0, + 0, 355, 354, 355, 355, 355, 355, 355, 355, 355, + 0, 0, 0, 0, 356, 355, 356, 356, 356, 356, + 356, 356, 356, 0, 0, 0, 0, 0, 356, 357, + 357, 357, 357, 357, 357, 357, 357, 360, 360, 360, + 360, 360, 360, 360, 0, 0, 0, 0, 0, 360, + + 361, 361, 361, 361, 361, 361, 361, 0, 0, 0, + 0, 0, 361, 362, 362, 362, 362, 362, 362, 362, + 0, 0, 363, 0, 0, 362, 363, 363, 363, 363, + 363, 363, 363, 364, 364, 364, 364, 364, 364, 364, + 0, 0, 0, 0, 0, 364, 365, 365, 365, 365, + 365, 365, 365, 0, 0, 0, 0, 0, 365, 366, + 366, 366, 366, 366, 366, 366, 0, 0, 0, 0, + 0, 366, 367, 367, 367, 367, 367, 367, 367, 367, + 0, 0, 0, 0, 367, 368, 368, 368, 368, 368, + 368, 368, 368, 0, 369, 370, 0, 368, 369, 370, + + 369, 370, 371, 0, 0, 0, 371, 0, 371, 371, + 371, 371, 372, 372, 372, 372, 372, 372, 372, 372, + 373, 373, 373, 373, 0, 0, 0, 373, 375, 375, + 375, 375, 375, 375, 375, 376, 376, 376, 376, 376, + 376, 376, 377, 377, 377, 377, 377, 377, 377, 378, + 378, 378, 378, 378, 378, 378, 379, 379, 379, 379, + 379, 379, 379, 379, 0, 0, 0, 0, 379, 380, + 380, 380, 380, 380, 380, 380, 380, 0, 0, 0, + 0, 380, 381, 381, 381, 381, 381, 381, 381, 381, + 0, 382, 0, 0, 381, 382, 0, 382, 382, 382, + + 382, 382, 382, 382, 382, 383, 0, 0, 0, 383, + 0, 383, 383, 383, 383, 383, 384, 384, 384, 384, + 384, 384, 384, 385, 385, 385, 385, 385, 385, 385, + 385, 386, 386, 386, 386, 386, 386, 386, 387, 387, + 387, 387, 387, 387, 387, 387, 0, 388, 0, 0, + 387, 388, 388, 388, 388, 388, 388, 388, 389, 389, + 389, 389, 389, 389, 389, 390, 0, 0, 0, 390, + 389, 390, 390, 390, 390, 390, 390, 391, 391, 391, + 391, 391, 391, 391, 391, 392, 392, 392, 392, 0, + 0, 0, 392, 394, 394, 394, 394, 394, 394, 394, + + 394, 395, 395, 395, 395, 395, 395, 395, 395, 396, + 396, 396, 396, 396, 396, 396, 396, 397, 397, 397, + 397, 397, 397, 397, 397, 0, 0, 0, 0, 397, + 398, 398, 398, 398, 398, 398, 398, 398, 0, 0, + 0, 0, 398, 399, 399, 399, 399, 399, 399, 399, + 399, 0, 400, 0, 0, 399, 400, 0, 400, 400, + 400, 400, 400, 400, 400, 400, 403, 0, 0, 0, + 403, 0, 403, 404, 404, 404, 404, 404, 404, 404, + 406, 0, 406, 406, 407, 0, 407, 407, 407, 407, + 408, 408, 408, 408, 408, 408, 409, 0, 409, 409, + + 409, 409, 410, 0, 410, 410, 410, 410, 411, 0, + 411, 411, 412, 0, 412, 412, 413, 0, 413, 414, + 414, 414, 414, 414, 414, 415, 0, 415, 415, 416, + 416, 417, 0, 417, 417, 417, 417, 418, 0, 418, + 418, 418, 418, 419, 0, 419, 419, 419, 419, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int yy_flex_debug; +int yy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -1085,13 +1408,10 @@ #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "flaglex.l" -#define INITIAL 0 /********************************************************** * lexical parser - * $Id: flaglex.l,v 1.5 2005/05/11 13:22:40 mitry Exp $ + * $Id: flaglex.l 18 2010-08-23 15:50:49Z semik $ **********************************************************/ -#define YY_NEVER_INTERACTIVE 1 -#define YY_NO_UNPUT 1 #line 7 "flaglex.l" #ifndef yywrap @@ -1143,78 +1463,95 @@ extern int yylval; char *yyPTR=NULL; int yyBUFL; -#line 1140 "flaglex.c" +#line 1459 "flaglex.c" +#line 1460 "flaglex.c" +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals ( void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( void ); + +int yyget_debug ( void ); + +void yyset_debug ( int debug_flag ); + +YY_EXTRA_TYPE yyget_extra ( void ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in ( void ); + +void yyset_in ( FILE * _in_str ); + +FILE *yyget_out ( void ); + +void yyset_out ( FILE * _out_str ); + +int yyget_leng ( void ); + +char *yyget_text ( void ); + +int yyget_lineno ( void ); + +void yyset_lineno ( int _line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int yywrap ( void ); #else -extern int yywrap YY_PROTO(( void )); +extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); + #endif #ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput YY_PROTO(( void )); +static int yyinput ( void ); #else -static int input YY_PROTO(( void )); +static int input ( void ); #endif -#endif -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); #endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1223,7 +1559,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1231,9 +1567,10 @@ */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1243,9 +1580,22 @@ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -1266,13 +1616,19 @@ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ @@ -1282,33 +1638,31 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION +/** The main scanner function which does all the work. + */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 74 "flaglex.l" - -#line 1293 "flaglex.c" - - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) + if ( ! (yy_start) ) { - yy_start = 1; /* first start state */ + (yy_start) = 1; /* first start state */ } if ( ! yyin ) @@ -1321,57 +1675,60 @@ yyout = stdout; } - if ( ! yy_current_buffer ) - yy_current_buffer = + if ( ! YY_CURRENT_BUFFER ) + { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); + } yy_load_buffer_state(); } - while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; +#line 74 "flaglex.l" +#line 1677 "flaglex.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + /* Support of yytext. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 388 ) + if ( yy_current_state >= 406 ) { - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 2602 ); + while ( yy_current_state != 405 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { - /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } YY_DO_BEFORE_ACTION; @@ -1384,12 +1739,13 @@ /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: + /* rule 1 can match eol */ YY_RULE_SETUP #line 75 "flaglex.l" ; @@ -1400,6 +1756,7 @@ RETN(NUMBER,atol(yytext)); YY_BREAK case 3: + /* rule 3 can match eol */ YY_RULE_SETUP #line 77 "flaglex.l" RETV(PATHSTR); @@ -1589,33 +1946,33 @@ #line 114 "flaglex.l" ECHO; YY_BREAK -#line 1576 "flaglex.c" +#line 1932 "flaglex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1625,12 +1982,12 @@ * end-of-buffer state). Contrast this with the test * in input(). */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); @@ -1645,19 +2002,20 @@ yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } @@ -1666,7 +2024,7 @@ { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { @@ -1679,7 +2037,7 @@ * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -1687,7 +2045,7 @@ else { - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) { YY_NEW_FILE; } @@ -1696,23 +2054,23 @@ } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state(); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; @@ -1723,6 +2081,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1733,22 +2091,21 @@ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ - -static int yy_get_next_buffer() +static int yy_get_next_buffer (void) { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1768,39 +2125,35 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) { *(dest++) = *(source++); } - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ { - yy_current_buffer->yy_n_chars = yy_n_chars = 0; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; } else { int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( - "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -1817,24 +2170,24 @@ b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ { - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; } if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -#endif + } if ( num_to_read > YY_READ_BUF_SIZE ) @@ -1843,13 +2196,13 @@ } /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); - yy_current_buffer->yy_n_chars = yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { @@ -1860,7 +2213,7 @@ else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1870,42 +2223,55 @@ ret_val = EOB_ACT_CONTINUE_SCAN; } - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) + { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + { + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() +static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 388 ) + if ( yy_current_state >= 406 ) { - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1917,115 +2282,64 @@ * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 388 ) + if ( yy_current_state >= 406 ) { - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 387); + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 405); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; + #endif -{ - register char *yy_cp = yy_c_buf_p; - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { - /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - { - *--dest = *--source; - } - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; -} -#endif /* ifndef YY_NO_UNPUT */ - - +#ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput() +static int yyinput (void) #else -static int input() +static int input (void) #endif { int c; - *yy_c_buf_p = yy_hold_char; + *(yy_c_buf_p) = (yy_hold_char); - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ { - *yy_c_buf_p = '\0'; + *(yy_c_buf_p) = '\0'; } else { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { @@ -2043,16 +2357,18 @@ /* Reset buffer status. */ yyrestart( yyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) - { +#ifdef YY_FLEX_LEX_COMPAT + return 0; +#else return EOF; - } +#endif - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) { YY_NEW_FILE; } @@ -2064,59 +2380,66 @@ } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; + (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; } +#endif /* ifndef YY_NO_INPUT */ - -#ifdef YY_USE_PROTOS +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif { - if ( ! yy_current_buffer ) + + if ( ! YY_CURRENT_BUFFER ) { - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_init_buffer( yy_current_buffer, input_file ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state(); } - -#ifdef YY_USE_PROTOS +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif { - if ( yy_current_buffer == new_buffer ) + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) { return; } - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; + YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during @@ -2124,34 +2447,28 @@ * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; + (yy_did_buffer_switch_on_eof) = 1; } - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif +static void yy_load_buffer_state (void) { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } - -#ifdef YY_USE_PROTOS +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) { YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -2162,7 +2479,7 @@ /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) { YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -2175,73 +2492,65 @@ return b; } - -#ifdef YY_USE_PROTOS +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif { if ( ! b ) { return; } - if ( b == yy_current_buffer ) + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ { - yy_current_buffer = (YY_BUFFER_STATE) 0; + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; } if ( b->yy_is_our_buffer ) { - yy_flex_free( (void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); } - yy_flex_free( (void *) b ); + yyfree( (void *) b ); } +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - { + int oerrno = errno; + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) + { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; } + b->yy_is_interactive = 0; -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif + errno = oerrno; +} +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ +void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) { @@ -2262,21 +2571,132 @@ b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) + if ( b == YY_CURRENT_BUFFER ) { yy_load_buffer_state( ); } } +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + { + return; + } -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + { + (yy_buffer_stack_top)++; + } + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + { + return; + } + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + { + --(yy_buffer_stack_top); + } + + if (YY_CURRENT_BUFFER) + { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) + { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + { + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + } + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) + { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + { + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + } + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif { YY_BUFFER_STATE b; @@ -2285,19 +2705,19 @@ base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ { - return 0; + return NULL; } - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) { YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); } - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -2308,34 +2728,29 @@ return b; } -#endif - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - return yy_scan_bytes( yy_str, len ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -#endif - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -2343,19 +2758,19 @@ int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) { YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); } - for ( i = 0; i < len; ++i ) + for ( i = 0; i < _yybytes_len; ++i ) { - buf[i] = bytes[i]; + buf[i] = yybytes[i]; } - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) @@ -2370,111 +2785,174 @@ return b; } + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 #endif +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) { - yy_size_t new_size; + return yyin; +} - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} - if ( ! yy_start_stack ) +/** Get the length of the current token. + * + */ +int yyget_leng (void) { - yy_start_stack = (int *) yy_flex_alloc( new_size ); + return yyleng; } - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); +/** Get the current token. + * + */ - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); +char *yyget_text (void) +{ + return yytext; } - yy_start_stack[yy_start_stack_ptr++] = YY_START; +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ - BEGIN(new_state); + yylineno = _line_number; } -#endif +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} -#ifndef YY_NO_POP_STATE -static void yy_pop_state() +void yyset_out (FILE * _out_str ) { - if ( --yy_start_stack_ptr < 0 ) - { - YY_FATAL_ERROR( "start-condition stack underflow" ); + yyout = _out_str ; } - BEGIN(yy_start_stack[yy_start_stack_ptr]); +int yyget_debug (void) +{ + return yy_flex_debug; } -#endif - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() +void yyset_debug (int _bdebug ) { - return yy_start_stack[yy_start_stack_ptr - 1]; + yy_flex_debug = _bdebug ; } -#endif -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + + /* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; #else -static void yy_fatal_error( msg ) -char msg[]; + yyin = NULL; + yyout = NULL; #endif -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER) + { + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } -/* Redefine yyless() so it works in section 3 code. */ + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + return 0; +} -/* Internal utility routines. */ +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) { s1[i] = s2[i]; @@ -2483,14 +2961,9 @@ #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2498,24 +2971,12 @@ } #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif +void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif +void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both @@ -2524,26 +2986,16 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif +void yyfree (void * ptr ) { - free( ptr ); + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } -#if YY_MAIN -int main() -{ - yylex(); - return 0; -} -#endif +#define YYTABLES_NAME "yytables" + #line 114 "flaglex.l" @@ -2754,6 +3206,7 @@ DEBUG(('Y',1,"chkdate: %d > %d",d1,d2)); return 0; } - DEBUG(('Y',3,"chkdate: %d",now->tm_yday>=d1 && now->tm_yday<=d2)); - return now->tm_yday>=d1 && now->tm_yday<=d2; + DEBUG(('Y',3,"chkdate: %d",now->tm_mday>=d1 && now->tm_mday<=d2)); + return now->tm_mday>=d1 && now->tm_mday<=d2; } diff -Bburw ./qico/src/flaglex.l ./trunk/src/flaglex.l --- ./qico/src/flaglex.l 2024-02-01 18:09:52.564983000 +0300 +++ ./trunk/src/flaglex.l 2024-02-01 18:10:34.582297000 +0300 @@ -1,6 +1,6 @@ /********************************************************** * lexical parser - * $Id: flaglex.l,v 1.5 2005/05/11 13:22:40 mitry Exp $ + * $Id: flaglex.l 18 2010-08-23 15:50:49Z semik $ **********************************************************/ %option noyywrap case-insensitive never-interactive nounput %{ @@ -239,6 +239,6 @@ DEBUG(('Y',1,"chkdate: %d > %d",d1,d2)); return 0; } - DEBUG(('Y',3,"chkdate: %d",now->tm_yday>=d1 && now->tm_yday<=d2)); - return now->tm_yday>=d1 && now->tm_yday<=d2; + DEBUG(('Y',3,"chkdate: %d",now->tm_mday>=d1 && now->tm_mday<=d2)); + return now->tm_mday>=d1 && now->tm_mday<=d2; } diff -Bburw ./qico/src/freq.c ./trunk/src/freq.c --- ./qico/src/freq.c 2024-02-01 20:54:38.458172000 +0300 +++ ./trunk/src/freq.c 2024-02-01 20:54:27.577690000 +0300 @@ -2,7 +2,7 @@ * File request support ***************************************************************************/ /* - * $Id: freq.c,v 1.7 2005/05/17 18:17:42 mitry Exp $ + * $Id: freq.c 18 2010-08-23 15:50:49Z semik $ * * $Log: freq.c,v $ * Revision 1.7 2005/05/17 18:17:42 mitry diff -Bburw ./qico/src/ftn.c ./trunk/src/ftn.c --- ./qico/src/ftn.c 2024-02-01 20:54:38.464335000 +0300 +++ ./trunk/src/ftn.c 2024-02-01 20:54:27.592166000 +0300 @@ -2,9 +2,21 @@ * ftn tools **********************************************************/ /* - * $Id: ftn.c,v 1.10 2005/08/18 16:21:25 mitry Exp $ + * $Id: ftn.c 48 2014-11-29 09:03:48Z semik $ * * $Log: ftn.c,v $ + * Revision 1.14 2007/01/28 17:55:00 mitry + * Add support for INA flag and IBN/IFC optional port number. + * + * Revision 1.13 2006/04/14 18:45:25 mitry + * Added locked flag. + * + * Revision 1.12 2005/11/27 01:41:11 mitry + * Recode From and To fields to local charset in showpkt(). + * + * Revision 1.11 2005/10/31 17:21:10 mitry + * Fixed showpkt which didn't handle national characters in `to' and `from' pkt fields. + * * Revision 1.10 2005/08/18 16:21:25 mitry * Added debug messages * @@ -31,7 +43,7 @@ #include "crc.h" /* domain name to translate ftn address to inet host. */ -#define FTNDOMAIN "binkp.net" +#define FTNDOMAIN "fidonet.net" void addr_cpy(ftnaddr_t *a, const ftnaddr_t *b) @@ -44,6 +56,7 @@ a->n = b->n; a->f = b->f; a->p = b->p; + a->locked = b->locked; if ( b->d && *b->d ) { a->d = xstrdup( b->d ); @@ -269,6 +282,24 @@ return s; } +char *nodehostname(const ninfo_t *node, int isbinkp) +{ + static char newhost[MAXHOSTNAMELEN + 10]; + int iport = 0; + + xstrcpy( newhost, node->host, MAXHOSTNAMELEN + 10 ); + + iport = isbinkp ? node->bp_port : node->ifc_port; + + if ( iport ) + { + snprintf( newhost + strlen( newhost ), 9, + ":%d", iport ); + } + + return newhost; +} + char *strip8(char *s) { register int t, i = 0; @@ -329,15 +360,17 @@ int showpkt(const char *fn) { + int i, n = 1, a; + char from[36], to[36]; FILE *f; - int i,n=1; pkthdr_t ph; pktmhdr_t mh; - char from[36],to[36],a; + f=fopen(fn,"r"); if(!f) { - write_log("can't open '%s' for reading: %s",fn,strerror(errno)); + write_log( "can't open '%s' for reading: %s", + fn, strerror( errno )); return 0; } @@ -357,11 +391,11 @@ { i++; } - i=0; if ( i >= 30 ) { break; } + i = 0; while(( a = fgetc( f )) > 0 && i < 36 ) { to[i++] = a; @@ -370,17 +404,17 @@ { break; } - to[i]=0; + to[i] = '\0'; i=0; while((a=fgetc(f))>0&&i<36) { from[i++]=a; } - if(i>=32) + if ( i >= 36 ) { break; } - from[i]=0; + from[i] = '\0'; i = 0; while( fgetc( f ) > 0 && i < 72 ) { @@ -391,6 +425,8 @@ break; } while( fgetc( f ) > 0 ); + recode_to_local( from ); + recode_to_local( to ); write_log( "*msg: %d from: \"%s\", to: \"%s\"", n++, from, to ); } } @@ -432,7 +468,7 @@ ph.phCaps=H2I16(1); if(pwd) { - memcpy(ph.phPass,pwd,MAX(strlen(pwd),8)); + memmove(ph.phPass,pwd,MAX(strlen(pwd),8)); } ph.phQOZone=H2I16(fa->z); ph.phQDZone=H2I16(ta->z); diff -Bburw ./qico/src/ftn.h ./trunk/src/ftn.h --- ./qico/src/ftn.h 2024-02-01 18:09:52.565339000 +0300 +++ ./trunk/src/ftn.h 2024-02-01 18:10:34.602457000 +0300 @@ -1,7 +1,13 @@ /* - * $Id: ftn.h,v 1.11 2005/08/16 15:17:22 mitry Exp $ + * $Id: ftn.h 18 2010-08-23 15:50:49Z semik $ * * $Log: ftn.h,v $ + * Revision 1.13 2007/01/28 17:55:00 mitry + * Add support for INA flag and IBN/IFC optional port number. + * + * Revision 1.12 2006/04/14 18:45:25 mitry + * Added locked flag. + * * Revision 1.11 2005/08/16 15:17:22 mitry * Removed unused ninfo_t.haswtime field * @@ -68,10 +74,11 @@ typedef struct { int z, n, f, p; + int locked; char *d; } ftnaddr_t; -#define FTNADDR_T(a) ftnaddr_t (a)={0,0,0,0,NULL} +#define FTNADDR_T(a) ftnaddr_t (a)={0,0,0,0,0,NULL} #include "slists.h" @@ -79,6 +86,7 @@ falist_t *addrs; char *name,*place,*sysop,*phone,*wtime,*flags,*pwd,*mailer,*host,*tty; int options,speed,realspeed,netmail,files,type,hidnum,holded,opt; + int ifc_port, bp_port; time_t time,starttime; } ninfo_t; @@ -167,6 +175,7 @@ char *ftnaddrtoa(const ftnaddr_t *); char *ftnaddrtoda(const ftnaddr_t *); char *ftnaddrtoia(const ftnaddr_t *); +char *nodehostname(const ninfo_t *, int); char *strip8(char *); int has_addr(const ftnaddr_t *, falist_t *); int showpkt(const char *); @@ -186,8 +195,8 @@ void outbound_done(void); int outbound_rescan(qeach_t, int); int outbound_addr_busy(const ftnaddr_t *); -int outbound_locknode(const ftnaddr_t *, int); -int outbound_unlocknode(const ftnaddr_t *, int); +int outbound_locknode(ftnaddr_t *, int); +int outbound_unlocknode(ftnaddr_t *, int); int outbound_flavor(char fl); int outbound_attach(const ftnaddr_t *, int, slist_t *); int outbound_request(const ftnaddr_t *, slist_t *); diff -Bburw ./qico/src/getsid.c ./trunk/src/getsid.c --- ./qico/src/getsid.c 2024-02-01 18:09:52.565392000 +0300 +++ ./trunk/src/getsid.c 2024-02-01 20:54:27.599481000 +0300 @@ -1,4 +1,4 @@ -/* $Id: getsid.c,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ */ +/* $Id: getsid.c 18 2010-08-23 15:50:49Z semik $ */ #include "headers.h" pid_t getsid(pid_t pid) { diff -Bburw ./qico/src/globals.c ./trunk/src/globals.c --- ./qico/src/globals.c 2024-02-01 18:09:52.565451000 +0300 +++ ./trunk/src/globals.c 2024-02-01 18:10:34.590380000 +0300 @@ -2,9 +2,12 @@ * global variables **********************************************************/ /* - * $Id: globals.c,v 1.10 2005/03/31 19:28:16 mitry Exp $ + * $Id: globals.c 18 2010-08-23 15:50:49Z semik $ * * $Log: globals.c,v $ + * Revision 1.11 2006/07/22 13:13:00 mitry + * Use file times in GMT on some protocols. + * * Revision 1.10 2005/03/31 19:28:16 mitry * Removed unused variable 'calling' * @@ -19,6 +22,7 @@ char *connstr=NULL; char *devnull="/dev/null"; char ip_id[10]; +char *syslog_name=NULL; char *log_name=NULL; char *log_tty=NULL; char *tty_port=NULL; @@ -53,3 +57,6 @@ slist_t *ccsl; subst_t *psubsts; unsigned long totalf,totalm,totaln; + +int ftime_is_gmt = 0; + diff -Bburw ./qico/src/globals.h ./trunk/src/globals.h --- ./qico/src/globals.h 2024-02-01 18:09:52.565509000 +0300 +++ ./trunk/src/globals.h 2024-02-01 18:10:34.607232000 +0300 @@ -1,6 +1,9 @@ -/* $Id: globals.h,v 1.6 2005/03/31 19:28:16 mitry Exp $ +/* $Id: globals.h 18 2010-08-23 15:50:49Z semik $ * * $Log: globals.h,v $ + * Revision 1.7 2006/07/22 13:13:01 mitry + * Use file times in GMT on some protocols. + * * Revision 1.6 2005/03/31 19:28:16 mitry * Removed unused variable 'calling' * @@ -16,6 +19,7 @@ extern char *connstr; extern char *devnull; extern char ip_id[10]; +extern char *syslog_name; extern char *log_name; extern char *log_tty; extern char *tty_port; @@ -48,6 +52,7 @@ extern slist_t *ccsl; extern subst_t *psubsts; extern unsigned long totalf,totalm,totaln; +extern int ftime_is_gmt; #endif #endif diff -Bburw ./qico/src/have.h ./trunk/src/have.h --- ./qico/src/have.h 2024-02-01 18:09:52.565569000 +0300 +++ ./trunk/src/have.h 2024-02-01 18:10:34.593590000 +0300 @@ -1,6 +1,6 @@ /****************************************************************** * System includes. - * $Id: have.h,v 1.1 2005/02/07 12:32:00 mitry Exp $ + * $Id: have.h 18 2010-08-23 15:50:49Z semik $ ******************************************************************/ #ifdef HAVE_SYS_TYPES_H diff -Bburw ./qico/src/headers.h ./trunk/src/headers.h --- ./qico/src/headers.h 2024-02-01 18:09:52.565655000 +0300 +++ ./trunk/src/headers.h 2024-02-01 18:10:34.605850000 +0300 @@ -2,7 +2,7 @@ * All common headers are included here **********************************************************/ /* - * $Id: headers.h,v 1.7 2005/05/16 20:33:14 mitry Exp $ + * $Id: headers.h 18 2010-08-23 15:50:49Z semik $ * * $Log: headers.h,v $ * Revision 1.7 2005/05/16 20:33:14 mitry diff -Bburw ./qico/src/hydra.c ./trunk/src/hydra.c --- ./qico/src/hydra.c 2024-02-01 20:54:38.508567000 +0300 +++ ./trunk/src/hydra.c 2024-02-01 20:54:27.631137000 +0300 @@ -5,9 +5,15 @@ COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED =============================================================================*/ /* - * $Id: hydra.c,v 1.29 2005/06/10 20:56:25 mitry Exp $ + * $Id: hydra.c 48 2014-11-29 09:03:48Z semik $ * * $Log: hydra.c,v $ + * Revision 1.31 2005/11/27 01:32:39 mitry + * Fixed hydra_send() if file to be sent is disappeared. + * + * Revision 1.30 2005/09/06 20:42:04 mitry + * Added macros to qpreset() calls + * * Revision 1.29 2005/06/10 20:56:25 mitry * Changed exit from hydra_send() * @@ -1131,7 +1137,7 @@ hytxb.pqueue = xrealloc( hytxb.pqueue, sizeof( HYPKT ) * ( hytxb.npkts + 1 )); hytxb.pqueue[hytxb.npkts].len = (out - txBuf); hytxb.pqueue[hytxb.npkts].pkt = (byte *) xmalloc( hytxb.pqueue[hytxb.npkts].len ); - memcpy( hytxb.pqueue[hytxb.npkts].pkt, txBuf, hytxb.pqueue[hytxb.npkts].len ); + memmove( hytxb.pqueue[hytxb.npkts].pkt, txBuf, hytxb.pqueue[hytxb.npkts].len ); hytxb.npkts++; hytxb.prefix_done = false; @@ -1158,7 +1164,7 @@ break; } - memcpy( (void *) (hytxb.tx_buf + hytxb.tx_left), + memmove( (void *) (hytxb.tx_buf + hytxb.tx_left), hytxb.pqueue[i].pkt, hytxb.pqueue[i].len ); hytxb.tx_left += hytxb.pqueue[i].len; xfree( hytxb.pqueue[i].pkt ); @@ -1769,8 +1775,8 @@ { int i; - qpreset( 0 ); - qpreset( 1 ); + qpreset( QPR_RECV ); + qpreset( QPR_SEND ); for( i = 0; i < hytxb.npkts; i++ ) if ( hytxb.pqueue[i].pkt ) { @@ -1796,6 +1802,18 @@ DEBUG(('H',1,"hydra_batch: %s, %s", txpathname, txalias)); + /*-------------------------------------------------------------------*/ + if ( txpathname ) + { + if ( !( txfd = txopen( txpathname, txalias ))) + { + return XFER_SKIP; + } + + txStart = 0L; + txsyncid = 0L; + } + rxstatus = 0; /*-------------------------------------------------------------------*/ @@ -1826,24 +1844,6 @@ txretries = 0; /*-------------------------------------------------------------------*/ - if ( txpathname ) - { - if ( !( txfd = txopen( txpathname, txalias ))) - { - return XFER_SKIP; - } - - txStart = 0L; - txsyncid = 0L; - } - /* - else { - txfd = NULL; - xstrcpy( txfname, "", 2 ); - } - */ - - /*-------------------------------------------------------------------*/ do { /*----------------------------------------------------------------*/ @@ -1861,7 +1861,7 @@ xstrcpy( p, devtxdev, 1020 ); #endif p += H_FLAGLEN + 1; - memcpy(p,devtxbuf,devtxlen); + memmove(p,devtxbuf,devtxlen); txpkt((word) ((LONGx1) + H_FLAGLEN + 1 + devtxlen), HPKT_DEVDATA); devtxtimer = h_timer_set((!rxState && txState == HTX_REND) ? timeOut >> 1 : @@ -1943,7 +1943,7 @@ if (!txretries) { DEBUG(('H',1,"HSend: End of batch")); - qpreset(1); + qpreset( QPR_SEND ); } *txbufin = '\0'; i = 1; @@ -2292,7 +2292,7 @@ if ( !rxBuf[0] ) { DEBUG(('H',1,"HRecv: End of batch")); - qpreset( 0 ); + qpreset( QPR_RECV ); rxPos = 0L; rxState = HRX_DONE; batchesdone++; diff -Bburw ./qico/src/hydra.h ./trunk/src/hydra.h --- ./qico/src/hydra.h 2024-02-01 18:09:52.566539000 +0300 +++ ./trunk/src/hydra.h 2024-02-01 18:10:34.601884000 +0300 @@ -5,7 +5,7 @@ COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED =============================================================================*/ /* - * $Id: hydra.h,v 1.12 2005/05/16 11:20:13 mitry Exp $ + * $Id: hydra.h 18 2010-08-23 15:50:49Z semik $ * * $Log: hydra.h,v $ * Revision 1.12 2005/05/16 11:20:13 mitry diff -Bburw ./qico/src/janus.c ./trunk/src/janus.c --- ./qico/src/janus.c 2024-02-01 20:54:38.516893000 +0300 +++ ./trunk/src/janus.c 2024-02-01 20:54:27.639192000 +0300 @@ -10,9 +10,12 @@ * - crc32 support ******************************************************************/ /* - * $Id: janus.c,v 1.7 2005/04/04 19:43:56 mitry Exp $ + * $Id: janus.c 18 2010-08-23 15:50:49Z semik $ * * $Log: janus.c,v $ + * Revision 1.8 2005/09/06 20:42:04 mitry + * Added macros to qpreset() calls + * * Revision 1.7 2005/04/04 19:43:56 mitry * Added timeout arg to BUFFLUSH() - tty_bufflush() * @@ -313,7 +316,7 @@ else { rxstate=RDONE; - qpreset(0); + qpreset( QPR_RECV ); } } else @@ -370,7 +373,7 @@ else { txclose(&txfd, FOP_SKIP); - qpreset(1); + qpreset( QPR_SEND ); flexecute(l); l=l->next; getfname(&l); @@ -379,7 +382,7 @@ } else { - qpreset(1); + qpreset( QPR_SEND ); txstate = XDONE; } } @@ -519,8 +522,8 @@ rxclose(&rxfd, FOP_ERROR); rc=1; } - qpreset(0); - qpreset(1); + qpreset( QPR_RECV ); + qpreset( QPR_SEND ); goto breakout; } /* switch (pkttype) */ diff -Bburw ./qico/src/janus.h ./trunk/src/janus.h --- ./qico/src/janus.h 2024-02-01 18:09:52.566875000 +0300 +++ ./trunk/src/janus.h 2024-02-01 18:10:34.583185000 +0300 @@ -1,6 +1,6 @@ /****************************************************************** * Janus protocol defines - * $Id: janus.h,v 1.2 2005/03/31 19:40:38 mitry Exp $ + * $Id: janus.h 18 2010-08-23 15:50:49Z semik $ ******************************************************************/ #ifndef __JANUS_H__ #define __JANUS_H__ diff -Bburw ./qico/src/log.c ./trunk/src/log.c --- ./qico/src/log.c 2024-02-01 20:54:38.522083000 +0300 +++ ./trunk/src/log.c 2024-02-01 20:54:27.653141000 +0300 @@ -2,7 +2,7 @@ * work with log file **********************************************************/ /* - * $Id: log.c,v 1.10 2005/08/23 16:50:43 mitry Exp $ + * $Id: log.c 48 2014-11-29 09:03:48Z semik $ * * $Log: log.c,v $ * Revision 1.10 2005/08/23 16:50:43 mitry @@ -127,7 +127,7 @@ int log_init(const char *logname, const char *ttyname) { FILE *log_f; - char *n, fac[30], *prio; + char fac[30], *prio, *ln; int fc; size_t len; @@ -154,27 +155,28 @@ if ( ttyname ) { len = strlen( progname ) + 2 + strlen( ttyname ); - n = malloc( len ); - if ( !n ) + syslog_name = malloc( len ); + if ( !syslog_name ) { fprintf( stderr, "can't malloc() %d bytes of memory\n", len ); abort(); exit(1); } - xstrcpy( n, progname, len ); - xstrcat( n, ".", len ); - xstrcat( n, ttyname, len ); + xstrcpy( syslog_name, progname, len ); + xstrcat( syslog_name, ".", len ); + xstrcat( syslog_name, ttyname, len ); } else { - n = xstrdup( progname ); + syslog_name = xstrdup( progname ); } - prio = strchr( logname + 1, ':' ); + ln = xstrdup( logname + 1 ); + prio = strchr( ln, ':' ); if ( prio ) { - prio++; - xstrcpy( fac, logname + 1, 30 ); + *prio++ = '\0'; + xstrcpy( fac, ln, 30 ); if (( syslog_priority = parsefacorprio( prio, (SLNCODE *) prioritynames )) < 0 ) { syslog_priority = LOG_INFO; @@ -182,7 +184,7 @@ } else { - xstrcpy( fac, logname + 1, 30); + xstrcpy( fac, ln, 30); } if (( fc = parsefacorprio( fac, (SLNCODE *) facilitynames )) < 0 ) @@ -192,8 +194,8 @@ log_type = LT_SYSLOG; log_name = NULL; - openlog( n, LOG_PID, fc ); - xfree( n ); + openlog( syslog_name, LOG_PID, fc ); + xfree( ln ); return 1; } @@ -210,7 +212,7 @@ IFPerl( perl_on_log( newstr )); gettimeofday( &tv, NULL ); - memcpy( &t, localtime( &tv.tv_sec ), sizeof(struct tm)); + memmove( &t, localtime( &tv.tv_sec ), sizeof(struct tm)); #ifdef NEED_DEBUG if ( facilities_levels['G'] >= 1 ) @@ -320,6 +322,7 @@ if ( log_type == LT_SYSLOG ) { closelog(); + xfree( syslog_name ); } xfree( log_name ); xfree( log_tty ); @@ -375,7 +378,7 @@ } tt = time( NULL ); - memcpy( &t, localtime( &tt ), sizeof(struct tm)); + memmove( &t, localtime( &tt ), sizeof(struct tm)); snprintf( str, MAX_STRING, "[Chat with: %s (%u:%u/%u.%u) opened by %s at ", remname, ra->z, ra->n, ra->f, ra->p, side ? "remote" : "me" ); diff -Bburw ./qico/src/ls_zglue.c ./trunk/src/ls_zglue.c --- ./qico/src/ls_zglue.c 2024-02-01 20:54:38.524358000 +0300 +++ ./trunk/src/ls_zglue.c 2024-02-01 20:54:27.655354000 +0300 @@ -3,7 +3,7 @@ Support CRC16, CRC32, variable header, ZedZap (big blocks) and DirZap. Global variables, common functions. - $Id: ls_zglue.c,v 1.3 2005/03/28 17:02:52 mitry Exp $ + $Id: ls_zglue.c 18 2010-08-23 15:50:49Z semik $ */ #include "headers.h" #include "ls_zmodem.h" @@ -28,7 +28,7 @@ rc = ls_zsendfile(&f,ls_SerialNum++); (*totalleft)-=sendf.ftot; (*filesleft)--; - DEBUG(('Z',2,"zmodem_sendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"zmodem_sendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); switch(rc) { case LSZ_OK: @@ -56,7 +56,7 @@ { int rc; int opts = LSZ_OPTCRC32|LSZ_OPTSKIPGUARD; - DEBUG(('Z',2,"zmodem_sendinit: %s",canzap==2?"DirZap":canzap?"ZedZap":"ZModem")); + DEBUG(('Z',1,"zmodem_sendinit: %s",canzap==2?"DirZap":canzap?"ZedZap":"ZModem")); switch(canzap) { case 2: @@ -68,7 +68,7 @@ case 0: break; default: - DEBUG(('Z',3,"zmodem_sendinit: strange canzap: %d",canzap)); + DEBUG(('Z',1,"zmodem_sendinit: strange canzap: %d",canzap)); break; } if((rc=ls_zinitsender(opts,effbaud,cfgi(CFG_ZTXWIN),NULL))<0) @@ -86,7 +86,7 @@ /* Done sending */ int zmodem_senddone() { - DEBUG(('Z',2,"zmodem_senddone")); + DEBUG(('Z',1,"zmodem_senddone")); xfree(txbuf); return ls_zdonesender(); } @@ -98,7 +98,7 @@ int frame = ZRINIT; int opts = LSZ_OPTCRC32|LSZ_OPTSKIPGUARD; - DEBUG(('Z',2,"zmodem_receive")); + DEBUG(('Z',1,"zmodem_receive")); switch(canzap & 0x00FF) { case 2: @@ -110,7 +110,7 @@ case 0: break; default: - DEBUG(('Z',3,"zmodem_receive: strange canzap: %d",canzap)); + DEBUG(('Z',1,"zmodem_receive: strange canzap: %d",canzap)); break; } if(canzap & 0x0100) @@ -121,17 +121,17 @@ switch((rc=ls_zinitreceiver(opts,effbaud,cfgi(CFG_ZRXWIN),&f))) { case ZFIN: - DEBUG(('Z',3,"zmodem_receive: ZFIN after INIT, empty batch")); + DEBUG(('Z',2,"zmodem_receive: ZFIN after INIT, empty batch")); ls_zdonereceiver(); return LSZ_OK; case ZFILE: - DEBUG(('Z',3,"zmodem_receive: ZFILE after INIT")); + DEBUG(('Z',2,"zmodem_receive: ZFILE after INIT")); break; default: /* - DEBUG(('Z',3,"zmodem_receive: something strange after init: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"zmodem_receive: something strange after init: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"zmodem_receive: something strange after init: rc=%ld",rc)); + DEBUG(('Z',1,"zmodem_receive: something strange after init: rc=%ld",rc)); ls_zabort(); ls_zdonereceiver(); return LSZ_ERROR; @@ -146,7 +146,7 @@ switch(rc) { case ZFIN: - DEBUG(('Z',3,"zmodem_receive: ZFIN")); + DEBUG(('Z',2,"zmodem_receive: ZFIN")); ls_zdonereceiver(); return LSZ_OK; case ZFILE: @@ -160,35 +160,35 @@ switch(rxopen(f.name,f.mtime,f.size,&rxfd)) { case FOP_SKIP: - DEBUG(('Z',3,"zmodem_receive: SKIP %s",f.name)); + DEBUG(('Z',2,"zmodem_receive: SKIP %s",f.name)); frame = ZSKIP; break; case FOP_SUSPEND: - DEBUG(('Z',3,"zmodem_receive: SUSPEND %s",f.name)); + DEBUG(('Z',2,"zmodem_receive: SUSPEND %s",f.name)); frame = ZFERR; break; case FOP_CONT: case FOP_OK: - DEBUG(('Z',1,"zmodem_receive: OK %s from %d",f.name,recvf.soff)); + DEBUG(('Z',2,"zmodem_receive: OK %s from %d",f.name,recvf.soff)); frame = ZRINIT; switch((rc=ls_zrecvfile(recvf.soff))) { case ZFERR: - DEBUG(('Z',3,"zmodem_receive: ZFERR")); + DEBUG(('Z',2,"zmodem_receive: ZFERR")); rxclose(&rxfd,FOP_SUSPEND); frame = ZFERR; break; case ZSKIP: - DEBUG(('Z',3,"zmodem_receive: ZSKIP")); + DEBUG(('Z',2,"zmodem_receive: ZSKIP")); rxclose(&rxfd,FOP_SKIP); frame = ZSKIP; break; case LSZ_OK: - DEBUG(('Z',3,"zmodem_receive: OK")); + DEBUG(('Z',2,"zmodem_receive: OK")); rxclose(&rxfd,FOP_OK); break; default: - DEBUG(('Z',3,"zmodem_receive: OTHER %d",rc)); + DEBUG(('Z',1,"zmodem_receive: OTHER %d",rc)); rxclose(&rxfd,FOP_ERROR); return LSZ_ERROR; } @@ -197,15 +197,15 @@ } break; case ZABORT: - DEBUG(('Z',3,"zmodem_receive: ABORT")); + DEBUG(('Z',1,"zmodem_receive: ABORT")); ls_zabort(); ls_zdonereceiver(); return LSZ_ERROR; default: /* - DEBUG(('Z',3,"zmodem_receive: something strange: %d, %s ",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"zmodem_receive: something strange: %d, %s ",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"zmodem_receive: something strange: rc=%ld",rc)); + DEBUG(('Z',1,"zmodem_receive: something strange: rc=%ld",rc)); ls_zabort(); ls_zdonereceiver(); return LSZ_ERROR; diff -Bburw ./qico/src/ls_zmodem.c ./trunk/src/ls_zmodem.c --- ./qico/src/ls_zmodem.c 2024-02-01 20:54:38.533974000 +0300 +++ ./trunk/src/ls_zmodem.c 2024-02-01 20:54:27.664439000 +0300 @@ -4,7 +4,7 @@ Global variables, common functions. */ /* - * $Id: ls_zmodem.c,v 1.6 2005/05/16 20:31:07 mitry Exp $ + * $Id: ls_zmodem.c 18 2010-08-23 15:50:49Z semik $ * * $Log: ls_zmodem.c,v $ * Revision 1.6 2005/05/16 20:31:07 mitry @@ -112,7 +112,7 @@ (ls_Protocol & LSZ_OPTRLE)?"RLE":"Plain"); return LSZ_ERROR; } - DEBUG(('Z',2,"ls_zsendbhdr: %c, %s, len: %d",type,LSZ_FRAMETYPES[frametype+LSZ_FTOFFSET],len)); + DEBUG(('Z',1,"ls_zsendbhdr: %c, %s, len: %d",type,LSZ_FRAMETYPES[frametype+LSZ_FTOFFSET],len)); /* Send * and packet type */ BUFCHAR(ZPAD); @@ -163,7 +163,7 @@ long crc = LSZ_INIT_CRC16; int n; - DEBUG(('Z',2,"ls_zsendhhdr: %s, len: %d",LSZ_FRAMETYPES[frametype+LSZ_FTOFFSET],len)); + DEBUG(('Z',1,"ls_zsendhhdr: %s, len: %d",LSZ_FRAMETYPES[frametype+LSZ_FTOFFSET],len)); /* Send ** */ BUFCHAR(ZPAD); BUFCHAR(ZPAD); @@ -223,8 +223,7 @@ rhBYTE, rhCRC, rhCR, - rhLF, - rhXON + rhLF } state = rhInit; static enum rhREADMODE { @@ -245,11 +244,11 @@ int c = -1; int rc; - DEBUG(('Z',2,"ls_zrecvhdr: timeout %d",timeout)); + DEBUG(('Z',1,"ls_zrecvhdr: timeout %d",timeout)); if(rhInit == state) { - DEBUG(('Z',3,"ls_zrecvhdr: init state")); + DEBUG(('Z',2,"ls_zrecvhdr: init state")); frametype = LSZ_ERROR; crc = 0; crcl = 2; @@ -297,7 +296,7 @@ } break; case rhZPAD: - DEBUG(('Z',3,"ls_zrecvhdr: rhZPAD, garbage counter: %d",ls_Garbage)); + DEBUG(('Z',2,"ls_zrecvhdr: rhZPAD, garbage counter: %d",ls_Garbage)); switch(c) { case ZPAD: @@ -312,7 +311,7 @@ } break; case rhZDLE: - DEBUG(('Z',3,"ls_zrecvhdr: rhZDLE, got: %02x (%c)",(unsigned char)c,(unsigned char)c)); + DEBUG(('Z',2,"ls_zrecvhdr: rhZDLE, got: %02x (%c)",(unsigned char)c,(unsigned char)c)); switch(c) { case ZBIN: @@ -353,11 +352,11 @@ case rhZVHEX: if(c > LSZ_MAXHLEN) { - DEBUG(('Z',3,"ls_zrecvhdr: Header TOO long: %d bytes (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); + DEBUG(('Z',1,"ls_zrecvhdr: Header TOO long: %d bytes (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); state = rhInit; return LSZ_BADCRC; } - DEBUG(('Z',3,"ls_zrecvhdr: Any rhZV: %d bytes (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); + DEBUG(('Z',2,"ls_zrecvhdr: Any rhZV: %d bytes (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); len = c; state = rhFrameType; break; @@ -368,11 +367,11 @@ case rhZHEX: if(c < 0 || c > LSZ_MAXFRAME) { - DEBUG(('Z',3,"ls_zrecvhdr: Unknown frame type: %d (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); + DEBUG(('Z',1,"ls_zrecvhdr: Unknown frame type: %d (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); state = rhInit; return LSZ_BADCRC; } - DEBUG(('Z',3,"ls_zrecvhdr: Any rhZ frametype: %d, %s (state: %d, CRC%d)",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET],(int)state,(2==crcl?16:32))); + DEBUG(('Z',1,"ls_zrecvhdr: Any rhZ frametype: %d, %s (state: %d, CRC%d)",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET],(int)state,(2==crcl?16:32))); len = 4; frametype = c; if(2 == crcl) @@ -388,11 +387,11 @@ case rhFrameType: if(c < 0 || c > LSZ_MAXFRAME) { - DEBUG(('Z',3,"ls_zrecvhdr: Unknown frame type: %d (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); + DEBUG(('Z',1,"ls_zrecvhdr: Unknown frame type: %d (state: %d, CRC%d)",c,(int)state,(2==crcl?16:32))); state = rhInit; return LSZ_BADCRC; } - DEBUG(('Z',3,"ls_zrecvhdr: frametype %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvhdr: frametype %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); frametype = c; if(2 == crcl) { @@ -405,7 +404,7 @@ state = rhBYTE; break; case rhBYTE: - DEBUG(('Z',3,"ls_zrecvhdr: rhBYTE: %02x (%d)",c,got)); + DEBUG(('Z',2,"ls_zrecvhdr: rhBYTE: %02x",c)); hdr[got] = c; if(++got == len) { @@ -421,7 +420,7 @@ } break; case rhCRC: - DEBUG(('Z',3,"ls_zrecvhdr: rhCRC")); + DEBUG(('Z',2,"ls_zrecvhdr: rhCRC")); if(2 == crcl) { crc <<= 8; @@ -440,7 +439,7 @@ #ifdef NEED_DEBUG if(ls_Protocol&LSZ_OPTCRC32 && rmHEX!=readmode) { - DEBUG(('Z',4,"ls_zrecvhdr: was CRC32, got CRC16 binary header")); + DEBUG(('Z',1,"ls_zrecvhdr: was CRC32, got CRC16 binary header")); } #endif incrc = LSZ_FINISH_CRC16(incrc); @@ -455,14 +454,14 @@ #ifdef NEED_DEBUG if(!(ls_Protocol&LSZ_OPTCRC32)) { - DEBUG(('Z',4,"ls_zrecvhdr: was CRC16, got CRC32 binary header")); + DEBUG(('Z',1,"ls_zrecvhdr: was CRC16, got CRC32 binary header")); } #endif incrc = LSZ_FINISH_CRC32(incrc); crc = LTOH(crc); ls_Protocol |= LSZ_OPTCRC32; } - DEBUG(('Z',4,"ls_zrecvhdr: CRC%d got %08x, calculated %08x",(2==crcl)?16:32,incrc,crc)); + DEBUG(('Z',2,"ls_zrecvhdr: CRC%d got %08x, claculated %08x",(2==crcl)?16:32,incrc,crc)); if (incrc != crc) { return LSZ_BADCRC; @@ -482,20 +481,15 @@ break; case rhCR: state = rhInit; - DEBUG(('Z',3,"ls_zrecvhdr: rhCR")); + DEBUG(('Z',2,"ls_zrecvhdr: rhCR")); switch(c) { case CR: case CR|0x80: /* we need LF after */ - DEBUG(('Z',4,"ls_zrecvhdr: rhCR, ignoring any remaining chars.")); - return frametype; /* At this point, most implementations ignore checking for the remaining chars */ + state = rhLF; + break; case LF: case LF|0x80: /* Ok, UNIX-like EOL */ - state = rhXON; - break; - case XON: - case XON|0x80: - DEBUG(('Z',4,"ls_zrecvhdr: rhCR, got XON without CR/LF?")); return frametype; default: return LSZ_BADCRC; @@ -503,33 +497,13 @@ break; case rhLF: state = rhInit; - DEBUG(('Z',3,"ls_zrecvhdr: rhLF")); + DEBUG(('Z',2,"ls_zrecvhdr: rhLF")); switch(c) { case LF: case LF|0x80: - state = rhXON; - break; - default: - return LSZ_BADCRC; - } - break; - case rhXON: - state = rhInit; - DEBUG(('Z',3,"ls_zrecvhdr: rhXON")); - switch(c) - { - case ZPAD: - case ZPAD|0x80: - state = rhZPAD; - got = 0; - crcgot = 0; - break; - case XON: - case XON|0x80: return frametype; default: - DEBUG(('Z',4,"ls_zrecvdata: rhXON unexpcted %x (%c)",c,(char)c)); return LSZ_BADCRC; } break; @@ -538,9 +512,9 @@ } } /* - DEBUG(('Z',2,"ls_zrecvhdr: timeout or something other: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvhdr: timeout or something other: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zrecvhdr: timeout or something other: rc=%ld",rc)); + DEBUG(('Z',1,"ls_zrecvhdr: timeout or something other: rc=%ld",rc)); return rc; } @@ -549,7 +523,7 @@ { long crc; - DEBUG(('Z',2,"ls_zsenddata: %d bytes, %c frameend",len,(char)frame)); + DEBUG(('Z',1,"ls_zsenddata: %d bytes, %c frameend",len,(char)frame)); if (ls_Protocol & LSZ_OPTCRC32) { @@ -629,7 +603,7 @@ int frametype = LSZ_ERROR; /* Type of frame - ZCRC(G|W|Q|E) */ int rcvdata = 1; /* Data is being received NOW (not CRC) */ - DEBUG(('Z',2,"ls_zrecvdata16: timeout %d",timeout)); + DEBUG(('Z',1,"ls_zrecvdata16: timeout %d",timeout)); while(rcvdata && ((c = ls_readzdle(&timeout)) >= 0)) { @@ -638,7 +612,7 @@ *data++ = c & 0xff; if(++got > ls_MaxBlockSize) { - DEBUG(('Z',3,"ls_zrecvdata16: Block is too big (%d/%d, %02x and %02x)",got,ls_MaxBlockSize,*(data-1),c)); + DEBUG(('Z',1,"ls_zrecvdata16: Block is too big (%d/%d, %02x and %02x)",got,ls_MaxBlockSize,*(data-1),c)); return LSZ_BADCRC; } incrc = LSZ_UPDATE_CRC16((unsigned char)c,incrc); @@ -653,11 +627,11 @@ case LSZ_CRCW: rcvdata = 0; frametype = c & 0xff; - DEBUG(('Z',3,"ls_zrecvdata16: frameend %c",(char)frametype)); + DEBUG(('Z',2,"ls_zrecvdata16: frameend %c",(char)frametype)); incrc = LSZ_UPDATE_CRC16((unsigned char)c,incrc); break; default: - DEBUG(('Z',3,"ls_zrecvdata16: bad frameend %d",c)); + DEBUG(('Z',1,"ls_zrecvdata16: bad frameend %d",c)); return LSZ_BADCRC; } } @@ -666,9 +640,9 @@ if(rcvdata) { /* - DEBUG(('Z',2,"ls_zrecvdata16: timeout or something else: %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvdata16: timeout or something else: %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zrecvdata16: timeout or something else: c=%ld",c)); + DEBUG(('Z',1,"ls_zrecvdata16: timeout or something else: c=%ld",c)); return c; } @@ -686,14 +660,14 @@ crc |= (unsigned char)c; crc = STOH(crc); incrc = LSZ_FINISH_CRC16(incrc); - DEBUG(('Z',2,"ls_zrecvdata16: CRC16 got %04x, calculated %04x",incrc,crc)); + DEBUG(('Z',2,"ls_zrecvdata16: CRC16 got %04x, claculated %04x",incrc,crc)); if (incrc != crc) { return LSZ_BADCRC; } *len = got; - DEBUG(('Z',2,"ls_zrecvdata16: OK")); + DEBUG(('Z',1,"ls_zrecvdata16: OK")); return frametype; } @@ -707,7 +681,7 @@ int frametype = LSZ_ERROR; /* Type of frame - ZCRC(G|W|Q|E) */ int rcvdata = 1; /* Data is being received NOW (not CRC) */ - DEBUG(('Z',2,"ls_zrecvdata32: timeout %d",timeout)); + DEBUG(('Z',1,"ls_zrecvdata32: timeout %d",timeout)); while(rcvdata && ((c = ls_readzdle(&timeout)) >= 0)) { @@ -716,7 +690,7 @@ *data++ = c & 0xff; if(++got > ls_MaxBlockSize) { - DEBUG(('Z',3,"ls_zrecvdata32: Block is too big (%d/%d, %02x and %02x)",got,ls_MaxBlockSize,*(data-1),c)); + DEBUG(('Z',1,"ls_zrecvdata32: Block is too big (%d/%d, %02x and %02x)",got,ls_MaxBlockSize,*(data-1),c)); return LSZ_BADCRC; } incrc = LSZ_UPDATE_CRC32((unsigned char)c,incrc); @@ -731,11 +705,11 @@ case LSZ_CRCW: rcvdata = 0; frametype = c & 0xff; - DEBUG(('Z',3,"ls_zrecvdata32: frameend %c",(char)frametype)); + DEBUG(('Z',2,"ls_zrecvdata32: frameend %c",(char)frametype)); incrc = LSZ_UPDATE_CRC32((unsigned char)c,incrc); break; default: - DEBUG(('Z',3,"ls_zrecvdata32: bad frameend %d",c)); + DEBUG(('Z',1,"ls_zrecvdata32: bad frameend %d",c)); return LSZ_BADCRC; } } @@ -744,9 +718,9 @@ if(rcvdata) { /* - DEBUG(('Z',2,"ls_zrecvdata32: timeout or something else: %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvdata32: timeout or something else: %d, %s",c,LSZ_FRAMETYPES[c+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zrecvdata32: timeout or something else: c=%ld",c)); + DEBUG(('Z',1,"ls_zrecvdata32: timeout or something else: c=%ld",c)); return c; } @@ -773,7 +747,7 @@ crc |= (unsigned long)c << 0x18; crc = LTOH(crc); incrc = LSZ_FINISH_CRC32(incrc); - DEBUG(('Z',2,"ls_zrecvdata32: CRC32 got %08x, calculated %08x",incrc,crc)); + DEBUG(('Z',2,"ls_zrecvdata32: CRC32 got %08x, claculated %08x",incrc,crc)); if (incrc != crc) { @@ -990,7 +964,7 @@ default: if((c&0x60) != 0x40) { - DEBUG(('Z',3,"ls_readzdle: bad ZDLed character %02x (%02x)",c,(c ^ 0x40) & 0xff)); + DEBUG(('Z',1,"ls_readzdle: bad ZDLed character %02x (%02x)",c,(c ^ 0x40) & 0xff)); return LSZ_BADCRC; } return (c ^ 0x40) & 0xff; diff -Bburw ./qico/src/ls_zmodem.h ./trunk/src/ls_zmodem.h --- ./qico/src/ls_zmodem.h 2024-02-01 18:09:52.567492000 +0300 +++ ./trunk/src/ls_zmodem.h 2024-02-01 18:10:34.599475000 +0300 @@ -4,7 +4,7 @@ Global variables, common functions. */ /* - * $Id: ls_zmodem.h,v 1.3 2005/03/31 19:40:38 mitry Exp $ + * $Id: ls_zmodem.h 18 2010-08-23 15:50:49Z semik $ * * $Log: ls_zmodem.h,v $ * Revision 1.3 2005/03/31 19:40:38 mitry diff -Bburw ./qico/src/ls_zreceive.c ./trunk/src/ls_zreceive.c --- ./qico/src/ls_zreceive.c 2024-02-01 20:54:38.538819000 +0300 +++ ./trunk/src/ls_zreceive.c 2024-02-01 20:54:27.669144000 +0300 @@ -4,7 +4,7 @@ Receiver logic. */ /* - * $Id: ls_zreceive.c,v 1.4 2005/03/31 19:40:38 mitry Exp $ + * $Id: ls_zreceive.c 18 2010-08-23 15:50:49Z semik $ * * $Log: ls_zreceive.c,v $ * Revision 1.4 2005/03/31 19:40:38 mitry @@ -23,7 +23,7 @@ int ls_zinitreceiver(int protocol, int baud, int window, ZFILEINFO *f) { - DEBUG(('Z',2,"ls_zinitreceiver: %08x, %d baud, %d bytes",protocol,baud,window)); + DEBUG(('Z',1,"ls_zinitreceiver: %08x, %d baud, %d bytes",protocol,baud,window)); /* Set all options to requested state -- this may be alerted by other side in ZSINIT */ ls_Protocol = protocol; @@ -58,24 +58,24 @@ int trys = 0; int rc; - DEBUG(('Z',2,"ls_zrecvcrcw")); + DEBUG(('Z',1,"ls_zrecvcrcw")); do { switch((rc=ls_zrecvdata(buf,len,ls_DataTimeout,ls_Protocol&LSZ_OPTCRC32))) { case ZCRCW: /* Ok, here it is */ - DEBUG(('Z',3,"ls_zrecvcrcw: got frame ZCRCW")); + DEBUG(('Z',2,"ls_zrecvcrcw: got frame ZCRCW")); return LSZ_OK; case LSZ_BADCRC: - DEBUG(('Z',3,"ls_zrecvcrcw: BADCRC")); + DEBUG(('Z',2,"ls_zrecvcrcw: BADCRC")); ls_storelong(ls_txHdr,0L); ls_zsendhhdr(ZNAK,4,ls_txHdr); return 1; case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zrecvcrcw: TIMEOUT")); + DEBUG(('Z',2,"ls_zrecvcrcw: TIMEOUT")); break; default: - DEBUG(('Z',3,"ls_zrecvcrcw:: strange data frame %d",rc)); + DEBUG(('Z',1,"ls_zrecvcrcw:: strange data frame %d",rc)); if(rc<0) { return rc; @@ -102,7 +102,7 @@ char flags; int win; - DEBUG(('Z',2,"ls_zrecvfinfo: frame %d, %s, first: %d",frame,LSZ_FRAMETYPES[frame+LSZ_FTOFFSET],first)); + DEBUG(('Z',1,"ls_zrecvfinfo: frame %d, %s, first: %d",frame,LSZ_FRAMETYPES[frame+LSZ_FTOFFSET],first)); /* Send temporary variables */ win = STOI(ls_txWinSize); flags = LSZ_RXCANDUPLEX | LSZ_RXCANOVIO; @@ -128,14 +128,14 @@ { if(ZRINIT != frame) { - DEBUG(('Z',3,"ls_zrecvfinfo: send %d, %s",frame,LSZ_FRAMETYPES[frame+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zrecvfinfo: send %d, %s",frame,LSZ_FRAMETYPES[frame+LSZ_FTOFFSET])); ls_storelong(ls_txHdr,ls_SerialNum); if((rc=ls_zsendhhdr(frame,4,ls_txHdr))<0) { return rc; } } - DEBUG(('Z',3,"ls_zrecvfinfo: send %d, ZRINIT",ZRINIT)); + DEBUG(('Z',2,"ls_zrecvfinfo: send %d, ZRINIT",ZRINIT)); ls_txHdr[LSZ_F0] = flags; ls_txHdr[LSZ_F1] = (ls_Protocol&LSZ_OPTVHDR)?(char)LSZ_RXCANVHDR:0; ls_txHdr[LSZ_P1] = (unsigned char)((win>>8) & 0xff); @@ -153,11 +153,11 @@ first = 1; /* We will trust in first ZFIN after ZRQINIT */ case ZNAK: case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zrecvfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zrecvfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); retransmit = 1; break; case ZSINIT: /* He want to set some options */ - DEBUG(('Z',3,"ls_zrecvfinfo: ZSINIT")); + DEBUG(('Z',2,"ls_zrecvfinfo: ZSINIT")); first = 0; /* We will trust in first ZFIN after ZSINIT */ if((rc=ls_zrecvcrcw(rxbuf,&len))<0) { @@ -184,7 +184,7 @@ } break; case ZFILE: /* Ok, File started! */ - DEBUG(('Z',3,"ls_zrecvfinfo: ZFILE")); + DEBUG(('Z',2,"ls_zrecvfinfo: ZFILE")); if((rc=ls_zrecvcrcw(rxbuf,&len))<0) { return rc; @@ -195,7 +195,7 @@ f->name[MAX_PATH-1] = '\x00'; if(sscanf((char *)rxbuf+strlen(f->name)+1,"%ld %lo %o %o %ld %ld",(long*)&f->size,(unsigned long*)&f->mtime,(unsigned*)&len,(unsigned*)&ls_SerialNum,(long*)&f->filesleft,(long*)&f->bytesleft) < 2) { - DEBUG(('Z',4,"ls_zrecvfinfo: file info is corrupted: '%s'",rxbuf+strlen(f->name)+1)); + DEBUG(('Z',1,"ls_zrecvfinfo: file info is corrupted: '%s'",rxbuf+strlen(f->name)+1)); f->filesleft = -1; } return ZFILE; @@ -206,26 +206,26 @@ } break; case ZFIN: /* ZFIN from previous session? Or may be real one? */ - DEBUG(('Z',3,"ls_zrecvfinfo: ZFIN %d, first: %d",zfins,first)); + DEBUG(('Z',2,"ls_zrecvfinfo: ZFIN %d, first: %d",zfins,first)); if(first || ++zfins == LSZ_TRUSTZFINS) { return ZFIN; } break; case ZABORT: /* Abort this session -- we trust in ABORT! */ - DEBUG(('Z',3,"ls_zrecvfinfo: ABORT")); + DEBUG(('Z',2,"ls_zrecvfinfo: ABORT")); return ZABORT; case LSZ_BADCRC: - DEBUG(('Z',3,"ls_zrecvfinfo: BADCRC")); + DEBUG(('Z',2,"ls_zrecvfinfo: BADCRC")); ls_storelong(ls_txHdr,0L); ls_zsendhhdr(ZNAK,4,ls_txHdr); retransmit = 1; break; default: /* - DEBUG(('Z',3,"ls_zrecvfinfo: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvfinfo: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zrecvfinfo: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zrecvfinfo: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -237,9 +237,9 @@ } while(trys < 10); /* - DEBUG(('Z',2,"ls_zrecvfinfo: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvfinfo: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zrecvfinfo: timeout or something other: rc=%ld",rc)); + DEBUG(('Z',1,"ls_zrecvfinfo: timeout or something other: rc=%ld",rc)); return LSZ_TIMEOUT; } @@ -250,18 +250,18 @@ int trys = 0; int hlen; - DEBUG(('Z',2,"ls_zrecvnewpos: will retransmit %d",oldpos)); + DEBUG(('Z',1,"ls_zrecvnewpos: will retransmit %d",oldpos)); do { switch((rc=ls_zrecvhdr(ls_rxHdr,&hlen,ls_HeaderTimeout))) { case ZDATA: case ZEOF: - DEBUG(('Z',3,"ls_zrecvnewpos: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zrecvnewpos: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); *pos = ls_fetchlong(ls_rxHdr); return rc; case ZNAK: - DEBUG(('Z',3,"ls_zrecvnewpos: ZNAK")); + DEBUG(('Z',2,"ls_zrecvnewpos: ZNAK")); ls_storelong(ls_txHdr,oldpos); if((rc=ls_zsendhhdr(ZRPOS,4,ls_txHdr))<0) { @@ -269,18 +269,18 @@ } break; case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zrecvnewpos: TIEMOUT")); + DEBUG(('Z',2,"ls_zrecvnewpos: TIEMOUT")); break; case LSZ_BADCRC: - DEBUG(('Z',3,"ls_zrecvnewpos: BADCRC")); + DEBUG(('Z',2,"ls_zrecvnewpos: BADCRC")); ls_storelong(ls_txHdr,0L); ls_zsendhhdr(ZNAK,4,ls_txHdr); break; default: /* - DEBUG(('Z',3,"ls_zrecvnewpos: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvnewpos: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zrecvnewpos: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zrecvnewpos: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -292,9 +292,9 @@ } while (++trys < 10); /* - DEBUG(('Z',2,"ls_zrecvnewpos: timeout or something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvnewpos: timeout or something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zrecvnewpos: timeout or something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zrecvnewpos: timeout or something strange rc=%ld",rc)); return LSZ_TIMEOUT; } @@ -306,7 +306,7 @@ int needzdata = 1; int len; - DEBUG(('Z',2,"ls_zrecvfile form %d",pos)); + DEBUG(('Z',1,"ls_zrecvfile form %d",pos)); rxpos = pos; rxstatus=0; @@ -325,7 +325,7 @@ case ZCRCE: needzdata = 1; case ZCRCG: - DEBUG(('Z',3,"ls_zrecvfile: ZCRC%c, %d bytes at %d",rc==ZCRCE?'E':'G',len,rxpos)); + DEBUG(('Z',2,"ls_zrecvfile: ZCRC%c, %d bytes at %d",rc==ZCRCE?'E':'G',len,rxpos)); rxpos += len; if(len != fwrite(rxbuf,1,len,rxfd)) { @@ -339,7 +339,7 @@ case ZCRCW: needzdata = 1; case ZCRCQ: - DEBUG(('Z',3,"ls_zrecvfile: ZCRC%c, %d bytes at %d",rc==ZCRCW?'W':'Q',len,rxpos)); + DEBUG(('Z',2,"ls_zrecvfile: ZCRC%c, %d bytes at %d",rc==ZCRCW?'W':'Q',len,rxpos)); rxpos += len; if(len != fwrite(rxbuf,1,len,rxfd)) { @@ -354,7 +354,7 @@ break; case LSZ_BADCRC: case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zrecvfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); if(ls_rxAttnStr[0]) { PUTSTR(ls_rxAttnStr); @@ -365,7 +365,7 @@ needzdata = 1; break; default: - DEBUG(('Z',3,"ls_zrecvfile: something strange %ld",rc)); + DEBUG(('Z',1,"ls_zrecvfile: something strange %ld",rc)); if(rc<0) { return rc; @@ -382,14 +382,14 @@ } else /* We need new position -- ZDATA (and may be ZEOF) */ { - DEBUG(('Z',3,"ls_zrecvfile: want ZDATA/ZEOF at %d",rxpos)); + DEBUG(('Z',1,"ls_zrecvfile: want ZDATA/ZEOF at %d",rxpos)); if((rc=ls_zrecvnewpos(rxpos,&newpos))<0) { return rc; } if(newpos != rxpos) { - DEBUG(('Z',4,"ls_zrecvfile: bad new position %d in %s",newpos,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zrecvfile: bad new position %d in %s",newpos,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); if(ls_rxAttnStr[0]) { PUTSTR(ls_rxAttnStr); @@ -405,7 +405,7 @@ { if(ZEOF == rc) { - DEBUG(('Z',4,"ls_zrecvfile: ZEOF")); + DEBUG(('Z',2,"ls_zrecvfile: ZEOF")); ls_storelong(ls_txHdr,0); if((rc=ls_zsendhhdr(ZRINIT,4,ls_txHdr))<0) { @@ -413,7 +413,7 @@ } return LSZ_OK; } - DEBUG(('Z',4,"ls_zrecvfile: ZDATA")); + DEBUG(('Z',2,"ls_zrecvfile: ZDATA")); needzdata = 0; } } @@ -432,7 +432,7 @@ int trys = 0; int hlen; int retransmit = 1; - DEBUG(('Z',2,"ls_zdonereceiver")); + DEBUG(('Z',1,"ls_zdonereceiver")); xfree(rxbuf); do { @@ -449,17 +449,17 @@ switch (rc=GETCHAR(ls_HeaderTimeout)) { case 'O': /* Ok, GOOD */ - DEBUG(('Z',3,"ls_zdonereceiver: O")); + DEBUG(('Z',2,"ls_zdonereceiver: O")); rc = GETCHAR(0); return LSZ_OK; case XON: case XOFF: case XON | 0x80: case XOFF | 0x80: - DEBUG(('Z',3,"ls_zdonereceiver: XON/XOFF, skip it")); + DEBUG(('Z',2,"ls_zdonereceiver: XON/XOFF, skip it")); break; case ZPAD: - DEBUG(('Z',3,"ls_zdonereceiver: ZPAD")); + DEBUG(('Z',2,"ls_zdonereceiver: ZPAD")); if((rc=ls_zrecvhdr(ls_rxHdr,&hlen,ls_HeaderTimeout))<0) { return rc; @@ -471,7 +471,7 @@ retransmit = 1; break; default: - DEBUG(('Z',3,"ls_zdonereceiver: something strange %d",rc)); + DEBUG(('Z',1,"ls_zdonereceiver: something strange %d",rc)); if(rc<0) { return rc; @@ -481,6 +481,6 @@ } } while (trys < 10); - DEBUG(('Z',2,"ls_zdonereceiver: timeout or something strange %d",rc)); + DEBUG(('Z',1,"ls_zdonereceiver: timeout or something strange %d",rc)); return rc; } diff -Bburw ./qico/src/ls_zsend.c ./trunk/src/ls_zsend.c --- ./qico/src/ls_zsend.c 2024-02-01 20:54:38.546561000 +0300 +++ ./trunk/src/ls_zsend.c 2024-02-01 20:54:27.676675000 +0300 @@ -4,7 +4,7 @@ Sender logic. */ /* - * $Id: ls_zsend.c,v 1.4 2005/03/31 19:40:38 mitry Exp $ + * $Id: ls_zsend.c 18 2010-08-23 15:50:49Z semik $ * * $Log: ls_zsend.c,v $ * Revision 1.4 2005/03/31 19:40:38 mitry @@ -35,7 +35,7 @@ int hlen; int l; - DEBUG(('Z',2,"ls_zsendsinit: '%s'",attstr?attstr:"(null)")); + DEBUG(('Z',1,"ls_zsendsinit: '%s'",attstr?attstr:"(null)")); if (attstr) { @@ -55,7 +55,7 @@ { if(retransmit) { - DEBUG(('Z',3,"ls_zsendsinit: resend ZSINIT")); + DEBUG(('Z',2,"ls_zsendsinit: resend ZSINIT")); /* We don't support ESC8, so don't ask for it in any case */ ls_txHdr[LSZ_F0] = (ls_Protocol&LSZ_OPTESCAPEALL)?LSZ_TXWNTESCCTL:0; ls_txHdr[LSZ_F1] = ls_txHdr[LSZ_F2] = ls_txHdr[LSZ_F3] = 0; @@ -73,13 +73,13 @@ switch((rc=ls_zrecvhdr(ls_rxHdr,&hlen,ls_HeaderTimeout))) { case ZRINIT: /* Skip it */ - DEBUG(('Z',3,"ls_zsendsinit: ZRINIT")); + DEBUG(('Z',2,"ls_zsendsinit: ZRINIT")); break; case ZACK: /* Ok */ - DEBUG(('Z',3,"ls_zsendsinit: ZACK")); + DEBUG(('Z',2,"ls_zsendsinit: ZACK")); return LSZ_OK; case ZCHALLENGE: /* Return number to peer, he is paranoid */ - DEBUG(('Z',3,"ls_zsendsinit: CHALLENGE")); + DEBUG(('Z',2,"ls_zsendsinit: CHALLENGE")); ls_storelong(ls_txHdr,ls_fetchlong(ls_rxHdr)); if((rc=ls_zsendhhdr(ZACK,4,ls_txHdr))<0) { @@ -88,7 +88,7 @@ break; case LSZ_BADCRC: case ZCOMMAND: - DEBUG(('Z',3,"ls_zsendsinit: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendsinit: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); ls_storelong(ls_txHdr,0); if((rc=ls_zsendhhdr(ZNAK,4,ls_txHdr))<0) { @@ -97,14 +97,14 @@ break; case ZNAK: /* Retransmit */ case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zsendsinit: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendsinit: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); retransmit = 1; break; default: /* - DEBUG(('Z',3,"ls_zsendsinit: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendsinit: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zsendsinit: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zsendsinit: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -114,9 +114,9 @@ } while(trys < 10); /* - DEBUG(('Z',2,"ls_zsendsinit: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendsinit: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zsendsinit: timeout or something other: rc=%ld",rc)); + DEBUG(('Z',1,"ls_zsendsinit: timeout or something other: rc=%ld",rc)); return rc; } @@ -130,7 +130,7 @@ int rxOptions; /* Options from ZRINIT header */ int zfins = 0; /* ZFIN counter -- we will trust only MAY of them on this stage */ - DEBUG(('Z',2,"ls_zinitsender: %08x, %d baud, %d bytes",protocol,baud,window)); + DEBUG(('Z',1,"ls_zinitsender: %08x, %d baud, %d bytes",protocol,baud,window)); /* Set all options to requested state -- this may be alerted by other side */ ls_Protocol = protocol; @@ -156,7 +156,7 @@ if(retransmit) { /* Send first ZRQINIT (do we need it?) */ - DEBUG(('Z',3,"ls_zinitsender: resend ZRQINIT")); + DEBUG(('Z',2,"ls_zinitsender: resend ZRQINIT")); ls_storelong(ls_txHdr,0L); if((rc=ls_zsendhhdr(ZRQINIT,4,ls_txHdr))<0) { @@ -200,7 +200,7 @@ ls_txWinSize = window; } - DEBUG(('Z',3,"ls_zinitsender: RINIT OK, effproto: %08x, winsize: %d",ls_Protocol,ls_txWinSize)); + DEBUG(('Z',2,"ls_zinitsender: RINIT OK, effproto: %08x, winsize: %d",ls_Protocol,ls_txWinSize)); /* Ok, now we could calculate real max frame size and initial block size */ if(ls_txWinSize && ls_MaxBlockSize>ls_txWinSize) @@ -245,7 +245,7 @@ { ls_txCurBlockSize=ls_MaxBlockSize; } - DEBUG(('Z',3,"ls_zinitsender: Block sizes: %d, %d",ls_MaxBlockSize,ls_txCurBlockSize)); + DEBUG(('Z',2,"ls_zinitsender: Block sizes: %d, %d",ls_MaxBlockSize,ls_txCurBlockSize)); /* Allocate memory for send buffer */ txbuf = xmalloc((ls_MaxBlockSize+16)); @@ -264,7 +264,7 @@ return LSZ_OK; } case ZCHALLENGE: /* Return number to peer, he is paranoid */ - DEBUG(('Z',3,"ls_zinitsender: CHALLENGE")); + DEBUG(('Z',2,"ls_zinitsender: CHALLENGE")); ls_storelong(ls_txHdr,ls_fetchlong(ls_rxHdr)); if((rc=ls_zsendhhdr(ZACK,4,ls_txHdr))<0) { @@ -273,11 +273,11 @@ break; case ZNAK: /* Send ZRQINIT again */ case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zinitsender: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zinitsender: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); retransmit = 1; break; case ZFIN: /* ZFIN from previous session? Or may be real one? */ - DEBUG(('Z',3,"ls_zinitsender: ZFIN %d",zfins)); + DEBUG(('Z',2,"ls_zinitsender: ZFIN %d",zfins)); if(++zfins == LSZ_TRUSTZFINS) { return LSZ_ERROR; @@ -285,17 +285,17 @@ break; case LSZ_BADCRC: /* Please, resend */ case ZCOMMAND: /* We don't support it! */ - DEBUG(('Z',3,"ls_zinitsender: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zinitsender: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); ls_storelong(ls_txHdr,0L); ls_zsendhhdr(ZNAK,4,ls_txHdr); case ZABORT: /* Abort this session -- we trust in ABORT! */ - DEBUG(('Z',3,"ls_zinitsender: ABORT")); + DEBUG(('Z',2,"ls_zinitsender: ABORT")); return LSZ_ERROR; default: /* - DEBUG(('Z',3,"ls_zinitsender: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zinitsender: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zinitsender: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zinitsender: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -305,9 +305,9 @@ } while(trys < 10); /* - DEBUG(('Z',2,"ls_zinitsender: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zinitsender: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zinitsender: timeout or something other: rc=%ld",rc)); + DEBUG(('Z',1,"ls_zinitsender: timeout or something other: rc=%ld",rc)); return rc; } @@ -327,7 +327,7 @@ int len; long sn; - DEBUG(('Z',2,"ls_zsendfinfo: %s, %d, %d, %d, %d, %d",f->name,f->size,f->mtime,sernum,f->filesleft,f->bytesleft)); + DEBUG(('Z',1,"ls_zsendfinfo: %s, %d, %d, %d, %d, %d",f->name,f->size,f->mtime,sernum,f->filesleft,f->bytesleft)); txbuf[0] = '\x00'; xstrcpy((char *)txbuf,f->name,1024); @@ -341,7 +341,7 @@ { if(retransmit) { - DEBUG(('Z',3,"ls_zsendfinfo: resend ZFILE")); + DEBUG(('Z',2,"ls_zsendfinfo: resend ZFILE")); ls_txHdr[LSZ_F0] = LSZ_CONVBIN | LSZ_CONVRECOV; ls_txHdr[LSZ_F1] = 0; /* No managment */ ls_txHdr[LSZ_F2] = 0; /* No compression/encryption */ @@ -360,7 +360,7 @@ switch((rc=ls_zrecvhdr(ls_rxHdr,&hlen,ls_HeaderTimeout))) { case ZRPOS: /* Ok, he want our file */ - DEBUG(('Z',3,"ls_zsendfinfo: ZRPOS at %d",ls_fetchlong(ls_rxHdr))); + DEBUG(('Z',2,"ls_zsendfinfo: ZRPOS at %d",ls_fetchlong(ls_rxHdr))); *pos = ls_fetchlong(ls_rxHdr); return ZRPOS; case ZSKIP: /* Skip */ @@ -369,7 +369,7 @@ sn = ls_fetchlong(ls_rxHdr); if(ls_SkipGuard && sn && sn == sernum - 1) /* Here is skip protection */ { - DEBUG(('Z',3,"ls_zsendfinfo: double-skip protection! for %d, %s (this file: %d, got: %d, ls_SN: %d)",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET],sernum,sn,ls_SerialNum)); + DEBUG(('Z',1,"ls_zsendfinfo: double-skip protection! for %d, %s (this file: %d, got: %d, ls_SN: %d)",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET],sernum,sn,ls_SerialNum)); ls_storelong(ls_txHdr,0); if((rc=ls_zsendhhdr(ZNAK,4,ls_txHdr))<0) { @@ -379,16 +379,16 @@ } else if(sn != sernum) { - DEBUG(('Z',3,"ls_zsendfinfo: turn off double-skip protection in %d, %s (%d)",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET],sn)); + DEBUG(('Z',1,"ls_zsendfinfo: turn off double-skip protection in %d, %s (%d)",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET],sn)); ls_SkipGuard = 0; } /* Fall through */ case ZABORT: /* Abort this session */ case ZFIN: /* Finish this session */ - DEBUG(('Z',3,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return rc; case ZCRC: /* Send CRC to peer */ - DEBUG(('Z',3,"ls_zsendfinfo: ZCRC for %d bytes",ls_fetchlong(ls_rxHdr))); + DEBUG(('Z',2,"ls_zsendfinfo: ZCRC for %d bytes",ls_fetchlong(ls_rxHdr))); len = ls_fetchlong(ls_rxHdr); if(!len) { @@ -410,15 +410,15 @@ } break; case ZRINIT: - DEBUG(('Z',3,"ls_zsendfinfo: skip ZRINIT")); + DEBUG(('Z',2,"ls_zsendfinfo: skip ZRINIT")); break; case ZNAK: case LSZ_TIMEOUT: - DEBUG(('Z',3,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); retransmit = 1; break; case LSZ_BADCRC: - DEBUG(('Z',3,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfinfo: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); ls_storelong(ls_txHdr,0); if((rc=ls_zsendhhdr(ZNAK,4,ls_txHdr))<0) { @@ -427,9 +427,9 @@ break; default: /* - DEBUG(('Z',3,"ls_zsendfinfo: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfinfo: something strange %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zsendfinfo: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zsendfinfo: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -439,23 +439,23 @@ } while (trys < 10); /* - DEBUG(('Z',2,"ls_zsendfinfo: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfinfo: timeout or something other: %ld, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zsendfinfo: timeout or something other: rc=%ld",rc)); + DEBUG(('Z',1,"ls_zsendfinfo: timeout or something other: rc=%ld",rc)); return rc; } /* Intrnal function to process ZRPOS */ int ls_zrpos(int newpos) { - DEBUG(('Z',2,"ls_zrpos: ZRPOS to %d",newpos)); + DEBUG(('Z',1,"ls_zrpos: ZRPOS to %d",newpos)); txpos = newpos; if(txpos == ls_txLastRepos) { if(++ls_txReposCount > 10) { - DEBUG(('Z',3,"ls_zrpos: ZRPOS to %ld limit reached",txpos)); + DEBUG(('Z',1,"ls_zrpos: ZRPOS to %ld limit reached",txpos)); return LSZ_ERROR; } } @@ -468,7 +468,7 @@ clearerr(txfd); /* May be EOF */ if(fseek(txfd,txpos,SEEK_SET)) { - DEBUG(('Z',3,"ls_zrpos: ZRPOS to %ld seek error",txpos)); + DEBUG(('Z',1,"ls_zrpos: ZRPOS to %ld seek error",txpos)); return LSZ_ERROR; } if(ls_txCurBlockSize > 32) @@ -497,20 +497,20 @@ int hlen; int needack = 0; - DEBUG(('Z',2,"ls_zsendfile: %s",f->name)); + DEBUG(('Z',1,"ls_zsendfile: %s",f->name)); switch((rc = ls_zsendfinfo(f,sernum,&txpos))) { case ZRPOS: /* Ok, It's OK! */ - DEBUG(('Z',3,"ls_zsendfile: ZRPOS to %d",txpos)); + DEBUG(('Z',2,"ls_zsendfile: ZRPOS to %d",txpos)); break; case ZSKIP: /* Skip it */ case ZFERR: /* Suspend it */ - DEBUG(('Z',3,"ls_zsendfile: %s",LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfile: %s",LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return rc; case ZABORT: case ZFIN: /* Session is aborted */ - DEBUG(('Z',3,"ls_zsendfile: %s",LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfile: %s",LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); ls_finishsend(); return LSZ_ERROR; default: @@ -518,13 +518,13 @@ { return rc; } - DEBUG(('Z',3,"ls_zsendfile: Strange answer on ZFILE: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfile: Strange answer on ZFILE: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return LSZ_ERROR; } if(fseek(txfd,txpos,SEEK_SET)) { - DEBUG(('Z',3,"ls_zsendfile: Seek to %d error",txpos)); + DEBUG(('Z',1,"ls_zsendfile: Seek to %d error",txpos)); return LSZ_ERROR; } sendf.soff=txpos; @@ -546,7 +546,7 @@ mode = sfStream; } frame = ZCRCW; - DEBUG(('Z',2,"ls_zsendfile: mode %s",sfStream==mode?"stream":(sfBuffered==mode?"buffered":"sliding window"))); + DEBUG(('Z',1,"ls_zsendfile: mode %s",sfStream==mode?"stream":(sfBuffered==mode?"buffered":"sliding window"))); while(!feof(txfd)) { @@ -554,7 +554,7 @@ Also, frame will be ZCRCW, if it is after RPOS */ if(ZCRCW == frame) { - DEBUG(('Z',3,"ls_zsendfile: send ZDATA at %d",txpos)); + DEBUG(('Z',1,"ls_zsendfile: send ZDATA at %d",txpos)); ls_storelong(ls_txHdr,txpos); if((rc=ls_zsendbhdr(ZDATA,4,ls_txHdr))<0) { @@ -565,13 +565,13 @@ bread = fread(txbuf,1,ls_txCurBlockSize,txfd); if(bread < 0) { - DEBUG(('Z',3,"ls_zsendfile: read error at %d",txpos)); + DEBUG(('Z',1,"ls_zsendfile: read error at %d",txpos)); return LSZ_ERROR; } /* Select sub-frame type */ if(bread < ls_txCurBlockSize) /* This is last sub-frame -- EOF */ { - DEBUG(('Z',3,"ls_zsendfile: EOF at %d",txpos+bread)); + DEBUG(('Z',2,"ls_zsendfile: EOF at %d",txpos+bread)); if(sfStream == mode) { frame = ZCRCE; @@ -603,7 +603,7 @@ break; } } - DEBUG(('Z',3,"ls_zsendfile: send at %d",txpos)); + DEBUG(('Z',2,"ls_zsendfile: send at %d",txpos)); if((rc=ls_zsenddata(txbuf,bread,frame))<0) { return rc; @@ -622,14 +622,14 @@ { case ZSKIP: /* They don't need this file */ case ZFERR: /* Problems occured -- suspend file */ - DEBUG(('Z',3,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return rc; case ZACK: /* Ok, position ACK */ - DEBUG(('Z',3,"ls_zsendfile: ACK at %d",ls_fetchlong(ls_rxHdr))); + DEBUG(('Z',2,"ls_zsendfile: ACK at %d",ls_fetchlong(ls_rxHdr))); ls_txLastACK = ls_fetchlong(ls_rxHdr); break; case ZRPOS: /* Repos */ - DEBUG(('Z',3,"ls_zsendfile: ZRPOS")); + DEBUG(('Z',2,"ls_zsendfile: ZRPOS")); if((rc=ls_zrpos(ls_fetchlong(ls_rxHdr)))<0) { return rc; @@ -644,15 +644,15 @@ /* Fall through */ case LSZ_RCDO: case LSZ_ERROR: - DEBUG(('Z',3,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return LSZ_ERROR; case LSZ_TIMEOUT: /* Ok! */ break; default: /* STRANGE! */ /* - DEBUG(('Z',3,"ls_zsendfile: something strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfile: something strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zsendfile: something strange rc=%d",rc)); + DEBUG(('Z',1,"ls_zsendfile: something strange rc=%d",rc)); if(rc < 0) { return rc; @@ -666,7 +666,7 @@ && ++trys < 10); /* trys less than 10 */ if(trys >= 10) { - DEBUG(('Z',3,"ls_zsendfile: Trys when waiting for ACK/RPOS exceed")); + DEBUG(('Z',1,"ls_zsendfile: Trys when waiting for ACK/RPOS exceed")); return LSZ_ERROR; } /* Ok, increase block, if here is MANY good blocks was sent */ @@ -696,10 +696,10 @@ { case ZSKIP: /* They don't need this file */ case ZFERR: /* Problems occured -- suspend file */ - DEBUG(('Z',3,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',2,"ls_zsendfile: %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return rc; case ZRPOS: /* Repos */ - DEBUG(('Z',3,"ls_zsendfile: ZRPOS after ZEOF",ls_fetchlong(ls_rxHdr))); + DEBUG(('Z',2,"ls_zsendfile: ZRPOS after ZEOF",ls_fetchlong(ls_rxHdr))); if((rc=ls_zrpos(ls_fetchlong(ls_rxHdr)))<0) { return rc; @@ -709,20 +709,20 @@ case ZRINIT: /* OK! */ return LSZ_OK; case ZACK: /* ACK for data -- it lost! */ - DEBUG(('Z',3,"ls_zsendfile: ACK after EOF at %d",ls_fetchlong(ls_rxHdr))); + DEBUG(('Z',2,"ls_zsendfile: ACK after EOF at %d",ls_fetchlong(ls_rxHdr))); ls_txLastACK = ls_fetchlong(ls_rxHdr); break; case ZABORT: /* Abort transfer */ case ZFIN: /* Strange? Ok, abort too */ case ZCAN: /* Abort too */ - DEBUG(('Z',3,"ls_zsendfile: after ZEOF %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfile: after ZEOF %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); return LSZ_ERROR; case LSZ_TIMEOUT: /* Ok, here is no header */ - DEBUG(('Z',3,"ls_zsendfile: TIEMOUT after ZEOF")); + DEBUG(('Z',2,"ls_zsendfile: TIEMOUT after ZEOF")); trys++; break; default: /* STRANGE! */ - DEBUG(('Z',3,"ls_zsendfile: something strange after ZEOF %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfile: something strange after ZEOF %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); if(rc<0) { return rc; @@ -734,15 +734,15 @@ while(feof(txfd) && trys < 10); if(feof(txfd)) { - DEBUG(('Z',3,"ls_zsendfile: To many tries waiting for ZEOF ACK")); + DEBUG(('Z',1,"ls_zsendfile: To many tries waiting for ZEOF ACK")); return LSZ_ERROR; } } } /* - DEBUG(('Z',2,"ls_zsendfile: timeout or something else %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zsendfile: timeout or something else %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zsendfile: timeout or something else rc=%ld",rc)); + DEBUG(('Z',1,"ls_zsendfile: timeout or something else rc=%ld",rc)); return rc; } @@ -753,7 +753,7 @@ int hlen; int trys = 0; int retransmit = 1; - DEBUG(('Z',2,"ls_zdonesender")); + DEBUG(('Z',1,"ls_zdonesender")); do { if(retransmit) @@ -778,9 +778,9 @@ break; default: /* - DEBUG(('Z',3,"ls_zdonesender: something strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zdonesender: something strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',3,"ls_zdonesender: something strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zdonesender: something strange rc=%ld",rc)); if(rc<0) { return rc; @@ -790,8 +790,8 @@ } while (trys < 10); /* - DEBUG(('Z',2,"ls_zdonesender: timeout or somethin strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); + DEBUG(('Z',1,"ls_zdonesender: timeout or somethin strange %d, %s",rc,LSZ_FRAMETYPES[rc+LSZ_FTOFFSET])); */ - DEBUG(('Z',2,"ls_zdonesender: timeout or somethin strange rc=%ld",rc)); + DEBUG(('Z',1,"ls_zdonesender: timeout or somethin strange rc=%ld",rc)); return rc; } diff -Bburw ./qico/src/mailer.h ./trunk/src/mailer.h --- ./qico/src/mailer.h 2024-02-01 18:09:52.567866000 +0300 +++ ./trunk/src/mailer.h 2024-02-01 18:10:34.588926000 +0300 @@ -1,6 +1,6 @@ /********************************************************** * protocol definitions - * $Id: mailer.h,v 1.12 2005/05/16 11:17:30 mitry Exp $ + * $Id: mailer.h 18 2010-08-23 15:50:49Z semik $ **********************************************************/ #ifndef __MAILER_H__ #define __MAILER_H__ diff -Bburw ./qico/src/main.c ./trunk/src/main.c --- ./qico/src/main.c 2024-02-01 20:54:38.551005000 +0300 +++ ./trunk/src/main.c 2024-02-01 20:54:27.681194000 +0300 @@ -2,9 +2,12 @@ * qico's main module. **********************************************************/ /* - * $Id: main.c,v 1.24 2005/08/11 19:15:14 mitry Exp $ + * $Id: main.c 48 2014-11-29 09:03:48Z semik $ * * $Log: main.c,v $ + * Revision 1.25 2005/11/28 06:55:41 mitry + * Fixed tty name detection if /dev/ttySX is linked to /dev/tts/X + * * Revision 1.24 2005/08/11 19:15:14 mitry * Changed code a bit * @@ -147,12 +150,11 @@ log_init( cfgs( CFG_LOG ), rnode->tty ); write_log( "exiting with rc=%d", rc ); log_done(); + nodelist_done(); cls_close( ssock ); cls_shutd( lins_sock ); cls_shutd( uis_sock ); - /* - killconfig(); - */ + /* killconfig(); */ exit( rc ); } @@ -206,8 +208,8 @@ static void getsysinfo(void) { - struct utsname uts; char tmp[ MAX_STRING + 1 ]; + struct utsname uts; if ( uname( &uts )) { @@ -229,17 +231,30 @@ TIO tio; sts_t sts; - if ( cfgs( CFG_ROOTDIR ) && ccs[0] ) + if ( cfgs( CFG_ROOTDIR ) && *ccs ) { chdir( ccs ); } rnode = xcalloc( 1, sizeof( ninfo_t )); is_ip = !isatty( 0 ); + if ( is_ip ) + { + rnode->tty = xstrdup( bink ? "binkp" : "tcpip" ); + } + else + { + cs = getenv( "DEVICE" ); + if ( !cs || !*cs ) + { + cs = ttyname( 0 ); + } + rnode->tty = xstrdup( qbasename( cs )); + } - xstrcpy( ip_id, "ipline", 10 ); - rnode->tty = xstrdup( is_ip ? ( bink ? "binkp" : "tcpip" ) : qbasename( ttyname( 0 ))); rnode->options |= O_INB; + xstrcpy( ip_id, "ipline", 10 ); if ( !log_init( cfgs( CFG_LOG ), rnode->tty )) { @@ -293,7 +310,7 @@ } tio_get( tty_fd, &tty_stio ); - memcpy( &tio, &tty_stio, sizeof( TIO )); + memmove( &tio, &tty_stio, sizeof( TIO )); DEBUG(('M',4,"answering: tio_get_speed %d", tio_get_speed( &tio ))); @@ -338,7 +355,6 @@ } title( "Waiting..." ); - vidle(); sline( "" ); outbound_done(); stopit( rc ); diff -Bburw ./qico/src/malloc.c ./trunk/src/malloc.c --- ./qico/src/malloc.c 2024-02-01 20:54:38.551497000 +0300 +++ ./trunk/src/malloc.c 2024-02-01 20:54:27.681693000 +0300 @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: malloc.c,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ */ +/* $Id: malloc.c 18 2010-08-23 15:50:49Z semik $ */ /* written by Jim Meyering */ #include diff -Bburw ./qico/src/md5q.c ./trunk/src/md5q.c --- ./qico/src/md5q.c 2024-02-01 20:54:38.557527000 +0300 +++ ./trunk/src/md5q.c 2024-02-01 20:54:27.704701000 +0300 @@ -24,9 +24,12 @@ */ /* - * $Id: md5q.c,v 1.1 2005/03/28 15:33:56 mitry Exp $ + * $Id: md5q.c 18 2010-08-23 15:50:49Z semik $ * * $Log: md5q.c,v $ + * Revision 1.2 2006/03/11 03:07:32 mitry + * Fixed internal md5 stuff if size of long is 8 bytes. + * * Revision 1.1 2005/03/28 15:33:56 mitry * MD5 logic now in separate files * @@ -39,9 +42,9 @@ #ifndef HAVE_MEMMOVE static void Encode PROTO_LIST -((unsigned char *, UINT4 *, unsigned int)); +((unsigned char *, UINT32 *, unsigned int)); static void Decode PROTO_LIST -((UINT4 *, unsigned char *, unsigned int)); +((UINT32 *, unsigned char *, unsigned int)); static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); #else @@ -83,7 +86,7 @@ #define S43 15 #define S44 21 -static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64])); +static void MD5Transform PROTO_LIST ((UINT32 [4], unsigned char [64])); static unsigned char PADDING[64] = { @@ -107,22 +110,22 @@ Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ - (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) += F ((b), (c), (d)) + (x) + (UINT32)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define GG(a, b, c, d, x, s, ac) { \ - (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) += G ((b), (c), (d)) + (x) + (UINT32)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define HH(a, b, c, d, x, s, ac) { \ - (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) += H ((b), (c), (d)) + (x) + (UINT32)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define II(a, b, c, d, x, s, ac) { \ - (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) += I ((b), (c), (d)) + (x) + (UINT32)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } @@ -160,11 +163,11 @@ index = (unsigned int)((context->count[0] >> 3) & 0x3F); /* Update number of bits */ - if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) + if ((context->count[0] += ((UINT32)inputLen << 3)) < ((UINT32)inputLen << 3)) { context->count[1]++; } - context->count[1] += ((UINT4)inputLen >> 29); + context->count[1] += ((UINT32)inputLen >> 29); partLen = 64 - index; @@ -222,10 +225,10 @@ /* MD5 basic transformation. Transforms state based on block. */ static void MD5Transform (state, block) -UINT4 state[4]; +UINT32 state[4]; unsigned char block[64]; { - UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + UINT32 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; Decode (x, block, 64); @@ -312,12 +315,12 @@ #ifndef HAVE_MEMMOVE -/* Encodes input (UINT4) into output (unsigned char). Assumes len is +/* Encodes input (UINT32) into output (unsigned char). Assumes len is a multiple of 4. */ static void Encode (output, input, len) unsigned char *output; -UINT4 *input; +UINT32 *input; unsigned int len; { unsigned int i, j; @@ -332,19 +335,19 @@ } -/* Decodes input (unsigned char) into output (UINT4). Assumes len is +/* Decodes input (unsigned char) into output (UINT32). Assumes len is a multiple of 4. */ static void Decode (output, input, len) -UINT4 *output; +UINT32 *output; unsigned char *input; unsigned int len; { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | - (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); + output[i] = ((UINT32)input[j]) | (((UINT32)input[j+1]) << 8) | + (((UINT32)input[j+2]) << 16) | (((UINT32)input[j+3]) << 24); } @@ -482,8 +485,9 @@ void md5_cram_set(const unsigned char *challenge) { - long rnd=(long)random(),utm=time(NULL); - long pid=((long)getpid())^((long)random()); + UINT32 rnd = (UINT32)random(), utm = time(NULL); + UINT32 pid = ((UINT32)getpid())^((UINT32)random()); + STORE32(challenge,rnd); STORE16(challenge+4,pid) STORE32(challenge+6,utm); diff -Bburw ./qico/src/md5q.h ./trunk/src/md5q.h --- ./qico/src/md5q.h 2024-02-01 18:09:52.568311000 +0300 +++ ./trunk/src/md5q.h 2024-02-01 18:10:34.581123000 +0300 @@ -24,9 +24,12 @@ */ /* - * $Id: md5q.h,v 1.1 2005/03/28 15:33:56 mitry Exp $ + * $Id: md5q.h 18 2010-08-23 15:50:49Z semik $ * * $Log: md5q.h,v $ + * Revision 1.2 2006/03/11 03:07:32 mitry + * Fixed internal md5 stuff if size of long is 8 bytes. + * * Revision 1.1 2005/03/28 15:33:56 mitry * MD5 logic now in separate files * @@ -34,6 +37,7 @@ #include "config.h" +#include "types.h" #ifndef HAVE_LIBMD @@ -55,22 +59,6 @@ /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; -/* UINT2 defines a two byte word */ -#ifdef UINT16 -typedef UINT16 UINT2; -#else -typedef unsigned short int UINT2; -#endif - -/* UINT4 defines a four byte word */ -#ifdef UINT32 -typedef UINT32 UINT4; -#elif SIZEOF_INT==4 -typedef unsigned int UINT4; -#else -typedef unsigned long int UINT4; -#endif - /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it returns an empty list. @@ -84,8 +72,8 @@ /* MD5 context. */ typedef struct { - UINT4 state[4]; /* state (ABCD) */ - UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + UINT32 state[4]; /* state (ABCD) */ + UINT32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } MD5_CTX; @@ -97,9 +85,10 @@ typedef unsigned char md_caddr_t[MD5_DIGEST_LEN]; -extern void md5_cram_get(const unsigned char *secret, const unsigned char *challenge, - int challenge_length, unsigned char *digest); -extern void md5_cram_set(const unsigned char *challenge); +void md5_cram_get(const unsigned char *, const unsigned char *, + int, unsigned char *); +void md5_cram_set(const unsigned char *); -extern unsigned char *md5_challenge(const unsigned char *buf); -extern char *md5_digest(const char *pwd, const unsigned char *challenge); +unsigned char *md5_challenge(const unsigned char *); +char *md5_digest(const char *, const unsigned char *); + diff -Bburw ./qico/src/memcmp.c ./trunk/src/memcmp.c --- ./qico/src/memcmp.c 2024-02-01 20:54:38.558226000 +0300 +++ ./trunk/src/memcmp.c 2024-02-01 20:54:27.705391000 +0300 @@ -1,4 +1,4 @@ -/* $Id: memcmp.c,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ +/* $Id: memcmp.c 18 2010-08-23 15:50:49Z semik $ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. diff -Bburw ./qico/src/modem.c ./trunk/src/modem.c --- ./qico/src/modem.c 2024-02-01 20:54:38.565324000 +0300 +++ ./trunk/src/modem.c 2024-02-01 20:54:27.720456000 +0300 @@ -2,9 +2,12 @@ * Modem routines. **********************************************************/ /* - * $Id: modem.c,v 1.18 2005/08/16 10:32:19 mitry Exp $ + * $Id: modem.c 48 2014-11-29 09:03:48Z semik $ * * $Log: modem.c,v $ + * Revision 1.19 2006/03/31 19:38:30 mitry + * Fixed typo error + * * Revision 1.18 2005/08/16 10:32:19 mitry * Fixed broken calls of loginscript * @@ -150,7 +153,7 @@ return ME_ATTRS; } - memcpy( &tio, &tty_stio, sizeof( TIO )); + memmove( &tio, &tty_stio, sizeof( TIO )); tio_raw_mode( &tio ); tio_local_mode( &tio, TRUE ); tio_set_speed( &tio, speed ); @@ -881,7 +884,7 @@ signal( SIGPIPE, SIG_IGN ); tty_gothup = FALSE; - memcpy( &tio, &tty_stio, sizeof( TIO )); + memmove( &tio, &tty_stio, sizeof( TIO )); tio_raw_mode( &tio ); tio_set_flow_control( tty_fd, &tio, FLOW_NONE ); diff -Bburw ./qico/src/modem.h ./trunk/src/modem.h --- ./qico/src/modem.h 2024-02-01 18:09:52.568696000 +0300 +++ ./trunk/src/modem.h 2024-02-01 18:10:34.603132000 +0300 @@ -1,5 +1,5 @@ /* - * $Id: modem.h,v 1.1 2005/05/16 20:33:46 mitry Exp $ + * $Id: modem.h 18 2010-08-23 15:50:49Z semik $ * * $Log: modem.h,v $ * Revision 1.1 2005/05/16 20:33:46 mitry diff -Bburw ./qico/src/nodelist.c ./trunk/src/nodelist.c --- ./qico/src/nodelist.c 2024-02-01 20:54:38.582507000 +0300 +++ ./trunk/src/nodelist.c 2024-02-01 20:54:27.737733000 +0300 @@ -2,9 +2,19 @@ * work with nodelists **********************************************************/ /* - * $Id: nodelist.c,v 1.20 2005/08/22 19:41:53 mitry Exp $ + * $Id: nodelist.c 48 2014-11-29 09:03:48Z semik $ * * $Log: nodelist.c,v $ + * Revision 1.23 2007/03/19 23:11:06 mitry + * Fix core dump after internet flags implementation + * + * Revision 1.22 2007/03/07 01:01:27 mitry + * Check that IBN/IFC flags contain port if specified (not host) + * Add support for IP-only nodes phone style via phonetr + * + * Revision 1.21 2007/01/28 17:55:00 mitry + * Add support for INA flag and IBN/IFC optional port number. + * * Revision 1.20 2005/08/22 19:41:53 mitry * Fixed detection of stale index * @@ -592,7 +602,7 @@ int ptr; char ndl_str[MAX_STRING + 5], *p, *t; idx_t *ndl_i; - ninfo_t *nlent; + ninfo_t *nlent = NULL; ndl_field_t field = NDL_STATUS; DEBUG(('N',1,"ndl_query")); @@ -680,18 +690,27 @@ case NDL_FLAGS: default: - if ( nlent->type == NT_PVT ) - { + #ifdef WITH_BINKP - if ( strstr( p, "IBN" )) + if ( strncasecmp( p, "IBN", 3 ) == 0 ) { nlent->opt |= MO_BINKP; + if ( strlen( p ) > 4 && p[3] == ':' && isdigit((int) p[4] )) + { + nlent->bp_port = atoi( p + 4 ); } + DEBUG(('N',4,"ndl_query: BINKP '%s:%d'",p,nlent->bp_port)); + } #endif - if ( strstr( p, "IFC" )) + + if ( strncasecmp( p, "IFC", 3 ) == 0 ) { nlent->opt |= MO_IFC; + if ( strlen( p ) > 4 && p[3] == ':' && isdigit((int) p[4] )) + { + nlent->bp_port = atoi( p + 4 ); } + DEBUG(('N',4,"ndl_query: IFCICO '%s:%d'",p,nlent->ifc_port)); } if (( p[0] == 'T' && strlen( p ) == 3 ) @@ -699,11 +718,18 @@ { nlent->wtime = xstrdup( p ); } + + if (( strncasecmp( p, "INA:", 4 ) == 0 ) + && ( strlen( p ) > 4 )) + { + nlent->host = xstrdup( p + 4 ); + DEBUG(('N',4,"ndl_query: INA '%s'",nlent->host)); } + } field++; } - if ( nlent->opt ) + if ( nlent->opt && nlent->host == NULL ) { nlent->host = xstrdup( ftnaddrtoia( addr )); } @@ -1065,7 +1091,7 @@ } else if ( firsteq >= 0 ) { - memcpy( &ies[firsteq + 1], &ies[lasteq + 1], + memmove( &ies[firsteq + 1], &ies[lasteq + 1], sizeof( *ies ) * (total - lasteq - 1)); firsteq = lasteq = -1; deleted++; @@ -1681,7 +1707,7 @@ q->nhids = 0; } - d = xmalloc( sizeof( dialine_t )); + d = xcalloc( 1, sizeof( dialine_t )); /* Insert ind _end_ of list */ c = q->hiddens; @@ -1699,9 +1725,11 @@ } d->num = ++q->nhids; + /* d->phone = d->timegaps = d->host = NULL; d->next = NULL; d->flags = 0; + */ pstr = p = xstrdup( skip_blanks( sbs->str )); while(( t = strsep( &p, " " ))) @@ -1742,10 +1770,10 @@ ndl_log( "unknown subst flag: '%s'", t ); } - if ( d->flags ) + if ( d->flags && d->phone ) { - d->host = xstrdup( d->phone ? d->phone : ftnaddrtoia( &sbs->addr )); - xfree( d->phone ); + d->host = d->phone; + d->phone = NULL; DEBUG(('N',3,"parsesubst: host '%s'", d->host )); } break; @@ -1794,14 +1822,33 @@ else if ( from_nl && from_nl->phone ) { xfree( nl->phone ); + phonetrans( &from_nl->phone, cfgsl( CFG_PHONETR )); + if ( from_nl->phone && *from_nl->phone == '\0' ) + { + nl->type = NT_PVT; + } + else + { nl->phone = xstrdup( from_nl->phone ); - phonetrans( &nl->phone, cfgsl( CFG_PHONETR )); } + } if ( d->host ) { xfree( nl->host ); nl->host = xstrdup( d->host ); + } + else if ( from_nl && from_nl->host ) + { + xfree( nl->host ); + nl->host = xstrdup( from_nl->host ); + nl->ifc_port = from_nl->ifc_port; + nl->bp_port = from_nl->bp_port; + } + else + { + xfree( nl->host ); + nl->host = xstrdup( ftnaddrtoia( &nl->addrs->addr )); } if ( d->timegaps ) diff -Bburw ./qico/src/nodelist.h ./trunk/src/nodelist.h --- ./qico/src/nodelist.h 2024-02-01 18:09:52.569065000 +0300 +++ ./trunk/src/nodelist.h 2024-02-01 18:10:34.586520000 +0300 @@ -1,5 +1,5 @@ /* - * $Id: nodelist.h,v 1.4 2005/08/11 19:06:53 mitry Exp $ + * $Id: nodelist.h 18 2010-08-23 15:50:49Z semik $ * * $Log: nodelist.h,v $ * Revision 1.4 2005/08/11 19:06:53 mitry diff -Bburw ./qico/src/outbound.c ./trunk/src/outbound.c --- ./qico/src/outbound.c 2024-02-01 20:54:38.592166000 +0300 +++ ./trunk/src/outbound.c 2024-02-01 20:54:27.753178000 +0300 @@ -2,9 +2,12 @@ * Outbound management. **********************************************************/ /* - * $Id: outbound.c,v 1.21 2005/08/10 19:45:50 mitry Exp $ + * $Id: outbound.c 18 2010-08-23 15:50:49Z semik $ * * $Log: outbound.c,v $ + * Revision 1.22 2006/04/14 18:51:45 mitry + * Changed a bit node (un)lock logic. + * * Revision 1.21 2005/08/10 19:45:50 mitry * Added param to qscandir() to return full path with file name * @@ -339,7 +347,8 @@ { if ( sts_base ) { - snprintf( out_internal_tmp, MAX_PATH, "%s/%d.%d.%d.%d.qst", sts_base, fa->z, fa->n, fa->f, fa->p); + snprintf( out_internal_tmp, MAX_PATH, "%s/%d.%d.%d.%d.qst", + sts_base, fa->z, fa->n, fa->f, fa->p); return out_internal_tmp; } @@ -700,6 +710,20 @@ } +static void out_unlock(int type, const ftnaddr_t *adr, int l) +{ + if ( l == LCK_s || l == LCK_x ) + { + lunlink( get_busy_name( type, adr, 'b' )); + } + + if ( l == LCK_c || l == LCK_x ) + { + lunlink( get_busy_name( type, adr, 'c' )); + } +} + + /* * Returns whether the address is busy. 0 == free, 1 == busy. */ @@ -729,56 +753,71 @@ } -int outbound_locknode(const ftnaddr_t *addr, int l) +int outbound_locknode(ftnaddr_t *addr, int l) { - int rc = 0; + int rc = 0, x = 0; - if ( aso_base && out_lock( ASO, addr, l )) + if ( aso_base ) { + x |= ASO; + if ( out_lock( ASO, addr, l )) + { rc |= ASO; } + } - if ( bso_base && out_lock( BSO, addr, l )) + if ( x != rc ) { + return 0; + } + + if ( bso_base ) + { + if ( out_lock( BSO, addr, l )) + { rc |= BSO; } + else if ( x ) + { + out_unlock( ASO, addr, l ); + rc = 0; + } + } + addr->locked = rc; + + DEBUG(('S',1,"outbound_locknode: %d:%d/%d.%d, locked: %d", + addr->z, addr->n, addr->f, addr->p, addr->locked)); return rc; } -int outbound_unlocknode(const ftnaddr_t *addr, int l) +int outbound_unlocknode(ftnaddr_t *addr, int l) { - if ( l == LCK_t ) + DEBUG(('S',1,"outbound_unlocknode: %d:%d/%d.%d, locked: %d", + addr->z, addr->n, addr->f, addr->p, addr->locked)); + + if ( !addr->locked ) { return 1; } - if ( aso_base ) + addr->locked = 0; + + if ( l == LCK_t ) { - if ( get_busy_name( ASO, addr, 'b' )) - { - lunlink( out_internal_tmp ); + return 1; } - if ( get_busy_name( ASO, addr, 'c' )) + if ( aso_base ) { - lunlink( out_internal_tmp ); + out_unlock( ASO, addr, l ); } - } if ( bso_base ) { - if ( get_busy_name( BSO, addr, 'b' )) - { - lunlink( out_internal_tmp ); - } + out_unlock( BSO, addr, l ); - if ( get_busy_name( BSO, addr, 'c' )) - { - lunlink( out_internal_tmp ); - } - if ( addr->z != bso_defzone ) { rmdirs( out_internal_tmp ); @@ -903,9 +942,9 @@ int outbound_getstatus(const ftnaddr_t *fa, sts_t *st) { int rc; - FILE *f; char *name = get_status_name( fa ); char tmp[MAX_PATH + 5]; + FILE *f; tmp[0] = '\0'; @@ -922,8 +961,12 @@ tmp ); fclose( f ); - if ( rc < 8 ) +#define RESMASK ( 0x0004 | 0x0008 ) + + if ( rc & RESMASK ) { + if ( rc == 4 ) + { memset( &st->bp, 0, sizeof( st->bp )); } else if ( *tmp ) @@ -931,12 +974,12 @@ st->bp.name = xstrdup( tmp ); } - if ( rc == 4 || rc == 8 ) - { return 1; } - write_log( "status file %s corrupted", name ); - xfree( st->bp.name ); + write_log( "status file %s is corrupted!", name ); + +#undef RESMASK + } } memset( st, 0, sizeof( sts_t )); @@ -978,7 +1021,6 @@ case '^': /* kill */ case '#': /* trunc */ - case ' ': /* filename starting with directive */ p++; default: diff -Bburw ./qico/src/perl.c ./trunk/src/perl.c --- ./qico/src/perl.c 2024-02-01 20:54:38.599199000 +0300 +++ ./trunk/src/perl.c 2024-02-01 20:54:27.760024000 +0300 @@ -2,7 +2,7 @@ * perl support **********************************************************/ /* - * $Id: perl.c,v 1.8 2005/08/22 17:17:18 mitry Exp $ + * $Id: perl.c 18 2010-08-23 15:50:49Z semik $ * * $Log: perl.c,v $ * Revision 1.8 2005/08/22 17:17:18 mitry diff -Bburw ./qico/src/protfm.c ./trunk/src/protfm.c --- ./qico/src/protfm.c 2024-02-01 20:54:38.606438000 +0300 +++ ./trunk/src/protfm.c 2024-02-01 20:54:27.767113000 +0300 @@ -2,9 +2,12 @@ * common protocols' file management ******************************************************************/ /* - * $Id: protfm.c,v 1.18 2005/08/22 17:16:05 mitry Exp $ + * $Id: protfm.c 18 2010-08-23 15:50:49Z semik $ * * $Log: protfm.c,v $ + * Revision 1.19 2006/07/22 13:13:01 mitry + * Use file times in GMT on some protocols. + * * Revision 1.18 2005/08/22 17:16:05 mitry * Removed useless static function * @@ -150,7 +153,7 @@ recvf.start=time(NULL); xfree(recvf.fname); recvf.fname=xstrdup(bn); - recvf.mtime=rtime-gmtoff(recvf.start); + recvf.mtime = rtime - ( ftime_is_gmt ? 0 : gmtoff( recvf.start )); recvf.ftot=rsize; if(recvf.toff+rsize > recvf.ttot) { @@ -421,7 +424,7 @@ sendf.ftot=sb.st_size; sendf.foff=sendf.soff=0; sendf.start=time(NULL); - sendf.mtime=sb.st_mtime+gmtoff(sendf.start); + sendf.mtime = sb.st_mtime + ( ftime_is_gmt ? 0 : gmtoff( sendf.start )); if(sendf.toff+sb.st_size > sendf.ttot) { sendf.ttot+=sb.st_size; diff -Bburw ./qico/src/qcc.c ./trunk/src/qcc.c --- ./qico/src/qcc.c 2024-02-01 20:54:38.630700000 +0300 +++ ./trunk/src/qcc.c 2024-02-01 20:54:27.790403000 +0300 @@ -2,9 +2,12 @@ * qico control center. **********************************************************/ /* - * $Id: qcc.c,v 1.16 2005/08/12 16:40:51 mitry Exp $ + * $Id: qcc.c 48 2014-11-29 09:03:48Z semik $ * * $Log: qcc.c,v $ + * Revision 1.17 2006/07/18 22:30:09 mitry + * Delayed cyrillization + * * Revision 1.16 2005/08/12 16:40:51 mitry * Added wktime_str() * @@ -482,7 +485,7 @@ tim=0; } hr=tim/3600; - snprintf(ts,10,"%02ld:%02ld:%02ld",hr,tim/60-hr*60,tim%60); + snprintf(ts,10,"%02ld:%02i:%02i",hr,(int)(tim/60-hr*60),tim%60); return ts; } @@ -1233,8 +1236,7 @@ { myaddr="0:0/0"; } -rei: - zone=strtoul(myaddr,&nm,10); +rei: zone=strtoul(myaddr,&nm,10); net=strtoul(nm+1,&nm,10); node=strtoul(nm+1,&nm,10); if(*nm=='.') @@ -1403,7 +1405,7 @@ #endif if(bbx&&rc>=3&&buf[2]<8) { - memcpy(bbx,buf,rc); + memmove(bbx,buf,rc); return 0; } if(bbx&&allslots==-9) @@ -1695,7 +1697,7 @@ } else if(strlen(slots[rc]->cl)>=(MH*(CHH-1))) { - memcpy(slots[rc]->cl,slots[rc]->cl+CHH,strlen(slots[rc]->cl)-(CHH-2)); + memmove(slots[rc]->cl,slots[rc]->cl+CHH,strlen(slots[rc]->cl)-(CHH-2)); slots[rc]->chats=MH; } break; @@ -1781,9 +1783,9 @@ int main(int argc, char **argv, char **envp) { - int len,ch,rc,c; + int len,ch,rc; struct tm *tt; - char buf[4096],*bf,*port=NULL,*addr=NULL,*pwd=NULL; + char buf[4096],*bf,c,*port=NULL,*addr=NULL,*pwd=NULL; unsigned char digest[16]= {0}; fd_set rfds; time_t tim; @@ -1839,8 +1842,6 @@ #ifdef HAVE_SETLOCALE setlocale(LC_ALL, "C"); #endif - /*cyr*/ printf("\033(K"); - fflush(stdout); signal(SIGALRM, sighup); alarm(6); @@ -1877,7 +1878,7 @@ STORE16(buf,0); buf[2]=QR_STYPE; buf[3]='e';/*events*/ - memcpy(buf+4,digest,16); + memmove(buf+4,digest,16); snprintf(buf+20,MSG_BUFFER-21,"qcc-%s",version); xcmd(buf,QR_STYPE,strlen(buf+20)+20); tim=time(NULL)+6; @@ -1892,6 +1893,8 @@ signal(SIGINT,sighup); signal(SIGKILL,sighup); srand(time(NULL)); + /*cyr*/ printf("\033(K"); + fflush(stdout); initscreen(); currslot=-1; allslots=0; diff -Bburw ./qico/src/qcconst.h ./trunk/src/qcconst.h --- ./qico/src/qcconst.h 2024-02-01 18:09:52.570196000 +0300 +++ ./trunk/src/qcconst.h 2024-02-01 18:10:34.582899000 +0300 @@ -1,6 +1,6 @@ /********************************************************** * for exchange with qcc - * $Id: qcconst.h,v 1.6 2005/05/06 20:46:23 mitry Exp $ + * $Id: qcconst.h 18 2010-08-23 15:50:49Z semik $ **********************************************************/ #ifndef __QCCONST_H__ #define __QCCONST_H__ diff -Bburw ./qico/src/qconf.x ./trunk/src/qconf.x --- ./qico/src/qconf.x 2024-02-01 18:09:52.570447000 +0300 +++ ./trunk/src/qconf.x 2024-02-01 18:10:34.587700000 +0300 @@ -1,6 +1,6 @@ #********************************************************** #* config keywords definition -#* $Id: qconf.x,v 1.11 2005/08/16 19:15:05 mitry Exp $ +#* $Id: qconf.x 18 2010-08-23 15:50:49Z semik $ #********************************************************** address,C_ADDRL,1,NULL aftermail,C_STR,0,NULL diff -Bburw ./qico/src/qctl.c ./trunk/src/qctl.c --- ./qico/src/qctl.c 2024-02-01 20:54:38.637323000 +0300 +++ ./trunk/src/qctl.c 2024-02-01 20:54:27.811195000 +0300 @@ -2,7 +2,7 @@ * command-line qico control tool ***************************************************************************/ /* - * $Id: qctl.c,v 1.12 2005/08/16 10:36:18 mitry Exp $ + * $Id: qctl.c 18 2010-08-23 15:50:49Z semik $ * * $Log: qctl.c,v $ * Revision 1.12 2005/08/16 10:36:18 mitry @@ -231,10 +231,10 @@ int main(int argc, char **argv,char **envp) { - int action=-1, kfs=0, len=0,lkfs,rc=1,c; + int action=-1, kfs=0, len=0,lkfs,rc=1; char filename[MAX_PATH]; unsigned char digest[16]= {0}; - char *str=NULL,flv='?',*port=NULL,*addr=NULL,*tty=NULL,*pwd=NULL; + char c,*str=NULL,flv='?',*port=NULL,*addr=NULL,*tty=NULL,*pwd=NULL; struct stat filestat; #ifdef HAVE_SETLOCALE setlocale(LC_ALL, "C"); diff -Bburw ./qico/src/qipc.c ./trunk/src/qipc.c --- ./qico/src/qipc.c 2024-02-01 20:54:38.654003000 +0300 +++ ./trunk/src/qipc.c 2024-02-01 20:54:27.813800000 +0300 @@ -2,7 +2,7 @@ * helper stuff for client/server iface. **********************************************************/ /* - * $Id: qipc.c,v 1.4 2005/05/16 11:17:30 mitry Exp $ + * $Id: qipc.c 48 2014-11-29 09:03:48Z semik $ * * $Log: qipc.c,v $ * Revision 1.4 2005/05/16 11:17:30 mitry @@ -56,7 +56,7 @@ buf[5] = 'T'; } } - memcpy( buf + 4 + linelen, buff, len ); + memmove( buf + 4 + linelen, buff, len ); if ( xsend_cb( ssock, buf, 4 + linelen + len ) < 0 ) { if ( errno == ECONNREFUSED ) diff -Bburw ./qico/src/qipc.h ./trunk/src/qipc.h --- ./qico/src/qipc.h 2024-02-01 18:09:52.570741000 +0300 +++ ./trunk/src/qipc.h 2024-02-01 18:10:34.587420000 +0300 @@ -1,5 +1,5 @@ /* - * $Id: qipc.h,v 1.3 2005/05/16 11:17:30 mitry Exp $ + * $Id: qipc.h 18 2010-08-23 15:50:49Z semik $ * * $Log: qipc.h,v $ * Revision 1.3 2005/05/16 11:17:30 mitry Only in ./qico/src: qipc_common.c Only in ./qico/src: qipc_server.c Only in ./qico/src: qipcng.h diff -Bburw ./qico/src/qslib.c ./trunk/src/qslib.c --- ./qico/src/qslib.c 2024-02-01 20:54:38.660081000 +0300 +++ ./trunk/src/qslib.c 2024-02-01 20:54:27.819807000 +0300 @@ -2,7 +2,7 @@ * functions for all qico related programs **********************************************************/ /* - * $Id: qslib.c,v 1.12 2005/08/12 16:40:51 mitry Exp $ + * $Id: qslib.c 48 2014-11-29 09:03:48Z semik $ * * $Log: qslib.c,v $ * Revision 1.12 2005/08/12 16:40:51 mitry @@ -415,10 +415,10 @@ struct tm gt; time_t gmt; - memcpy( >, gmtime( &tt ), sizeof( struct tm )); + memmove( >, gmtime( &tt ), sizeof( struct tm )); gt.tm_isdst = 0; gmt = mktime( > ); - memcpy( >, localtime( &tt ), sizeof( struct tm )); + memmove( >, localtime( &tt ), sizeof( struct tm )); gt.tm_isdst = 0; return mktime( > ) - gmt; } diff -Bburw ./qico/src/qslib.h ./trunk/src/qslib.h --- ./qico/src/qslib.h 2024-02-01 18:09:52.571457000 +0300 +++ ./trunk/src/qslib.h 2024-02-01 18:10:34.590110000 +0300 @@ -1,5 +1,5 @@ /* - * $Id: qslib.h,v 1.14 2005/08/12 16:40:51 mitry Exp $ + * $Id: qslib.h 18 2010-08-23 15:50:49Z semik $ * * $Log: qslib.h,v $ * Revision 1.14 2005/08/12 16:40:51 mitry diff -Bburw ./qico/src/queue.c ./trunk/src/queue.c --- ./qico/src/queue.c 2024-02-01 20:54:38.664719000 +0300 +++ ./trunk/src/queue.c 2024-02-01 20:54:27.824363000 +0300 @@ -2,7 +2,7 @@ * Queue operations **********************************************************/ /* - * $Id: queue.c,v 1.12 2005/08/18 16:11:22 mitry Exp $ + * $Id: queue.c 18 2010-08-23 15:50:49Z semik $ * * $Log: queue.c,v $ * Revision 1.12 2005/08/18 16:11:22 mitry diff -Bburw ./qico/src/replace.h ./trunk/src/replace.h --- ./qico/src/replace.h 2024-02-01 18:09:52.571666000 +0300 +++ ./trunk/src/replace.h 2024-02-01 18:10:34.588643000 +0300 @@ -1,6 +1,6 @@ /*************************************************************************** * Replace functions declarations - * $Id: replace.h,v 1.5 2005/05/17 18:17:42 mitry Exp $ + * $Id: replace.h 18 2010-08-23 15:50:49Z semik $ ***************************************************************************/ #ifndef __REPLACE_H__ #define __REPLACE_H__ diff -Bburw ./qico/src/session.c ./trunk/src/session.c --- ./qico/src/session.c 2024-02-01 20:54:38.676584000 +0300 +++ ./trunk/src/session.c 2024-02-01 20:54:27.836215000 +0300 @@ -2,9 +2,18 @@ * Session control. **********************************************************/ /* - * $Id: session.c,v 1.25 2005/08/11 19:06:53 mitry Exp $ + * $Id: session.c 18 2010-08-23 15:50:49Z semik $ * * $Log: session.c,v $ + * Revision 1.28 2006/07/22 13:13:01 mitry + * Use file times in GMT on some protocols. + * + * Revision 1.27 2006/07/10 16:16:30 mitry + * Binkp: prevent infinite calling system if some files were suspended + * + * Revision 1.26 2005/09/06 20:42:04 mitry + * Added macros to qpreset() calls + * * Revision 1.25 2005/08/11 19:06:53 mitry * Added new macro MAILHOURS * @@ -441,7 +450,7 @@ sline("Done zsend..."); rc=zmodem_senddone(); - qpreset(1); + qpreset( QPR_SEND ); return(rc<0); } @@ -450,7 +459,7 @@ int rc; write_log("wazoo receive"); rc=zmodem_receive(cfgs(CFG_INBOUND),zap); - qpreset(0); + qpreset( QPR_RECV ); return(rc==RCDO||rc==ERROR); } @@ -1016,8 +1025,8 @@ } ); qemsisend( rnode ); - qpreset( 0 ); - qpreset( 1 ); + qpreset( QPR_RECV ); + qpreset( QPR_SEND ); switch ( proto ) { @@ -1153,6 +1162,8 @@ signal( SIGINT, tty_sighup ); signal( SIGCHLD, SIG_DFL ); + ftime_is_gmt = ( type == SESSION_BINKP ); + switch ( type ) { case SESSION_AUTO: @@ -1279,5 +1290,6 @@ xfree( remote_id ); - return ( rc & ~S_ADDTRY ); + /* return ( rc & ~S_ADDTRY ); */ + return rc; } diff -Bburw ./qico/src/slists.c ./trunk/src/slists.c --- ./qico/src/slists.c 2024-02-01 20:54:38.678717000 +0300 +++ ./trunk/src/slists.c 2024-02-01 20:54:27.838328000 +0300 @@ -2,9 +2,12 @@ * work with various lists. **********************************************************/ /* - * $Id: slists.c,v 1.3 2005/05/16 11:17:30 mitry Exp $ + * $Id: slists.c 18 2010-08-23 15:50:49Z semik $ * * $Log: slists.c,v $ + * Revision 1.4 2006/04/14 18:49:03 mitry + * Changed return types. + * * Revision 1.3 2005/05/16 11:17:30 mitry * Updated function prototypes. Changed code a bit. * @@ -125,7 +128,7 @@ } -void falist_add(falist_t **l, const ftnaddr_t *a) +falist_t *falist_add(falist_t **l, const ftnaddr_t *a) { falist_t **t; @@ -134,6 +137,8 @@ *t = (falist_t *) xmalloc( sizeof( falist_t )); (*t)->next = NULL; addr_cpy( &(*t)->addr, a ); + + return *t; } @@ -162,7 +167,7 @@ } -void faslist_add(faslist_t **l, const char *s, const ftnaddr_t *a) +faslist_t *faslist_add(faslist_t **l, const char *s, const ftnaddr_t *a) { faslist_t **t; @@ -172,6 +177,8 @@ (*t)->next = NULL; (*t)->str = xstrdup( s ); addr_cpy( &(*t)->addr, a ); + + return *t; } diff -Bburw ./qico/src/slists.h ./trunk/src/slists.h --- ./qico/src/slists.h 2024-02-01 18:09:52.572087000 +0300 +++ ./trunk/src/slists.h 2024-02-01 18:10:34.591317000 +0300 @@ -2,9 +2,12 @@ * for work with various lists. **********************************************************/ /* - * $Id: slists.h,v 1.3 2005/05/16 11:17:30 mitry Exp $ + * $Id: slists.h 18 2010-08-23 15:50:49Z semik $ * * $Log: slists.h,v $ + * Revision 1.4 2006/04/14 18:49:03 mitry + * Changed return types. + * * Revision 1.3 2005/05/16 11:17:30 mitry * Updated function prototypes. Changed code a bit. * @@ -52,10 +55,10 @@ aslist_t *aslist_add(aslist_t **, const char *, const char *); aslist_t *aslist_find(aslist_t *, const char *); void aslist_kill(aslist_t **); -void falist_add(falist_t **, const ftnaddr_t *); +falist_t *falist_add(falist_t **, const ftnaddr_t *); falist_t *falist_find(falist_t *, const ftnaddr_t *); void falist_kill(falist_t **); -void faslist_add(faslist_t **, const char *, const ftnaddr_t *); +faslist_t *faslist_add(faslist_t **, const char *, const ftnaddr_t *); void faslist_kill(faslist_t **); #endif diff -Bburw ./qico/src/strcasestr.c ./trunk/src/strcasestr.c --- ./qico/src/strcasestr.c 2024-02-01 20:54:38.679497000 +0300 +++ ./trunk/src/strcasestr.c 2024-02-01 20:54:27.839110000 +0300 @@ -1,4 +1,4 @@ -/* $Id: strcasestr.c,v 1.2 2005/03/29 20:39:46 mitry Exp $ */ +/* $Id: strcasestr.c 18 2010-08-23 15:50:49Z semik $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. diff -Bburw ./qico/src/strcspn.c ./trunk/src/strcspn.c --- ./qico/src/strcspn.c 2024-02-01 20:54:38.680222000 +0300 +++ ./trunk/src/strcspn.c 2024-02-01 20:54:27.839816000 +0300 @@ -1,4 +1,4 @@ -/* $Id: strcspn.c,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ +/* $Id: strcspn.c 18 2010-08-23 15:50:49Z semik $ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. diff -Bburw ./qico/src/strsep.c ./trunk/src/strsep.c --- ./qico/src/strsep.c 2024-02-01 20:54:38.681069000 +0300 +++ ./trunk/src/strsep.c 2024-02-01 20:54:27.840655000 +0300 @@ -1,4 +1,4 @@ -/* $Id: strsep.c,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ +/* $Id: strsep.c 18 2010-08-23 15:50:49Z semik $ * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. diff -Bburw ./qico/src/tcp.c ./trunk/src/tcp.c --- ./qico/src/tcp.c 2024-02-01 20:54:38.686569000 +0300 +++ ./trunk/src/tcp.c 2024-02-01 20:54:27.854812000 +0300 @@ -2,9 +2,15 @@ * ip routines **********************************************************/ /* - * $Id: tcp.c,v 1.13 2005/08/16 10:32:19 mitry Exp $ + * $Id: tcp.c 48 2014-11-29 09:03:48Z semik $ * * $Log: tcp.c,v $ + * Revision 1.15 2007/01/28 17:55:00 mitry + * Add support for INA flag and IBN/IFC optional port number. + * + * Revision 1.14 2005/12/03 02:25:03 mitry + * Fixed socks5 authentication + * * Revision 1.13 2005/08/16 10:32:19 mitry * Fixed broken calls of loginscript * @@ -285,7 +291,7 @@ } buf[1] = i; - memcpy( buf + 2, auth, i ); + memmove( buf + 2, auth, i ); i += 2; if ( !n ) { @@ -293,10 +299,11 @@ } else { - n++; - buf[i] = strlen( n ); - xstrcpy( buf + i + 1, n, buf[i] ); - i += buf[i] + 1; + n = skip_blanks( n ); + rc = strlen( n ); + buf[i++] = rc; + memmove( buf + i, n, rc ); + i += rc; } PUTBLK( (unsigned char*) buf, i ); @@ -336,7 +343,7 @@ return (FALSE); } - memcpy( buf + 4, he->h_addr, 4 ); + memmove( buf + 4, he->h_addr, 4 ); buf[8] = '\0'; PUTBLK( (unsigned char*) buf, 9); } @@ -349,7 +356,7 @@ if ( isdigit( *name ) && (da.s_addr = inet_addr( name )) != -1 ) { buf[3] = 1; - memcpy( buf + 4, &da, 4 ); + memmove( buf + 4, &da, 4 ); n = buf + 8; } else @@ -357,7 +364,7 @@ buf[3] = 3; i = strlen( name ); buf[4] = (unsigned char) i; - memcpy( buf + 5, name, i ); + memmove( buf + 5, name, i ); n = buf + 5 + i; } @@ -609,36 +616,36 @@ int tcp_dial(ftnaddr_t *fa, char *host) { int fd, s = 0; - char *p = NULL, *t = NULL; + char *proxy = NULL, *t = NULL; if ( cfgs( CFG_PROXY )) { - p = xstrdup( ccs ); + proxy = xstrdup( ccs ); } else if( cfgs( CFG_SOCKS )) { - p = xstrdup( ccs ); + proxy = xstrdup( ccs ); s = 1; } - if ( p && ( t = strchr( p, ' ' ))) + if ( proxy && ( t = strchr( proxy, ' ' ))) { *t = '\0'; } write_log("connecting to %s at %s%s%s%s [%s]", ftnaddrtoa( fa ), host, - p ? " via " : "", - p ? ( s ? "socks " : "proxy " ) : "", - SS( p ), + proxy ? " via " : "", + proxy ? ( s ? "socks " : "proxy " ) : "", + SS( proxy ), bink ? "binkp" : "ifcico" ); if ( t ) { *t = ' '; } - fd = tcp_connect( host, p, s ); - xfree( p ); + fd = tcp_connect( host, proxy, s ); + xfree( proxy ); return fd; } diff -Bburw ./qico/src/tcp.h ./trunk/src/tcp.h --- ./qico/src/tcp.h 2024-02-01 18:09:52.572515000 +0300 +++ ./trunk/src/tcp.h 2024-02-01 18:10:34.598872000 +0300 @@ -2,7 +2,7 @@ * IP tools defines. ******************************************************************/ /* - * $Id: tcp.h,v 1.2 2005/05/06 20:47:37 mitry Exp $ + * $Id: tcp.h 30 2012-11-20 09:29:34Z semik $ * * $Log: tcp.h,v $ * Revision 1.2 2005/05/06 20:47:37 mitry Only in ./qico/src: tcpp.c diff -Bburw ./qico/src/timer.h ./trunk/src/timer.h --- ./qico/src/timer.h 2024-02-01 18:09:52.572659000 +0300 +++ ./trunk/src/timer.h 2024-02-01 18:10:34.606962000 +0300 @@ -2,7 +2,7 @@ * timer math **********************************************************/ /* - * $Id: timer.h,v 1.4 2005/06/03 14:13:49 mitry Exp $ + * $Id: timer.h 18 2010-08-23 15:50:49Z semik $ * * $Log: timer.h,v $ * Revision 1.4 2005/06/03 14:13:49 mitry diff -Bburw ./qico/src/tools.c ./trunk/src/tools.c --- ./qico/src/tools.c 2024-02-01 20:54:38.697940000 +0300 +++ ./trunk/src/tools.c 2024-02-01 20:54:27.863061000 +0300 @@ -2,9 +2,12 @@ * Misc stuff. **********************************************************/ /* - * $Id: tools.c,v 1.12 2005/08/10 19:45:50 mitry Exp $ + * $Id: tools.c 48 2014-11-29 09:03:48Z semik $ * * $Log: tools.c,v $ + * Revision 1.13 2006/03/31 19:41:37 mitry + * Don't ignore return value of unlink() + * * Revision 1.12 2005/08/10 19:45:50 mitry * Added param to qscandir() to return full path with file name * @@ -213,8 +216,8 @@ { size_t lent = strlen( mapto ); - memcpy( newfn, mapto, lent ); - memcpy( newfn + lent, fname + lenf, + memmove( newfn, mapto, lent ); + memmove( newfn + lent, fname + lenf, MAX_PATH - lent - strlen( fname + lenf )); break; } @@ -531,7 +534,7 @@ if ( fname && *fname ) { - unlink( fname ); + rc = unlink( fname ); } if ( rc < 0 && errno != ENOENT ) diff -Bburw ./qico/src/tools.h ./trunk/src/tools.h --- ./qico/src/tools.h 2024-02-01 18:09:52.572984000 +0300 +++ ./trunk/src/tools.h 2024-02-01 18:10:34.580543000 +0300 @@ -1,5 +1,5 @@ /* - * $Id: tools.h,v 1.12 2005/08/10 19:45:50 mitry Exp $ + * $Id: tools.h 18 2010-08-23 15:50:49Z semik $ * * $Log: tools.h,v $ * Revision 1.12 2005/08/10 19:45:50 mitry diff -Bburw ./qico/src/tty.c ./trunk/src/tty.c --- ./qico/src/tty.c 2024-02-01 20:54:38.710047000 +0300 +++ ./trunk/src/tty.c 2024-02-01 20:54:27.876724000 +0300 @@ -10,9 +10,12 @@ **********************************************************/ /* - * $Id: tty.c,v 1.27 2005/08/16 20:23:23 mitry Exp $ + * $Id: tty.c 48 2014-11-29 09:03:48Z semik $ * * $Log: tty.c,v $ + * Revision 1.28 2006/04/24 15:04:21 mitry + * Fixed typo error. + * * Revision 1.27 2005/08/16 20:23:23 mitry * Pre 0.57.1: minor changes * @@ -790,7 +793,7 @@ if ( tty_status == TTY_SUCCESS ) { size_t n = MIN( (size_t) tty_tx_free, nbytes); - memcpy( tty_tx_buf, nptr, n ); + memmove( tty_tx_buf, nptr, n ); tty_tx_free -= n; nbytes -= n; nptr += n; @@ -800,7 +803,7 @@ } else { - memcpy( (void *) (tty_tx_buf + txptr), nptr, nbytes ); + memmove( (void *) (tty_tx_buf + txptr), nptr, nbytes ); tty_tx_free -= nbytes; nbytes = 0; } diff -Bburw ./qico/src/tty.h ./trunk/src/tty.h --- ./qico/src/tty.h 2024-02-01 18:09:52.573460000 +0300 +++ ./trunk/src/tty.h 2024-02-01 18:10:34.590672000 +0300 @@ -1,4 +1,4 @@ -/* $Id: tty.h,v 1.16 2005/05/16 20:33:46 mitry Exp $ */ +/* $Id: tty.h 18 2010-08-23 15:50:49Z semik $ */ /* * $Log: tty.h,v $ * Revision 1.16 2005/05/16 20:33:46 mitry @@ -47,7 +47,7 @@ #if !defined( POSIX_TERMIOS ) && !defined( BSD_SGTTY ) && !defined( SYSV_TERMIO) # if defined(linux) || defined(sunos4) || defined(_AIX) || defined(BSD) || \ defined(SVR4) || defined(solaris2) || defined(m88k) || defined(M_UNIX) ||\ - defined(__sgi) || defined(__FreeBSD__) + defined(__sgi) # define POSIX_TERMIOS # else # define SYSV_TERMIO diff -Bburw ./qico/src/types.h ./trunk/src/types.h --- ./qico/src/types.h 2024-02-01 18:09:52.573531000 +0300 +++ ./trunk/src/types.h 2024-02-01 18:10:34.605560000 +0300 @@ -1,11 +1,11 @@ /********************************************************** * common types - * $Id: types.h,v 1.8 2005/08/23 16:23:09 mitry Exp $ + * $Id: types.h 18 2010-08-23 15:50:49Z semik $ **********************************************************/ #ifndef __TYPES_H__ #define __TYPES_H__ -#include +#include "config.h" #if SIZEOF_CHAR==1 typedef signed char SINT8; @@ -13,6 +13,7 @@ typedef signed char CHAR; typedef unsigned char UINT8; typedef unsigned char BYTE; +#define _8BIT_DECLARED #else # error "There is no 8-bit integer type in your compiler, sorry" #endif @@ -22,12 +23,14 @@ typedef signed short INT16; typedef unsigned short UINT16; typedef unsigned short WORD; +#define _16BIT_DECLARED #else # if SIZEOF_INT==2 typedef signed int SINT16; typedef signed int INT16; typedef unsigned int UINT16; typedef unsigned int WORD; +#define _16BIT_DECLARED # else # error "There is no 16-bit integer type in your compiler, sorry" # endif @@ -37,19 +40,21 @@ typedef signed long SINT32; typedef signed long INT32; typedef unsigned long UINT32; -typedef unsigned long DWORD; +#define _32BIT_DECLARED #define LONGx1 ( SIZEOF_LONG ) #else # if SIZEOF_INT==4 typedef signed int SINT32; typedef signed int INT32; typedef unsigned int UINT32; -typedef unsigned int DWORD; +#define _32BIT_DECLARED #define LONGx1 ( SIZEOF_INT ) # else # error "There is no 32-bit integer type in your compiler, sorry" # endif #endif + +typedef UINT32 DWORD; #ifndef false #define false 0 Only in ./qico/src: vartree.h diff -Bburw ./qico/src/x2c.awk ./trunk/src/x2c.awk --- ./qico/src/x2c.awk 2024-02-01 18:09:52.573659000 +0300 +++ ./trunk/src/x2c.awk 2024-02-01 18:10:34.581712000 +0300 @@ -1,4 +1,4 @@ -# $Id: x2c.awk,v 1.1.1.1 2004/12/29 21:23:34 mitry Exp $ +# $Id: x2c.awk 18 2010-08-23 15:50:49Z semik $ BEGIN { C="qconf.c"; H="qconf.h" A="/* this file autogenerated from qconf.x, do not edit! */\n"