From af277b45cb506680c19ff2d57281aece3cac632e Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Wed, 12 Jan 2000 17:19:26 +0000 Subject: [PATCH] WABA: Provide both short and long command line options. svn path=/trunk/kdenetwork/kmail/; revision=38165 --- main.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index e891fd30c..06b1d4ac9 100644 --- a/main.cpp +++ b/main.cpp @@ -94,10 +94,14 @@ static const char *description = I18N_NOOP("A KDE E-Mail client."); static KCmdLineOptions options[] = { - { "s ", I18N_NOOP("Set subject of msg."), 0 }, - { "c
", I18N_NOOP("Send CC: to 'address'."), 0 }, - { "b
", I18N_NOOP("Send BCC: to 'addres'."), 0 }, - { "h
", I18N_NOOP("Add 'header' to msg."), 0 }, + { "s", 0 , 0 }, + { "subject ", I18N_NOOP("Set subject of msg."), 0 }, + { "c", 0 , 0 }, + { "cc
", I18N_NOOP("Send CC: to 'address'."), 0 }, + { "b", 0 , 0 }, + { "bcc
", I18N_NOOP("Send BCC: to 'addres'."), 0 }, + { "h", 0 , 0 }, + { "header
", I18N_NOOP("Add 'header' to msg."), 0 }, { "msg ", I18N_NOOP("Read msg-body from 'file."), 0 }, { "check", I18N_NOOP("Check for new mail only."), 0 }, { "+[address]", I18N_NOOP("Send msg to 'address'."), 0 }, @@ -594,22 +598,22 @@ static void processArgs(KCmdLineArgs *args) // process args: - if (args->getOption("s")) + if (args->getOption("subject")) { mailto = true; - subj = args->getOption("s"); + subj = args->getOption("subject"); } - if (args->getOption("c")) + if (args->getOption("cc")) { mailto = true; - cc = args->getOption("c"); + cc = args->getOption("cc"); } - if (args->getOption("b")) + if (args->getOption("bcc")) { mailto = true; - bcc = args->getOption("b"); + bcc = args->getOption("bcc"); } for(int i= 0; i < args->count(); i++) @@ -620,7 +624,7 @@ static void processArgs(KCmdLineArgs *args) mailto = true; } - delete args; + args->clear(); if (mailto) {