[cairo-commit] svg2png/src args.c,1.2,1.3 svg2png.c,1.3,1.4
Carl Worth
commit at pdx.freedesktop.org
Fri Jun 11 05:50:01 PDT 2004
Committed by: cworth
Update of /cvs/cairo/svg2png/src
In directory pdx:/tmp/cvs-serv27401/src
Modified Files:
args.c svg2png.c
Log Message:
2004-06-11 Carl Worth <cworth at isi.edu>
* doc/svg2png.1: Update documentation for new behavior of --width
and --height.
From 2004-05-13 John Ellson <ellson at research.att.com>
* src/args.c:
* docs/svg2png.1: default input/output to '-', i.e. stdin/stdout, so
that svg2png can be use in a pipe without any args.
* src/svg2png.c: clean up unused #includes and #defines
Index: args.c
===================================================================
RCS file: /cvs/cairo/svg2png/src/args.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** args.c 4 May 2004 02:02:30 -0000 1.2
--- args.c 11 Jun 2004 12:49:59 -0000 1.3
***************
*** 42,46 ****
static const char ARGS_PROGRAM_BUG_ADDRESS[] = "<cworth at isi.edu>";
! static const char ARGS_PROGRAM_ARGDOC[] = "<SVG_file> <PNG_file>";
enum {
--- 42,46 ----
static const char ARGS_PROGRAM_BUG_ADDRESS[] = "<cworth at isi.edu>";
! static const char ARGS_PROGRAM_ARGDOC[] = "[<SVG_file> [<PNG_file>]]";
enum {
***************
*** 72,78 ****
printf ("%s - %s\n", argv0_base, ARGS_PROGRAM_DESCRIPTION);
puts ("");
! printf (" -w, --width=WIDTH\t\tWidth of output image\n");
! printf (" -h, --height=HEIGHT\t\tHeight of output image\n");
! printf (" -s, --scale=FACTOR\t\tScale image by FACTOR\n");
puts ("");
printf (" --flipx\t\tFlip X coordinates of image\n");
--- 72,78 ----
printf ("%s - %s\n", argv0_base, ARGS_PROGRAM_DESCRIPTION);
puts ("");
! printf (" -w, --width=WIDTH\tWidth of output image in pixels\n");
! printf (" -h, --height=HEIGHT\tHeight of output image in pixels\n");
! printf (" -s, --scale=FACTOR\tScale image by FACTOR\n");
puts ("");
printf (" --flipx\t\tFlip X coordinates of image\n");
***************
*** 102,107 ****
int c;
! args->svg_filename = NULL;
! args->png_filename = NULL;
args->scale = 1.0;
--- 102,107 ----
int c;
! args->svg_filename = "-";
! args->png_filename = "-";
args->scale = 1.0;
***************
*** 151,160 ****
}
! if (argc - optind == 2) {
args->svg_filename = argv[optind++];
! args->png_filename = argv[optind];
! } else {
! args_usage (argv[0]);
! exit (1);
}
--- 151,163 ----
}
! if (argc - optind >= 1) {
args->svg_filename = argv[optind++];
! if (argc - optind >= 1) {
! args->png_filename = argv[optind++];
! if (argc - optind > 0) {
! args_usage (argv[0]);
! exit (1);
! }
! }
}
Index: svg2png.c
===================================================================
RCS file: /cvs/cairo/svg2png/src/svg2png.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** svg2png.c 4 Jun 2004 16:10:30 -0000 1.3
--- svg2png.c 11 Jun 2004 12:49:59 -0000 1.4
***************
*** 29,35 ****
#include <stdio.h>
#include <stdlib.h>
- #include <unistd.h>
- #include <sys/time.h>
- #include <time.h>
#include <png.h>
#include <errno.h>
--- 29,32 ----
***************
*** 39,45 ****
#include "args.h"
- #define SHIFT 10
-
- #define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0]))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
--- 36,39 ----
More information about the cairo-commit
mailing list