diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 11:10:13 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 11:10:13 -0800 |
commit | 7be93f2d05131d061bd4790ae33c8d50f50010d7 (patch) | |
tree | 72736c1606f803a92ffa07c9808ffea2521d009e /examples/quote.m4 | |
download | m4-7be93f2d05131d061bd4790ae33c8d50f50010d7.tar.gz m4-7be93f2d05131d061bd4790ae33c8d50f50010d7.tar.bz2 m4-7be93f2d05131d061bd4790ae33c8d50f50010d7.zip |
Imported Upstream version 1.4.16upstream/1.4.16
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 |