yangyin
2024-08-20 98e49c0dd42840a094837f7acae532bc237a719a
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;