Home | History | Annotate | Line # | Download | only in rasops
rasops8.c revision 1.9.4.5
      1  1.9.4.5  nathanw /* 	$NetBSD: rasops8.c,v 1.9.4.5 2002/02/28 04:14:19 nathanw Exp $	*/
      2      1.1       ad 
      3      1.4       ad /*-
      4      1.4       ad  * Copyright (c) 1999 The NetBSD Foundation, Inc.
      5      1.1       ad  * All rights reserved.
      6      1.1       ad  *
      7      1.4       ad  * This code is derived from software contributed to The NetBSD Foundation
      8      1.9       ad  * by Andrew Doran.
      9      1.4       ad  *
     10      1.1       ad  * Redistribution and use in source and binary forms, with or without
     11      1.1       ad  * modification, are permitted provided that the following conditions
     12      1.1       ad  * are met:
     13      1.1       ad  * 1. Redistributions of source code must retain the above copyright
     14      1.1       ad  *    notice, this list of conditions and the following disclaimer.
     15      1.1       ad  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.1       ad  *    notice, this list of conditions and the following disclaimer in the
     17      1.1       ad  *    documentation and/or other materials provided with the distribution.
     18      1.4       ad  * 3. All advertising materials mentioning features or use of this software
     19      1.4       ad  *    must display the following acknowledgement:
     20      1.4       ad  *	This product includes software developed by the NetBSD
     21      1.4       ad  *	Foundation, Inc. and its contributors.
     22      1.4       ad  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.4       ad  *    contributors may be used to endorse or promote products derived
     24      1.4       ad  *    from this software without specific prior written permission.
     25      1.1       ad  *
     26      1.4       ad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.4       ad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.4       ad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.4       ad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.4       ad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.4       ad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.4       ad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.4       ad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.4       ad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.4       ad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.4       ad  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1       ad  */
     38      1.2       ad 
     39      1.1       ad #include <sys/cdefs.h>
     40  1.9.4.5  nathanw __KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.9.4.5 2002/02/28 04:14:19 nathanw Exp $");
     41  1.9.4.3  nathanw 
     42  1.9.4.3  nathanw #include "opt_rasops.h"
     43      1.1       ad 
     44      1.1       ad #include <sys/param.h>
     45      1.1       ad #include <sys/systm.h>
     46      1.1       ad #include <sys/time.h>
     47  1.9.4.5  nathanw #include <sys/bswap.h>
     48      1.1       ad 
     49      1.1       ad #include <dev/wscons/wsdisplayvar.h>
     50      1.1       ad #include <dev/wscons/wsconsio.h>
     51      1.1       ad #include <dev/rasops/rasops.h>
     52      1.1       ad 
     53      1.1       ad static void 	rasops8_putchar __P((void *, int, int, u_int, long attr));
     54      1.7       ad #ifndef RASOPS_SMALL
     55      1.1       ad static void 	rasops8_putchar8 __P((void *, int, int, u_int, long attr));
     56      1.1       ad static void 	rasops8_putchar12 __P((void *, int, int, u_int, long attr));
     57      1.1       ad static void 	rasops8_putchar16 __P((void *, int, int, u_int, long attr));
     58      1.6       ad static void	rasops8_makestamp __P((struct rasops_info *ri, long));
     59      1.1       ad 
     60      1.8       pk /*
     61      1.8       pk  * 4x1 stamp for optimized character blitting
     62      1.1       ad  */
     63      1.1       ad static int32_t	stamp[16];
     64      1.1       ad static long	stamp_attr;
     65      1.1       ad static int	stamp_mutex;	/* XXX see note in README */
     66  1.9.4.1  nathanw #endif
     67      1.1       ad 
     68      1.1       ad /*
     69      1.1       ad  * XXX this confuses the hell out of gcc2 (not egcs) which always insists
     70      1.1       ad  * that the shift count is negative.
     71      1.1       ad  *
     72      1.1       ad  * offset = STAMP_SHIFT(fontbits, nibble #) & STAMP_MASK
     73      1.1       ad  * destination = STAMP_READ(offset)
     74      1.1       ad  */
     75      1.1       ad #define STAMP_SHIFT(fb,n)	((n*4-2) >= 0 ? (fb)>>(n*4-2):(fb)<<-(n*4-2))
     76      1.8       pk #define STAMP_MASK		(0xf << 2)
     77      1.1       ad #define STAMP_READ(o)		(*(int32_t *)((caddr_t)stamp + (o)))
     78      1.1       ad 
     79      1.1       ad /*
     80  1.9.4.2  nathanw  * Initialize a 'rasops_info' descriptor for this depth.
     81      1.1       ad  */
     82      1.1       ad void
     83      1.1       ad rasops8_init(ri)
     84      1.1       ad 	struct rasops_info *ri;
     85      1.1       ad {
     86      1.8       pk 
     87      1.1       ad 	switch (ri->ri_font->fontwidth) {
     88      1.7       ad #ifndef RASOPS_SMALL
     89      1.1       ad 	case 8:
     90      1.1       ad 		ri->ri_ops.putchar = rasops8_putchar8;
     91      1.1       ad 		break;
     92      1.1       ad 	case 12:
     93      1.1       ad 		ri->ri_ops.putchar = rasops8_putchar12;
     94      1.1       ad 		break;
     95      1.1       ad 	case 16:
     96      1.1       ad 		ri->ri_ops.putchar = rasops8_putchar16;
     97      1.1       ad 		break;
     98      1.7       ad #endif /* !RASOPS_SMALL */
     99      1.1       ad 	default:
    100      1.1       ad 		ri->ri_ops.putchar = rasops8_putchar;
    101      1.1       ad 		break;
    102      1.1       ad 	}
    103      1.1       ad }
    104      1.1       ad 
    105      1.1       ad /*
    106      1.3       ad  * Put a single character.
    107      1.1       ad  */
    108      1.1       ad static void
    109      1.1       ad rasops8_putchar(cookie, row, col, uc, attr)
    110      1.1       ad 	void *cookie;
    111      1.1       ad 	int row, col;
    112      1.1       ad 	u_int uc;
    113      1.1       ad 	long attr;
    114      1.1       ad {
    115      1.7       ad 	int width, height, cnt, fs, fb;
    116      1.7       ad 	u_char *dp, *rp, *fr, clr[2];
    117      1.1       ad 	struct rasops_info *ri;
    118      1.8       pk 
    119      1.1       ad 	ri = (struct rasops_info *)cookie;
    120      1.1       ad 
    121      1.8       pk #ifdef RASOPS_CLIPPING
    122      1.8       pk 	/* Catches 'row < 0' case too */
    123      1.1       ad 	if ((unsigned)row >= (unsigned)ri->ri_rows)
    124      1.1       ad 		return;
    125      1.1       ad 
    126      1.1       ad 	if ((unsigned)col >= (unsigned)ri->ri_cols)
    127      1.1       ad 		return;
    128      1.1       ad #endif
    129      1.1       ad 	rp = ri->ri_bits + row * ri->ri_yscale + col * ri->ri_xscale;
    130      1.1       ad 
    131      1.1       ad 	height = ri->ri_font->fontheight;
    132      1.1       ad 	width = ri->ri_font->fontwidth;
    133      1.8       pk 	clr[0] = (u_char)ri->ri_devcmap[(attr >> 16) & 0xf];
    134      1.8       pk 	clr[1] = (u_char)ri->ri_devcmap[(attr >> 24) & 0xf];
    135      1.8       pk 
    136      1.1       ad 	if (uc == ' ') {
    137      1.8       pk 		u_char c = clr[0];
    138      1.8       pk 
    139      1.1       ad 		while (height--) {
    140      1.1       ad 			dp = rp;
    141      1.1       ad 			rp += ri->ri_stride;
    142      1.8       pk 
    143      1.1       ad 			for (cnt = width; cnt; cnt--)
    144      1.8       pk 				*dp++ = c;
    145      1.1       ad 		}
    146      1.1       ad 	} else {
    147      1.1       ad 		uc -= ri->ri_font->firstchar;
    148      1.1       ad 		fr = (u_char *)ri->ri_font->data + uc * ri->ri_fontscale;
    149      1.1       ad 		fs = ri->ri_font->stride;
    150      1.1       ad 
    151      1.1       ad 		while (height--) {
    152      1.1       ad 			dp = rp;
    153      1.1       ad 			fb = fr[3] | (fr[2] << 8) | (fr[1] << 16) | (fr[0] << 24);
    154      1.1       ad 			fr += fs;
    155      1.1       ad 			rp += ri->ri_stride;
    156      1.8       pk 
    157      1.1       ad 			for (cnt = width; cnt; cnt--) {
    158      1.1       ad 				*dp++ = clr[(fb >> 31) & 1];
    159      1.1       ad 				fb <<= 1;
    160      1.1       ad 			}
    161      1.1       ad 		}
    162      1.8       pk 	}
    163      1.1       ad 
    164      1.1       ad 	/* Do underline */
    165      1.7       ad 	if ((attr & 1) != 0) {
    166      1.8       pk 		u_char c = clr[1];
    167      1.8       pk 
    168      1.1       ad 		rp -= (ri->ri_stride << 1);
    169      1.1       ad 
    170      1.1       ad 		while (width--)
    171      1.8       pk 			*rp++ = c;
    172      1.8       pk 	}
    173      1.1       ad }
    174      1.1       ad 
    175      1.7       ad #ifndef RASOPS_SMALL
    176      1.1       ad /*
    177      1.1       ad  * Recompute the 4x1 blitting stamp.
    178      1.1       ad  */
    179      1.1       ad static void
    180      1.6       ad rasops8_makestamp(ri, attr)
    181      1.6       ad 	struct rasops_info *ri;
    182      1.3       ad 	long attr;
    183      1.1       ad {
    184      1.7       ad 	int32_t fg, bg;
    185      1.1       ad 	int i;
    186      1.5       ad 
    187      1.8       pk 	fg = ri->ri_devcmap[(attr >> 24) & 0xf] & 0xff;
    188      1.8       pk 	bg = ri->ri_devcmap[(attr >> 16) & 0xf] & 0xff;
    189      1.1       ad 	stamp_attr = attr;
    190      1.8       pk 
    191      1.1       ad 	for (i = 0; i < 16; i++) {
    192  1.9.4.5  nathanw #if BYTE_ORDER == BIG_ENDIAN
    193  1.9.4.5  nathanw #define NEED_LITTLE_ENDIAN_STAMP RI_BSWAP
    194      1.1       ad #else
    195  1.9.4.5  nathanw #define NEED_LITTLE_ENDIAN_STAMP 0
    196      1.1       ad #endif
    197  1.9.4.5  nathanw 		if ((ri->ri_flg & RI_BSWAP) == NEED_LITTLE_ENDIAN_STAMP) {
    198  1.9.4.5  nathanw 			/* little endian */
    199  1.9.4.5  nathanw 			stamp[i] = (i & 8 ? fg : bg);
    200  1.9.4.5  nathanw 			stamp[i] |= ((i & 4 ? fg : bg) << 8);
    201  1.9.4.5  nathanw 			stamp[i] |= ((i & 2 ? fg : bg) << 16);
    202  1.9.4.5  nathanw 			stamp[i] |= ((i & 1 ? fg : bg) << 24);
    203  1.9.4.5  nathanw 		} else {
    204  1.9.4.5  nathanw 			/* big endian */
    205  1.9.4.5  nathanw 			stamp[i] = (i & 1 ? fg : bg);
    206  1.9.4.5  nathanw 			stamp[i] |= ((i & 2 ? fg : bg) << 8);
    207  1.9.4.5  nathanw 			stamp[i] |= ((i & 4 ? fg : bg) << 16);
    208  1.9.4.5  nathanw 			stamp[i] |= ((i & 8 ? fg : bg) << 24);
    209  1.9.4.5  nathanw 		}
    210      1.1       ad 	}
    211      1.1       ad }
    212      1.1       ad 
    213      1.1       ad /*
    214      1.3       ad  * Put a single character. This is for 8-pixel wide fonts.
    215      1.1       ad  */
    216      1.1       ad static void
    217      1.1       ad rasops8_putchar8(cookie, row, col, uc, attr)
    218      1.1       ad 	void *cookie;
    219      1.1       ad 	int row, col;
    220      1.1       ad 	u_int uc;
    221      1.1       ad 	long attr;
    222      1.1       ad {
    223      1.1       ad 	struct rasops_info *ri;
    224      1.1       ad 	int height, fs;
    225      1.1       ad 	int32_t *rp;
    226      1.1       ad 	u_char *fr;
    227      1.8       pk 
    228      1.1       ad 	/* Can't risk remaking the stamp if it's already in use */
    229      1.1       ad 	if (stamp_mutex++) {
    230      1.1       ad 		stamp_mutex--;
    231      1.1       ad 		rasops8_putchar(cookie, row, col, uc, attr);
    232      1.1       ad 		return;
    233      1.1       ad 	}
    234      1.1       ad 
    235      1.1       ad 	ri = (struct rasops_info *)cookie;
    236      1.1       ad 
    237      1.8       pk #ifdef RASOPS_CLIPPING
    238      1.1       ad 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
    239      1.1       ad 		stamp_mutex--;
    240      1.1       ad 		return;
    241      1.1       ad 	}
    242      1.1       ad 
    243      1.1       ad 	if ((unsigned)col >= (unsigned)ri->ri_cols) {
    244      1.1       ad 		stamp_mutex--;
    245      1.1       ad 		return;
    246      1.1       ad 	}
    247      1.1       ad #endif
    248      1.1       ad 
    249      1.1       ad 	/* Recompute stamp? */
    250      1.1       ad 	if (attr != stamp_attr)
    251      1.6       ad 		rasops8_makestamp(ri, attr);
    252      1.8       pk 
    253      1.1       ad 	rp = (int32_t *)(ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
    254      1.1       ad 	height = ri->ri_font->fontheight;
    255      1.8       pk 
    256      1.1       ad 	if (uc == ' ') {
    257      1.1       ad 		while (height--) {
    258      1.8       pk 			rp[0] = rp[1] = stamp[0];
    259      1.1       ad 			DELTA(rp, ri->ri_stride, int32_t *);
    260      1.8       pk 		}
    261      1.1       ad 	} else {
    262      1.1       ad 		uc -= ri->ri_font->firstchar;
    263      1.1       ad 		fr = (u_char *)ri->ri_font->data + uc * ri->ri_fontscale;
    264      1.1       ad 		fs = ri->ri_font->stride;
    265      1.8       pk 
    266      1.1       ad 		while (height--) {
    267      1.1       ad 			rp[0] = STAMP_READ(STAMP_SHIFT(fr[0], 1) & STAMP_MASK);
    268      1.1       ad 			rp[1] = STAMP_READ(STAMP_SHIFT(fr[0], 0) & STAMP_MASK);
    269      1.1       ad 
    270      1.1       ad 			fr += fs;
    271      1.8       pk 			DELTA(rp, ri->ri_stride, int32_t *);
    272      1.1       ad 		}
    273      1.1       ad 	}
    274      1.1       ad 
    275      1.1       ad 	/* Do underline */
    276      1.7       ad 	if ((attr & 1) != 0) {
    277      1.8       pk 		DELTA(rp, -(ri->ri_stride << 1), int32_t *);
    278      1.8       pk 		rp[0] = rp[1] = stamp[15];
    279      1.8       pk 	}
    280      1.8       pk 
    281      1.8       pk 	stamp_mutex--;
    282      1.1       ad }
    283      1.1       ad 
    284      1.1       ad /*
    285      1.3       ad  * Put a single character. This is for 12-pixel wide fonts.
    286      1.1       ad  */
    287      1.1       ad static void
    288      1.1       ad rasops8_putchar12(cookie, row, col, uc, attr)
    289      1.1       ad 	void *cookie;
    290      1.1       ad 	int row, col;
    291      1.1       ad 	u_int uc;
    292      1.1       ad 	long attr;
    293      1.1       ad {
    294      1.1       ad 	struct rasops_info *ri;
    295      1.1       ad 	int height, fs;
    296      1.1       ad 	int32_t *rp;
    297      1.1       ad 	u_char *fr;
    298      1.8       pk 
    299      1.1       ad 	/* Can't risk remaking the stamp if it's already in use */
    300      1.1       ad 	if (stamp_mutex++) {
    301      1.1       ad 		stamp_mutex--;
    302      1.1       ad 		rasops8_putchar(cookie, row, col, uc, attr);
    303      1.1       ad 		return;
    304      1.1       ad 	}
    305      1.1       ad 
    306      1.1       ad 	ri = (struct rasops_info *)cookie;
    307      1.1       ad 
    308      1.8       pk #ifdef RASOPS_CLIPPING
    309      1.1       ad 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
    310      1.1       ad 		stamp_mutex--;
    311      1.1       ad 		return;
    312      1.1       ad 	}
    313      1.1       ad 
    314      1.1       ad 	if ((unsigned)col >= (unsigned)ri->ri_cols) {
    315      1.1       ad 		stamp_mutex--;
    316      1.1       ad 		return;
    317      1.1       ad 	}
    318      1.1       ad #endif
    319      1.1       ad 
    320      1.1       ad 	/* Recompute stamp? */
    321      1.1       ad 	if (attr != stamp_attr)
    322      1.6       ad 		rasops8_makestamp(ri, attr);
    323      1.8       pk 
    324      1.1       ad 	rp = (int32_t *)(ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
    325      1.1       ad 	height = ri->ri_font->fontheight;
    326      1.8       pk 
    327      1.1       ad 	if (uc == ' ') {
    328      1.1       ad 		while (height--) {
    329      1.8       pk 			int32_t c = stamp[0];
    330      1.8       pk 
    331      1.8       pk 			rp[0] = rp[1] = rp[2] = c;
    332      1.8       pk 			DELTA(rp, ri->ri_stride, int32_t *);
    333      1.8       pk 		}
    334      1.1       ad 	} else {
    335      1.1       ad 		uc -= ri->ri_font->firstchar;
    336      1.1       ad 		fr = (u_char *)ri->ri_font->data + uc * ri->ri_fontscale;
    337      1.1       ad 		fs = ri->ri_font->stride;
    338      1.8       pk 
    339      1.1       ad 		while (height--) {
    340      1.1       ad 			rp[0] = STAMP_READ(STAMP_SHIFT(fr[0], 1) & STAMP_MASK);
    341      1.1       ad 			rp[1] = STAMP_READ(STAMP_SHIFT(fr[0], 0) & STAMP_MASK);
    342      1.1       ad 			rp[2] = STAMP_READ(STAMP_SHIFT(fr[1], 1) & STAMP_MASK);
    343      1.8       pk 
    344      1.1       ad 			fr += fs;
    345      1.8       pk 			DELTA(rp, ri->ri_stride, int32_t *);
    346      1.1       ad 		}
    347      1.8       pk 	}
    348      1.1       ad 
    349      1.1       ad 	/* Do underline */
    350      1.7       ad 	if ((attr & 1) != 0) {
    351      1.8       pk 		DELTA(rp, -(ri->ri_stride << 1), int32_t *);
    352      1.8       pk 		rp[0] = rp[1] = rp[2] = stamp[15];
    353      1.8       pk 	}
    354      1.8       pk 
    355      1.1       ad 	stamp_mutex--;
    356      1.1       ad }
    357      1.1       ad 
    358      1.1       ad /*
    359      1.3       ad  * Put a single character. This is for 16-pixel wide fonts.
    360      1.1       ad  */
    361      1.1       ad static void
    362      1.1       ad rasops8_putchar16(cookie, row, col, uc, attr)
    363      1.1       ad 	void *cookie;
    364      1.1       ad 	int row, col;
    365      1.1       ad 	u_int uc;
    366      1.1       ad 	long attr;
    367      1.1       ad {
    368      1.1       ad 	struct rasops_info *ri;
    369      1.1       ad 	int height, fs;
    370      1.1       ad 	int32_t *rp;
    371      1.1       ad 	u_char *fr;
    372      1.1       ad 
    373      1.1       ad 	/* Can't risk remaking the stamp if it's already in use */
    374      1.1       ad 	if (stamp_mutex++) {
    375      1.1       ad 		stamp_mutex--;
    376      1.1       ad 		rasops8_putchar(cookie, row, col, uc, attr);
    377      1.1       ad 		return;
    378      1.1       ad 	}
    379      1.1       ad 
    380      1.1       ad 	ri = (struct rasops_info *)cookie;
    381      1.1       ad 
    382      1.8       pk #ifdef RASOPS_CLIPPING
    383      1.1       ad 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
    384      1.1       ad 		stamp_mutex--;
    385      1.1       ad 		return;
    386      1.1       ad 	}
    387      1.1       ad 
    388      1.1       ad 	if ((unsigned)col >= (unsigned)ri->ri_cols) {
    389      1.1       ad 		stamp_mutex--;
    390      1.1       ad 		return;
    391      1.1       ad 	}
    392      1.1       ad #endif
    393      1.1       ad 
    394      1.1       ad 	/* Recompute stamp? */
    395      1.1       ad 	if (attr != stamp_attr)
    396      1.6       ad 		rasops8_makestamp(ri, attr);
    397      1.8       pk 
    398      1.1       ad 	rp = (int32_t *)(ri->ri_bits + row*ri->ri_yscale + col*ri->ri_xscale);
    399      1.1       ad 	height = ri->ri_font->fontheight;
    400      1.8       pk 
    401      1.1       ad 	if (uc == ' ') {
    402      1.8       pk 		while (height--)
    403      1.8       pk 			rp[0] = rp[1] = rp[2] = rp[3] = stamp[0];
    404      1.1       ad 	} else {
    405      1.1       ad 		uc -= ri->ri_font->firstchar;
    406      1.1       ad 		fr = (u_char *)ri->ri_font->data + uc * ri->ri_fontscale;
    407      1.1       ad 		fs = ri->ri_font->stride;
    408      1.8       pk 
    409      1.1       ad 		while (height--) {
    410      1.1       ad 			rp[0] = STAMP_READ(STAMP_SHIFT(fr[0], 1) & STAMP_MASK);
    411      1.1       ad 			rp[1] = STAMP_READ(STAMP_SHIFT(fr[0], 0) & STAMP_MASK);
    412      1.1       ad 			rp[2] = STAMP_READ(STAMP_SHIFT(fr[1], 1) & STAMP_MASK);
    413      1.1       ad 			rp[3] = STAMP_READ(STAMP_SHIFT(fr[1], 0) & STAMP_MASK);
    414      1.1       ad 
    415      1.1       ad 			fr += fs;
    416      1.8       pk 			DELTA(rp, ri->ri_stride, int32_t *);
    417      1.1       ad 		}
    418      1.8       pk 	}
    419      1.1       ad 
    420      1.1       ad 	/* Do underline */
    421      1.7       ad 	if ((attr & 1) != 0) {
    422      1.8       pk 		DELTA(rp, -(ri->ri_stride << 1), int32_t *);
    423      1.8       pk 		rp[0] = rp[1] = rp[2] = rp[3] = stamp[15];
    424      1.8       pk 	}
    425      1.8       pk 
    426      1.1       ad 	stamp_mutex--;
    427      1.1       ad }
    428      1.7       ad #endif /* !RASOPS_SMALL */
    429