pike.git / pike_sass.h

version» Context lines:

pike.git/pike_sass.h:1:   #ifndef PIKE_SASS_H   #define PIKE_SASS_H         #ifdef SASS_DEBUG   # define SASS_TRACE(X...) printf ("# " X)   #else   # define SASS_TRACE(X...)   #endif    +  + #define MY_THROW_ERR(Y...) \ +  do { \ +  my_opts_delete (THIS->options); \ +  Pike_error (Y); \ +  } while (0) +  +    #define OPTS_INC_ARRAY_BLK_SIZE 4      typedef struct my_opts_array   {    char **items;    int len;   } my_opts_array;         typedef struct my_opts
pike.git/pike_sass.h:25:    bool comments;    char *map_path;    bool map_embed;    char *map_root;    bool omit_map_url;   } my_opts;         my_opts* my_opts_create ()   { -  my_opts *opts = malloc (sizeof (my_opts)); -  opts->include_paths = NULL; -  // opts->more_include_paths = NULL; -  opts->map_path = NULL; -  opts->map_root = NULL; -  opts->style = SASS_STYLE_NESTED; -  opts->precision = 5; -  opts->omit_map_url = true; +  my_opts *opts = malloc (sizeof (my_opts)); +  opts->include_paths = NULL; +  opts->map_path = NULL; +  opts->map_root = NULL; +  opts->style = SASS_STYLE_NESTED; +  opts->precision = 5; +  opts->omit_map_url = true;       return opts;   }         void my_opts_push_include_path (my_opts *opts, const char *path)   { -  if (access (path, F_OK) == -1) { -  Pike_error ("Include path \"%s\" does not exist!\n", path); -  } -  +     if (opts->include_paths == NULL) {    int blksize = OPTS_INC_ARRAY_BLK_SIZE * sizeof (char*);    opts->include_paths = malloc (sizeof (my_opts_array));    opts->include_paths->len = 0;    opts->include_paths->items = malloc (blksize);    }    else {    if (opts->include_paths->len % OPTS_INC_ARRAY_BLK_SIZE == 0) {    int blksize = OPTS_INC_ARRAY_BLK_SIZE * sizeof (char*);    int size = blksize * opts->include_paths->len;
pike.git/pike_sass.h:72:       opts->include_paths->len += 1;   }         void my_opts_set_include_path (my_opts *opts, const char *path)   {    if (path != NULL) {    SASS_TRACE ("::: my_opts_set_include_path(%s)\n", path);    -  if (access (path, F_OK) == -1) { -  Pike_error ("Include path \"%s\" does not exist!\n", path); -  } -  +     if (opts->include_paths == NULL) {    my_opts_push_include_path (opts, path);    }    else {    opts->include_paths->items[0] = strdup (path);    }    }   }