Ignore:
Timestamp:
Jul 26, 2013, 11:33:55 AM (6 years ago)
Author:
sven
Message:

PaperTape Restauration: Fixed various bugs to bring back Web and visualisation CLI application:

  • Documentation: Fixed Links and added "Page superseded" box
  • Web-Frontend: Replaced buggy no-more-working-in-modern-browsers JavaScript ajax-POST-library by contemporary jquery
  • Visualisator: lochstreifen.c and cli.c, Makefile: Fixed bugs for modern compiler warnings. Now again the code compiles and works.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • paper-tape-project/trunk/visualisator/cli.c

    r18 r73  
    249249        int x, color;          // iterators
    250250        long color_value[4]; // interpreted numbers
    251         char *buf = "xy";       // Buffer for strtol <- one color value
    252        
     251        char buf[3] = "xy";       // Buffer for strtol <- one color value
     252
    253253        // remove a "#" char if present
    254254        if(string[0] == '#')
     
    260260                // copy the current character to buffer, first position
    261261                buf[0] = string[x];
     262
    262263                // if short notation (shorter than AABBCC), dublicate
    263264                // current character to buffer second position, else
     
    267268                color_value[color] = strtol(buf, NULL, 16);
    268269        }
    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
    273274        return cairo_pattern_create_rgba(
    274275                (double) color_value[0] / (double) 0xFF,
     
    415416        }
    416417       
    417         lochstreifen_print_debug(l);
    418         exit(0);
     418        if(verbosity!=0)
     419                lochstreifen_print_debug(l);
    419420
    420421        // setting up the surface and painting...
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License