]> git.lyx.org Git - features.git/commitdiff
Use "string tmp_str" rather than "char const * c_str" in the xforms autogenerated...
authorAngus Leeming <leeming@lyx.org>
Mon, 19 May 2003 19:12:30 +0000 (19:12 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 19 May 2003 19:12:30 +0000 (19:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6980 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/forms/Makefile.am
src/frontends/xforms/forms/c_str.sed [deleted file]
src/frontends/xforms/forms/fdfix.sh
src/frontends/xforms/forms/fdfixc.sed
src/frontends/xforms/forms/tmp_str.sed [new file with mode: 0644]

index 67003a7b5781cac237481b858670758d59226ec1..787df107e35845adc9111539d3d04d8d0be53bf8 100644 (file)
@@ -1,3 +1,14 @@
+2003-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * forms/c_str.sed: removed. Renamed as:
+       * forms/tmp_str.sed
+
+       * forms/Makefile.am (EXTRA_DIST): add tmp_str.sed.
+       ($(libfdesign_la_SOURCES)): make it depend on tmp_str.sed.
+
+       * forms/fdfix.sh:
+       * forms/fdfixc.sed:
+       * forms/tmp_str.sed: s/c_str\([^(]\)/tmp_str\1/.
 
 2003-05-15 André Pönitz <poenitz@gmx.net>
 
index c037dfb53049ab81bba7c17f7741e148cf9b772a..1ef3041717d73042503c3150b0ecc56fe7458756 100644 (file)
@@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
 
 MAINTAINERCLEANFILES += *.C *.h *.c
 
-EXTRA_DIST = fdfixc.sed fdfixh.sed fdfix.sh README $(SRCS)
+EXTRA_DIST = fdfixc.sed fdfixh.sed fdfix.sh tmp_str.sed README $(SRCS)
 
 # For (forms_fwd.h, forms_gettext.h) and LString.h, respectively.
 INCLUDES = -I$(srcdir)/..  -I$(top_srcdir)/src -I..
@@ -52,7 +52,7 @@ SRCS =  form_aboutlyx.fd \
 nodist_libfdesign_la_SOURCES = $(SRCS:.fd=.C) $(SRCS:.fd=.h)
 # This is a trick so that the actual .la file never gets build,
 # so we do not need to use diskspace and time for it.
-# It is only getting linked into libxforms.la any way.
+# It is only getting linked into libxforms.la anyway.
 libfdesign_la_LINK = touch libfdesign.la
 
 # These are used to generate the .[Ch] files from the .fd ones.
@@ -60,8 +60,5 @@ SHELL = /bin/sh
 SCRIPT = $(srcdir)/fdfix.sh
 SUFFIXES = .fd
 
-# Make the .Ch files dependent on the fdfix files.
-$(libfdesign_la_SOURCES): $(srcdir)/fdfix.sh $(srcdir)/fdfix[ch].sed
-
-%.C: %.fd
+%.C: %.fd $(srcdir)/fdfix.sh $(srcdir)/fdfix[ch].sed $(srcdir)/tmp_str.sed
        $(SHELL) $(SCRIPT) $<
diff --git a/src/frontends/xforms/forms/c_str.sed b/src/frontends/xforms/forms/c_str.sed
deleted file mode 100644 (file)
index b01f1f7..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# file c_str.sed
-# This file is part of LyX, the document processor.
-# Licence details can be found in the file COPYING.
-#
-# author Angus Leeming
-#
-# Full author contact details are available in file CREDITS
-
-# This sed script is run on the .C file after the main fdfixc.sed has done
-# its stuff. It ensures that any c_str variables inserted by fdfixc.sed
-# are declared at the top of the appropriate function.
-#
-# We use a two-pass algorithm like this because a single pass results in
-# convoluted sed.
-
-
-# Initialise the hold space at the start of the function.
-/ \* build_/ {
-h; d
-}
-
-
-# For all lines within the function...
-/^{$/,/^}$/ {
-
-# If it isn't the last line, append it to the hold space.
-/^}$/!{
-H; d
-}
-
-# If it is the last line, paste the contents of the hold space above it,
-# seach for the string "c_str" and, if found, add its declaration to the top
-# of the function.
-/^}$/ {
-x; G
-
-/c_str/s/\(    FL_OBJECT \*\)/ char const * c_str;\
-\1/
-}
-
-}
index fb0df9db26bb4dae229e7fe63ed29bb141b57819..9450d0245f7cc43497301a3cc7bfaa729de96f72 100644 (file)
@@ -149,9 +149,9 @@ grep combox ${CIN} > /dev/null &&
 
 sed -f ${FDFIXC} < ${CIN} >> ${TMP}
 
-# Pass 2. Ensure that any c_str variables inserted by fdfixc.sed
+# Pass 2. Ensure that any tmp_str variables inserted by fdfixc.sed
 # are declared at the top of the appropriate function.
-FDFIXC=${DIRNAME}/c_str.sed
+FDFIXC=${DIRNAME}/tmp_str.sed
 sed -f ${FDFIXC} < ${TMP} > ${COUT}
 rm -f ${TMP}
 
index 9171accce7c750fb91226c466a8db5056c264112..47928dfe78b35ef471177cf4e92c11e0f19d794b 100644 (file)
@@ -106,13 +106,13 @@ s/CHOICE/COMBOX/
 # change so:
 #        fdui->counter_zoom = obj = fl_add_counter(...,"Zoom %|#Z");
 # becomes
-#        c_str = _("Zoom %|#Z");
-#        fdui->counter_zoom = obj = fl_add_counter(...,idex(c_str).c_str());
-#        fl_set_button_shortcut(obj,scex(c_str).c_str(),1);
+#        tmp_str = _("Zoom %|#Z");
+#        fdui->counter_zoom = obj = fl_add_counter(...,idex(tmp_str).c_str());
+#        fl_set_button_shortcut(obj,scex(tmp_str).c_str(),1);
 
-/fl_add.*".*[|].*"/s/fdui\(.*\)"\(.*\)".*/c_str = _("\2");\
-       fdui\1idex(c_str).c_str());\
-       fl_set_button_shortcut(obj,scex(c_str).c_str(),1);/
+/fl_add.*".*[|].*"/s/fdui\(.*\)"\(.*\)".*/tmp_str = _("\2");\
+       fdui\1idex(tmp_str).c_str());\
+       fl_set_button_shortcut(obj,scex(tmp_str).c_str(),1);/
 
 
 # gettext will get confused if the string contains a "%" unless the line is
diff --git a/src/frontends/xforms/forms/tmp_str.sed b/src/frontends/xforms/forms/tmp_str.sed
new file mode 100644 (file)
index 0000000..60e0fad
--- /dev/null
@@ -0,0 +1,41 @@
+# file tmp_str.sed
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# author Angus Leeming
+#
+# Full author contact details are available in file CREDITS
+
+# This sed script is run on the .C file after the main fdfixc.sed has done
+# its stuff. It ensures that any tmp_str variables inserted by fdfixc.sed
+# are declared at the top of the appropriate function.
+#
+# We use a two-pass algorithm like this because a single pass results in
+# convoluted sed.
+
+
+# Initialise the hold space at the start of the function.
+/ \* build_/ {
+h; d
+}
+
+
+# For all lines within the function...
+/^{$/,/^}$/ {
+
+# If it isn't the last line, append it to the hold space.
+/^}$/!{
+H; d
+}
+
+# If it is the last line, paste the contents of the hold space above it,
+# seach for the string "tmp_str" and, if found, add its declaration to the top
+# of the function.
+/^}$/ {
+x; G
+
+/tmp_str/s/\(  FL_OBJECT \*\)/ string tmp_str;\
+\1/
+}
+
+}