Browse Source

better icon128

release/v0.1
jl777 9 years ago
parent
commit
2add571add
  1. 21
      crypto777/cJSON.c
  2. BIN
      iguana/icon128.jpg
  3. 2
      iguana/main.c
  4. 12
      iguana/pnacl/Release/iguana.nmf
  5. BIN
      iguana/pnacl/Release/iguana.pexe

21
crypto777/cJSON.c

@ -170,7 +170,7 @@ static const char *parse_string(cJSON *item,const char *str)
const char *ptr=str+1;char *ptr2;char *out;int32_t len=0;unsigned uc,uc2;
if (*str!='\"') {ep=str;return 0;} /* not a string! */
while (*ptr!='\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++; /* Skip escaped quotes. */
while (*ptr!='\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++; // Skip escaped quotes
out=(char*)cJSON_malloc(len+2); /* This is how long we need for the string, roughly. */
if (!out) return 0;
@ -178,7 +178,12 @@ static const char *parse_string(cJSON *item,const char *str)
ptr=str+1;ptr2=out;
while (*ptr!='\"' && *ptr)
{
if (*ptr!='\\') *ptr2++=*ptr++;
if (*ptr!='\\')
{
if ( *ptr == '%' && is_hexstr((char *)&ptr[1],2) && isprint(_decode_hex((char *)&ptr[1])) != 0 )
*ptr2++ = _decode_hex((char *)&ptr[1]), ptr += 3;
else *ptr2++ = *ptr++;
}
else
{
ptr++;
@ -189,16 +194,16 @@ static const char *parse_string(cJSON *item,const char *str)
case 'n': *ptr2++='\n'; break;
case 'r': *ptr2++='\r'; break;
case 't': *ptr2++='\t'; break;
case 'u': /* transcode utf16 to utf8. */
uc=parse_hex4(ptr+1);ptr+=4; /* get the unicode char. */
case 'u': // transcode utf16 to utf8
uc=parse_hex4(ptr+1);ptr+=4; // get the unicode char
if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0) break; /* check for invalid. */
if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0) break; // check for invalid
if (uc>=0xD800 && uc<=0xDBFF) /* UTF16 surrogate pairs. */
if (uc>=0xD800 && uc<=0xDBFF) // UTF16 surrogate pairs
{
if (ptr[1]!='\\' || ptr[2]!='u') break; /* missing second-half of surrogate. */
if (ptr[1]!='\\' || ptr[2]!='u') break; // missing second-half of surrogate.
uc2=parse_hex4(ptr+3);ptr+=6;
if (uc2<0xDC00 || uc2>0xDFFF) break; /* invalid second-half of surrogate. */
if (uc2<0xDC00 || uc2>0xDFFF) break; // invalid second-half of surrogate
uc=0x10000 + (((uc&0x3FF)<<10) | (uc2&0x3FF));
}

BIN
iguana/icon128.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

2
iguana/main.c

@ -293,7 +293,7 @@ void iguana_main(void *arg)
printf("t.%u -> %s -> %u diff.[%d]\n",t-i,str,s,(t-i) - s);
}
iguana_chaingenesis(1,1403138561,0x1e0fffff,8359109,bits256_conv("fd1751cc6963d88feca94c0d01da8883852647a37a0a67ce254d62dd8c9d5b2b"));
iguana_chaingenesis(1,1409832000,0x1e0fffff,64881664,bits256_conv("698a93a1cacd495a7a4fb3864ad8d06ed4421dedbc57f9aaad733ea53b1b5828"));
iguana_chaingenesis(1,1409839200,0x1e0fffff,64881664,bits256_conv("698a93a1cacd495a7a4fb3864ad8d06ed4421dedbc57f9aaad733ea53b1b5828"));
mycalloc(0,0,0);
iguana_initQ(&helperQ,"helperQ");

12
iguana/pnacl/Release/iguana.nmf

@ -1,12 +0,0 @@
{
"program": {
"portable": {
"pnacl-translate": {
"url": "iguana.pexe"
},
"pnacl-debug": {
"url": "iguana_unstripped.bc"
}
}
}
}

BIN
iguana/pnacl/Release/iguana.pexe

Binary file not shown.
Loading…
Cancel
Save