-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add local PoV write file to CGC_File_System, AIS_Lite and Accel
- Loading branch information
Showing
3 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
|
||
int main(int argc, char *argv[]){ | ||
char *output_file_name = argv[1]; | ||
|
||
static unsigned char write_00000_00000[] = | ||
"\x21\x41\x41\x41\x41\x41\x2c\x31\x2c\x32\x2c\x38\x2c\x67\x43\x53" | ||
"\x3a\x68\x74\x3a\x62\x63\x35\x45\x4e\x4c\x6e\x70\x40\x30\x36\x3e" | ||
"\x45\x74\x69\x4e\x50\x4a\x69\x51\x77\x56\x69\x3e\x32\x73\x51\x4d" | ||
"\x50\x30\x32\x35\x75\x2c\x30\x2a\x31\x35\x07"; | ||
static unsigned int write_00000_00000_len = 59; | ||
|
||
static unsigned char write_00001_00000[] = | ||
"\x21\x41\x41\x41\x41\x41\x2c\x32\x2c\x32\x2c\x38\x2c\x63\x73\x70" | ||
"\x77\x77\x72\x75\x77\x63\x6f\x65\x66\x6b\x75\x68\x31\x46\x45\x69" | ||
"\x53\x37\x46\x41\x67\x72\x38\x38\x39\x64\x41\x4c\x30\x30\x30\x30" | ||
"\x30\x30\x30\x30\x2c\x30\x2a\x37\x31\x07"; | ||
static unsigned int write_00001_00000_len = 58; | ||
|
||
FILE *ptr = fopen(output_file_name, "wb"); | ||
fwrite(write_00000_00000, write_00000_00000_len, 1, ptr); | ||
fwrite(write_00001_00000, write_00001_00000_len, 1, ptr); | ||
|
||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
|
||
int main(int argc, char *argv[]){ | ||
char *output_file_name = argv[1]; | ||
|
||
static unsigned char write_00000_00000[] = | ||
"\x41\x30\x3d\x3d\x41\x31\x2b\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d" | ||
"\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53" | ||
"\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31" | ||
"\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d" | ||
"\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53" | ||
"\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31" | ||
"\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31" | ||
"\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x2c\x31\x29\x29\x29\x29" | ||
"\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x0a"; | ||
static unsigned int write_00000_00000_len = 350; | ||
|
||
static unsigned char write_00001_00000[] = | ||
"\x53\x48\x4f\x57\x20\x41\x30\x0a"; | ||
static unsigned int write_00001_00000_len = 8; | ||
|
||
|
||
static unsigned char write_00002_00000[] = | ||
"\x41\x32\x3d\x3d\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c" | ||
"\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28" | ||
"\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55" | ||
"\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c" | ||
"\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28" | ||
"\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x53\x55" | ||
"\x4d\x28\x31\x2c\x53\x55\x4d\x28\x31\x2c\x31\x29\x29\x29\x29\x29" | ||
"\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x29\x0a"; | ||
static unsigned int write_00002_00000_len = 125; | ||
|
||
|
||
static unsigned char write_00003_00000[] = | ||
"\x53\x48\x4f\x57\x20\x41\x32\x0a"; | ||
static unsigned int write_00003_00000_len = 8; | ||
|
||
static unsigned char write_00004_00000[] = | ||
"\x45\x58\x49\x54\x0a"; | ||
static unsigned int write_00004_00000_len = 5; | ||
|
||
FILE *ptr = fopen(output_file_name, "wb"); | ||
fwrite(write_00000_00000, write_00000_00000_len, 1, ptr); | ||
fwrite(write_00001_00000, write_00001_00000_len, 1, ptr); | ||
fwrite(write_00002_00000, write_00002_00000_len, 1, ptr); | ||
fwrite(write_00003_00000, write_00003_00000_len, 1, ptr); | ||
fclose(ptr); | ||
return 0; | ||
} | ||
|
65 changes: 65 additions & 0 deletions
65
challenges/CGC_File_System/pov_1/write-test-input-to-file.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
|
||
int main(int argc, char *argv[]){ | ||
char *output_file_name = argv[1]; | ||
|
||
static unsigned char write_00000_00000[] = | ||
"\x53\x45\x4e\x44\x08\x2f\x56\x46\x4b\x41\x6e\x73\x62\x60\x00\x6a" | ||
"\x4a\x41\x52\x79\x45\x4d\x45\x41\x4d\x4c\x36\x75\x44\x62\x43\x4e" | ||
"\x62\x39\x51\x58\x79\x58\x70\x53\x31\x79\x54\x43\x4c\x33\x36\x74" | ||
"\x70\x50\x37\x30\x35\x4c\x76\x67\x57\x76\x69\x37\x6b\x43\x62\x6c" | ||
"\x6b\x4a\x70\x46\x30\x7a\x6e\x62\x41\x75\x54\x4c\x4d\x36\x4b\x72" | ||
"\x37\x6c\x47\x6e\x7a\x46\x45\x4b\x6e\x71\x32\x43\x66\x57\x65\x6e" | ||
"\x4c\x55\x68\x35\x30\x79\x76\x49\x6e\x73\x4f\x67\x76\x6b\x33"; | ||
static unsigned int write_00000_00000_len = 111; | ||
|
||
static unsigned char write_00001_00000[] = | ||
"\x53\x45\x4e\x44\x0a\x2f\x44\x4a\x41\x50\x6e\x4e\x58\x69\x5a\x4a" | ||
"\x00\x4a\x68\x4c\x62\x32\x47\x31\x73\x53\x65\x4b\x35\x42\x37\x39" | ||
"\x61\x70\x67\x45\x41\x6b\x49\x4b\x42\x71\x67\x72\x4b\x68\x36\x4a" | ||
"\x45\x73\x43\x73\x4b\x44\x79\x74\x4a\x4a\x4b\x52\x37\x6f\x54\x4c" | ||
"\x66\x72\x65\x79\x34\x4a\x75\x33\x47\x6b\x77\x33\x62\x4b\x34\x74" | ||
"\x62\x75\x77\x37\x62\x56\x48\x36\x61\x54\x76"; | ||
static unsigned int write_00001_00000_len = 91; | ||
|
||
static unsigned char write_00002_00000[] = | ||
"\x53\x45\x4e\x44\x0b\x2f\x6c\x75\x73\x66\x63\x74\x53\x34\x61\x74" | ||
"\x44\x00\x58\x66\x77\x6d\x58\x47\x6b\x68\x6d\x4e\x47\x50\x76\x77" | ||
"\x78\x48\x4f\x58\x54\x74\x73\x42\x30\x59\x45\x67\x77\x35\x6e\x53" | ||
"\x6b\x63\x6b\x55\x59\x67\x45\x61\x79\x32\x67\x32\x7a\x36\x46\x59" | ||
"\x5a\x37\x36\x43\x76\x55\x78\x34\x4e\x4a\x75\x33\x71\x43\x6e\x56" | ||
"\x58\x66\x48\x74\x52\x48"; | ||
static unsigned int write_00002_00000_len = 86; | ||
|
||
static unsigned char write_00003_00000[] = | ||
"\x53\x45\x4e\x44\x0b\x2f\x51\x75\x49\x35\x62\x43\x50\x43\x50\x33" | ||
"\x21\x00\x46\x58\x70\x47\x39\x73\x5a\x73\x4d\x64\x6b\x75\x33\x6c" | ||
"\x46\x71\x69\x5a\x4e\x67\x47\x7a\x56\x6b\x72\x66\x54\x47\x53\x6e" | ||
"\x56\x6d\x45"; | ||
static unsigned int write_00003_00000_len = 51; | ||
|
||
static unsigned char write_00004_00000[] = | ||
"\x52\x45\x50\x4f\x0a\x2f\x44\x4a\x41\x50\x6e\x4e\x58\x69\x5a"; | ||
static unsigned int write_00004_00000_len = 15; | ||
|
||
static unsigned char write_00005_00000[] = | ||
"\x50\x52\x4e\x54"; | ||
static unsigned int write_00005_00000_len = 4; | ||
|
||
static unsigned char write_00006_00000[] = | ||
"\x53\x54\x4f\x50"; | ||
static unsigned int write_00006_00000_len = 4; | ||
|
||
FILE *ptr = fopen(output_file_name, "wb"); | ||
fwrite(write_00000_00000, write_00000_00000_len, 1, ptr); | ||
fwrite(write_00001_00000, write_00001_00000_len, 1, ptr); | ||
fwrite(write_00002_00000, write_00002_00000_len, 1, ptr); | ||
fwrite(write_00003_00000, write_00003_00000_len, 1, ptr); | ||
fwrite(write_00004_00000, write_00004_00000_len, 1, ptr); | ||
fwrite(write_00005_00000, write_00005_00000_len, 1, ptr); | ||
fwrite(write_00006_00000, write_00006_00000_len, 1, ptr); | ||
|
||
return 0; | ||
} | ||
|