Clan  0.8.0
Defines
macros.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CLAN_VERSION   "0.8.0"
#define CLAN_DEBUG   0
#define CLAN_TRUE   1
#define CLAN_FALSE   0
#define CLAN_MAX_LOCAL_VARIABLES   100
#define CLAN_MAX_STRING   2048
#define CLAN_MAX_DEPTH   50
#define CLAN_MAX_PARAMETERS   128
#define CLAN_MAX_LOCAL_DIMS   128
#define CLAN_MAX_CONSTRAINTS   256
#define CLAN_MAX_SCOPS   256
#define CLAN_UNDEFINED   -1
#define CLAN_KEY_START   1
#define CLAN_TYPE_ITERATOR   1
#define CLAN_TYPE_ITERATOR_DEC   2
#define CLAN_TYPE_PARAMETER   3
#define CLAN_TYPE_ARRAY   4
#define CLAN_TYPE_LOCAL_DIMS   5
#define CLAN_TYPE_STRUCTURE   6
#define CLAN_TYPE_FIELD   7
#define CLAN_TYPE_FUNCTION   8
#define CLAN_TYPE_READ   9
#define CLAN_TYPE_WRITE   10
#define CLAN_TYPE_RDWR   11
#define CLAN_AUTOPRAGMA_FILE   "clan_autopragma.c"
#define CLAN_info(msg)
#define CLAN_debug(msg)
#define CLAN_debug_call(function_call)
#define CLAN_warning(msg)
#define CLAN_error(msg)
#define CLAN_malloc(ptr, type, size)
#define CLAN_realloc(ptr, type, size)
#define CLAN_strdup(destination, source)
#define CLAN_max(x, y)   ((x) > (y)? (x) : (y))
#define CLAN_min(x, y)   ((x) < (y)? (x) : (y))

Define Documentation

#define CLAN_AUTOPRAGMA_FILE   "clan_autopragma.c"
#define CLAN_DEBUG   0
#define CLAN_debug (   msg)
Value:
do {                                                              \
           if (CLAN_DEBUG)                                                 \
             fprintf(stderr,"[Clan] Debug: " msg " (%s).\n", __func__);    \
         } while (0)

Definition at line 85 of file macros.h.

Referenced by clan_parse(), clan_parser_add_ld(), clan_scop_no_pragma(), clan_scop_print_autopragma(), yyerror(), and yyparse().

#define CLAN_debug_call (   function_call)
Value:
do {                                                              \
           if (CLAN_DEBUG)                                                 \
             function_call;                                                \
         } while (0)

Definition at line 91 of file macros.h.

Referenced by yyparse().

#define CLAN_error (   msg)
#define CLAN_FALSE   0
#define CLAN_info (   msg)
Value:
do {                                                              \
           fprintf(stderr,"[Clan] Info: " msg " (%s).\n", __func__);       \
         } while (0)

Definition at line 80 of file macros.h.

#define CLAN_KEY_START   1

Definition at line 59 of file macros.h.

Referenced by clan_symbol_generate_new_key().

#define CLAN_malloc (   ptr,
  type,
  size 
)
Value:
do {                                                              \
           if (((ptr) = (type)malloc(size)) == NULL)                       \
             CLAN_error("memory overflow");                                \
         } while (0)

Definition at line 108 of file macros.h.

Referenced by clan_options_malloc(), clan_options_read(), clan_parser_state_malloc(), clan_scanner_initialize(), clan_scop_generate_scatnames(), clan_symbol_array_to_strings(), clan_symbol_malloc(), clan_symbol_to_arrays(), and clan_symbol_to_strings().

#define CLAN_max (   x,
 
)    ((x) > (y)? (x) : (y))

Definition at line 132 of file macros.h.

#define CLAN_MAX_CONSTRAINTS   256

Definition at line 56 of file macros.h.

#define CLAN_MAX_DEPTH   50
#define CLAN_MAX_LOCAL_DIMS   128
#define CLAN_MAX_LOCAL_VARIABLES   100

Definition at line 51 of file macros.h.

#define CLAN_MAX_PARAMETERS   128
#define CLAN_MAX_SCOPS   256

Definition at line 57 of file macros.h.

Referenced by clan_parser_autoscop(), and clan_scop_insert_pragmas().

#define CLAN_MAX_STRING   2048

Definition at line 52 of file macros.h.

Referenced by clan_scop_generate_scatnames(), and clan_scop_no_pragma().

#define CLAN_min (   x,
 
)    ((x) < (y)? (x) : (y))

Definition at line 134 of file macros.h.

#define CLAN_realloc (   ptr,
  type,
  size 
)
Value:
do {                                                              \
           if (((ptr) = (type)realloc(ptr, size)) == NULL)                 \
             CLAN_error("memory overflow");                                \
         } while (0)

Definition at line 114 of file macros.h.

Referenced by clan_options_read(), and clan_scanner().

#define CLAN_strdup (   destination,
  source 
)
Value:
do {                                                              \
           if (source != NULL) {                                           \
             if (((destination) = strdup(source)) == NULL)                 \
               CLAN_error("memory overflow");                              \
           }                                                               \
           else {                                                          \
             destination = NULL;                                           \
             CLAN_debug("strdup of a NULL string");                        \
           }                                                               \
         } while (0)

Definition at line 120 of file macros.h.

Referenced by clan_options_read(), clan_scop_generate_clay(), clan_scop_generate_coordinates(), clan_scop_generate_scatnames(), clan_symbol_to_arrays(), and yyparse().

#define CLAN_TRUE   1

Definition at line 49 of file macros.h.

Referenced by clan_parser_autoscop(), clan_scanner(), clan_scop_no_pragma(), yyerror(), and yyparse().

#define CLAN_TYPE_ARRAY   4

Definition at line 64 of file macros.h.

Referenced by clan_symbol_print_structure(), and yyparse().

#define CLAN_TYPE_FIELD   7

Definition at line 67 of file macros.h.

Referenced by yyparse().

#define CLAN_TYPE_FUNCTION   8

Definition at line 68 of file macros.h.

Referenced by clan_symbol_print_structure(), and yyparse().

#define CLAN_TYPE_ITERATOR   1
#define CLAN_TYPE_ITERATOR_DEC   2

Definition at line 62 of file macros.h.

#define CLAN_TYPE_LOCAL_DIMS   5

Definition at line 65 of file macros.h.

#define CLAN_TYPE_PARAMETER   3

Definition at line 63 of file macros.h.

Referenced by clan_symbol_print_structure(), clan_symbol_update_type(), and yyparse().

#define CLAN_TYPE_RDWR   11

Definition at line 71 of file macros.h.

Referenced by yyparse().

#define CLAN_TYPE_READ   9

Definition at line 69 of file macros.h.

#define CLAN_TYPE_STRUCTURE   6

Definition at line 66 of file macros.h.

#define CLAN_TYPE_WRITE   10

Definition at line 70 of file macros.h.

Referenced by yyparse().

#define CLAN_UNDEFINED   -1
#define CLAN_VERSION   "0.8.0"

Definition at line 46 of file macros.h.

Referenced by clan_options_version(), and clan_scop_print().

#define CLAN_warning (   msg)
Value:
do {                                                              \
           fprintf(stderr,"[Clan] Warning: " msg " (%s).\n", __func__);    \
         } while (0)

Definition at line 97 of file macros.h.

Referenced by clan_parser_autoscop(), and yyerror().