🗑 Remove unused code

This commit is contained in:
C-3PO 2018-09-14 00:56:32 +02:00
parent 43614e1498
commit c02caaf2ff
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
2 changed files with 9 additions and 22 deletions

View file

@ -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",

View file

@ -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
}
}