source: tags/arb-6.0/GDE/MAFFT/mafft-7.055-with-extensions/core/countlen.c

Last change on this file was 10371, checked in by aboeckma, 11 years ago

updated mafft version. Added extensions (no svn ignore, yet)

File size: 1.0 KB
Line 
1#include "mltaln.h"
2
3#define DEBUG 0
4
5void arguments( int argc, char *argv[] )
6{
7    int c;
8
9    while( --argc > 0 && (*++argv)[0] == '-' )
10        {
11        while ( (c = *++argv[0]) )
12                {
13            switch( c )
14            {
15                                case 'i':
16                                        inputfile = *++argv;
17                                        fprintf( stderr, "inputfile = %s\n", inputfile );
18                                        --argc;
19                                        goto nextoption;
20                default:
21                    fprintf( stderr, "illegal option %c\n", c );
22                    argc = 0;
23                    break;
24            }
25                }
26                nextoption:
27                        ;
28        }
29    if( argc != 0 ) 
30    {
31        fprintf( stderr, "options: Check source file !\n" );
32        exit( 1 );
33    }
34}
35
36
37int main( int argc, char *argv[] )
38{
39        FILE *infp;
40        int nlenmin;
41
42        arguments( argc, argv );
43
44        if( inputfile )
45        {
46                infp = fopen( inputfile, "r" );
47                if( !infp )
48                {
49                        fprintf( stderr, "Cannot open %s\n", inputfile );
50                        exit( 1 );
51                }
52        }
53        else
54                infp = stdin;
55
56        dorp = NOTSPECIFIED;
57        getnumlen_nogap( infp, &nlenmin );
58
59        fprintf( stdout, "%d x %d - %d %c\n", njob, nlenmax, nlenmin, dorp );
60        return( 0 );
61}
Note: See TracBrowser for help on using the repository browser.