From 91713d5fa0afcfddd54cfdcdf9bbc545e0f531bc Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 24 Mar 2013 23:49:58 +0100 Subject: [PATCH] handle unknown compliance strings gracefully --- ChangeLog.txt | 4 ++++ extras/hbdoc/hbdoc.prg | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a5b3e3ae04..8e6b199445 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-24 23:49 UTC+0100 Viktor Szakats (harbour syenar.net) + * extras/hbdoc/hbdoc.prg + + handle unknown compliance strings gracefully + 2013-03-24 23:47 UTC+0100 Viktor Szakats (harbour syenar.net) - contrib/hbmisc/doc/en/ht_doc.txt * contrib/hbmisc/doc/en/ht_conv.txt diff --git a/extras/hbdoc/hbdoc.prg b/extras/hbdoc/hbdoc.prg index 02c158a6e6..23d731c56a 100644 --- a/extras/hbdoc/hbdoc.prg +++ b/extras/hbdoc/hbdoc.prg @@ -820,10 +820,9 @@ FUNCTION Decode( cType, hsBlock, cKey ) IF ( idx := AScan( p_aCompliance, {| a | a[ 1 ] == cCode } ) ) > 0 RETURN p_aCompliance[ idx ][ 2 ] ELSE - RETURN "Unknown 'COMPLIANCE' code: '" + cCode + "'" + RETURN cCode ENDIF DO CASE - CASE Empty( cCode ) ; RETURN cCode CASE cCode == "C" ; RETURN "This is CA-Cl*pper v5.2 compliant" CASE cCode == "C(array)" ; RETURN "This is CA-Cl*pper v5.2 compliant except that arrays in Harbour can have an unlimited number of elements" CASE cCode == "C(menu)" ; RETURN "This is CA-Cl*pper v5.2 compliant except that menus (internally arrays) in Harbour can have an unlimited number of elements" @@ -832,7 +831,7 @@ FUNCTION Decode( cType, hsBlock, cKey ) CASE cCode == "C53" ; RETURN "This is CA-Cl*pper v5.3 compliant and is only visible if source was compiled with the HB_COMPAT_C53 flag" CASE cCode == "H" ; RETURN "This is Harbour specific" CASE cCode == "NA" ; RETURN "Not applicable" - OTHERWISE ; RETURN "Unknown 'COMPLIANCE' code: '" + cCode + "'" + OTHERWISE ; RETURN cCode ENDCASE CASE cType == "NAME"