comparison src/xdisp.c @ 58095:fbc455eba14e

(produce_image_glyph): Remove unused variable 'face_ascent'. (pint2hrstr): Add extra braces to silence compiler.
author Kim F. Storm <storm@cua.dk>
date Tue, 09 Nov 2004 13:26:01 +0000
parents 78d72788c973
children 6b52bc413dfc cb7f41387eb3
comparison
equal deleted inserted replaced
58094:1f8360dd535b 58095:fbc455eba14e
16039 /* Round to nearest and decide whether to use TENTHS or not. */ 16039 /* Round to nearest and decide whether to use TENTHS or not. */
16040 if (quotient <= 9) 16040 if (quotient <= 9)
16041 { 16041 {
16042 tenths = remainder / 100; 16042 tenths = remainder / 100;
16043 if (50 <= remainder % 100) 16043 if (50 <= remainder % 100)
16044 if (tenths < 9) 16044 {
16045 tenths++; 16045 if (tenths < 9)
16046 tenths++;
16047 else
16048 {
16049 quotient++;
16050 if (quotient == 10)
16051 tenths = -1;
16052 else
16053 tenths = 0;
16054 }
16055 }
16056 }
16057 else
16058 if (500 <= remainder)
16059 {
16060 if (quotient < 999)
16061 quotient++;
16046 else 16062 else
16047 { 16063 {
16048 quotient++; 16064 quotient = 1;
16049 if (quotient == 10) 16065 exponent++;
16050 tenths = -1; 16066 tenths = 0;
16051 else
16052 tenths = 0;
16053 } 16067 }
16054 } 16068 }
16055 else
16056 if (500 <= remainder)
16057 if (quotient < 999)
16058 quotient++;
16059 else
16060 {
16061 quotient = 1;
16062 exponent++;
16063 tenths = 0;
16064 }
16065 } 16069 }
16066 16070
16067 /* Calculate the LENGTH of QUOTIENT.TENTHS as a string. */ 16071 /* Calculate the LENGTH of QUOTIENT.TENTHS as a string. */
16068 if (tenths == -1 && quotient <= 99) 16072 if (tenths == -1 && quotient <= 99)
16069 if (quotient <= 9) 16073 if (quotient <= 9)
18346 produce_image_glyph (it) 18350 produce_image_glyph (it)
18347 struct it *it; 18351 struct it *it;
18348 { 18352 {
18349 struct image *img; 18353 struct image *img;
18350 struct face *face; 18354 struct face *face;
18351 int face_ascent, glyph_ascent; 18355 int glyph_ascent;
18352 struct glyph_slice slice; 18356 struct glyph_slice slice;
18353 18357
18354 xassert (it->what == IT_IMAGE); 18358 xassert (it->what == IT_IMAGE);
18355 18359
18356 face = FACE_FROM_ID (it->f, it->face_id); 18360 face = FACE_FROM_ID (it->f, it->face_id);
18429 if (it->descent < 0) 18433 if (it->descent < 0)
18430 it->descent = 0; 18434 it->descent = 0;
18431 18435
18432 #if 0 /* this breaks image tiling */ 18436 #if 0 /* this breaks image tiling */
18433 /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ 18437 /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */
18434 face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); 18438 int face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f);
18435 if (face_ascent > it->ascent) 18439 if (face_ascent > it->ascent)
18436 it->ascent = it->phys_ascent = face_ascent; 18440 it->ascent = it->phys_ascent = face_ascent;
18437 #endif 18441 #endif
18438 18442
18439 it->nglyphs = 1; 18443 it->nglyphs = 1;