kaem.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2016-2020 Jeremiah Orians
  2. * Copyright (C) 2020 fosslinux
  3. * This file is part of mescc-tools.
  4. *
  5. * mescc-tools is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * mescc-tools is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include <stdio.h>
  19. #include "../M2libc/bootstrappable.h"
  20. /*
  21. * DEFINES
  22. */
  23. #define FALSE 0
  24. #define TRUE 1
  25. // CONSTANT SUCCESS 0
  26. #define SUCCESS 0
  27. // CONSTANT FAILURE 1
  28. #define FAILURE 1
  29. #define MAX_STRING 4096
  30. #define MAX_ARRAY 512
  31. /*
  32. * Here is the token struct. It is used for both the token linked-list and
  33. * env linked-list.
  34. */
  35. struct Token
  36. {
  37. /*
  38. * For the token linked-list, this stores the token; for the env linked-list
  39. * this stores the value of the variable.
  40. */
  41. char* value;
  42. /*
  43. * Used only for the env linked-list. It holds a string containing the
  44. * name of the var.
  45. */
  46. char* var;
  47. /*
  48. * This struct stores a node of a singly linked list, store the pointer to
  49. * the next node.
  50. */
  51. struct Token* next;
  52. };
  53. #include "kaem_globals.h"