473,569 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 .
Oct 4 '08 #1
2 8709
pa********@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.
Oct 4 '08 #2
pa********@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
es*****@ieee-dot-org.invalid
Oct 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
2690
by: Maurice LING | last post by:
Hi, I think I've hit a system limit in python when I try to construct a list of 200,000 elements. My error is malloc: vm_allocate (size = 2400256) failed...... Just wondering is this specific to my system or what? Will adding more RAM helps in this case?
4
2499
by: platho | last post by:
Hello, I bounced into the max 25 columns index limits on DB2 v7.2 on NT. Is this still so in other operating systems or in v8 ? Are there plans to change this in the future ? Any workarounds or hints or tips? I think Oracle allows 30 fields in an index ... Thank you very much for an answer Regards
2
2843
by: hikums | last post by:
how can I use a function inside a function, for example I want to select col1, col2 from table1 where locate(dayofweek(current date),col3) =dayofweek(current date) col3 is a field that contains a string like '12 4567', or '1 4567'. This field specifies what day in the week the job executes, and if there is a match, I want to report col1 and...
16
6429
by: Mark Bruno | last post by:
Hey, I'm learning about the limits header, and I don't understand one snippit of code. If I code: #include <limits.h> #include <stdio.h> int main() { printf("Smallest signed long long: %lld\n", LLONG_MIN); return 0; }
7
10874
by: mwt | last post by:
Is there a function in python that does what "locate" does in a bash shell? I know I could do it by using os.popen('locate'), but I'm curious if there's a Python "native" way to go about it. Only needs to work in Unix, but would be interesting if it was cross-platform. Thanks.
0
1256
by: CtrlAltDel2008 | last post by:
Hello everyone, i hope you can help me with this query. The code below all works fine, referring to the SUBSTRING part, at the moment it just displays all the text from the "http" part until the end of the thread. I am trying to get it to just grab the URL and display that only. $sql= <<< END SELECT post_date ,...
88
3691
by: santosh | last post by:
Hello all, In K&R2 one exercise asks the reader to compute and print the limits for the basic integer types. This is trivial for unsigned types. But is it possible for signed types without invoking undefined behaviour triggered by overflow? Remember that the constants in limits.h cannot be used.
13
1644
by: Josip | last post by:
I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if value < self.min: # boundary check self.n = self.min if value self.max:
44
2196
by: vippstar | last post by:
n1256.pdf (C99 TC3), 5.2.4.1 Translation limits p1 says: Does that mean that *any* program using an array of two or more elements other than char is allowed to be rejected by an implementation? For example, int main(void) { int array; return 0; }
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.