+2003-09-15 Angus Leeming <leeming@lyx.org>
+
+ * forms/fdfix[ch].sed, tmp_str,sed: POSIX-compliant sed.
+
2003-09-09 Lars Gullik Bjønnes <larsbj@lyx.org>
* several files: change Assert to BOOST_ASSERT
# Remove '#include "forms.h"'. It is replace by a macro in fdfix.sh.
-/^#include \"forms\.h\"/d
+/^#include "forms\.h"/d
# Pretty formatting; replace all leading whitespace with a tab
# All other lines are deleted:
/^typedef struct/d
-/^ /{ /FL_OBJECT/!d; }
+/^ /{
+/FL_OBJECT/!d
+}
# For all lines starting with FL_OBJECT...
s/\(FL_OBJECT \*\)/\1 /
# 2. Append to the hold space and delete from the pattern space.
-H; d
+H
+d
}
# 2. The hold space contains the FL_OBJECT lines, preceded by a new line.
# To get rid of this new line, we exchange the contents of the hold and
# pattern spaces, remove the new line and then exchange back.
-x; s/^\n//; x
+x
+s/^\n//
+x
# 3. Paste the contents of the hold space beneath the "struct FD_xxx" line.
# and empty the hold space
-G; h; s/.*//; x
+G
+h
+s/.*//
+x
# 4. Close the struct and append an empty line.
a\
# Initialise the hold space at the start of the function.
/ \* build_/ {
-h; d
+h
+d
}
# If it isn't the last line, append it to the hold space.
/^}$/!{
-H; d
+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
+x
+G
/tmp_str/s/\( FL_OBJECT \*\)/ string tmp_str;\
\1/