aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-03-23 15:56:32 -0400
committerChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-03-23 15:56:32 -0400
commitabd6a1d6b9d7b2e71b02b7435f5713bb505424f1 (patch)
tree5ef88b7407d02398c83110b423b7c8b7e9933a89 /src
parentreorganize (diff)
native: main: remove prefixes and rename module
Diffstat (limited to 'src')
-rw-r--r--src/main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/main.c b/src/main.c
index 7d12434..3646bde 100644
--- a/src/main.c
+++ b/src/main.c
@@ -8,115 +8,115 @@
// jurl.c
JANET_FN(jurl_escape,
- "(jurl-native/escape string)",
+ "(escape string)",
"Returns URL-encoded version of string");
JANET_FN(jurl_unescape,
- "(jurl-native/unescape string)",
+ "(unescape string)",
"Return URL-decoded version of string");
JANET_FN(jurl_new,
- "(jurl-native/new)",
+ "(new)",
"Create new jurl handle");
JANET_FN(jurl_reset,
- "(jurl-native/reset handle)",
+ "(reset handle)",
"Reset an existing jurl handle");
JANET_FN(jurl_dup,
- "(jurl-native/dup handle)",
+ "(dup handle)",
"Duplicate an existing jurl handle");
JANET_FN(jurl_global_init,
- "(jurl-native/global-init)"
+ "(global-init)"
"\n"
- "(jurl-native/global-init :ssl)",
+ "(global-init :ssl)",
"Run curl global init");
JANET_FN(jurl_global_cleanup,
- "(jurl-native/global-cleanup)",
+ "(global-cleanup)",
"Run curl global cleanup");
JANET_FN(jurl_perform,
- "(jurl-native/perform handle)",
+ "(perform handle)",
"Perform the request associated with a handle");
JANET_FN(jurl_wrap_error,
- "(jurl-native/wrap-error :ok body)"
+ "(wrap-error :ok body)"
"\n"
- "(jurl-native/wrap-error :err _)",
+ "(wrap-error :err _)",
"Boxes an :ok signal with a body, else the error with its explanation in string form");
// jurl_errors.c
JANET_FN(jurl_strerror,
- "(jurl-native/strerror :error/write-error)"
+ "(strerror :error/write-error)"
"\n"
- "(jurl-native/strerror 1234)",
+ "(strerror 1234)",
"Get an explanation string about a jurl error");
// jurl_getinfo.c
JANET_FN(jurl_getinfo,
- "(jurl-native/getinfo handle :info)"
+ "(getinfo handle :info)"
"\n"
- "(jurl-native/getinfo handle 1234)",
+ "(getinfo handle 1234)",
"Get a curl info from handle");
// jurl_mime.c
JANET_FN(jurl_mime_new,
- "(jurl-native/mime-new)",
+ "(mime-new)",
"Create a new mime form");
JANET_FN(jurl_mime_addpart,
- "(jurl-native/mime-addpart mime)"
+ "(mime-addpart mime)"
"\n"
"(:addpart mime)",
"Add a part to a mime form");
JANET_FN(jurl_mime_name,
- "(jurl-native/mime-name part string)",
+ "(mime-name part string)",
"Set a name for the mimepart");
JANET_FN(jurl_mime_data,
- "(jurl-native/mime-data part string)"
+ "(mime-data part string)"
"\n"
- "(jurl-native/mime-data part buffer)",
+ "(mime-data part buffer)",
"Set a string or buffer as the data source for the mimepart");
JANET_FN(jurl_mime_data_cb,
- "(jurl-native/mime-data-cb part (fn ...))",
+ "(mime-data-cb part (fn ...))",
"Set a callback as the data source for the mimepart");
JANET_FN(jurl_mime_filedata,
- "(jurl-native/mime-filedata part \"local.file\")",
+ "(mime-filedata part \"local.file\")",
"Set a file as the data source for the mimepart");
JANET_FN(jurl_mime_filename,
- "(jurl-native/mime-filename part \"remote.file\")",
+ "(mime-filename part \"remote.file\")",
"Set a custom remote filename for the upload mimepart");
JANET_FN(jurl_mime_type,
- "(jurl-native/mime-type part \"image/png\")",
+ "(mime-type part \"image/png\")",
"Set a custom mimetype for the mimepart");
JANET_FN(jurl_mime_headers,
- "(jurl-native/mime-headers part [headers...])",
+ "(mime-headers part [headers...])",
"Set custom headers for the mimepart");
JANET_FN(jurl_mime_encoder,
- "(jurl-native/mime-encoder part :encoder)",
+ "(mime-encoder part :encoder)",
"Set a part to be encoded using :encoder.\n"
"Available encoders are:\n"
":binary :8bit :7bit :base64 :quoted-printable");
JANET_FN(jurl_mime_subparts,
- "(jurl-native/mime-attach mime part)",
+ "(mime-attach mime part)",
"Attach mime to part as a subpart mime");
// jurl_setopt.c
JANET_FN(jurl_setopt,
- "(jurl-native/setopt handle :option value)"
+ "(setopt handle :option value)"
"\n"
- "(jurl-native/setopt handle 1234 value)",
+ "(setopt handle 1234 value)",
"Set a curl option in a handle");
static const JanetRegExt cfuns[] = {
@@ -155,5 +155,5 @@ static const JanetRegExt cfuns[] = {
};
JANET_MODULE_ENTRY(JanetTable *env) {
- janet_cfuns_ext(env, "jurl-native", cfuns);
+ janet_cfuns_ext(env, "jurl/native", cfuns);
}