--- /dev/null
+2008-11-15 Johnny Q. Hacker <trelane@digitasaru.net>
+
+ * Started the changelog.
+
# Optional add #
################
IPATH = -I. # path of include file
-OBJOPT = -ggdb -g3 -Wall -Wstrict-prototypes -DDEBUG -std=c99 -D_GNU_SOURCE # option for obj
-EXEOPT = -ggdb -g3 -Wall -Wstrict-prototypes -std=c99 -D_GNU_SOURCE # option for exe (-lefence ...)
+OBJOPT = -ggdb -g3 -pg -Wall -Wstrict-prototypes -DDEBUG -std=c99 -D_GNU_SOURCE # option for obj
+EXEOPT = -ggdb -g3 -pg -Wall -Wstrict-prototypes -std=c99 -D_GNU_SOURCE # option for exe (-lefence ...)
LPATH = -L. # path for librairies ...
#####################
double range_mag;
double start_mag;
double stop_mag;
+ int i, j;
if(g->points->len == 0) {
return NULL;
}
stop_mag = 0;
else
stop_mag = copysign(pow(10, ceil(log10(max))), max);
- if(stop_mag == start_mag) stop_mag *= 10;
+ for(i=1; i<9; i++) {
+ if(i*start_mag > min) break;
+ }
+ i--;
+ for(j=10; j>1; j--) {
+ if(j*(stop_mag/10) < max) break;
+ }
+ j++;
axis->major=10;
axis->minor=1;
axis->subminor=4;
- axis->major_start=start_mag;
- axis->major_step=(stop_mag - start_mag)/(axis->major);
+ axis->major_start=i*start_mag;
+ axis->major_step=(j*(stop_mag/10) - axis->major_start)/(axis->major);
}
axis->title=g_string_new(title->str);
#ifdef DEBUG_AUTOAXIS
struct matdb *mdb = read_matdb_dotcode(file, &err);
//fprintf(stderr, "read_matdb_dotcode(%s, %d)=%x", file->str, err,
//(int)mdb);
- fprintf(stderr, "err=%d\n", err);
+ //fprintf(stderr, "err=%d\n", err);
//print_matdb(mdb);
gtk_init (&argc, &argv);