X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpsi_const.m4;h=6c3cf6b28be665eaf28828e22461700a590d8fc0;hb=898c6dac30d12d7fe56662d66a8e73c340926d64;hp=71adb03db7ac4571702feb1cf16362475eb1c25c;hpb=39831a9cf4a4aa9f126bc9a949f03ae232e3794b;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 <