How to parse a string like C program parse the command line string?

Discussion in 'C Programming' started by linzhenhua1205@163.com, Mar 12, 2005.

  1. Guest

    I want to parse a string like C program parse the command line into
    argc & argv[][].
    I hope don't use the array the allocate a fix memory first, and don't
    use the memory allocate function like malloc.
    who can give me some ideas?
    The following is my program, but it has some problem. I hope someone
    would correct it.
    ////////////////////////////
    //Test_ConvertArg.c
    ////////////////////////////
    #include <stdio.h>
    #include <string.h>

    int ConvertArg(char* Str, char* Argv[])
    {
    int Argc; // Count the argument).
    int Count = 0;
    int i = 0;
    char* StrPtr;
    char* TmpStrPtr;
    StrPtr = Str;

    for(; *StrPtr == ' ';) // ignore the whitespace before the
    command!
    {
    ++StrPtr;
    }

    TmpStrPtr = StrPtr;

    for (Argc = 0; (*StrPtr) != '\n'; StrPtr++, Count++)
    {

    if(*StrPtr == ' ')
    {
    // if exist multi whitespace together,
    //argc just count once,and don't continually change argv!
    if( *(StrPtr+1) == ' ')
    {
    Count--;
    continue;
    }
    }

    Count--;
    // the following setences have problems.
    memcpy(Argv[Argc],TmpStrPtr,Count);

    #if 0
    for(i=0; i <= Count; i++)
    {
    Argv[Argc] = *TmpStrPtr;
    TmpStrPtr++;
    }
    #endif


    TmpStrPtr = StrPtr;
    i = 0;
    Argc++;
    }
    }

    int main(int argc, char* argv[])
    {
    char** argv1;
    char* str = "";

    char** str1 = "test";
    char* str2 = " ";
    memcpy(str2, str1[0], 4);
    printf("%s\n", str2);
    // test ConvertStr()
    str = " a asdf ";
    argv1 = "";
    printf("argc = %d, argv0 = \n",ConvertArg(str, argv1));
    str = " a asdf";
    printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    argv1[0], argv1[1]);
    str = " asdf asdf";
    printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    argv1[0], argv1[1]);
    str = " asdf asdf";
    printf("argc = %d, argv0 = %s ,argv1 = %s, argv2 =
    %s\n",ConvertArg(str, argv1), argv1[0], argv1[1], argv1[3]);
    return 1;
    }
     
    , Mar 12, 2005
    #1
    1. Advertising

  2. Developper Guest

    <> schreef in bericht
    news:...
    >I want to parse a string like C program parse the command line into
    > argc & argv[][].
    > I hope don't use the array the allocate a fix memory first, and don't
    > use the memory allocate function like malloc.
    > who can give me some ideas?
    > The following is my program, but it has some problem. I hope someone
    > would correct it.
    > ////////////////////////////
    > //Test_ConvertArg.c
    > ////////////////////////////
    > #include <stdio.h>
    > #include <string.h>
    >
    > int ConvertArg(char* Str, char* Argv[])
    > {
    > int Argc; // Count the argument).
    > int Count = 0;
    > int i = 0;
    > char* StrPtr;
    > char* TmpStrPtr;
    > StrPtr = Str;
    >
    > for(; *StrPtr == ' ';) // ignore the whitespace before the
    > command!
    > {
    > ++StrPtr;
    > }
    >
    > TmpStrPtr = StrPtr;
    >
    > for (Argc = 0; (*StrPtr) != '\n'; StrPtr++, Count++)
    > {
    >
    > if(*StrPtr == ' ')
    > {
    > // if exist multi whitespace together,
    > //argc just count once,and don't continually change argv!
    > if( *(StrPtr+1) == ' ')
    > {
    > Count--;
    > continue;
    > }
    > }
    >
    > Count--;
    > // the following setences have problems.
    > memcpy(Argv[Argc],TmpStrPtr,Count);
    >
    > #if 0
    > for(i=0; i <= Count; i++)
    > {
    > Argv[Argc] = *TmpStrPtr;
    > TmpStrPtr++;
    > }
    > #endif
    >
    >
    > TmpStrPtr = StrPtr;
    > i = 0;
    > Argc++;
    > }
    > }
    >
    > int main(int argc, char* argv[])
    > {
    > char** argv1;
    > char* str = "";
    >
    > char** str1 = "test";
    > char* str2 = " ";
    > memcpy(str2, str1[0], 4);
    > printf("%s\n", str2);
    > // test ConvertStr()
    > str = " a asdf ";
    > argv1 = "";
    > printf("argc = %d, argv0 = \n",ConvertArg(str, argv1));
    > str = " a asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    > argv1[0], argv1[1]);
    > str = " asdf asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    > argv1[0], argv1[1]);
    > str = " asdf asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s, argv2 =
    > %s\n",ConvertArg(str, argv1), argv1[0], argv1[1], argv1[3]);
    > return 1;
    > }
    >


    use the getopt function

    Johan
     
    Developper, Mar 12, 2005
    #2
    1. Advertising

  3. Guest

    but my program is not want to run under the systemV Unix or something
    like it.
    That is not getopt system call
     
    , Mar 12, 2005
    #3
  4. Guest

    I rewrite the Convert function like following:
    //////////////////////


    ///////////////////////////////////////////////////////////////////////////////
    ///////
    //PURPOSE : This function converts the Str into [int argc] & [char*
    argv[]],
    // which are the same as the argument of the C main function.
    //
    //ARGUMENT : Str contains the command , switch and archive file.
    //RETURN : the number in of the argument.
    //INFO : 1.skip leading white space and table space!
    // 2.if occur the '\0' break;
    // 3.Put the remain string into the Argv[Argc], be remember Argv[]
    // is a string Pointer. if you file '\0' in string it means that
    // you fill the Argv[][].
    // 4.check the ' ' '\t' '\n'
    // 5.fill the string by '\n'
    // 6.change the string pointer to the next argument.
    //TestStatus: UNDO
    ///////////////////////////////////////////////////////////////////////////////
    ///////
    int ConvertArg(char* Str)
    {
    int Argc; // Count the argument).
    char* Argv[MAXARGC]; // to hold the parse result.
    char *StrPtr, *CurrentPtr;
    StrPtr = Str;

    for(Argc = 0;Argc < MAXARGC;Argc++) // init the Argv.
    {
    Argv[Argc] = NULLCHAR;
    }


    for(Argc = 0;Argc < MAXARGC && (*StrPtr) != '\0';)
    {
    // Skip leading white space and table space!
    while(*StrPtr == ' ' || *StrPtr == '\t')
    {
    StrPtr++;
    }

    // When that is only space in the string this instance will happen!
    if((*StrPtr) == '\0') // break if occur the char '\0'
    {
    break;
    }

    Argv[Argc++] = StrPtr; // Beginning of token.

    // Find space or tab. If not present then we've already found the
    last token.
    for (CurrentPtr = StrPtr; *CurrentPtr; CurrentPtr++)
    {
    if (*CurrentPtr == ' ' || *CurrentPtr == '\t')
    {
    break;
    }
    }

    if (*CurrentPtr != '\0')
    {
    *CurrentPtr++ = '\0';
    }
    StrPtr = CurrentPtr;
    }

    // empty command line
    if (Argc < 1)
    {
    Argc = 1;
    Argv[0] = "";
    }

    return Argc;
    }
     
    , Mar 12, 2005
    #4
  5. On 11 Mar 2005 22:00:35 -0800, in comp.lang.c , wrote:

    >but my program is not want to run under the systemV Unix or something
    >like it.
    >That is not getopt system call


    the source for getopt() is available in the public domain. Try the gnu archives.


    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
     
    Mark McIntyre, Mar 12, 2005
    #5
  6. CBFalconer Guest

    Mark McIntyre wrote:
    > wrote:
    >
    >> but my program is not want to run under the systemV Unix or
    >> something like it.That is not getopt system call

    >
    > the source for getopt() is available in the public domain. Try the
    > gnu archives.


    You mean "The source for some version of something sometimes known
    as getopt is ...,". There is no standard for this. For example,
    the following is viable:

    char *getopt(void) {return "opt";}

    illustrating why the content of this group is constrained. :)

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Mar 12, 2005
    #6
  7. CBFalconer wrote:
    > Mark McIntyre wrote:
    > > wrote:
    > >
    > >> but my program is not want to run under the systemV Unix or
    > >> something like it.That is not getopt system call

    > >
    > > the source for getopt() is available in the public domain. Try the
    > > gnu archives.

    >
    > You mean "The source for some version of something sometimes known
    > as getopt is ...,". There is no standard for this. For example,
    > the following is viable:
    >
    > char *getopt(void) {return "opt";}


    Almost certainly not. getopt is covered by POSIX.


    Daniel Vallstrom
     
    Daniel Vallstrom, Mar 12, 2005
    #7
  8. Mac Guest

    On Sat, 12 Mar 2005 11:16:06 +0000, Mark McIntyre wrote:

    > On 11 Mar 2005 22:00:35 -0800, in comp.lang.c , wrote:
    >
    >>but my program is not want to run under the systemV Unix or something
    >>like it.
    >>That is not getopt system call

    >
    > the source for getopt() is available in the public domain. Try the gnu archives.


    I would be very surprised if GNU put any of their stuff into the public
    domain. AFAIK, GNU (or the FSF) maintains copyright ownership of all their
    software and licenses it according to the GPL or LGPL.

    --Mac
     
    Mac, Mar 12, 2005
    #8
  9. On Sat, 12 Mar 2005 16:10:02 GMT, in comp.lang.c , CBFalconer
    <> wrote:

    >Mark McIntyre wrote:
    >> wrote:
    >>
    >>> but my program is not want to run under the systemV Unix or
    >>> something like it.That is not getopt system call

    >>
    >> the source for getopt() is available in the public domain. Try the
    >> gnu archives.

    >
    >You mean "The source for some version


    indeed. I was merely indicating that
    a) the wheel doesn't need reinvented
    b) getopt is not restricted to SysV.

    >illustrating why the content of this group is constrained. :)


    Well, that was rather why I redirected out of it.... :)


    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Mar 12, 2005
    #9
  10. On Sat, 12 Mar 2005 17:13:31 GMT, in comp.lang.c , Mac <> wrote:

    >On Sat, 12 Mar 2005 11:16:06 +0000, Mark McIntyre wrote:
    >
    >> On 11 Mar 2005 22:00:35 -0800, in comp.lang.c , wrote:
    >>
    >>>but my program is not want to run under the systemV Unix or something
    >>>like it.
    >>>That is not getopt system call

    >>
    >> the source for getopt() is available in the public domain. Try the gnu archives.

    >
    >I would be very surprised if GNU put any of their stuff into the public
    >domain. AFAIK, GNU (or the FSF) maintains copyright ownership of all their
    >software and licenses it according to the GPL or LGPL.


    A rose.
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Mar 12, 2005
    #10
  11. CBFalconer Guest

    Daniel Vallstrom wrote:
    > CBFalconer wrote:
    >> Mark McIntyre wrote:
    >>> wrote:
    >>>
    >>>> but my program is not want to run under the systemV Unix or
    >>>> something like it.That is not getopt system call
    >>>
    >>> the source for getopt() is available in the public domain. Try the
    >>> gnu archives.

    >>
    >> You mean "The source for some version of something sometimes known
    >> as getopt is ...,". There is no standard for this. For example,
    >> the following is viable:
    >>
    >> char *getopt(void) {return "opt";}

    >
    > Almost certainly not. getopt is covered by POSIX.


    I see no reference to POSIX in the C standard. I believe getopt is
    also firmly in the users namespace. This is c.l.c, and is
    completely independant of POSIX.

    Whether or not it is wise to write such a function named as above
    is another matter entirely.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Mar 13, 2005
    #11
  12. Re: How to parse a string like C program parse the command linestring?

    writes:
    > I want to parse a string like C program parse the command line into
    > argc & argv[][].
    > I hope don't use the array the allocate a fix memory first, and don't
    > use the memory allocate function like malloc.
    > who can give me some ideas?
    > The following is my program, but it has some problem. I hope someone
    > would correct it.

    [snip]

    I haven't studied your program in detail, but it looks like you're
    trying to parse a single string into blank-delimited arguments; for
    example, "foo bar" would yield the two strings "foo" and "bar".

    You should be aware that typical C programs don't do this; rather,
    it's done for them before they're executed. A C main program receives
    a list of arguments in argc and argv. In some cases, whatever entity
    invoked the program may have generated the list by parsing a single
    string, splitting on blanks; in other cases, the arguments are
    generated as a list, and never appear as a single string.

    As far as C is concerned, blanks are not special; they're just like
    any other character that can appear in the argument list.

    <OT>
    And if you look at getopt, you'll probably find that it works with
    arguments already split into individual arguments.
    </OT>

    <OT>
    Unix shells typically convert a single string into a command name and
    a list of arguments, but the way they do so is more complex than just
    splitting on blanks; see the documentation for their handling of
    backslash and quotation characters.
    </OT>

    That's not to say that what you're trying to do isn't potentially
    useful, but you probably need to nail down the problem definition.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Mar 13, 2005
    #12
  13. CBFalconer wrote:
    > Daniel Vallstrom wrote:
    > > CBFalconer wrote:
    > >> Mark McIntyre wrote:
    > >>> wrote:
    > >>>
    > >>>> but my program is not want to run under the systemV Unix or
    > >>>> something like it.That is not getopt system call
    > >>>
    > >>> the source for getopt() is available in the public domain. Try

    the
    > >>> gnu archives.
    > >>
    > >> You mean "The source for some version of something sometimes known
    > >> as getopt is ...,". There is no standard for this. For example,
    > >> the following is viable:
    > >>
    > >> char *getopt(void) {return "opt";}

    > >
    > > Almost certainly not. getopt is covered by POSIX.

    >
    > I see no reference to POSIX in the C standard. I believe getopt is
    > also firmly in the users namespace. This is c.l.c, and is
    > completely independant of POSIX.


    While there are references to POSIX in the C standard, that's beside
    the point. The point is that there is a ubiquitous definition of
    getopt.


    > Whether or not it is wise to write such a function named as above
    > is another matter entirely.


    No, the question is if there is a standard for getopt.


    Daniel Vallstrom
     
    Daniel Vallstrom, Mar 13, 2005
    #13
  14. Guest

    Thank you.
    Yet, I worked on Embedded System, That is just some simple Ansi C
    function library.
    And The command will come in the string format. so I should parse it.

    I see that it have lots of thing should be done in the way C parses the
    command,
    but I just want to support some simple function.
    so I look for help to see whether that is some thing more to be care.
    Then I can decide which function I should be supported.
     
    , Mar 13, 2005
    #14
  15. CBFalconer Guest

    Daniel Vallstrom wrote:
    > CBFalconer wrote:
    >

    .... snip ...
    >
    >> Whether or not it is wise to write such a function named as above
    >> is another matter entirely.

    >
    > No, the question is if there is a standard for getopt.


    That can be answered directly. In c.l.c, there is not any such
    standard. In other environments, there may be, but that is of no
    interest here.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Mar 13, 2005
    #15
  16. Re: How to parse a string like C program parse the command linestring?

    "Daniel Vallstrom" <> writes:
    > CBFalconer wrote:

    [...]
    >> I see no reference to POSIX in the C standard. I believe getopt is
    >> also firmly in the users namespace. This is c.l.c, and is
    >> completely independant of POSIX.

    >
    > While there are references to POSIX in the C standard, that's beside
    > the point. The point is that there is a ubiquitous definition of
    > getopt.


    The word POSIX appears exactly once in the C99 standard, specifically
    in the bibliograpy:

    ISO/IEC 9945-2:1993, Information technology -- Portable Operating
    System Interface (POSIX) -- Part 2: Shell and Utilities.

    >> Whether or not it is wise to write such a function named as above
    >> is another matter entirely.

    >
    > No, the question is if there is a standard for getopt.


    There is a standard for getopt, but it's off-topic here.

    On the other hand, when choosing identifiers in a C program, it's
    probably worthwhile to be aware of identifiers used in widespread
    auxiliary standard. Writing your own function called "getopt" could
    lead to problems if your program is eventually going to depend on
    POSIX.

    (Name collisions are a problem that C doesn't handle particularly
    well; IMHO something like C++ namespaces would be a good addition to
    the language.)

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Mar 13, 2005
    #16
  17. wrote:
    > I want to parse a string like C program parse the command line into
    > argc & argv[][].


    I'm not entirly clear what you are trying to do. Do you want to break
    up a string into substrings in a similar fashion to the way C handles
    its command line arguments?

    so this string "now is the winter of our discontent" would be broken
    up into separate strings :-

    "now", "is", "the", "winter", "of", "our", "discontent"

    It might be worth taking a look at the standard function strtok(). It
    has a few problems (may not handle "empty" arguments the way you want,
    uses static data and modifies the argument string).


    > I hope don't use the array the allocate a fix memory first,


    you don't want to alloocate the memory in advance?


    > and don't use the memory allocate function like malloc.


    nor use malloc()?

    strtok() doesn't do either of these things (just don't pass it
    a string literal...).



    > who can give me some ideas?
    > The following is my program, but it has some problem. I hope someone
    > would correct it.


    I can't be bothered to corect all of it (not least because I don't
    know what it's supposed to be doing), but I tried compiling it.

    <snip>

    > int main(int argc, char* argv[])
    > {
    > char** argv1;
    > char* str = "";
    >
    > char** str1 = "test";


    do you really want to do this? You are initialising a char* with a
    char**.
    A bad idea I think.


    > char* str2 = " ";
    > memcpy(str2, str1[0], 4);


    str2 has room for one character (plus a string delimiter) and you've
    copied 4...


    > printf("%s\n", str2);
    > // test ConvertStr()
    > str = " a asdf ";
    > argv1 = "";


    you are assigning a char* to a char**


    > printf("argc = %d, argv0 = \n",ConvertArg(str, argv1));
    > str = " a asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    > argv1[0], argv1[1]);
    > str = " asdf asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s\n",ConvertArg(str, argv1),
    > argv1[0], argv1[1]);
    > str = " asdf asdf";
    > printf("argc = %d, argv0 = %s ,argv1 = %s, argv2 =
    > %s\n",ConvertArg(str, argv1), argv1[0], argv1[1], argv1[3]);
    > return 1;
    > }


    I think you are still a bit confused about C strings and pointers.
    Re-read
    the appropriate parts of your C book. K&R is pretty good on this, do
    the
    exercises. If you get stuck ask again.


    Happy Programming!

    --
    Nick Keighley

    "High Integrity Software: The SPARK Approach to Safety and Security"
    Customers interested in this title may also be interested in:
    "Windows XP Home"
    (Amazon)
     
    Nick Keighley, Mar 13, 2005
    #17
  18. Keith Thompson wrote:
    > "Daniel Vallstrom" <> writes:
    > > No, the question is if there is a standard for getopt.

    >
    > There is a standard for getopt, but it's off-topic here.


    Let's review the subthread:

    OP asked a question about command line options.

    Someone replied "Have a look at getopt" or something to that
    effect.

    CBF replied that getopt isn't well-defined. Specifically he wrote:
    'You mean "The source for some version of something sometimes
    known as getopt is ...,". There is no standard for this.'

    I then said that 'getopt' is indeed well-defined.

    Don't get hung up on the fact that getopt isn't defined by the C
    standard. CBF could (conceptually) just as well have complained about
    the word 'look' instead of 'getopt'. Then, after getting a reply that
    'look' is well-defined, it's wrong to say "yeah, but 'look' is not
    defined by the C standard".


    Daniel Vallstrom
     
    Daniel Vallstrom, Mar 14, 2005
    #18
  19. Daniel Vallstrom <> scribbled the following:
    > Keith Thompson wrote:
    >> "Daniel Vallstrom" <> writes:
    >> > No, the question is if there is a standard for getopt.

    >>
    >> There is a standard for getopt, but it's off-topic here.


    > Let's review the subthread:


    > OP asked a question about command line options.


    > Someone replied "Have a look at getopt" or something to that
    > effect.


    > CBF replied that getopt isn't well-defined. Specifically he wrote:
    > 'You mean "The source for some version of something sometimes
    > known as getopt is ...,". There is no standard for this.'


    > I then said that 'getopt' is indeed well-defined.


    > Don't get hung up on the fact that getopt isn't defined by the C
    > standard. CBF could (conceptually) just as well have complained about
    > the word 'look' instead of 'getopt'. Then, after getting a reply that
    > 'look' is well-defined, it's wrong to say "yeah, but 'look' is not
    > defined by the C standard".


    That's an entirely different thing. The word "look" here refers to the
    common verb "look", but "getopt" refers to a C function called "getopt".
    We are very strict about C functions, and damn proud of it. However,
    with regard to common words such as verbs, we have the same everyday
    rules as anyone else.

    --
    /-- Joona Palaste () ------------- Finland --------\
    \-------------------------------------------------------- rules! --------/
    "I am looking for myself. Have you seen me somewhere?"
    - Anon
     
    Joona I Palaste, Mar 14, 2005
    #19
  20. Joona I Palaste wrote:
    > Daniel Vallstrom <> scribbled the

    following:
    > > Keith Thompson wrote:
    > >> "Daniel Vallstrom" <> writes:
    > >> > No, the question is if there is a standard for getopt.
    > >>
    > >> There is a standard for getopt, but it's off-topic here.

    >
    > > Let's review the subthread:

    >
    > > OP asked a question about command line options.

    >
    > > Someone replied "Have a look at getopt" or something to that
    > > effect.

    >
    > > CBF replied that getopt isn't well-defined. Specifically he

    wrote:
    > > 'You mean "The source for some version of something

    sometimes
    > > known as getopt is ...,". There is no standard for this.'

    >
    > > I then said that 'getopt' is indeed well-defined.

    >
    > > Don't get hung up on the fact that getopt isn't defined by the C
    > > standard. CBF could (conceptually) just as well have complained

    about
    > > the word 'look' instead of 'getopt'. Then, after getting a reply

    that
    > > 'look' is well-defined, it's wrong to say "yeah, but 'look' is not
    > > defined by the C standard".

    >
    > That's an entirely different thing. The word "look" here refers to

    the
    > common verb "look", but "getopt" refers to a C function called

    "getopt".
    > We are very strict about C functions, and damn proud of it. However,
    > with regard to common words such as verbs, we have the same everyday
    > rules as anyone else.


    It wasn't a different thing (as evident from the quotes in the thread
    review above) but now you have made it into something else.

    Are you seriously suggesting that you aren't allowed to refer someone
    to getopt when she asks for it? As a matter of fact it is alright to
    discuss C tools to some extent in clc if there is no better place.
    Further more, in this subthread there has been no discussion about
    getopt, only references to it.


    > /-- Joona Palaste () ------------- Finland

    --------\
    > \-------------------------------------------------------- rules!

    --------/

    In what way?


    Daniel Vallstrom
     
    Daniel Vallstrom, Mar 15, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roedy Green
    Replies:
    18
    Views:
    991
    Raymond DeCampo
    Sep 25, 2005
  2. Christian Seberino
    Replies:
    0
    Views:
    485
    Christian Seberino
    Oct 21, 2003
  3. Replies:
    4
    Views:
    1,729
    Terry Hancock
    Apr 23, 2005
  4. Patrick Kowalzick
    Replies:
    5
    Views:
    485
    Patrick Kowalzick
    Mar 14, 2006
  5. Davy
    Replies:
    2
    Views:
    146
Loading...

Share This Page