MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at type-hints-typescript 31 lines 753 B view raw
1#ifndef FORMDATA_H 2#define FORMDATA_H 3 4#include <stdint.h> 5#include <stddef.h> 6#include <stdbool.h> 7#include "types.h" 8 9typedef struct fd_entry { 10 char *name; 11 bool is_file; 12 char *str_value; 13 size_t val_idx; 14 struct fd_entry *next; 15} fd_entry_t; 16 17typedef struct { 18 fd_entry_t *head; 19 fd_entry_t **tail; 20 size_t count; 21} fd_data_t; 22 23void init_formdata_module(void); 24bool formdata_is_empty(ant_value_t fd); 25bool formdata_is_formdata(ant_t *js, ant_value_t obj); 26 27ant_value_t formdata_create_empty(ant_t *js); 28ant_value_t formdata_append_string(ant_t *js, ant_value_t fd, ant_value_t name_v, ant_value_t value_v); 29ant_value_t formdata_append_file(ant_t *js, ant_value_t fd, ant_value_t name_v, ant_value_t blob_v, ant_value_t filename_v); 30 31#endif