clear selection, setting all locations to value val */
| 45 | |
| 46 | /* clear selection, setting all locations to value val */ |
| 47 | void |
| 48 | selection_clear(struct selectionvar *sel, int val) |
| 49 | { |
| 50 | (void) memset(sel->map, 1 + val, (COLNO * ROWNO)); |
| 51 | if (val) { |
| 52 | sel->bounds.lx = 0; |
| 53 | sel->bounds.ly = 0; |
| 54 | sel->bounds.hx = COLNO - 1; |
| 55 | sel->bounds.hy = ROWNO - 1; |
| 56 | } else { |
| 57 | sel->bounds.lx = COLNO; |
| 58 | sel->bounds.ly = ROWNO; |
| 59 | sel->bounds.hx = sel->bounds.hy = 0; |
| 60 | } |
| 61 | sel->bounds_dirty = FALSE; |
| 62 | } |
| 63 | |
| 64 | struct selectionvar * |
| 65 | selection_clone(struct selectionvar *sel) |
no outgoing calls
no test coverage detected