]> granicus.if.org Git - graphviz/commitdiff
[nfc] define PACK_API instead of redefining extern
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Jul 2021 06:23:06 +0000 (08:23 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 21 Jul 2021 16:29:25 +0000 (18:29 +0200)
lib/pack/pack.h

index 35986cb709b9288cb760fc9b46bf769c92bd7f0c..6b2a5c3aa1b34a386ed9af7f6d3991ecd15b53e1 100644 (file)
@@ -57,34 +57,37 @@ typedef unsigned int packval_t;
 /*visual studio*/
 #ifdef _WIN32
 #ifndef GVC_EXPORTS
-#define extern __declspec(dllimport)
+#define PACK_API __declspec(dllimport)
 #endif
 #endif
 /*end visual studio*/
+#ifndef PACK_API
+#define PACK_API extern
+#endif
 
-    extern point *putRects(int ng, boxf* bbs, pack_info* pinfo);
-    extern int packRects(int ng, boxf* bbs, pack_info* pinfo);
+    PACK_API point *putRects(int ng, boxf* bbs, pack_info* pinfo);
+    PACK_API int packRects(int ng, boxf* bbs, pack_info* pinfo);
 
-    extern point *putGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
-    extern int packGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
-    extern int packSubgraphs(int, Agraph_t **, Agraph_t *, pack_info *);
-    extern int pack_graph(int ng, Agraph_t** gs, Agraph_t* root, boolean* fixed);
+    PACK_API point *putGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
+    PACK_API int packGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
+    PACK_API int packSubgraphs(int, Agraph_t **, Agraph_t *, pack_info *);
+    PACK_API int pack_graph(int ng, Agraph_t** gs, Agraph_t* root, boolean* fixed);
 
-    extern int shiftGraphs(int, Agraph_t**, point*, Agraph_t*, int);
+    PACK_API int shiftGraphs(int, Agraph_t**, point*, Agraph_t*, int);
 
-    extern pack_mode getPackMode(Agraph_t * g, pack_mode dflt);
-    extern int getPack(Agraph_t *, int not_def, int dflt);
-    extern pack_mode getPackInfo(Agraph_t * g, pack_mode dflt, int dfltMargin, pack_info*);
-    extern pack_mode getPackModeInfo(Agraph_t * g, pack_mode dflt, pack_info*);
-    extern pack_mode parsePackModeInfo(char* p, pack_mode dflt, pack_info* pinfo);
+    PACK_API pack_mode getPackMode(Agraph_t * g, pack_mode dflt);
+    PACK_API int getPack(Agraph_t *, int not_def, int dflt);
+    PACK_API pack_mode getPackInfo(Agraph_t * g, pack_mode dflt, int dfltMargin, pack_info*);
+    PACK_API pack_mode getPackModeInfo(Agraph_t * g, pack_mode dflt, pack_info*);
+    PACK_API pack_mode parsePackModeInfo(char* p, pack_mode dflt, pack_info* pinfo);
 
-    extern int isConnected(Agraph_t *);
-    extern Agraph_t **ccomps(Agraph_t *, int *, char *);
-    extern Agraph_t **cccomps(Agraph_t *, int *, char *);
-    extern Agraph_t **pccomps(Agraph_t *, int *, char *, boolean *);
-    extern int nodeInduce(Agraph_t *);
-    extern Agraph_t *mapClust(Agraph_t *);
-#undef extern
+    PACK_API int isConnected(Agraph_t *);
+    PACK_API Agraph_t **ccomps(Agraph_t *, int *, char *);
+    PACK_API Agraph_t **cccomps(Agraph_t *, int *, char *);
+    PACK_API Agraph_t **pccomps(Agraph_t *, int *, char *, boolean *);
+    PACK_API int nodeInduce(Agraph_t *);
+    PACK_API Agraph_t *mapClust(Agraph_t *);
+#undef PACK_API
 #ifdef __cplusplus
 }
 #endif