/* * Copyright (c) 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "parsetrace.h" #include "ParseTrace.h" #include "ERRseg.h" #include ERRseg parseErrorSegment; void hl7_record(const char *type, const char *msg, va_list args) { ZEtyp err; err.SegId = SegTypeCode(parseTrace.segment); err.Seq = parseTrace.seg_of_msg[parseTrace.group_depth] + 1; if(parseTrace.field > -1) err.FieldPos = parseTrace.field + 1; { strstream s; s << type << ": "; s.vform(msg, args); s << '\0'; err.CodeIdeError.Text = s.str(); s.freeze(0); } { strstream s; parseTrace.output(s); s << '\0'; err.FullPath = s.str(); s.freeze(0); } parseErrorSegment.ErrorCodeAndLoc.append(err); }