summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-09-16 23:33:36 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-09-16 23:33:36 +0000
commit2b471273798ec4a698eca6783f2de9057ca6584f (patch)
treee397b131e8938285737e1e37bd6bf90ed5288b53 /lib
parent1565ba49007b6a9a443da4e293843deae217f311 (diff)
Enforce that arrangement names are legal C identifiers
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4872 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/CST9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST
index cc19aa7c..1f407dcc 100644
--- a/lib/sbin/CST
+++ b/lib/sbin/CST
@@ -231,6 +231,15 @@ sub CreateThornList
$package = $1;
$thorn_name = $2;
+ # Check valid arrangement name
+ if (!TestName(1,$package))
+ {
+ &CST_error(0, "Arrangement name $package is not valid",
+ 'Arrangement names must begin with a letter, can only contain ' .
+ 'letters, numbers and underscores, and must contain at most 27 ' .
+ 'characters', __LINE__, __FILE__);
+ }
+
# Check valid thornname
if (!TestName(1,$thorn_name))
{