diff --git a/include/c4script/c4script.h b/include/c4script/c4script.h index 3d522ae7e..2f3eb0aea 100644 --- a/include/c4script/c4script.h +++ b/include/c4script/c4script.h @@ -1,7 +1,7 @@ /* * OpenClonk, http://www.openclonk.org * - * Copyright (c) 2012-2013, The OpenClonk Team and contributors + * Copyright (c) 2012-2015, The OpenClonk Team and contributors * * Distributed under the terms of the ISC license; see accompanying file * "COPYING" for details. @@ -20,7 +20,8 @@ extern "C" { #endif -int c4s_runscript(const char * filename); +int c4s_runfile(const char *filename); +int c4s_runstring(const char *script); #ifdef __cplusplus } diff --git a/src/script/C4ScriptMain.cpp b/src/script/C4ScriptMain.cpp index add0a9c32..148d74536 100644 --- a/src/script/C4ScriptMain.cpp +++ b/src/script/C4ScriptMain.cpp @@ -1,7 +1,7 @@ /* * OpenClonk, http://www.openclonk.org * - * Copyright (c) 2012-2013, The OpenClonk Team and contributors + * Copyright (c) 2012-2015, The OpenClonk Team and contributors * * Distributed under the terms of the ISC license; see accompanying file * "COPYING" for details. @@ -17,7 +17,30 @@ // c4script.h is useable without that. #include "../../include/c4script/c4script.h" +#include +#include + +int usage(const char *argv0) +{ + fprintf(stderr, "Usage:\n%s -e