diff --git a/lib/c/2006/labcomm2006.h b/lib/c/2006/labcomm2006.h index 1ea5aae4f1f030134b6a6ea5727d8a8b491fc29e..9958b17eb78f392b5385ba910b32287bacea7d83 100644 --- a/lib/c/2006/labcomm2006.h +++ b/lib/c/2006/labcomm2006.h @@ -1,5 +1,5 @@ /* - labcomm.h -- user interface for handling encoding and decoding of + labcomm2006.h -- user interface for handling encoding and decoding of labcomm samples. Copyright 2006-2013 Anders Blomdell <anders.blomdell@control.lth.se> @@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_H_ -#define _LABCOMM_H_ +#ifndef __LABCOMM2006_H__ +#define __LABCOMM2006_H__ #include <stdarg.h> diff --git a/lib/c/2006/labcomm2006_default_error_handler.h b/lib/c/2006/labcomm2006_default_error_handler.h index b8254f81c596d2aefa1e2898cdc0d50dab9c3b48..b00d988475209d17b4cf10fa819c98868a9ca7bd 100644 --- a/lib/c/2006/labcomm2006_default_error_handler.h +++ b/lib/c/2006/labcomm2006_default_error_handler.h @@ -18,7 +18,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM2006_DEFAULT_ERROR_HANDLER_H__ +#define __LABCOMM2006_DEFAULT_ERROR_HANDLER_H__ #include "labcomm2006.h" extern struct labcomm2006_error_handler *labcomm2006_default_error_handler; + +#endif diff --git a/lib/c/2006/labcomm2006_default_memory.h b/lib/c/2006/labcomm2006_default_memory.h index 4f46f42714ed9336ef3bd379ec9d13f0da5f282c..ba369881632847dd469591fdf60fc6d6b13e4849 100644 --- a/lib/c/2006/labcomm2006_default_memory.h +++ b/lib/c/2006/labcomm2006_default_memory.h @@ -18,9 +18,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM2006_DEFAULT_MEMORY_H__ +#define __LABCOMM2006_DEFAULT_MEMORY_H__ #include <stdlib.h> #include "labcomm2006.h" extern struct labcomm2006_memory *labcomm2006_default_memory; +#endif diff --git a/lib/c/2006/labcomm2006_default_scheduler.h b/lib/c/2006/labcomm2006_default_scheduler.h index bd271f041f68b4d6d381bcfc57eada00ab005b62..becd93673d6f411d150496b4101feda361736b67 100644 --- a/lib/c/2006/labcomm2006_default_scheduler.h +++ b/lib/c/2006/labcomm2006_default_scheduler.h @@ -18,7 +18,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM2006_DEFAULT_SCHEDULER_H__ +#define __LABCOMM2006_DEFAULT_SCHEDULER_H__ #include "labcomm2006.h" extern struct labcomm2006_scheduler *labcomm2006_default_scheduler; + +#endif diff --git a/lib/c/2006/labcomm2006_dynamic_buffer_writer.h b/lib/c/2006/labcomm2006_dynamic_buffer_writer.h index c0ab9d0861cb5d84e7bc81352f9301b6ca322722..3611640112b09133b5c98bc887f688243ec9ce01 100644 --- a/lib/c/2006/labcomm2006_dynamic_buffer_writer.h +++ b/lib/c/2006/labcomm2006_dynamic_buffer_writer.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H_ -#define _LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H_ +#ifndef __LABCOMM2006_DYNAMIC_BUFFER_READER_WRITER_H__ +#define __LABCOMM2006_DYNAMIC_BUFFER_READER_WRITER_H__ #include "labcomm2006.h" diff --git a/lib/c/2006/labcomm2006_error.h b/lib/c/2006/labcomm2006_error.h index 27a0e726b78e8a3a17809206702a76279a1d91eb..9c257b991b1d4bfc887a52effb5c241191c4fe7c 100644 --- a/lib/c/2006/labcomm2006_error.h +++ b/lib/c/2006/labcomm2006_error.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __LABCOMM_ERROR_H__ -#define __LABCOMM_ERROR_H__ +#ifndef __LABCOMM2006_ERROR_H__ +#define __LABCOMM2006_ERROR_H__ enum labcomm2006_error { #define LABCOMM_ERROR(name, description) name , diff --git a/lib/c/2006/labcomm2006_fd_reader.h b/lib/c/2006/labcomm2006_fd_reader.h index 066ac81b15503a5f1ed80236c23a3a2d750d2711..408bf9fe2eaea02f81924f20f18bd3a3d5d601b0 100644 --- a/lib/c/2006/labcomm2006_fd_reader.h +++ b/lib/c/2006/labcomm2006_fd_reader.h @@ -1,3 +1,4 @@ + /* labcomm2006_fd_reader.c -- a reader for unix style file-descriptors @@ -19,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_FD_READER_H_ -#define _LABCOMM_FD_READER_H_ +#ifndef __LABCOMM2006_FD_READER_H__ +#define __LABCOMM2006_FD_READER_H__ #include "labcomm2006.h" diff --git a/lib/c/2006/labcomm2006_fd_writer.h b/lib/c/2006/labcomm2006_fd_writer.h index 56fda84f8d839103bfe5e1d1860e319c10b7782e..8df9d08a3d1035b17d39d8c6f7bc6b3b72eaf40f 100644 --- a/lib/c/2006/labcomm2006_fd_writer.h +++ b/lib/c/2006/labcomm2006_fd_writer.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_FD_WRITER_H_ -#define _LABCOMM_FD_WRITER_H_ +#ifndef __LABCOMM2006_FD_WRITER_H__ +#define __LABCOMM2006_FD_WRITER_H__ #include "labcomm2006.h" diff --git a/lib/c/2006/labcomm2006_ioctl.h b/lib/c/2006/labcomm2006_ioctl.h index 47b48dd0bf55cafb8a46837069e630967055af63..3fabcd2547a2d781102f77d435d3ec6aee537a2a 100644 --- a/lib/c/2006/labcomm2006_ioctl.h +++ b/lib/c/2006/labcomm2006_ioctl.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __LABCOMM_IOCTL_H__ -#define __LABCOMM_IOCTL_H__ +#ifndef __LABCOMM2006_IOCTL_H__ +#define __LABCOMM2006_IOCTL_H__ #include "labcomm2006.h" diff --git a/lib/c/2006/labcomm2006_private.h b/lib/c/2006/labcomm2006_private.h index 378719ccd2f7eff21df847ffb37cc76ad3838ac9..efa095fdfffd049e67f1402e2d36267431aa2e82 100644 --- a/lib/c/2006/labcomm2006_private.h +++ b/lib/c/2006/labcomm2006_private.h @@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_PRIVATE_H_ -#define _LABCOMM_PRIVATE_H_ +#ifndef __LABCOMM2006_PRIVATE_H__ +#define __LABCOMM2006_PRIVATE_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/2006/labcomm2006_pthread_scheduler.h b/lib/c/2006/labcomm2006_pthread_scheduler.h index 101cfde4fe142522b061791472ec7146f3e4de46..ab22b21f4cd980cb90bf86417c35985c59ac3ee7 100644 --- a/lib/c/2006/labcomm2006_pthread_scheduler.h +++ b/lib/c/2006/labcomm2006_pthread_scheduler.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_PTHREAD_SCHEDULER_H_ -#define _LABCOMM_PTHREAD_SCHEDULER_H_ +#ifndef __LABCOMM2006_PTHREAD_SCHEDULER_H__ +#define __LABCOMM2006_PTHREAD_SCHEDULER_H__ #include "labcomm2006.h" diff --git a/lib/c/2006/labcomm2006_scheduler.h b/lib/c/2006/labcomm2006_scheduler.h index d4ea80d78707c0c171a43bf7014db6ad4387718a..0c332c1698905b2c4e0541667b82ed231e90213f 100644 --- a/lib/c/2006/labcomm2006_scheduler.h +++ b/lib/c/2006/labcomm2006_scheduler.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_SCHEDULER_H_ -#define _LABCOMM_SCHEDULER_H_ +#ifndef __LABCOMM2006_SCHEDULER_H__ +#define __LABCOMM2006_SCHEDULER_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/2006/labcomm2006_scheduler_private.h b/lib/c/2006/labcomm2006_scheduler_private.h index 1c80b365712de1148b329d2a2c3fde3366bd7e1f..f6f955596cc63aaf6484318c8a3364ec37be4c1b 100644 --- a/lib/c/2006/labcomm2006_scheduler_private.h +++ b/lib/c/2006/labcomm2006_scheduler_private.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_SCHEDULER_PRIVATE_H_ -#define _LABCOMM_SCHEDULER_PRIVATE_H_ +#ifndef __LABCOMM2006_SCHEDULER_PRIVATE_H__ +#define __LABCOMM2006_SCHEDULER_PRIVATE_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/2006/labcomm_compat_vxworks.h b/lib/c/2006/labcomm_compat_vxworks.h index ca3b0998a373a4a2dd1bb9be5dfdf317b8e875df..2918567139cef9f2a82c2921f0177a02de65e11b 100644 --- a/lib/c/2006/labcomm_compat_vxworks.h +++ b/lib/c/2006/labcomm_compat_vxworks.h @@ -1,5 +1,5 @@ -#ifndef _LABCOMM2006_COMPAT_VXWORKS_H_ -#define _LABCOMM2006_COMPAT_VXWORKS_H_ +#ifndef __LABCOMM2006_COMPAT_VXWORKS_H__ +#define __LABCOMM2006_COMPAT_VXWORKS_H__ #ifndef __VXWORKS__ #error "__VXWORKS__" not defined diff --git a/lib/c/2014/labcomm.h b/lib/c/2014/labcomm.h index dd8859e8654e1118e4154609165befc271883420..fa62e7d006d35ab18e11c6bca4ac97d59299dd12 100644 --- a/lib/c/2014/labcomm.h +++ b/lib/c/2014/labcomm.h @@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_H_ -#define _LABCOMM_H_ +#ifndef __LABCOMM_H__ +#define __LABCOMM_H__ #include <stdarg.h> diff --git a/lib/c/2014/labcomm_default_error_handler.h b/lib/c/2014/labcomm_default_error_handler.h index 4cd642a9e2f986f31ce085d6fc775fa8d7312fb2..8f479a0a2f374cf181cf5e976525c6e0e81ac07d 100644 --- a/lib/c/2014/labcomm_default_error_handler.h +++ b/lib/c/2014/labcomm_default_error_handler.h @@ -18,7 +18,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM_DEFAULT_ERROR_HANDLER_H__ +#define __LABCOMM_DEFAULT_ERROR_HANDLER_H__ #include "labcomm.h" extern struct labcomm_error_handler *labcomm_default_error_handler; + +#endif diff --git a/lib/c/2014/labcomm_default_memory.h b/lib/c/2014/labcomm_default_memory.h index 8b22301ed7c9e9bdaf8bf13f98661af264b864d3..f00b226e866bd34f6ac0713a22eb21dd71e6fbca 100644 --- a/lib/c/2014/labcomm_default_memory.h +++ b/lib/c/2014/labcomm_default_memory.h @@ -18,9 +18,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM_DEFAULT_MEMORY_H__ +#define __LABCOMM_DEFAULT_MEMORY_H__ #include <stdlib.h> #include "labcomm.h" extern struct labcomm_memory *labcomm_default_memory; +#endif diff --git a/lib/c/2014/labcomm_default_scheduler.h b/lib/c/2014/labcomm_default_scheduler.h index 923ea20f26fe8c587dc0c97447592b738a4b0b8b..7ec579ba419f21e9f3828fcdd9f99044a6d8e165 100644 --- a/lib/c/2014/labcomm_default_scheduler.h +++ b/lib/c/2014/labcomm_default_scheduler.h @@ -18,7 +18,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LABCOMM_DEFAULT_SCHEDULER_H__ +#define __LABCOMM_DEFAULT_SCHEDULER_H__ #include "labcomm.h" extern struct labcomm_scheduler *labcomm_default_scheduler; + +#endif diff --git a/lib/c/2014/labcomm_dynamic_buffer_writer.h b/lib/c/2014/labcomm_dynamic_buffer_writer.h index 53a65d42c878dea278f78f7572774658c86d6fe0..9fea8ed8a59113e2da9e507ca416105ce5636cce 100644 --- a/lib/c/2014/labcomm_dynamic_buffer_writer.h +++ b/lib/c/2014/labcomm_dynamic_buffer_writer.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H_ -#define _LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H_ +#ifndef __LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H__ +#define __LABCOMM_DYNAMIC_BUFFER_READER_WRITER_H__ #include "labcomm.h" diff --git a/lib/c/2014/labcomm_error.h b/lib/c/2014/labcomm_error.h index 80e4805d96c071967d3be7b964c2d549e304f6ef..5ad344bc31c90f2328c1658df9fccb2595a422e3 100644 --- a/lib/c/2014/labcomm_error.h +++ b/lib/c/2014/labcomm_error.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __LABCOMM_ERROR_H__ -#define __LABCOMM_ERROR_H__ +#ifndef __LABCOMM_ERROR_H___ +#define __LABCOMM_ERROR_H___ enum labcomm_error { #define LABCOMM_ERROR(name, description) name , diff --git a/lib/c/2014/labcomm_fd_reader.h b/lib/c/2014/labcomm_fd_reader.h index b04aa8ed5515ccb5caf3571fd05adf0fdfc294f0..a00fe981003b5a86fefab2ecd4a6fbd783b85603 100644 --- a/lib/c/2014/labcomm_fd_reader.h +++ b/lib/c/2014/labcomm_fd_reader.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_FD_READER_H_ -#define _LABCOMM_FD_READER_H_ +#ifndef __LABCOMM_FD_READER_H__ +#define __LABCOMM_FD_READER_H__ #include "labcomm.h" diff --git a/lib/c/2014/labcomm_fd_writer.h b/lib/c/2014/labcomm_fd_writer.h index e89b5e7198c1d7822f276d23801baf9a889ce4f2..3fbf42a0693878f00fbaaa48188823cec735de60 100644 --- a/lib/c/2014/labcomm_fd_writer.h +++ b/lib/c/2014/labcomm_fd_writer.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_FD_WRITER_H_ -#define _LABCOMM_FD_WRITER_H_ +#ifndef __LABCOMM_FD_WRITER_H__ +#define __LABCOMM_FD_WRITER_H__ #include "labcomm.h" diff --git a/lib/c/2014/labcomm_ioctl.h b/lib/c/2014/labcomm_ioctl.h index 9711eb7d826c9e55603a1310f2555e73486255b0..a00a6a8ba3ba4d292b8035973970df8556851a8b 100644 --- a/lib/c/2014/labcomm_ioctl.h +++ b/lib/c/2014/labcomm_ioctl.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __LABCOMM_IOCTL_H__ -#define __LABCOMM_IOCTL_H__ +#ifndef __LABCOMM_IOCTL_H___ +#define __LABCOMM_IOCTL_H___ #include "labcomm.h" diff --git a/lib/c/2014/labcomm_private.h b/lib/c/2014/labcomm_private.h index 1cef97dc4cec3abc311e040517d189b2aa10a6e3..6422a90ecaf2fce2f870b8184954d2d72dd0c6b5 100644 --- a/lib/c/2014/labcomm_private.h +++ b/lib/c/2014/labcomm_private.h @@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_PRIVATE_H_ -#define _LABCOMM_PRIVATE_H_ +#ifndef __LABCOMM_PRIVATE_H__ +#define __LABCOMM_PRIVATE_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/2014/labcomm_pthread_scheduler.h b/lib/c/2014/labcomm_pthread_scheduler.h index c8b20eca176925a9ba4468967ca6225f5d6ab806..64ace83c31fb414205cf74c4c46aa4757b345069 100644 --- a/lib/c/2014/labcomm_pthread_scheduler.h +++ b/lib/c/2014/labcomm_pthread_scheduler.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_PTHREAD_SCHEDULER_H_ -#define _LABCOMM_PTHREAD_SCHEDULER_H_ +#ifndef __LABCOMM_PTHREAD_SCHEDULER_H__ +#define __LABCOMM_PTHREAD_SCHEDULER_H__ #include "labcomm.h" diff --git a/lib/c/2014/labcomm_scheduler.h b/lib/c/2014/labcomm_scheduler.h index 07f74c281ab7fff57ec8edf86e6f04219f2e3427..b96b1ca8a67c2588b15ea61db6a7b70f89605bb3 100644 --- a/lib/c/2014/labcomm_scheduler.h +++ b/lib/c/2014/labcomm_scheduler.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_SCHEDULER_H_ -#define _LABCOMM_SCHEDULER_H_ +#ifndef __LABCOMM_SCHEDULER_H__ +#define __LABCOMM_SCHEDULER_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/2014/labcomm_scheduler_private.h b/lib/c/2014/labcomm_scheduler_private.h index 398552e0e434f17b4f332364ce09256dcb4d682c..46b108d5e9c81f9fe0a5a400b3765b9ffdb7886a 100644 --- a/lib/c/2014/labcomm_scheduler_private.h +++ b/lib/c/2014/labcomm_scheduler_private.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LABCOMM_SCHEDULER_PRIVATE_H_ -#define _LABCOMM_SCHEDULER_PRIVATE_H_ +#ifndef __LABCOMM_SCHEDULER_PRIVATE_H__ +#define __LABCOMM_SCHEDULER_PRIVATE_H__ #ifdef LABCOMM_COMPAT #include LABCOMM_COMPAT diff --git a/lib/c/version_compare.py b/lib/c/version_compare.py index f3e90d8a7deb21b4218d1b6e92d5efed32b0f1e6..47d016bad3146f5843a234584166a2f03673b665 100755 --- a/lib/c/version_compare.py +++ b/lib/c/version_compare.py @@ -9,7 +9,7 @@ class File: def __init__(self, path, match, replacement): def replace(s): - return re.sub('[ \t]+', ' ', s).replace(match, replacement) + return re.sub('[ \t]+', ' ', s).replace(match, replacement).strip() self.name = path.replace(match, replacement) self.path = path with open(path) as f: @@ -50,7 +50,7 @@ if __name__ == '__main__': else: equal = True for l in difflib.unified_diff(a.lines, b.lines, a.path, b.path): - print l, + print l equal = False if equal: print "Identical", a.path, b.path