removed printf and unused var
This commit is contained in:
3
colors.c
3
colors.c
@ -100,12 +100,10 @@ void colors_init() {
|
|||||||
|
|
||||||
colors = malloc(sizeof(color) * color_count);
|
colors = malloc(sizeof(color) * color_count);
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
unsigned int j = 0;
|
|
||||||
/* proper pass, reads all defined extensions within /etc/DIR_COLORS */
|
/* proper pass, reads all defined extensions within /etc/DIR_COLORS */
|
||||||
while ((tmp = getline(&line, &size, dircolors)) != -1) {
|
while ((tmp = getline(&line, &size, dircolors)) != -1) {
|
||||||
fg = 7;
|
fg = 7;
|
||||||
bg = 0;
|
bg = 0;
|
||||||
printf("%d\n",j);
|
|
||||||
if (line[0] == '.') {
|
if (line[0] == '.') {
|
||||||
extension = strtok(line, " ");
|
extension = strtok(line, " ");
|
||||||
colors[i].file_extension = malloc(strlen(extension)+1);
|
colors[i].file_extension = malloc(strlen(extension)+1);
|
||||||
@ -117,7 +115,6 @@ void colors_init() {
|
|||||||
i++;
|
i++;
|
||||||
|
|
||||||
}
|
}
|
||||||
j++;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
init_pair(0, COLOR_WHITE, COLOR_BLACK); /* unknown file */
|
init_pair(0, COLOR_WHITE, COLOR_BLACK); /* unknown file */
|
||||||
|
Reference in New Issue
Block a user