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

4.115
Last change on this file since fa70fd2 was fa70fd2, checked in by Chris Johns <chrisj@…>, on 02/26/16 at 07:22:07

POSIX User clean up.

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