Blob Blame History Raw
From 986bb70d9b5fad68752dd5851419d06cef952519 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <bjoern.esser@gmail.com>
Date: Fri, 5 Dec 2014 10:53:56 +0100
Subject: [PATCH] add manpage

---
 Makefile         | 19 +++++++++---
 man/2048.1       | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/2048.1.txt   | 62 ++++++++++++++++++++++++++++++++++++++
 man/2048nc.1     | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++
 man/2048nc.1.txt | 58 +++++++++++++++++++++++++++++++++++
 5 files changed, 309 insertions(+), 4 deletions(-)
 create mode 100644 man/2048.1
 create mode 100644 man/2048.1.txt
 create mode 100644 man/2048nc.1
 create mode 100644 man/2048nc.1.txt

diff --git a/Makefile b/Makefile
index 4a0378b..4ba965f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
-CC	   ?= gcc
-CFLAGS += -Wall -Wextra
-LIBS	= -lcurses
+ASCIIDOC ?= a2x
+CC       ?= gcc
+CFLAGS   := -Wall -Wextra $(CFLAGS)
+LIBS      = -lcurses
 
-all: 2048
+.PHONY: clean man man-nc
 
 2048: src/2048.c
 	$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) src/2048.c -o 2048
@@ -10,5 +11,15 @@ all: 2048
 2048nc: src/2048.c
 	$(CC) -DNO_CURSES=1 $(CFLAGS) $(LDFLAGS) src/2048.c -o 2048nc
 
+all: 2048
+
 clean:
 	rm -f 2048 2048nc
