|
Last change
on this file was
2,
checked in by oldcode, 25 years ago
|
|
Initial revision
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
1.7 KB
|
| Line | |
|---|
| 1 | #include <stdio.h> |
|---|
| 2 | #include <string.h> |
|---|
| 3 | #include <xview/xview.h> |
|---|
| 4 | #include <xview/canvas.h> |
|---|
| 5 | #include <xview/cursor.h> |
|---|
| 6 | #include <xview/panel.h> |
|---|
| 7 | #include "loop.h" |
|---|
| 8 | #include "globals.h" |
|---|
| 9 | |
|---|
| 10 | main(ac,av) |
|---|
| 11 | int ac; |
|---|
| 12 | char **av; |
|---|
| 13 | { |
|---|
| 14 | extern /* XView CONVERSION - Due to a name space clash with Xlib, the SunView data-type Window is now Xv_Window in XView. */WindowSetup(); |
|---|
| 15 | int j; |
|---|
| 16 | |
|---|
| 17 | seqnum= -1; |
|---|
| 18 | infile=NULL; |
|---|
| 19 | seqlen=0; |
|---|
| 20 | constraint_state = DISTANCE; |
|---|
| 21 | modified=TRUE; |
|---|
| 22 | sho_con = FALSE; |
|---|
| 23 | |
|---|
| 24 | switch (ac) |
|---|
| 25 | { |
|---|
| 26 | case 1: |
|---|
| 27 | fprintf(stderr,"Usage: %s [-t template] datafile\n", |
|---|
| 28 | av[0]); |
|---|
| 29 | exit(1); |
|---|
| 30 | break; |
|---|
| 31 | |
|---|
| 32 | case 2: |
|---|
| 33 | ErrorOut("Cannot open sequence file", |
|---|
| 34 | (infile=fopen(av[ac-1],"r"))); |
|---|
| 35 | ReadSeqSet(&dataset); |
|---|
| 36 | break; |
|---|
| 37 | |
|---|
| 38 | case 3: |
|---|
| 39 | if(av[1][0] == '-' && av[1][1] == 't') |
|---|
| 40 | { |
|---|
| 41 | ErrorOut("Cannot open template file", |
|---|
| 42 | (tempfile=fopen(av[2],"r"))); |
|---|
| 43 | } |
|---|
| 44 | else |
|---|
| 45 | { |
|---|
| 46 | fprintf(stderr, |
|---|
| 47 | "Usage: %s [-t template] datafile\n",av[0]); |
|---|
| 48 | exit(1); |
|---|
| 49 | } |
|---|
| 50 | break; |
|---|
| 51 | |
|---|
| 52 | case 4: |
|---|
| 53 | if(av[1][0] == '-' && av[1][1] == 't') |
|---|
| 54 | { |
|---|
| 55 | ErrorOut("Cannot open template file", |
|---|
| 56 | (tempfile=fopen(av[2],"r"))); |
|---|
| 57 | } |
|---|
| 58 | else |
|---|
| 59 | { |
|---|
| 60 | fprintf(stderr, |
|---|
| 61 | "Usage: %s [-t template] datafile",av[0]); |
|---|
| 62 | exit(1); |
|---|
| 63 | } |
|---|
| 64 | ErrorOut("Cannot open sequence file", |
|---|
| 65 | (infile=fopen(av[ac - 1],"r"))); |
|---|
| 66 | ReadSeqSet(&dataset); |
|---|
| 67 | break; |
|---|
| 68 | }; |
|---|
| 69 | WindowSetup(); |
|---|
| 70 | exit(0); |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | ErrorOut(msg,code) |
|---|
| 75 | char *msg; |
|---|
| 76 | int code; |
|---|
| 77 | { |
|---|
| 78 | if(code == 0) |
|---|
| 79 | { |
|---|
| 80 | fprintf(stderr,"%s \n",msg); |
|---|
| 81 | exit(1); |
|---|
| 82 | } |
|---|
| 83 | return; |
|---|
| 84 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.