Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!uwm.edu!cs.utexas.edu!samsung!dali!milton!uw-beaver!Teknowledge.COM!unix!hplabs!hp-pcd!hpmcaa!nacer From: nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) Newsgroups: comp.lang.c Subject: finding func. declaration in awk Message-ID: <510009@hpmcaa.mcm.hp.com> Date: 27 Mar 90 20:16:18 GMT Organization: HP McMinville Division Lines: 22 Can anyone provide awk code to recognize C function interface? I would like to insert text before and after function declarations as in: /* start marker */ static int ErrHandler( DBPROCESS * dbproc, int severity, int oserr ) /* end marker */ { ..body.. } I am not very familiar with all of what can go into C functions declarations (ie. extern, void, PASCAL, VOID, ...) to be able to generalize. Can this be done? or are C function declarations too ambiguous to handle with awk and regular expressions? Any hints are very appreciated? the code does not have to be full proof, handling most cases will do. Thanks to all of you out there.. or is out here :-)