From 98e49c0dd42840a094837f7acae532bc237a719a Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期二, 20 八月 2024 15:42:37 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- Hydro/Yw.Hydraulic.Core/src/report.cpp | 51 ++++++++++++++++++++++++++++----------------------- 1 files changed, 28 insertions(+), 23 deletions(-) diff --git a/Hydro/Yw.Hydraulic.Core/src/report.cpp b/Hydro/Yw.Hydraulic.Core/src/report.cpp index 5b56605..9a3f33e 100644 --- a/Hydro/Yw.Hydraulic.Core/src/report.cpp +++ b/Hydro/Yw.Hydraulic.Core/src/report.cpp @@ -80,30 +80,30 @@ int c; Report *rpt = &pr->report; - // Check that project's report file exists - //if (rpt->RptFile == NULL) return 0; + //Check that project's report file exists + if (rpt->RptFile == NULL) return 0; - //// Open the new destination file - //tfile = fopen(filename, "w"); - //if (tfile == NULL) return 303; + // Open the new destination file + tfile = fopen(filename, "w"); + if (tfile == NULL) return 303; - //// Re-open project's report file in read mode - //fclose(rpt->RptFile); - //rpt->RptFile = fopen(rpt->Rpt1Fname, "r"); + // Re-open project's report file in read mode + fclose(rpt->RptFile); + rpt->RptFile = fopen(rpt->Rpt1Fname, "r"); - //// Copy contents of project's report file - //if (rpt->RptFile) - //{ - // while ((c = fgetc(rpt->RptFile)) != EOF) fputc(c, tfile); - // fclose(rpt->RptFile); - //} + // Copy contents of project's report file + if (rpt->RptFile) + { + while ((c = fgetc(rpt->RptFile)) != EOF) fputc(c, tfile); + fclose(rpt->RptFile); + } - //// Close destination file - //fclose(tfile); + // Close destination file + fclose(tfile); // Re-open project's report file in append mode - /*rpt->RptFile = fopen(rpt->Rpt1Fname, "a"); - if (rpt->RptFile == NULL) return 303;*/ + rpt->RptFile = fopen(rpt->Rpt1Fname, "a"); + if (rpt->RptFile == NULL) return 303; return 0; } @@ -915,8 +915,13 @@ { //白云飞修改 //return; - Report *rpt = &pr->report; + //将字符串s的内容,添加到pr->MsgText最后并换行 + strcat(pr->MsgText, s); + strcat(pr->MsgText, "\n"); + + + Report *rpt = &pr->report; if (rpt->RptFile == NULL) return; if (rpt->Rptflag) { @@ -953,7 +958,7 @@ */ { //白云飞修改 - return; + //return; Report *rpt = &pr->report; Times *time = &pr->times; @@ -1055,7 +1060,7 @@ */ { //白云飞修改 - return; + //return; Network *net = &pr->network; Report *rpt = &pr->report; Times *time = &pr->times; @@ -1097,7 +1102,7 @@ */ { //白云飞修改 - return; + //return; Network *net = &pr->network; Report *rpt = &pr->report; Times *time = &pr->times; @@ -1244,7 +1249,7 @@ */ { //[Cloudflight修订] 2023年6月5日 17:15:50 - return; + //return; Network *net = &pr->network; Report *rpt = &pr->report; Times *time = &pr->times; -- Gitblit v1.9.3