Changeset 73 in projects for paper-tape-project/trunk/visualisator/cli.c
- Timestamp:
- Jul 26, 2013, 11:33:55 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
paper-tape-project/trunk/visualisator/cli.c
r18 r73 249 249 int x, color; // iterators 250 250 long color_value[4]; // interpreted numbers 251 char *buf= "xy"; // Buffer for strtol <- one color value252 251 char buf[3] = "xy"; // Buffer for strtol <- one color value 252 253 253 // remove a "#" char if present 254 254 if(string[0] == '#') … … 260 260 // copy the current character to buffer, first position 261 261 buf[0] = string[x]; 262 262 263 // if short notation (shorter than AABBCC), dublicate 263 264 // current character to buffer second position, else … … 267 268 color_value[color] = strtol(buf, NULL, 16); 268 269 } 269 270 DPRINTF("Allocating '%s' as #% x%x%x%x\n", string,271 color_value[0], color_value[1], color_value[2], (color == 4) ?color_value[3] : 0xFF);272 270 271 DPRINTF("Allocating '%s' as #%02x%02x%02x%02x\n", string, 272 (unsigned int) color_value[0], (unsigned int) color_value[1], (unsigned int)color_value[2], (color == 4) ? (unsigned int) color_value[3] : 0xFF); 273 273 274 return cairo_pattern_create_rgba( 274 275 (double) color_value[0] / (double) 0xFF, … … 415 416 } 416 417 417 lochstreifen_print_debug(l);418 exit(0);418 if(verbosity!=0) 419 lochstreifen_print_debug(l); 419 420 420 421 // setting up the surface and painting...
Note: See TracChangeset
for help on using the changeset viewer.