commit b5bf93fdaedc670bef4ab38d4191dc9c0c192d26
parent bd65d08bf77f1d39df6baf364ba2ef9526bc6bcb
Author: klewer-martin <martin.cachari@gmail.com>
Date: Thu, 22 Jul 2021 17:53:42 -0300
Update reorganized directory
Diffstat:
4 files changed, 0 insertions(+), 80 deletions(-)
diff --git a/include/errors.h b/include/errors.h
@@ -1,16 +0,0 @@
-#ifndef ERRROS__H
-#define ERRORS__H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#include "types.h"
-
-void show_status(status_t st);
-
-void free_arrays(size_t num,...);
-
-extern const char *status_strings[STATUS_T_MAX];
-
-#endif
diff --git a/include/parse.h b/include/parse.h
@@ -1,4 +0,0 @@
-#ifndef PARSE__H
-#define PARSE__H
-
-#endif
diff --git a/include/types.h b/include/types.h
@@ -1,23 +0,0 @@
-#ifndef TYPES__H
-#define TYPES__H
-
-#define STATUS_T_MAX 6
-
-#define TMP_FILE_NAME "tmp.bin"
-
-typedef enum {
- OK,
- ERROR_MISSING_ARGS,
- ERROR_WRONG_FLAGS,
- ERROR_FLAG_NOT_FOUND,
- ERROR_FLAG_REPEATED,
- ERROR_OPENING_FILE,
- ERROR_MEMORY,
- ERROR_NULL_POINTER
-} status_t;
-
-typedef struct {
- int id, credit, debt;
-} ADT_user_t, *user_t;
-
-#endif
diff --git a/source/errors.c b/source/errors.c
@@ -1,37 +0,0 @@
-#include "../include/errors.h"
-
-const char *status_strings[] = {
- "Everything executed succesfully. Have a nice day.",
- "There are arguments missing",
- "There is a flags misspeled",
- "ERROR_FLAG_NOT_FOUND_",
- "ERROR_FLAG_REPEATED_",
- "ERROR_NULL_POINTER_"
-};
-
-void show_status(status_t st)
-{
- fprintf(stderr, "%s\n", status_strings[st]);
-}
-
-void free_arrays(size_t num,...)
-{
- va_list valist;
- size_t i;
-
- va_start(valist, num);
-
- for(i = 0; i < num; i++)
- free(va_arg(valist, char *));
-}
-
-void close_streams(size_t num,...)
-{
- va_list valist;
- size_t i;
-
- va_start(valist, num);
-
- for(i = 0; i < num; i++)
- free(va_arg(valist, FILE *));
-}