Commit fc448254 authored by John Ellson's avatar John Ellson

apply compilation warnings patch from mirraz1@rambler.ru (bug#2377)

parent 305a8af5
......@@ -19,6 +19,8 @@
#define STRONG_CLUSTER_WEIGHT 1000
#define NORANK 6
extern void rank2(graph_t * g, int balance, int maxiter, int searchsize);
static int is_a_strong_cluster(graph_t * g);
static void compile_samerank(graph_t * ug, graph_t * parent_clust);
static int is_internal_to_cluster(edge_t * e);
......
......@@ -1045,7 +1045,6 @@ static char* resolveColor (char* str)
#undef S
static
int colorxlate(char *str, gvcolor_t * color, color_type_t target_type)
{
static hsvrgbacolor_t *last;
......
......@@ -20,6 +20,7 @@ extern "C" {
#include "cgraph.h"
#include "expr.h"
#include "color.h"
extern void nodeInduce(Agraph_t * selected);
extern Agobj_t *clone(Agraph_t * g, Agobj_t * obj);
......@@ -49,6 +50,7 @@ extern "C" {
extern char *toLower(Expr_t * pgm, char *, Sfio_t*);
extern char *toUpper(Expr_t * pgm, char *, Sfio_t*);
extern int deleteObj(Agraph_t * g, Agobj_t * obj);
extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type);
extern char *colorx (Expr_t* ex, char* incolor, char* fmt, Sfio_t* fp);
extern void gvstart_timer(void);
extern double gvelapsed_sec(void);
......
......@@ -493,13 +493,13 @@ extern "C" {
#include <locale.h>
#define SFSETLOCALE(decimal,thousand) \
{ struct lconv* lv; \
if(*(decimal) == 0) \
{ *(decimal) = '.'; \
if((decimal) == 0) \
{ (decimal) = '.'; \
if((lv = localeconv())) \
{ if(lv->decimal_point && lv->decimal_point[0]) \
*(decimal) = lv->decimal_point[0]; \
if(thousand != NULL && lv->thousands_sep && lv->thousands_sep[0]) \
*(thousand) = lv->thousands_sep[0]; \
(decimal) = lv->decimal_point[0]; \
if(lv->thousands_sep && lv->thousands_sep[0]) \
(thousand) = lv->thousands_sep[0]; \
} \
} \
}
......
......@@ -75,8 +75,8 @@ char **retp; /* to return the remainder of string */
reg int mode, fexp, sign, expsign;
Sfdouble_t dval;
#if _lib_locale
int decpoint = 0;
SFSETLOCALE(&decpoint, NIL(int *));
char decpoint = 0, thousand;
SFSETLOCALE(decpoint, thousand);
#else
#define decpoint '.'
#endif
......
......@@ -46,7 +46,8 @@ int type;
int base, fmt, flags, dot, width, precis;
ssize_t n_str, size = 0;
char *t_str, *sp;
int v, n, skip, dollar, decimal, thousand;
int v, n, skip, dollar;
char decimal, thousand;
Sffmt_t *ft, savft;
Fmtpos_t *fp; /* position array of arguments */
int argp, argn, maxp, need[FP_INDEX];
......@@ -56,7 +57,8 @@ int type;
else if (!(fp = sffmtpos(f, form, args, -1)))
return NIL(Fmtpos_t *);
dollar = decimal = thousand = 0;
dollar = 0;
decimal = thousand = 0;
argn = maxp = -1;
while ((n = *form)) {
if (n != '%') { /* collect the non-pattern chars */
......@@ -150,7 +152,7 @@ int type;
flags |= SFFMT_ALTER;
goto loop_flags;
case QUOTE:
SFSETLOCALE(&decimal, &thousand);
SFSETLOCALE(decimal, thousand);
if (thousand)
flags |= SFFMT_THOUSAND;
goto loop_flags;
......
......@@ -60,7 +60,7 @@ va_list args; /* arg list if !argf */
#define SLACK 1024
char buf[SF_MAXDIGITS + SLACK], data[SF_GRAIN];
int decimal = 0, thousand = 0;
char decimal = 0, thousand = 0;
/* fast io system */
reg uchar *d, *endd;
......@@ -218,7 +218,7 @@ va_list args; /* arg list if !argf */
flags |= SFFMT_ALTER;
goto loop_flags;
case QUOTE:
SFSETLOCALE(&decimal, &thousand);
SFSETLOCALE(decimal, thousand);
if (thousand)
flags |= SFFMT_THOUSAND;
goto loop_flags;
......@@ -869,7 +869,7 @@ va_list args; /* arg list if !argf */
sp = endsp = buf + 1; /* reserve space for sign */
*endsp++ = *ep ? *ep++ : '0';
SFSETLOCALE(&decimal, &thousand);
SFSETLOCALE(decimal, thousand);
if (precis > 0 || (flags & SFFMT_ALTER))
*endsp++ = decimal;
ssp = endsp;
......@@ -912,7 +912,7 @@ va_list args; /* arg list if !argf */
goto end_efg;
}
SFSETLOCALE(&decimal, &thousand);
SFSETLOCALE(decimal, thousand);
endsp = sp = buf + 1; /* save a space for sign */
endep = ep + decpt;
if (decpt > 3 && (flags & SFFMT_THOUSAND)) {
......
......@@ -8,6 +8,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/lib/gvc \
-I$(top_srcdir)/lib/cgraph \
-I$(top_srcdir)/lib/cdt \
-I$(top_srcdir)/lib/gvpr \
-I$(top_srcdir)/lib/expr \
-I$(top_srcdir)/lib/ast \
-I$(top_srcdir)/lib/sfio \
-I$(top_srcdir)/lib/vmalloc \
$(LIBGVC_CFLAGS)
noinst_LTLIBRARIES = libgvplugin_core_C.la
......
......@@ -26,6 +26,7 @@
#include "agxbuf.h"
#include "utils.h"
#include "color.h"
#include "actions.h"
#include "const.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment