Changeset 663 for libcaca/trunk
- Timestamp:
- Mar 22, 2006, 6:30:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/cucul.c
r644 r663 31 31 static void cucul_read_environment(cucul_t *); 32 32 33 /** \brief Initialise \e libcucul.33 /** \brief Initialise a \e libcucul canvas. 34 34 * 35 35 * This function initialises internal \e libcucul structures and the backend … … 43 43 { 44 44 cucul_t *qq = malloc(sizeof(cucul_t)); 45 int i;46 45 47 46 cucul_read_environment(qq); … … 53 52 * default X11 window. When a graphic driver attaches to us, it can set 54 53 * a different size. */ 55 qq->width = 80; 56 qq->height = 32; 57 58 qq->chars = malloc(qq->width * qq->height * sizeof(uint32_t)); 59 qq->attr = malloc(qq->width * qq->height * sizeof(uint8_t)); 60 61 for(i = qq->width * qq->height; i--; ) 62 qq->chars[i] = (uint32_t)' '; 63 memset(qq->attr, 0, qq->width * qq->height * sizeof(uint8_t)); 64 65 qq->empty_line = malloc(qq->width + 1); 66 memset(qq->empty_line, ' ', qq->width); 67 qq->empty_line[qq->width] = '\0'; 68 69 qq->scratch_line = malloc(qq->width + 1); 54 qq->width = qq->width = 0; 55 qq->chars = NULL; 56 qq->attr = NULL; 57 qq->empty_line = qq->scratch_line = NULL; 58 _cucul_set_size(qq, 80, 32); 70 59 71 60 if(_cucul_init_bitmap())
Note: See TracChangeset
for help on using the changeset viewer.