瀏覽代碼

* Cosmetic changes.

tags/v0.99.beta14
Sam Hocevar sam 19 年之前
父節點
當前提交
5f4a761ce0
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. +7
    -7
      tools/makefont.c

+ 7
- 7
tools/makefont.c 查看文件

@@ -284,23 +284,23 @@ static int printf_hex(char const *fmt, uint8_t *data, int bytes)

while(bytes--)
{
uint8_t c = *data++;
if(c == '\\' || c == '"')
uint8_t ch = *data++;
if(ch == '\\' || ch == '"')
{
parser -= rewind;
parser += sprintf(parser, "\\%c", c);
parser += sprintf(parser, "\\%c", ch);
rewind = 0;
}
else if(c >= 0x20 && c < 0x7f)
else if(ch >= 0x20 && ch < 0x7f)
{
parser += sprintf(parser, "%c", c);
parser += sprintf(parser, "%c", ch);
rewind = 0;
}
else
{
parser -= rewind;
parser += sprintf(parser, "\\%.03o", c);
rewind = c ? 0 : 2;
parser += sprintf(parser, "\\%.03o", ch);
rewind = ch ? 0 : 2;
}
}



Loading…
取消
儲存