diff --git a/src/db/atdb.c b/src/db/atdb.c index f42003de2..4258d2a65 100644 --- a/src/db/atdb.c +++ b/src/db/atdb.c @@ -62,7 +62,11 @@ char **argv; } fpdctsdr = fopen(argv[1],"r"); if(!fpdctsdr) { - errMessage(0,"Error opening file"); + errMessage(0,"Error opening input file"); + exit(-1); + } + if(fopen(argv[2],"r") { + errMessage(-1,"Output File already exists"); exit(-1); } pdbbase=dbAllocBase(); @@ -76,7 +80,7 @@ char **argv; yyparse(); fp=fopen(argv[2],"w"); if(fp==NULL) { - errMessage(0,"Error opening file"); + errMessage(0,"Error opening output file"); exit(-1); } status = dbWrite(pdbbase,fpdctsdr,fp); diff --git a/src/db/atdb_lex.l b/src/db/atdb_lex.l index 1e4337d10..0adf4a0c7 100644 --- a/src/db/atdb_lex.l +++ b/src/db/atdb_lex.l @@ -1,6 +1,6 @@ b [a-zA-Z0-9_] a [ \t] -d [a-zA-Z0-9_\,\./\*#\[\]%:;!|\'\-&\(\)@\?\+<>] +d [a-zA-Z0-9_\,\./\*#\[\]%:;!|\'\-&\(\)@\?\+<>=$] %{