Browse Source

Fix a few DOS compilation warnings.

tags/v0.99.beta17
Sam Hocevar sam 15 years ago
parent
commit
3338776b44
2 changed files with 7 additions and 7 deletions
  1. +3
    -3
      caca/dirty.c
  2. +4
    -4
      caca/figfont.c

+ 3
- 3
caca/dirty.c View File

@@ -57,7 +57,7 @@ int caca_get_dirty_rectangle_count(caca_canvas_t *cv)
* - \c EINVAL Specified rectangle index is out of bounds.
*
* \param cv A libcaca canvas.
* \param index The requested rectangle index.
* \param r The requested rectangle index.
* \param xmin A pointer to an integer where the leftmost edge of the
* dirty rectangle will be stored.
* \param ymin A pointer to an integer where the topmost edge of the
@@ -68,10 +68,10 @@ int caca_get_dirty_rectangle_count(caca_canvas_t *cv)
* dirty rectangle will be stored.
* \return 0 in case of success, -1 if an error occurred.
*/
int caca_get_dirty_rectangle(caca_canvas_t *cv, int index,
int caca_get_dirty_rectangle(caca_canvas_t *cv, int r,
int *xmin, int *ymin, int *xmax, int *ymax)
{
if(index < 0 || index >= cv->ndirty)
if(r < 0 || r >= cv->ndirty)
{
seterrno(EINVAL);
return -1;


+ 4
- 4
caca/figfont.c View File

@@ -390,6 +390,8 @@ static caca_figfont_t * open_figfont(char const *path)
}
else
{
unsigned int tmp;

if(caca_file_gets(f, buf, 2048) == NULL)
break;

@@ -415,10 +417,8 @@ static caca_figfont_t * open_figfont(char const *path)
return NULL;
}

if(buf[1] == 'x')
sscanf(buf, "%x", &ff->lookup[ff->glyphs * 2]);
else
sscanf(buf, "%u", &ff->lookup[ff->glyphs * 2]);
sscanf(buf, buf[1] == 'x' ? "%x" : "%u", &tmp);
ff->lookup[ff->glyphs * 2] = tmp;
}

ff->lookup[ff->glyphs * 2 + 1] = 0;


Loading…
Cancel
Save