X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpsi_const.m4;h=6c3cf6b28be665eaf28828e22461700a590d8fc0;hb=e5103bb1ce17ef734e1329da9a13d9a2cbc40ad9;hp=71adb03db7ac4571702feb1cf16362475eb1c25c;hpb=772c1e688a51b32331fae7993429b3a03d766d8d;p=m6w6%2Fext-psi diff --git a/m4/psi_const.m4 b/m4/psi_const.m4 index 71adb03..6c3cf6b 100644 --- a/m4/psi_const.m4 +++ b/m4/psi_const.m4 @@ -1,13 +1,19 @@ # psi_add_str_const(name, value) # Add a pre-defined string constant to $PSI_CONSTS psi_add_str_const() { - cat >>$PSI_CONSTS <<<" {PSI_T_STRING, \"string\", \"psi\\\\$1\", $2, PSI_T_QUOTED_STRING}, " + grep -q "\"psi\\\\\\\\$1\"" $PSI_CONSTS \ + || cat >>$PSI_CONSTS <>$PSI_CONSTS <<<" {PSI_T_INT, \"int\", \"psi\\\\$1\", \"$2\", PSI_T_NUMBER}, " + grep -q "\"psi\\\\\\\\$1\"" $PSI_CONSTS \ + || cat >>$PSI_CONSTS <