From owner-p4-projects@FreeBSD.ORG Thu Dec 6 21:05:42 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9D213D64; Thu, 6 Dec 2012 21:05:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5179CD62 for ; Thu, 6 Dec 2012 21:05:42 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 35CB18FC08 for ; Thu, 6 Dec 2012 21:05:42 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.5/8.14.5) with ESMTP id qB6L5gML059074 for ; Thu, 6 Dec 2012 21:05:42 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qB6L5f6r059071 for perforce@freebsd.org; Thu, 6 Dec 2012 21:05:41 GMT (envelope-from brooks@freebsd.org) Date: Thu, 6 Dec 2012 21:05:41 GMT Message-Id: <201212062105.qB6L5f6r059071@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 219891 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 21:05:42 -0000 http://p4web.freebsd.org/@@219891?ac=10 Change 219891 by brooks@brooks_zenith on 2012/12/06 21:04:43 Make all file matches case insensitive for more reliable FAT support. Extend the edges of full height normal slides. Make the radio button style controls look slighly more like radio buttons by using (*) instead of [*]. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#18 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#18 (text+ko) ==== @@ -74,7 +74,7 @@ uint32_t header_height; uint32_t *busyarea, *hourglass; enum sbtype sb = SB_CHERI; -enum mtl_display_mode res = MTL_DM_720x480; +enum mtl_display_mode res = MTL_DM_800x480; static int zombies_waiting = 0; int *slidep; @@ -184,10 +184,10 @@ * The screen looks like: * * Sandbox Resolution - * [*] None [ ] 800x480 - * [ ] Capsicum [*] 720x480 - * [ ] CHERI [ ] 640x480 (Left) - * [ ] 640x480 (Centered) + * (*) None ( ) 800x480 + * ( ) Capsicum (*) 720x480 + * ( ) CHERI ( ) 640x480 (Left) + * ( ) 640x480 (Centered) * [ ] Visible * */ @@ -258,7 +258,7 @@ textbuf, f_width * CD_SB_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_SB_COLS, f_height); - sprintf(text, "[%c] None", sb == SB_NONE ? '*' : ' '); + sprintf(text, "(%c) None", sb == SB_NONE ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_SB_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -266,7 +266,7 @@ textbuf, f_width * CD_SB_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_SB_COLS, f_height); - sprintf(text, "[%c] Capsicum", sb == SB_CAPSICUM ? '*' : ' '); + sprintf(text, "(%c) Capsicum", sb == SB_CAPSICUM ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_SB_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -274,7 +274,7 @@ textbuf, f_width * CD_SB_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_SB_COLS, f_height); - sprintf(text, "[%c] CHERI", sb == SB_CHERI ? '*' : ' '); + sprintf(text, "(%c) CHERI", sb == SB_CHERI ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_SB_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -297,7 +297,7 @@ textbuf, f_width * CD_RES_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_RES_COLS, f_height); - sprintf(text, "[%c] 800x480", res == MTL_DM_800x480 ? '*' : ' '); + sprintf(text, "(%c) 800x480", res == MTL_DM_800x480 ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_RES_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -305,7 +305,7 @@ textbuf, f_width * CD_RES_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_RES_COLS, f_height); - sprintf(text, "[%c] 720x480", res == MTL_DM_720x480 ? '*' : ' '); + sprintf(text, "(%c) 720x480", res == MTL_DM_720x480 ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_RES_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -313,7 +313,7 @@ textbuf, f_width * CD_RES_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_RES_COLS, f_height); - sprintf(text, "[%c] 640x480 (Left)", res == MTL_DM_640x480 ? '*' : ' '); + sprintf(text, "(%c) 640x480 (Left)", res == MTL_DM_640x480 ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_RES_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -321,7 +321,7 @@ textbuf, f_width * CD_RES_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_RES_COLS, f_height); - sprintf(text, "[%c] 640x480 (Centered)", + sprintf(text, "(%c) 640x480 (Centered)", res == MTL_DM_640x480_CENTER ? '*' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_RES_COLS, f_height); @@ -471,7 +471,7 @@ fb_fill_region(is->buffer[r * is->width], 0, r, fcol, 1); } - if (is->width < (uint)fb_width) { + if (is->width < (uint)fb_width - fcol) { /* Right extend the image if needed */ for (r = 0; r < is->height; r++) fb_fill_region(is->buffer[((r + 1) * is->width) - 1], @@ -564,14 +564,33 @@ default: break; } - iboxstate_free(is); - /* Skip the rest in the full height image case */ + /* + * If the image is full height, then left and right extend the + * edges and skip further compositing + */ if (y == 0) { + if (x > 0) { + /* Left extend the image if needed */ + for (r = 0; r < is->height; r++) + fb_fill_region(is->buffer[r * is->width], + 0, r, x, 1); + } + if (x + is->width < (uint)fb_width) { + /* Right extend the image if needed */ + for (r = 0; r < is->height; r++) + fb_fill_region(is->buffer[((r + 1) * + is->width) - 1], + x + is->width, r, + fb_width - (x + is->width), 1); + } + iboxstate_free(is); unbusy(); return (0); } + iboxstate_free(is); + busy(0); /* put an SRI logo in the lower left corner */ @@ -890,10 +909,10 @@ if (entry->d_type != DT_REG) continue; /* Skip obvious non-PNGs */ - if (fnmatch("*.[pP][nN][gG]", entry->d_name, 0) != 0) + if (fnmatch("*.png", entry->d_name, FNM_CASEFOLD) != 0) continue; - if (fnmatch("*-cover-*.png", entry->d_name, 0) == 0) + if (fnmatch("*-cover-*.png", entry->d_name, FNM_CASEFOLD) == 0) addslide(&ncovers, &maxcovers, &covers, entry->d_name); else addslide(&nslides, &maxslides, &slides, entry->d_name); @@ -906,10 +925,15 @@ slide = *slidep; for (;;) { gesture = 0; + /* If there isn't a cover, skip over it */ + if (slide == 0 && ncovers == 0) + slide = 1; + if (slide == 0) { asprintf(&coverpat, "*-cover-%d.png", slide_width); for (cover = 0; cover < ncovers; cover++) - if (fnmatch(coverpat, covers[cover], 0) == 0) + if (fnmatch(coverpat, covers[cover], + FNM_CASEFOLD) == 0) break; free(coverpat); if (cover == ncovers) @@ -981,7 +1005,7 @@ set_display_mode(res); break; case TSG_EAST: - if (slide == 0) + if (slide == 0 || (slide == 1 && ncovers == 0)) slide = nslides; else slide--;