aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkraxel <kraxel>2004-12-02 12:27:11 +0000
committerkraxel <kraxel>2004-12-02 12:27:11 +0000
commit41699c6af92100078c301fe958d1da0d3ff290f5 (patch)
tree4bb6f66d47bad00bf5fb5d11d85b89f9267a074e
parent8726dfa6bc7a0c816c041eaf983cd6348bd771b2 (diff)
downloadfbida-41699c6af92100078c301fe958d1da0d3ff290f5.tar.gz
- man page spell fixes (Drew Cohan).
- make pgup + pgdown loop (Drew Cohan). - make timeout changeable on the fly.
-rw-r--r--fbi.c28
-rw-r--r--fbi.man9
2 files changed, 26 insertions, 11 deletions
diff --git a/fbi.c b/fbi.c
index f37660d..ca5ae0b 100644
--- a/fbi.c
+++ b/fbi.c
@@ -69,6 +69,7 @@
/* with arg */
#define KEY_GOTO -100
#define KEY_SCALE -101
+#define KEY_DELAY -102
/* edit */
#define KEY_DELETE -200
@@ -236,6 +237,11 @@ static struct flist* flist_first(void)
return list_entry(flist.next, struct flist, list);
}
+static struct flist* flist_last(void)
+{
+ return list_entry(flist.prev, struct flist, list);
+}
+
static struct flist* flist_next(struct flist *f, int eof, int loop)
{
if (flist_islast(f)) {
@@ -248,10 +254,13 @@ static struct flist* flist_next(struct flist *f, int eof, int loop)
return list_entry(f->list.next, struct flist, list);
}
-static struct flist* flist_prev(struct flist *f)
+static struct flist* flist_prev(struct flist *f, int loop)
{
- if (flist_isfirst(f))
+ if (flist_isfirst(f)) {
+ if (loop)
+ return flist_last();
return f;
+ }
return list_entry(f->list.prev, struct flist, list);
}
@@ -913,6 +922,8 @@ svga_show(struct ida_image *img, int timeout, char *desc, char *info, int *nr)
return KEY_GOTO;
} else if (rc == 1 && (*key == 's' || *key == 'S')) {
return KEY_SCALE;
+ } else if (rc == 1 && (*key == 'x' || *key == 'X')) {
+ return KEY_DELAY;
} else if (rc == 1 && *key >= '0' && *key <= '9') {
*nr = *nr * 10 + (*key - '0');
snprintf(linebuffer, sizeof(linebuffer), "> %d",*nr);
@@ -1277,9 +1288,9 @@ main(int argc, char *argv[])
if (editable) {
struct flist *fdel = fcurrent;
if (flist_islast(fcurrent))
- fcurrent = flist_prev(fcurrent);
+ fcurrent = flist_prev(fcurrent,0);
else
- fcurrent = flist_next(fcurrent,0,0);
+ fcurrent = flist_next(fcurrent,0,0);
unlink(fdel->name);
flist_del(fdel);
flist_renumber();
@@ -1333,13 +1344,13 @@ main(int argc, char *argv[])
break;
case KEY_PGDN:
need_read = 1;
- fcurrent = flist_next(fcurrent,0,0);
+ fcurrent = flist_next(fcurrent,0,1);
if (textreading)
show_top = 1;
break;
case KEY_PGUP:
need_read = 1;
- fcurrent = flist_prev(fcurrent);
+ fcurrent = flist_prev(fcurrent,1);
if (textreading)
show_bottom = 1;
break;
@@ -1362,7 +1373,7 @@ main(int argc, char *argv[])
} else if (key == KEY_ASCALE) {
newscale = auto_scale(fimg);
} else {
- newscale = arg / 100;
+ newscale = arg / 100.0;
}
if (newscale < 0.1)
newscale = 0.1;
@@ -1384,6 +1395,9 @@ main(int argc, char *argv[])
fcurrent = flist_goto(arg);
}
break;
+ case KEY_DELAY:
+ timeout = arg;
+ break;
case KEY_VERBOSE:
#if 0 /* fbdev testing/debugging hack */
{
diff --git a/fbi.man b/fbi.man
index 99dd0b1..854fb75 100644
--- a/fbi.man
+++ b/fbi.man
@@ -19,7 +19,7 @@ framebuffer device to use. Default is the one your vc is
mapped to.
.TP
.B -m mode
-name of the video mode to use video mode (must be listed in
+name of the video mode to use (video mode must be listed in
/etc/fb.modes). Default is not to change the video mode.
.TP
.B -v
@@ -35,7 +35,7 @@ of text is to press space...
.TP
.B -t sec
timeout: load next image after >sec< seconds without any
-keypress
+keypress (i.e. slideshow)
.TP
.B -g gamma
gamma correction. Can also be put into the FBGAMMA environment
@@ -54,6 +54,7 @@ list of known fonts on your system. The fontconfig config file is
evaluated as well, so any generic stuff defined there (such as mono,
sans) will work as well. It is recommended to use monospaced fonts,
the textboxes (help text, exif info) look better then.
+.TP
.B -a
Enable autozoom. fbi will automagically pick a reasonable zoom factor
when loading a new image.
@@ -127,7 +128,7 @@ special files to that group and put the users which are allowed to use
the framebuffer device into the group. You can also make the special
files world writable, but be aware of the security implications this
has. On a private box it might be fine to handle it this way
-througth.
+though.
.P
.B fbi
also needs access to the linux console (i.e. /dev/ttyN) for sane
@@ -140,7 +141,7 @@ fbset(1), convert(1)
.SH AUTHOR
Gerd Knorr <kraxel@bytesex.org>
.SH COPYRIGHT
-Copyright (C) 1999-2000 Gerd Knorr <kraxel@bytesex.org>
+Copyright (C) 1999-2004 Gerd Knorr <kraxel@bytesex.org>
.P
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