/[hydra]/hydra/src/util.c
ViewVC logotype

Diff of /hydra/src/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by nmav, Fri Oct 4 09:11:43 2002 UTC revision 1.14 by nmav, Sat Oct 5 16:42:53 2002 UTC
# Line 658  int do_port = 0; Line 658  int do_port = 0;
658    
659     return;     return;
660  }  }
661    
662    /* Breaks a list of "xxx", "yyy", to a character array, of
663     * MAX_COMMA_SEP_ELEMENTS size; Note that the given string is modified.
664     */
665    void break_comma_list(char *etag,
666                     char *broken_etag[MAX_COMMA_SEP_ELEMENTS],
667                             int *elements)
668    {
669       char *p = etag;
670    
671       *elements = 0;
672    
673       do {
674          broken_etag[*elements] = p;
675    
676          (*elements)++;
677    
678          p = strchr(p, ',');
679          if (p) {
680             *p = 0;
681             p++;                   /* move to next entry and skip white
682                                     * space.
683                                     */
684             while (*p == ' ')
685                p++;
686          }
687       } while (p != NULL && *elements < MAX_COMMA_SEP_ELEMENTS);
688    }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26