X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpsi_const.m4;h=6c3cf6b28be665eaf28828e22461700a590d8fc0;hb=b25cb3852e3c6ef6da608001585218015aaf5d3e;hp=cea747e518928233f8a3f9f2ea12967560fe0175;hpb=b4508f6b917660970f887894a6aaed6c220a2c72;p=m6w6%2Fext-psi diff --git a/m4/psi_const.m4 b/m4/psi_const.m4 index cea747e..6c3cf6b 100644 --- a/m4/psi_const.m4 +++ b/m4/psi_const.m4 @@ -1,12 +1,24 @@ -# add_str_const(name, value) -add_str_const() { - PSI_CONSTS="{PSI_T_STRING, \"string\", \"psi\\\\$1\", $2, PSI_T_QUOTED_STRING}, $PSI_CONSTS" +# psi_add_str_const(name, value) +# Add a pre-defined string constant to $PSI_CONSTS +psi_add_str_const() { + grep -q "\"psi\\\\\\\\$1\"" $PSI_CONSTS \ + || cat >>$PSI_CONSTS <>$PSI_CONSTS <