#! /bin/sh /usr/share/dpatch/dpatch-run
## add_help.diff by  <marmodoro a t libero dot it>
## 
## This shows, among the rest, an option allowing for a crude yet functional 
## integratation of Kphone with the Kaddressbook "dial" feature, by
## specifying under:
## "Settings"->"General"->"Script-Hooks"->"Phone"
## the string: 
## 		"kphone -d %N
##
## DP: Add CLI options description

@DPATCH@
--- kphone/main.cpp.orig	2007-10-28 13:38:38.000000000 +0100
+++ kphone/main.cpp	2007-10-28 13:37:21.000000000 +0100
@@ -25,7 +25,16 @@
 	a.installTranslator( &myapp );
 	
 	for ( int i = 0; i < a.argc(); i++ ) {
-		if( QString( a.argv()[i] ) == "-u" ) {
+		if( QString( a.argv()[i] ) == "-h" || QString( a.argv()[i] ) == "--help" ) {
+			printf("Usage: kphone [OPTIONS]\n");
+			printf("  -h, --help   this help\n");
+			printf("  -u username  connect as a specified user\n");
+			printf("  -p port      use a specified port\n");
+			printf("  -l           enforce loose routing\n");
+			printf("  -s           enforce strict routing\n");
+			printf("  -d number    connect and dial a specified number\n");
+			exit(0);
+		} else if( QString( a.argv()[i] ) == "-u" ) {
 			if( i+1 < a.argc() ) {
 				user = QString( a.argv()[++i] );
 			}
