From 8abb70172764a18098a8e17a96f1239354757a35 Mon Sep 17 00:00:00 2001 From: Fabien Corona Date: Wed, 28 Jun 2023 22:49:17 +0200 Subject: [PATCH] IBIS: model type should not be case sensitive Fixes #15068 --- eeschema/sim/kibis/ibis_parser.cpp | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/eeschema/sim/kibis/ibis_parser.cpp b/eeschema/sim/kibis/ibis_parser.cpp index 62a7e7476e..947f49e00e 100644 --- a/eeschema/sim/kibis/ibis_parser.cpp +++ b/eeschema/sim/kibis/ibis_parser.cpp @@ -1930,39 +1930,39 @@ bool IbisParser::readModel() { if( readWord( subparam ) ) { - if( !strcmp( subparam.c_str(), "Input" ) ) + if( !compareIbisWord( subparam.c_str(), "Input" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::INPUT_STD; - else if( !strcmp( subparam.c_str(), "Output" ) ) + else if( !compareIbisWord( subparam.c_str(), "Output" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::OUTPUT; - else if( !strcmp( subparam.c_str(), "I/O" ) ) + else if( !compareIbisWord( subparam.c_str(), "I/O" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::IO; - else if( !strcmp( subparam.c_str(), "3-state" ) ) + else if( !compareIbisWord( subparam.c_str(), "3-state" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::THREE_STATE; - else if( !strcmp( subparam.c_str(), "Open_drain" ) ) + else if( !compareIbisWord( subparam.c_str(), "Open_drain" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::OPEN_DRAIN; - else if( !strcmp( subparam.c_str(), "I/O_Open_drain" ) ) + else if( !compareIbisWord( subparam.c_str(), "I/O_Open_drain" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::IO_OPEN_DRAIN; - else if( !strcmp( subparam.c_str(), "Open_sink" ) ) + else if( !compareIbisWord( subparam.c_str(), "Open_sink" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::OPEN_SINK; - else if( !strcmp( subparam.c_str(), "I/O_open_sink" ) ) + else if( !compareIbisWord( subparam.c_str(), "I/O_open_sink" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::IO_OPEN_SINK; - else if( !strcmp( subparam.c_str(), "Open_source" ) ) + else if( !compareIbisWord( subparam.c_str(), "Open_source" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::OPEN_SOURCE; - else if( !strcmp( subparam.c_str(), "I/O_open_source" ) ) + else if( !compareIbisWord( subparam.c_str(), "I/O_open_source" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::IO_OPEN_SOURCE; - else if( !strcmp( subparam.c_str(), "Input_ECL" ) ) + else if( !compareIbisWord( subparam.c_str(), "Input_ECL" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::INPUT_ECL; - else if( !strcmp( subparam.c_str(), "Output_ECL" ) ) + else if( !compareIbisWord( subparam.c_str(), "Output_ECL" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::OUTPUT_ECL; - else if( !strcmp( subparam.c_str(), "I/O_ECL" ) ) + else if( !compareIbisWord( subparam.c_str(), "I/O_ECL" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::IO_ECL; - else if( !strcmp( subparam.c_str(), "3-state_ECL" ) ) + else if( !compareIbisWord( subparam.c_str(), "3-state_ECL" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::THREE_STATE_ECL; - else if( !strcmp( subparam.c_str(), "Terminator" ) ) + else if( !compareIbisWord( subparam.c_str(), "Terminator" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::TERMINATOR; - else if( !strcmp( subparam.c_str(), "Series" ) ) + else if( !compareIbisWord( subparam.c_str(), "Series" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::SERIES; - else if( !strcmp( subparam.c_str(), "Series_switch" ) ) + else if( !compareIbisWord( subparam.c_str(), "Series_switch" ) ) m_currentModel->m_type = IBIS_MODEL_TYPE::SERIES_SWITCH; else {