[comp.lang.c] breaking up 1 BIG C source file

acmfiu@serss0.fiu.edu (ACMFIU) (01/22/91)

Let's say I have one Big C source file consisting of functions:
	a, b, c, d, e, f, g, h, i

And let's say that (a, b, c) do one thing, (d, e, f) do another, and
(g, h, i) do another. Now, i want to split these three groups into three
files. Is there a program that I can give the names of the functions and
it will will split this big C file into smaller ones?

albert chin

catfood@NCoast.ORG (Mark W. Schumann) (01/23/91)

acmfiu@serss0.fiu.edu (ACMFIU) writes:

>       Is there a program that I can give the names of the functions and
>it will will split this big C file into smaller ones?

Consider writing this as an AWK script.  If you are running on a UNIX
box it is part of the system.  If you are using DOS get a copy of
GNU Awk from LISTSERV@VM1.NODAK.EDU by sending the mail message

              /pdget pd:<msdos.awk>gawk211.zip

If you are clever with your pattern-matching logic this can be
easy.  Try it.

-- 
============================================================
Mark W. Schumann  3111 Mapledale Avenue, Cleveland 44109 USA
Domain: catfood@ncoast.org
UUCP:   ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood