Changeset 4766 for libcaca/trunk/caca/figfont.c
- Timestamp:
- 02/13/11 13:48:50 (2 years ago)
- File:
-
- 1 edited
-
libcaca/trunk/caca/figfont.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/figfont.c
r4369 r4766 30 30 #include "caca_internals.h" 31 31 32 struct caca_ figfont32 struct caca_charfont 33 33 { 34 34 int term_width; … … 48 48 49 49 static uint32_t hsmush(uint32_t ch1, uint32_t ch2, int rule); 50 static caca_ figfont_t * open_figfont(char const *);51 static int free_ figfont(caca_figfont_t *);50 static caca_charfont_t * open_charfont(char const *); 51 static int free_charfont(caca_charfont_t *); 52 52 53 53 /** \brief load a figfont and attach it to a canvas */ 54 54 int caca_canvas_set_figfont(caca_canvas_t *cv, char const *path) 55 55 { 56 caca_ figfont_t *ff = NULL;56 caca_charfont_t *ff = NULL; 57 57 58 58 if(path) 59 59 { 60 ff = open_ figfont(path);60 ff = open_charfont(path); 61 61 if(!ff) 62 62 return -1; … … 68 68 free(cv->ff->left); 69 69 free(cv->ff->right); 70 free_ figfont(cv->ff);70 free_charfont(cv->ff); 71 71 } 72 72 … … 130 130 int caca_put_figchar(caca_canvas_t *cv, uint32_t ch) 131 131 { 132 caca_ figfont_t *ff = cv->ff;132 caca_charfont_t *ff = cv->ff; 133 133 int c, w, h, x, y, overlap, extra, xleft, xright; 134 134 … … 254 254 int caca_flush_figlet(caca_canvas_t *cv) 255 255 { 256 caca_ figfont_t *ff = cv->ff;256 caca_charfont_t *ff = cv->ff; 257 257 int x, y; 258 258 … … 288 288 #define EXT_GLYPHS (STD_GLYPHS + 7) 289 289 290 static caca_ figfont_t * open_figfont(char const *path)290 static caca_charfont_t * open_charfont(char const *path) 291 291 { 292 292 #if !defined __KERNEL__ && defined HAVE_SNPRINTF … … 295 295 char buf[2048]; 296 296 char hardblank[10]; 297 caca_ figfont_t *ff;297 caca_charfont_t *ff; 298 298 char *data = NULL; 299 299 caca_file_t *f; 300 300 int i, j, size, comment_lines; 301 301 302 ff = malloc(sizeof(caca_ figfont_t));302 ff = malloc(sizeof(caca_charfont_t)); 303 303 if(!ff) 304 304 { … … 485 485 } 486 486 487 int free_ figfont(caca_figfont_t *ff)487 int free_charfont(caca_charfont_t *ff) 488 488 { 489 489 caca_free_canvas(ff->fontcv);
Note: See TracChangeset
for help on using the changeset viewer.
