Changeset 1b20da0 in mainline for uspace/lib/posix
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- Location:
- uspace/lib/posix
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/float.h
rdf6ded8 r1b20da0 75 75 #undef LDBL_MAX 76 76 #define LDBL_MAX __LDBL_MAX__ 77 #undef LDBL_MANT_DIG 77 #undef LDBL_MANT_DIG 78 78 #define LDBL_MANT_DIG __LDBL_MANT_DIG__ 79 79 #else -
uspace/lib/posix/src/fnmatch.c
rdf6ded8 r1b20da0 37 37 * of adding POSIX-like locale support to the system in the future. Functions 38 38 * that are only necessary for locale support currently simply use single 39 * characters for "collation elements". 39 * characters for "collation elements". 40 40 * When (or if) locales are properly implemented, extending this implementation 41 41 * will be fairly straightforward. … … 194 194 /** 195 195 * Compare function for binary search in the _char_classes array. 196 * 196 * 197 197 * @param key Key of the searched element. 198 198 * @param elem Element of _char_classes array. … … 207 207 /** 208 208 * Returns whether the given character belongs to the specified character class. 209 * 209 * 210 210 * @param cname Name of the character class. 211 211 * @param c Character. … … 231 231 * Tries to parse an initial part of the pattern as a character class pattern, 232 232 * and if successful, matches the beginning of the given string against the class. 233 * 233 * 234 234 * @param pattern Pointer to the pattern to match. Must begin with a class 235 235 * specifier and is repositioned to the first character after the specifier … … 257 257 * Reads the next collating element in the pattern, taking into account 258 258 * locale (if supported) and flags (see fnmatch()). 259 * 259 * 260 260 * @param pattern Pattern. 261 261 * @param flags Flags given to fnmatch(). … … 309 309 * Matches the beginning of the given string against a bracket expression 310 310 * the pattern begins with. 311 * 311 * 312 312 * @param pattern Pointer to the beginning of a bracket expression in a pattern. 313 313 * On success, the pointer is moved to the first character after the … … 405 405 * Matches a portion of the pattern containing no asterisks (*) against 406 406 * the given string. 407 * 407 * 408 408 * @param pattern Pointer to the unmatched portion of the pattern. 409 409 * On success, the pointer is moved to the first asterisk, or to the … … 508 508 /** 509 509 * Match string against a pattern. 510 * 510 * 511 511 * @param pattern Pattern. 512 512 * @param string String to match. … … 571 571 /** 572 572 * Transform the entire string to lowercase. 573 * 573 * 574 574 * @param s Input string. 575 575 * @return Newly allocated copy of the input string with all uppercase -
uspace/lib/posix/src/locale.c
rdf6ded8 r1b20da0 80 80 /** 81 81 * Set program locale. 82 * 82 * 83 83 * @param category What category to set. 84 84 * @param locale Locale name. … … 97 97 /** 98 98 * Return locale-specific information. 99 * 99 * 100 100 * @return Information about the current locale. 101 101 */ … … 108 108 /** 109 109 * Duplicate locale object. 110 * 110 * 111 111 * @param locobj Object to duplicate. 112 112 * @return Duplicated object. … … 129 129 /** 130 130 * Free locale object. 131 * 131 * 132 132 * @param locobj Object to free. 133 133 */ … … 141 141 /** 142 142 * Create or modify a locale object. 143 * 143 * 144 144 * @param category_mask Mask of categories to be set or modified. 145 145 * @param locale Locale to be used. … … 169 169 /** 170 170 * Set locale for the current thread. 171 * 171 * 172 172 * @param newloc Locale to use. 173 173 * @return The previously set locale or LC_GLOBAL_LOCALE -
uspace/lib/posix/src/signal.c
rdf6ded8 r1b20da0 65 65 /* Actions associated with each signal number. */ 66 66 static struct sigaction _signal_actions[_TOP_SIGNAL + 1] = { 67 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 68 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 69 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 70 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 71 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 72 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 67 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 68 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 69 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 70 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 71 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 72 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, 73 73 DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER, DEFAULT_HANDLER 74 74 }; … … 147 147 /** 148 148 * Empty function to be used as ignoring handler. 149 * 149 * 150 150 * @param signo Signal number. 151 151 */ … … 157 157 /** 158 158 * Clear the signal set. 159 * 159 * 160 160 * @param set Pointer to the signal set. 161 161 * @return Always returns zero. … … 171 171 /** 172 172 * Fill the signal set (i.e. add all signals). 173 * 173 * 174 174 * @param set Pointer to the signal set. 175 175 * @return Always returns zero. … … 185 185 /** 186 186 * Add a signal to the set. 187 * 187 * 188 188 * @param set Pointer to the signal set. 189 189 * @param signo Signal number to add. … … 200 200 /** 201 201 * Delete a signal from the set. 202 * 202 * 203 203 * @param set Pointer to the signal set. 204 204 * @param signo Signal number to remove. … … 215 215 /** 216 216 * Inclusion test for a signal set. 217 * 217 * 218 218 * @param set Pointer to the signal set. 219 219 * @param signo Signal number to query. … … 231 231 * Doesn't do any checking of its arguments and 232 232 * does not deal with thread-safety. 233 * 233 * 234 234 * @param sig 235 235 * @param act … … 252 252 /** 253 253 * Sets a new action for the given signal number. 254 * 254 * 255 255 * @param sig Signal number to set action for. 256 256 * @param act If not NULL, contents of this structure are 257 257 * used as the new action for the signal. 258 258 * @param oact If not NULL, the original action associated with the signal 259 * is stored in the structure pointer to. 259 * is stored in the structure pointer to. 260 260 * @return -1 with errno set on failure, 0 on success. 261 261 */ … … 286 286 /** 287 287 * Sets a new handler for the given signal number. 288 * 288 * 289 289 * @param sig Signal number to set handler for. 290 290 * @param func Handler function. … … 404 404 /** 405 405 * Raise a signal for the calling process. 406 * 406 * 407 407 * @param sig Signal number. 408 408 * @return -1 with errno set on failure, 0 on success. … … 424 424 /** 425 425 * Raises a signal for a selected process. 426 * 426 * 427 427 * @param pid PID of the process for which the signal shall be raised. 428 428 * @param signo Signal to raise. … … 463 463 * Send a signal to a process group. Always fails at the moment because of 464 464 * lack of this functionality in HelenOS. 465 * 465 * 466 466 * @param pid PID of the process group. 467 467 * @param sig Signal number. … … 476 476 /** 477 477 * Outputs information about the signal to the standard error stream. 478 * 478 * 479 479 * @param pinfo SigInfo struct to write. 480 480 * @param message String to output alongside human-readable signal description. … … 489 489 /** 490 490 * Outputs information about the signal to the standard error stream. 491 * 491 * 492 492 * @param signum Signal number. 493 493 * @param message String to output alongside human-readable signal description. … … 505 505 /** 506 506 * Manipulate the signal mask of the calling thread. 507 * 507 * 508 508 * @param how What to do with the mask. 509 509 * @param set Signal set to work with. … … 545 545 /** 546 546 * Manipulate the signal mask of the process. 547 * 547 * 548 548 * @param how What to do with the mask. 549 549 * @param set Signal set to work with. -
uspace/lib/posix/src/stdio.c
rdf6ded8 r1b20da0 148 148 /** 149 149 * Read a stream until the newline (or EOF) is encountered. 150 * 150 * 151 151 * @param lineptr Pointer to the output buffer in which there will be stored 152 152 * nul-terminated string together with the delimiter (if encountered). … … 208 208 /** 209 209 * Reposition a file-position indicator in a stream. 210 * 210 * 211 211 * @param stream Stream to seek in. 212 212 * @param offset Direction and amount of bytes to seek. … … 221 221 /** 222 222 * Discover current file offset in a stream. 223 * 223 * 224 224 * @param stream Stream for which the offset shall be retrieved. 225 225 * @return Current offset or -1 if not possible. … … 265 265 /** 266 266 * Write wide string to the opened file. 267 * 267 * 268 268 * @param str String to be written. 269 269 * @param size Size of the string (in bytes). … … 298 298 /** 299 299 * Print formatted output to the opened file. 300 * 300 * 301 301 * @param fildes File descriptor of the opened file. 302 302 * @param format Format description. … … 317 317 /** 318 318 * Print formatted output to the string. 319 * 319 * 320 320 * @param s Output string. 321 321 * @param format Format description. … … 334 334 /** 335 335 * Print formatted output to the string. 336 * 336 * 337 337 * @param s Output string. 338 338 * @param format Format description. … … 348 348 /** 349 349 * Convert formatted input from the stream. 350 * 350 * 351 351 * @param stream Input stream. 352 352 * @param format Format description. … … 364 364 /** 365 365 * Convert formatted input from the standard input. 366 * 366 * 367 367 * @param format Format description. 368 368 * @return The number of converted output items or EOF on failure. … … 379 379 /** 380 380 * Convert formatted input from the standard input. 381 * 381 * 382 382 * @param format Format description. 383 383 * @param arg Output items. … … 391 391 /** 392 392 * Convert formatted input from the string. 393 * 393 * 394 394 * @param s Input string. 395 395 * @param format Format description. … … 472 472 /** 473 473 * Put a byte on the standard output stream (thread-unsafe). 474 * 474 * 475 475 * @param c Byte to output. 476 476 * @return Either written byte or EOF. -
uspace/lib/posix/src/stdio/scanf.c
rdf6ded8 r1b20da0 384 384 * Decides whether provided character specifies integer conversion. If so, the 385 385 * semantics of the conversion is stored through provided pointers.. 386 * 386 * 387 387 * @param c Candidate on the integer conversion. 388 388 * @param is_unsigned Pointer to store whether the conversion is signed or not. … … 484 484 * 485 485 * NOT SUPPORTED: locale (see strtold), wide chars, numbered output arguments 486 * 486 * 487 487 * @param in Input provider. 488 488 * @param fmt Format description. -
uspace/lib/posix/src/stdlib.c
rdf6ded8 r1b20da0 51 51 52 52 /** 53 * 53 * 54 54 * @param array 55 55 * @param count … … 66 66 /** 67 67 * Integer absolute value. 68 * 68 * 69 69 * @param i Input value. 70 70 * @return Absolute value of the parameter. … … 77 77 /** 78 78 * Long integer absolute value. 79 * 79 * 80 80 * @param i Input value. 81 81 * @return Absolute value of the parameter. … … 88 88 /** 89 89 * Long long integer absolute value. 90 * 90 * 91 91 * @param i Input value. 92 92 * @return Absolute value of the parameter. … … 184 184 185 185 /** 186 * 186 * 187 187 * @param name 188 188 * @param resolved … … 212 212 /** 213 213 * Resolve absolute pathname. 214 * 214 * 215 215 * @param name Pathname to be resolved. 216 216 * @param resolved Either buffer for the resolved absolute pathname or NULL. -
uspace/lib/posix/src/stdlib/strtold.c
rdf6ded8 r1b20da0 232 232 * Function expects the string pointer to be already pointed at the first 233 233 * digit (i.e. leading optional sign was already consumed by the caller). 234 * 234 * 235 235 * @param sptr Pointer to the storage of the string pointer. Upon successful 236 236 * conversion, the string pointer is updated to point to the first … … 303 303 /** 304 304 * Derive a hexadecimal digit from its character representation. 305 * 305 * 306 306 * @param ch Character representation of the hexadecimal digit. 307 307 * @return Digit value represented by an integer. -
uspace/lib/posix/src/sys/stat.c
rdf6ded8 r1b20da0 93 93 /** 94 94 * Retrieve file status for symbolic link. 95 * 95 * 96 96 * @param path Path to the symbolic link. 97 97 * @param st Status structure to be filled with information. … … 121 121 /** 122 122 * Change permission bits for the file if possible. 123 * 123 * 124 124 * @param path Path to the file. 125 125 * @param mode Permission bits to be set. … … 134 134 /** 135 135 * Set the file mode creation mask of the process. 136 * 136 * 137 137 * @param mask Set permission bits are cleared in the related creation 138 138 * functions. Non-permission bits are ignored. … … 147 147 /** 148 148 * Create a directory. 149 * 149 * 150 150 * @param path Path to the new directory. 151 151 * @param mode Permission bits to be set. -
uspace/lib/posix/src/sys/wait.c
rdf6ded8 r1b20da0 68 68 /** 69 69 * Wait for any child process to stop or terminate. 70 * 70 * 71 71 * @param stat_ptr Location of the final status code of the child process. 72 72 * @return ID of the child process for which status is reported, … … 82 82 /** 83 83 * Wait for a child process to stop or terminate. 84 * 84 * 85 85 * @param pid What child process shall the caller wait for. See POSIX manual 86 86 * for details. -
uspace/lib/posix/src/time.c
rdf6ded8 r1b20da0 78 78 /** 79 79 * Converts a time value to a broken-down UTC time. 80 * 80 * 81 81 * @param timer Time to convert. 82 82 * @param result Structure to store the result to. … … 110 110 /** 111 111 * Converts a time value to a broken-down local time. 112 * 112 * 113 113 * @param timer Time to convert. 114 114 * @param result Structure to store the result to. … … 173 173 * Converts the calendar time to a string in format 174 174 * "Sun Jan 1 00:00:00 1970\n" (Obsolete) 175 * 175 * 176 176 * @param timer Time to convert. 177 177 * @param buf Buffer to store string to. Must be at least ASCTIME_BUF_LEN … … 228 228 /** 229 229 * Get time. Only CLOCK_REALTIME is supported. 230 * 230 * 231 231 * @param clock_id ID of the clock to query. 232 232 * @param tp Pointer to the variable where the time is to be written. … … 254 254 * Set time on a specified clock. As HelenOS doesn't support this yet, 255 255 * this function always fails. 256 * 256 * 257 257 * @param clock_id ID of the clock to set. 258 258 * @param tp Time to set. … … 279 279 /** 280 280 * Sleep on a specified clock. 281 * 281 * 282 282 * @param clock_id ID of the clock to sleep on (only CLOCK_REALTIME supported). 283 283 * @param flags Flags (none supported). -
uspace/lib/posix/src/unistd.c
rdf6ded8 r1b20da0 124 124 char *getcwd(char *buf, size_t size) 125 125 { 126 if (failed(vfs_cwd_get(buf, size))) 126 if (failed(vfs_cwd_get(buf, size))) 127 127 return NULL; 128 128 return buf; … … 174 174 /** 175 175 * Get the real group ID of the calling process. 176 * 176 * 177 177 * @return Group ID. 178 178 */ … … 309 309 /** 310 310 * Remove a link to a file. 311 * 311 * 312 312 * @param path File pathname. 313 313 * @return Zero on success, -1 otherwise. … … 334 334 /** 335 335 * Duplicate an open file descriptor. 336 * 336 * 337 337 * @param fildes File descriptor to be duplicated. 338 338 * @param fildes2 File descriptor to be paired with the same file description … … 378 378 /** 379 379 * Get configurable system variables. 380 * 380 * 381 381 * @param name Variable name. 382 382 * @return Variable value. … … 421 421 422 422 /** 423 * 423 * 424 424 * @param path 425 425 * @param name … … 434 434 435 435 /** 436 * 436 * 437 437 * @return 438 438 */ … … 445 445 446 446 /** 447 * 447 * 448 448 * @param path 449 449 * @param argv … … 458 458 459 459 /** 460 * 460 * 461 461 * @param file 462 462 * @param argv … … 471 471 472 472 /** 473 * 473 * 474 474 * @param fildes 475 475 * @return
Note:
See TracChangeset
for help on using the changeset viewer.