From 0aed980603c90d793893c4c368b3e01899bda351 Mon Sep 17 00:00:00 2001 From: Yuuki Galaxy Date: Wed, 27 Nov 2024 21:49:51 +0800 Subject: [PATCH] modified: src1/input.c modified: src1/worker.c --- c_cpp/salusFstReCoord/src1/input.c | 6 +++++- c_cpp/salusFstReCoord/src1/worker.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/c_cpp/salusFstReCoord/src1/input.c b/c_cpp/salusFstReCoord/src1/input.c index 07e1fbbbb..a23cc02d1 100644 --- a/c_cpp/salusFstReCoord/src1/input.c +++ b/c_cpp/salusFstReCoord/src1/input.c @@ -55,6 +55,8 @@ void fill_worker(int_least16_t worker_id) { } else { STRcpySTR(fstBCdata_p->comment, seq->comment.s); } + } else { + fstBCdata_p->comment = strdup(seq->comment.s); } } else { if (unlikely(fstBCdata_p->comment != NULL)) { @@ -66,7 +68,7 @@ void fill_worker(int_least16_t worker_id) { fprintf(stderr, "- %llu -\n", index); ARRAYcpySTR(Parameters.buffer, fstBCdata_p->name); // snprintf(Parameters.buffer, 1 + sizeof(fstBCdata_p->name), "%s", fstBCdata_p->name); - fprintf(stderr, "->Name:[%s]\n", Parameters.buffer); + fprintf(stderr, "->Name:[%s] Comment:[%s]\n", Parameters.buffer, fstBCdata_p->comment); ARRAYcpySTR(Parameters.buffer, fstBCdata_p->seq); fprintf(stderr, "->Sequ:[%s]\n", Parameters.buffer); ARRAYcpySTR(Parameters.buffer, fstBCdata_p->qual); @@ -76,6 +78,8 @@ void fill_worker(int_least16_t worker_id) { fstBCdata_p->name[0] = '\0'; fstBCdata_p->seq[0] = '\0'; fstBCdata_p->qual[0] = '\0'; + free(fstBCdata_p->comment); + fstBCdata_p->comment = NULL; } // continue; } diff --git a/c_cpp/salusFstReCoord/src1/worker.c b/c_cpp/salusFstReCoord/src1/worker.c index 04abd530e..d3fcb5fe8 100644 --- a/c_cpp/salusFstReCoord/src1/worker.c +++ b/c_cpp/salusFstReCoord/src1/worker.c @@ -35,7 +35,7 @@ void worker(int_least16_t worker_id) { fstBCoutput_t *fstBCoutput_p = &worker->output_array[index]; ARRAYcpySTR(readName, fstBCdata_p->name); assert(readName[sizeof(fstBCdata_p->name)] == '\0'); - printf("###### %llu\t[%s] %d <--\n", index, readName, readName[sizeof(fstBCdata_p->name)]); + printf("###### %llu\t[%s] %d [%s]<--\n", index, readName, readName[sizeof(fstBCdata_p->name)],fstBCdata_p->comment); int_least16_t RowCol[2] = {0}; double oldXY[2] = {0.0}; double newXY[2] = {0.0}; -- 2.11.4.GIT