Talk:Stdio.h

From Wikipedia, the free encyclopedia

Science collaboration of the month This article is a candidate for Science Collaboration of the Month. Please visit that page to support or comment on the nomination.
This article is supported by the Wikipedia:WikiProject C++. Please visit the project page for more details on the project.

Contents

[edit] stdio.h in an encyclopedia ??

I don't believe C/C++ reference pages belong to wikipedia, wikibooks may benefit from it however (http://en.wikibooks.org/wiki/Programming:C_contents).

Please sign your name with four tildes (~~~~) . I disagree, wikipedia is very often used as an almanac (which contains lists of information). Wikipedia is not used for text-book walkthrough-type teaching, but rather is used to concisely reference information on a topic - which is what this page is about. Fresheneesz 01:16, 3 June 2006 (UTC)

[edit] Some useful info from the wikiproject

[edit] Constants

  • BUFSIZ - an integer which is the size of the buffer used by the setbuf() function.
  • EOF - a negative integer of type int used to indicate end-of-file conditions.
  • FILENAME_MAX - the size of a char array which is large enough to store the name of any file that can be opened.
  • FOPEN_MAX - the number of files that may be open simultaneously.
    • at least 8
  • _IOFBF - an abbreviation for "input/output fully buffered"; it is an integer which may be passed to the setvbuf() function to request block buffered input and output for an open stream.
  • _IOLBF - an abbreviation for "input/output line buffered"; it is an integer which may be passed to the setvbuf() function to request line buffered input and output for an open stream.
  • _IONBF - an abbreviation for "input/output not buffered"; it is an integer which may be passed to the setvbuf() function to request unbuffered input and output for an open stream.
  • L_tmpnam - the size of a char array which is large enough to store a temporary filename generated by the tmpnam() function.
  • NULL - a null pointer constant; that is, a value which will never be equivalent to a pointer to a valid location in memory.
  • SEEK_CUR - an integer which may be passed to the fseek() function to request positioning relative to the current file position.
  • SEEK_END - an integer which may be passed to the fseek() function to request positioning relative to the end of the file.
  • SEEK_SET - an integer which may be passed to the fseek() function to request positioning relative to the beginning of the file.
  • TMP_MAX - the maximum number of unique filenames generable by the tmpnam() function.
    • at least 25

[edit] "stdio.h", or "Standard I/O library"?

stdio.h is the name of the header file; from at least the days of Version 7 Unix, and possibly as far back as when it was an add-on to Version 6 Unix, I've heard the library referred to as the "standard I/O library", not as "stdio.h". Guy Harris 02:53, 7 April 2006 (UTC)

stdio.h is the headers file name. You can refer to it any other way you like, but the file name's not going to change. Fresheneesz 01:14, 3 June 2006 (UTC)

The file's name might not change, but is this article about the header file, or is it about the routines declared and macros defined in that header file? Guy Harris 08:33, 5 June 2006 (UTC)

"stdio.h" is used in every corner of the world with C programmers, while "Standard I/O Library" is used only by English countries. So which name is more widely-applicable and commonly used? "stdio.h" of course. --Deryck C. 07:21, 3 June 2006 (UTC)

Perhaps "stdio.h" is used everywhere, while "Standard I/O Library" is used only in English - but is "stdio.h" used to refer to the library routines in question everywhere, or are those routines referred to as, for example, the C Standard-Bibliothek in German? Guy Harris 08:33, 5 June 2006 (UTC)
I've no idea... but this article is written from the "stdio.h" angle, so I don't think the article refers to anything else. The question's just whether "stdio.h" is the best name for this article. --Deryck C. 12:27, 5 June 2006 (UTC)
Actually, no, it wasn't written from the "stdio.h" angle; it sometimes correctly referred to "stdio.h" as a header, and other times incorrectly referred to it as a library. I've fixed it to consistently speak of it as a header; modern C environments have a library that includes the functions that were in the old Version 6 Unix "standard I/O library" (it was an add-on that came out after V6) and other functions as well, e.g. "libc"/"libSystem"/etc. on various Un*xes, so there's no library that could be called "stdio.h", and the file "stdio.h" is a header, not a library, in any case. Guy Harris 16:55, 5 June 2006 (UTC)

[edit] Concerning non-standard functions...

Functions like fileno(), ctermid() and popen() are not Standard C functions and as such have no place in this article. Also, some functions like system() are in the wrong article. There could, however, be an appropriate place for those somewhere else. I shall remove them from the article and if anyone feels I shouldn't have done so, feel free to revert it and post why have you done it here, so we can have a debate. Denis Kasak 18:23, 11 June 2006 (UTC)