Changeset 305
- Timestamp:
- Jan 2, 2004, 5:52:10 PM (19 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/examples/aafire.c
r304 r305 51 51 static unsigned int table[MAXTABLE]; 52 52 #ifdef LIBCACA 53 const static int pal[] =53 static int const pal[] = 54 54 #else 55 55 __AA_CONST static int pal[] = -
libcaca/trunk/examples/cacaview.c
r302 r305 43 43 44 44 /* Local functions */ 45 static void load_image(c onst char*);45 static void load_image(char const *); 46 46 static void unload_image(void); 47 47 static void draw_checkers(unsigned int, unsigned int, … … 406 406 } 407 407 408 static void load_image(c onst char*name)408 static void load_image(char const *name) 409 409 { 410 410 #if defined(HAVE_IMLIB2_H) -
libcaca/trunk/src/bitmap.c
r298 r305 59 59 static void mask2shift(unsigned int, int *, int *); 60 60 61 static void get_rgba_default( const struct caca_bitmap*, uint8_t *, int, int,61 static void get_rgba_default(struct caca_bitmap const *, uint8_t *, int, int, 62 62 unsigned int *, unsigned int *, unsigned int *, 63 63 unsigned int *); … … 242 242 } 243 243 244 static void get_rgba_default( const struct caca_bitmap*bitmap, uint8_t *pixels,244 static void get_rgba_default(struct caca_bitmap const *bitmap, uint8_t *pixels, 245 245 int x, int y, unsigned int *r, unsigned int *g, 246 246 unsigned int *b, unsigned int *a) … … 261 261 #else 262 262 /* This is compile-time optimised with at least -O1 or -Os */ 263 const uint32_t rmask = 0x12345678;264 if(*( const uint8_t *)&rmask == 0x12)263 uint32_t const rmask = 0x12345678; 264 if(*(uint8_t const *)&rmask == 0x12) 265 265 #endif 266 266 bits = ((uint32_t)pixels[0] << 16) | … … 340 340 */ 341 341 void caca_draw_bitmap(int x1, int y1, int x2, int y2, 342 const struct caca_bitmap*bitmap, void *pixels)342 struct caca_bitmap const *bitmap, void *pixels) 343 343 { 344 344 /* Current dithering method */ … … 348 348 349 349 /* Only used when background is black */ 350 static const int white_colors[] =350 static int const white_colors[] = 351 351 { 352 352 CACA_COLOR_BLACK, … … 356 356 }; 357 357 358 static const int light_colors[] =358 static int const light_colors[] = 359 359 { 360 360 CACA_COLOR_LIGHTMAGENTA, … … 367 367 }; 368 368 369 static const int dark_colors[] =369 static int const dark_colors[] = 370 370 { 371 371 CACA_COLOR_MAGENTA, … … 380 380 /* FIXME: choose better characters! */ 381 381 # define DENSITY_CHARS 13 382 static c onst chardensity_chars[] =382 static char const density_chars[] = 383 383 " " 384 384 ". " -
libcaca/trunk/src/caca.c
r300 r305 189 189 * \return A static string containing the colour's name. 190 190 */ 191 c onst char*caca_get_color_name(enum caca_color color)192 { 193 static c onst char*color_names[] =191 char const *caca_get_color_name(enum caca_color color) 192 { 193 static char const *color_names[] = 194 194 { 195 195 "black", … … 292 292 * \return A static string containing the feature's name. 293 293 */ 294 c onst char*caca_get_feature_name(enum caca_feature feature)294 char const *caca_get_feature_name(enum caca_feature feature) 295 295 { 296 296 switch(feature) -
libcaca/trunk/src/caca.h
r298 r305 223 223 enum caca_feature caca_get_feature(enum caca_feature); 224 224 void caca_set_feature(enum caca_feature); 225 c onst char*caca_get_feature_name(enum caca_feature);225 char const *caca_get_feature_name(enum caca_feature); 226 226 unsigned int caca_get_rendertime(void); 227 227 unsigned int caca_get_width(void); … … 249 249 enum caca_color caca_get_fg_color(void); 250 250 enum caca_color caca_get_bg_color(void); 251 c onst char*caca_get_color_name(enum caca_color);251 char const *caca_get_color_name(enum caca_color); 252 252 void caca_putchar(int, int, char); 253 void caca_putstr(int, int, c onst char*);254 void caca_printf(int, int, c onst char*, ...);253 void caca_putstr(int, int, char const *); 254 void caca_printf(int, int, char const *, ...); 255 255 void caca_clear(void); 256 256 /* @} */ … … 263 263 * @{ */ 264 264 void caca_draw_line(int, int, int, int, char); 265 void caca_draw_polyline( const int x[], const int y[], int, char);265 void caca_draw_polyline(int const x[], int const y[], int, char); 266 266 void caca_draw_thin_line(int, int, int, int); 267 void caca_draw_thin_polyline( const int x[], const int y[], int);267 void caca_draw_thin_polyline(int const x[], int const y[], int); 268 268 269 269 void caca_draw_circle(int, int, int, char); … … 297 297 * @{ */ 298 298 struct caca_sprite; 299 struct caca_sprite * caca_load_sprite(c onst char*);300 int caca_get_sprite_frames( const struct caca_sprite*);301 int caca_get_sprite_width( const struct caca_sprite*, int);302 int caca_get_sprite_height( const struct caca_sprite*, int);303 int caca_get_sprite_dx( const struct caca_sprite*, int);304 int caca_get_sprite_dy( const struct caca_sprite*, int);305 void caca_draw_sprite(int, int, const struct caca_sprite*, int);299 struct caca_sprite * caca_load_sprite(char const *); 300 int caca_get_sprite_frames(struct caca_sprite const *); 301 int caca_get_sprite_width(struct caca_sprite const *, int); 302 int caca_get_sprite_height(struct caca_sprite const *, int); 303 int caca_get_sprite_dx(struct caca_sprite const *, int); 304 int caca_get_sprite_dy(struct caca_sprite const *, int); 305 void caca_draw_sprite(int, int, struct caca_sprite const *, int); 306 306 void caca_free_sprite(struct caca_sprite *); 307 307 /* @} */ … … 321 321 unsigned int r[], unsigned int g[], 322 322 unsigned int b[], unsigned int a[]); 323 void caca_draw_bitmap(int, int, int, int, const struct caca_bitmap*, void *);323 void caca_draw_bitmap(int, int, int, int, struct caca_bitmap const *, void *); 324 324 void caca_free_bitmap(struct caca_bitmap *); 325 325 /* @} */ -
libcaca/trunk/src/graphics.c
r303 r305 76 76 #if defined(USE_SLANG) 77 77 /* Tables generated by test/optipal.c */ 78 const static int slang_palette[2*16*16] =78 static int const slang_palette[2*16*16] = 79 79 { 80 80 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, … … 112 112 }; 113 113 114 const static int slang_assoc[16*16] =114 static int const slang_assoc[16*16] = 115 115 { 116 116 134, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, … … 337 337 * \param s The string to print. 338 338 */ 339 void caca_putstr(int x, int y, c onst char*s)339 void caca_putstr(int x, int y, char const *s) 340 340 { 341 341 #if defined(USE_CONIO) | defined(USE_X11) … … 429 429 * \param ... Arguments to the format string. 430 430 */ 431 void caca_printf(int x, int y, c onst char*format, ...)431 void caca_printf(int x, int y, char const *format, ...) 432 432 { 433 433 char tmp[BUFSIZ]; … … 603 603 XSetWindowAttributes x11_winattr; 604 604 int (*old_error_handler)(Display *, XErrorEvent *); 605 c onst char*font_name = "8x13bold";605 char const *font_name = "8x13bold"; 606 606 int i; 607 607 -
libcaca/trunk/src/line.c
r298 r305 89 89 * \return void 90 90 */ 91 void caca_draw_polyline( const int x[], const int y[], int n, char c)91 void caca_draw_polyline(int const x[], int const y[], int n, char c) 92 92 { 93 93 int i; … … 137 137 * \return void 138 138 */ 139 void caca_draw_thin_polyline( const int x[], const int y[], int n)139 void caca_draw_thin_polyline(int const x[], int const y[], int n) 140 140 { 141 141 int i; -
libcaca/trunk/src/sprite.c
r268 r305 57 57 * \return The sprite, or NULL if an error occured. 58 58 */ 59 struct caca_sprite *caca_load_sprite(c onst char*file)59 struct caca_sprite *caca_load_sprite(char const *file) 60 60 { 61 61 char buf[BUFSIZ]; … … 178 178 * \return The number of frames. 179 179 */ 180 int caca_get_sprite_frames( const struct caca_sprite*sprite)180 int caca_get_sprite_frames(struct caca_sprite const *sprite) 181 181 { 182 182 if(sprite == NULL) … … 193 193 * \return The width of the given frame of the sprite. 194 194 */ 195 int caca_get_sprite_width( const struct caca_sprite*sprite, int f)195 int caca_get_sprite_width(struct caca_sprite const *sprite, int f) 196 196 { 197 197 if(sprite == NULL) … … 211 211 * \return The height of the given frame of the sprite. 212 212 */ 213 int caca_get_sprite_height( const struct caca_sprite*sprite, int f)213 int caca_get_sprite_height(struct caca_sprite const *sprite, int f) 214 214 { 215 215 if(sprite == NULL) … … 229 229 * \return The X coordinate of the given frame's handle. 230 230 */ 231 int caca_get_sprite_dx( const struct caca_sprite*sprite, int f)231 int caca_get_sprite_dx(struct caca_sprite const *sprite, int f) 232 232 { 233 233 if(sprite == NULL) … … 247 247 * \return The Y coordinate of the given frame's handle. 248 248 */ 249 int caca_get_sprite_dy( const struct caca_sprite*sprite, int f)249 int caca_get_sprite_dy(struct caca_sprite const *sprite, int f) 250 250 { 251 251 if(sprite == NULL) … … 268 268 * \return void 269 269 */ 270 void caca_draw_sprite(int x, int y, const struct caca_sprite*sprite, int f)270 void caca_draw_sprite(int x, int y, struct caca_sprite const *sprite, int f) 271 271 { 272 272 int i, j; -
libcaca/trunk/test/optipal.c
r293 r305 35 35 36 36 /* 6 colours in hue order */ 37 static const enum caca_colorhue_list[] =37 static enum caca_color const hue_list[] = 38 38 { 39 39 CACA_COLOR_RED, … … 76 76 77 77 /* Output the palette */ 78 printf(" const static int slang_palette[2*16*16] =\n{\n");78 printf("static int const slang_palette[2*16*16] =\n{\n"); 79 79 for(i = 0; i < 16 * 16; i++) 80 80 { … … 86 86 87 87 /* Output the association table */ 88 printf(" const static int slang_assoc[16*16] =\n{\n");88 printf("static int const slang_assoc[16*16] =\n{\n"); 89 89 for(i = 0; i < 16 * 16; i++) 90 90 {
Note: See TracChangeset
for help on using the changeset viewer.