Changeset e8975278 in mainline for uspace/lib/posix/src/stdio/scanf.c
- Timestamp:
- 2018-05-10T15:14:02Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1420cae9
- Parents:
- ae7d03c
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-10 07:53:56)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-10 15:14:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/stdio/scanf.c
rae7d03c re8975278 61 61 _PROV_READY, 62 62 /** Cursor is temporarily lent to the external entity. No action is 63 63 * possible until the cursor is returned. */ 64 64 _PROV_CURSOR_LENT, 65 65 }; … … 74 74 int fetched; 75 75 /** Elements are fetched from the source in batches (e.g. by getline()) 76 76 * to allow using strtol/strtod family even on streams. */ 77 77 char *window; 78 78 /** Size of the current window. */ … … 84 84 85 85 /** Take control over data source. Finish initialization of the internal 86 86 * structures (e.g. allocation of window). */ 87 87 void (*capture)(struct __input_provider *); 88 88 /** Get a single element from the source and update the internal structures 89 90 89 * accordingly (e.g. greedy update of the window). Return -1 if the 90 * element cannot be obtained. */ 91 91 int (*pop)(struct __input_provider *); 92 92 /** Undo the most recent not-undone pop operation. Might be necesarry to 93 94 93 * flush current window and seek data source backwards. Return 0 if the 94 * pop history is exhausted, non-zero on success. */ 95 95 int (*undo)(struct __input_provider *); 96 96 /** Lend the cursor to the caller. */ 97 97 const char *(*borrow_cursor)(struct __input_provider *); 98 98 /** Take control over possibly incremented cursor and update the internal 99 99 * structures if necessary. */ 100 100 void (*return_cursor)(struct __input_provider *, const char *); 101 101 /** Release the control over the source. That is, synchronize any 102 103 102 * fetched but non-consumed elements (e.g. by seeking) and destruct 103 * internal structures (e.g. window deallocation). */ 104 104 void (*release)(struct __input_provider *); 105 105 } _input_provider; … … 411 411 *base = 10; 412 412 return 1; 413 case 'p': /* According to POSIX, %p modifier is implementation defined but 414 * must correspond to its printf counterpart. */ 413 case 'p': 414 /* According to POSIX, %p modifier is implementation defined but 415 * must correspond to its printf counterpart. */ 415 416 case 'x': 416 417 case 'X':
Note:
See TracChangeset
for help on using the changeset viewer.