-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
5,722 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
REBOL 3 Host Build Distribution | ||
|
||
Version: 2.100.96.0.0 | ||
Built: 2-Dec-2009/15:37:52-8:00 | ||
|
||
Test build only for early alpha-test developers. Do not distribute. | ||
|
||
Documentation: http://www.rebol.net/wiki/Host-Builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# REBOL 3.0 Host Makefile - Build A96 | ||
|
||
C= gcc | ||
CFLAGS= -c -O1 -DUNICODE -fpack-struct -I src/include/ | ||
LIBS= r3lib.lib -L c:/mingw/lib/ -lm -lwsock32 -lcomdlg32 | ||
#-lc -lm -lstdc++ | ||
|
||
S= src | ||
O= obj | ||
I= src/include | ||
|
||
# Included from reb-host.h: | ||
INCS = \ | ||
$I/reb-config.h\ | ||
$I/reb-c.h\ | ||
$I/reb-defs.h\ | ||
$I/reb-args.h\ | ||
$I/reb-device.h\ | ||
$I/reb-file.h\ | ||
$I/reb-event.h\ | ||
$I/reb-evtypes.h\ | ||
$I/reb-net.h\ | ||
$I/reb-filereq.h\ | ||
|
||
OBJS = \ | ||
$O/host-main.o\ | ||
$O/host-args.o\ | ||
$O/host-device.o\ | ||
$O/host-stdio.o\ | ||
$O/dev-net.o\ | ||
$O/dev-dns.o\ | ||
$O/host-init.o\ | ||
$O/host-lib.o\ | ||
$O/dev-stdio.o\ | ||
$O/dev-event.o\ | ||
$O/dev-file.o\ | ||
$O/dev-clipboard.o\ | ||
|
||
# Link the files | ||
core: $(OBJS) | ||
$C -o core.exe $(OBJS) $(LIBS) | ||
strip core.exe | ||
|
||
clean: | ||
del /q obj\* | ||
make core | ||
|
||
# Compile: | ||
$O/host-main.o: $S/os/host-main.c $(INCS) $I/reb-host.h $I/host-lib.h $I/rebol-lib.h $I/host-init.h | ||
$C $(CFLAGS) -o $O/host-main.o $S/os/host-main.c | ||
|
||
$O/host-args.o: $S/os/host-args.c $(INCS) $I/reb-config.h $I/reb-c.h $I/reb-args.h | ||
$C $(CFLAGS) -o $O/host-args.o $S/os/host-args.c | ||
|
||
$O/host-device.o: $S/os/host-device.c $(INCS) $I/reb-host.h $I/host-lib.h $I/rebol-lib.h | ||
$C $(CFLAGS) -o $O/host-device.o $S/os/host-device.c | ||
|
||
$O/host-stdio.o: $S/os/host-stdio.c $(INCS) $I/reb-host.h $I/host-lib.h | ||
$C $(CFLAGS) -o $O/host-stdio.o $S/os/host-stdio.c | ||
|
||
$O/dev-net.o: $S/os/dev-net.c $(INCS) $I/reb-host.h $I/host-lib.h $I/sys-net.h | ||
$C $(CFLAGS) -o $O/dev-net.o $S/os/dev-net.c | ||
|
||
$O/dev-dns.o: $S/os/dev-dns.c $(INCS) $I/reb-host.h $I/host-lib.h $I/sys-net.h | ||
$C $(CFLAGS) -o $O/dev-dns.o $S/os/dev-dns.c | ||
|
||
$O/host-init.o: $S/os/host-init.c $(INCS) | ||
$C $(CFLAGS) -o $O/host-init.o $S/os/host-init.c | ||
|
||
$O/host-lib.o: $S/os/win32/host-lib.c $(INCS) $I/reb-host.h $I/host-lib.h | ||
$C $(CFLAGS) -o $O/host-lib.o $S/os/win32/host-lib.c | ||
|
||
$O/dev-stdio.o: $S/os/win32/dev-stdio.c $(INCS) $I/reb-host.h $I/host-lib.h | ||
$C $(CFLAGS) -o $O/dev-stdio.o $S/os/win32/dev-stdio.c | ||
|
||
$O/dev-event.o: $S/os/win32/dev-event.c $(INCS) $I/reb-host.h $I/host-lib.h | ||
$C $(CFLAGS) -o $O/dev-event.o $S/os/win32/dev-event.c | ||
|
||
$O/dev-file.o: $S/os/win32/dev-file.c $(INCS) $I/reb-host.h $I/host-lib.h | ||
$C $(CFLAGS) -o $O/dev-file.o $S/os/win32/dev-file.c | ||
|
||
$O/dev-clipboard.o: $S/os/win32/dev-clipboard.c $(INCS) $I/reb-host.h $I/host-lib.h $I/sys-net.h | ||
$C $(CFLAGS) -o $O/dev-clipboard.o $S/os/win32/dev-clipboard.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*********************************************************************** | ||
** | ||
** REBOL 3.0 "Invasion" | ||
** Copyright 2009 REBOL Technologies | ||
** All rights reserved. | ||
** | ||
************************************************************************ | ||
** | ||
** Title: Host custom init header | ||
** Build: A96 | ||
** Date: 2-Dec-2009/15:37:15-8:00 | ||
** File: host-init.h | ||
** | ||
***********************************************************************/ | ||
|
||
#define REB_INIT_SIZE 6532 | ||
extern REBYTE Reb_Init_Code[REB_INIT_SIZE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/*********************************************************************** | ||
** | ||
** REBOL 3.0 "Invasion" | ||
** Copyright 2009 REBOL Technologies | ||
** All rights reserved. | ||
** | ||
************************************************************************ | ||
** | ||
** Title: Host Access Library | ||
** Build: A96 | ||
** Date: 2-Dec-2009/15:37:16-8:00 | ||
** File: host-lib.h | ||
** | ||
** AUTO-GENERATED FILE - Do not modify. (From: make-os-ext.r) | ||
** | ||
***********************************************************************/ | ||
|
||
#define HOST_LIB_VER 96 | ||
#define HOST_LIB_SUM 5782 | ||
#define HOST_LIB_SIZE 30 | ||
|
||
|
||
typedef struct REBOL_Host_Lib { | ||
int size; | ||
unsigned int ver_sum; | ||
void *(*os_make)(size_t size); | ||
void (*os_free)(void *mem); | ||
void (*os_exit)(int code); | ||
void (*os_crash)(const REBYTE *title, const REBYTE *content); | ||
REBCHR *(*os_form_error)(int errnum, REBCHR *str, int len); | ||
BOOL (*os_get_boot_path)(REBCHR *name); | ||
REBCHR *(*os_get_locale)(int what); | ||
REBCHR *(*os_get_env)(REBCHR *var, int mode); | ||
int (*os_set_env)(REBCHR *expr, int mode); | ||
REBCHR *(*os_list_env)(void); | ||
void (*os_get_time)(REBOL_DAT *dat); | ||
i64 (*os_delta_time)(i64 base, int flags); | ||
int (*os_get_current_dir)(REBCHR **path); | ||
BOOL (*os_set_current_dir)(REBCHR *path); | ||
void (*os_file_time)(REBREQ *file, REBOL_DAT *dat); | ||
void *(*os_open_library)(REBCHR *path, REBCNT *error); | ||
void (*os_close_library)(void *dll); | ||
void *(*os_find_function)(void *dll, char* funcname); | ||
REBINT (*os_create_thread)(CFUNC init, void *arg, REBCNT stack_size); | ||
void (*os_delete_thread)(void); | ||
void (*os_task_ready)(REBINT tid); | ||
int (*os_create_process)(REBCHR *call, int reserved); | ||
int (*os_browse)(REBCHR *url, int reserved); | ||
BOOL (*os_request_file)(REBRFR *fr); | ||
int (*os_call_device)(REBINT device, REBCNT command); | ||
int (*os_do_device)(REBREQ *req, REBCNT command); | ||
REBREQ *(*os_make_devreq)(int device); | ||
int (*os_abort_device)(REBREQ *req); | ||
int (*os_poll_devices)(void); | ||
REBINT (*os_wait)(REBCNT millisec, REBCNT res); | ||
} REBOL_HOST_LIB; | ||
|
||
//** Included by HOST ********************************************* | ||
|
||
#ifndef AS_LIB | ||
|
||
extern void *OS_Make(size_t size); // host-lib.c | ||
extern void OS_Free(void *mem); // host-lib.c | ||
extern void OS_Exit(int code); // host-lib.c | ||
extern void OS_Crash(const REBYTE *title, const REBYTE *content); // host-lib.c | ||
extern REBCHR *OS_Form_Error(int errnum, REBCHR *str, int len); // host-lib.c | ||
extern BOOL OS_Get_Boot_Path(REBCHR *name); // host-lib.c | ||
extern REBCHR *OS_Get_Locale(int what); // host-lib.c | ||
extern REBCHR *OS_Get_Env(REBCHR *var, int mode); // host-lib.c | ||
extern int OS_Set_Env(REBCHR *expr, int mode); // host-lib.c | ||
extern REBCHR *OS_List_Env(void); // host-lib.c | ||
extern void OS_Get_Time(REBOL_DAT *dat); // host-lib.c | ||
extern i64 OS_Delta_Time(i64 base, int flags); // host-lib.c | ||
extern int OS_Get_Current_Dir(REBCHR **path); // host-lib.c | ||
extern BOOL OS_Set_Current_Dir(REBCHR *path); // host-lib.c | ||
extern void OS_File_Time(REBREQ *file, REBOL_DAT *dat); // host-lib.c | ||
extern void *OS_Open_Library(REBCHR *path, REBCNT *error); // host-lib.c | ||
extern void OS_Close_Library(void *dll); // host-lib.c | ||
extern void *OS_Find_Function(void *dll, char* funcname); // host-lib.c | ||
extern REBINT OS_Create_Thread(CFUNC init, void *arg, REBCNT stack_size); // host-lib.c | ||
extern void OS_Delete_Thread(void); // host-lib.c | ||
extern void OS_Task_Ready(REBINT tid); // host-lib.c | ||
extern int OS_Create_Process(REBCHR *call, int reserved); // host-lib.c | ||
extern int OS_Browse(REBCHR *url, int reserved); // host-lib.c | ||
extern BOOL OS_Request_File(REBRFR *fr); // host-lib.c | ||
extern int OS_Call_Device(REBINT device, REBCNT command); // ../host-device.c | ||
extern int OS_Do_Device(REBREQ *req, REBCNT command); // ../host-device.c | ||
extern REBREQ *OS_Make_Devreq(int device); // ../host-device.c | ||
extern int OS_Abort_Device(REBREQ *req); // ../host-device.c | ||
extern int OS_Poll_Devices(void); // ../host-device.c | ||
extern REBINT OS_Wait(REBCNT millisec, REBCNT res); // ../host-device.c | ||
|
||
#ifdef OS_LIB_TABLE | ||
|
||
REBOL_HOST_LIB *Host_Lib; | ||
|
||
REBOL_HOST_LIB Host_Lib_Init = { // Host library function vector table. | ||
HOST_LIB_SIZE, | ||
(HOST_LIB_VER << 16) + HOST_LIB_SUM, | ||
OS_Make, | ||
OS_Free, | ||
OS_Exit, | ||
OS_Crash, | ||
OS_Form_Error, | ||
OS_Get_Boot_Path, | ||
OS_Get_Locale, | ||
OS_Get_Env, | ||
OS_Set_Env, | ||
OS_List_Env, | ||
OS_Get_Time, | ||
OS_Delta_Time, | ||
OS_Get_Current_Dir, | ||
OS_Set_Current_Dir, | ||
OS_File_Time, | ||
OS_Open_Library, | ||
OS_Close_Library, | ||
OS_Find_Function, | ||
OS_Create_Thread, | ||
OS_Delete_Thread, | ||
OS_Task_Ready, | ||
OS_Create_Process, | ||
OS_Browse, | ||
OS_Request_File, | ||
OS_Call_Device, | ||
OS_Do_Device, | ||
OS_Make_Devreq, | ||
OS_Abort_Device, | ||
OS_Poll_Devices, | ||
OS_Wait, | ||
}; | ||
|
||
#endif //OS_LIB_TABLE | ||
|
||
#else //AS_LIB | ||
|
||
//** Included by REBOL ******************************************** | ||
|
||
extern REBOL_HOST_LIB *Host_Lib; | ||
|
||
#define OS_MAKE(a) Host_Lib->os_make(a) | ||
#define OS_FREE(a) Host_Lib->os_free(a) | ||
#define OS_EXIT(a) Host_Lib->os_exit(a) | ||
#define OS_CRASH(a,b) Host_Lib->os_crash(a,b) | ||
#define OS_FORM_ERROR(a,b,c) Host_Lib->os_form_error(a,b,c) | ||
#define OS_GET_BOOT_PATH(a) Host_Lib->os_get_boot_path(a) | ||
#define OS_GET_LOCALE(a) Host_Lib->os_get_locale(a) | ||
#define OS_GET_ENV(a,b) Host_Lib->os_get_env(a,b) | ||
#define OS_SET_ENV(a,b) Host_Lib->os_set_env(a,b) | ||
#define OS_LIST_ENV() Host_Lib->os_list_env() | ||
#define OS_GET_TIME(a) Host_Lib->os_get_time(a) | ||
#define OS_DELTA_TIME(a,b) Host_Lib->os_delta_time(a,b) | ||
#define OS_GET_CURRENT_DIR(a) Host_Lib->os_get_current_dir(a) | ||
#define OS_SET_CURRENT_DIR(a) Host_Lib->os_set_current_dir(a) | ||
#define OS_FILE_TIME(a,b) Host_Lib->os_file_time(a,b) | ||
#define OS_OPEN_LIBRARY(a,b) Host_Lib->os_open_library(a,b) | ||
#define OS_CLOSE_LIBRARY(a) Host_Lib->os_close_library(a) | ||
#define OS_FIND_FUNCTION(a,b) Host_Lib->os_find_function(a,b) | ||
#define OS_CREATE_THREAD(a,b,c) Host_Lib->os_create_thread(a,b,c) | ||
#define OS_DELETE_THREAD() Host_Lib->os_delete_thread() | ||
#define OS_TASK_READY(a) Host_Lib->os_task_ready(a) | ||
#define OS_CREATE_PROCESS(a,b) Host_Lib->os_create_process(a,b) | ||
#define OS_BROWSE(a,b) Host_Lib->os_browse(a,b) | ||
#define OS_REQUEST_FILE(a) Host_Lib->os_request_file(a) | ||
#define OS_CALL_DEVICE(a,b) Host_Lib->os_call_device(a,b) | ||
#define OS_DO_DEVICE(a,b) Host_Lib->os_do_device(a,b) | ||
#define OS_MAKE_DEVREQ(a) Host_Lib->os_make_devreq(a) | ||
#define OS_ABORT_DEVICE(a) Host_Lib->os_abort_device(a) | ||
#define OS_POLL_DEVICES() Host_Lib->os_poll_devices() | ||
#define OS_WAIT(a,b) Host_Lib->os_wait(a,b) | ||
|
||
#endif //AS_LIB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/*********************************************************************** | ||
** | ||
** REBOL 3.0 "Invasion" | ||
** Copyright 2009 REBOL Technologies | ||
** All rights reserved. | ||
** | ||
************************************************************************ | ||
** | ||
** Title: Program startup arguments | ||
** Date: 1-Dec-2009 | ||
** File: reb-args.h | ||
** | ||
************************************************************************ | ||
** | ||
** Note: arg struct is used by R3 lib, so must not be modified. | ||
** | ||
***********************************************************************/ | ||
|
||
// REBOL startup option structure: | ||
typedef struct rebol_args { | ||
REBCNT options; | ||
REBCHR *script; | ||
REBCHR *args; | ||
REBCHR *do_arg; | ||
REBCHR *version; | ||
REBCHR *debug; | ||
REBCHR *import; | ||
REBCHR *secure; | ||
REBCHR *exe_path; | ||
REBCHR *home_dir; | ||
} REBARGS; | ||
|
||
// REBOL arg option flags: | ||
// Must stay matched to system/catalog/boot-flags. | ||
enum arg_opts { | ||
ROF_EXT, | ||
|
||
ROF_SCRIPT, | ||
ROF_ARGS, | ||
ROF_DO, | ||
ROF_IMPORT, | ||
ROF_VERSION, | ||
ROF_DEBUG, | ||
ROF_SECURE, | ||
|
||
ROF_HELP, | ||
ROF_VERS, | ||
ROF_QUIET, | ||
ROF_VERBOSE, | ||
ROF_NO_BOOT, | ||
ROF_SECURE_MIN, | ||
ROF_SECURE_MAX, | ||
ROF_TRACE, | ||
ROF_HALT, | ||
ROF_CGI, | ||
ROF_IGNORE, | ||
}; | ||
|
||
#define RO_EXT (1<<ROF_EXT) | ||
#define RO_HELP (1<<ROF_HELP) | ||
#define RO_IMPORT (1<<ROF_IMPORT) | ||
#define RO_CGI (1<<ROF_CGI) | ||
#define RO_ARGS (1<<ROF_ARGS) | ||
#define RO_DO (1<<ROF_DO) | ||
#define RO_DEBUG (1<<ROF_DEBUG) | ||
#define RO_SECURE_MIN (1<<ROF_SECURE_MIN) | ||
#define RO_SECURE_MAX (1<<ROF_SECURE_MAX) | ||
#define RO_QUIET (1<<ROF_QUIET) | ||
#define RO_SCRIPT (1<<ROF_SCRIPT) | ||
#define RO_SECURE (1<<ROF_SECURE) | ||
#define RO_TRACE (1<<ROF_TRACE) | ||
#define RO_VERSION (1<<ROF_VERSION) | ||
#define RO_VERS (1<<ROF_VERS) | ||
#define RO_VERBOSE (1<<ROF_VERBOSE) | ||
#define RO_NO_BOOT (1<<ROF_NO_BOOT) | ||
#define RO_IGNORE (1<<ROF_IGNORE) | ||
#define RO_HALT (1<<ROF_HALT) | ||
|
||
void Parse_Args(int argc, REBCHR **argv, REBARGS *rargs); |
Oops, something went wrong.