mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
More macro updates from the pa_autoconf library. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
14 lines
613 B
Plaintext
14 lines
613 B
Plaintext
dnl --------------------------------------------------------------------------
|
|
dnl PA_CSYM(prefix, string)
|
|
dnl
|
|
dnl Convert a (semi-) arbitrary string to a CPP symbol
|
|
dnl Convert non-C characters to underscore, except + which is converted
|
|
dnl to X (so C++ -> CXX). Unlike PA_SYM(), do not compact multiple
|
|
dnl underscores.
|
|
dnl --------------------------------------------------------------------------
|
|
AC_DEFUN([PA_CSYM],
|
|
[m4_bpatsubsts(m4_quote(m4_toupper(m4_normalize([$*]))),
|
|
[[ ]+],[],[\+],[X],[^\(.\)\([0123456789].*\)$],[[[\1_\2]]],
|
|
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]],[_],
|
|
[^._\(.*\)_.$],[[[\1]]])])
|