Browse Source

add indent.sh tool. rename tools folder.

Julius Pfrommer 11 years ago
parent
commit
8d3e1ee885

+ 1 - 1
Makefile.am

@@ -20,7 +20,7 @@ endif
 export GLOBAL_AM_CFLAGS = $(AM_CFLAGS)
 export GLOBAL_AM_LDADD = $(AM_LDADD)
 
-SUBS=tool include src
+SUBS=tools include src
 if HAVE_CHECK
 	SUBS+= tests
 endif

+ 1 - 1
configure.ac

@@ -95,6 +95,6 @@ AM_COND_IF([ENABLE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_FILES(Makefile include/Makefile src/Makefile tool/Makefile tests/Makefile examples/src/Makefile doc/Makefile)
+AC_CONFIG_FILES(Makefile include/Makefile src/Makefile tools/Makefile tests/Makefile examples/src/Makefile doc/Makefile)
 AC_OUTPUT
 

+ 1 - 1
include/Makefile.am

@@ -1,4 +1,4 @@
-TOOL_DIR = ../tool
+TOOL_DIR = ../tools
 
 all-local: opcua.h ua_namespace_0.h
 

+ 1 - 1
src/Makefile.am

@@ -2,7 +2,7 @@
 AM_CFLAGS = $(GLOBAL_AM_CFLAGS) -I$(top_builddir)/include -I$(top_builddir)/src -I. -I$(top_builddir)/src/util
 
 
-TOOL_DIR = ../tool
+TOOL_DIR = ../tools
 #__top_builddir__bin_stackTest_out_SOURCES =	opcuaServer.c\
 #											opcua_builtInDatatypes.c\
 #											opcua_binaryEncDec.c\

tool/Makefile.am → tools/Makefile.am


tool/NodeIds.csv → tools/NodeIds.csv


tool/Opc.Ua.Types.bsd → tools/Opc.Ua.Types.bsd


tool/UA_stackInternalTypes → tools/UA_stackInternalTypes.bsd


tool/generate_builtin.py → tools/generate_builtin.py


tool/generate_namespace.py → tools/generate_namespace.py


+ 54 - 0
tools/indent.sh

@@ -0,0 +1,54 @@
+#!/bin/bash
+if [ $# -eq 0 ]; then
+echo "usage: $0 <file1 file2 ...>"
+   exit 1
+fi
+if [ "$(type -t indent)" = "" ]; then
+echo "Please install GNU indent first."
+   exit 1
+fi
+
+# Assume a width of 4 spaces per tab.
+# E.g. when indenting to the opening braces of an argument list.
+
+indent \
+--line-length120 \
+--comment-line-length100 \
+--indent-level4 \
+--use-tabs \
+--tab-size4 \
+--case-indentation0 \
+--declaration-indentation1 \
+--ignore-newlines \
+--swallow-optional-blank-lines \
+--blank-lines-after-procedures \
+--no-blank-lines-after-commas \
+--break-after-boolean-operator \
+--no-space-after-for \
+--no-space-after-if \
+--no-space-after-while \
+--no-space-after-casts \
+--braces-on-if-line \
+--braces-on-func-def-line \
+--braces-on-struct-decl-line \
+--cuddle-do-while \
+--cuddle-else \
+--dont-break-procedure-type \
+--continue-at-parentheses \
+--no-space-after-function-call-names \
+--no-space-after-parentheses \
+--no-comment-delimiters-on-blank-lines \
+--comment-indentation0 \
+--format-first-column-comments \
+--declaration-comment-column0 \
+--format-all-comments \
+--line-comments-indentation0 \
+--blank-lines-before-block-comments \
+--space-special-semicolon \
+$@
+
+
+# Remove trailing whitespace
+for file in $@; do
+	sed -i -e's/[[:space:]]*$//' "$file"
+done

tool/plugin_Node.py → tools/plugin_Node.py