Home | History | Annotate | Line # | Download | only in libcurses
resize.c revision 1.31
      1  1.31       nia /*	$NetBSD: resize.c,v 1.31 2021/05/29 09:11:14 nia Exp $	*/
      2   1.1     blymn 
      3   1.1     blymn /*
      4   1.1     blymn  * Copyright (c) 2001
      5   1.1     blymn  *	Brett Lymn.
      6   1.1     blymn  *
      7   1.1     blymn  * This code has been donated to The NetBSD Foundation by the Author.
      8   1.1     blymn  *
      9   1.1     blymn  * Redistribution and use in source and binary forms, with or without
     10   1.1     blymn  * modification, are permitted provided that the following conditions
     11   1.1     blymn  * are met:
     12   1.1     blymn  * 1. Redistributions of source code must retain the above copyright
     13   1.1     blymn  *    notice, this list of conditions and the following disclaimer.
     14   1.1     blymn  * 2. Redistributions in binary form must reproduce the above copyright
     15   1.1     blymn  *    notice, this list of conditions and the following disclaimer in the
     16   1.1     blymn  *    documentation and/or other materials provided with the distribution.
     17   1.1     blymn  *
     18   1.1     blymn  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     19   1.1     blymn  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20   1.1     blymn  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21   1.1     blymn  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     22   1.1     blymn  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     23   1.1     blymn  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     24   1.1     blymn  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     25   1.1     blymn  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     26   1.1     blymn  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27   1.1     blymn  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28   1.1     blymn  * SUCH DAMAGE.
     29   1.1     blymn  */
     30   1.1     blymn 
     31   1.1     blymn #include <sys/cdefs.h>
     32   1.1     blymn #ifndef lint
     33   1.1     blymn #if 0
     34   1.1     blymn static char sccsid[] = "@(#)resize.c   blymn 2001/08/26";
     35   1.1     blymn #else
     36  1.31       nia __RCSID("$NetBSD: resize.c,v 1.31 2021/05/29 09:11:14 nia Exp $");
     37   1.1     blymn #endif
     38   1.1     blymn #endif				/* not lint */
     39   1.1     blymn 
     40   1.1     blymn #include <stdlib.h>
     41   1.1     blymn 
     42   1.1     blymn #include "curses.h"
     43   1.1     blymn #include "curses_private.h"
     44   1.1     blymn 
     45  1.16       jdc static int __resizeterm(WINDOW *win, int nlines, int ncols);
     46   1.1     blymn static int __resizewin(WINDOW *win, int nlines, int ncols);
     47   1.1     blymn 
     48   1.1     blymn /*
     49   1.1     blymn  * wresize --
     50   1.1     blymn  *	Resize the given window to the new size.
     51   1.1     blymn  */
     52   1.1     blymn int
     53   1.7       dsl wresize(WINDOW *win, int req_nlines, int req_ncols)
     54   1.1     blymn {
     55   1.7       dsl 	int	nlines = req_nlines;
     56   1.7       dsl 	int	ncols = req_ncols;
     57   1.1     blymn 
     58   1.7       dsl 	if (win == NULL)
     59   1.1     blymn 		return ERR;
     60   1.1     blymn 
     61  1.15       jdc #ifdef	DEBUG
     62  1.15       jdc 	__CTRACE(__CTRACE_WINDOW, "wresize: (%p, %d, %d)\n",
     63  1.15       jdc 	    win, nlines, ncols);
     64  1.15       jdc #endif
     65  1.31       nia 	if (win->orig != NULL) {
     66  1.31       nia 		/* subwins must fit inside the parent - check this */
     67  1.31       nia 		if (win->begy > win->orig->begy + win->orig->maxy)
     68  1.31       nia 			win->begy = win->orig->begy + win->orig->maxy - 1;
     69  1.31       nia 		if (win->begy + nlines > win->orig->begy + win->orig->maxy)
     70  1.31       nia 			nlines = 0;
     71  1.31       nia 		if (nlines <= 0)
     72  1.31       nia 			nlines += win->orig->begy + win->orig->maxy - win->begy;
     73  1.31       nia 		if (nlines < 1)
     74  1.31       nia 			nlines = 1;
     75  1.31       nia 		if (win->begx > win->orig->begx + win->orig->maxx)
     76  1.31       nia 			win->begx = win->orig->begx + win->orig->maxx - 1;
     77  1.31       nia 		if (win->begx + ncols > win->orig->begx + win->orig->maxx)
     78  1.31       nia 			ncols = 0;
     79  1.31       nia 		if (ncols <= 0)
     80  1.31       nia 			ncols += win->orig->begx + win->orig->maxx - win->begx;
     81  1.31       nia 		if (ncols < 1)
     82  1.31       nia 			ncols = 1;
     83  1.31       nia 	} else if (!(win->flags & __ISPAD)) {
     84  1.16       jdc 		/* bound "our" windows by the screen size */
     85  1.16       jdc 		if (win == curscr || win == __virtscr || win == stdscr) {
     86  1.17       jdc 			if (nlines > LINES)
     87  1.17       jdc 				nlines = LINES;
     88  1.17       jdc 			if (nlines < 1)
     89  1.17       jdc 				nlines = 1;
     90  1.17       jdc 			if (ncols > COLS)
     91  1.17       jdc 				ncols = COLS;
     92  1.17       jdc 			if (ncols < 1)
     93  1.17       jdc 				ncols = 1;
     94  1.17       jdc 		} else {
     95  1.17       jdc 			if (win->begy > LINES)
     96  1.17       jdc 				win->begy = 0;
     97  1.16       jdc 			if (win->begy + nlines > LINES)
     98  1.16       jdc 				nlines = 0;
     99  1.16       jdc 			if (nlines <= 0)
    100  1.16       jdc 				nlines += LINES - win->begy;
    101  1.17       jdc 			if (nlines < 1)
    102  1.17       jdc 				nlines = 1;
    103  1.17       jdc 			if (win->begx > COLS)
    104  1.17       jdc 				win->begx = 0;
    105  1.16       jdc 			if (win->begx + ncols > COLS)
    106  1.16       jdc 				ncols = 0;
    107  1.16       jdc 			if (ncols <= 0)
    108  1.16       jdc 				ncols += COLS - win->begx;
    109  1.17       jdc 			if (ncols < 1)
    110  1.17       jdc 				ncols = 1;
    111  1.16       jdc 		}
    112   1.1     blymn 	}
    113   1.1     blymn 
    114   1.1     blymn 	if ((__resizewin(win, nlines, ncols)) == ERR)
    115   1.1     blymn 		return ERR;
    116   1.1     blymn 
    117   1.7       dsl 	win->reqy = req_nlines;
    118   1.7       dsl 	win->reqx = req_ncols;
    119   1.2     blymn 
    120  1.15       jdc 	/* If someone resizes curscr, we must also resize __virtscr */
    121  1.15       jdc 	if (win == curscr) {
    122  1.15       jdc 		if ((__resizewin(__virtscr, nlines, ncols)) == ERR)
    123  1.15       jdc 			return ERR;
    124  1.15       jdc 		__virtscr->reqy = req_nlines;
    125  1.15       jdc 		__virtscr->reqx = req_ncols;
    126  1.15       jdc 	}
    127  1.15       jdc 
    128   1.1     blymn 	return OK;
    129   1.1     blymn }
    130   1.1     blymn 
    131   1.1     blymn /*
    132  1.21       roy  * is_term_resized --
    133  1.21       roy  *	Return true if the given dimensions do not match the
    134  1.21       roy  *	internal structures.
    135  1.21       roy  */
    136  1.21       roy bool
    137  1.21       roy is_term_resized(int nlines, int ncols)
    138  1.21       roy {
    139  1.21       roy 
    140  1.23       roy 	return (nlines > 0 && ncols > 0 &&
    141  1.24       roy 	    (nlines != _cursesi_screen->LINES ||
    142  1.23       roy 	    ncols != _cursesi_screen->COLS));
    143  1.21       roy }
    144  1.21       roy 
    145  1.21       roy /*
    146   1.1     blymn  * resizeterm --
    147  1.15       jdc  *	Resize the terminal window, resizing the dependent windows.
    148  1.21       roy  *	Handles internal book-keeping.
    149   1.1     blymn  */
    150   1.1     blymn int
    151   1.1     blymn resizeterm(int nlines, int ncols)
    152   1.1     blymn {
    153  1.21       roy 	int result;
    154  1.21       roy 
    155  1.21       roy #ifdef	DEBUG
    156  1.21       roy 	__CTRACE(__CTRACE_WINDOW, "resizeterm: (%d, %d)\n", nlines, ncols);
    157  1.21       roy #endif
    158  1.21       roy 
    159  1.27       roy 	/* Unconditionally inform application screen has been resized. */
    160  1.27       roy 	_cursesi_screen->resized = 1;
    161  1.25       roy 
    162  1.21       roy 	if (!is_term_resized(nlines, ncols))
    163  1.21       roy 		return OK;
    164  1.21       roy 
    165  1.24       roy 	result = resize_term(nlines, ncols);
    166  1.25       roy 
    167  1.25       roy 	/* Screen contents are unknown, libcurses is not libpanel, we don't
    168  1.25       roy 	 * know the correct draw order. */
    169  1.21       roy 	clearok(curscr, TRUE);
    170  1.25       roy 
    171  1.26       roy 	if (result == OK) {
    172  1.29       roy 		/* Redraw the soft label keys to the new size. */
    173  1.26       roy 		__slk_resize(_cursesi_screen, ncols);
    174  1.26       roy 		__slk_noutrefresh(_cursesi_screen);
    175  1.26       roy 	}
    176  1.25       roy 
    177  1.21       roy 	return result;
    178  1.21       roy }
    179  1.21       roy 
    180  1.21       roy /*
    181  1.21       roy  * resize_term --
    182  1.21       roy  *	Resize the terminal window, resizing the dependent windows.
    183  1.21       roy  */
    184  1.21       roy int
    185  1.21       roy resize_term(int nlines, int ncols)
    186  1.21       roy {
    187  1.11  christos 	WINDOW *win;
    188   1.1     blymn 	struct __winlist *list;
    189  1.25       roy 	int rlines;
    190   1.2     blymn 
    191   1.1     blymn #ifdef	DEBUG
    192  1.21       roy 	__CTRACE(__CTRACE_WINDOW, "resize_term: (%d, %d)\n", nlines, ncols);
    193   1.1     blymn #endif
    194   1.1     blymn 
    195  1.21       roy 	if (!is_term_resized(nlines, ncols))
    196  1.21       roy 		return OK;
    197  1.21       roy 
    198  1.16       jdc 	if (__resizeterm(curscr, nlines, ncols) == ERR)
    199  1.16       jdc 		return ERR;
    200  1.16       jdc 	if (__resizeterm(__virtscr, nlines, ncols) == ERR)
    201  1.16       jdc 		return ERR;
    202  1.28       roy 	rlines = nlines - __rippedlines(_cursesi_screen, 0);
    203  1.25       roy 	if (__resizeterm(stdscr, rlines, ncols) == ERR)
    204  1.16       jdc 		return ERR;
    205   1.1     blymn 
    206  1.25       roy 	_cursesi_screen->LINES = nlines;
    207  1.25       roy 	_cursesi_screen->COLS = ncols;
    208  1.28       roy 	LINES = nlines;
    209   1.1     blymn 	COLS = ncols;
    210   1.1     blymn 
    211  1.29       roy 	/* tweak the flags now that we have updated the LINES and COLS */
    212   1.9       dsl 	for (list = _cursesi_screen->winlistp; list != NULL; list = list->nextp) {
    213  1.11  christos 		win = list->winp;
    214  1.11  christos 
    215   1.8       dsl 		if (!(win->flags & __ISPAD))
    216  1.11  christos 			__swflags(win);
    217   1.1     blymn 	}
    218   1.1     blymn 
    219  1.29       roy 	/* Resize and re-position the ripped off windows. */
    220  1.29       roy 	if (__ripoffresize(_cursesi_screen) == ERR)
    221  1.29       roy 		return ERR;
    222  1.29       roy 
    223   1.1     blymn 	return OK;
    224   1.1     blymn }
    225   1.7       dsl 
    226   1.1     blymn /*
    227  1.16       jdc  * __resizeterm
    228  1.16       jdc  *	Setup window for resizing.
    229  1.16       jdc  */
    230  1.16       jdc static int
    231  1.16       jdc __resizeterm(WINDOW *win, int nlines, int ncols)
    232  1.16       jdc {
    233  1.16       jdc 	int newlines, newcols;
    234  1.16       jdc 
    235  1.16       jdc 	newlines = win->reqy;
    236  1.16       jdc 	if (win->begy + newlines >= nlines)
    237  1.16       jdc 		newlines = 0;
    238  1.16       jdc 	if (newlines == 0)
    239  1.16       jdc 		newlines = nlines - win->begy;
    240  1.16       jdc 
    241  1.16       jdc 	newcols = win->reqx;
    242  1.16       jdc 	if (win->begx + newcols >= ncols)
    243  1.16       jdc 		newcols = 0;
    244  1.16       jdc 	if (newcols == 0)
    245  1.16       jdc 		newcols = ncols - win->begx;
    246  1.16       jdc 
    247  1.16       jdc 	return __resizewin(win, newlines, newcols);
    248  1.16       jdc }
    249  1.16       jdc 
    250  1.16       jdc /*
    251   1.1     blymn  * __resizewin --
    252   1.1     blymn  *	Resize the given window.
    253   1.1     blymn  */
    254   1.1     blymn static int
    255   1.1     blymn __resizewin(WINDOW *win, int nlines, int ncols)
    256   1.1     blymn {
    257   1.1     blymn 	__LINE			*lp, *olp, **newlines, *newlspace;
    258   1.7       dsl 	__LDATA			*sp;
    259  1.15       jdc 	__LDATA			*newwspace;
    260   1.7       dsl 	int			 i, j;
    261   1.7       dsl 	int			 y, x;
    262   1.6       dsl 	WINDOW			*swin;
    263   1.1     blymn 
    264   1.1     blymn #ifdef	DEBUG
    265  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: (%p, %d, %d)\n", win, nlines, ncols);
    266  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->wattr = %08x\n", win->wattr);
    267  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->flags = %#.4x\n", win->flags);
    268  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->maxy = %d\n", win->maxy);
    269  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->maxx = %d\n", win->maxx);
    270  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->begy = %d\n", win->begy);
    271  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->begx = %d\n", win->begx);
    272  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->scr_t = %d\n", win->scr_t);
    273  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->scr_b = %d\n", win->scr_b);
    274   1.1     blymn #endif
    275   1.1     blymn 
    276  1.14     blymn 	/*
    277  1.14     blymn 	 * free up any non-spacing storage before we lose the
    278  1.14     blymn 	 * pointers...
    279  1.14     blymn 	 */
    280  1.14     blymn #ifdef HAVE_WCHAR
    281  1.14     blymn 	__cursesi_win_free_nsp(win);
    282  1.14     blymn #endif
    283  1.14     blymn 
    284   1.7       dsl 	if (nlines <= 0 || ncols <= 0)
    285   1.7       dsl 		nlines = ncols = 0;
    286   1.7       dsl 	else {
    287   1.7       dsl 		/* Reallocate line pointer array and line space. */
    288  1.20       roy 		newlines = realloc(win->alines, nlines * sizeof(__LINE *));
    289   1.7       dsl 		if (newlines == NULL)
    290   1.7       dsl 			return ERR;
    291  1.20       roy 		win->alines = newlines;
    292   1.2     blymn 
    293   1.7       dsl 		newlspace = realloc(win->lspace, nlines * sizeof(__LINE));
    294   1.7       dsl 		if (newlspace == NULL)
    295   1.7       dsl 			return ERR;
    296   1.7       dsl 		win->lspace = newlspace;
    297   1.1     blymn 	}
    298   1.2     blymn 
    299   1.1     blymn 	/* Don't allocate window and line space if it's a subwindow */
    300   1.1     blymn 	if (win->orig == NULL) {
    301   1.1     blymn 		/*
    302   1.1     blymn 		 * Allocate window space in one chunk.
    303   1.1     blymn 		 */
    304   1.7       dsl 		if (ncols != 0) {
    305   1.7       dsl 			newwspace = realloc(win->wspace,
    306   1.7       dsl 					    ncols * nlines * sizeof(__LDATA));
    307   1.7       dsl 			if (newwspace == NULL)
    308   1.7       dsl 				return ERR;
    309   1.7       dsl 			win->wspace = newwspace;
    310   1.1     blymn 		}
    311   1.1     blymn 
    312   1.1     blymn 		/*
    313   1.1     blymn 		 * Point line pointers to line space, and lines themselves into
    314   1.1     blymn 		 * window space.
    315   1.1     blymn 		 */
    316   1.1     blymn 		for (lp = win->lspace, i = 0; i < nlines; i++, lp++) {
    317  1.20       roy 			win->alines[i] = lp;
    318   1.1     blymn 			lp->line = &win->wspace[i * ncols];
    319   1.3     blymn #ifdef DEBUG
    320   1.3     blymn 			lp->sentinel = SENTINEL_VALUE;
    321   1.3     blymn #endif
    322   1.1     blymn 			lp->firstchp = &lp->firstch;
    323   1.1     blymn 			lp->lastchp = &lp->lastch;
    324   1.1     blymn 			lp->firstch = 0;
    325   1.1     blymn 			lp->lastch = ncols - 1;
    326   1.1     blymn 			lp->flags = __ISDIRTY;
    327   1.1     blymn 		}
    328   1.1     blymn 	} else {
    329   1.7       dsl 
    330   1.1     blymn 		win->ch_off = win->begx - win->orig->begx;
    331   1.1     blymn 		  /* Point line pointers to line space. */
    332   1.1     blymn 		for (lp = win->lspace, i = 0; i < nlines; i++, lp++) {
    333  1.20       roy 			win->alines[i] = lp;
    334  1.20       roy 			olp = win->orig->alines[i + win->begy - win->orig->begy];
    335   1.1     blymn 			lp->line = &olp->line[win->ch_off];
    336   1.6       dsl #ifdef DEBUG
    337   1.6       dsl 			lp->sentinel = SENTINEL_VALUE;
    338   1.6       dsl #endif
    339   1.1     blymn 			lp->firstchp = &olp->firstch;
    340   1.1     blymn 			lp->lastchp = &olp->lastch;
    341   1.1     blymn 			lp->flags = __ISDIRTY;
    342   1.1     blymn 		}
    343   1.1     blymn 	}
    344   1.2     blymn 
    345   1.1     blymn 	win->cury = win->curx = 0;
    346   1.1     blymn 	win->maxy = nlines;
    347   1.1     blymn 	win->maxx = ncols;
    348  1.19       jdc 	win->scr_b = win->maxy - 1;
    349   1.1     blymn 	__swflags(win);
    350   1.2     blymn 
    351   1.7       dsl 	  /*
    352   1.7       dsl 	   * we must zot the window contents otherwise lines may pick
    353   1.7       dsl 	   * up attributes from the previous line when the window is
    354   1.7       dsl 	   * made smaller.  The client will redraw the window anyway
    355   1.7       dsl 	   * so this is no big deal.
    356   1.7       dsl 	   */
    357   1.7       dsl 	for (i = 0; i < win->maxy; i++) {
    358  1.20       roy 		lp = win->alines[i];
    359   1.7       dsl 		for (sp = lp->line, j = 0; j < win->maxx; j++, sp++) {
    360   1.7       dsl 			sp->attr = 0;
    361  1.14     blymn #ifndef HAVE_WCHAR
    362  1.14     blymn 			sp->ch = win->bch;
    363  1.14     blymn #else
    364  1.22       roy 			sp->ch = (wchar_t)btowc((int)win->bch);
    365  1.14     blymn 			sp->nsp = NULL;
    366  1.14     blymn 			if (_cursesi_copy_nsp(win->bnsp, sp) == ERR)
    367  1.14     blymn 				return ERR;
    368  1.22       roy 			SET_WCOL(*sp, 1);
    369  1.14     blymn #endif /* HAVE_WCHAR */
    370   1.7       dsl 		}
    371   1.7       dsl 		lp->hash = __hash((char *)(void *)lp->line,
    372  1.22       roy 				  (size_t)(ncols * __LDATASIZE));
    373   1.7       dsl 	}
    374   1.7       dsl 
    375   1.1     blymn #ifdef DEBUG
    376  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->wattr = %08x\n", win->wattr);
    377  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->flags = %#.4x\n", win->flags);
    378  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->maxy = %d\n", win->maxy);
    379  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->maxx = %d\n", win->maxx);
    380  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->begy = %d\n", win->begy);
    381  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->begx = %d\n", win->begx);
    382  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->scr_t = %d\n", win->scr_t);
    383  1.13       jdc 	__CTRACE(__CTRACE_WINDOW, "resize: win->scr_b = %d\n", win->scr_b);
    384   1.1     blymn #endif
    385   1.7       dsl 
    386   1.6       dsl 	if (win->orig == NULL) {
    387   1.7       dsl 		/* bound subwindows to new size and fixup their pointers */
    388   1.7       dsl 		for (swin = win->nextp; swin != win; swin = swin->nextp) {
    389   1.7       dsl 			y = swin->reqy;
    390  1.17       jdc 			if (swin->begy > win->begy + win->maxy)
    391  1.17       jdc 				swin->begy = win->begy + win->maxy - 1;
    392   1.7       dsl 			if (swin->begy + y > win->begy + win->maxy)
    393   1.7       dsl 				y = 0;
    394   1.7       dsl 			if (y <= 0)
    395   1.7       dsl 				y += win->begy + win->maxy - swin->begy;
    396  1.17       jdc 			if (y < 1)
    397  1.17       jdc 				y = 1;
    398   1.7       dsl 			x = swin->reqx;
    399  1.17       jdc 			if (swin->begx > win->begx + win->maxx)
    400  1.17       jdc 				swin->begx = win->begx + win->maxx - 1;
    401   1.7       dsl 			if (swin->begx + x > win->begx + win->maxx)
    402   1.7       dsl 				x = 0;
    403   1.7       dsl 			if (x <= 0)
    404   1.7       dsl 				x += win->begy + win->maxx - swin->begx;
    405  1.17       jdc 			if (x < 1)
    406  1.17       jdc 				x = 1;
    407   1.7       dsl 			__resizewin(swin, y, x);
    408   1.7       dsl 		}
    409   1.6       dsl 	}
    410   1.7       dsl 
    411   1.1     blymn 	return OK;
    412   1.1     blymn }
    413