Xarchiver: hep for developing the add cmd-line switch
Biju Chacko
botsie at xfce.org
Mon Jun 19 15:34:25 CEST 2006
On Mon, 19 Jun 2006 18:50:03 +0530, Colossus <colossus73 at gmail.com> wrote:
> Hi,
>
> I have completed the extract and add dialog for xarchiver. The switch
> for handling extraction from the cmd-line are also completed. I was
> developing the switches for handling add now but I met a problem. How
> to catch from the command line the number of files the user want to
> add ? For example
>
> xarchiver -d foo.zip file1 file2 file3 file4 .... fileX
>
> I'm not so expert in parsing the command line.
> Also I don't know how to put together the code who checks for the
> existence of the switches on cmd-line and the code who opens the
> archive if the user supplies it on the cmd-line without any switch
> like this:
>
> xarchiver foo.zip
>
> Can someone of you give me an help ? I'm really close to release a
> beta so everyone can test it.
I haven't looked at your code, so forgive me if I'm being too basic. I
suppose getopt should handle the command line parsing -- that'll give you
code to check for the existence of switches and their meaning. For stuff
that is not associated with a switch, you'll have to figure out whether or
not you're getting an archive from the context.
hth,
-- b
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Xfce4-dev
mailing list