MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / read_alpha8

Function read_alpha8

tools/fshtool.c:1425–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423}
1424
1425char *read_alpha8()
1426{
1427 char *buf;
1428 FILE *f;
1429 int len;
1430
1431 f=fopen("alpha8.dat","rt");
1432 if (f==NULL) {
1433 printf("No alpha data file.\n");
1434 return "";
1435 }
1436 fseek(f,0,SEEK_END);
1437 len=ftell(f);
1438 rewind(f);
1439 buf=malloc(len+2048); /* safety margin */
1440 if (buf==NULL) { printf("Insufficient memory.\n"); abandon_ship(); }
1441 len=fread(buf,1,len+2047,f);
1442 fclose(f);
1443 printf("Backup alpha data loaded.\n");
1444 buf[len]=0;
1445 return buf;
1446}
1447
1448unsigned char *bmp_to_fsh()
1449{

Callers 1

bmp_to_fshFunction · 0.85

Calls 1

abandon_shipFunction · 0.85

Tested by

no test coverage detected