From be64829b36da8777cedb47e659ac7146cd6134e8 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 8 Nov 2002 11:24:45 +0000 Subject: [PATCH] Small clean-up of the sed scripts. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5606 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/forms/fdfixc.sed | 11 +++-------- src/frontends/xforms/forms/fdfixh.sed | 5 ++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index b876af7d85..230493cd22 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2002-11-07 Angus Leeming + + * forms/fdfixh.sed: generate the d-tors in a clean way. + * forms/fdfixc.sed: Go from "fdui->form_xxx" to "fdui->form" in + a clean way. + 2002-10-31 Herbert Voss * FormGraphics.C (build, apply): get the rotate-list from the diff --git a/src/frontends/xforms/forms/fdfixc.sed b/src/frontends/xforms/forms/fdfixc.sed index 6aad1ca0b0..5777928020 100644 --- a/src/frontends/xforms/forms/fdfixc.sed +++ b/src/frontends/xforms/forms/fdfixc.sed @@ -24,14 +24,9 @@ s/FD_form_\(.*\)/FD_\1/ # FL_FORM * form; # so we must do so here too. # -# 1. Rewrite "fdui->form_xxx->fdui = ..." as "fdui->form->fdui = ..." -s/fdui->form_\([^ ]*\)->fdui =/fdui->form->fdui =/ - -# 2. Rewrite "fdui->form_xxx = ..." as "fdui->form = ..." -s/fdui->form_\([^ ]*\) =/fdui->form =/ - -# 3. Rewrite "fdui->form_xxx->..." as "fdui->form->..." -s/fdui->form_\([^ ]*\)->/fdui->form->/ +# Rewrite "fdui->form_xxx" as "fdui->form" +# xxx is followed by ' ', '->' or ')', so use these to flag when xxx ends. +/fdui->form/s/\(fdui->form\)_[^ )-]*/\1/ # Replace "forms.h" by FORMS_H_LOCATION in the #include directives s/#include \"forms\.h\"/#include FORMS_H_LOCATION/ diff --git a/src/frontends/xforms/forms/fdfixh.sed b/src/frontends/xforms/forms/fdfixh.sed index 2c2138509b..1fb3649ef8 100644 --- a/src/frontends/xforms/forms/fdfixh.sed +++ b/src/frontends/xforms/forms/fdfixh.sed @@ -99,9 +99,8 @@ d i\ # 2. Rewrite "} FD_xxx;" as "struct FD_xxx {" and append a d-tor. -s/} \(.*\);/struct \1 {/p -# When the wrappers are here, delete this line and the p-print command above -/struct/s/struct \(.*\) {/ ~\1();/ +s/} \(.*\);/struct \1 {\ + ~\1();/ # 3. Paste the contents of the hold space beneath it G