[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {ylwrap-refactor} ylwrap: fix indentation
From: |
Stefano Lattarini |
Subject: |
[FYI] {ylwrap-refactor} ylwrap: fix indentation |
Date: |
Fri, 6 May 2011 18:42:54 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* lib/ylwrap: Make indentation consistent (two spaces).
---
ChangeLog | 5 ++++
lib/ylwrap | 64 ++++++++++++++++++++++++++++++------------------------------
2 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9e7adf6..52656b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-05-06 Stefano Lattarini <address@hidden>
+ ylwrap: fix indentation
+ * lib/ylwrap: Make indentation consistent (two spaces).
+
+2011-05-06 Stefano Lattarini <address@hidden>
+
ylwrap: some renaming of variables and subroutines
* lib/ylwrap ($dirname): Renamed ...
($tempdir): ... to this.
diff --git a/lib/ylwrap b/lib/ylwrap
index d19d4db..90b087b 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -32,9 +32,9 @@ scriptversion=2011-05-05.12; # UTC
usage_error ()
{
- echo "$0: $*" >&2
- echo "Try \`$0 --help' for more information." >&2
- exit 2
+ echo "$0: $*" >&2
+ echo "Try \`$0 --help' for more information." >&2
+ exit 2
}
# Escape (most) sed metacharacters in the given string, so that it can
@@ -81,34 +81,34 @@ set_yacc_filenames ()
# Usage: handle_renaming FROM TARGET
handle_renaming ()
{
- from=$1
- target=$2
- if test ! -f $tempdir/$from; then
- echo "ylwrap: expected file \`$from' not found" >&2
- ret=1
- return
- fi
+ from=$1
+ target=$2
+ if test ! -f $tempdir/$from; then
+ echo "ylwrap: expected file \`$from' not found" >&2
+ ret=1
+ return
+ fi
- # Edit out `#line' or `#' directives.
- #
- # We don't want the resulting debug information to point at
- # an absolute srcdir; it is better for it to just mention the
- # .y file with no path.
- #
- # We want to use the real output file name, not yy.lex.c for
- # instance.
- #
- # We want the include guards to be adjusted too.
- # TODO: This include guards seems not to be generated anymore
- # by newer bison versions (at least starting from 1.875; they
- # were still generated in version 1.75, though). Also, BSD and
- # Solaris yacc seems not to generate such include guards either.
- # So, how much is this code still relevant today?
- FROM=`tr_cpp "$from"`
- TARGET=`tr_cpp "$target"`
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ # TODO: This include guards seems not to be generated anymore
+ # by newer bison versions (at least starting from 1.875; they
+ # were still generated in version 1.75, though). Also, BSD and
+ # Solaris yacc seems not to generate such include guards either.
+ # So, how much is this code still relevant today?
+ FROM=`tr_cpp "$from"`
+ TARGET=`tr_cpp "$target"`
- sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$target," \
- -e "s,$FROM,$TARGET," $tempdir/"$from" >"$target" || ret=$?
+ sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$target," \
+ -e "s,$FROM,$TARGET," $tempdir/"$from" >"$target" || ret=$?
}
move_if_change ()
@@ -121,7 +121,7 @@ move_if_change ()
else
echo "updating $dest"
mv -f "$src" "$dest"
- fi
+ fi
}
test $# -gt 0 || usage_error "missing argument"
--
1.7.2.3
- [FYI] {ylwrap-refactor} ylwrap: new subroutine `tr_cpp', (continued)
- [FYI] {ylwrap-refactor} ylwrap: new subroutine `tr_cpp', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: new subroutine `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: warn when expected output files are missing, Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: cleanup refactoring (no semantic change), Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: another cleanup refactoring (no semantic change), Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: get rid of the loop on "FROM TARGET" couples, Stefano Lattarini, 2011/05/05
- FYI] {ylwrap-refactor} ylwrap: go into tempdir only when running wrapped program, Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: pull `dos_fix_yacc_filenames' out of `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: move "update if changed" logic out of `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: some renaming of variables and subroutines, Stefano Lattarini, 2011/05/06
- [FYI] {ylwrap-refactor} ylwrap: fix indentation,
Stefano Lattarini <=
- [FYI] {ylwrap-refactor} ylwrap: rename 'handle_renaming' to 'tempfile_deploy', Stefano Lattarini, 2011/05/06
- [FYI] {ylwrap-refactor} merged branch 'yacc-work', Stefano Lattarini, 2011/05/06