Added comments
This commit is contained in:
parent
f0600c11d8
commit
8805985855
4
main.c
4
main.c
|
@ -27,6 +27,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
// Prints the program license to the user.
|
||||||
int printLicense(int full){
|
int printLicense(int full){
|
||||||
if (full == 0) {
|
if (full == 0) {
|
||||||
printf("%s\n", LICENSE);
|
printf("%s\n", LICENSE);
|
||||||
|
@ -44,6 +45,7 @@ int printLicense(int full){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Gets the user defined directories
|
||||||
void getAdditionalDirs(){
|
void getAdditionalDirs(){
|
||||||
printf("%s\n", STR_FETCHING_ADD_DIRS);
|
printf("%s\n", STR_FETCHING_ADD_DIRS);
|
||||||
int dirs;
|
int dirs;
|
||||||
|
@ -51,7 +53,6 @@ void getAdditionalDirs(){
|
||||||
printf("%s %d\n", STR_DIR_COUNT, dirs);
|
printf("%s %d\n", STR_DIR_COUNT, dirs);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
for(unsigned short x = 0; x < dirs; x++){
|
for(unsigned short x = 0; x < dirs; x++){
|
||||||
// TODO: Tell if item is a directory. If so, then iterate through all items on it.
|
|
||||||
char dirKey[7] = "Pasta";
|
char dirKey[7] = "Pasta";
|
||||||
char* intPtr = (x + 1) + '0';
|
char* intPtr = (x + 1) + '0';
|
||||||
strcat(dirKey, &intPtr);
|
strcat(dirKey, &intPtr);
|
||||||
|
@ -63,6 +64,7 @@ void getAdditionalDirs(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleans a directory.
|
||||||
void cleanDir(const char* path){
|
void cleanDir(const char* path){
|
||||||
// Path with wildcard
|
// Path with wildcard
|
||||||
char wildPath[strlen(path) + 1];
|
char wildPath[strlen(path) + 1];
|
||||||
|
|
Reference in New Issue