Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 95303 invoked by uid 500); 17 Jul 2001 14:10:45 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 95292 invoked from network); 17 Jul 2001 14:10:45 -0000 From: "Sander Striker" To: , Subject: make_exports.awk Date: Tue, 17 Jul 2001 16:20:48 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_003B_01C10EDC.709EE4E0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_003B_01C10EDC.709EE4E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, After being bitten by make_exports and friends a few times I decided to look into fixing it. The results are attached. I think this will be a usefull replacement for the build_exports/make_exports in httpd. Sander ------=_NextPart_000_003B_01C10EDC.709EE4E0 Content-Type: application/octet-stream; name="make_exports.awk" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="make_exports.awk" =0A= BEGIN {=0A= printf("/*\n")=0A= printf(" * This file was produced by make_exports.awk \n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" *\n")=0A= printf(" */\n")=0A= printf("\n")=0A= =0A= TYPE_NORMAL =3D 0=0A= TYPE_HEADER =3D 1=0A= =0A= stackptr =3D 0=0A= }=0A= =0A= function push(line) {=0A= stack[stackptr] =3D line=0A= stackptr++=0A= }=0A= =0A= function do_output() {=0A= printf("/*\n")=0A= printf(" * %s\n", FILENAME)=0A= printf(" */\n")=0A= =0A= for (i =3D 0; i < stackptr; i++) {=0A= printf("%s\n", stack[i])=0A= }=0A= =0A= stackptr =3D 0=0A= =0A= printf("\n");=0A= }=0A= =0A= function enter_scope(type) {=0A= scope++=0A= scope_type[scope] =3D type=0A= scope_stack[scope] =3D stackptr=0A= delete scope_used[scope]=0A= }=0A= =0A= function leave_scope() {=0A= used =3D scope_used[scope]=0A= =0A= if (!used)=0A= stackptr =3D scope_stack[scope]=0A= =0A= scope--=0A= if (used) {=0A= scope_used[scope] =3D 1=0A= =0A= if (!scope)=0A= do_output()=0A= }=0A= }=0A= =0A= function add_symbol(symbol) {=0A= push(" const void *ap_libtool_hack_" symbol " =3D (const void *)" = symbol ";")=0A= scope_used[scope] =3D 1=0A= }=0A= =0A= /^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { =0A= sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]", "");=0A= sub("[(].*", "");=0A= sub("([^ ]* )*", "");=0A= =0A= add_symbol($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {=0A= enter_scope(TYPE_HEADER)=0A= next=0A= }=0A= =0A= /^#[ \t]*if([n]?def)? / {=0A= enter_scope(TYPE_NORMAL)=0A= push($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*endif/ {=0A= if (scope_type[scope] =3D=3D TYPE_NORMAL)=0A= push($0)=0A= =0A= leave_scope()=0A= next=0A= }=0A= =0A= /^#[ \t]*else/ {=0A= push($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*elif/ {=0A= push($0)=0A= next=0A= }=0A= =0A= =0A= ------=_NextPart_000_003B_01C10EDC.709EE4E0--