Replace all printfs with tf_printf, which redirects to android logging. Change into the files directory so that sqlite can do its thing. Getting closer.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4203 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
17
src/task.c
17
src/task.c
@ -3,6 +3,7 @@
|
||||
#include "bcrypt.js.h"
|
||||
#include "database.js.h"
|
||||
#include "file.js.h"
|
||||
#include "log.h"
|
||||
#include "mem.h"
|
||||
#include "packetstream.h"
|
||||
#include "serialize.h"
|
||||
@ -338,7 +339,7 @@ int tf_task_execute(tf_task_t* task, const char* fileName)
|
||||
|
||||
tf_trace_begin(task->_trace, "tf_task_execute");
|
||||
const char* source = _task_loadFile(fileName);
|
||||
printf("Running script %s\n", fileName);
|
||||
tf_printf("Running script %s\n", fileName);
|
||||
if (!*task->_scriptName)
|
||||
{
|
||||
strncpy(task->_scriptName, fileName, sizeof(task->_scriptName) - 1);
|
||||
@ -364,7 +365,7 @@ int tf_task_execute(tf_task_t* task, const char* fileName)
|
||||
JSValue result = JS_Eval(task->_context, source, strlen(source), fileName, JS_EVAL_TYPE_MODULE);
|
||||
if (tf_util_report_error(task->_context, result))
|
||||
{
|
||||
printf("Reported an error.\n");
|
||||
tf_printf("Reported an error.\n");
|
||||
}
|
||||
if (!JS_IsError(task->_context, result) && !JS_IsException(result))
|
||||
{
|
||||
@ -375,7 +376,7 @@ int tf_task_execute(tf_task_t* task, const char* fileName)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Failed to load file: %s.\n", fileName);
|
||||
tf_printf("Failed to load file: %s.\n", fileName);
|
||||
}
|
||||
tf_trace_end(task->_trace);
|
||||
return executed;
|
||||
@ -494,7 +495,7 @@ JSValue _task_invokeExport_internal(tf_taskstub_t* from, tf_task_t* to, exportid
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s: That's not an export we have (exportId=%d, exports=%d)\n", to->_scriptName, exportId, to->_export_count);
|
||||
tf_printf("%s: That's not an export we have (exportId=%d, exports=%d)\n", to->_scriptName, exportId, to->_export_count);
|
||||
}
|
||||
tf_packetstream_send(tf_taskstub_get_stream(from), kReleaseImport, (void*)&exportId, sizeof(exportId));
|
||||
return result;
|
||||
@ -600,7 +601,7 @@ void tf_task_send_promise_message(tf_task_t* from, tf_taskstub_t* to, tf_task_me
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Sending to a NULL task.\n");
|
||||
tf_printf("Sending to a NULL task.\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1240,7 +1241,7 @@ void tf_task_resolve_promise(tf_task_t* task, promiseid_t promise, JSValue value
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Didn't find promise %d to resolve.\n", promise);
|
||||
tf_printf("Didn't find promise %d to resolve.\n", promise);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
@ -1270,7 +1271,7 @@ void tf_task_reject_promise(tf_task_t* task, promiseid_t promise, JSValue value)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Didn't find promise %d to reject.\n", promise);
|
||||
tf_printf("Didn't find promise %d to reject.\n", promise);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
@ -1591,7 +1592,7 @@ void tf_task_activate(tf_task_t* task)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Assignment missing '=': %s.\n", assignment);
|
||||
tf_printf("Assignment missing '=': %s.\n", assignment);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user