+1 & pushed.
I was expecting at least one provider break in libvirt-cim, but that was
not the case!
On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote:
# HG changeset patch
# User Eduardo Lima (Etrunko)<eblima(a)br.ibm.com>
# Date 1305296515 10800
# Node ID af2ffd311f1bc510a56a7018691edce7be89ad17
# Parent f92b5e72f469539bfdf449dbdb827075b3257cc5
libcmpiutil: Cleanup includes
This is a cosmetic patch removing some unecessary includes and
'standardizing' includes in the source code following the simple rules:
1) Internal includes (provided by libcmpiutil) are done with ""
e.g. #include "libcmpiutil.h"
2) External includes (provided by other projects) are done with<>
e.g. #include<cmpidt.h>
Signed-off-by: Eduardo Lima (Etrunko)<eblima(a)br.ibm.com>
diff --git a/args_util.c b/args_util.c
--- a/args_util.c
+++ b/args_util.c
@@ -24,8 +24,6 @@
#include<stdarg.h>
#include<stdio.h>
-#include<cmpidt.h>
-#include<cmpift.h>
#include<cmpimacs.h>
#include "libcmpiutil.h"
diff --git a/debug_util.c b/debug_util.c
--- a/debug_util.c
+++ b/debug_util.c
@@ -24,10 +24,6 @@
#include<stdarg.h>
#include<stdio.h>
-#include<cmpidt.h>
-#include<cmpift.h>
-#include<cmpimacs.h>
-
#include "libcmpiutil.h"
static int log_init = 0;
diff --git a/eo_parser.c b/eo_parser.c
--- a/eo_parser.c
+++ b/eo_parser.c
@@ -27,7 +27,7 @@
#include<fcntl.h>
#include<unistd.h>
-#include "cmpidt.h"
+#include<cmpimacs.h>
#include "libcmpiutil.h"
#include "eo_util_parser.h"
diff --git a/eo_parser_xml.c b/eo_parser_xml.c
--- a/eo_parser_xml.c
+++ b/eo_parser_xml.c
@@ -28,8 +28,6 @@
#include<libxml/parser.h>
#include<libxml/tree.h>
-#include<cmpidt.h>
-#include<cmpift.h>
#include<cmpimacs.h>
#include "libcmpiutil.h"
diff --git a/eo_util_lexer.l b/eo_util_lexer.l
--- a/eo_util_lexer.l
+++ b/eo_util_lexer.l
@@ -11,7 +11,7 @@
/* DEFINITIONS SECTION */
%{
-#include "cmpidt.h"
+#include<cmpidt.h>
#include<string.h>
#include "eo_util_parser.h"
#ifndef YY_FLEX_LEX_COMPAT
diff --git a/eo_util_parser.y b/eo_util_parser.y
--- a/eo_util_parser.y
+++ b/eo_util_parser.y
@@ -13,8 +13,8 @@
#include<stdio.h>
#include<stdint.h>
-#include "cmpidt.h"
-#include "cmpift.h"
+#include<cmpidt.h>
+#include<cmpift.h>
#include "eo_parser_xml.h"
diff --git a/inst_list.c b/inst_list.c
--- a/inst_list.c
+++ b/inst_list.c
@@ -20,9 +20,7 @@
*/
#include<stdlib.h>
-#include<cmpidt.h>
-
-#include<libcmpiutil.h>
+#include "libcmpiutil.h"
static int resize(struct inst_list *list, int newmax)
{
diff --git a/instance_util.c b/instance_util.c
--- a/instance_util.c
+++ b/instance_util.c
@@ -18,9 +18,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include<stdbool.h>
#include<string.h>
+#include<cmpimacs.h>
+
#include "libcmpiutil.h"
unsigned int cu_return_instances(const CMPIResult *results,
diff --git a/libcmpiutil.h b/libcmpiutil.h
--- a/libcmpiutil.h
+++ b/libcmpiutil.h
@@ -12,12 +12,8 @@
#include<stdbool.h>
#include<stdint.h>
-#include<stdlib.h>
-#include<stdio.h>
#include<cmpidt.h>
-#include<cmpift.h>
-#include<cmpimacs.h>
#define CLASSNAME(op) (CMGetCharPtr(CMGetClassName(op, NULL)))
#define NAMESPACE(op) (CMGetCharPtr(CMGetNameSpace(op, NULL)))
diff --git a/std_association.c b/std_association.c
--- a/std_association.c
+++ b/std_association.c
@@ -22,10 +22,6 @@
*/
#include<string.h>
-#include<cmpidt.h>
-#include<cmpift.h>
-#include<cmpimacs.h>
-
#include "libcmpiutil.h"
#include "std_association.h"
diff --git a/std_association.h b/std_association.h
--- a/std_association.h
+++ b/std_association.h
@@ -23,6 +23,7 @@
#define __STD_ASSOCIATION_H
#include<cmpidt.h>
+#include<cmpift.h>
struct std_assoc;
struct std_assoc_info;
diff --git a/std_indication.c b/std_indication.c
--- a/std_indication.c
+++ b/std_indication.c
@@ -20,12 +20,9 @@
*/
#include<string.h>
#include<stdbool.h>
+#include<stdlib.h>
-#include<cmpidt.h>
-#include<cmpift.h>
-#include<cmpimacs.h>
-
-#include<libcmpiutil.h>
+#include "libcmpiutil.h"
#define STREQ(a, b) (strcmp(a, b) == 0)
#define STREQC(a, b) (strcasecmp(a, b) == 0)
diff --git a/std_indication.h b/std_indication.h
--- a/std_indication.h
+++ b/std_indication.h
@@ -21,15 +21,10 @@
#ifndef __STD_INDICATION_H
#define __STD_INDICATION_H
+#include<stdbool.h>
+
#include<cmpidt.h>
#include<cmpift.h>
-#include<cmpimacs.h>
-#include<stdio.h>
-
-#include "config.h"
-
-#include "libcmpiutil.h"
-#include "std_invokemethod.h"
#ifdef CMPI_EI_VOID
# define _EI_RTYPE void
diff --git a/std_invokemethod.c b/std_invokemethod.c
--- a/std_invokemethod.c
+++ b/std_invokemethod.c
@@ -21,10 +21,6 @@
#include<stdio.h>
#include<string.h>
-#include "cmpidt.h"
-#include "cmpift.h"
-#include "cmpimacs.h"
-
#include "libcmpiutil.h"
#include "std_invokemethod.h"
diff --git a/std_invokemethod.h b/std_invokemethod.h
--- a/std_invokemethod.h
+++ b/std_invokemethod.h
@@ -21,9 +21,8 @@
#ifndef __STD_INVOKEMETHOD_H
#define __STD_INVOKEMETHOD_H
-#include "cmpidt.h"
-#include "cmpift.h"
-#include "cmpimacs.h"
+#include<cmpidt.h>
+#include<cmpift.h>
typedef CMPIStatus (*method_handler_fn)(CMPIMethodMI *self,
const CMPIContext *context,
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent(a)linux.vnet.ibm.com