mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccoll...@apache.org
Subject [5/5] incubator-mynewt-larva git commit: sys/log - undefine "ignore" macros after use.
Date Wed, 10 Feb 2016 03:17:24 GMT
sys/log - undefine "ignore" macros after use.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/0723e927
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/0723e927
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/0723e927

Branch: refs/heads/master
Commit: 0723e9273c0bcf443f09809b620b2ae7af1275e1
Parents: 012a989
Author: Christopher Collins <ccollins476ad@gmail.com>
Authored: Tue Feb 9 19:16:20 2016 -0800
Committer: Christopher Collins <ccollins476ad@gmail.com>
Committed: Tue Feb 9 19:16:20 2016 -0800

----------------------------------------------------------------------
 sys/log/include/log/ignore.h       | 21 +++++++++++++-
 sys/log/include/log/ignore_undef.h | 50 +++++++++++++++++++++++++++++++++
 sys/log/include/log/log.h          |  2 ++
 3 files changed, 72 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/0723e927/sys/log/include/log/ignore.h
----------------------------------------------------------------------
diff --git a/sys/log/include/log/ignore.h b/sys/log/include/log/ignore.h
index 341f6d7..4a10e1d 100644
--- a/sys/log/include/log/ignore.h
+++ b/sys/log/include/log/ignore.h
@@ -1,3 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #ifndef H_IGNORE_
 #define H_IGNORE_
 
@@ -28,7 +47,7 @@
 #define IGN_20(X, ...) ((void)(X));IGN_19(__VA_ARGS__)
 
 #define GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, \
-                  _13, _14, _15, _16, _17, _18, _19, _20, NAME, ...) NAME 
+                  _13, _14, _15, _16, _17, _18, _19, _20, NAME, ...) NAME
 #define IGNORE(...) \
     GET_MACRO(__VA_ARGS__, IGN_20, IGN_19, IGN_18, IGN_17, IGN_16, IGN_15, \
               IGN_14, IGN_13, IGN_12, IGN_11, IGN_10, IGN_9, IGN_8, IGN_7, \

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/0723e927/sys/log/include/log/ignore_undef.h
----------------------------------------------------------------------
diff --git a/sys/log/include/log/ignore_undef.h b/sys/log/include/log/ignore_undef.h
new file mode 100644
index 0000000..d55efe4
--- /dev/null
+++ b/sys/log/include/log/ignore_undef.h
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_IGNORE_UNDEF_
+#define H_IGNORE_UNDEF_
+
+/** Undefine all macros defined in ignore.h. */
+
+#undef IGN_1
+#undef IGN_2
+#undef IGN_3
+#undef IGN_4
+#undef IGN_5
+#undef IGN_6
+#undef IGN_7
+#undef IGN_8
+#undef IGN_9
+#undef IGN_10
+#undef IGN_11
+#undef IGN_12
+#undef IGN_13
+#undef IGN_14
+#undef IGN_15
+#undef IGN_16
+#undef IGN_17
+#undef IGN_18
+#undef IGN_19
+#undef IGN_20
+
+#undef GET_MACRO
+
+#undef IGNORE
+
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/0723e927/sys/log/include/log/log.h
----------------------------------------------------------------------
diff --git a/sys/log/include/log/log.h b/sys/log/include/log/log.h
index de88911..69d2046 100644
--- a/sys/log/include/log/log.h
+++ b/sys/log/include/log/log.h
@@ -139,4 +139,6 @@ int log_flush(struct log *log);
 int log_cbmem_handler_init(struct log_handler *, struct cbmem *);
 int log_console_handler_init(struct log_handler *);
 
+#include "log/ignore_undef.h"
+
 #endif /* __LOG_H__ */


Mime
View raw message