| /netbsd-src/bin/csh/ |
| H A D | char.h | 63 #define cmap(c, bits) \ macro 66 #define isglob(c) cmap(c, _GLOB) 67 #define isspc(c) cmap(c, _SP) 68 #define ismeta(c) cmap(c, _META) 69 #define iscmdmeta(c) cmap(c, _CMD) 87 #define Isspace(c) cmap(c, _SP|_NL) 88 #define Isdigit(c) cmap(c, _DIG) 89 #define Isalpha(c) (cmap(c,_LET) && !(((c) & META) && AsciiOnly)) 90 #define Islower(c) (cmap(c,_LOW) && !(((c) & META) && AsciiOnly)) 91 #define Isupper(c) (cmap(c, _UP) && !(((c) & META) && AsciiOnly)) [all …]
|
| /netbsd-src/sys/arch/amiga/dev/ |
| H A D | grf_ul.c | 747 ul_getcmap (struct grf_softc *gp, struct grf_colormap *cmap, dev_t dev) in ul_getcmap() argument 763 if (cmap->count == 0 || cmap->index >= mxidx) in ul_getcmap() 766 if (cmap->count > mxidx - cmap->index) in ul_getcmap() 767 cmap->count = mxidx - cmap->index; in ul_getcmap() 771 if ((error = copyout(mymap + cmap->index, cmap->red, cmap->count)) in ul_getcmap() 773 || (error = copyout(mymap + mxidx + cmap->index, cmap->green, in ul_getcmap() 774 cmap->count)) in ul_getcmap() 776 || (error = copyout(mymap + mxidx * 2 + cmap->index, cmap->blue, in ul_getcmap() 777 cmap->count))) in ul_getcmap() 785 ul_putcmap (struct grf_softc *gp, struct grf_colormap *cmap, dev_t dev) in ul_putcmap() argument [all …]
|
| H A D | grf_rt.c | 1062 rt_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in rt_getcmap() argument 1069 if (cmap->count == 0 || cmap->index >= 256) in rt_getcmap() 1072 if (cmap->count > 256 - cmap->index) in rt_getcmap() 1073 cmap->count = 256 - cmap->index; in rt_getcmap() 1077 vgaw (ba, VDAC_REG_SELECT, cmap->index); in rt_getcmap() 1078 x = cmap->count - 1; in rt_getcmap() 1079 rp = red + cmap->index; in rt_getcmap() 1080 gp = green + cmap->index; in rt_getcmap() 1081 bp = blue + cmap->index; in rt_getcmap() 1089 if (!(error = copyout (red + cmap->index, cmap->red, cmap->count)) in rt_getcmap() [all …]
|
| H A D | amidisplaycc.c | 1565 amidisplaycc_cmapioctl(view_t *view, u_long cmd, struct wsdisplay_cmap *cmap) in amidisplaycc_cmapioctl() argument 1574 if (cmap->index >= MAXCOLORS || in amidisplaycc_cmapioctl() 1575 cmap->count > MAXCOLORS || in amidisplaycc_cmapioctl() 1576 cmap->index + cmap->count > MAXCOLORS) in amidisplaycc_cmapioctl() 1579 if (cmap->count == 0) in amidisplaycc_cmapioctl() 1582 tmpcmap.index = cmap->index; in amidisplaycc_cmapioctl() 1583 tmpcmap.count = cmap->count; in amidisplaycc_cmapioctl() 1591 err = copyin(cmap->red, cmred, cmap->count); in amidisplaycc_cmapioctl() 1595 err = copyin(cmap->green, cmgrn, cmap->count); in amidisplaycc_cmapioctl() 1599 err = copyin(cmap->blue, cmblu, cmap->count); in amidisplaycc_cmapioctl() [all …]
|
| H A D | grf_rh.c | 1807 rh_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in rh_getcmap() argument 1814 if (cmap->count == 0 || cmap->index >= 256) in rh_getcmap() 1817 if (cmap->count > 256 - cmap->index) in rh_getcmap() 1818 cmap->count = 256 - cmap->index; in rh_getcmap() 1822 vgaw (ba, VDAC_ADDRESS_W, cmap->index); in rh_getcmap() 1823 x = cmap->count - 1; in rh_getcmap() 1824 rp = red + cmap->index; in rh_getcmap() 1825 gp = green + cmap->index; in rh_getcmap() 1826 bp = blue + cmap->index; in rh_getcmap() 1833 if (!(error = copyout (red + cmap->index, cmap->red, cmap->count)) in rh_getcmap() [all …]
|
| H A D | grf_cl.c | 643 cl_cursprite.cmap.red = cl_sprred; in cl_boardinit() 644 cl_cursprite.cmap.green = cl_sprgreen; in cl_boardinit() 645 cl_cursprite.cmap.blue = cl_sprblue; in cl_boardinit() 1021 copyin(data->cmap.red, red, 2); in cl_setspriteinfo() 1022 copyin(data->cmap.green, green, 2); in cl_setspriteinfo() 1023 copyin(data->cmap.blue, blue, 2); in cl_setspriteinfo() 1024 memcpy(cl_cursprite.cmap.red, red, 2); in cl_setspriteinfo() 1025 memcpy(cl_cursprite.cmap.green, green, 2); in cl_setspriteinfo() 1026 memcpy(cl_cursprite.cmap.blue, blue, 2); in cl_setspriteinfo() 1138 cl_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in cl_getcmap() argument [all …]
|
| H A D | grf_et.c | 582 et_cursprite.cmap.red = et_sprred; in et_boardinit() 583 et_cursprite.cmap.green = et_sprgreen; in et_boardinit() 584 et_cursprite.cmap.blue = et_sprblue; in et_boardinit() 911 et_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in et_getcmap() argument 918 if (cmap->count == 0 || cmap->index >= 256) in et_getcmap() 921 if (cmap->count > 256 - cmap->index) in et_getcmap() 922 cmap->count = 256 - cmap->index; in et_getcmap() 926 x = cmap->count - 1; in et_getcmap() 928 rp = red + cmap->index; in et_getcmap() 929 gp = green + cmap->index; in et_getcmap() [all …]
|
| H A D | grf_cv3d.c | 1053 cv3d_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in cv3d_getcmap() argument 1059 if (cmap->count == 0 || cmap->index >= 256) in cv3d_getcmap() 1062 if (cmap->count > 256 - cmap->index) in cv3d_getcmap() 1063 cmap->count = 256 - cmap->index; in cv3d_getcmap() 1066 vgawio(cv3d_boardaddr, VDAC_ADDRESS_W, cmap->index); in cv3d_getcmap() 1067 x = cmap->count - 1; in cv3d_getcmap() 1069 rp = red + cmap->index; in cv3d_getcmap() 1070 gp = green + cmap->index; in cv3d_getcmap() 1071 bp = blue + cmap->index; in cv3d_getcmap() 1079 if (!(error = copyout (red + cmap->index, cmap->red, cmap->count)) in cv3d_getcmap() [all …]
|
| H A D | grf_cv.c | 1132 cv_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap) in cv_getcmap() argument 1140 if (cmap->count == 0 || cmap->index >= 256) in cv_getcmap() 1143 if (cmap->count > 256 - cmap->index) in cv_getcmap() 1144 cmap->count = 256 - cmap->index; in cv_getcmap() 1147 vgaw (ba, VDAC_ADDRESS_W, cmap->index); in cv_getcmap() 1148 x = cmap->count - 1; in cv_getcmap() 1150 rp = red + cmap->index; in cv_getcmap() 1151 gp = green + cmap->index; in cv_getcmap() 1152 bp = blue + cmap->index; in cv_getcmap() 1160 if (!(error = copyout (red + cmap->index, cmap->red, cmap->count)) in cv_getcmap() [all …]
|
| /netbsd-src/sys/arch/ews4800mips/sbd/ |
| H A D | fb_sbdio.c | 271 struct wsdisplay_cmap *cmap = (void *)data; in _fb_ioctl() local 296 if (cmap->index >= 256 || cmap->count > 256 - cmap->index) in _fb_ioctl() 298 for (i = 0; i < cmap->count; i++) { in _fb_ioctl() 299 cmap->red[i] = ga->clut[cmap->index + i][0]; in _fb_ioctl() 300 cmap->green[i] = ga->clut[cmap->index + i][1]; in _fb_ioctl() 301 cmap->blue[i] = ga->clut[cmap->index + i][2]; in _fb_ioctl() 308 if (cmap->index >= 256 || cmap->count > 256 - cmap->index) in _fb_ioctl() 310 for (i = 0; i < cmap->count; i++) { in _fb_ioctl() 311 ga->clut[cmap->index + i][0] = cmap->red[i]; in _fb_ioctl() 312 ga->clut[cmap->index + i][1] = cmap->green[i]; in _fb_ioctl() [all …]
|
| /netbsd-src/sys/arch/hp300/dev/ |
| H A D | diofb.c | 238 fb->cmap.r[i] = *color++; in diofb_resetcmap() 239 fb->cmap.g[i] = *color++; in diofb_resetcmap() 240 fb->cmap.b[i] = *color++; in diofb_resetcmap() 267 memcpy(fb->cmap.r + 0xc0, fb->cmap.r + 0x00, 0x10); in diofb_resetcmap() 268 memcpy(fb->cmap.g + 0xc0, fb->cmap.g + 0x00, 0x10); in diofb_resetcmap() 269 memcpy(fb->cmap.b + 0xc0, fb->cmap.b + 0x00, 0x10); in diofb_resetcmap() 270 memcpy(fb->cmap.r + 0x30, fb->cmap.r + 0xf0, 0x10); in diofb_resetcmap() 271 memcpy(fb->cmap.g + 0x30, fb->cmap.g + 0xf0, 0x10); in diofb_resetcmap() 272 memcpy(fb->cmap.b + 0x30, fb->cmap.b + 0xf0, 0x10); in diofb_resetcmap() 280 memcpy(fb->cmap.r + 0x08, fb->cmap.r + 0xf8, 0x08); in diofb_resetcmap() [all …]
|
| /netbsd-src/external/gpl2/groff/dist/src/include/ |
| H A D | cmap.h | 29 class cmap { 31 cmap(); 32 cmap(cmap_builtin); 41 inline int cmap::operator()(unsigned char c) const in operator() 46 inline unsigned char &cmap::operator[](unsigned char c) 51 extern cmap cmlower; 52 extern cmap cmupper;
|
| /netbsd-src/external/gpl2/groff/dist/src/libs/libgroff/ |
| H A D | cmap.cpp | 26 cmap cmlower(CMAP_BUILTIN); 27 cmap cmupper(CMAP_BUILTIN); 35 cmap::cmap() in cmap() function in cmap 42 cmap::cmap(cmap_builtin) in cmap() function in cmap
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/ |
| H A D | drm_fb_helper.c | 548 ret = fb_alloc_cmap(&info->cmap, 256, 0); in drm_fb_helper_alloc_fbi() 564 fb_dealloc_cmap(&info->cmap); in drm_fb_helper_alloc_fbi() 620 if (info->cmap.len) in drm_fb_helper_fini() 621 fb_dealloc_cmap(&info->cmap); in drm_fb_helper_fini() 920 static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info) in setcmap_pseudo_palette() argument 925 if (cmap->start + cmap->len > 16) in setcmap_pseudo_palette() 928 for (i = 0; i < cmap->len; ++i) { in setcmap_pseudo_palette() 929 u16 red = cmap->red[i]; in setcmap_pseudo_palette() 930 u16 green = cmap->green[i]; in setcmap_pseudo_palette() 931 u16 blue = cmap->blue[i]; in setcmap_pseudo_palette() [all …]
|
| /netbsd-src/sys/dev/ic/ |
| H A D | bt463.c | 418 if (cursorp->cmap.index > 2 || in bt463_check_curcmap() 419 cursorp->cmap.count > 2 - cursorp->cmap.index) in bt463_check_curcmap() 421 count = cursorp->cmap.count; in bt463_check_curcmap() 422 index = cursorp->cmap.index; in bt463_check_curcmap() 423 error = copyin(cursorp->cmap.red, &data->tmpcurcmap_r[index], count); in bt463_check_curcmap() 426 error = copyin(cursorp->cmap.green, &data->tmpcurcmap_g[index], count); in bt463_check_curcmap() 429 error = copyin(cursorp->cmap.blue, &data->tmpcurcmap_b[index], count); in bt463_check_curcmap() 441 count = cursorp->cmap.count; in bt463_set_curcmap() 442 index = cursorp->cmap.index; in bt463_set_curcmap() 456 cursorp->cmap.index = 0; /* DOCMAP */ in bt463_get_curcmap() [all …]
|
| H A D | bt485.c | 332 if (cursorp->cmap.index > 2 || in bt485_set_cursor() 333 cursorp->cmap.count > 2 - cursorp->cmap.index) in bt485_set_cursor() 335 count = cursorp->cmap.count; in bt485_set_cursor() 336 index = cursorp->cmap.index; in bt485_set_cursor() 337 error = copyin(cursorp->cmap.red, &r[index], count); in bt485_set_cursor() 340 error = copyin(cursorp->cmap.green, &g[index], count); in bt485_set_cursor() 343 error = copyin(cursorp->cmap.blue, &b[index], count); in bt485_set_cursor() 411 cursorp->cmap.index = 0; /* DOCMAP */ in bt485_get_cursor() 412 cursorp->cmap.count = 2; in bt485_get_cursor() 413 if (cursorp->cmap.red != NULL) { in bt485_get_cursor() [all …]
|
| /netbsd-src/sys/arch/sun3/dev/ |
| H A D | cg2.c | 295 struct fbcmap *cmap = data; in cg2getcmap() local 302 start = cmap->index; in cg2getcmap() 303 count = cmap->count; in cg2getcmap() 322 if ((error = copyout(red + start, cmap->red, count)) != 0) in cg2getcmap() 324 if ((error = copyout(green + start, cmap->green, count)) != 0) in cg2getcmap() 326 if ((error = copyout(blue + start, cmap->blue, count)) != 0) in cg2getcmap() 336 struct fbcmap *cmap = data; in cg2putcmap() local 344 start = cmap->index; in cg2putcmap() 345 count = cmap->count; in cg2putcmap() 351 if ((error = copyin(cmap in cg2putcmap() [all...] |
| /netbsd-src/sys/arch/sparc/dev/ |
| H A D | cgtwo.c | 299 cgtwogetcmap(struct cgtwo_softc *sc, struct fbcmap *cmap) in cgtwogetcmap() argument 306 start = cmap->index; in cgtwogetcmap() 307 count = cmap->count; in cgtwogetcmap() 326 if ((error = copyout(red + start, cmap->red, count)) != 0) in cgtwogetcmap() 328 if ((error = copyout(green + start, cmap->green, count)) != 0) in cgtwogetcmap() 330 if ((error = copyout(blue + start, cmap->blue, count)) != 0) in cgtwogetcmap() 339 cgtwoputcmap(struct cgtwo_softc *sc, struct fbcmap *cmap) in cgtwoputcmap() argument 347 start = cmap->index; in cgtwoputcmap() 348 count = cmap->count; in cgtwoputcmap() 354 if ((error = copyin(cmap->red, red + start, count)) != 0) in cgtwoputcmap() [all …]
|
| /netbsd-src/sys/dev/hpc/ |
| H A D | bivideo.c | 395 struct wsdisplay_cmap *cmap; in bivideo_ioctl() local 401 cmap = (struct wsdisplay_cmap *)data; in bivideo_ioctl() 405 cmap->index >= 256 || in bivideo_ioctl() 406 cmap->count > 256 - cmap->index) in bivideo_ioctl() 409 error = copyout(&bivideo_cmap_r[cmap->index], cmap->red, in bivideo_ioctl() 410 cmap->count); in bivideo_ioctl() 413 error = copyout(&bivideo_cmap_g[cmap->index], cmap->green, in bivideo_ioctl() 414 cmap->count); in bivideo_ioctl() 417 error = copyout(&bivideo_cmap_b[cmap->index], cmap->blue, in bivideo_ioctl() 418 cmap->count); in bivideo_ioctl()
|
| /netbsd-src/sys/dev/pci/ |
| H A D | sisfb.c | 61 uint8_t cmap[256 * 3]; member 407 rc = sisfb_getcmap(fb->cmap, cm); in sisfb_ioctl() 411 rc = sisfb_putcmap(fb->cmap, cm); in sisfb_ioctl() 644 bcopy(rasops_cmap, fb->cmap, sizeof(fb->cmap)); in sisfb_setup() 671 uint8_t *cmap = fb->cmap + baseidx * 3; in sisfb_loadcmap() local 675 bus_space_write_1(fb->iot, fb->ioh, DAC_DATA, *cmap++ >> 2); in sisfb_loadcmap() 676 bus_space_write_1(fb->iot, fb->ioh, DAC_DATA, *cmap++ >> 2); in sisfb_loadcmap() 677 bus_space_write_1(fb->iot, fb->ioh, DAC_DATA, *cmap++ >> 2); in sisfb_loadcmap() 682 sisfb_getcmap(uint8_t *cmap, struct wsdisplay_cmap *cm) in sisfb_getcmap() argument 693 src = cmap + index; in sisfb_getcmap() [all …]
|
| /netbsd-src/sys/arch/hpcmips/dev/ |
| H A D | plumvideo.c | 427 struct wsdisplay_cmap *cmap; in plumvideo_ioctl() local 436 cmap = (struct wsdisplay_cmap *)data; in plumvideo_ioctl() 437 cnt = cmap->count; in plumvideo_ioctl() 438 idx = cmap->index; in plumvideo_ioctl() 453 error = copyout(r, cmap->red, cnt); in plumvideo_ioctl() 456 error = copyout(g, cmap->green, cnt); in plumvideo_ioctl() 459 error = copyout(b, cmap->blue, cnt); in plumvideo_ioctl() 466 cmap = (struct wsdisplay_cmap *)data; in plumvideo_ioctl() 467 cnt = cmap->count; in plumvideo_ioctl() 468 idx = cmap->index; in plumvideo_ioctl() [all …]
|
| H A D | ite8181.c | 637 struct wsdisplay_cmap *cmap; in ite8181_ioctl() local 643 cmap = (struct wsdisplay_cmap *)data; in ite8181_ioctl() 647 256 <= cmap->index || in ite8181_ioctl() 648 256 - cmap->index < cmap->count) in ite8181_ioctl() 652 error = copyout(&bivideo_cmap_r[cmap->index], cmap->red, in ite8181_ioctl() 653 cmap->count); in ite8181_ioctl() 656 error = copyout(&bivideo_cmap_g[cmap->index], cmap->green, in ite8181_ioctl() 657 cmap->count); in ite8181_ioctl() 660 error = copyout(&bivideo_cmap_b[cmap->index], cmap->blue, in ite8181_ioctl() 661 cmap->count); in ite8181_ioctl()
|
| /netbsd-src/sys/dev/tc/ |
| H A D | xcfb.c | 562 struct hwcmap256 cmap; in set_cmap() local 569 error = copyin(p->red, &cmap.r[index], count); in set_cmap() 572 error = copyin(p->green, &cmap.g[index], count); in set_cmap() 575 error = copyin(p->blue, &cmap.b[index], count); in set_cmap() 578 memcpy(&sc->sc_cmap.r[index], &cmap.r[index], count); in set_cmap() 579 memcpy(&sc->sc_cmap.g[index], &cmap.g[index], count); in set_cmap() 580 memcpy(&sc->sc_cmap.b[index], &cmap.b[index], count); in set_cmap() 594 index = p->cmap.index; in set_cursor() 595 count = p->cmap.count; in set_cursor() 599 error = copyin(p->cmap.red, &r[index], count); in set_cursor() [all …]
|
| H A D | cfb.c | 685 struct hwcmap256 cmap; in set_cmap() local 692 error = copyin(p->red, &cmap.r[index], count); in set_cmap() 695 error = copyin(p->green, &cmap.g[index], count); in set_cmap() 698 error = copyin(p->blue, &cmap.b[index], count); in set_cmap() 702 memcpy(&sc->sc_cmap.r[index], &cmap.r[index], count); in set_cmap() 703 memcpy(&sc->sc_cmap.g[index], &cmap.g[index], count); in set_cmap() 704 memcpy(&sc->sc_cmap.b[index], &cmap.b[index], count); in set_cmap() 720 index = p->cmap.index; in set_cursor() 721 count = p->cmap.count; in set_cursor() 724 error = copyin(p->cmap.red, &r[index], count); in set_cursor() [all …]
|
| /netbsd-src/sys/arch/arm/iomd/ |
| H A D | vidcvideo.c | 665 struct hwcmap256 cmap; in set_cmap() local 672 error = copyin(p->red, &cmap.r[index], count); in set_cmap() 675 error = copyin(p->green, &cmap.g[index], count); in set_cmap() 678 error = copyin(p->blue, &cmap.b[index], count); in set_cmap() 681 memcpy(&dc->dc_cmap.r[index], &cmap.r[index], count); in set_cmap() 682 memcpy(&dc->dc_cmap.g[index], &cmap.g[index], count); in set_cmap() 683 memcpy(&dc->dc_cmap.b[index], &cmap.b[index], count); in set_cmap() 703 index = p->cmap.index; in set_cursor() 704 count = p->cmap.count; in set_cursor() 708 error = copyin(p->cmap in set_cursor() [all...] |