diff options
author | Thomas Touhey <thomas@touhey.fr> | 2021-09-02 12:15:50 +0200 |
---|---|---|
committer | Thomas Touhey <thomas@touhey.fr> | 2021-09-02 12:15:50 +0200 |
commit | 3ad8d070e73c48fe3675bb38a3d8d6b3fe92e5bd (patch) | |
tree | 4783fa77927ee20c46b7af43b250beb0c2f4e3bb | |
parent | ea17794786c4ef1ddf1dbb503f5d385e9bc1f81b (diff) |
-rw-r--r-- | docs/Makefile | 2 | ||||
-rw-r--r-- | docs/Pipfile.lock | 185 | ||||
-rw-r--r-- | docs/devel/concepts.rst | 16 | ||||
-rw-r--r-- | docs/user.rst | 4 | ||||
-rw-r--r-- | docs/user/concepts.rst | 2 | ||||
-rw-r--r-- | docs/user/iterators.rst | 2 | ||||
-rw-r--r-- | docs/user/objects.rst | 4 | ||||
-rw-r--r-- | docs/user/time.rst | 4 | ||||
-rw-r--r-- | include/libtio/fs.h | 24 | ||||
-rw-r--r-- | lib/system/unix/fs.c | 6 |
10 files changed, 114 insertions, 135 deletions
diff --git a/docs/Makefile b/docs/Makefile index 2340e95..826aeec 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -9,7 +9,7 @@ SPHINXBUILD = $(PE) sphinx-build SPHINXWATCH = $(PE) sphinx-autobuild SOURCEDIR = . BUILDDIR = _build -WEBROOT = libtio.touhey.pro:libtio_doc +WEBROOT = hercule:libtio/docs # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/Pipfile.lock b/docs/Pipfile.lock index f41193c..d0a15fc 100644 --- a/docs/Pipfile.lock +++ b/docs/Pipfile.lock @@ -23,26 +23,20 @@ ], "version": "==0.7.12" }, - "argh": { - "hashes": [ - "sha256:a9b3aaa1904eeb78e32394cd46c6f37ac0fb4af6dc488daa58971bdc7d7fcaf3", - "sha256:e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" - ], - "version": "==0.26.2" - }, "babel": { "hashes": [ "sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38", "sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.0" }, "certifi": { "hashes": [ - "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3", - "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" ], - "version": "==2019.11.28" + "version": "==2020.6.20" }, "chardet": { "hashes": [ @@ -56,35 +50,38 @@ "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af", "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==0.16" }, "idna": { "hashes": [ - "sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb", - "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa" + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], - "version": "==2.9" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.10" }, "imagesize": { "hashes": [ "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1", "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.2.0" }, "jinja2": { "hashes": [ - "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250", - "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49" + "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", + "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], - "version": "==2.11.1" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.11.2" }, "livereload": { "hashes": [ - "sha256:78d55f2c268a8823ba499305dcac64e28ddeb9a92571e12d543cd304faf5817b", - "sha256:89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66" + "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869" ], - "version": "==2.6.1" + "version": "==2.6.3" }, "markupsafe": { "hashes": [ @@ -122,77 +119,55 @@ "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "packaging": { "hashes": [ - "sha256:170748228214b70b672c581a3dd610ee51f733018650740e98c7df862a583f73", - "sha256:e665345f9eef0c621aa0bf2f8d78cf6d21904eef16a93f020240b704a57f1334" - ], - "version": "==20.1" - }, - "pathtools": { - "hashes": [ - "sha256:7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" + "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", + "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" ], - "version": "==0.1.2" - }, - "port-for": { - "hashes": [ - "sha256:b16a84bb29c2954db44c29be38b17c659c9c27e33918dec16b90d375cc596f1c" - ], - "version": "==0.3.1" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==20.4" }, "pygments": { "hashes": [ - "sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b", - "sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" + "sha256:307543fe65c0947b126e83dd5a61bd8acbd84abec11f43caebaf5534cbc17998", + "sha256:926c3f319eda178d1bd90851e4317e6d8cdb5e292a3386aac9bd75eca29cf9c7" ], - "version": "==2.5.2" + "markers": "python_version >= '3.5'", + "version": "==2.7.1" }, "pyparsing": { "hashes": [ - "sha256:4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f", - "sha256:c342dccb5250c08d45fd6f8b4a559613ca603b57498511740e65cd11a2e7dcec" + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "version": "==2.4.6" + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.4.7" }, "pytz": { "hashes": [ - "sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d", - "sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" + "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed", + "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" ], - "version": "==2019.3" - }, - "pyyaml": { - "hashes": [ - "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6", - "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf", - "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5", - "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e", - "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811", - "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e", - "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d", - "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20", - "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689", - "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994", - "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - ], - "version": "==5.3" + "version": "==2020.1" }, "requests": { "hashes": [ - "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee", - "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" ], - "version": "==2.23.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.24.0" }, "six": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.15.0" }, "snowballstemmer": { "hashes": [ @@ -203,47 +178,50 @@ }, "sphinx": { "hashes": [ - "sha256:776ff8333181138fae52df65be733127539623bb46cc692e7fa0fcfc80d7aa88", - "sha256:ca762da97c3b5107cbf0ab9e11d3ec7ab8d3c31377266fd613b962ed971df709" + "sha256:321d6d9b16fa381a5306e5a0b76cd48ffbc588e6340059a729c6fdd66087e0e8", + "sha256:ce6fd7ff5b215af39e2fcd44d4a321f6694b4530b6f2b2109b64d120773faea0" ], "index": "pypi", - "version": "==2.4.3" + "version": "==3.2.1" }, "sphinx-autobuild": { "hashes": [ - "sha256:66388f81884666e3821edbe05dd53a0cfb68093873d17320d0610de8db28c74e", - "sha256:e60aea0789cab02fa32ee63c7acae5ef41c06f1434d9fd0a74250a61f5994692" + "sha256:4b184a7db893f2100bbd831991ae54ca89167a2b9ce68faea71eaa9e37716aed", + "sha256:df5c72cb8b8fc9b31279c4619780c4e95029be6de569ff60a8bb2e99d20f63dd" ], "index": "pypi", - "version": "==0.7.1" + "version": "==2020.9.1" }, "sphinx-rtd-theme": { "hashes": [ - "sha256:00cf895504a7895ee433807c62094cf1e95f065843bf3acd17037c3e9a2becd4", - "sha256:728607e34d60456d736cc7991fd236afb828b21b82f956c5ea75f94c8414040a" + "sha256:22c795ba2832a169ca301cd0a083f7a434e09c538c70beb42782c073651b707d", + "sha256:373413d0f82425aaa28fb288009bf0d0964711d347763af2f1b65cafcb028c82" ], "index": "pypi", - "version": "==0.4.3" + "version": "==0.5.0" }, "sphinxcontrib-applehelp": { "hashes": [ - "sha256:edaa0ab2b2bc74403149cb0209d6775c96de797dfd5b5e2a71981309efab3897", - "sha256:fb8dee85af95e5c30c91f10e7eb3c8967308518e0f7488a2828ef7bc191d0d5d" + "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a", + "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58" ], - "version": "==1.0.1" + "markers": "python_version >= '3.5'", + "version": "==1.0.2" }, "sphinxcontrib-devhelp": { "hashes": [ - "sha256:6c64b077937330a9128a4da74586e8c2130262f014689b4b89e2d08ee7294a34", - "sha256:9512ecb00a2b0821a146736b39f7aeb90759834b07e81e8cc23a9c70bacb9981" + "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e", + "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4" ], - "version": "==1.0.1" + "markers": "python_version >= '3.5'", + "version": "==1.0.2" }, "sphinxcontrib-htmlhelp": { "hashes": [ "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f", "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b" ], + "markers": "python_version >= '3.5'", "version": "==1.0.3" }, "sphinxcontrib-jsmath": { @@ -251,46 +229,47 @@ "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" ], + "markers": "python_version >= '3.5'", "version": "==1.0.1" }, "sphinxcontrib-qthelp": { "hashes": [ - "sha256:513049b93031beb1f57d4daea74068a4feb77aa5630f856fcff2e50de14e9a20", - "sha256:79465ce11ae5694ff165becda529a600c754f4bc459778778c7017374d4d406f" + "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72", + "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6" ], - "version": "==1.0.2" + "markers": "python_version >= '3.5'", + "version": "==1.0.3" }, "sphinxcontrib-serializinghtml": { "hashes": [ - "sha256:c0efb33f8052c04fd7a26c0a07f1678e8512e0faec19f4aa8f2473a8b81d5227", - "sha256:db6615af393650bf1151a6cd39120c29abaf93cc60db8c48eb2dddbfdc3a9768" + "sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc", + "sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a" ], - "version": "==1.1.3" + "markers": "python_version >= '3.5'", + "version": "==1.1.4" }, "tornado": { "hashes": [ - "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c", - "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60", - "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281", - "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5", - "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7", - "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9", - "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5" + "sha256:0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc", + "sha256:22aed82c2ea340c3771e3babc5ef220272f6fd06b5108a53b4976d0d722bcd52", + "sha256:2c027eb2a393d964b22b5c154d1a23a5f8727db6fda837118a776b29e2b8ebc6", + "sha256:5217e601700f24e966ddab689f90b7ea4bd91ff3357c3600fa1045e26d68e55d", + "sha256:5618f72e947533832cbc3dec54e1dffc1747a5cb17d1fd91577ed14fa0dc081b", + "sha256:5f6a07e62e799be5d2330e68d808c8ac41d4a259b9cea61da4101b83cb5dc673", + "sha256:c58d56003daf1b616336781b26d184023ea4af13ae143d9dda65e31e534940b9", + "sha256:c952975c8ba74f546ae6de2e226ab3cc3cc11ae47baf607459a6728585bb542a", + "sha256:c98232a3ac391f5faea6821b53db8db461157baa788f5d6222a193e9456e1740" ], - "version": "==6.0.3" + "markers": "python_version >= '3.5'", + "version": "==6.0.4" }, "urllib3": { "hashes": [ - "sha256:2f3db8b19923a873b3e5256dc9c2dedfa883e33d87c690d9c7913e1f40673cdc", - "sha256:87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - ], - "version": "==1.25.8" - }, - "watchdog": { - "hashes": [ - "sha256:c560efb643faed5ef28784b2245cf8874f939569717a4a12826a173ac644456b" + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" ], - "version": "==0.10.2" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "version": "==1.25.10" } }, "develop": {} diff --git a/docs/devel/concepts.rst b/docs/devel/concepts.rst index ece07a8..5948406 100644 --- a/docs/devel/concepts.rst +++ b/docs/devel/concepts.rst @@ -49,7 +49,7 @@ For portability (e.g. call conventions and other compiler-specific mess), libtio uses a few macros for declaring and defining functions that you are expected to use if you ought to add some stuff: -.. function:: OF(ARGS) +.. c:macro:: OF(ARGS) This is a macro originally from `Zlib <https://www.zlib.net/>`_. It is used on function declarations for compatibility with K&R (pre-ANSI) C, @@ -71,7 +71,7 @@ expected to use if you ought to add some stuff: int my_function OF((int arg, char const *carg)); -.. function:: TIO_EXTERN(TYPE) +.. c:macro:: TIO_EXTERN(TYPE) Declare or define a function exported or ought to be. For example, with a declaration and a definition: @@ -97,7 +97,7 @@ expected to use if you ought to add some stuff: * explicitely so we don't run into problems. */ extern int WINAPI my_function(int arg1, int arg2); -.. function:: TIO_NORETURN +.. c:macro:: TIO_NORETURN Use instead of :c:func:`TIO_EXTERN` for functions that are not supposed to return, e.g. if they ``exit()`` or ``abort()``. For example: @@ -107,7 +107,7 @@ expected to use if you ought to add some stuff: TIO_NORETURN panic_and_set_fire_to_the_computer OF((char const *msg)); -.. function:: TIO_LOCAL(TYPE) +.. c:macro:: TIO_LOCAL(TYPE) Use for defining a function internal to the file. For example, with a declaration and a definition: @@ -128,12 +128,12 @@ expected to use if you ought to add some stuff: /* Within normal circumstances. */ static int my_function(int arg1, int arg2); -.. function:: TIO_HOOK(TYPE) +.. c:macro:: TIO_HOOK(TYPE) Equivalent of :c:func:`TIO_LOCAL` for functions that ought to be used as hooks, i.e. callbacks for libtio. -.. function:: TIO_HOOK_TYPE(TYPE) +.. c:macro:: TIO_HOOK_TYPE(TYPE) Extern function as a type, for using hook functions as callbacks within ``typedef`` or other type definitions. For example: @@ -143,12 +143,12 @@ expected to use if you ought to add some stuff: typedef TIO_EXTERN_TYPE(int) my_function_t OF((int arg1, int arg2)); -.. function:: TIO_EXTERN_TYPE(TYPE) +.. c:macro:: TIO_EXTERN_TYPE(TYPE) Equivalent of :c:func:`TIO_HOOK_TYPE` for exported functions to be used and stored as hooks. -.. function:: TIO_DEPRECATED +.. c:macro:: TIO_DEPRECATED Prefix for function declarations and definitions which will be marked as deprecated for the compiler (if it supports it). For example: diff --git a/docs/user.rst b/docs/user.rst index aa38343..ac66fa3 100644 --- a/docs/user.rst +++ b/docs/user.rst @@ -10,10 +10,10 @@ developers must also know in order to contribute to the project. :maxdepth: 2 user/concepts - user/objects + user/system user/iterators user/time - user/system user/chrono user/streams user/logging + user/fs diff --git a/docs/user/concepts.rst b/docs/user/concepts.rst index 21a3cb5..5b39e7d 100644 --- a/docs/user/concepts.rst +++ b/docs/user/concepts.rst @@ -47,7 +47,7 @@ for compatibility. Errors ------ -Almost all functions that can fail in libtio return an :c:type:`int`, even if +Almost all functions that can fail in libtio return an :c:expr:`int`, even if they open a handle or descriptor of some kind (which is usually passed by using a pointer to it as a first argument). This integer corresponds to the error that occured in the function, or zero, representing the "everything diff --git a/docs/user/iterators.rst b/docs/user/iterators.rst index f1c9876..6c0d848 100644 --- a/docs/user/iterators.rst +++ b/docs/user/iterators.rst @@ -25,7 +25,7 @@ To get the next element on an iterator, you can use the following function: An alias is usually defined for each iterator type, e.g. :c:func:`tio_next_log` for getting the next log level as a -:type:`char const *`. +:c:expr:`char const *`. This function returns either: diff --git a/docs/user/objects.rst b/docs/user/objects.rst deleted file mode 100644 index 0e3764f..0000000 --- a/docs/user/objects.rst +++ /dev/null @@ -1,4 +0,0 @@ -Objects in libtio -================= - -Everything in libtio is regrouped in objects. Objects are diff --git a/docs/user/time.rst b/docs/user/time.rst new file mode 100644 index 0000000..ad6d5d0 --- /dev/null +++ b/docs/user/time.rst @@ -0,0 +1,4 @@ +Time +==== + +Time is represented x diff --git a/include/libtio/fs.h b/include/libtio/fs.h index 11265f6..4f62f26 100644 --- a/include/libtio/fs.h +++ b/include/libtio/fs.h @@ -4,9 +4,9 @@ # include "stream.h" TIO_BEGIN_NAMESPACE -TIO_STRUCT(tio_file_cursor, tio_file_cursor_t) +TIO_STRUCT(tio_file_cursor, tio_file_cursor_t) TIO_STRUCT(tio_file_cursor_functions, tio_file_cursor_functions_t) -TIO_STRUCT(tio_stat, tio_stat_t) +TIO_STRUCT(tio_stat, tio_stat_t) /* File type. */ @@ -24,10 +24,10 @@ typedef int tio_file_type_t; struct tio_stat { tio_file_type_t tio_stat_type; - tio_off_t tio_stat_size; - tio_time_t *tio_stat_btime; - tio_time_t *tio_stat_atime; - tio_time_t *tio_stat_mtime; + tio_off_t tio_stat_size; + tio_time_t *tio_stat_btime; + tio_time_t *tio_stat_atime; + tio_time_t *tio_stat_mtime; }; /* Flags for opening a file. @@ -72,24 +72,24 @@ typedef TIO_HOOK_TYPE(int) tio_file_cursor_open_t # define TIO_FILECURSORFLAG_OPEN 32 struct tio_file_cursor_functions { - tio_file_cursor_close_t *tio_file_cursor_functions_close; - tio_file_cursor_copy_t *tio_file_cursor_functions_copy; + tio_file_cursor_close_t *tio_file_cursor_functions_close; + tio_file_cursor_copy_t *tio_file_cursor_functions_copy; /* Cursor interactions. */ - tio_file_cursor_move_t *tio_file_cursor_functions_move; + tio_file_cursor_move_t *tio_file_cursor_functions_move; /* Directory interactions. */ tio_file_cursor_create_directory_t *tio_file_cursor_functions_create_directory; tio_file_cursor_remove_t *tio_file_cursor_functions_remove; - tio_file_cursor_list_t *tio_file_cursor_functions_list; - tio_file_cursor_stat_t *tio_file_cursor_functions_stat; + tio_file_cursor_list_t *tio_file_cursor_functions_list; + tio_file_cursor_stat_t *tio_file_cursor_functions_stat; /* Stream interactions. */ - tio_file_cursor_open_t *tio_file_cursor_functions_open; + tio_file_cursor_open_t *tio_file_cursor_functions_open; }; /* --- diff --git a/lib/system/unix/fs.c b/lib/system/unix/fs.c index c277ef1..db0c2ea 100644 --- a/lib/system/unix/fs.c +++ b/lib/system/unix/fs.c @@ -64,11 +64,11 @@ TIO_HOOK(int) next_dir_entry(dir_cookie_t *cookie, tio_stat_t **statp) (unsigned long)((SRC).tv_nsec)) STXTIME(cookie->filest.tio_stat_btime, - statxbuf.stx_btime) + statxbuf.stx_btime); STXTIME(cookie->filest.tio_stat_atime, - statxbuf.stx_atime) + statxbuf.stx_atime); STXTIME(cookie->filest.tio_stat_mtime, - statxbuf.stx_mtime) + statxbuf.stx_mtime); # undef STXTIME |