plug-ins/script-fu/re/split.c plug-ins/script-fu/re/split.h

2007-05-30  Mukund Sivaraman  <muks@mukund.org>

        * plug-ins/script-fu/re/split.c
        * plug-ins/script-fu/re/split.h
        * plug-ins/script-fu/re/main.c
        * plug-ins/script-fu/re/Makefile.am: Created a header file (split.h)
        and added a prototype for split().


svn path=/trunk/; revision=22661
This commit is contained in:
Mukund Sivaraman 2007-05-30 12:02:11 +00:00 committed by Mukund Sivaraman
parent ade4dd09d5
commit eedd56c67a
5 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2007-05-30 Mukund Sivaraman <muks@mukund.org>
* plug-ins/script-fu/re/split.c
* plug-ins/script-fu/re/split.h
* plug-ins/script-fu/re/main.c
* plug-ins/script-fu/re/Makefile.am: Created a header file (split.h)
and added a prototype for split().
2007-05-30 Mukund Sivaraman <muks@mukund.org>
* app/tools/gimpdrawtool.c: Added missing include.

View File

@ -23,6 +23,7 @@ libre_a_SOURCES = \
regexec.c \
regfree.c \
split.c \
split.h \
utils.h
#engine.c and engine.ih are listed below rather than above since the

View File

@ -4,7 +4,7 @@
#include <assert.h>
#include <stdlib.h>
#include "regex.h"
#include "split.h"
#include "main.ih"
char *progname;
@ -17,8 +17,6 @@ int eopts = 0;
regoff_t startoff = 0;
regoff_t endoff = 0;
extern int split();
extern void regprint();
/*
@ -82,7 +80,7 @@ char *argv[];
eprint(err), len, sizeof(erbuf), erbuf);
exit(status);
}
regprint(&re, stdout);
regprint(&re, stdout);
if (optind >= argc) {
regfree(&re);

View File

@ -1,6 +1,8 @@
#include <stdio.h>
#include <string.h>
#include "split.h"
/*
- split - divide a string into fields, like awk split()
= int split(char *string, char *fields[], int nfields, char *sep);

View File

@ -0,0 +1,7 @@
#ifndef __RE_SPLIT_H__
#define __RE_SPLIT_H__
int split (char *string, char *fields[], int nfields, char *sep);
#endif