+#include <stdio.h>
+#include "rsb-lz.h"
+
/* TODO: IMPLEMET THIS! */
/* Probably very broken lzw implementation by Agilent:
*
* 59b7c: 14000410 strne r0, [r0], #-1040
* 59b80: 46335053 undefined
*/
+
+void search_lz_sections(unsigned char *fw, int len)
+{
+ int i;
+ unsigned char *j;
+
+ for(i = 0; i < len - 4; i++) {
+ if (*((unsigned int*)(fw+i)) == LZ_MAGIC) {
+ j = fw + i - 1;
+ if (*j != 0x00)
+ continue;
+ printf("0x%02x: ", i);
+ j--;
+ while (j > fw) {
+ if (*j == 0x00) {
+ printf("%s", j+1);
+ break;
+ }
+ j--;
+ }
+ printf("\n");
+ }
+ }
+}