From 7aa651a6a4496d848f86de9b1e6b3a003256a01f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 13 Nov 2012 17:14:08 -0600 Subject: Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring. --- scripts/config2help.sh | 4 ++-- scripts/install.c | 31 +++++++++++++++---------------- scripts/test/basename.test | 2 +- scripts/test/cat.test | 2 +- scripts/test/cp.test | 2 +- scripts/test/dirname.test | 2 +- scripts/test/xargs.test | 2 +- 7 files changed, 22 insertions(+), 23 deletions(-) mode change 100644 => 100755 scripts/test/dirname.test (limited to 'scripts') diff --git a/scripts/config2help.sh b/scripts/config2help.sh index 63d6c6f0..8f96e39e 100755 --- a/scripts/config2help.sh +++ b/scripts/config2help.sh @@ -29,7 +29,7 @@ if test "$0" != "bash"; then configs=$(echo "$filetxt" | egrep -ne "^config *" | cut -d\: -f1) endmenus=$(echo "$filetxt" | egrep -ne "^endmenu *" | cut -d\: -f1) let last=$(echo "$filetxt" | wc -l)+2 - + declare -i i c s e for i in $configs; do # echo -n "c:$i" >&2 @@ -40,7 +40,7 @@ if test "$0" != "bash"; then test $e -ge $s # echo " s:$s e:$e" >&2 print_h "$filetxt" $i $s $e - done + done for fle in $(cat "$file" | egrep -e "^[ \t]*source " | sed -e "s,^[ \t]*source *\(.*\),\\1,"); do $0 $fle done diff --git a/scripts/install.c b/scripts/install.c index 317b180c..cda8fc22 100644 --- a/scripts/install.c +++ b/scripts/install.c @@ -1,4 +1,3 @@ -/* vi: set ts=4 :*/ /* Wrapper to make installation easier with cross-compiling. * * Copyright 2006 Rob Landley @@ -21,20 +20,20 @@ struct toy_list toy_list[] = { int main(int argc, char *argv[]) { - static char *toy_paths[]={"usr/","bin/","sbin/",0}; - int i, len = 0; + static char *toy_paths[]={"usr/","bin/","sbin/",0}; + int i, len = 0; - // Output list of applets. - for (i=1; i1) { - int j; - for (j=0; toy_paths[j]; j++) - if (fl & (1<1) { + int j; + for (j=0; toy_paths[j]; j++) + if (fl & (1< file1 && diff -u /bin/cat file1 && echo yes" \ + "cat /proc/self/exe > file1 && diff -u /proc/self/exe file1 && echo yes" \ "yes\n" "" "" #testing "cat file1 file2" "cat /bin/cat file1 > file2 && diff -u - diff --git a/scripts/test/cp.test b/scripts/test/cp.test index 8abcc284..eea0471d 100755 --- a/scripts/test/cp.test +++ b/scripts/test/cp.test @@ -24,7 +24,7 @@ testing "cp file->dir/file" \ "yes\n" "" "" testing "cp -r dir->missing" \ "cp -r two three && cmp random three/random && echo yes" \ - "yes\n" "" "" + "yes\n" "" "" touch walrus testing "cp -r dir->file [fail]" \ "cp -r two walrus 2>/dev/null || echo yes" "yes\n" "" "" diff --git a/scripts/test/dirname.test b/scripts/test/dirname.test old mode 100644 new mode 100755 index 9afa4508..a0075384 --- a/scripts/test/dirname.test +++ b/scripts/test/dirname.test @@ -6,5 +6,5 @@ testing "dirname /-only" "dirname ///////" "/\n" "" "" testing "dirname trailing /" "dirname a//////" ".\n" "" "" -testing "dirname combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" "" +testing "dirname combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" "" testing "dirname /a/" "dirname /////a///" "/\n" "" "" diff --git a/scripts/test/xargs.test b/scripts/test/xargs.test index 2d3946b3..e49445d6 100755 --- a/scripts/test/xargs.test +++ b/scripts/test/xargs.test @@ -26,7 +26,7 @@ rm one two three exit -testing "xargs -n exact match" +testing "xargs -n exact match" testing "xargs -s exact match" testing "xargs -s 0" testing "xargs -s impossible" -- cgit v1.2.3