From 321e36aef3ff895bdbc0baa6438a1702d08e0687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 26 Sep 2024 17:04:29 +0200 Subject: [PATCH] different printout when setting stobbits for windows and the rest --- comport.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/comport.c b/comport.c index b6ddc44..a3a5bf2 100644 --- a/comport.c +++ b/comport.c @@ -1565,16 +1565,24 @@ static void comport_parity(t_comport *x,t_floatarg fparity) static void comport_stopbit(t_comport *x, t_floatarg fstop) { t_float stop = set_stopflag(x, fstop); + const char*stopname = +#ifdef _WIN32 + "stopbits" +#else + "extra stopbit" +#endif + ; + if(x->comhandle == INVALID_HANDLE_VALUE)return; if(set_serial(x) == 0) { - pd_error(x,"[comport] ** ERROR ** could not set extra stopbits of device %s\n", - x->pretty_name); + pd_error(x,"[comport] ** ERROR ** could not set %s of device %s\n", + stopname, x->pretty_name); return; } - else comport_verbose("[comport] set extra stopbits of %s to %g\n", x->pretty_name, stop); + else comport_verbose("[comport] set %s of %s to %g\n", stopname, x->pretty_name, stop); x->stop_bits = stop; }