diff options
Diffstat (limited to 'examples/quote.m4')
-rw-r--r-- | examples/quote.m4 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/quote.m4 b/examples/quote.m4 new file mode 100644 index 0000000..fae52c3 --- /dev/null +++ b/examples/quote.m4 @@ -0,0 +1,9 @@ +divert(`-1') +# quote(args) - convert args to single-quoted string +define(`quote', `ifelse(`$#', `0', `', ``$*'')') +# dquote(args) - convert args to quoted list of quoted strings +define(`dquote', ``$@'') +# dquote_elt(args) - convert args to list of double-quoted strings +define(`dquote_elt', `ifelse(`$#', `0', `', `$#', `1', ```$1''', + ```$1'',$0(shift($@))')') +divert`'dnl |