mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-19 21:03:57 -07:00
.
This commit is contained in:
parent
08cd603623
commit
6ac70ba808
3 changed files with 9 additions and 15 deletions
|
@ -156,21 +156,21 @@ int main(int argc,char **argv)
|
|||
fprintf(stderr,"FATAL: serialization test failed!"ZT_EOL_S);
|
||||
return 1;
|
||||
}
|
||||
fwrite(outtmp.data(),outtmp.size(),1,stdout);
|
||||
fflush(stdout);
|
||||
//fwrite(outtmp.data(),outtmp.size(),1,stdout);
|
||||
//fflush(stdout);
|
||||
|
||||
fprintf(stderr,"INFO: wrote %u bytes to stdout"ZT_EOL_S,outtmp.size());
|
||||
//fprintf(stderr,"INFO: wrote %u bytes to stdout"ZT_EOL_S,outtmp.size());
|
||||
|
||||
fprintf(stderr,ZT_EOL_S);
|
||||
fprintf(stderr,"#define ZT_DEFAULT_WORLD_LENGTH %u"ZT_EOL_S,outtmp.size());
|
||||
fprintf(stderr,"static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {");
|
||||
fprintf(stdout,ZT_EOL_S);
|
||||
fprintf(stdout,"#define ZT_DEFAULT_WORLD_LENGTH %u"ZT_EOL_S,outtmp.size());
|
||||
fprintf(stdout,"static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {");
|
||||
for(unsigned int i=0;i<outtmp.size();++i) {
|
||||
const unsigned char *d = (const unsigned char *)outtmp.data();
|
||||
if (i > 0)
|
||||
fprintf(stderr,",");
|
||||
fprintf(stderr,"0x%.2x",(unsigned int)d[i]);
|
||||
fprintf(stdout,",");
|
||||
fprintf(stdout,"0x%.2x",(unsigned int)d[i]);
|
||||
}
|
||||
fprintf(stderr,"};"ZT_EOL_S);
|
||||
fprintf(stdout,"};"ZT_EOL_S);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue