Sponsored Content
Operating Systems AIX Where is LINE_MAX set on AIX? Post 302360120 by zaxxon on Thursday 8th of October 2009 07:15:05 AM
Old 10-08-2009
Code:
root@somehost:/usr> find . -type f -name "*.h" -exec grep -l LINE_MAX {} \;
./lpp/X11/include/X11/Xos_r.h
./lpp/X11/include/X11/Xthreads.h
./include/sys/limits.h
./include/unistd.h
root@srfihv02:/usr> oslevel -r
5300-09

I think it is no good idea to change any header files of the OS but change your commands, scripts, structure etc. instead.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

LINE_MAX for NAWK

A newbie question: May I know what is "LINE_MAX" in nawk, does this limit the maximum length of a record that nawk can process. My nawk script gave me an error : >> input record `...' too long when processing long record, and exit. How can I ignore this error and proceed to the next... (2 Replies)
Discussion started by: deaniyoer
2 Replies

2. AIX

c set ++ for aix v3.1.3

Hey everyone... I'm new to this forum. I hope someone can help. I am desperate. I need to get my hand on IBM C Set ++ for AIX v3, part number 5765-421. I need to install this on an AIX box running AIX v4.3.3. I know it's very old and unsupported, but that's the version it has to be. I... (0 Replies)
Discussion started by: tgrossmith
0 Replies

3. UNIX for Dummies Questions & Answers

how to set timeout for aix?

if a user login and never shutdown or exit...how do you set an automatic shutdown or timeout if the user leave the session on for 20 minutes? thanks (3 Replies)
Discussion started by: ichiro
3 Replies

4. AIX

How to set AIX server for x-window?

Hi, I register the ip address into "XMD broadcast" in xconfig of xmanager, then use Xmanager to connect to AIX server, But I can not connect to it. How to set AIX server to let it can be connected? Thanks (2 Replies)
Discussion started by: aixabc
2 Replies

5. AIX

How to set up SUMA i n AIX Environment

Hi , How to set up SUMa in AIX environment. Any suggestions? Thanks, Sureeh C (3 Replies)
Discussion started by: choudarysuresh
3 Replies

6. AIX

AIX Server - Need to set up VMWare

Hi experts, We are faced with a dilemma - we have a AIX server for educational purposes. We had some Oracle applications running on them. The management decided not to extend the warranty, so we are left with a server that we cannot upgrade immediately. I was wondering if we could set up... (2 Replies)
Discussion started by: ranj@chn
2 Replies

7. AIX

file set not getting installed in aix

Hi One of the file set is not getting installed in aix. ========================================================================================= cbspsap01:/ # lppchk -v lppchk: The following filesets need to be installed or corrected to bring the system to a consistent state:... (1 Reply)
Discussion started by: newtoaixos
1 Replies

8. AIX

Will it affect my AIX LPAR security, when i set up email alerts on AIX server.

Hello, I've set up email alerts on AIX Servers. so that i can get email notifications (via mail relay server) when ever there is abnormal behavior. for example 1) my script monitors CPU/disk/memory etc... when it reaches high water ark, it will send an email alert. 2) disk usage alerts 3)... (5 Replies)
Discussion started by: System Admin 77
5 Replies

9. AIX

How to set up remote X Windows on AIX ?

Hi, I want to display a program on my local workstation, that is running on a remote AIX, and I have done the following: install an X server (Xming) on my windows machine enable X11 forwarding in Putty enable X11 forwarding for the SSH daemon restart SSH daemon text X... (9 Replies)
Discussion started by: SteAlma
9 Replies

10. AIX

How do I set up a Zebra Printer on AIX?

Hi All We have a Zebra LP 2824 that we are wanting to use to print mailing labels from our AIX 7.1 server. We have around 350 printers of various types and manufactures already installed and functioning so, we don't want to install CUPS. I can get the printer to print using Line Mode but,... (3 Replies)
Discussion started by: DLooney
3 Replies
FGETS(3P)						     POSIX Programmer's Manual							 FGETS(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
fgets -- get a string from a stream SYNOPSIS
#include <stdio.h> char *fgets(char *restrict s, int n, FILE *restrict stream); DESCRIPTION
The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2008 defers to the ISO C standard. The fgets() function shall read bytes from stream into the array pointed to by s, until n-1 bytes are read, or a <newline> is read and transferred to s, or an end-of-file condition is encountered. The string is then terminated with a null byte. The fgets() function may mark the last data access timestamp of the file associated with stream for update. The last data access timestamp shall be marked for update by the first successful execution of fgetc(), fgets(), fread(), fscanf(), getc(), getchar(), getdelim(), get- line(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc(). RETURN VALUE
Upon successful completion, fgets() shall return s. If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgets() shall return a null pointer. If a read error occurs, the error indicator for the stream shall be set, fgets() shall return a null pointer, and shall set errno to indicate the error. ERRORS
Refer to fgetc(). The following sections are informative. EXAMPLES
Reading Input The following example uses fgets() to read lines of input. It assumes that the file it is reading is a text file and that lines in this text file are no longer than 16384 (or {LINE_MAX} if it is less than 16384 on the implementation where it is running) bytes long. (Note that the standard utilities have no line length limit if sysconf(_SC_LINE_MAX) returns -1 without setting errno. This example assumes that sysconf(_SC_LINE_MAX) will not fail.) #include <limits.h> #include <stdio.h> #include <unistd.h> #define MYLIMIT 16384 char *line; int line_max; if (LINE_MAX >= MYLIMIT) { // Use maximum line size of MYLIMIT. If LINE_MAX is // bigger than our limit, sysconf() can't report a // smaller limit. line_max = MYLIMIT; } else { long limit = sysconf(_SC_LINE_MAX); line_max = (limit < 0 || limit > MYLIMIT) ? MYLIMIT : (int)limit; } // line_max + 1 leaves room for the null byte added by fgets(). line = malloc(line_max + 1); if (line == NULL) { // out of space ... return error; } while (fgets(line, line_max + 1, fp) != NULL) { // Verify that a full line has been read ... // If not, report an error or prepare to treat the // next time through the loop as a read of a // continuation of the current line. ... // Process line ... ... } free(line); ... APPLICATION USAGE
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
Section 2.5, Standard I/O Streams, fgetc(), fopen(), fread(), fscanf(), getc(), getchar(), getdelim(), gets(), ungetc() The Base Definitions volume of POSIX.1-2008, <stdio.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan- dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html . Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . IEEE
/The Open Group 2013 FGETS(3P)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy