stdc library

A unified entrypoint for the stdc library.

You can import this to get access to all available headers at once, or you can import specific headers like import 'package:stdc/math.dart'; for a more authentic C experience.

Classes

addrinfo
Network host database structure
alignas
A stub class to represent an alignment annotation structurally.
complex
Represents a complex number real + imag * i.
CString
Represents a mutable C-style string buffer (char array).
DIR
An opaque structure representing a directory stream.
dirent
A structure representing a directory entry.
FILE
Opaque structure representing a file stream.
imaxdiv_t
Represents the return type of imaxdiv.
in_addr
Internet address structure
jmp_buf
A type representing the environment for a non-local jump.
Lconv
Dart representation of the C struct lconv.
mtx_t
C11 thread mutex
Option
Structure for long options used by getopt_long.
pthread_mutex_t
POSIX thread mutex
pthread_t
POSIX thread structure
regex_t
POSIX regular expression
regmatch_t
POSIX regular expression match
sockaddr
Socket address structure
sockaddr_in
Socket address for internet
sockaddr_storage
Socket address storage
Stat
Structure to hold file statistics.
Stdc
The base class for the stdc global namespace.
termios
POSIX terminal I/O structure
thrd_t
C11 thread structure
TimeVal
Represents the C standard struct timeval containing seconds and microseconds.
TimeZone
Represents the C standard struct timezone containing timezone information. Note: The use of the timezone structure is obsolete; the tz argument should normally be specified as NULL.
Tm
Represents the C standard struct tm containing broken-down time.
utsname
Structure describing the system and machine.
va_list
Represents a C va_list in Dart.

Extension Types

Int16
Strict 16-bit signed integer extension type.
Int32
Strict 32-bit signed integer extension type.
Int64
Strict 64-bit signed integer extension type.
Int8
Strict 8-bit signed integer extension type.
Uint16
Strict 16-bit unsigned integer extension type.
Uint32
Strict 32-bit unsigned integer extension type.
Uint64
Strict 64-bit unsigned integer extension type.
Uint8
Strict 8-bit unsigned integer extension type.

Extensions

ArpaInetStdc on Stdc
ARPA internet operations
ComplexStdc on Stdc
Standard complex math operations.
CtypeStdc on Stdc
Extension on Stdc to provide <ctype.h> functionality.
DirentExtension on Stdc
Extension providing dirent.h functionality to the stdc namespace.
FcntlStdc on Stdc
POSIX file control flags
GetoptStdc on Stdc
<getopt.h> standard and GNU extensions for stdc.
IntTypesStdc on Stdc
Extension on Stdc to provide <inttypes.h> functionality.
LocaleStdc on Stdc
Extension on Stdc to provide <locale.h> functionality.
MathStdc on Stdc
Extension on Stdc to provide <math.h> functionality.
NetdbStdc on Stdc
Network database operations
NetinetInStdc on Stdc
Internet address operations
PthreadStdc on Stdc
POSIX Threads implementation mapping to Dart Isolates. Note: Since Dart isolates do not share memory, true C-style shared-memory concurrency is not possible natively without dart:ffi. This provides a message-passing abstraction and structural API.
RegexStdc on Stdc
POSIX regular expression operations
SetjmpExtension on Stdc
Extension providing setjmp.h functionality to the stdc namespace.
StdboolExtensions on bool
Provides quality-of-life computations on booleans. Note: All non-standard derived utility methods begin with an Uppercase letter to cleanly distinguish them from standard APIs.
StdboolStdc on Stdc
Provides boolean constants under the stdc namespace.
StdcAssert on Stdc
Extension on Stdc to provide <assert.h> functionality.
StdcErrno on Stdc
Extension on Stdc to provide <errno.h> functionality.
StdcFloat on Stdc
Extension on Stdc to provide <float.h> functionality.
StdcLimits on Stdc
Extension on Stdc to provide <limits.h> functionality.
StdcSignal on Stdc
<signal.h> standard signal handling extensions for stdc.
StdcStdarg on Stdc
<stdarg.h> standard variadic argument extensions for stdc.
StdcStdio on Stdc
<stdio.h> standard I/O extensions for stdc.
StdcStdlib on Stdc
<stdlib.h> standard library extensions for stdc.
StdcTime on Stdc
<time.h> standard time extensions for stdc.
StddefStdc on Stdc
Provides standard stddef definitions under the stdc namespace.
StdintStdc on Stdc
Extension to provide related constants under the stdc namespace.
StringStdc on Stdc
Extension on Stdc to provide <string.h> functionality.
SysSocketStdc on Stdc
POSIX Socket definitions
SysStatStdc on Stdc
POSIX file status utilities
SysTimeStdc on Stdc
<sys/time.h> standard extensions for stdc.
SysUtsnameStdc on Stdc
POSIX System Identification
SysWaitStdc on Stdc
POSIX Process Wait implementation
TermiosStdc on Stdc
POSIX Terminal I/O control
ThreadsStdc on Stdc
C11 Threads implementation mapping to Dart Isolates.
UCharStdc on Stdc
Extension on Stdc to provide <uchar.h> functionality.
UnistdStdc on Stdc
POSIX Standard symbolic constants and types
WcharStdc on Stdc
Extension on Stdc to provide <wchar.h> functionality.
WctypeStdc on Stdc
Extension on Stdc to provide <wctype.h> functionality.

