selection */
| 12 | |
| 13 | /* selection */ |
| 14 | struct selectionvar * |
| 15 | selection_new(void) |
| 16 | { |
| 17 | struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof *tmps); |
| 18 | |
| 19 | tmps->wid = COLNO; |
| 20 | tmps->hei = ROWNO; |
| 21 | tmps->bounds_dirty = FALSE; |
| 22 | tmps->bounds.lx = COLNO; |
| 23 | tmps->bounds.ly = ROWNO; |
| 24 | tmps->bounds.hx = tmps->bounds.hy = 0; |
| 25 | tmps->map = (char *) alloc((COLNO * ROWNO) + 1); |
| 26 | (void) memset(tmps->map, 1, (COLNO * ROWNO)); |
| 27 | tmps->map[(COLNO * ROWNO)] = '\0'; |
| 28 | |
| 29 | return tmps; |
| 30 | } |
| 31 | |
| 32 | void |
| 33 | selection_free(struct selectionvar *sel, boolean freesel) |
no test coverage detected