diff --git a/src/header/getopt/mod.rs b/src/header/getopt/mod.rs index 5a3d926fb9..f095753d30 100644 --- a/src/header/getopt/mod.rs +++ b/src/header/getopt/mod.rs @@ -1,4 +1,6 @@ -//! getopt implementation for relibc +//! `getopt` implementation. +//! +//! See . #![deny(unsafe_op_in_unsafe_fn)] @@ -7,7 +9,7 @@ use crate::{ stdio, string, unistd::{optarg, opterr, optind, optopt}, }, - platform::types::*, + platform::types::{c_char, c_int, size_t}, }; use core::ptr; @@ -25,6 +27,11 @@ pub struct option { val: c_int, } +/// See . +/// +/// Non-POSIX. +/// +/// Functions the same as `getopt` but also accepts long options. #[unsafe(no_mangle)] pub unsafe extern "C" fn getopt_long( argc: c_int, diff --git a/src/header/unistd/getopt.rs b/src/header/unistd/getopt.rs index 52e9d3e43e..1729560ab7 100644 --- a/src/header/unistd/getopt.rs +++ b/src/header/unistd/getopt.rs @@ -1,8 +1,13 @@ -//! getopt implementation for Redox, following http://pubs.opengroup.org/onlinepubs/009695399/functions/getopt.html +//! `getopt` implementation. +//! +//! See . use core::ptr; -use crate::{header::getopt, platform::types::*}; +use crate::{ + header::getopt, + platform::types::{c_char, c_int}, +}; /// See . #[allow(non_upper_case_globals)]