Главная » Просмотр файлов » Стандарт языка Си С99 TC

Стандарт языка Си С99 TC (1113411), страница 48

Файл №1113411 Стандарт языка Си С99 TC (Стандарт языка Си С99 + TC) 48 страницаСтандарт языка Си С99 TC (1113411) страница 482019-04-24СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 48)

The macro UINTN_C(value) shall expandto an integer constant expression corresponding to the type uint_leastN_t. Forexample, if uint_least64_t is a name for the type unsigned long long int,then UINT64_C(0x123) might expand to the integer constant 0x123ULL.7.18.4.2 Macros for greatest-width integer constants1The following macro expands to an integer constant expression having the value specifiedby its argument and the type intmax_t:INTMAX_C(value)The following macro expands to an integer constant expression having the value specifiedby its argument and the type uintmax_t:UINTMAX_C(value)§7.18.4.2Library261ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N12567.19 Input/output <stdio.h>7.19.1 Introduction1The header <stdio.h> declares three types, several macros, and many functions forperforming input and output.2The types declared are size_t (described in 7.17);FILEwhich is an object type capable of recording all the information needed to control astream, including its file position indicator, a pointer to its associated buffer (if any), anerror indicator that records whether a read/write error has occurred, and an end-of-fileindicator that records whether the end of the file has been reached; andfpos_twhich is an object type other than an array type capable of recording all the informationneeded to specify uniquely every position within a file.3The macros are NULL (described in 7.17);_IOFBF_IOLBF_IONBFwhich expand to integer constant expressions with distinct values, suitable for use as thethird argument to the setvbuf function;BUFSIZwhich expands to an integer constant expression that is the size of the buffer used by thesetbuf function;EOFwhich expands to an integer constant expression, with type int and a negative value, thatis returned by several functions to indicate end-of-file, that is, no more input from astream;FOPEN_MAXwhich expands to an integer constant expression that is the minimum number of files thatthe implementation guarantees can be open simultaneously;FILENAME_MAXwhich expands to an integer constant expression that is the size needed for an array ofchar large enough to hold the longest file name string that the implementation262Library§7.19.1WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3guarantees can be opened;231)L_tmpnamwhich expands to an integer constant expression that is the size needed for an array ofchar large enough to hold a temporary file name string generated by the tmpnamfunction;SEEK_CURSEEK_ENDSEEK_SETwhich expand to integer constant expressions with distinct values, suitable for use as thethird argument to the fseek function;TMP_MAXwhich expands to an integer constant expression that is the maximum number of uniquefile names that can be generated by the tmpnam function;stderrstdinstdoutwhich are expressions of type ‘‘pointer to FILE’’ that point to the FILE objectsassociated, respectively, with the standard error, input, and output streams.4The header <wchar.h> declares a number of functions useful for wide character inputand output.

The wide character input/output functions described in that subclauseprovide operations analogous to most of those described here, except that thefundamental units internal to the program are wide characters. The externalrepresentation (in the file) is a sequence of ‘‘generalized’’ multibyte characters, asdescribed further in 7.19.3.5The input/output functions are given the following collective terms:— The wide character input functions — those functions described in 7.24 that performinput into wide characters and wide strings: fgetwc, fgetws, getwc, getwchar,fwscanf, wscanf, vfwscanf, and vwscanf.— The wide character output functions — those functions described in 7.24 that performoutput from wide characters and wide strings: fputwc, fputws, putwc,putwchar, fwprintf, wprintf, vfwprintf, and vwprintf.231) If the implementation imposes no practical limit on the length of file name strings, the value ofFILENAME_MAX should instead be the recommended size of an array intended to hold a file namestring.

Of course, file name string contents are subject to other system-specific constraints; thereforeall possible strings of length FILENAME_MAX cannot be expected to be opened successfully.§7.19.1Library263ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— The wide character input/output functions — the union of the ungetwc function, thewide character input functions, and the wide character output functions.— The byte input/output functions — those functions described in this subclause thatperform input/output: fgetc, fgets, fprintf, fputc, fputs, fread,fscanf, fwrite, getc, getchar, gets, printf, putc, putchar, puts,scanf, ungetc, vfprintf, vfscanf, vprintf, and vscanf.Forward references: files (7.19.3), the fseek function (7.19.9.2), streams (7.19.2), thetmpnam function (7.19.4.4), <wchar.h> (7.24).7.19.2 Streams1Input and output, whether to or from physical devices such as terminals and tape drives,or whether to or from files supported on structured storage devices, are mapped intological data streams, whose properties are more uniform than their various inputs andoutputs.

Two forms of mapping are supported, for text streams and for binarystreams.232)2A text stream is an ordered sequence of characters composed into lines, each lineconsisting of zero or more characters plus a terminating new-line character. Whether thelast line requires a terminating new-line character is implementation-defined.

Charactersmay have to be added, altered, or deleted on input and output to conform to differingconventions for representing text in the host environment. Thus, there need not be a oneto-one correspondence between the characters in a stream and those in the externalrepresentation. Data read in from a text stream will necessarily compare equal to the datathat were earlier written out to that stream only if: the data consist only of printingcharacters and the control characters horizontal tab and new-line; no new-line character isimmediately preceded by space characters; and the last character is a new-line character.Whether space characters that are written out immediately before a new-line characterappear when read in is implementation-defined.3A binary stream is an ordered sequence of characters that can transparently recordinternal data.

Data read in from a binary stream shall compare equal to the data that wereearlier written out to that stream, under the same implementation. Such a stream may,however, have an implementation-defined number of null characters appended to the endof the stream.4Each stream has an orientation. After a stream is associated with an external file, butbefore any operations are performed on it, the stream is without orientation. Once a widecharacter input/output function has been applied to a stream without orientation, the232) An implementation need not distinguish between text streams and binary streams. In such animplementation, there need be no new-line characters in a text stream nor any limit to the length of aline.264Library§7.19.2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3stream becomes a wide-oriented stream. Similarly, once a byte input/output function hasbeen applied to a stream without orientation, the stream becomes a byte-oriented stream.Only a call to the freopen function or the fwide function can otherwise alter theorientation of a stream.

(A successful call to freopen removes any orientation.)233)5Byte input/output functions shall not be applied to a wide-oriented stream and widecharacter input/output functions shall not be applied to a byte-oriented stream. Theremaining stream operations do not affect, and are not affected by, a stream’s orientation,except for the following additional restrictions:— Binary wide-oriented streams have the file-positioning restrictions ascribed to bothtext and binary streams.— For wide-oriented streams, after a successful call to a file-positioning function thatleaves the file position indicator prior to the end-of-file, a wide character outputfunction can overwrite a partial multibyte character; any file contents beyond thebyte(s) written are henceforth indeterminate.6Each wide-oriented stream has an associated mbstate_t object that stores the currentparse state of the stream.

Характеристики

Тип файла
PDF-файл
Размер
3,61 Mb
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6418
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее