From 0eaa9dc265b5f88d9f3f950c6c02b2a79bfa1c3a Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 22 May 2000 08:20:48 +0000 Subject: [PATCH] Moved writing functions from evt.c to evtuild.c. --- hadaq/Makefile | 2 +- hadaq/evt.c | 12 +----------- hadaq/evt.h | 3 --- hadaq/evtbuild.c | 14 +++++++------- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/hadaq/Makefile b/hadaq/Makefile index 2c55926..f78f172 100644 --- a/hadaq/Makefile +++ b/hadaq/Makefile @@ -135,7 +135,7 @@ agent_xdr.o: agent_xdr.c agent.h ctrlctu.o: ctrlctu.c worker.h psxshm.h evt.o: evt.c evt.h hadtu.h subevt.h evtbuild.o: evtbuild.c worker.h psxshm.h evt.h hadtu.h subevt.h \ - shmtrans.h semaphore.h hadtuqueue.h + shmtrans.h semaphore.h hadtuqueue.h ansiTape.h hadtu.o: hadtu.c hadtu.h hadtuqueue.o: hadtuqueue.c hadtu.h hadtuqueue.h hldread.o: hldread.c evt.h hadtu.h subevt.h hldread.h diff --git a/hadaq/evt.c b/hadaq/evt.c index 084d30c..60e6713 100644 --- a/hadaq/evt.c +++ b/hadaq/evt.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Id: evt.c,v 6.6 2000-05-21 21:45:02 hades Exp $"; +static char rcsId[] = "$Id: evt.c,v 6.7 2000-05-22 08:20:48 hades Exp $"; #define _ANSI_C_SOURCE #include @@ -181,16 +181,6 @@ void deleteEvt(void *my) freeMem(my); } -int Evt_write(void *my, FILE * file) -{ - return fwrite(my, 1, Evt_paddedSize(my), file); -} - -int Evt_writeTape(void *my, AnsiTape *tape) -{ - return writeAnsiTape(tape, my, Evt_paddedSize(my)); -} - void *Evt_appendSubEvt(void *my, void *subEvt) { if (SubEvt_decoding(subEvt) == SubEvtDecoding_SubEvts) { diff --git a/hadaq/evt.h b/hadaq/evt.h index 4b59fef..f648076 100644 --- a/hadaq/evt.h +++ b/hadaq/evt.h @@ -7,7 +7,6 @@ #include "hadtu.h" #include "subevt.h" -#include "ansiTape.h" #define EVT_MAXSIZE (100 * 1024) @@ -59,8 +58,6 @@ void Evt_setRunNr(void *my, UInt4 runNr); void *newEvt(UInt4 decoding, UInt4 id, UInt4 runNr); void deleteEvt(void *my); -int Evt_write(void *my, FILE * file); -int Evt_writeTape(void *my, AnsiTape *tape); void *Evt_fget(FILE * file); void *Evt_appendSubEvt(void *my, void *subEvt); diff --git a/hadaq/evtbuild.c b/hadaq/evtbuild.c index 1dbfa64..d32c500 100644 --- a/hadaq/evtbuild.c +++ b/hadaq/evtbuild.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.15 2000-05-21 21:45:02 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.16 2000-05-22 08:20:48 hades Exp $"; #define _XOPEN_SOURCE #include @@ -288,9 +288,9 @@ int main(int argc, char *argv[]) } if (outFile != NULL) { if (strcmp(outDev, "file") == 0) { - Evt_write(evt, outFile); + fwrite(evt, 1, Evt_paddedSize(evt), outFile); } else if (strcmp(outDev, "tape") == 0) { - Evt_writeTape(evt, outTape); + writeAnsiTape(outTape, evt, Evt_paddedSize(evt)); } } deleteEvt(evt); @@ -354,9 +354,9 @@ int main(int argc, char *argv[]) if (currNrOfSubEvts == nrOfSubEvts) { if (outFile != NULL) { if (strcmp(outDev, "file") == 0) { - Evt_write(evt, outFile); + fwrite(evt, 1, Evt_paddedSize(evt), outFile); } else if (strcmp(outDev, "tape") == 0) { - Evt_writeTape(evt, outTape); + writeAnsiTape(outTape, evt, Evt_paddedSize(evt)); } } Evt_online(evt); @@ -375,9 +375,9 @@ int main(int argc, char *argv[]) } if (outFile != NULL) { if (strcmp(outDev, "file") == 0) { - Evt_write(evt, outFile); + fwrite(evt, 1, Evt_paddedSize(evt), outFile); } else if (strcmp(outDev, "tape") == 0) { - Evt_writeTape(evt, outTape); + writeAnsiTape(outTape, evt, Evt_paddedSize(evt)); } } deleteEvt(evt); -- 2.43.0