浏览代码

Fix a few DOS compilation warnings.

tags/v0.99.beta17
Sam Hocevar sam 15 年前
父节点
当前提交
3338776b44
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. +3
    -3
      caca/dirty.c
  2. +4
    -4
      caca/figfont.c

+ 3
- 3
caca/dirty.c 查看文件

@@ -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 查看文件

@@ -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;


正在加载...
取消
保存