aboutsummaryrefslogtreecommitdiffstats
path: root/lcd4linux.c
diff options
context:
space:
mode:
authorreinelt <>2000-04-03 04:46:38 +0000
committerreinelt <>2000-04-03 04:46:38 +0000
commit57b2e93b83971a0b130a7d330386c70291628862 (patch)
tree117b7a322b580778cd8e00d9403759e769815399 /lcd4linux.c
parentf74bc8f6b3ab97b0be384a219239201ccba7037d (diff)
downloadlcd4linux-57b2e93b83971a0b130a7d330386c70291628862.tar.gz
[lcd4linux @ 2000-04-03 04:46:38 by reinelt]
added '-c key=val' option
Diffstat (limited to '')
-rw-r--r--lcd4linux.c16
-rw-r--r--lcd4linux.conf.sample4
2 files changed, 15 insertions, 5 deletions
diff --git a/lcd4linux.c b/lcd4linux.c
index 9bbd28f..bd0fc7f 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.15 2000/04/01 22:40:42 herp Exp $
+/* $Id: lcd4linux.c,v 1.16 2000/04/03 04:46:38 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,10 @@
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.16 2000/04/03 04:46:38 reinelt
+ *
+ * added '-c key=val' option
+ *
* Revision 1.15 2000/04/01 22:40:42 herp
* geometric correction (too many pixelgaps)
* lcd4linux main should return int, not void
@@ -108,7 +112,7 @@ int tick, tack;
static void usage(void)
{
printf ("%s\n", release);
- printf ("usage: lcd4linux [-h] [-l] [-f config-file] [-o output-file]\n");
+ printf ("usage: lcd4linux [-h] [-l] [-c key=value] [-f config-file] [-o output-file]\n");
}
int main (int argc, char *argv[])
@@ -117,8 +121,14 @@ int main (int argc, char *argv[])
char *driver;
int c, smooth;
- while ((c=getopt (argc, argv, "hlf:o:"))!=EOF) {
+ while ((c=getopt (argc, argv, "c:f:hlo:"))!=EOF) {
switch (c) {
+ case 'c':
+ if (cfg_cmd (optarg)<0) {
+ fprintf (stderr, "%s: illegal argument -c %s\n", argv[0], optarg);
+ exit(2);
+ }
+ break;
case 'h':
usage();
exit(0);
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index 526f430..271ca3a 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -7,7 +7,7 @@
#size 20x4
#font 5x8
#pixel 3+0
-#gap 3x3
+#gap -1x-1
#border 10
#foreground \#102000
#halfground \#70c000
@@ -17,7 +17,7 @@ Display X11
size 20x5
font 5x8
pixel 1+0
-gap 1x1
+gap -1x-1
border 1
foreground \#102000
halfground \#90c000