using stdbool

1. Using stdbool.h for bool
2. Changed formatting for output on command complete/fail.
main
lomna 1 year ago
parent 1c3ec2c102
commit dc70c4452d

@ -3,13 +3,12 @@
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdbool.h>
#include "sha1.h" #include "sha1.h"
#include "lookup_list.h" #include "lookup_list.h"
#define MAX_TASKS 5 #define MAX_TASKS 5
typedef enum {false, true} bool;
typedef struct TASKS_str_linked_list{ typedef struct TASKS_str_linked_list{
char *data; char *data;
struct TASKS_str_linked_list *next; struct TASKS_str_linked_list *next;
@ -289,9 +288,9 @@ void TASKS_do_tasks_ifchange(char *filename){
perror(cmd); perror(cmd);
if(r_code != EXIT_SUCCESS) if(r_code != EXIT_SUCCESS)
printf("[✗] FAILED COMMAND : %s\n[✗] C system() function return value : %d\n", cmd, r_code); printf("[✗] FAILED COMMAND : %s ; C system() function return value : %d\n", cmd, r_code);
else else
printf("[✔] COMPLETED COMMAND : %s\n[✔] C system() function return value : %d\n", cmd, r_code); printf("[✔] COMPLETED COMMAND : %s ; C system() function return value : %d\n", cmd, r_code);
cll = cll->next; cll = cll->next;
} }
printf("\n"); printf("\n");

Loading…
Cancel
Save