diff -c2 -r orig/mucs_pcb-3.0/trackers/anneal/input.c mucs_pcb-3.0/trackers/anneal/input.c *** orig/mucs_pcb-3.0/trackers/anneal/input.c Mon Nov 16 22:38:52 1998 --- mucs_pcb-3.0/trackers/anneal/input.c Thu Jun 20 01:32:07 2002 *************** *** 118,121 **** --- 118,133 ---- } + static void + input_fatal_error(char *s) + { + char tmp[100]; + int where = ftell(INFILE); + fscanf(INFILE, "%s", tmp); + fprintf(stderr, "Error: %s, saw %s at file offset %d\n", s, tmp, where); + exit(1); + } + + #define fatal_error input_fatal_error + /* Reads an integer and returns it multiplied by SCALE_FACTOR */ PRIVATE long GetLongInteger (void) diff -c2 -r orig/mucs_pcb-3.0/trackers/anneal/main.c mucs_pcb-3.0/trackers/anneal/main.c *** orig/mucs_pcb-3.0/trackers/anneal/main.c Wed Nov 18 18:41:33 1998 --- mucs_pcb-3.0/trackers/anneal/main.c Thu Jun 20 21:21:23 2002 *************** *** 704,708 **** UpdatePadLayouts (); ! fprintf (stderr, "Initialising Board Maps\n"); InitialiseBitMap (); --- 704,709 ---- UpdatePadLayouts (); ! if (Board.b_verbose) ! fprintf (stderr, "Initialising Board Maps\n"); InitialiseBitMap (); diff -c2 -r orig/mucs_pcb-3.0/trackers/anneal/maps.c mucs_pcb-3.0/trackers/anneal/maps.c *** orig/mucs_pcb-3.0/trackers/anneal/maps.c Mon Nov 16 22:38:52 1998 --- mucs_pcb-3.0/trackers/anneal/maps.c Thu Jun 20 02:24:04 2002 *************** *** 287,317 **** EXPORT void FillLine (long x1, long y1, long x2, long y2, int z) { ! char *cur_pos, *last_pos; ! int cell_inc; ! if (ConvertZ (z) == -1) return; ! cur_pos = Board_Map + CELL_POSN (ConvertX (x1), ConvertY (y1), ConvertZ (z)); ! cell_inc = LineInc (x1, y1, x2, y2); ! last_pos = Board_Map + CELL_POSN (ConvertX (x2), ConvertY (y2), ConvertZ (z)) + ! cell_inc; ! if (y1 == y2) ! { ! for (; cur_pos != last_pos; cur_pos += cell_inc) { ! DecCellWeight (cur_pos + Board_Map_X_Size); ! DecCellWeight (cur_pos - Board_Map_X_Size); ! FillCell (cur_pos); } ! } else { ! for (; cur_pos != last_pos; cur_pos += cell_inc) { ! DecCellWeight (cur_pos + 1); ! DecCellWeight (cur_pos - 1); ! FillCell (cur_pos); } } } --- 287,342 ---- EXPORT void FillLine (long x1, long y1, long x2, long y2, int z) { ! char *cur_pos, *last_pos; ! int cell_inc; ! if (ConvertZ (z) == -1) return; ! cur_pos = Board_Map + CELL_POSN (ConvertX (x1), ConvertY (y1), ConvertZ (z)); ! cell_inc = LineInc (x1, y1, x2, y2); ! last_pos = Board_Map + CELL_POSN (ConvertX (x2), ConvertY (y2), ConvertZ (z)) + ! cell_inc; ! if (y1 == y2) ! { ! for (; cur_pos != last_pos; cur_pos += cell_inc) { ! DecCellWeight (cur_pos + Board_Map_X_Size); ! DecCellWeight (cur_pos - Board_Map_X_Size); ! FillCell (cur_pos); } ! } else if (x1 == x2) { ! for (; cur_pos != last_pos; cur_pos += cell_inc) { ! DecCellWeight (cur_pos + 1); ! DecCellWeight (cur_pos - 1); ! FillCell (cur_pos); } + } else { + int maxstep, i; + int xstep, ystep; + int dx, dy; + + x1 = ConvertX(x1); + y1 = ConvertY(y1); + x2 = ConvertX(x2); + y2 = ConvertY(y2); + + maxstep = x1-x2; + if (maxstep < 0) maxstep = x2-x1; + if (maxstep < y2-y1) maxstep = y2-y1; + if (maxstep < y1-y2) maxstep = y1-y2; + xstep = x2-x1; + ystep = y2-y1; + + cell_inc = LineInc(0,0,1,0); + + for (i=0; i<=maxstep; i++) + { + dx = xstep * ((double)i / maxstep); + dy = ystep * ((double)i / maxstep); + FillCell (cur_pos + dx * cell_inc + dy * Board_Map_X_Size); } + } } *************** *** 763,767 **** fprintf (OUTFILE, "Dumping bit map at %ld, %ld\n", x, y); ! for (cy = fin_y; cy >= start_y; cy--) { for (z = 0; z <= 1; z++) --- 788,792 ---- fprintf (OUTFILE, "Dumping bit map at %ld, %ld\n", x, y); ! for (cy = start_y; cy <= fin_y; cy++) { for (z = 0; z <= 1; z++) *************** *** 771,774 **** --- 796,800 ---- for (cx = start_x; cx <= fin_x; cx++) { + int c; if (BIT_CLEAR (*(Via_Map + (CELL_POSN (cx, cy, 0) / 8)), cx % 8)) { *************** *** 784,791 **** } if ((cx == mid_x) && (cy == mid_y)) ! putc ('+', OUTFILE); else if (BIT_SET (*(Expansion_Map + CELL_POSN (cx, cy, z) / 8), cx % 8)) ! putc ( exmarkmap[(READ_FIELD (BOARD_MAP (cx, cy, z), MARK_MASK) / 16)], OUTFILE); ! else putc ( markmap[(READ_FIELD (BOARD_MAP (cx, cy, z), MARK_MASK) / 16)], OUTFILE); } if (bdon) fprintf (OUTFILE, "%s", boldoff); --- 810,819 ---- } if ((cx == mid_x) && (cy == mid_y)) ! c = '+'; else if (BIT_SET (*(Expansion_Map + CELL_POSN (cx, cy, z) / 8), cx % 8)) ! c =exmarkmap[(READ_FIELD (BOARD_MAP (cx, cy, z), MARK_MASK) / 16)]; ! else c = markmap[(READ_FIELD (BOARD_MAP (cx, cy, z), MARK_MASK) / 16)]; ! if (c < ' ' || c > 126) c = '!'; ! putc(c, OUTFILE); } if (bdon) fprintf (OUTFILE, "%s", boldoff); diff -c2 -r orig/mucs_pcb-3.0/trackers/anneal/order.c mucs_pcb-3.0/trackers/anneal/order.c *** orig/mucs_pcb-3.0/trackers/anneal/order.c Mon Nov 16 22:38:52 1998 --- mucs_pcb-3.0/trackers/anneal/order.c Mon Jun 17 21:36:06 2002 *************** *** 213,219 **** if (cur_net->net_track_width > Board.b_track_width) wider = linknet (cur_net, wider, cmpwider); ! else if (cur_net->net_first_pin->n_inline_x) line_x = linknet (cur_net, line_x, cmpx); ! else if (cur_net->net_first_pin->n_inline_y) line_y = linknet (cur_net, line_y, cmpy); else others = linknet (cur_net, others, cmpothers); --- 213,219 ---- if (cur_net->net_track_width > Board.b_track_width) wider = linknet (cur_net, wider, cmpwider); ! else if (cur_net->net_first_pin && cur_net->net_first_pin->n_inline_x) line_x = linknet (cur_net, line_x, cmpx); ! else if (cur_net->net_first_pin && cur_net->net_first_pin->n_inline_y) line_y = linknet (cur_net, line_y, cmpy); else others = linknet (cur_net, others, cmpothers);