Skip to content

Commit

Permalink
kfc.c: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpcpc authored Jul 13, 2020
1 parent a891be0 commit 09dafae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kfc.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <dirent.h>
#include <getopt.h>
#include "kfc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#include "kfc.h"


int
Expand Down Expand Up @@ -88,13 +88,13 @@ list_palette(void)

if (p.dr == NULL)
{
printf("Could not open directory");
fprintf(stderr, "Could not open directory");
return 1;
}

while((de = readdir(p.dr)) != NULL)
{
printf("%s\n", de->d_name);
puts(de->d_name);
}

closedir(p.dr);
Expand All @@ -109,7 +109,7 @@ random_palette(void)
p.randf = 0;
if (p.dr == NULL)
{
printf("Could not open directory");
fprintf(stderr, "Could not open directory");
return 1;
}

Expand Down Expand Up @@ -141,7 +141,7 @@ print_palette(void)
p.line = malloc(sizeof(char) * p.len);
p.fp = fopen(p.CCUR, "r");
fgets(p.line,p.len, p.fp);
printf("\nUsing: %s\n", p.line);
puts(p.line);
fclose(p.fp);
for (p.i = 0; p.i < 15; p.i++)
{
Expand All @@ -152,7 +152,7 @@ print_palette(void)
printf("\n");
}
}
printf("\n\n");
printf("\n");
return 0;
}

Expand Down

0 comments on commit 09dafae

Please sign in to comment.