Skip to content
Snippets Groups Projects
Commit 14269353 authored by gb10's avatar gb10
Browse files

Replaced messcrash with g_error

parent 0a40ed5e
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
* * Mar 17 16:24 1999 (edgrif): Fixed bug which crashed xace when a
* negative alignment length was given.
* Created: Wed Mar 17 16:23:21 1999 (edgrif)
* CVS info: $Id: dotter.c,v 1.12 2010-08-31 15:30:55 gb10 Exp $
* CVS info: $Id: dotter.c,v 1.13 2010-08-31 15:46:31 gb10 Exp $
*-------------------------------------------------------------------
*/
......@@ -1769,7 +1769,8 @@ static void YdrawSEGxy(MSP *msp, float offset)
static int isHorizontalMSP(MSP *msp) {
if (!msp->qname) messcrash("No qname set in MSP - I need this to associate it with one of the sequences");
if (!msp->qname)
g_error("No qname set in MSP - I need this to associate it with one of the sequences");
if (!strcasecmp(msp->qname, qname) || !strcmp(msp->qname, "@1"))
return 1;
......@@ -1780,7 +1781,8 @@ static int isHorizontalMSP(MSP *msp) {
static int isVerticalMSP(MSP *msp) {
if (!msp->qname) messcrash("No qname set in MSP - I need this to associate it with one of the sequences");
if (!msp->qname)
g_error("No qname set in MSP - I need this to associate it with one of the sequences");
if (!strcasecmp(msp->qname, sname) || !strcmp(msp->qname, "@2"))
return 1;
......
/* Last edited: Oct 26 10:45 2003 (edgrif) */
/* $Id: dotterKarlin.c,v 1.2 2010-08-31 15:30:55 gb10 Exp $ */
/* $Id: dotterKarlin.c,v 1.3 2010-08-31 15:46:31 gb10 Exp $ */
/*
-------------------------------------------------------------
......@@ -31,11 +31,8 @@
*/
#include <ctype.h>
#include "regular.h"
#include "graph.h"
#include "gex.h"
#include "dotter_.h"
#include <gtk/gtk.h>
#define MAXIT 20 /* Maximum number of iterations used in calculating K */
......
......@@ -26,7 +26,7 @@
* HISTORY:
* Last edited: Aug 26 15:42 2009 (edgrif)
* Created: Thu Aug 26 17:17:30 1999 (fw)
* CVS info: $Id: dotterMain.c,v 1.12 2010-08-31 15:30:55 gb10 Exp $
* CVS info: $Id: dotterMain.c,v 1.13 2010-08-31 15:46:31 gb10 Exp $
*-------------------------------------------------------------------
*/
......@@ -237,11 +237,6 @@ static char* getUsageText()
int main(int argc, char **argv)
{
/* Set the message handlers */
g_log_set_default_handler(defaultMessageHandler, NULL);
g_log_set_handler(NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL, popupMessageHandler, NULL);
DotterOptions options = {0, 0, 0, UNSET_INT, UNSET_INT, 0, 0, 1, 0, 0, 0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
char
......@@ -570,7 +565,7 @@ int main(int argc, char **argv)
}
else if(!(file = fopen(options.FSfilename, "r")))
{
messcrash("Cannot open %s\n", options.FSfilename);
g_error("Cannot open %s\n", options.FSfilename);
}
GList *seqList = NULL; /* parser compiles a list of BlxSequences into here; not required for dotter */
......@@ -625,6 +620,11 @@ int main(int argc, char **argv)
if (!options.savefile)
{
/* Set the message handlers. (Do this here because we don't want graphical dialog
* boxes for batch mode.) */
g_log_set_default_handler(defaultMessageHandler, NULL);
g_log_set_handler(NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL, popupMessageHandler, NULL);
dotter(type, opts, options.qname, qseq, options.qoffset, options.sname, sseq, options.soffset,
0, 0, options.savefile, options.loadfile, options.mtxfile, options.memoryLimit,
options.dotterZoom, MSPlist, 0, options.winsize, options.pixelFacset) ;
......@@ -635,12 +635,7 @@ int main(int argc, char **argv)
}
else
{
/* stop graphical dialog boxes in batch mode. */
struct messContextStruct nullContext = { NULL, NULL };
messOutRegister(nullContext);
messErrorRegister (nullContext);
messExitRegister(nullContext);
messCrashRegister (nullContext);
/* Batch mode */
dotter(type, opts, options.qname, qseq, options.qoffset, options.sname, sseq, options.soffset,
0, 0, options.savefile, options.loadfile, options.mtxfile, options.memoryLimit,
options.dotterZoom, MSPlist, 0, options.winsize, options.pixelFacset);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment