X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fpolicy_tokens.sh;fp=postlicyd%2Ftokens.sh;h=1a6b0f70bb40deb96ab548c82d2e11674388c831;hb=6aafe01d02acf2c2688ba7047b6f2f738afff50a;hp=4e1abb35d0d6bb7e2dcfb884046f55e602419295;hpb=19bea60570bcc4d5ed381940e613db110cd42bd3;p=apps%2Fpfixtools.git diff --git a/postlicyd/tokens.sh b/postlicyd/policy_tokens.sh similarity index 95% rename from postlicyd/tokens.sh rename to postlicyd/policy_tokens.sh index 4e1abb3..1a6b0f7 100755 --- a/postlicyd/tokens.sh +++ b/postlicyd/policy_tokens.sh @@ -1,4 +1,4 @@ -#! /bin/sh -e +#! /bin/bash -e die() { echo "$@" 1>&2 @@ -58,7 +58,7 @@ typedef enum postlicyd_token { extern const char *ptokens[PTK_count]; __attribute__((pure)) -postlicyd_token tokenize(const char *s, ssize_t len); +postlicyd_token policy_tokenize(const char *s, ssize_t len); #endif /* MUTT_LIB_LUA_LUA_TOKEN_H */ EOF } @@ -70,13 +70,14 @@ do_tokens() { } do_c() { + this=`basename "$0"` cat <//g' %{ `do_hdr` #include "str.h" -#include "tokens.h" +#include "`echo "${this%.sh}"`.h" static const struct tok * tokenize_aux(const char *str, unsigned int len); @@ -91,7 +92,7 @@ const char *ptokens[PTK_count] = { `grep_self "$0" | sed -e 's/.*/ "&",/'` }; -postlicyd_token tokenize(const char *s, ssize_t len) +postlicyd_token policy_tokenize(const char *s, ssize_t len) { if (len < 0) len = m_strlen(s);