Not able to locate LINE_MAX in limits.h

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • parag_paul@hotmail.com

    #1

    Not able to locate LINE_MAX in limits.h

    hi all,
    I am using a limits.h with the follwing header
    /*
    * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types
    <limits.h>
    */


    But I am not able to locate LINE_MAX ( number of characters maximum
    allowable in a line ) .
    is this limit.h deprecated .
  • Martin Ambuhl

    #2
    Re: Not able to locate LINE_MAX in limits.h

    parag_paul@hotm ail.com wrote:
    But I am not able to locate LINE_MAX ( number of characters maximum
    allowable in a line ) .
    is this limit.h deprecated .
    There is no such thing as LINE_MAX in C. LINE_MAX is a POSIX macro and
    is specifically about the maximum line limits that POSIX utilities
    support. Questions about POSIX belong elsewhere. Note that many several
    implementations which otherwise try to be POSIX, for example GNU C, pay
    no attention to that family of macros and that even though defined have
    no useful information. And, again, it has no meaning at in C itself,
    and has never been part of C, and is, obviously, 'deprecated'. That
    which never was is not deprecated.

    Comment

    • Eric Sosman

      #3
      Re: Not able to locate LINE_MAX in limits.h

      parag_paul@hotm ail.com wrote:
      hi all,
      I am using a limits.h with the follwing header
      /*
      * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types
      <limits.h>
      */
      >
      >
      But I am not able to locate LINE_MAX ( number of characters maximum
      allowable in a line ) .
      There's no such symbol (and if there were, <stdio.h>
      would be a more plausible home for it). As far as I know
      there is no programmatic way to discover the maximum length
      of an output line, nor even whether there is a maximum.
      Lines with up to 254 characters (253 plus '\n') are valid
      on all hosted implementations of C.
      is this limit.h deprecated .
      Not by me. Maybe somebody else dislikes it, though.

      --
      Eric Sosman
      esosman@ieee-dot-org.invalid

      Comment

      Working...