From eab913a16cf085849e362a5050de52245d51fd0d Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 13:44:51 -0800 Subject: fix install(1) invocation install -D has to be passed the full destination path, including the filename. Previously it was installing a binary called 'bin' into /usr/local. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e3a5dd..d39012e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ test/test: test/test.o $(filter-out src/main.o src/xlib.o, $(OBJFILES)) $(CC) $(CFLAGS) -MMD -MP -MT "$*.d" -c -o $@ $< install: - install -Dm 755 meh $(BINDIR) + install -Dm 755 meh $(BINDIR)/meh # Clean clean: -- cgit v1.2.3 From 43453108a6d53ecf724665ee5c353d2028f6021d Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 13:47:10 -0800 Subject: support DESTDIR in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d39012e..3b9a105 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ test/test: test/test.o $(filter-out src/main.o src/xlib.o, $(OBJFILES)) $(CC) $(CFLAGS) -MMD -MP -MT "$*.d" -c -o $@ $< install: - install -Dm 755 meh $(BINDIR)/meh + install -Dm 755 meh $(DESTDIR)$(BINDIR)/meh # Clean clean: -- cgit v1.2.3 From b08a8c02fbcb63712593fb3446b225c062b81d6a Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 13:51:24 -0800 Subject: check return value of XOpenDisplay before using --- src/xlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xlib.c b/src/xlib.c index fc6895d..2912321 100644 --- a/src/xlib.c +++ b/src/xlib.c @@ -173,8 +173,8 @@ static int xquit(Display *d){ void backend_init(){ display = XOpenDisplay (NULL); - xfd = ConnectionNumber(display); assert(display); + xfd = ConnectionNumber(display); screen = DefaultScreen(display); window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 640, 480, 0, DefaultDepth(display, screen), InputOutput, CopyFromParent, 0, NULL); -- cgit v1.2.3 From 9f29d8c21dea7357c63b2d2065fc11224ec45a51 Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 14:50:14 -0800 Subject: add a manpage --- doc/meh.1 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/meh.1 diff --git a/doc/meh.1 b/doc/meh.1 new file mode 100644 index 0000000..5d5ba85 --- /dev/null +++ b/doc/meh.1 @@ -0,0 +1,35 @@ +.TH MEH 1 "2013-12-28" +.SH NAME +meh \- simple, minimalist, super fast image viewer +.SH SYNOPSIS +.B meh +.IR FILE ... +.br +.B meh \-list +.RI [ LISTFILE ] +.br +.B meh \-ctl +.br +.B meh \-v +.SH DESCRIPTION +.B meh +is a small, simple, super fast image viewer using raw XLib. +It is similar to +.BR feh (1), +but faster and simpler. +.LP +.B meh +can use ImageMagick's +.BR convert (1) +to view almost 200 file formats, though it is slower for these formats. +Built-in formats are JPEG, PNG, BMP, and netpbm. +.SH OPTIONS +.TP +.BR \-list \ [\fILISTFILE\fR] +Treat \fILISTFILE\fR as list of images. Defaults to stdin. +.TP +.B \-ctl +Display files as they are received on stdin. +.TP +.B \-v +Print version and exit. -- cgit v1.2.3 From ca40c3725d622270640b3121642cb5febc4e0e87 Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 14:59:38 -0800 Subject: install the man page --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 3b9a105..40fed53 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ CLEANFILES := $(CLEANFILES) $(DEPFILES) $(OBJFILES) test/test.o test/test.d test LIBS ?= -lX11 -lXext -ljpeg -lpng -lgif PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin +DATAROOTDIR = $(PREFIX)/share +MANDIR = $(DATAROOTDIR)/man # User configuration CONFIG ?= ../config @@ -33,6 +35,7 @@ test/test: test/test.o $(filter-out src/main.o src/xlib.o, $(OBJFILES)) install: install -Dm 755 meh $(DESTDIR)$(BINDIR)/meh + install -D doc/meh.1 $(DESTDIR)$(MANDIR)/man1/meh.1 # Clean clean: -- cgit v1.2.3