🗑 Remove unused code
This commit is contained in:
parent
43614e1498
commit
c02caaf2ff
2 changed files with 9 additions and 22 deletions
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -4,7 +4,9 @@
|
|||
"decrypt.h": "c",
|
||||
"stdint.h": "c",
|
||||
"decryptutilities.h": "c",
|
||||
"fileutilities.h": "c"
|
||||
"fileutilities.h": "c",
|
||||
"stdio.h": "c",
|
||||
"stdlib.h": "c"
|
||||
},
|
||||
"cSpell.words": [
|
||||
"init",
|
||||
|
|
27
src/main.c
27
src/main.c
|
@ -1,4 +1,3 @@
|
|||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
@ -38,10 +37,7 @@ struct arguments {
|
|||
unsigned long fileSize;
|
||||
//Decryption keys
|
||||
bool isEncrypted;
|
||||
uint32_t key0;
|
||||
uint32_t key1;
|
||||
uint32_t key2;
|
||||
//TODO: For xdelta3, the location of the old file
|
||||
//For xdelta3, the location of the old file
|
||||
char* prevFile;
|
||||
};
|
||||
|
||||
|
@ -65,7 +61,7 @@ int main(int argc, char *argv[]) {
|
|||
//in this variable, getopt_long stores the current position in the command line args array
|
||||
int option_index = 0;
|
||||
|
||||
int curOption = getopt_long(argc, argv, "d:o:s:k:", long_options, &option_index);
|
||||
int curOption = getopt_long(argc, argv, "d:o:s:k:p:", long_options, &option_index);
|
||||
|
||||
//end of command line arguments reached
|
||||
if (curOption == -1) {
|
||||
|
@ -95,6 +91,9 @@ int main(int argc, char *argv[]) {
|
|||
state.isEncrypted = true;
|
||||
break;
|
||||
}
|
||||
case 'p': //prev file for xdelta3
|
||||
//TODO
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unknown option '%c'.", (char)curOption);
|
||||
exit(1);
|
||||
|
@ -106,20 +105,6 @@ int main(int argc, char *argv[]) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
//TODO: verify argv and assign it to variables
|
||||
//char* archiveName = argv[1];
|
||||
//const unsigned long archiveOffset = atol(argv[2]);
|
||||
//const unsigned long fileLength = atol(argv[3]);
|
||||
|
||||
//const bool isEncrypted = argc == 7;
|
||||
/*if (isEncrypted) {
|
||||
uint32_t key0 = atoi(argv[4]);
|
||||
uint32_t key1 = atoi(argv[5]);
|
||||
uint32_t key2 = atoi(argv[6]);
|
||||
//Initialize decryption (pass decryption keys)
|
||||
initDecryptor(key0, key1, key2);
|
||||
}*/
|
||||
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t* compressedChunk = malloc(BUFFER_SIZE);
|
||||
|
@ -201,7 +186,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
//Optionally perform xdelta3
|
||||
if (state.prevFile) {
|
||||
//TODO
|
||||
//TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue