]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/forms/tmp_str.sed
Change the semantics of 'none' and 'auto' viewers/editors: 'none' means now
[lyx.git] / src / frontends / xforms / forms / tmp_str.sed
1 # file tmp_str.sed
2 # This file is part of LyX, the document processor.
3 # Licence details can be found in the file COPYING.
4 #
5 # author Angus Leeming
6 #
7 # Full author contact details are available in file CREDITS
8
9 # This sed script is run on the .C file after the main fdfixc.sed has done
10 # its stuff. It ensures that any tmp_str variables inserted by fdfixc.sed
11 # are declared at the top of the appropriate function.
12 #
13 # We use a two-pass algorithm like this because a single pass results in
14 # convoluted sed.
15
16
17 # Initialise the hold space at the start of the function.
18 / \* build_/ {
19 h
20 d
21 }
22
23
24 # For all lines within the function...
25 /^{$/,/^}$/ {
26
27 # If it isn't the last line, append it to the hold space.
28 /^}$/!{
29 H
30 d
31 }
32
33 # If it is the last line, paste the contents of the hold space above it,
34 # seach for the string "tmp_str" and, if found, add its declaration to the top
35 # of the function.
36 /^}$/ {
37 x
38 G
39
40 /tmp_str/s/\(   FL_OBJECT \*\)/ string tmp_str;\
41 \1/
42 }
43
44 }