diff options
Diffstat (limited to 'src/presentation.c')
-rw-r--r-- | src/presentation.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/presentation.c b/src/presentation.c index 039f61a..e95bd92 100644 --- a/src/presentation.c +++ b/src/presentation.c @@ -387,55 +387,3 @@ next: return 0; } - -static struct frame *find_parent(struct frame *fr, struct frame *search) -{ - int i; - - for ( i=0; i<fr->num_children; i++ ) { - if ( fr->children[i] == search ) { - return fr; - } - } - - for ( i=0; i<fr->num_children; i++ ) { - struct frame *tt; - tt = find_parent(fr->children[i], search); - if ( tt != NULL ) return tt; - } - - return NULL; -} - - -void delete_subframe(struct frame *top, struct frame *fr) -{ - struct frame *parent; - int i, idx, found; - - parent = find_parent(top, fr); - if ( parent == NULL ) { - fprintf(stderr, "Couldn't find parent when deleting frame.\n"); - return; - } - - found = 0; - for ( i=0; i<parent->num_children; i++ ) { - if ( parent->children[i] == fr ) { - idx = i; - found = 1; - break; - } - } - - if ( !found ) { - fprintf(stderr, "Couldn't find child when deleting frame.\n"); - return; - } - - for ( i=idx; i<parent->num_children-1; i++ ) { - parent->children[i] = parent->children[i+1]; - } - - parent->num_children--; -} |