Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!haven!h.cs.wvu.wvnet.edu!cerc.wvu.wvnet.edu!cathedral!tad From: tad@cathedral.cerc.wvu.wvnet.edu (Tad Alan Davis) Newsgroups: comp.unix.questions Subject: Checking # of parms Message-ID: <339@cerc.wvu.wvnet.edu.edu> Date: 20 Dec 89 18:58:47 GMT Sender: news@cerc.wvu.wvnet.edu Lines: 25 Is there a quick & dirty way, using grep, awk, or some such filter to check the number of parmeters of a function. Basically, I have a large set of functions which I call frequently with the wrong number of parms. I want to put the names of the functions and the number of parms in a file and use a filter to check them in a C program. For example File funcX 2 Command grep funcX prog.c | grep -v funcX([^,]*,[^,]*) This works fine for funcX("a", "b"); not printed, valid funcX("a", "b", "c"); printed, invalid but not for funcX("a", funcX("a", "b"), "c"); not printed, invalid funcX("ok,ok", "a"); printed, valid Any ideas which would only take an hour or two?