~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to regex/split.c

  • Committer: Monty Taylor
  • Date: 2008-07-05 19:00:59 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: monty@inaugust.com-20080705190059-3vfbd3ebpmzaw5e5
Fixed unsigned long int, format specifiers and functions. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <stdio.h>
2
2
#include <string.h>
3
3
 
4
 
int split(char *string, char *fields[], int nfields, char *sep);
5
 
 
6
4
/*
7
5
 - split - divide a string into fields, like awk split()
8
6
 = int split(char *string, char *fields[], int nfields, char *sep);
9
7
 */
10
 
int                     /* number of fields, including overflow */
11
 
split(char *string,
12
 
      char *fields[],   /* list is not NULL-terminated */
13
 
      int nfields,      /* number of entries available in fields[] */
14
 
      char *sep)        /* "" white, "c" single char, "ab" [ab]+ */
 
8
int                             /* number of fields, including overflow */
 
9
split(string, fields, nfields, sep)
 
10
char *string;
 
11
char *fields[];                 /* list is not NULL-terminated */
 
12
int nfields;                    /* number of entries available in fields[] */
 
13
char *sep;                      /* "" white, "c" single char, "ab" [ab]+ */
15
14
{
16
15
        register char *p = string;
17
16
        register char c;                        /* latest character */