source: rtems-docs/posix_users/services_provided_by_c.rst @ d389819

4.115
Last change on this file since d389819 was d389819, checked in by Amar Takhar <amar@…>, on 01/18/16 at 05:37:40

Convert all Unicode to ASCII(128)

  • Property mode set to 100644
File size: 9.3 KB
Line 
1Services Provided by C Library (libc)
2#####################################
3
4Introduction
5============
6
7This section lists the routines that provided by the Newlib C Library.
8
9Standard Utility Functions (stdlib.h)
10=====================================
11
12- ``abort`` - Abnormal termination of a program
13
14- ``abs`` - Integer absolute value (magnitude)
15
16- ``assert`` - Macro for Debugging Diagnostics
17
18- ``atexit`` - Request execution of functions at program exit
19
20- ``atof`` - String to double or float
21
22- ``atoi`` - String to integer
23
24- ``bsearch`` - Binary search
25
26- ``calloc`` - Allocate space for arrays
27
28- ``div`` - Divide two integers
29
30- ``ecvtbuf`` - Double or float to string of digits
31
32- ``ecvt`` - Double or float to string of digits (malloc result)
33
34- ``__env_lock`` - Lock environment list for getenv and setenv
35
36- ``gvcvt`` - Format double or float as string
37
38- ``exit`` - End program execution
39
40- ``getenv`` - Look up environment variable
41
42- ``labs`` - Long integer absolute value (magnitude)
43
44- ``ldiv`` - Divide two long integers
45
46- ``malloc`` - Allocate memory
47
48- ``realloc`` - Reallocate memory
49
50- ``free`` - Free previously allocated memory
51
52- ``mallinfo`` - Get information about allocated memory
53
54- ``__malloc_lock`` - Lock memory pool for malloc and free
55
56- ``mbstowcs`` - Minimal multibyte string to wide string converter
57
58- ``mblen`` - Minimal multibyte length
59
60- ``mbtowc`` - Minimal multibyte to wide character converter
61
62- ``qsort`` - Sort an array
63
64- ``rand`` - Pseudo-random numbers
65
66- ``strtod`` - String to double or float
67
68- ``strtol`` - String to long
69
70- ``strtoul`` - String to unsigned long
71
72- ``system`` - Execute command string
73
74- ``wcstombs`` - Minimal wide string to multibyte string converter
75
76- ``wctomb`` - Minimal wide character to multibyte converter
77
78Character Type Macros and Functions (ctype.h)
79=============================================
80
81- ``isalnum`` - Alphanumeric character predicate
82
83- ``isalpha`` - Alphabetic character predicate
84
85- ``isascii`` - ASCII character predicate
86
87- ``iscntrl`` - Control character predicate
88
89- ``isdigit`` - Decimal digit predicate
90
91- ``islower`` - Lower-case character predicate
92
93- ``isprint`` - Printable character predicates (isprint, isgraph)
94
95- ``ispunct`` - Punctuation character predicate
96
97- ``isspace`` - Whitespace character predicate
98
99- ``isupper`` - Uppercase character predicate
100
101- ``isxdigit`` - Hexadecimal digit predicate
102
103- ``toascii`` - Force integers to ASCII range
104
105- ``tolower`` - Translate characters to lower case
106
107- ``toupper`` - Translate characters to upper case
108
109Input and Output (stdio.h)
110==========================
111
112- ``clearerr`` - Clear file or stream error indicator
113
114- ``fclose`` - Close a file
115
116- ``feof`` - Test for end of file
117
118- ``ferror`` - Test whether read/write error has occurred
119
120- ``fflush`` - Flush buffered file output
121
122- ``fgetc`` - Get a character from a file or stream
123
124- ``fgetpos`` - Record position in a stream or file
125
126- ``fgets`` - Get character string from a file or stream
127
128- ``fiprintf`` - Write formatted output to file (integer only)
129
130- ``fopen`` - Open a file
131
132- ``fdopen`` - Turn an open file into a stream
133
134- ``fputc`` - Write a character on a stream or file
135
136- ``fputs`` - Write a character string in a file or stream
137
138- ``fread`` - Read array elements from a file
139
140- ``freopen`` - Open a file using an existing file descriptor
141
142- ``fseek`` - Set file position
143
144- ``fsetpos`` - Restore position of a stream or file
145
146- ``ftell`` - Return position in a stream or file
147
148- ``fwrite`` - Write array elements from memory to a file or stream
149
150- ``getc`` - Get a character from a file or stream (macro)
151
152- ``getchar`` - Get a character from standard input (macro)
153
154- ``gets`` - Get character string from standard input (obsolete)
155
156- ``iprintf`` - Write formatted output (integer only)
157
158- ``mktemp`` - Generate unused file name
159
160- ``perror`` - Print an error message on standard error
161
162- ``putc`` - Write a character on a stream or file (macro)
163
164- ``putchar`` - Write a character on standard output (macro)
165
166- ``puts`` - Write a character string on standard output
167
168- ``remove`` - Delete a file's name
169
170- ``rename`` - Rename a file
171
172- ``rewind`` - Reinitialize a file or stream
173
174- ``setbuf`` - Specify full buffering for a file or stream
175
176- ``setvbuf`` - Specify buffering for a file or stream
177
178- ``siprintf`` - Write formatted output (integer only)
179
180- ``printf`` - Write formatted output
181
182- ``scanf`` - Scan and format input
183
184- ``tmpfile`` - Create a temporary file
185
186- ``tmpnam`` - Generate name for a temporary file
187
188- ``vprintf`` - Format variable argument list
189
190Strings and Memory (string.h)
191=============================
192
193- ``bcmp`` - Compare two memory areas
194
195- ``bcopy`` - Copy memory regions
196
197- ``bzero`` - Initialize memory to zero
198
199- ``index`` - Search for character in string
200
201- ``memchr`` - Find character in memory
202
203- ``memcmp`` - Compare two memory areas
204
205- ``memcpy`` - Copy memory regions
206
207- ``memmove`` - Move possibly overlapping memory
208
209- ``memset`` - Set an area of memory
210
211- ``rindex`` - Reverse search for character in string
212
213- ``strcasecmp`` - Compare strings ignoring case
214
215- ``strcat`` - Concatenate strings
216
217- ``strchr`` - Search for character in string
218
219- ``strcmp`` - Character string compare
220
221- ``strcoll`` - Locale specific character string compare
222
223- ``strcpy`` - Copy string
224
225- ``strcspn`` - Count chars not in string
226
227- ``strerror`` - Convert error number to string
228
229- ``strlen`` - Character string length
230
231- ``strlwr`` - Convert string to lower case
232
233- ``strncasecmp`` - Compare strings ignoring case
234
235- ``strncat`` - Concatenate strings
236
237- ``strncmp`` - Character string compare
238
239- ``strncpy`` - Counted copy string
240
241- ``strpbrk`` - Find chars in string
242
243- ``strrchr`` - Reverse search for character in string
244
245- ``strspn`` - Find initial match
246
247- ``strstr`` - Find string segment
248
249- ``strtok`` - Get next token from a string
250
251- ``strupr`` - Convert string to upper case
252
253- ``strxfrm`` - Transform string
254
255Signal Handling (signal.h)
256==========================
257
258- ``raise`` - Send a signal
259
260- ``signal`` - Specify handler subroutine for a signal
261
262Time Functions (time.h)
263=======================
264
265- ``asctime`` - Format time as string
266
267- ``clock`` - Cumulative processor time
268
269- ``ctime`` - Convert time to local and format as string
270
271- ``difftime`` - Subtract two times
272
273- ``gmtime`` - Convert time to UTC (GMT) traditional representation
274
275- ``localtime`` - Convert time to local representation
276
277- ``mktime`` - Convert time to arithmetic representation
278
279- ``strftime`` - Flexible calendar time formatter
280
281- ``time`` - Get current calendar time (as single number)
282
283Locale (locale.h)
284=================
285
286- ``setlocale`` - Select or query locale
287
288Reentrant Versions of Functions
289===============================
290
291- Equivalent for errno variable:
292  - ``errno_r`` - XXX
293
294- Locale functions:
295  - ``localeconv_r`` - XXX
296  - ``setlocale_r`` - XXX
297
298- Equivalents for stdio variables:
299  - ``stdin_r`` - XXX
300  - ``stdout_r`` - XXX
301  - ``stderr_r`` - XXX
302
303- Stdio functions:
304  - ``fdopen_r`` - XXX
305  - ``perror_r`` - XXX
306  - ``tempnam_r`` - XXX
307  - ``fopen_r`` - XXX
308  - ``putchar_r`` - XXX
309  - ``tmpnam_r`` - XXX
310  - ``getchar_r`` - XXX
311  - ``puts_r`` - XXX
312  - ``tmpfile_r`` - XXX
313  - ``gets_r`` - XXX
314  - ``remove_r`` - XXX
315  - ``vfprintf_r`` - XXX
316  - ``iprintf_r`` - XXX
317  - ``rename_r`` - XXX
318  - ``vsnprintf_r`` - XXX
319  - ``mkstemp_r`` - XXX
320  - ``snprintf_r`` - XXX
321  - ``vsprintf_r`` - XXX
322  - ``mktemp_t`` - XXX
323  - ``sprintf_r`` - XXX
324
325- Signal functions:
326  - ``init_signal_r`` - XXX
327  - ``signal_r`` - XXX
328  - ``kill_r`` - XXX
329  - ``_sigtramp_r`` - XXX
330  - ``raise_r`` - XXX
331
332- Stdlib functions:
333  - ``calloc_r`` - XXX
334  - ``mblen_r`` - XXX
335  - ``srand_r`` - XXX
336  - ``dtoa_r`` - XXX
337  - ``mbstowcs_r`` - XXX
338  - ``strtod_r`` - XXX
339  - ``free_r`` - XXX
340  - ``mbtowc_r`` - XXX
341  - ``strtol_r`` - XXX
342  - ``getenv_r`` - XXX
343  - ``memalign_r`` - XXX
344  - ``strtoul_r`` - XXX
345  - ``mallinfo_r`` - XXX
346  - ``mstats_r`` - XXX
347  - ``system_r`` - XXX
348  - ``malloc_r`` - XXX
349  - ``rand_r`` - XXX
350  - ``wcstombs_r`` - XXX
351  - ``malloc_r`` - XXX
352  - ``realloc_r`` - XXX
353  - ``wctomb_r`` - XXX
354  - ``malloc_stats_r`` - XXX
355  - ``setenv_r`` - XXX
356
357- String functions:
358  - ``strtok_r`` - XXX
359
360- System functions:
361  - ``close_r`` - XXX
362  - ``link_r`` - XXX
363  - ``unlink_r`` - XXX
364  - ``execve_r`` - XXX
365  - ``lseek_r`` - XXX
366  - ``wait_r`` - XXX
367  - ``fcntl_r`` - XXX
368  - ``open_r`` - XXX
369  - ``write_r`` - XXX
370  - ``fork_r`` - XXX
371  - ``read_r`` - XXX
372  - ``fstat_r`` - XXX
373  - ``sbrk_r`` - XXX
374  - ``gettimeofday_r`` - XXX
375  - ``stat_r`` - XXX
376  - ``getpid_r`` - XXX
377  - ``times_r`` - XXX
378
379- Time function:
380  - ``asctime_r`` - XXX
381
382Miscellaneous Macros and Functions
383==================================
384
385- ``unctrl`` - Return printable representation of a character
386
387Variable Argument Lists
388=======================
389
390- Stdarg (stdarg.h):
391  - ``va_start`` - XXX
392  - ``va_arg`` - XXX
393  - ``va_end`` - XXX
394
395- Vararg (varargs.h):
396  - ``va_alist`` - XXX
397  - ``va_start-trad`` - XXX
398  - ``va_arg-trad`` - XXX
399  - ``va_end-trad`` - XXX
400
401Reentrant System Calls
402======================
403
404- ``open_r`` - XXX
405
406- ``close_r`` - XXX
407
408- ``lseek_r`` - XXX
409
410- ``read_r`` - XXX
411
412- ``write_r`` - XXX
413
414- ``fork_r`` - XXX
415
416- ``wait_r`` - XXX
417
418- ``stat_r`` - XXX
419
420- ``fstat_r`` - XXX
421
422- ``link_r`` - XXX
423
424- ``unlink_r`` - XXX
425
426- ``sbrk_r`` - XXX
427
428.. COMMENT: COPYRIGHT (c) 1988-2002.
429
430.. COMMENT: On-Line Applications Research Corporation (OAR).
431
432.. COMMENT: All rights reserved.
433
Note: See TracBrowser for help on using the repository browser.