2025-12-28 23:06:03 +08:00
|
|
|
/*********************************************************************************************
|
|
|
|
|
Description: data and files for debugging
|
|
|
|
|
Copyright : All right reserved by NCIC.ICT
|
|
|
|
|
|
|
|
|
|
Author : Zhang Zhonghai
|
|
|
|
|
Date : 2024/04/09
|
|
|
|
|
***********************************************************************************************/
|
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
2025-12-30 18:04:12 +08:00
|
|
|
FILE* gf[DEBUG_FILE_NUM] = {0};
|
2025-12-28 23:06:03 +08:00
|
|
|
|
|
|
|
|
int open_debug_files() {
|
|
|
|
|
char fn[1024] = {0};
|
|
|
|
|
int i = 0;
|
2025-12-30 18:04:12 +08:00
|
|
|
for (; i < DEBUG_FILE_NUM; ++i) {
|
2025-12-28 23:06:03 +08:00
|
|
|
sprintf(fn, "./test/fp%d.txt", i);
|
|
|
|
|
gf[i] = fopen(fn, "w");
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int close_debug_files() {
|
|
|
|
|
int i = 0;
|
2025-12-30 18:04:12 +08:00
|
|
|
for (; i < DEBUG_FILE_NUM; ++i) {
|
2025-12-28 23:06:03 +08:00
|
|
|
if (gf[i] != 0)
|
|
|
|
|
fclose(gf[i]);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|