C/C++ demangle in Emacs

Pointed out by a friend.

(defun demangle-current-word ()
(interactive)
"Demangle the C++ mangled current word."
(if (eq system-type 'aix)
(print (shell-command-to-string (concat "echo "
(current-word) " | c++filt | tr -d '\n'")))
(print (shell-command-to-string (concat "c++filt"
(current-word) " | tr -d '\n'")))))

Common Lisp

I could have used this many times digging though stacks when finalling games.

blog comments powered by Disqus