Changeset 3347


Ignore:
Timestamp:
Jan 13, 2009, 11:29:29 AM (12 years ago)
Author:
Sam Hocevar
Message:

storyboard.c: tuned the output file name.
examples/.gitignore: ignore storyboard.

Location:
libpipi/trunk/examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/examples/.gitignore

    r2936 r3347  
    77line
    88sharpen
     9storyboard
    910*.exe
  • libpipi/trunk/examples/storyboard.c

    r3345 r3347  
    5151        return EXIT_FAILURE;
    5252
    53     strcpy(fmtstr, argv[1]);
     53    parser = strrchr(argv[1], '/');
     54    strcpy(fmtstr, parser ? parser : argv[1]);
    5455    parser = strrchr(fmtstr, '.');
    5556    if(parser)
    56         strcpy(parser, "%03i.jpeg");
    57     else
    58         strcat(fmtstr, "%03i.jpeg");
     57        *parser = '\0';
     58    strcat(fmtstr, ".%03i.jpeg");
    5959
    6060    image = pipi_new(TWIDTH * TCOLS, THEIGHT * TROWS);
Note: See TracChangeset for help on using the changeset viewer.