make Systemwipe.te
This commit is contained in:
@@ -173,6 +173,10 @@ ClassFunction(arrayContains) {
|
||||
|
||||
for (int i = 0; i < v->count; i++) {
|
||||
Variable_t iter = arrayClassGetIdx(caller, i);
|
||||
|
||||
if (iter.variableType != arg->variableType){
|
||||
SCRIPT_FATAL_ERR("type of contains does not match");
|
||||
}
|
||||
|
||||
if (caller->variableType == StringArrayClass) {
|
||||
if (!strcmp(arg->string.value, iter.string.value))
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
#ifdef WIN32
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#define gfx_printf(str, ...) printf(str, ##__VA_ARGS__)
|
||||
#define gfx_printf(str, ...) printf(str, ##__VA_ARGS__)
|
||||
#define gfx_vprintf(str, va) vprintf(str, va);
|
||||
#define gfx_putc(x) gfx_printf("%c", x)
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||
#define LP_VER_MJ 3
|
||||
#define LP_VER_MN 0
|
||||
|
||||
@@ -78,7 +78,8 @@ ClassFunction(stdPrint) {
|
||||
Variable_t* res = callMemberFunctionDirect(args[i], "print", NULL, 0);
|
||||
if (res == NULL)
|
||||
return NULL;
|
||||
gfx_putc(' ');
|
||||
if (i + 1 != argsLen)
|
||||
gfx_putc(' ');
|
||||
}
|
||||
|
||||
|
||||
@@ -351,6 +352,10 @@ ClassFunction(stdFileExists){
|
||||
return newIntVariablePtr(FileExists(args[0]->string.value));
|
||||
}
|
||||
|
||||
ClassFunction(stdFileDel){
|
||||
return newIntVariablePtr(f_unlink(args[0]->string.value));
|
||||
}
|
||||
|
||||
#else
|
||||
#define STUBBED(name) ClassFunction(name) { return newIntVariablePtr(0); }
|
||||
|
||||
@@ -388,6 +393,12 @@ STUBBED(stdPause)
|
||||
STUBBED(stdPauseMask)
|
||||
STUBBED(stdColor)
|
||||
STUBBED(stdMenuFull)
|
||||
STUBBED(stdMountEmummc)
|
||||
STUBBED(stdHasEmu)
|
||||
STUBBED(stdGetMs)
|
||||
STUBBED(stdClear)
|
||||
STUBBED(stdRmDir)
|
||||
STUBBED(stdFileExists)
|
||||
#endif
|
||||
|
||||
u8 oneIntoneFunction[] = { IntClass, FunctionClass };
|
||||
@@ -425,6 +436,7 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = {
|
||||
{"timer", stdGetMs, 0, 0},
|
||||
{"deldir", stdRmDir, 1, oneStringArgStd},
|
||||
{"fsexists", stdFileExists, 1, oneStringArgStd},
|
||||
{"delfile", stdFileDel, 1, oneStringArgStd},
|
||||
};
|
||||
|
||||
ClassFunctionTableEntry_t* searchStdLib(char* funcName, u8 *len) {
|
||||
|
||||
Reference in New Issue
Block a user