Re: CLIL source code from book "Firmware demystified"



Hello, Lanarcam!
You wrote on 29 Jun 2005 02:02:52 -0700:

??>> parsing it, than calls appropriate function (for example, which shows
??>> env. variables: show_env()) and pass 'argc' and 'argv[]' to that
??>> function (assuming that in CLI prompt you enter some arguments, like
??>> 'show env current'). How is it possible to work?

L> What exactly do you not understand?
L> - main function getting command line from user?
L> - parsing it?
L> - calls appropriate function?
L> - pass 'argc' and 'argv[]'?
Main function gets command line (comman and its arguments) from user and
than pass it to appropriate function handling all functionality. I don't
understand why is 'argc' and 'argv[]' is passed, because I used to think
'argc' and 'argv[]' are valid only with a program running, not function.

With best regards, Roman Mashak. E-mail: mrv@xxxxxxxx


.



Relevant Pages

  • Re: CLIL source code from book "Firmware demystified"
    ... > ??>> parsing it, than calls appropriate function (for example, which shows ... > ??>> function (assuming that in CLI prompt you enter some arguments, ... > L> - main function getting command line from user? ... > 'argc' and 'argv' are valid only with a program running, ...
    (comp.arch.embedded)
  • Re: CLIL source code from book "Firmware demystified"
    ... > dedicated to development of Command Line Interface for generic embedded ... > getting command line from user and parsing it, ... > some arguments, like 'show env current'). ... > With best regards, Roman Mashak. ...
    (comp.arch.embedded)
  • Re: What does "*" mean in "int main(int argc, char *argv[])"?
    ... argv- is the array of parameters passed in the command line. ... it is a pointer to an array of type char. ... You can use argc in a for loop to process the argv[] values. ...
    (alt.comp.lang.learn.c-cpp)
  • main() command line arguments of console application
    ... I want to use command line arguments in a console application. ... regardless of what was entered on the command line, argc and argv ... contain bogus values. ...
    (microsoft.public.windowsce.embedded)
  • Re: rpmbuild and whitespace in path names
    ... | directory/file name well. ... think about how you enter a command: ... However, things get hinky when adding arguements, or parsing remotely. ... quotations going to end up and what are the parsing rules? ...
    (Fedora)