From ecdaa6db1ab3d4769a23206eb703ac963afaf58d Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 11 May 2025 20:07:25 +0200 Subject: [PATCH] Improved .hdl message shown only once --- src/frontend/inpcom.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 4b4f32394..7081ea2c1 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1306,6 +1306,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name bool found_end = FALSE, shell_eol_continuation = FALSE; static bool biaswarn = FALSE; + static bool hdlwarn = FALSE; #ifdef CIDER static int in_cider_model = 0; #endif @@ -1445,9 +1446,13 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name } if (ciprefix(".hdl", buffer)) { - fprintf(cp_err, "Warning: Dot command .hdl is not supported, ingnored\n"); - fprintf(cp_err, " line no. %d, %s", line_number, buffer); - fprintf(cp_err, " file %s\n\n", file_name); + if (!hdlwarn) { + fprintf(cp_err, "Warning: Dot command .hdl is not supported, ingnored\n"); + fprintf(cp_err, " line no. %d, %s", line_number, buffer); + fprintf(cp_err, " file %s\n", file_name); + fprintf(cp_err, " This message will be posted only once!\n\n"); + hdlwarn = TRUE; + } tfree(buffer); continue; }