]> git.donarmstrong.com Git - lilypond.git/blob - lily/freetype-error.cc
Run `make grand-replace'.
[lilypond.git] / lily / freetype-error.cc
1 /* 
2   freetype-error.cc -- implement freetype error messages
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2007--2008 Han-Wen Nienhuys <hanwen@lilypond.org>
7   
8 */
9
10 #include "freetype.hh"
11
12 #undef __FTERRORS_H__                                           
13 #define FT_ERRORDEF(e, v, s)  { e, s },                       
14 #define FT_ERROR_START_LIST     {                               
15 #define FT_ERROR_END_LIST       { 0, 0 } };                     
16                                                                          
17 const struct Freetype_error_message
18 {                                                               
19   int          err_code;                                        
20   const char*  err_msg;
21 } ft_errors[] =                                                 
22                                                                          
23 #include <freetype/fterrors.h>
24
25   ;
26
27
28 #include <string>
29
30 string
31 freetype_error_string (int code)
32 {
33   for (Freetype_error_message const *p = ft_errors;
34        p->err_msg; p ++)
35     {
36       if (p->err_code == code)
37         return p->err_msg;
38     }
39
40   return "<unknown error>"; 
41 }
42