-}
-
-
-
-extern void init_win_meta()
-{
- char * err_s = "init_win_meta() creates virtual screen beyond legal size.";
- char * err_m = "init_win_meta() triggers memory alloc error via newpad().";
- world.wmeta.screen = initscr();
- set_cleanup_flag(CLEANUP_NCURSES);
- noecho();
- curs_set(0);
- uint32_t maxy_test = getmaxy(world.wmeta.screen);
- uint32_t maxx_test = getmaxx(world.wmeta.screen);
- exit_err(maxy_test > UINT16_MAX || maxx_test > UINT16_MAX, err_s);
- world.wmeta.padsize.y = maxy_test;
- world.wmeta.padsize.x = maxx_test;
- world.wmeta.chain_start = 0;
- world.wmeta.chain_end = 0;
- world.wmeta.pad_offset = 0;
- world.wmeta.pad = newpad(world.wmeta.padsize.y, 1);
- exit_err(NULL == world.wmeta.pad, err_m);
- world.wmeta.active = 0;
-}
-
-
-
-extern void init_win(struct Win ** wp, char * title, int16_t height,
- int16_t width, void * func)
-{
- char * f_name = "init_win()";
- struct Win * w = try_malloc(sizeof(struct Win), f_name);
- w->prev = 0;
- w->next = 0;
- w->winmapsize.y = 0;
- w->winmapsize.x = 0;
- w->winmap = NULL;
- w->title = try_malloc(strlen(title) + 1, f_name);
- sprintf(w->title, "%s", title);
- w->draw = func;
- w->center.y = 0;
- w->center.x = 0;
- w->framesize.y = world.wmeta.padsize.y - 1;
- if (0 < height && height <= world.wmeta.padsize.y - 1)
+ free(w->winmap); /* NULL so draw_wins.c's try_resize_winmap() may always */
+ w->winmap = NULL;/* free() it before (re-)allocation, even the first time.*/
+ memset(&w->winmap_size, 0, sizeof(struct yx_uint16));
+ if (offset_y > 0)
+ {
+ winscroll_hint(w, '^', offset_y + 1);
+ }
+ if (size_y > offset_y + w->frame_size.y)