diff options
author | entrpntr <entrpntr@gmail.com> | 2020-05-28 06:44:10 -0400 |
---|---|---|
committer | entrpntr <entrpntr@gmail.com> | 2020-06-14 15:07:27 -0400 |
commit | 4ac8bcc29a4ad5bb908b692baa040e7c7eb21249 (patch) | |
tree | d4e14bd6d9c367a1d5993dc9729451a3770f9870 /tools/lz/packing.c | |
parent | 4517c08edaa6783fac0fb15dd98b476e066134f8 (diff) |
Checkpoint where things mostly work.
Diffstat (limited to 'tools/lz/packing.c')
-rw-r--r-- | tools/lz/packing.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/lz/packing.c b/tools/lz/packing.c index b3e64634..3623be96 100644 --- a/tools/lz/packing.c +++ b/tools/lz/packing.c @@ -17,7 +17,7 @@ void optimize (struct command * commands, unsigned short count) { next -> command = 7; continue; } - if (next -> command == commands -> command) { + if (next -> command == commands -> command) switch (commands -> command) { case 0: if ((commands -> value + commands -> count) != next -> value) break; @@ -31,7 +31,6 @@ void optimize (struct command * commands, unsigned short count) { break; case 1: if (commands -> value != next -> value) break; - // fallthrough case 3: if ((commands -> count + next -> count) <= MAX_COMMAND_COUNT) { commands -> count += next -> count; @@ -40,9 +39,7 @@ void optimize (struct command * commands, unsigned short count) { } next -> count = (commands -> count + next -> count) - MAX_COMMAND_COUNT; commands -> count = MAX_COMMAND_COUNT; - break; } - } commands = next; } } |