Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3055688
builtin_bundle.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
975 B
Referenced Files
None
Subscribers
None
builtin_bundle.c
View Options
#include
<string.h>
#include
"esm/builtin_bundle.h"
#include
"builtin_bundle_data.h"
bool
esm_has_builtin_scheme
(
const
char
*
specifier
)
{
if
(
!
specifier
)
return
false
;
if
(
specifier
[
0
]
==
'n'
)
return
strncmp
(
specifier
,
"node:"
,
5
)
==
0
;
if
(
specifier
[
0
]
==
'a'
)
return
strncmp
(
specifier
,
"ant:"
,
4
)
==
0
;
return
false
;
}
const
ant_builtin_bundle_alias_t
*
esm_lookup_builtin_alias
(
const
char
*
specifier
,
size_t
spec_len
)
{
if
(
!
specifier
)
return
NULL
;
for
(
size_t
i
=
0
;
i
<
ant_builtin_bundle_alias_count
;
i
++
)
{
const
ant_builtin_bundle_alias_t
*
alias
=
&
ant_builtin_bundle_aliases
[
i
];
if
(
alias
->
specifier_len
!=
spec_len
)
continue
;
if
(
memcmp
(
alias
->
specifier
,
specifier
,
spec_len
)
!=
0
)
continue
;
return
alias
;
}
return
NULL
;
}
const
ant_builtin_bundle_module_t
*
esm_lookup_builtin_module
(
size_t
module_id
)
{
if
(
module_id
>=
ant_builtin_bundle_module_count
)
return
NULL
;
return
&
ant_builtin_bundle_modules
[
module_id
];
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 3, 5:11 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
520800
Default Alt Text
builtin_bundle.c (975 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment