diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-07 23:08:20 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-07 23:08:20 +0000 |
commit | 7ecb0a47ff752aa7e147a56f7e86ef31dcf33f50 (patch) | |
tree | ac005573d39e0f8ed9a309dcb478dd33f79a637c /wk4/pset/recover/recover.c | |
parent | 7e0c08172f6ab1574de497a613eedd789e0daa62 (diff) |
Sun, Apr 7, 2024, 4:08 PM -07:00
Diffstat (limited to 'wk4/pset/recover/recover.c')
-rw-r--r-- | wk4/pset/recover/recover.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wk4/pset/recover/recover.c b/wk4/pset/recover/recover.c index 8cb4aa2..2256cb8 100644 --- a/wk4/pset/recover/recover.c +++ b/wk4/pset/recover/recover.c @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) if (first 3 bytes are 0xff 0xd8 0xff AND 4th byte is 0xe* (* denotes anything)) { this is a photo; remember the pointer - + int photolength = 0; // look through the blocks ahead of this one for a new photo for (file length left) { @@ -39,10 +39,11 @@ int main(int argc, char *argv[]) break } } - file name = files.jpg + filename = files.jpg files++ - Open output file with name (file name) + Open output file with name (filename) Copy data from old to new file --> + int data[photolength][512] fread() fwrite() } |