mirror of
https://github.com/scottdraves/flam3.git
synced 2025-01-21 05:20:05 -05:00
got rid of compile warnings, added -Wall to AM_CFLAGS for now
This commit is contained in:
parent
42c050c29f
commit
efe4a24b7e
@ -1,7 +1,7 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
||||||
AM_CFLAGS = -g -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
AM_CFLAGS = -g -O2 -Wall -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ top_builddir = @top_builddir@
|
|||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
|
||||||
AM_CFLAGS = -g -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
AM_CFLAGS = -g -O2 -Wall -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
|
man1_MANS = flam3-animate.man flam3-genome.man flam3-render.man flam3-convert.man
|
||||||
lib_LTLIBRARIES = libflam3.la
|
lib_LTLIBRARIES = libflam3.la
|
||||||
|
@ -197,7 +197,7 @@ double flam3_spatial_filter(int knum, double x) {
|
|||||||
return flam3_lanczos3_filter(x)*flam3_sinc(x/3.0);
|
return flam3_lanczos3_filter(x)*flam3_sinc(x/3.0);
|
||||||
else if (knum==12)
|
else if (knum==12)
|
||||||
return flam3_lanczos2_filter(x)*flam3_sinc(x/2.0);
|
return flam3_lanczos2_filter(x)*flam3_sinc(x/2.0);
|
||||||
else if (knum==13)
|
else // if (knum==13)
|
||||||
return flam3_quadratic_filter(x);
|
return flam3_quadratic_filter(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ void tokenize(ss, argv, argc)
|
|||||||
void parse_control_point_old(char **ss, flam3_genome *cp) {
|
void parse_control_point_old(char **ss, flam3_genome *cp) {
|
||||||
char *argv[MAXARGS];
|
char *argv[MAXARGS];
|
||||||
int argc, i, j;
|
int argc, i, j;
|
||||||
int set_cm = 0, set_image_size = 0, set_nbatches = 0, set_white_level = 0, set_cmap_inter = 0;
|
int set_cm = 0, set_image_size = 0, set_nbatches = 0, set_white_level = 0;
|
||||||
int set_spatial_oversample = 0, set_hr = 0;
|
int set_spatial_oversample = 0, set_hr = 0;
|
||||||
double *slot, xf, cm, t, nbatches, white_level, spatial_oversample, cmap_inter;
|
double *slot = NULL, xf, cm, t, nbatches, white_level, spatial_oversample, cmap_inter;
|
||||||
double image_size[2];
|
double image_size[2];
|
||||||
|
|
||||||
memset(cp, 0, sizeof(flam3_genome));
|
memset(cp, 0, sizeof(flam3_genome));
|
||||||
@ -153,7 +153,6 @@ void parse_control_point_old(char **ss, flam3_genome *cp) {
|
|||||||
slot = cp->xform[(int)xf].var;
|
slot = cp->xform[(int)xf].var;
|
||||||
else if (streql("cmap_inter", argv[i])) {
|
else if (streql("cmap_inter", argv[i])) {
|
||||||
slot = &cmap_inter;
|
slot = &cmap_inter;
|
||||||
set_cmap_inter = 1;
|
|
||||||
} else
|
} else
|
||||||
*slot++ = atof(argv[i]);
|
*slot++ = atof(argv[i]);
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,6 @@ static void print_find_parents(xmlNode *node, int last, int level) {
|
|||||||
xmlAttrPtr att_ptr, cur_att;
|
xmlAttrPtr att_ptr, cur_att;
|
||||||
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
|
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
|
||||||
xmlNode *this_node;
|
xmlNode *this_node;
|
||||||
int i;
|
|
||||||
int next_last;
|
int next_last;
|
||||||
//for (i = 0; i < level; i++)
|
//for (i = 0; i < level; i++)
|
||||||
// fprintf(stdout, "+");
|
// fprintf(stdout, "+");
|
||||||
@ -748,7 +747,7 @@ main(argc, argv)
|
|||||||
|
|
||||||
|
|
||||||
if (sequence) {
|
if (sequence) {
|
||||||
double blend, spread;
|
double blend;
|
||||||
int seqflag;
|
int seqflag;
|
||||||
int framecount;
|
int framecount;
|
||||||
|
|
||||||
@ -760,7 +759,6 @@ main(argc, argv)
|
|||||||
cp = string_to_cp(sequence, &ncp, flam3_defaults_on);
|
cp = string_to_cp(sequence, &ncp, flam3_defaults_on);
|
||||||
|
|
||||||
if (enclosed) printf("<sequence version=\"FLAM3-%s\">\n", flam3_version());
|
if (enclosed) printf("<sequence version=\"FLAM3-%s\">\n", flam3_version());
|
||||||
spread = 1.0/nframes;
|
|
||||||
framecount = 0;
|
framecount = 0;
|
||||||
#if 1
|
#if 1
|
||||||
for (i = 0; i < ncp; i++) {
|
for (i = 0; i < ncp; i++) {
|
||||||
|
@ -118,7 +118,7 @@ int main(int argc, char **argv) {
|
|||||||
double imgmem;
|
double imgmem;
|
||||||
unsigned int strip;
|
unsigned int strip;
|
||||||
double center_y, center_base;
|
double center_y, center_base;
|
||||||
unsigned int nstrips;
|
unsigned int nstrips = 1;
|
||||||
randctx savectx;
|
randctx savectx;
|
||||||
char *prefix = args("prefix", "");
|
char *prefix = args("prefix", "");
|
||||||
char *out = args("out", NULL);
|
char *out = args("out", NULL);
|
||||||
@ -126,7 +126,6 @@ int main(int argc, char **argv) {
|
|||||||
int verbose = argi("verbose", 1);
|
int verbose = argi("verbose", 1);
|
||||||
int bits = argi("bits", 33);
|
int bits = argi("bits", 33);
|
||||||
int bpc = argi("bpc",8);
|
int bpc = argi("bpc",8);
|
||||||
int seed = argi("seed", 0);
|
|
||||||
int transparency = argi("transparency", 0);
|
int transparency = argi("transparency", 0);
|
||||||
char *inf = getenv("in");
|
char *inf = getenv("in");
|
||||||
double qs = argf("qs", 1.0);
|
double qs = argf("qs", 1.0);
|
||||||
@ -249,7 +248,6 @@ int main(int argc, char **argv) {
|
|||||||
"to one file. all but last will be lost.\n");
|
"to one file. all but last will be lost.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < ncps; i++) {
|
for (i = 0; i < ncps; i++) {
|
||||||
int real_height;
|
int real_height;
|
||||||
|
|
||||||
|
5
flam3.c
5
flam3.c
@ -1628,7 +1628,6 @@ char *flam3_print_to_string(flam3_genome *cp) {
|
|||||||
char *genome_string;
|
char *genome_string;
|
||||||
|
|
||||||
int using_tmpdir = 0;
|
int using_tmpdir = 0;
|
||||||
char *tmp_path;
|
|
||||||
char tmpnam[256];
|
char tmpnam[256];
|
||||||
|
|
||||||
tmpflame = tmpfile();
|
tmpflame = tmpfile();
|
||||||
@ -2650,7 +2649,7 @@ void add_to_action(char *action, char *addtoaction) {
|
|||||||
|
|
||||||
void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action) {
|
void flam3_cross(flam3_genome *cp0, flam3_genome *cp1, flam3_genome *out, int cross_mode, randctx *rc, char *action) {
|
||||||
|
|
||||||
int i0,i1, i,j, rb;
|
int i,j, rb;
|
||||||
char ministr[10];
|
char ministr[10];
|
||||||
|
|
||||||
if (cross_mode == CROSS_NOT_SPECIFIED) {
|
if (cross_mode == CROSS_NOT_SPECIFIED) {
|
||||||
@ -3064,7 +3063,7 @@ static int random_varn(int n) {
|
|||||||
|
|
||||||
void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_xforms) {
|
void flam3_random(flam3_genome *cp, int *ivars, int ivars_n, int sym, int spec_xforms) {
|
||||||
|
|
||||||
int i, j, nxforms, var, samed, multid, samepost, postid, addfinal=0;
|
int i, nxforms, var, samed, multid, samepost, postid, addfinal=0;
|
||||||
int finum = -1;
|
int finum = -1;
|
||||||
int n;
|
int n;
|
||||||
char *ai;
|
char *ai;
|
||||||
|
@ -513,7 +513,7 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
|
|||||||
/* Interpolate each xform */
|
/* Interpolate each xform */
|
||||||
for (i = 0; i < cpi[0].num_xforms; i++) {
|
for (i = 0; i < cpi[0].num_xforms; i++) {
|
||||||
|
|
||||||
double csave[2];
|
double csave[2] = {0, 0};
|
||||||
double td;
|
double td;
|
||||||
int all_id;
|
int all_id;
|
||||||
int nx = cpi[0].num_xforms-(cpi[0].final_xform_index>=0);
|
int nx = cpi[0].num_xforms-(cpi[0].final_xform_index>=0);
|
||||||
|
3
jpeg.c
3
jpeg.c
@ -102,7 +102,6 @@ write_jpeg(FILE *file, unsigned char *image, int width, int height, flam3_img_co
|
|||||||
unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
|
unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
|
||||||
struct jpeg_decompress_struct cinfo;
|
struct jpeg_decompress_struct cinfo;
|
||||||
struct jpeg_error_mgr jerr;
|
struct jpeg_error_mgr jerr;
|
||||||
int num_scanlines;
|
|
||||||
unsigned char *p, *q, *t;
|
unsigned char *p, *q, *t;
|
||||||
|
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
cinfo.err = jpeg_std_error(&jerr);
|
||||||
@ -126,7 +125,7 @@ unsigned char *read_jpeg(FILE *ifp, int *width, int *height) {
|
|||||||
while (cinfo.output_scanline < cinfo.output_height) {
|
while (cinfo.output_scanline < cinfo.output_height) {
|
||||||
unsigned char *s = t;
|
unsigned char *s = t;
|
||||||
int i;
|
int i;
|
||||||
num_scanlines = jpeg_read_scanlines(&cinfo, &t, 1);
|
jpeg_read_scanlines(&cinfo, &t, 1);
|
||||||
for (i = 0; i < *width; i++) {
|
for (i = 0; i < *width; i++) {
|
||||||
p[0] = s[0];
|
p[0] = s[0];
|
||||||
p[1] = s[1];
|
p[1] = s[1];
|
||||||
|
2
libtool
2
libtool
@ -86,7 +86,7 @@ NM="/usr/bin/nm -B"
|
|||||||
LN_S="ln -s"
|
LN_S="ln -s"
|
||||||
|
|
||||||
# What is the maximum length of a command?
|
# What is the maximum length of a command?
|
||||||
max_cmd_len=1572864
|
max_cmd_len=3458764513820540925
|
||||||
|
|
||||||
# Object file suffix (normally "o").
|
# Object file suffix (normally "o").
|
||||||
objext=o
|
objext=o
|
||||||
|
@ -26,7 +26,7 @@ static void parse_palettes(xmlNode *node) {
|
|||||||
xmlAttrPtr attr;
|
xmlAttrPtr attr;
|
||||||
char *val;
|
char *val;
|
||||||
lib_palette *pal;
|
lib_palette *pal;
|
||||||
int hex_error;
|
int hex_error = 0;
|
||||||
|
|
||||||
while (node) {
|
while (node) {
|
||||||
if (node->type == XML_ELEMENT_NODE && !xmlStrcmp(node->name, (const xmlChar *)"palette")) {
|
if (node->type == XML_ELEMENT_NODE && !xmlStrcmp(node->name, (const xmlChar *)"palette")) {
|
||||||
|
19
parser.c
19
parser.c
@ -143,6 +143,7 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
|
|||||||
int i,j,k;
|
int i,j,k;
|
||||||
double prcr;
|
double prcr;
|
||||||
|
|
||||||
|
minix = 0;
|
||||||
for (i=0; i<256; i++) {
|
for (i=0; i<256; i++) {
|
||||||
if (cp->palette[i].index >= 0) {
|
if (cp->palette[i].index >= 0) {
|
||||||
minix = i;
|
minix = i;
|
||||||
@ -159,6 +160,7 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
|
|||||||
|
|
||||||
wrapmin = minix + 256;
|
wrapmin = minix + 256;
|
||||||
|
|
||||||
|
maxix = 255;
|
||||||
for (i=255;i>=0;i--) {
|
for (i=255;i>=0;i--) {
|
||||||
if (cp->palette[i].index >= 0) {
|
if (cp->palette[i].index >= 0) {
|
||||||
maxix = i;
|
maxix = i;
|
||||||
@ -176,7 +178,9 @@ int flam3_interp_missing_colors(flam3_genome *cp) {
|
|||||||
/* Start of a range of negs */
|
/* Start of a range of negs */
|
||||||
str = i;
|
str = i;
|
||||||
intl = i-1;
|
intl = i-1;
|
||||||
|
intr = i+1;
|
||||||
colorli = intl;
|
colorli = intl;
|
||||||
|
colorri = intr;
|
||||||
while (cp->palette[i].index<0 && i<256) {
|
while (cp->palette[i].index<0 && i<256) {
|
||||||
enr = i;
|
enr = i;
|
||||||
intr = i+1;
|
intr = i+1;
|
||||||
@ -290,7 +294,7 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp) {
|
|||||||
char *att_str;
|
char *att_str;
|
||||||
int num_std_xforms=-1;
|
int num_std_xforms=-1;
|
||||||
char tmps[2];
|
char tmps[2];
|
||||||
int i,j;
|
int i;
|
||||||
flam3_xform tmpcpy;
|
flam3_xform tmpcpy;
|
||||||
flam3_chaos_entry *xaos=NULL;
|
flam3_chaos_entry *xaos=NULL;
|
||||||
int num_xaos=0;
|
int num_xaos=0;
|
||||||
@ -554,7 +558,7 @@ int parse_flame_element(xmlNode *flame_node, flam3_genome *loc_current_cp) {
|
|||||||
}
|
}
|
||||||
} else if (!xmlStrcmp(chld_node->name, (const xmlChar *)"colors")) {
|
} else if (!xmlStrcmp(chld_node->name, (const xmlChar *)"colors")) {
|
||||||
|
|
||||||
int count;
|
int count = 0;
|
||||||
|
|
||||||
/* Loop through the attributes of the colors element */
|
/* Loop through the attributes of the colors element */
|
||||||
att_ptr = chld_node->properties;
|
att_ptr = chld_node->properties;
|
||||||
@ -1255,14 +1259,14 @@ void flam3_edit_print(FILE *f, xmlNodePtr editNode, int tabs, int formatting) {
|
|||||||
int ti,strl;
|
int ti,strl;
|
||||||
xmlAttrPtr att_ptr=NULL,cur_att=NULL;
|
xmlAttrPtr att_ptr=NULL,cur_att=NULL;
|
||||||
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
|
xmlNodePtr chld_ptr=NULL, cur_chld=NULL;
|
||||||
int edit_or_sheep = 0, indent_printed = 0;
|
int indent_printed = 0;
|
||||||
char *ai;
|
char *ai;
|
||||||
int tablim = argi("print_edit_depth",0);
|
int tablim = argi("print_edit_depth",0);
|
||||||
|
|
||||||
char *att_str,*cont_str,*cpy_string;
|
char *att_str,*cont_str,*cpy_string;
|
||||||
|
|
||||||
if (tablim>0 && tabs>tablim)
|
if (tablim>0 && tabs>tablim)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If this node is an XML_ELEMENT_NODE, print it and it's attributes */
|
/* If this node is an XML_ELEMENT_NODE, print it and it's attributes */
|
||||||
if (editNode->type==XML_ELEMENT_NODE) {
|
if (editNode->type==XML_ELEMENT_NODE) {
|
||||||
@ -1278,13 +1282,8 @@ void flam3_edit_print(FILE *f, xmlNodePtr editNode, int tabs, int formatting) {
|
|||||||
/* This can either be an edit node or a sheep node */
|
/* This can either be an edit node or a sheep node */
|
||||||
/* If it's an edit node, add one to the tab */
|
/* If it's an edit node, add one to the tab */
|
||||||
if (!xmlStrcmp(editNode->name, (const xmlChar *)"edit")) {
|
if (!xmlStrcmp(editNode->name, (const xmlChar *)"edit")) {
|
||||||
edit_or_sheep = 1;
|
|
||||||
tabs ++;
|
tabs ++;
|
||||||
} else if (!xmlStrcmp(editNode->name, (const xmlChar *)"sheep"))
|
}
|
||||||
edit_or_sheep = 2;
|
|
||||||
else
|
|
||||||
edit_or_sheep = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/* Print the attributes */
|
/* Print the attributes */
|
||||||
att_ptr = editNode->properties;
|
att_ptr = editNode->properties;
|
||||||
|
@ -1916,9 +1916,6 @@ void var97_flux (flam3_iter_helper *f, double weight) {
|
|||||||
double avgr = weight * (2 + f->xform->flux_spread) * sqrt( sqrt(f->ty*f->ty + xpw*xpw) / sqrt(f->ty*f->ty + xmw*xmw));
|
double avgr = weight * (2 + f->xform->flux_spread) * sqrt( sqrt(f->ty*f->ty + xpw*xpw) / sqrt(f->ty*f->ty + xmw*xmw));
|
||||||
double avga = ( atan2(f->ty, xmw) - atan2(f->ty,xpw) ) * 0.5;
|
double avga = ( atan2(f->ty, xmw) - atan2(f->ty,xpw) ) * 0.5;
|
||||||
|
|
||||||
double s = sin(avga);
|
|
||||||
double c = cos(avga);
|
|
||||||
|
|
||||||
f->p0 += avgr * cos(avga);
|
f->p0 += avgr * cos(avga);
|
||||||
f->p1 += avgr * sin(avga);
|
f->p1 += avgr * sin(avga);
|
||||||
}
|
}
|
||||||
@ -2133,7 +2130,7 @@ int apply_xform(flam3_genome *cp, int fn, double *p, double *q, randctx *rc)
|
|||||||
{
|
{
|
||||||
flam3_iter_helper f;
|
flam3_iter_helper f;
|
||||||
int var_n;
|
int var_n;
|
||||||
double next_color,s,s1;
|
double s1;
|
||||||
double weight;
|
double weight;
|
||||||
|
|
||||||
f.rc = rc;
|
f.rc = rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user