diff options
author | Thomas White <taw@bitwiz.me.uk> | 2018-07-06 22:53:59 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2018-07-06 22:54:26 +0200 |
commit | a2ef3f8b5c1504d33f300ef6b14625ccf199ed98 (patch) | |
tree | a895065e3d77938dbd9f9c2f8d11acf4b468d3f1 /src/sc_interp.c | |
parent | 709c9325c2186ae79097545ddf04a9a57c44df58 (diff) |
Expose sc_interp_run_style()
Diffstat (limited to 'src/sc_interp.c')
-rw-r--r-- | src/sc_interp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c index 3b7d913..20593a1 100644 --- a/src/sc_interp.c +++ b/src/sc_interp.c @@ -763,6 +763,8 @@ static void set_padding(struct frame *fr, const char *opts) if ( parse_tuple(opts, p) ) return; + if ( fr == NULL ) return; + fr->pad_l = p[0]; fr->pad_r = p[1]; fr->pad_t = p[2]; @@ -1083,7 +1085,7 @@ static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl, } -static void run_style(SCInterpreter *scin, const char *sname) +void sc_interp_run_style(SCInterpreter *scin, const char *sname) { int i; struct sc_state *st = &scin->state[scin->j]; @@ -1148,7 +1150,7 @@ static int check_outputs(SCBlock *bl, SCInterpreter *scin) maybe_recurse_before(scin, child); set_frame(scin, fr); - run_style(scin, "frame"); + sc_interp_run_style(scin, "frame"); maybe_recurse_after(scin, child); } else if ( strcmp(name, "newpara")==0 ) { @@ -1256,7 +1258,7 @@ int sc_interp_add_block(SCInterpreter *scin, SCBlock *bl) } else if ( strcmp(name, "presentation") == 0 ) { maybe_recurse_before(scin, child); - run_style(scin, "narrative"); + sc_interp_run_style(scin, "narrative"); maybe_recurse_after(scin, child); } else if ( strcmp(name, "stylesheet") == 0 ) { @@ -1264,7 +1266,7 @@ int sc_interp_add_block(SCInterpreter *scin, SCBlock *bl) } else if ( strcmp(name, "slide") == 0 ) { maybe_recurse_before(scin, child); - run_style(scin, "slide"); + sc_interp_run_style(scin, "slide"); maybe_recurse_after(scin, child); } else if ( strcmp(name, "font") == 0 ) { |