~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to demo/seqget.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        {
75
75
                if (gi)
76
76
                {
77
 
                        ErrPostEx(SEV_FATAL,0,0, "Use only one of -g or -s");
 
77
                        ErrPostEx(SEV_FATAL, 1,0, "Use only one of -g or -s");
78
78
                        return 1;
79
79
                }
80
80
 
81
81
                sip = SeqIdParse((CharPtr)(myargs[4].strvalue));
82
82
                if (sip == NULL)
83
83
                {
84
 
                        ErrPostEx(SEV_FATAL,0,0, "Can't parse [%s]",
 
84
                        ErrPostEx(SEV_FATAL, 1,0, "Can't parse [%s]",
85
85
                                (CharPtr)(myargs[4].strvalue));
86
86
                        return 1;
87
87
                }
88
88
        }
89
89
        else if (! gi)
90
90
        {
91
 
                ErrPostEx(SEV_FATAL,0,0, "Must supply one of -g or -s");
 
91
                ErrPostEx(SEV_FATAL, 1,0, "Must supply one of -g or -s");
92
92
                return 1;
93
93
        }
94
94
 
97
97
        */
98
98
 
99
99
        if ( !EntrezInit("SeqGet", FALSE, &is_network) ) {
100
 
                ErrPostEx(SEV_FATAL,0,0, "Can't initialize Entrez");
 
100
                ErrPostEx(SEV_FATAL, 1,0, "Can't initialize Entrez");
101
101
                return 1;
102
102
        }
103
103
 
108
108
                {
109
109
                        EntrezFini();
110
110
                        SeqIdPrint(sip, tbuf, PRINTID_FASTA_SHORT);
111
 
                        ErrPostEx(SEV_FATAL,0,0, "Couldn't find SeqId [%s]", tbuf);
 
111
                        ErrPostEx(SEV_FATAL, 1,0, "Couldn't find SeqId [%s]", tbuf);
112
112
                        return 1;
113
113
                }
114
114
                SeqIdFree(sip);
119
119
 
120
120
        if (sep == NULL)
121
121
        {
122
 
                ErrPostEx(SEV_FATAL,0,0,"Could not retrieve entry for GI %ld", (long)gi);
 
122
                ErrPostEx(SEV_FATAL, 1,0,"Could not retrieve entry for GI %ld", (long)gi);
123
123
                return 1;
124
124
        }
125
125
 
132
132
                        asnout = AsnIoOpen((CharPtr)myargs[0].strvalue, outmode);
133
133
                        if (asnout == NULL)
134
134
                        {
135
 
                         ErrPostEx(SEV_FATAL,0,0, "Could not open [%s] for asn output",
 
135
                         ErrPostEx(SEV_FATAL, 1,0, "Could not open [%s] for asn output",
136
136
                            myargs[0].strvalue);
137
137
                         return 1;
138
138
                        }
143
143
                        fp = FileOpen((CharPtr)myargs[0].strvalue, outmode);
144
144
                        if (fp == NULL)
145
145
                        {
146
 
                         ErrPostEx(SEV_FATAL,0,0, "Could not open [%s] for asn output",
 
146
                         ErrPostEx(SEV_FATAL, 1,0, "Could not open [%s] for asn output",
147
147
                            myargs[0].strvalue);
148
148
                         return 1;
149
149
                        }