aboutsummaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ls.c b/src/ls.c
index 0f984fb..8164a95 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -25,18 +25,18 @@
// --- PRIVATE VARIABLES -------------------------------------------------------
// --- PUBLIC FUNCTIONS --------------------------------------------------------
-ls_error_t ls_run(ls_context_t * ctx, ls_value_t * pool, size_t szpool)
+ls_error_t ls_run(ls_t * self, ls_value_t * pool, size_t szpool)
{
- if (setjmp(ctx->error_jmp_buf))
+ if (setjmp(self->error_jmp_buf))
{
- return ctx->error;
+ return self->error;
}
- ls_init_ctx(ctx, pool, szpool);
+ ls_init(self, pool, szpool);
- while (!ctx->stop)
+ while (!self->stop)
{
- if (!ls_exec_line(ctx))
+ if (!ls_exec_line(self))
return LS_OK;
}
@@ -138,7 +138,7 @@ void ls_print_value(FILE * stream, ls_value_t * value, ls_value_t * first)
}
}
-bool ls_translate_pc(ls_context_t * ctx, ls_addr_t pc, uint16_t * line,
+bool ls_translate_pc(ls_t * self, ls_addr_t pc, uint16_t * line,
uint16_t * col)
{
uint16_t n_line = 1, n_col = 1;
@@ -146,7 +146,7 @@ bool ls_translate_pc(ls_context_t * ctx, ls_addr_t pc, uint16_t * line,
for (ls_addr_t i = 0; i <= pc; i++)
{
- int f = ctx->fetcher(ctx->fetcher_ctx, i);
+ int f = self->fetcher(self->fetcher_arg, i);
if (f <= 0)
return false;