1111#![ allow( clippy:: missing_safety_doc) ]
1212#![ allow( unused_imports) ]
1313
14+ // Useful imports
15+ mod ctype;
16+ pub use self :: ctype:: * ;
17+
18+ // Stateless implementations.
19+ // rustfmt will keep these in alphabetical order.
20+ mod abs;
21+ mod itoa;
22+ mod memchr;
23+ mod qsort;
24+ mod rand_r;
25+ mod snprintf;
26+ mod strcat;
27+ mod strchr;
28+ mod strcmp;
29+ mod strcpy;
30+ mod strcspn;
31+ mod strlen;
32+ mod strncasecmp;
33+ mod strncmp;
34+ mod strncpy;
35+ mod strrchr;
36+ mod strspn;
37+ mod strstr;
38+ mod strtol;
39+
40+ // Stateful implementations (which hence are optional).
41+ // rustfmt will keep these in alphabetical order.
1442#[ cfg( feature = "alloc" ) ]
1543mod malloc;
16- #[ cfg( feature = "alloc" ) ]
17- pub use self :: malloc:: { calloc, free, malloc, realloc} ;
44+ #[ cfg( feature = "rand" ) ]
45+ mod rand;
46+ #[ cfg( feature = "signal" ) ]
47+ mod signal;
1848
19- mod itoa;
49+ // Public re-exports.
50+ // rustfmt will keep these in alphabetical order.
51+ #[ cfg( feature = "abs" ) ]
52+ pub use self :: abs:: abs;
2053#[ cfg( feature = "itoa" ) ]
2154pub use self :: itoa:: itoa;
2255#[ cfg( feature = "utoa" ) ]
2356pub use self :: itoa:: utoa;
24-
25- mod abs;
26- #[ cfg( feature = "abs" ) ]
27- pub use self :: abs:: abs;
28-
29- mod rand_r;
30- #[ cfg( feature = "rand_r" ) ]
31- pub use self :: rand_r:: { rand_r, RAND_MAX } ;
32- #[ cfg( feature = "rand" ) ]
33- mod rand;
57+ #[ cfg( feature = "alloc" ) ]
58+ pub use self :: malloc:: { calloc, free, malloc, realloc} ;
59+ #[ cfg( feature = "memchr" ) ]
60+ pub use self :: memchr:: memchr;
61+ #[ cfg( feature = "qsort" ) ]
62+ pub use self :: qsort:: qsort;
3463#[ cfg( feature = "rand" ) ]
3564pub use self :: rand:: { rand, srand} ;
36-
37- mod strcmp;
65+ #[ cfg( feature = "rand_r" ) ]
66+ pub use self :: rand_r:: { rand_r, RAND_MAX } ;
67+ #[ cfg( feature = "signal" ) ]
68+ pub use self :: signal:: { abort, raise, signal} ;
69+ #[ cfg( feature = "strcat" ) ]
70+ pub use self :: strcat:: strcat;
71+ #[ cfg( feature = "strchr" ) ]
72+ pub use self :: strchr:: strchr;
3873#[ cfg( feature = "strcmp" ) ]
3974pub use self :: strcmp:: strcmp;
40-
41- mod strncmp;
42- #[ cfg( feature = "strncmp" ) ]
43- pub use self :: strncmp:: strncmp;
44-
45- mod strncasecmp;
46- #[ cfg( feature = "strncasecmp" ) ]
47- pub use self :: strncasecmp:: strncasecmp;
48-
49- mod strcpy;
5075#[ cfg( feature = "strcpy" ) ]
5176pub use self :: strcpy:: strcpy;
52-
53- mod strncpy;
54- #[ cfg( feature = "strncpy" ) ]
55- pub use self :: strncpy:: strncpy;
56-
57- mod strlen;
77+ #[ cfg( feature = "strcspn" ) ]
78+ pub use self :: strcspn:: strcspn;
5879#[ cfg( feature = "strlen" ) ]
5980pub use self :: strlen:: strlen;
60-
61- mod strcat;
62- #[ cfg( feature = "strcat" ) ]
63- pub use self :: strcat:: strcat;
64-
65- mod strtol;
81+ #[ cfg( feature = "strncasecmp" ) ]
82+ pub use self :: strncasecmp:: strncasecmp;
83+ #[ cfg( feature = "strncmp" ) ]
84+ pub use self :: strncmp:: strncmp;
85+ #[ cfg( feature = "strncpy" ) ]
86+ pub use self :: strncpy:: strncpy;
87+ #[ cfg( feature = "strrchr" ) ]
88+ pub use self :: strrchr:: strrchr;
89+ #[ cfg( feature = "strspn" ) ]
90+ pub use self :: strspn:: strspn;
91+ #[ cfg( feature = "strstr" ) ]
92+ pub use self :: strstr:: strstr;
6693#[ cfg( feature = "atoi" ) ]
6794pub use self :: strtol:: atoi;
6895#[ cfg( feature = "isalpha" ) ]
@@ -85,33 +112,3 @@ pub use self::strtol::strtoul;
85112pub use self :: strtol:: strtoull;
86113#[ cfg( feature = "strtoumax" ) ]
87114pub use self :: strtol:: strtoumax;
88-
89- mod strstr;
90- #[ cfg( feature = "strstr" ) ]
91- pub use self :: strstr:: strstr;
92-
93- mod strchr;
94- #[ cfg( feature = "strchr" ) ]
95- pub use self :: strchr:: strchr;
96-
97- mod strrchr;
98- #[ cfg( feature = "strrchr" ) ]
99- pub use self :: strrchr:: strrchr;
100-
101- mod qsort;
102- #[ cfg( feature = "qsort" ) ]
103- pub use self :: qsort:: qsort;
104-
105- #[ cfg( feature = "signal" ) ]
106- mod signal;
107- #[ cfg( feature = "signal" ) ]
108- pub use self :: signal:: { abort, raise, signal} ;
109-
110- mod memchr;
111- #[ cfg( feature = "memchr" ) ]
112- pub use self :: memchr:: memchr;
113-
114- mod snprintf;
115-
116- mod ctype;
117- pub use self :: ctype:: * ;
0 commit comments