mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-26 20:17:12 +02:00
bin
cmake
module
Base
Core
Entity
Library
Misc
Vendor
AES256
ASIO
B64
CPR
CURL
CMake
include
lib
m4
ax_compile_check_sizeof.m4
curl-compilers.m4
curl-confopts.m4
curl-functions.m4
curl-openssl.m4
curl-override.m4
curl-reentrant.m4
xc-am-iface.m4
xc-cc-check.m4
xc-lt-iface.m4
xc-translit.m4
xc-val-flgs.m4
zz40-xc-ovr.m4
zz50-xc-ovr.m4
zz60-xc-ovr.m4
packages
plan9
scripts
src
winbuild
CHANGES
CMakeLists.txt
COPYING
GIT-INFO
MacOSX-Framework
Makefile.am
Makefile.dist
README
README.md
RELEASE-NOTES
SECURITY.md
acinclude.m4
appveyor.yml
buildconf
buildconf.bat
configure.ac
curl-config.in
libcurl.pc.in
maketgz
CivetWeb
ConcurrentQueue
Fmt
Hash
MDBC
MaxmindDB
PUGIXML
SQLite
SimpleIni
SimpleSocket
SleepyDiscord
TinyDir
WebSocketPP
Whirlpool
ZLib
CMakeLists.txt
CMakeLists.txt
Core.cpp
Core.hpp
Logger.cpp
Logger.hpp
Main.cpp
Register.cpp
SqBase.hpp
sdk
.gitignore
.gitmodules
CMakeLists.txt
LICENSE
README.md
164 lines
5.7 KiB
Plaintext
164 lines
5.7 KiB
Plaintext
#---------------------------------------------------------------------------
|
|
#
|
|
# xc-translit.m4
|
|
#
|
|
# Copyright (c) 2011 - 2020, Daniel Stenberg <daniel@haxx.se>
|
|
#
|
|
# Permission to use, copy, modify, and distribute this software for any
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
# copyright notice and this permission notice appear in all copies.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
#
|
|
#---------------------------------------------------------------------------
|
|
|
|
# File version for 'aclocal' use. Keep it a single number.
|
|
# serial 2
|
|
|
|
|
|
dnl XC_SH_TR_SH (expression)
|
|
dnl -------------------------------------------------
|
|
dnl Shell execution time transliteration of 'expression'
|
|
dnl argument, where all non-alfanumeric characters are
|
|
dnl converted to the underscore '_' character.
|
|
dnl Normal shell expansion and substitution takes place
|
|
dnl for given 'expression' at shell execution time before
|
|
dnl transliteration is applied to it.
|
|
|
|
AC_DEFUN([XC_SH_TR_SH],
|
|
[`echo "$1" | sed 's/[[^a-zA-Z0-9_]]/_/g'`])
|
|
|
|
|
|
dnl XC_SH_TR_SH_EX (expression, [extra])
|
|
dnl -------------------------------------------------
|
|
dnl Like XC_SH_TR_SH but transliterating characters
|
|
dnl given in 'extra' argument to lowercase 'p'. For
|
|
dnl example [*+], [*], and [+] are valid 'extra' args.
|
|
|
|
AC_DEFUN([XC_SH_TR_SH_EX],
|
|
[ifelse([$2], [],
|
|
[XC_SH_TR_SH([$1])],
|
|
[`echo "$1" | sed 's/[[$2]]/p/g' | sed 's/[[^a-zA-Z0-9_]]/_/g'`])])
|
|
|
|
|
|
dnl XC_M4_TR_SH (expression)
|
|
dnl -------------------------------------------------
|
|
dnl m4 execution time transliteration of 'expression'
|
|
dnl argument, where all non-alfanumeric characters are
|
|
dnl converted to the underscore '_' character.
|
|
|
|
AC_DEFUN([XC_M4_TR_SH],
|
|
[patsubst(XC_QPATSUBST(XC_QUOTE($1),
|
|
[[^a-zA-Z0-9_]], [_]),
|
|
[\(_\(.*\)_\)], [\2])])
|
|
|
|
|
|
dnl XC_M4_TR_SH_EX (expression, [extra])
|
|
dnl -------------------------------------------------
|
|
dnl Like XC_M4_TR_SH but transliterating characters
|
|
dnl given in 'extra' argument to lowercase 'p'. For
|
|
dnl example [*+], [*], and [+] are valid 'extra' args.
|
|
|
|
AC_DEFUN([XC_M4_TR_SH_EX],
|
|
[ifelse([$2], [],
|
|
[XC_M4_TR_SH([$1])],
|
|
[patsubst(XC_QPATSUBST(XC_QPATSUBST(XC_QUOTE($1),
|
|
[[$2]],
|
|
[p]),
|
|
[[^a-zA-Z0-9_]], [_]),
|
|
[\(_\(.*\)_\)], [\2])])])
|
|
|
|
|
|
dnl XC_SH_TR_CPP (expression)
|
|
dnl -------------------------------------------------
|
|
dnl Shell execution time transliteration of 'expression'
|
|
dnl argument, where all non-alfanumeric characters are
|
|
dnl converted to the underscore '_' character and alnum
|
|
dnl characters are converted to uppercase.
|
|
dnl Normal shell expansion and substitution takes place
|
|
dnl for given 'expression' at shell execution time before
|
|
dnl transliteration is applied to it.
|
|
|
|
AC_DEFUN([XC_SH_TR_CPP],
|
|
[`echo "$1" | dnl
|
|
sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
|
|
sed 's/[[^A-Z0-9_]]/_/g'`])
|
|
|
|
|
|
dnl XC_SH_TR_CPP_EX (expression, [extra])
|
|
dnl -------------------------------------------------
|
|
dnl Like XC_SH_TR_CPP but transliterating characters
|
|
dnl given in 'extra' argument to uppercase 'P'. For
|
|
dnl example [*+], [*], and [+] are valid 'extra' args.
|
|
|
|
AC_DEFUN([XC_SH_TR_CPP_EX],
|
|
[ifelse([$2], [],
|
|
[XC_SH_TR_CPP([$1])],
|
|
[`echo "$1" | dnl
|
|
sed 's/[[$2]]/P/g' | dnl
|
|
sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
|
|
sed 's/[[^A-Z0-9_]]/_/g'`])])
|
|
|
|
|
|
dnl XC_M4_TR_CPP (expression)
|
|
dnl -------------------------------------------------
|
|
dnl m4 execution time transliteration of 'expression'
|
|
dnl argument, where all non-alfanumeric characters are
|
|
dnl converted to the underscore '_' character and alnum
|
|
dnl characters are converted to uppercase.
|
|
|
|
AC_DEFUN([XC_M4_TR_CPP],
|
|
[patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QUOTE($1),
|
|
[abcdefghijklmnopqrstuvwxyz],
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
|
|
[[^A-Z0-9_]], [_]),
|
|
[\(_\(.*\)_\)], [\2])])
|
|
|
|
|
|
dnl XC_M4_TR_CPP_EX (expression, [extra])
|
|
dnl -------------------------------------------------
|
|
dnl Like XC_M4_TR_CPP but transliterating characters
|
|
dnl given in 'extra' argument to uppercase 'P'. For
|
|
dnl example [*+], [*], and [+] are valid 'extra' args.
|
|
|
|
AC_DEFUN([XC_M4_TR_CPP_EX],
|
|
[ifelse([$2], [],
|
|
[XC_M4_TR_CPP([$1])],
|
|
[patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QPATSUBST(XC_QUOTE($1),
|
|
[[$2]],
|
|
[P]),
|
|
[abcdefghijklmnopqrstuvwxyz],
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
|
|
[[^A-Z0-9_]], [_]),
|
|
[\(_\(.*\)_\)], [\2])])])
|
|
|
|
|
|
dnl XC_QUOTE (expression)
|
|
dnl -------------------------------------------------
|
|
dnl Expands to quoted result of 'expression' expansion.
|
|
|
|
AC_DEFUN([XC_QUOTE],
|
|
[[$@]])
|
|
|
|
|
|
dnl XC_QPATSUBST (string, regexp[, repl])
|
|
dnl -------------------------------------------------
|
|
dnl Expands to quoted result of 'patsubst' expansion.
|
|
|
|
AC_DEFUN([XC_QPATSUBST],
|
|
[XC_QUOTE(patsubst([$1], [$2], [$3]))])
|
|
|
|
|
|
dnl XC_QTRANSLIT (string, chars, repl)
|
|
dnl -------------------------------------------------
|
|
dnl Expands to quoted result of 'translit' expansion.
|
|
|
|
AC_DEFUN([XC_QTRANSLIT],
|
|
[XC_QUOTE(translit([$1], [$2], [$3]))])
|