9511_project03

project 3 for algorithms & programming I (9511) prof. Cardozo
Index Commits Files Refs README LICENSE
include/status.h (879B)
   1 #ifndef STATUS__H
   2 #define STATUS__H
   3 
   4 #include <stdio.h>
   5 #include <stdlib.h>
   6 #include <stdarg.h>
   7 
   8 #define MSG_ERROR_RETRY                "Verifique y vuelva a intentar"
   9 #define MSG_EXIT_SUCCESS            "Ejecución terminada exitosamente"
  10 #define MSG_USERS_REGISTERED        "Usuarios registrados"
  11 #define MSG_PROCESED_LINES            "Lineas procesadas"
  12 #define STR_INVALID_CARD_NUMBER        "Número no válido"
  13 
  14 #define STATUS_T_MAX 13
  15 
  16 typedef enum {
  17     OK,
  18     ELEM_NOT_FOUND,
  19     ERROR_MEMORY,
  20     ERROR_WRONG_FLAGS,
  21     ERROR_WRONG_TIME,
  22     ERROR_INVALID_POS,
  23     ERROR_MISSING_ARGS,
  24     ERROR_OPENING_FILE,
  25     ERROR_CORRUPT_DATA,
  26     ERROR_FLAG_REPEATED,
  27     ERROR_FLAG_NOT_FOUND,
  28     ERROR_FORMAT_NOT_FOUND,
  29     ERROR_NULL_POINTER
  30 } status_t;
  31 
  32 typedef enum {
  33     POS_ID_TXN,
  34     POS_USER_ID,
  35     POS_TXN_DATE,
  36     POS_AMOUNT,
  37     POS_CARD_NUMBER,
  38     POS_DESC
  39 } csv_pos_t;
  40 
  41 void show_status(status_t st);
  42 
  43 extern const char *status_strings[STATUS_T_MAX];
  44 
  45 #endif