Sponsored Content
Top Forums Programming Ignoring the stdio.h file in a C file Post 302737143 by alister on Wednesday 28th of November 2012 11:52:09 AM
Old 11-28-2012
If you're using gcc, the generated code is probably not even calling printf. Given a format string without conversion specifiers (e.g. %s) which ends with a newline, a builtin optimization has likely replaced printf with puts.

Everything that Corona explained still applies to puts' pointer argument.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

wc of characters in a file ignoring white space

Hi everyone, $ more abcdefg.ksh abcdef alpha beta gamma abcdef abcdef lmnop $ wc sachin1.ksh 5 7 132 abcdefg.ksh if you see it shows that file has got 240 characters. I actually want to count how many characters... (1 Reply)
Discussion started by: sachin.gangadha
1 Replies

2. UNIX for Dummies Questions & Answers

ignoring a dash in file name

so i have a simple file called -x and i need it renamed to x now i dont understand why when using the most basic methods, only the code mv ./-x x changes the file name while using any other type of escape characters around the dash, such as single/double quotations or backslash, doesnt. ... (5 Replies)
Discussion started by: LumpSum
5 Replies

3. Shell Programming and Scripting

ignoring blank line in a file

i have a file called Cleaner1.log . This files have some blank lines also.My requirement is that it should ignore the blank lines and give me the lines that contain some data. I m using this logic in a script: below the contents of file : Maximum Time Taken for Processing(Failed) RR... (4 Replies)
Discussion started by: ali560045
4 Replies

4. Shell Programming and Scripting

How to extract a string from a file ignoring new line

Hi, sumdays before i had posted a query with same subject. i got sum great help from great ppl which solved my problem then. But now there is a small problem with the code that i need the experts help upon. for parsing a text like this where $ had been the delimiter between... (3 Replies)
Discussion started by: suresh_kb211
3 Replies

5. Shell Programming and Scripting

ignoring lines in a file

HI, command to cat a readable file by ignoring the first line and last line or command to cat a readable file by ignoring the lines with delimiter Please advise on this. (2 Replies)
Discussion started by: thelakbe
2 Replies

6. Shell Programming and Scripting

Ignoring file name case and decrypting it.

Dear Friends, I want to decrypt 2 different file types in a folder (ZIP files and GPG files). Each file type need different decryption syntex. Hence, the script should identify file type and should act accordingly ignoring file name case i.e. upper or lower case. Also, the extention can be... (6 Replies)
Discussion started by: anushree.a
6 Replies

7. Programming

FILE structure - stdio.h

Hi All, I am new to linux and Programming. Inside the file stdio.h, there is a description about FILE structure. Which has many internal data members like _p, _r, _flags etc. I have written a sample code to find out the contents of the FILE structure. It opens a sample file ( FILE *fp ),... (5 Replies)
Discussion started by: nikunjbadjatya
5 Replies

8. Shell Programming and Scripting

using diff to on two file but ignoring the last comma separate value

Hi guys I have two file which I sdiff. ie file 1: AA,12,34,56,,789,101,,6666 file 2: AA,12,34,56,,789,101,,7777 The last comma separated value will always change from one day to the next. Is there another unix utility I can use that will sdiff two files but ignore the last comma... (1 Reply)
Discussion started by: wny201
1 Replies

9. Solaris

fatal error: stdio.h: No such file or directory

Trying to compile a C program recievin this hello.c:1:19: fatal error: stdio.h: No such file or directory gcc is installed on the system. echo $PATH /usr/bin:/usr/sbin:/usr/gcc/4.5/include/c++/4.5.2/tr1 root@Sol11swtb01:/media/NO NAME/Programming/C/Testing# cd... (2 Replies)
Discussion started by: Fingerz
2 Replies

10. Shell Programming and Scripting

Ignoring lines and create new file

Hello, I have a requirement to ignore few lines in a file before keyword FILEHEADER . As soon as there is keyword FILEHEADER is identified in file , it will form another file with data from FILEHEADER to whatever in file after FILEHEADER. I wrote filename=$1 awk... (4 Replies)
Discussion started by: callmatkarna
4 Replies
STDIO(3)						     Library Functions Manual							  STDIO(3)

