projects
/
pdp8.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
software: Added more and more
[pdp8.git]
/
sw
/
plot_hpgl
/
pc
/
optimize.c
diff --git
a/sw/plot_hpgl/pc/optimize.c
b/sw/plot_hpgl/pc/optimize.c
index 5a434d0559b38467c9cebf4bc231efa76883817d..c8595125cf5d16812112d9b6ca2ed58150e64792 100644
(file)
--- a/
sw/plot_hpgl/pc/optimize.c
+++ b/
sw/plot_hpgl/pc/optimize.c
@@
-85,12
+85,14
@@
struct path *optimize(struct path *input_list){
struct path *result = NULL;
struct path *result_last;
struct path *cur, *best;
struct path *result = NULL;
struct path *result_last;
struct path *cur, *best;
- int i;
-
+#ifdef DEBUG
+ int i = 0;
+#endif
+
link_reverse(input_list);
link_reverse(input_list);
-
//
DBG("link_reverse done\n");
+ DBG("link_reverse done\n");
- i=0;
+#ifdef DEBUG
for (cur = input_list; cur; cur = cur->next)
DBG("%4i Input Path (%5.2f,%5.2f) -> (%5.2f,%5.2f)\n",
i++,
for (cur = input_list; cur; cur = cur->next)
DBG("%4i Input Path (%5.2f,%5.2f) -> (%5.2f,%5.2f)\n",
i++,
@@
-99,6
+101,7
@@
struct path *optimize(struct path *input_list){
cur->plot_end_point->x,
cur->plot_end_point->y
);
cur->plot_end_point->x,
cur->plot_end_point->y
);
+#endif
while(input_list) {
best = NULL;
while(input_list) {
best = NULL;