freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] new FT error scheme


From: Werner LEMBERG
Subject: [Devel] new FT error scheme
Date: Tue, 03 Apr 2001 01:23:34 +0200 (CEST)

The current code like

  #define TT_Err_xxx  FT_Err_xxx

isn't really meaningful.

What do you think about the following:

  #define FT_Err_Ok   0x00
  #define FT_Err_Foo  0x01 + FT_ERR_OFFSET
  #define FT_Err_Bar  0x02 + FT_ERR_OFFSET
  ...

In freetype.h:
  #undef  FT_ERR_OFFSET
  #define FT_ERR_OFFSET 0x000

In module foo:

  #undef  FT_ERR_OFFSET
  #define FT_ERR_OFFSET 0x100


This would give better error codes (the high byte gives the module,
the low byte the error code), and we could uniformly use FT_Err_*
everywhere.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]