+
+man:
+	rm -f man/2048.1
+	$(ASCIIDOC) -d manpage -f manpage man/2048.1.txt
+
+man-nc:
+	rm -f man/2048nc.1
+	$(ASCIIDOC) -d manpage -f manpage man/2048nc.1.txt
diff --git a/man/2048.1 b/man/2048.1
new file mode 100644
index 0000000..e1448f5
--- /dev/null
+++ b/man/2048.1
@@ -0,0 +1,92 @@
+'\" t
+.\"     Title: \e20\e4\e8
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 12/05/2014
+.\"    Manual: \ \&
+.\"    Source: \ \&
+.\"  Language: English
+.\"
+.TH "\E20\E4\E8" "1" "12/05/2014" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+2048 \- The game 2048 for your Linux terminal
+.SH "SYNOPSIS"
+.sp
+\fB2048\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+A cli version of the game 2048 for your Linux terminal\&.
+.SH "OPTIONS"
+.PP
+\fB\-s\fR \fIsize\fR
+.RS 4
+Set the grid border length to
+\fIsize\fR\&.
+.RE
+.PP
+\fB\-b\fR \fIrate\fR
+.RS 4
+Set the block spawn rate to
+\fIrate\fR\&.
+.RE
+.PP
+\fB\-r\fR
+.RS 4
+Resets hiscore\&. Will prompt user\&.
+.RE
+.PP
+\fB\-c\fR
+.RS 4
+Enables color support\&.
+.RE
+.PP
+\fB\-C\fR
+.RS 4
+Disables color support\&.
+.RE
+.PP
+\fB\-h\fR
+.RS 4
+Display usage information\&.
+.RE
+.SH "CONTROLS"
+.PP
+\fBhjkl or *wasd\fR or \fBarrow keys\fR
+.RS 4
+Movement
+.RE
+.PP
+\fBq\fR
+.RS 4
+Quit the game\&.
+.RE
+.SH "AUTHOR"
+.sp
+2048 was originally written by Thiehuis\&. Some people have contributed to it\&.
+.sp
+This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&.
+.SH "RESOURCES"
+.sp
+github: https://github\&.com/Tiehuis/2048\-cli/
+.SH "COPYING"
+.sp
+Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&.
diff --git a/man/2048.1.txt b/man/2048.1.txt
new file mode 100644
index 0000000..50754fe
--- /dev/null
+++ b/man/2048.1.txt
@@ -0,0 +1,62 @@
+\20\4\8(1)
+===========
+:doctype: manpage
+
+
+NAME
+----
+2048 - The game 2048 for your Linux terminal
+
+
+SYNOPSIS
+--------
+*2048* ['OPTIONS']
+
+
+DESCRIPTION
+-----------
+A cli version of the game 2048 for your Linux terminal.
+
+
+OPTIONS
+-------
+*-s* 'size'::
+    Set the grid border length to 'size'.
+*-b* 'rate'::
+    Set the block spawn rate to 'rate'.
+*-r*::
+    Resets hiscore.  Will prompt user.
+*-c*::
+    Enables color support.
+*-C*::
+    Disables color support.
+*-h*::
+    Display usage information.
+
+
+CONTROLS
+--------
+*hjkl or *wasd* or *arrow keys*::
+    Movement
+*q*::
+    Quit the game.
+
+
+AUTHOR
+------
+2048 was originally written by Thiehuis.  Some people have
+contributed to it.
+
+This manpage is Copyright \(C) 2014 Björn Esser and licensed
+under the terms of the MIT License (MIT).
+
+
+RESOURCES
+---------
+github:  <https://github.com/Tiehuis/2048-cli/>
+
+
+COPYING
+-------
+Copyright \(C) 2014 Tiehuis.  Free use of this software is
+granted under the terms of the MIT License (MIT).
diff --git a/man/2048nc.1 b/man/2048nc.1
new file mode 100644
index 0000000..d0151de
--- /dev/null
+++ b/man/2048nc.1
@@ -0,0 +1,82 @@
+'\" t
+.\"     Title: \e20\e4\e8nc
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 12/05/2014
+.\"    Manual: \ \&
+.\"    Source: \ \&
+.\"  Language: English
+.\"
+.TH "\E20\E4\E8NC" "1" "12/05/2014" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+2048nc \- The game 2048 for your Linux terminal
+.SH "SYNOPSIS"
+.sp
+\fB2048nc\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+A non\-ncurses cli version of the game 2048 for your Linux terminal\&.
+.SH "OPTIONS"
+.PP
+\fB\-s\fR \fIsize\fR
+.RS 4
+Set the grid border length to
+\fIsize\fR\&.
+.RE
+.PP
+\fB\-b\fR \fIrate\fR
+.RS 4
+Set the block spawn rate to
+\fIrate\fR\&.
+.RE
+.PP
+\fB\-r\fR
+.RS 4
+Resets hiscore\&. Will prompt user\&.
+.RE
+.PP
+\fB\-h\fR
+.RS 4
+Display usage information\&.
+.RE
+.SH "CONTROLS"
+.PP
+\fBhjkl\fR or \fBwasd\fR
+.RS 4
+Movement
+.RE
+.PP
+\fBq\fR
+.RS 4
+Quit the game\&.
+.RE
+.SH "AUTHOR"
+.sp
+2048nc was originally written by Thiehuis\&. Some people have contributed to it\&.
+.sp
+This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&.
+.SH "RESOURCES"
+.sp
+github: https://github\&.com/Tiehuis/2048\-cli/
+.SH "COPYING"
+.sp
+Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&.
diff --git a/man/2048nc.1.txt b/man/2048nc.1.txt
new file mode 100644
index 0000000..a961892
--- /dev/null
+++ b/man/2048nc.1.txt
@@ -0,0 +1,58 @@
+\20\4\8nc(1)
+===========
+:doctype: manpage
+
+
+NAME
+----
+2048nc - The game 2048 for your Linux terminal
+
+
+SYNOPSIS
+--------
+*2048nc* ['OPTIONS']
+
+
+DESCRIPTION
+-----------
+A non-ncurses cli version of the game 2048 for your Linux terminal.
+
+
+OPTIONS
+-------
+*-s* 'size'::
+    Set the grid border length to 'size'.
+*-b* 'rate'::
+    Set the block spawn rate to 'rate'.
+*-r*::
+    Resets hiscore.  Will prompt user.
+*-h*::
+    Display usage information.
+
+
+CONTROLS
+--------
+*hjkl* or *wasd*::
+    Movement
+*q*::
+    Quit the game.
+
+
+AUTHOR
+------
+2048nc was originally written by Thiehuis.  Some people have
+contributed to it.
+
+This manpage is Copyright \(C) 2014 Björn Esser and licensed
+under the terms of the MIT License (MIT).
+
+
+RESOURCES
+---------
+github:  <https://github.com/Tiehuis/2048-cli/>
+
+
+COPYING
+-------
+Copyright \(C) 2014 Tiehuis.  Free use of this software is
+granted under the terms of the MIT License (MIT).