diff --git a/src/libptouch.c b/src/libptouch.c index d20ea5d..4310360 100644 --- a/src/libptouch.c +++ b/src/libptouch.c @@ -21,7 +21,7 @@ #include #include /* malloc() */ -#include /* memcmp() */ +#include /* memcmp() */ #include /* open() */ #include /* open() */ #include /* open() */ @@ -78,7 +78,7 @@ struct _pt_dev_info ptdevs[] = { cutting of tape, printing maximum of 73mm length) */ {0x04f9, 0x20e1, "PT-D610BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC}, //{0x04f9, 0x200d, "PT-3600", 384, 360, FLAG_RASTER_PACKBITS}, - {0x04f9, 0x20af, "PT-P710BT", 128, 180, FLAG_RASTER_PACKBITS}, + {0x04f9, 0x20af, "PT-P710BT", 128, 180, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT}, {0,0,"",0,0,0} }; diff --git a/src/ptouch-print.c b/src/ptouch-print.c index 6c382af..b05eb05 100644 --- a/src/ptouch-print.c +++ b/src/ptouch-print.c @@ -91,15 +91,15 @@ int print_img(ptouch_dev ptdev, gdImage *im, int chain) printf(_("maximum printing width for this tape is %ipx\n"), tape_width); return -1; } - //offset=64-(gdImageSY(im)/2); /* always print centered */ + //offset=64-(gdImageSY(im)/2); /* always print centered */ size_t max_pixels=ptouch_get_max_width(ptdev); - offset=((int)max_pixels / 2)-(gdImageSY(im)/2); /* always print centered */ + offset=((int)max_pixels / 2)-(gdImageSY(im)/2); /* always print centered */ printf("max_pixels=%ld, offset=%d\n", max_pixels, offset); if ((ptdev->devinfo->flags & FLAG_RASTER_PACKBITS) == FLAG_RASTER_PACKBITS) { if (debug) { printf("enable PackBits mode\n"); } - ptouch_enable_packbits(ptdev); + ptouch_enable_packbits(ptdev); } if (ptouch_rasterstart(ptdev) != 0) { printf(_("ptouch_rasterstart() failed\n")); @@ -163,7 +163,7 @@ gdImage *image_load(const char *file) } else { f = fopen(file, "rb"); } - if (f == NULL) { /* error could not open file */ + if (f == NULL) { /* error could not open file */ return NULL; } if (fseek(f, 0L, SEEK_SET)) { /* file is not seekable. eg 'stdin' */ @@ -431,6 +431,7 @@ void usage(char *progname) printf("\t--writepng \tinstead of printing, write output to png file\n"); printf("\t--force-tape-width \tSet tape width in pixels, use together with\n"); printf("\t\t\t\t--writepng without a printer connected.\n"); + printf("\t--copies \tSets the number of identical prints\n"); printf("print commands:\n"); printf("\t--image \t\tprint the given image which must be a 2 color\n"); printf("\t\t\t\t(black/white) png\n"); @@ -487,6 +488,12 @@ int parse_args(int argc, char **argv) debug=true; } else if (strcmp(&argv[i][1], "-info") == 0) { continue; /* not done here */ + } else if (strcmp(&argv[i][1], "-copies") == 0) { + if (i+1