Changeset 2607

Show
Ignore:
Timestamp:
09/03/07 09:40:40 (1 year ago)
Author:
ensc
Message:

fixed const-ness of matchlist functions

made the initial file-list a 'char const **' to ease
initialization from string constants

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib_internal/matchlist-appendfiles.c

    r1423 r2607  
    3939void 
    4040MatchList_appendFiles(struct MatchList *list, size_t idx, 
    41                       char **files, size_t count, 
     41                      char const **files, size_t count, 
    4242                      bool auto_type) 
    4343{ 
     
    4949  if (auto_type) { 
    5050    for (i=0; i<count; ++i) { 
    51       char    *file = files[i]; 
     51      char const      *file = files[i]; 
    5252      switch (file[0]) { 
    5353        case '+'        :  ptr->type = stINCLUDE; ++file; break; 
  • trunk/lib_internal/matchlist-initmanually.c

    r1954 r2607  
    4343static void 
    4444readExcludeListFD(int fd, 
    45                   char ***files,  size_t *size, 
     45                  char const ***files,  size_t *size, 
    4646                  char **buf) 
    4747{ 
     
    9191static void 
    9292readExcludeList(char const *filename, 
    93                 char ***files,  size_t *size, 
     93                char const ***files,  size_t *size, 
    9494                char **buf) 
    9595{ 
     
    103103static void 
    104104getConfigfileList(char const *vserver, 
    105                   char ***files, size_t *size, 
     105                  char const ***files, size_t *size, 
    106106                  char **buf) 
    107107{ 
     
    153153  char                  *buf[2] = { 0,0 }; 
    154154   
    155   char                **fixed_files = 0; 
     155  char const          **fixed_files = 0; 
    156156  size_t                fixed_count   = 0; 
    157157 
    158   char                **expr_files  = 0; 
     158  char const          **expr_files  = 0; 
    159159  size_t                expr_count    = 0; 
    160160  size_t                len; 
  • trunk/lib_internal/matchlist.h

    r1912 r2607  
    7474void            MatchList_destroy(struct MatchList *) NONNULL((1)); 
    7575void            MatchList_appendFiles(struct MatchList *, size_t idx, 
    76                                       char **files, size_t count, 
     76                                      char const **files, size_t count, 
    7777                                      bool auto_type) NONNULL((1,3)); 
    7878