- Timestamp:
- Mar 23, 2006, 2:12:56 PM (15 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/cucul.c
r672 r677 35 35 * This function initialises internal \e libcucul structures and the backend 36 36 * that will be used for subsequent graphical operations. It must be the 37 * first \e libcucul function to be called in a function. cucul_ end() should37 * first \e libcucul function to be called in a function. cucul_free() should 38 38 * be called at the end of the program to free all allocated resources. 39 39 * … … 45 45 * \return 0 upon success, a non-zero value if an error occurs. 46 46 */ 47 cucul_t * cucul_ init(unsigned int width, unsigned int height)47 cucul_t * cucul_create(unsigned int width, unsigned int height) 48 48 { 49 49 cucul_t *qq = malloc(sizeof(cucul_t)); … … 261 261 /** \brief Uninitialise \e libcucul. 262 262 * 263 * This function frees all resources allocated by cucul_ init(). After264 * cucul_ end() has been called, no other \e libcucul functions may be used265 * unless a new call to cucul_ init() is done.266 */ 267 void cucul_ end(cucul_t *qq)263 * This function frees all resources allocated by cucul_create(). After 264 * cucul_free() has been called, no other \e libcucul functions may be used 265 * unless a new call to cucul_create() is done. 266 */ 267 void cucul_free(cucul_t *qq) 268 268 { 269 269 _cucul_end_bitmap(); -
libcaca/trunk/cucul/cucul.h
r673 r677 119 119 * 120 120 * @{ */ 121 cucul_t * cucul_ init(unsigned int, unsigned int);121 cucul_t * cucul_create(unsigned int, unsigned int); 122 122 void cucul_set_size(cucul_t *, unsigned int, unsigned int); 123 123 unsigned int cucul_get_width(cucul_t *); … … 126 126 void cucul_set_feature(cucul_t *, enum cucul_feature); 127 127 char const *cucul_get_feature_name(enum cucul_feature); 128 void cucul_ end(cucul_t *);128 void cucul_free(cucul_t *); 129 129 /* @} */ 130 130 -
libcaca/trunk/src/aafire.c
r666 r677 101 101 102 102 #ifdef LIBCACA 103 qq = cucul_ init(80, 32);103 qq = cucul_create(80, 32); 104 104 if (!qq) 105 105 { … … 154 154 #ifdef LIBCACA 155 155 caca_detach(kk); 156 cucul_ end(qq);156 cucul_free(qq); 157 157 #else 158 158 aa_close (context); -
libcaca/trunk/src/cacaball.c
r666 r677 54 54 double frameOffset80[360]; 55 55 56 qq = cucul_ init(0, 0);56 qq = cucul_create(0, 0); 57 57 if(!qq) 58 58 return 1; … … 160 160 cucul_free_bitmap(cucul_bitmap); 161 161 caca_detach(kk); 162 cucul_ end(qq);162 cucul_free(qq); 163 163 164 164 return 0; -
libcaca/trunk/src/cacamoir.c
r666 r677 43 43 int i, x, y, frame = 0, pause = 0; 44 44 45 qq = cucul_ init(0, 0);45 qq = cucul_create(0, 0); 46 46 if(!qq) 47 47 return 1; … … 112 112 cucul_free_bitmap(bitmap); 113 113 caca_detach(kk); 114 cucul_ end(qq);114 cucul_free(qq); 115 115 116 116 return 0; -
libcaca/trunk/src/cacaplas.c
r666 r677 46 46 int i, x, y, frame = 0, pause = 0; 47 47 48 qq = cucul_ init(0, 0);48 qq = cucul_create(0, 0); 49 49 if(!qq) 50 50 return 1; … … 124 124 cucul_free_bitmap(bitmap); 125 125 caca_detach(kk); 126 cucul_ end(qq);126 cucul_free(qq); 127 127 128 128 return 0; -
libcaca/trunk/src/cacaview.c
r666 r677 89 89 90 90 /* Initialise libcucul */ 91 qq = cucul_ init(0, 0);91 qq = cucul_create(0, 0); 92 92 if(!qq) 93 93 { … … 422 422 unload_image(); 423 423 caca_detach(kk); 424 cucul_ end(qq);424 cucul_free(qq); 425 425 426 426 return 0; -
libcaca/trunk/test/colors.c
r665 r677 27 27 int i, j; 28 28 29 qq = cucul_ init(0, 0);29 qq = cucul_create(0, 0); 30 30 if(!qq) 31 31 return 1; … … 53 53 54 54 caca_detach(kk); 55 cucul_ end(qq);55 cucul_free(qq); 56 56 57 57 return 0; -
libcaca/trunk/test/demo.c
r666 r677 46 46 int quit = 0; 47 47 48 qq = cucul_ init(0, 0);48 qq = cucul_create(0, 0); 49 49 if(!qq) 50 50 return 1; … … 176 176 cucul_free_sprite(sprite); 177 177 caca_detach(kk); 178 cucul_ end(qq);178 cucul_free(qq); 179 179 180 180 return 0; -
libcaca/trunk/test/dithering.c
r665 r677 40 40 int x, y; 41 41 42 qq = cucul_ init(0, 0);42 qq = cucul_create(0, 0); 43 43 kk = caca_attach(qq); 44 44 … … 127 127 128 128 caca_detach(kk); 129 cucul_ end(qq);129 cucul_free(qq); 130 130 131 131 return 0; -
libcaca/trunk/test/event.c
r665 r677 31 31 int i, h, quit; 32 32 33 qq = cucul_ init(0, 0);33 qq = cucul_create(0, 0); 34 34 if(!qq) 35 35 return 1; … … 101 101 /* Clean up */ 102 102 caca_detach(kk); 103 cucul_ end(qq);103 cucul_free(qq); 104 104 105 105 return 0; -
libcaca/trunk/test/export.c
r667 r677 67 67 } 68 68 69 qq = cucul_ init(0, 0);69 qq = cucul_create(0, 0); 70 70 cucul_set_size(qq, WIDTH, HEIGHT); 71 71 … … 103 103 cucul_free_export(buffer); 104 104 105 cucul_ end(qq);105 cucul_free(qq); 106 106 107 107 return 0; -
libcaca/trunk/test/gamma.c
r670 r677 40 40 int x; 41 41 42 qq = cucul_ init(0, 0);42 qq = cucul_create(0, 0); 43 43 kk = caca_attach(qq); 44 44 45 gg = cucul_ init(cucul_get_width(qq), cucul_get_height(qq));46 mask = cucul_ init(cucul_get_width(qq), cucul_get_height(qq));45 gg = cucul_create(cucul_get_width(qq), cucul_get_height(qq)); 46 mask = cucul_create(cucul_get_width(qq), cucul_get_height(qq)); 47 47 48 48 for(x = 0; x < 256; x++) … … 112 112 113 113 caca_detach(kk); 114 cucul_ end(qq);114 cucul_free(qq); 115 115 116 116 return 0; -
libcaca/trunk/test/hsv.c
r666 r677 35 35 int x, y; 36 36 37 qq = cucul_ init(0, 0);37 qq = cucul_create(0, 0); 38 38 kk = caca_attach(qq); 39 39 … … 56 56 57 57 caca_detach(kk); 58 cucul_ end(qq);58 cucul_free(qq); 59 59 60 60 return 0; -
libcaca/trunk/test/spritedit.c
r665 r677 34 34 } 35 35 36 qq = cucul_ init(0, 0);36 qq = cucul_create(0, 0); 37 37 if(!qq) 38 38 return 1; … … 46 46 { 47 47 caca_detach(kk); 48 cucul_ end(qq);48 cucul_free(qq); 49 49 fprintf(stderr, "%s: could not open `%s'.\n", argv[0], argv[1]); 50 50 return 1; … … 114 114 /* Clean up */ 115 115 caca_detach(kk); 116 cucul_ end(qq);116 cucul_free(qq); 117 117 118 118 return 0; -
libcaca/trunk/test/transform.c
r675 r677 54 54 int i; 55 55 56 qq = cucul_ init(0, 0);56 qq = cucul_create(0, 0); 57 57 kk = caca_attach(qq); 58 58 59 normal = cucul_ init(70, 6);60 flip = cucul_ init(70, 6);61 flop = cucul_ init(70, 6);62 rotate = cucul_ init(70, 6);59 normal = cucul_create(70, 6); 60 flip = cucul_create(70, 6); 61 flop = cucul_create(70, 6); 62 rotate = cucul_create(70, 6); 63 63 64 64 cucul_set_color(normal, CUCUL_COLOR_LIGHTMAGENTA, CUCUL_COLOR_BLACK); … … 111 111 112 112 caca_detach(kk); 113 cucul_end(qq); 113 cucul_free(rotate); 114 cucul_free(flop); 115 cucul_free(flip); 116 cucul_free(normal); 117 cucul_free(qq); 114 118 115 119 return 0; -
libcaca/trunk/test/unicode.c
r665 r677 30 30 caca_t *kk; 31 31 32 qq = cucul_ init(0, 0);32 qq = cucul_create(0, 0); 33 33 kk = caca_attach(qq); 34 34 … … 90 90 91 91 caca_detach(kk); 92 cucul_ end(qq);92 cucul_free(qq); 93 93 94 94 return 0;
Note: See TracChangeset
for help on using the changeset viewer.