From b5e45740c0893d260492b2876dce6285eea21e74 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 17 May 2018 10:03:51 +1000 Subject: [PATCH] Rename o_0_ioptr1_v_w to o_0_ioptr_v_w --- cmd/wuffs-c/internal/cgen/statement.go | 10 ++++------ gen/c/std/gif.c | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cmd/wuffs-c/internal/cgen/statement.go b/cmd/wuffs-c/internal/cgen/statement.go index 81ac65c8..131e2bc2 100644 --- a/cmd/wuffs-c/internal/cgen/statement.go +++ b/cmd/wuffs-c/internal/cgen/statement.go @@ -180,12 +180,10 @@ func (g *gen) writeStatementIOBind(b *buffer, n *a.IOBind, depth uint32) error { // TODO: save / restore all ioptr vars, not just for local IO vars? How // does this work if the io_bind body advances these pointers, either // directly or by calling other funcs? - // - // TODO: rename ioptr1 to ioptr, etc. if e.Operator() == 0 { - b.printf("uint8_t *%s%d_ioptr1_%s%s = ioptr_%s;\n", + b.printf("uint8_t *%s%d_ioptr_%s%s = ioptr_%s;\n", oPrefix, ioBindNum, prefix, name, name) - b.printf("uint8_t *%s%d_ioptr2_%s%s = iobounds1_%s;\n", + b.printf("uint8_t *%s%d_iobounds1_%s%s = iobounds1_%s;\n", oPrefix, ioBindNum, prefix, name, name) } } @@ -206,9 +204,9 @@ func (g *gen) writeStatementIOBind(b *buffer, n *a.IOBind, depth uint32) error { b.printf("%s%s = %s%d_%s%s;\n", prefix, name, oPrefix, ioBindNum, prefix, name) if e.Operator() == 0 { - b.printf("ioptr_%s = %s%d_ioptr1_%s%s;\n", + b.printf("ioptr_%s = %s%d_ioptr_%s%s;\n", name, oPrefix, ioBindNum, prefix, name) - b.printf("iobounds1_%s = %s%d_ioptr2_%s%s;\n", + b.printf("iobounds1_%s = %s%d_iobounds1_%s%s;\n", name, oPrefix, ioBindNum, prefix, name) } } diff --git a/gen/c/std/gif.c b/gen/c/std/gif.c index b8057242..62d1fcc0 100644 --- a/gen/c/std/gif.c +++ b/gen/c/std/gif.c @@ -2935,8 +2935,8 @@ static wuffs_gif__status wuffs_gif__decoder__decode_id( { wuffs_base__io_reader o_0_a_src = a_src; wuffs_base__io_writer o_0_v_w = v_w; - uint8_t* o_0_ioptr1_v_w = ioptr_w; - uint8_t* o_0_ioptr2_v_w = iobounds1_w; + uint8_t* o_0_ioptr_v_w = ioptr_w; + uint8_t* o_0_iobounds1_v_w = iobounds1_w; wuffs_base__io_writer__set( &v_w, &u_w, &ioptr_w, &iobounds1_w, wuffs_base__slice_u8__subslice_i( @@ -2972,8 +2972,8 @@ static wuffs_gif__status wuffs_gif__decoder__decode_id( }) .len))); v_w = o_0_v_w; - ioptr_w = o_0_ioptr1_v_w; - iobounds1_w = o_0_ioptr2_v_w; + ioptr_w = o_0_ioptr_v_w; + iobounds1_w = o_0_iobounds1_v_w; a_src = o_0_a_src; } if ((v_z == 0) || (v_z == WUFFS_GIF__SUSPENSION_SHORT_WRITE)) {