Changeset 1438


Ignore:
Timestamp:
Nov 27, 2006, 3:53:17 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Fix shadowing declarations.
Location:
libcaca/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/canvas.c

    r1390 r1438  
    220220int cucul_put_str(cucul_canvas_t *cv, int x, int y, char const *s)
    221221{
    222     unsigned int read;
     222    unsigned int rd;
    223223
    224224    if(y < 0 || y >= (int)cv->height || x >= (int)cv->width)
     
    227227    while(*s && x < -1)
    228228    {
    229         x += cucul_utf32_is_fullwidth(cucul_utf8_to_utf32(s, &read)) ? 2 : 1;
    230         s += read;
     229        x += cucul_utf32_is_fullwidth(cucul_utf8_to_utf32(s, &rd)) ? 2 : 1;
     230        s += rd;
    231231    }
    232232
    233233    while(*s && x < (int)cv->width)
    234234    {
    235         uint32_t ch = cucul_utf8_to_utf32(s, &read);
     235        uint32_t ch = cucul_utf8_to_utf32(s, &rd);
    236236        cucul_put_char(cv, x, y, ch);
    237237        x += cucul_utf32_is_fullwidth(ch) ? 2 : 1;
    238         s += read;
     238        s += rd;
    239239    }
    240240
  • libcaca/trunk/cucul/export.c

    r1417 r1438  
    895895    for(i = 0; i < w * h * 4; i += 4)
    896896    {
    897         char w;
    898         w = cur[i]; cur[i] = cur[i + 3]; cur[i + 3] = w;
    899         w = cur[i + 1]; cur[i + 1] = cur[i + 2]; cur[i + 2] = w;
     897        char c;
     898        c = cur[i]; cur[i] = cur[i + 3]; cur[i + 3] = c;
     899        c = cur[i + 1]; cur[i + 1] = cur[i + 2]; cur[i + 2] = c;
    900900    }
    901901
  • libcaca/trunk/tools/makefont.c

    r1365 r1438  
    9292    FT_Bitmap img;
    9393    int stdwidth, fullwidth, height, blocks, glyphs, fullglyphs;
    94     unsigned int n, b, i, index;
     94    unsigned int n, b, i;
    9595    unsigned int stdsize, fullsize, control_size, data_size, current_offset;
    9696    uint8_t *glyph_data;
     
    226226
    227227    /* Render all glyphs, so that we can know their offset */
    228     current_offset = n = index = 0;
     228    current_offset = n = 0;
    229229    for(b = 0; blocklist[b + 1]; b += 2)
    230230    {
     
    420420static int printf_unicode(struct glyph *g)
    421421{
    422     int written = 0;
    423 
    424     written += printf("U+%.04X: \"", g->unicode);
     422    int wr = 0;
     423
     424    wr += printf("U+%.04X: \"", g->unicode);
    425425
    426426    if(g->unicode < 0x20 || (g->unicode >= 0x7f && g->unicode <= 0xa0))
    427         written += printf("\\x%.02x\"", g->unicode);
     427        wr += printf("\\x%.02x\"", g->unicode);
    428428    else
    429         written += printf("%s\"", g->buf);
    430 
    431     return written;
     429        wr += printf("%s\"", g->buf);
     430
     431    return wr;
    432432}
    433433
     
    448448    char buf[BUFSIZ];
    449449    char *parser = buf;
    450     int rewind = 0; /* we use this variable to rewind 2 bytes after \000
    451                      * was printed when the next char starts with "\", too. */
     450    int rev = 0; /* we use this variable to rewind 2 bytes after \000
     451                  * was printed when the next char starts with "\", too. */
    452452
    453453    while(bytes--)
     
    459459            parser += sprintf(parser, "\", \"");
    460460            written = 0;
    461             rewind = 0;
     461            rev = 0;
    462462        }
    463463
    464464        if(ch == '\\' || ch == '"')
    465465        {
    466             parser -= rewind;
     466            parser -= rev;
    467467            parser += sprintf(parser, "\\%c", ch);
    468             rewind = 0;
     468            rev = 0;
    469469        }
    470470        else if(ch >= 0x20 && ch < 0x7f)
    471471        {
    472472            parser += sprintf(parser, "%c", ch);
    473             rewind = 0;
     473            rev = 0;
    474474        }
    475475        else
    476476        {
    477             parser -= rewind;
     477            parser -= rev;
    478478            parser += sprintf(parser, "\\%.03o", ch);
    479             rewind = ch ? 0 : 2;
     479            rev = ch ? 0 : 2;
    480480        }
    481481
     
    483483    }
    484484
    485     parser -= rewind;
     485    parser -= rev;
    486486    parser[0] = '\0';
    487487
Note: See TracChangeset for help on using the changeset viewer.