pmake/src/pmake.h

32 lines
555 B
C
Raw Normal View History

2026-05-08 02:59:11 +09:00
#ifndef __PMAKE_H__
#define __PMAKE_H__
2026-05-08 05:18:35 +09:00
#include "config.h"
2026-05-08 02:59:11 +09:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <duktape.h>
#include <stb_ds.h>
2026-05-08 05:18:35 +09:00
#define LOAD(name) \
extern unsigned char name[]; \
2026-05-08 05:35:07 +09:00
extern unsigned int name##_len;
2026-05-08 05:18:35 +09:00
2026-05-08 05:35:07 +09:00
#define X(name, prefix) LOAD(prefix##_##name)
2026-05-08 05:25:34 +09:00
JS;
2026-05-08 05:18:35 +09:00
#undef X
/* js.c */
2026-05-09 03:16:12 +09:00
extern duk_context* js_ctx;
2026-05-08 05:35:07 +09:00
int js_init(int argc, char** argv);
2026-05-09 03:16:12 +09:00
int js_run(const char* file);
2026-05-08 05:35:07 +09:00
void js_uninit(void);
2026-05-08 05:18:35 +09:00
2026-05-09 03:16:12 +09:00
/* js_*.c */
void js_console_init(void);
void js_process_init(void);
void js_fs_init(void);
2026-05-08 02:59:11 +09:00
#endif