summaryrefslogtreecommitdiff
path: root/meme/meme.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-02-14 02:12:42 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-02-14 02:13:28 (GMT)
commitfd505de82aa73c850d7b122dc3c9f7829995ad9c (patch)
tree26c825b2c209918c758a7dee1fa7a29e1b6195bb /meme/meme.c
parent32f2b42c5055e0783ad3c076a1bdb9d6abcb5b28 (diff)
downloadmisc-fd505de82aa73c850d7b122dc3c9f7829995ad9c.zip
misc-fd505de82aa73c850d7b122dc3c9f7829995ad9c.tar.gz
misc-fd505de82aa73c850d7b122dc3c9f7829995ad9c.tar.bz2
meme/: add screen dumps with "D"; option "-d dump.bmp" to set dump name
Diffstat (limited to 'meme/meme.c')
-rw-r--r--meme/meme.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/meme/meme.c b/meme/meme.c
index 57e906a..3bb7b80 100644
--- a/meme/meme.c
+++ b/meme/meme.c
@@ -1,8 +1,8 @@
/*
* meme.c - Measmesh command-line processing and setup
*
- * Written 2014-2015 by Werner Almesberger
- * Copyright 2014-2015 by Werner Almesberger
+ * Written 2014-2016 by Werner Almesberger
+ * Copyright 2014-2016 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
#include "time.h"
#include "mesh.h"
#include "stl.h"
+#include "screen.h"
#include "overlay.h"
#include "slice.h"
#include "gui.h"
@@ -63,7 +64,7 @@ static void overlay_xform(float x, float y, float *res_x, float *res_y)
static void usage(const char *name)
{
fprintf(stderr,
-"usage: %s [-l logfile] [-o overlay.gp ...] [file.stl]\n"
+"usage: %s [-d dump.bmp] [-l logfile] [-o overlay.gp ...] [file.stl]\n"
" %s -s plane.gp [-n] [file.stl]\n",
name, name);
exit(1);
@@ -80,8 +81,11 @@ int main(int argc, char **argv)
unsigned n_overlays = 0;
struct time t_load;
- while ((c = getopt(argc, argv, "l:no:s:")) != EOF)
+ while ((c = getopt(argc, argv, "d:l:no:s:")) != EOF)
switch (c) {
+ case 'd':
+ screen_dump_name = optarg;
+ break;
case 'l':
logfile = optarg;
break;