Constants

mtx_plain → const int
Plain mutex type.
mtx_recursive → const int
Recursive mutex type.
mtx_timed → const int
Timed mutex type.
no_argument → const int
Indicates that the option takes no argument.
optional_argument → const int
Indicates that the option takes an optional argument.
required_argument → const int
Indicates that the option requires an argument.
stdc → const Stdc
The global stdc instance.
TCSADRAIN → const int
Change attributes when output has drained
TCSAFLUSH → const int
Change attributes when output has drained; also flush pending input
TCSANOW → const int
Change attributes immediately
thrd_busy → const int
Resource busy.
thrd_error → const int
Generic error.
thrd_nomem → const int
Out of memory error.
thrd_success → const int
Thread completed successfully.
thrd_timedout → const int
Thread timed out.

Typedefs

char16_t = int
16-bit character type used for UTF-16 encoding.
char32_t = int
32-bit character type used for UTF-32 encoding.
double_complex = complex
Alias for complex mapping to C's double complex.
float_complex = complex
Alias for complex mapping to C's float complex.
int16_t = int
16-bit signed integer type.
int32_t = int
32-bit signed integer type.
int64_t = int
64-bit signed integer type.
int8_t = int
8-bit signed integer type.
intmax_t = int
Maximum-width signed integer type.
intptr_t = int
Integer type capable of holding a pointer.
mode_t = int
POSIX mode type
noreturn = Never
Represents a function that never returns.
off_t = int
POSIX off type
pid_t = int
POSIX pid type
ptrdiff_t = int
Signed integral type of the result of subtracting two pointers.
sighandler_t = void Function(int)
Type for a signal handler function.
size_t = int
Unsigned integral type of the result of the sizeof operator.
ssize_t = int
POSIX ssize type
stdbool = bool
Defines stdbool as a typedef to Dart's bool.
uint16_t = int
16-bit unsigned integer type.
uint32_t = int
32-bit unsigned integer type.
uint64_t = int
64-bit unsigned integer type.
uint8_t = int
8-bit unsigned integer type.
uintmax_t = int
Maximum-width unsigned integer type.
uintptr_t = int
Unsigned integer type capable of holding a pointer.
useconds_t = int
POSIX useconds type
wchar_t = int
Wide character type (maps to a Unicode Rune).
wctrans_t = int
Wide character mapping type.
wctype_t = int
Wide character classification type.
wint_t = int
Wide integer type.

Exceptions / Errors

LongJmpException
Internal exception thrown by longjmp.