LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-24-2005, 08:21 PM   #1
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
POSIX - max line length?


Is there a defined line length maximum in POSIX.1? I want to get in the habit of writing platform independant code. I'm looking to do something like this for a simple text editor:

char line[MAX_LINE_LENGTH];

Assuming MAX_LINE_LENGTH is defined by the standard. Is this possible or should i just throw a magic number in my program, like 4096.

Thanks
 
Old 08-24-2005, 08:59 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
I've never known of a line length limit.I know early implementations of the vi editor had a line limit of 2046, but any good editor will have no limit. I just tried it out with vim and it opend a 96M text file with only a single line. Instead of declaring a char[] to hold the line, it should probably be dynamic
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Max pass length xathras Linux - Security 1 06-26-2004 03:46 PM
Command line tool to print length of mp3 files? J_Szucs Linux - Software 3 05-04-2004 05:01 AM
what's the max length of rule in .procmailrc? xeza Linux - Software 1 11-20-2003 09:28 AM
Max Possible IDE items, Max IDE interfaces? KendersPlace Linux - Hardware 2 08-01-2003 06:58 PM
Command to list line length of multiple scripts Tekime Linux - General 2 09-06-2002 01:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration