From 0079fb16e4f69a94c01b0eb1a455fd80f78243ab Mon Sep 17 00:00:00 2001 From: Philip Allison Date: Sun, 4 May 2008 04:03:36 +0100 Subject: [PATCH] Add help & version strings and bump version number to 0.2 Signed-off-by: Philip Allison --- configure.ac | 2 +- src/cteddy.cxx | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 46a05a7..319cc6c 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_PREREQ([2.59]) dnl # Initialise autoconf and automake dnl # Also specify automake version requirements (again, the version used dnl # development will suffice for now). -AC_INIT([cteddy], [0.1], [sane@not.co.uk]) +AC_INIT([cteddy], [0.2], [sane@not.co.uk]) AC_CONFIG_SRCDIR([src/cteddy.cxx]) AM_INIT_AUTOMAKE([1.8.5]) diff --git a/src/cteddy.cxx b/src/cteddy.cxx index 6203609..ad02800 100644 --- a/src/cteddy.cxx +++ b/src/cteddy.cxx @@ -416,6 +416,29 @@ int main (int argc, char* argv[]) else if (strncmp(argv[i], "-smcid", 6) == 0) oldsmcid = argv[i] + 6; #endif + else if (strncmp(argv[i], "-h", 2) == 0 || strncmp(argv[i], "--help", 6) == 0) + { + std::cout << "Usage: cteddy [options]" << std::endl << std::endl; + std::cout << "-F" << std::endl; + std::cout << "\tDisplay an image other than xteddy" << std::endl; + std::cout << "-float" << std::endl; + std::cout << "\tFloat above other windows" << std::endl; + std::cout << "-stick" << std::endl; + std::cout << "\tStick to all desktops" << std::endl; + std::cout << "-noquit" << std::endl; + std::cout << "\tDisable the 'q' quit keybinding" << std::endl; + std::cout << "-nosm" << std::endl; + std::cout << "\tDisable session management support" << std::endl; + std::cout << "-nobg" << std::endl; + std::cout << "\tDo not detach from terminal (implies -nosm)" << std::endl; + return 0; + } + else if (strncmp(argv[i], "-v", 2) == 0 || strncmp(argv[i], "--version", 9) == 0) + { + std::cout << PACKAGE_STRING << std::endl << std::endl; + std::cout << "Build options: " << CONFIGURE_OPTS << std::endl; + return 0; + } else std::cerr << "Unrecognised option: " << argv[i] << std::endl; } -- 2.11.4.GIT