3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Added logfile hash to statistics footer

This commit is contained in:
Clifford Wolf 2014-08-01 19:43:28 +02:00
parent bd74ed7da4
commit 75ffd1643c
5 changed files with 80 additions and 46 deletions

View file

@ -37,13 +37,22 @@ Tcl_Interp *yosys_tcl_interp = NULL;
std::string stringf(const char *fmt, ...)
{
std::string string;
char *str = NULL;
va_list ap;
va_start(ap, fmt);
string = vstringf(fmt, ap);
va_end(ap);
return string;
}
std::string vstringf(const char *fmt, va_list ap)
{
std::string string;
char *str = NULL;
if (vasprintf(&str, fmt, ap) < 0)
str = NULL;
va_end(ap);
if (str != NULL) {
string = str;
@ -71,6 +80,9 @@ void yosys_shutdown()
{
log_pop();
delete yosys_design;
yosys_design = NULL;
for (auto f : log_files)
if (f != stderr)
fclose(f);