NAME
stdio - standard buffered input/output package SYNOPSIS
#include <stdio.h> FILE *stdin; FILE *stdout; FILE *stderr; DESCRIPTION
The functions in the standard I/O library constitute a user-level buffering scheme. The in-line macros getc and putc(3) handle characters quickly. The higher level routines gets, fgets, scanf, fscanf, fread, puts, fputs, printf, fprintf, fwrite all use getc and putc; they can be freely intermixed. A file with associated buffering is called a stream, and is declared to be a pointer to a defined type FILE. Fopen(3) creates certain descriptive data for a stream and returns a pointer to designate the stream in all further transactions. There are three normally open streams with constant pointers declared in the include file and associated with the standard open files: stdin standard input file stdout standard output file stderr standard error file A constant `pointer' NULL (0) designates no stream at all. An integer constant EOF (-1) is returned upon end of file or error by integer functions that deal with streams. Any routine that uses the standard input/output package must include the header file <stdio.h> of pertinent macro definitions. The func- tions and constants mentioned in the standard I/O manual pages are declared in the include file and need no further declaration. The con- stants, and the following `functions' are implemented as macros; redeclaration of these names is perilous: clearerr, getc, getchar, putc, putchar, feof, ferror, fileno. SEE ALSO
open(2), close(2), read(2), write(2), fclose(3), ferror(3), fopen(3), fread(3), fseek(3), getc(3), gets(3), printf(3), putc(3), puts(3), scanf(3), setbuf(3), ungetc(3). DIAGNOSTICS
The value EOF is returned uniformly to indicate that a FILE pointer has not been initialized with fopen, input (output) has been attempted on an output (input) stream, or a FILE pointer designates corrupt or otherwise unintelligible FILE data. For purposes of efficiency, this implementation of the standard library has been changed to line buffer output to a terminal by default and attempts to do this transparently by flushing the output whenever a read(2) from the standard input is necessary. This is almost always transparent, but may cause confusion or malfunctioning of programs which use standard i/o routines but use read(2) themselves to read from the standard input. In cases where a large amount of computation is done after printing part of a line on an output terminal, it is necessary to fflush(3) the standard output before going off and computing so that the output will appear. BUGS
The standard buffered functions do not interact well with certain other library and system functions, especially fork and abort. LIST OF FUNCTIONS
Name Appears on Page Description clearerr ferror(3) stream status inquiries fclose fclose(3) close or flush a stream fdopen fopen(3) open a stream feof ferror(3) stream status inquiries ferror ferror(3) stream status inquiries fflush fclose(3) close or flush a stream fgetc getc(3) get character or word from stream fgets gets(3) get a string from a stream fileno ferror(3) stream status inquiries fopen fopen(3) open a stream fprintf printf(3) formatted output conversion fputc putc(3) put character or word on a stream fputs puts(3) put a string on a stream fread fread(3) buffered binary input/output freopen fopen(3) open a stream fscanf scanf(3) formatted input conversion fseek fseek(3) reposition a stream ftell fseek(3) reposition a stream fwrite fread(3) buffered binary input/output getc getc(3) get character or word from stream getchar getc(3) get character or word from stream gets gets(3) get a string from a stream getw getc(3) get character or word from stream printf printf(3) formatted output conversion putc putc(3) put character or word on a stream putchar putc(3) put character or word on a stream puts puts(3) put a string on a stream putw putc(3) put character or word on a stream rewind fseek(3) reposition a stream scanf scanf(3) formatted input conversion setbuf setbuf(3) assign buffering to a stream setvbuf setbuf(3) assign buffering to a stream snprintf printf(3) formatted output conversion sprintf printf(3) formatted output conversion sscanf scanf(3) formatted input conversion ungetc ungetc(3) push character back into input stream vfprintf printf(3) formatted output conversion vfscanf scanf(3) formatted input conversion vprintf printf(3) formatted output conversion vscanf scanf(3) formatted input conversion vsnprintf printf(3) formatted output conversion vsprintf printf(3) formatted output conversion vsscanf scanf(3) formatted input conversion 4th Berkeley Distribution May 13, 1986 STDIO(3)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy