[cliquer] 04/11: get rid of git-dpm
Mattia Rizzolo
mattia at debian.org
Wed Nov 22 10:34:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository cliquer.
commit dbf4674bfda29e0db7c5f18b5cd96551fb85bf7d
Author: Mattia Rizzolo <mattia at debian.org>
Date: Wed Nov 22 11:18:30 2017 +0100
get rid of git-dpm
Gbp-Dch: Ignore
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
Makefile | 52 +++++++---------------------------------------------
cl.c | 24 ++++++++++++------------
cliquer.h | 18 +++++++++---------
debian/.git-dpm | 8 --------
graph.h | 30 +++++++++++++++---------------
libcliquer.map | 43 -------------------------------------------
misc.h | 7 -------
reorder.h | 28 ++++++++++++++--------------
8 files changed, 57 insertions(+), 153 deletions(-)
diff --git a/Makefile b/Makefile
index b60e992..6c5de54 100644
--- a/Makefile
+++ b/Makefile
@@ -19,19 +19,9 @@ CFLAGS=-Wall -O3 -fomit-frame-pointer -funroll-loops
# SunOS:
#CFLAGS=-fast
-# GCC:
-SHLDFLAGS = --shared -Wl,--soname=$(SONAME) -Wl,--version-script=libcliquer.map
-SHCFLAGS = -fPIC -fvisibility=hidden
-
-# SunOS:
-#SHLDFLAGS = --shared -Wl,--soname=$(SONAME) -Wl,--version-script=libcliquer.map
-#SHCFLAGS = -fPIC
-
-CPPFLAGS =
-
## Program options:
-# Enable long options for cliquer (eg. "cliquer --help"), comment out to disable.
+# Enable long options for cl (eg. "cl --help"), comment out to disable.
# Requires getopt_long(3) (a GNU extension)
LONGOPTS = -DENABLE_LONG_OPTIONS
@@ -39,34 +29,23 @@ LONGOPTS = -DENABLE_LONG_OPTIONS
##### End of configurable options
-all: cliquer libcliquer.so
+all: cl
-libcliquer_OBJECTS = cliquer.o graph.o reorder.o
-SONAME=libcliquer.so.1
testcases: testcases.o cliquer.o graph.o reorder.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ testcases.o cliquer.o graph.o reorder.o
+ $(CC) $(LDFLAGS) -o $@ testcases.o cliquer.o graph.o reorder.o
-libcliquer.so: $(libcliquer_OBJECTS) libcliquer.map
- $(CC) $(CFLAGS) $(LDFLAGS) $(SHCFLAGS) $(SHLDFLAGS) -o $@ $(libcliquer_OBJECTS)
-
-cliquer: cl.o libcliquer.so
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ cl.o -L. -lcliquer
+cl: cl.o cliquer.o graph.o reorder.o
+ $(CC) $(LDFLAGS) -o $@ cl.o cliquer.o graph.o reorder.o
cl.o testcases.o cliquer.o graph.o reorder.o: cliquer.h set.h graph.h misc.h reorder.h Makefile cliquerconf.h
cl.o: cl.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LONGOPTS) -o $@ -c $<
-
-$(libcliquer_OBJECTS): %.o: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(SHCFLAGS) -o $@ -c $<
-
-testcases.o: testcases.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) $(LONGOPTS) -o $@ -c $<
clean:
- rm -f *.o *~ cliquer testcases *.so*
+ rm -f *.o *~ cl testcases
backup:
mkdir "`date "+backup-%Y-%m-%d-%H-%M"`" 2>/dev/null || true
@@ -74,20 +53,3 @@ backup:
test: testcases
./testcases
-
-DESTDIR=
-INSTALL=install
-INSTALL_DATA=$(INSTALL) -m644
-MKDIR_P=mkdir -p
-prefix=/usr/local
-
-install: cliquer libcliquer.so
- $(MKDIR_P) $(DESTDIR)$(prefix)/bin
- $(MKDIR_P) $(DESTDIR)$(prefix)/lib
- $(MKDIR_P) $(DESTDIR)$(prefix)/include/cliquer
- $(INSTALL) cliquer $(DESTDIR)$(prefix)/bin/
- $(INSTALL) libcliquer.so $(DESTDIR)$(prefix)/lib/$(SONAME)
- ln -s $(SONAME) $(DESTDIR)$(prefix)/lib/libcliquer.so
- # users should #include <cliquer/cliquer.h>
- $(INSTALL_DATA) cliquer.h set.h graph.h misc.h reorder.h \
- cliquerconf.h $(DESTDIR)$(prefix)/include/cliquer/
diff --git a/cl.c b/cl.c
index 9005f1f..e929565 100644
--- a/cl.c
+++ b/cl.c
@@ -12,12 +12,12 @@
#define TRYFORHELP "Try `%s -h' for more information.\n",argv[0]
-static void printhelp(char *prog);
-static void read_options(int argc, char **argv);
-static void print_search(graph_t *g);
-static boolean record_clique_func(set_t s,graph_t *g,clique_options *opts);
-static boolean print_clique_func(set_t s,graph_t *g,clique_options *opts);
-static void print_clique(set_t s,graph_t *g);
+void printhelp(char *prog);
+void read_options(int argc, char **argv);
+void print_search(graph_t *g);
+boolean record_clique_func(set_t s,graph_t *g,clique_options *opts);
+boolean print_clique_func(set_t s,graph_t *g,clique_options *opts);
+void print_clique(set_t s,graph_t *g);
/* Options, changed by command-line arguments. */
@@ -144,7 +144,7 @@ int main(int argc, char **argv) {
* Prints the help message to stdout. prog is the program name
* (from argv[0]).
*/
-static void printhelp(char *prog) {
+void printhelp(char *prog) {
printf("Usage: %s [options] <dimacs-file>\n"
"\n"
"<dimacs-file> is the ASCII or binary DIMACS-format file from which to read\n"
@@ -187,7 +187,7 @@ static void printhelp(char *prog) {
/*
* Reads the command-line options and sets the global options accordingly.
*/
-static void read_options(int argc, char **argv) {
+void read_options(int argc, char **argv) {
int c;
char *ptr;
@@ -337,7 +337,7 @@ static void read_options(int argc, char **argv) {
/*
* Prints a line to stderr indicating what is being searched for.
*/
-static void print_search(graph_t *g) {
+void print_search(graph_t *g) {
fprintf(stderr,"Searching for %s ",find_all?"all":"a single");
if (min_weight==0) {
fprintf(stderr,"maximum %s clique%s...\n",
@@ -362,7 +362,7 @@ static void print_search(graph_t *g) {
/*
* Prints the clique s along with it's size and weight.
*/
-static void print_clique(set_t s,graph_t *g) {
+void print_clique(set_t s,graph_t *g) {
int i;
printf("size=%d, weight=%d: ",set_size(s),graph_subgraph_weight(g,s));
@@ -382,7 +382,7 @@ static void print_clique(set_t s,graph_t *g) {
* Records a clique into the clique list using dynamic allocation.
* Used as opts->user_function.
*/
-static boolean record_clique_func(set_t s,graph_t *g,clique_options *opts) {
+boolean record_clique_func(set_t s,graph_t *g,clique_options *opts) {
if (clique_count>=clique_list_size) {
clique_list=realloc(clique_list,(clique_list_size+512) *
sizeof(set_t));
@@ -396,7 +396,7 @@ static boolean record_clique_func(set_t s,graph_t *g,clique_options *opts) {
/*
* Prints a clique. Used as opts->user_function.
*/
-static boolean print_clique_func(set_t s,graph_t *g,clique_options *opts) {
+boolean print_clique_func(set_t s,graph_t *g,clique_options *opts) {
print_clique(s,g);
return TRUE;
}
diff --git a/cliquer.h b/cliquer.h
index aa7fafb..d9993be 100644
--- a/cliquer.h
+++ b/cliquer.h
@@ -24,29 +24,29 @@ struct _clique_options {
int clique_list_length;
};
-PUBLIC clique_options *clique_default_options;
+extern clique_options *clique_default_options;
/* Weighted clique functions */
-PUBLIC int clique_max_weight(graph_t *g,clique_options *opts);
-PUBLIC set_t clique_find_single(graph_t *g,int min_weight,int max_weight,
+extern int clique_max_weight(graph_t *g,clique_options *opts);
+extern set_t clique_find_single(graph_t *g,int min_weight,int max_weight,
boolean maximal, clique_options *opts);
-PUBLIC int clique_find_all(graph_t *g, int req_weight, boolean exact,
+extern int clique_find_all(graph_t *g, int req_weight, boolean exact,
boolean maximal, clique_options *opts);
/* Unweighted clique functions */
#define clique_unweighted_max_size clique_unweighted_max_weight
-PUBLIC int clique_unweighted_max_weight(graph_t *g, clique_options *opts);
-PUBLIC set_t clique_unweighted_find_single(graph_t *g,int min_size,
+extern int clique_unweighted_max_weight(graph_t *g, clique_options *opts);
+extern set_t clique_unweighted_find_single(graph_t *g,int min_size,
int max_size,boolean maximal,
clique_options *opts);
-PUBLIC int clique_unweighted_find_all(graph_t *g, int min_size, int max_size,
+extern int clique_unweighted_find_all(graph_t *g, int min_size, int max_size,
boolean maximal, clique_options *opts);
/* Time printing functions */
-PUBLIC boolean clique_print_time(int level, int i, int n, int max,
+extern boolean clique_print_time(int level, int i, int n, int max,
double cputime, double realtime,
clique_options *opts);
-PUBLIC boolean clique_print_time_always(int level, int i, int n, int max,
+extern boolean clique_print_time_always(int level, int i, int n, int max,
double cputime, double realtime,
clique_options *opts);
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 7bcedb3..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,8 +0,0 @@
-# see git-dpm(1) from git-dpm package
-d62c750da74ed839b57719fdeb340ecf7bccec9f
-d62c750da74ed839b57719fdeb340ecf7bccec9f
-d1bca951d64fce33f1923f141b93c513ecf4b150
-d1bca951d64fce33f1923f141b93c513ecf4b150
-cliquer_1.21.orig.tar.gz
-61474ad5454d606e8168b0092bd57b4e0572e4be
-100327
diff --git a/graph.h b/graph.h
index 8701b28..9c94f17 100644
--- a/graph.h
+++ b/graph.h
@@ -25,26 +25,26 @@ struct _graph_t {
} while (FALSE)
-PUBLIC graph_t *graph_new(int n);
-PUBLIC void graph_free(graph_t *g);
-PUBLIC void graph_resize(graph_t *g, int size);
-PUBLIC void graph_crop(graph_t *g);
+extern graph_t *graph_new(int n);
+extern void graph_free(graph_t *g);
+extern void graph_resize(graph_t *g, int size);
+extern void graph_crop(graph_t *g);
-PUBLIC boolean graph_weighted(graph_t *g);
-PUBLIC int graph_edge_count(graph_t *g);
+extern boolean graph_weighted(graph_t *g);
+extern int graph_edge_count(graph_t *g);
-PUBLIC graph_t *graph_read_dimacs(FILE *fp);
-PUBLIC graph_t *graph_read_dimacs_file(char *file);
-PUBLIC boolean graph_write_dimacs_ascii(graph_t *g, char *comment,FILE *fp);
-PUBLIC boolean graph_write_dimacs_ascii_file(graph_t *g,char *comment,
+extern graph_t *graph_read_dimacs(FILE *fp);
+extern graph_t *graph_read_dimacs_file(char *file);
+extern boolean graph_write_dimacs_ascii(graph_t *g, char *comment,FILE *fp);
+extern boolean graph_write_dimacs_ascii_file(graph_t *g,char *comment,
char *file);
-PUBLIC boolean graph_write_dimacs_binary(graph_t *g, char *comment,FILE *fp);
-PUBLIC boolean graph_write_dimacs_binary_file(graph_t *g, char *comment,
+extern boolean graph_write_dimacs_binary(graph_t *g, char *comment,FILE *fp);
+extern boolean graph_write_dimacs_binary_file(graph_t *g, char *comment,
char *file);
-PUBLIC void graph_print(graph_t *g);
-PUBLIC boolean graph_test(graph_t *g, FILE *output);
-PUBLIC int graph_test_regular(graph_t *g);
+extern void graph_print(graph_t *g);
+extern boolean graph_test(graph_t *g, FILE *output);
+extern int graph_test_regular(graph_t *g);
UNUSED_FUNCTION INLINE
static int graph_subgraph_weight(graph_t *g,set_t s) {
diff --git a/libcliquer.map b/libcliquer.map
deleted file mode 100644
index 5650839..0000000
--- a/libcliquer.map
+++ /dev/null
@@ -1,43 +0,0 @@
-CLIQUER_1 {
- global:
- clique_default_options;
- clique_max_weight;
- clique_find_single;
- clique_find_all;
- clique_unweighted_max_weight;
- clique_unweighted_find_single;
- clique_unweighted_find_all;
- clique_print_time;
- clique_print_time_always;
- graph_new;
- graph_free;
- graph_resize;
- graph_crop;
- graph_weighted;
- graph_edge_count;
- graph_read_dimacs;
- graph_read_dimacs_file;
- graph_write_dimacs_ascii;
- graph_write_dimacs_ascii_file;
- graph_write_dimacs_binary;
- graph_write_dimacs_binary_file;
- graph_print;
- graph_test;
- graph_test_regular;
- reorder_set;
- reorder_graph;
- reorder_duplicate;
- reorder_invert;
- reorder_reverse;
- reorder_ident;
- reorder_is_bijection;
- reorder_by_greedy_coloring;
- reorder_by_weighted_greedy_coloring;
- reorder_by_unweighted_greedy_coloring;
- reorder_by_degree;
- reorder_by_random;
- reorder_by_ident;
- reorder_by_reverse;
- local:
- *;
-};
diff --git a/misc.h b/misc.h
index 60f8349..9cad635 100644
--- a/misc.h
+++ b/misc.h
@@ -26,13 +26,6 @@
# endif
#endif /* !UNUSED_FUNCTION */
-#ifndef PUBLIC
-# if __GNUC__ >= 4
-# define PUBLIC extern __attribute__ ((visibility("default")))
-# else
-# define PUBLIC extern
-# endif
-#endif
/*
* Default inlining directive: "inline"
diff --git a/reorder.h b/reorder.h
index 1d3b4e1..5c06d31 100644
--- a/reorder.h
+++ b/reorder.h
@@ -5,22 +5,22 @@
#include "set.h"
#include "graph.h"
-PUBLIC void reorder_set(set_t s,int *order);
-PUBLIC void reorder_graph(graph_t *g, int *order);
-PUBLIC int *reorder_duplicate(int *order,int n);
-PUBLIC void reorder_invert(int *order,int n);
-PUBLIC void reorder_reverse(int *order,int n);
-PUBLIC int *reorder_ident(int n);
-PUBLIC boolean reorder_is_bijection(int *order,int n);
+extern void reorder_set(set_t s,int *order);
+extern void reorder_graph(graph_t *g, int *order);
+extern int *reorder_duplicate(int *order,int n);
+extern void reorder_invert(int *order,int n);
+extern void reorder_reverse(int *order,int n);
+extern int *reorder_ident(int n);
+extern boolean reorder_is_bijection(int *order,int n);
#define reorder_by_default reorder_by_greedy_coloring
-PUBLIC int *reorder_by_greedy_coloring(graph_t *g, boolean weighted);
-PUBLIC int *reorder_by_weighted_greedy_coloring(graph_t *g, boolean weighted);
-PUBLIC int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted);
-PUBLIC int *reorder_by_degree(graph_t *g, boolean weighted);
-PUBLIC int *reorder_by_random(graph_t *g, boolean weighted);
-PUBLIC int *reorder_by_ident(graph_t *g, boolean weighted);
-PUBLIC int *reorder_by_reverse(graph_t *g, boolean weighted);
+extern int *reorder_by_greedy_coloring(graph_t *g, boolean weighted);
+extern int *reorder_by_weighted_greedy_coloring(graph_t *g, boolean weighted);
+extern int *reorder_by_unweighted_greedy_coloring(graph_t *g,boolean weighted);
+extern int *reorder_by_degree(graph_t *g, boolean weighted);
+extern int *reorder_by_random(graph_t *g, boolean weighted);
+extern int *reorder_by_ident(graph_t *g, boolean weighted);
+extern int *reorder_by_reverse(graph_t *g, boolean weighted);
#endif /* !CLIQUER_REORDER_H */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cliquer.git
More information about the debian-science-commits
mailing list