expreg.h 566 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * File: expreg.h
  3. * Author: Arthur Brandao
  4. *
  5. * Created on 21 décembre 2018
  6. */
  7. #ifndef EXPREG_H
  8. #define EXPREG_H
  9. /* --- Include --- */
  10. #include <regex.h>
  11. #include "constante.h"
  12. /* --- Structure --- */
  13. typedef struct{
  14. char* str; //La chaine à vérifier
  15. int pos; //Position actuel dans la chaine à verifier
  16. regex_t regex;
  17. size_t nmatch;
  18. regmatch_t* pmatch;
  19. }expreg;
  20. /* --- Fonctions --- */
  21. boolean ini_expreg(expreg*, char*, char*);
  22. char* get_match_expreg(expreg*, int*, int*);
  23. void clean_expreg(expreg*);
  24. #endif /* EXPREG_H */