Skip to content

Commit

Permalink
CHANGE: Migrate extensions: *.r => *.reb & *.rx => *.rebx
Browse files Browse the repository at this point in the history
This change was proposed years ago by @onetom in rebol#140 and I agree, that the `.r` extension is lost in this century and so lets start with the new one. I'm personally still preferring `.r3` for run-able scripts which requires Rebol3.

(cherry picked from commit 298ee37)
  • Loading branch information
Oldes committed Jun 20, 2020
1 parent f5a4682 commit 6416be5
Show file tree
Hide file tree
Showing 107 changed files with 2,760 additions and 301 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ make/host.exe
make/libr3.so
make/libr3.dll
make/Rebol3.xcworkspace/
src/boot/boot-code.r
src/boot/host-init.r
src/boot/tmp-natives.r
src/boot/tmp-symbols.r
src/boot/boot-code.reb
src/boot/host-init.reb
src/boot/tmp-natives.reb
src/boot/tmp-symbols.reb
src/core/b-boot.c
src/include/ext-types.h
src/include/host-*
Expand All @@ -22,7 +22,7 @@ src/include/reb-types.h
src/include/tmp-*
src/tools/reb-lib-doc.txt
src/reb-lib-doc.txt
src/mezz/base-collected.r
src/mezz/base-collected.reb

src/tests/httpd-root/logs/

Expand Down
4 changes: 2 additions & 2 deletions make/make.r3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if error? set/any 'err try [
TOOLS-Win32: ""
TOOLS-Win64: ""

attempt [do %make-settings.r]
attempt [do %make-settings.reb]

cmd-menu: {^/^[[1;33;49mPlease choose version to build:^[[0m^/}

Expand Down Expand Up @@ -114,7 +114,7 @@ forever [
]

if val [
eval-cmd [rebol-tool " -qs ../src/tools/make-make.r " OS_ID]
eval-cmd [rebol-tool " -qs ../src/tools/make-make.reb " OS_ID]
if prev <> val [
;clean if making different target or for the first run
eval-cmd [{make TOOLS=} TOOLS { clean}]
Expand Down
26 changes: 13 additions & 13 deletions make/makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# REBOL Makefile -- Generated by make-make.r (do not edit) on 27-Oct-2017/16:34:34+2:00
# REBOL Makefile -- Generated by make-make.reb (do not edit) on 27-Oct-2017/16:34:34+2:00
# This makefile is intentional kept simple to make builds possible on
# a wider range of target platforms.

# To regenerate this file:
# make make

# To generate this file for a different platform, check systems.r file
# To generate this file for a different platform, check systems.reb file
# and provide an OS_ID (from the systems table). Linux 2.5 for example:
# make make OS_ID=0.4.3

Expand Down Expand Up @@ -68,7 +68,7 @@ update:
-cd $(UP)/; cvs -q update src

make:
$(REBOL) $T/make-make.r $(OS_ID)
$(REBOL) $T/make-make.reb $(OS_ID)

clean:
$(RM) libr3$(LIB_SUFFIX) objs $(RES)
Expand All @@ -81,12 +81,12 @@ all:
$(MAKE) host$(BIN_SUFFIX)

prep:
$(REBOL) $T/make-headers.r
$(REBOL) $T/make-boot.r $(OS_ID)
$(REBOL) $T/make-host-init.r
$(REBOL) $T/make-os-ext.r # ok, but not always
$(REBOL) $T/make-host-ext.r
$(REBOL) $T/make-reb-lib.r
$(REBOL) $T/make-headers.reb
$(REBOL) $T/make-boot.reb $(OS_ID)
$(REBOL) $T/make-host-init.reb
$(REBOL) $T/make-os-ext.reb # ok, but not always
$(REBOL) $T/make-host-ext.reb
$(REBOL) $T/make-reb-lib.reb

### Provide more info if make fails due to no local Rebol build tool:
tmps: $S/include/tmp-bootdefs.h
Expand Down Expand Up @@ -116,13 +116,13 @@ testdo:

test:
$(CP) r3$(BIN_SUFFIX) $(UP)/src/tests/
$(R3) $S/tests/test.r
$(R3) $S/tests/test.reb

install:
sudo cp r3$(BIN_SUFFIX) /usr/local/bin

ship:
$(R3) $S/tools/upload.r
$(R3) $S/tools/upload.reb

build: libr3$(LIB_SUFFIX)
$(R3) $S/tools/make-build.r
Expand Down Expand Up @@ -194,8 +194,8 @@ host$(BIN_SUFFIX): $(HOST) $(RES)
@echo "export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH"

### File build targets:
b-boot.c: $(SRC)/boot/boot.r
$(REBOL) -sqw $(SRC)/tools/make-boot.r
b-boot.c: $(SRC)/boot/boot.reb
$(REBOL) -sqw $(SRC)/tools/make-boot.reb

objs/a-constants.o: $R/a-constants.c
$(CC) $R/a-constants.c $(RFLAGS) -o objs/a-constants.o
Expand Down
12 changes: 6 additions & 6 deletions make/makefile.vc
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ clean:
all: clean prep r3.exe

prep: objs
$(REBOL) $T/make-headers.r
$(REBOL) $T/make-boot.r $(OS_ID)
$(REBOL) $T/make-host-init.r
$(REBOL) $T/make-os-ext.r # ok, but not always
$(REBOL) $T/make-host-ext.r
$(REBOL) $T/make-reb-lib.r
$(REBOL) $T/make-headers.reb
$(REBOL) $T/make-boot.reb $(OS_ID)
$(REBOL) $T/make-host-init.reb
$(REBOL) $T/make-os-ext.reb # ok, but not always
$(REBOL) $T/make-host-ext.reb
$(REBOL) $T/make-reb-lib.reb
windres --target=pe-i386 r3.rc -O coff -o objs/r3.res

objs:
Expand Down
26 changes: 13 additions & 13 deletions make/msvc/Make-vs-project-view.r3
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ END



do %../../src/tools/file-base.r
do %../../src/tools/file-base.reb

forall core [change core join %../../../src/core/ core/1]
forall os [change os join %../../../src/os/ os/1]
Expand Down Expand Up @@ -490,25 +490,25 @@ set REBOL=..\..\prebuild\r3-make-win.exe
set T=../../../src/tools
set OS_ID=0.3.1
%REBOL% %T%/make-headers.r
%REBOL% %T%/make-boot.r "%OS_ID% view"
%REBOL% %T%/make-host-init.r
%REBOL% %T%/make-os-ext.r
%REBOL% %T%/make-host-ext.r
%REBOL% %T%/make-reb-lib.r
%REBOL% %T%/make-headers.reb
%REBOL% %T%/make-boot.reb "%OS_ID% view"
%REBOL% %T%/make-host-init.reb
%REBOL% %T%/make-os-ext.reb
%REBOL% %T%/make-host-ext.reb
%REBOL% %T%/make-reb-lib.reb
}

vs/Prebuild-x64: {
set REBOL=..\..\prebuild\r3-make-win.exe
set T=../../../src/tools
set OS_ID=0.3.40
%REBOL% %T%/make-headers.r
%REBOL% %T%/make-boot.r "%OS_ID% view"
%REBOL% %T%/make-host-init.r
%REBOL% %T%/make-os-ext.r
%REBOL% %T%/make-host-ext.r
%REBOL% %T%/make-reb-lib.r
%REBOL% %T%/make-headers.reb
%REBOL% %T%/make-boot.reb "%OS_ID% view"
%REBOL% %T%/make-host-init.reb
%REBOL% %T%/make-os-ext.reb
%REBOL% %T%/make-host-ext.reb
%REBOL% %T%/make-reb-lib.reb
}

vs/make-project/type "Rebol3_View" %./ "Console"
Expand Down
26 changes: 13 additions & 13 deletions make/msvc/Make-vs-project.r3
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ END



do %../../src/tools/file-base.r
do %../../src/tools/file-base.reb

forall core [change core join %../../../src/core/ core/1]
forall os [change os join %../../../src/os/ os/1]
Expand Down Expand Up @@ -469,25 +469,25 @@ set REBOL=..\..\prebuild\r3-make-win.exe
set T=../../../src/tools
set OS_ID=0.3.1
%REBOL% %T%/make-headers.r
%REBOL% %T%/make-boot.r %OS_ID%
%REBOL% %T%/make-host-init.r
%REBOL% %T%/make-os-ext.r
%REBOL% %T%/make-host-ext.r
%REBOL% %T%/make-reb-lib.r
%REBOL% %T%/make-headers.reb
%REBOL% %T%/make-boot.reb %OS_ID%
%REBOL% %T%/make-host-init.reb
%REBOL% %T%/make-os-ext.reb
%REBOL% %T%/make-host-ext.reb
%REBOL% %T%/make-reb-lib.reb
}

vs/Prebuild-x64: {
set REBOL=..\..\prebuild\r3-make-win.exe
set T=../../../src/tools
set OS_ID=0.3.40
%REBOL% %T%/make-headers.r
%REBOL% %T%/make-boot.r %OS_ID%
%REBOL% %T%/make-host-init.r
%REBOL% %T%/make-os-ext.r
%REBOL% %T%/make-host-ext.r
%REBOL% %T%/make-reb-lib.r
%REBOL% %T%/make-headers.reb
%REBOL% %T%/make-boot.reb %OS_ID%
%REBOL% %T%/make-host-init.reb
%REBOL% %T%/make-os-ext.reb
%REBOL% %T%/make-host-ext.reb
%REBOL% %T%/make-reb-lib.reb
}

vs/make-project/type "Rebol3" %./ "Console"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/boot/draw.r → src/boot/draw.reb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ REBOL [
Name: draw
Type: extension
Exports: none
Note: "Run make-host-ext.r to convert"
Note: "Run make-host-ext.reb to convert"
]

;don't change order of already defined words unless you know what you are doing
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/boot/graphics.r → src/boot/graphics.reb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ REBOL [
}
Name: graphics
Type: extension
Exports: [] ; added by make-host-ext.r
Note: "Run make-host-ext.r to convert"
Exports: [] ; added by make-host-ext.reb
Note: "Run make-host-ext.reb to convert"
]

words: [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/boot/root.r → src/boot/root.reb
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ typesets ; block of TYPESETs used by system; expandable
noneval ; NONE value
noname ; noname function word

boot ; boot block defined in boot.r (GC'd after boot is done)
boot ; boot block defined in boot.reb (GC'd after boot is done)

2 changes: 1 addition & 1 deletion src/boot/shape.r → src/boot/shape.reb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ REBOL [
Name: shape
Type: extension
Exports: none
Note: "Run make-host-ext.r to convert"
Note: "Run make-host-ext.reb to convert"
]

;don't change order of already defined words unless you know what you are doing
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/boot/text.r → src/boot/text.reb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ REBOL [
Name: text
Type: extension
Exports: none
Note: "Run make-host-ext.r to convert"
Note: "Run make-host-ext.reb to convert"
]

;don't change order of already defined words unless you know what you are doing
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/a-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ extern int Do_Callback(REBSER *obj, u32 name, RXIARG *args, RXIARG *result);
Append_Byte(text, 0);

#ifdef DUMP_INIT_SCRIPT
f = _open("host-boot.r", _O_CREAT | _O_RDWR, _S_IREAD | _S_IWRITE );
f = _open("host-boot.reb", _O_CREAT | _O_RDWR, _S_IREAD | _S_IWRITE );
_write(f, STR_HEAD(text), LEN_BYTES(STR_HEAD(text)));
_close(f);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/core/b-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ extern const REBYTE Str_Banner[];
**
*/ static void Init_System_Object(void)
/*
** The system object is defined in boot.r.
** The system object is defined in boot.reb.
**
***********************************************************************/
{
Expand Down Expand Up @@ -790,7 +790,7 @@ static void Set_Option_File(REBCNT field, REBYTE* src, REBOOL dir )
**
*/ static void Init_Main_Args(REBARGS *rargs)
/*
** The system object is defined in boot.r.
** The system object is defined in boot.reb.
**
***********************************************************************/
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/c-port.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ SCHEME_ACTIONS *Scheme_Actions; // Initial Global (not threaded)
**
** In order to add a port scheme:
**
** In mezz-ports.r add a make-scheme.
** In mezz-ports.reb add a make-scheme.
** Add an Init_*_Scheme() here.
** Be sure host-devices.c has the device enabled.
**
Expand Down
4 changes: 2 additions & 2 deletions src/core/d-crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ enum Crash_Msg_Nums {

// "REBOL PANIC #nnn: put error message here"
// The first few error types only print general error message.
// Those errors > RP_STR_BASE have specific error messages (from boot.r).
// Those errors > RP_STR_BASE have specific error messages (from boot.reb).
if (id < RP_BOOT_DATA) n = CM_DEBUG;
else if (id < RP_INTERNAL) n = CM_BOOT;
else if (id < RP_ASSERTS) n = CM_INTERNAL;
else if (id < RP_DATATYPE) n = CM_ASSERT;
else if (id < RP_STR_BASE) n = CM_DATATYPE;
else if (id > RP_STR_BASE + RS_MAX - RS_ERROR) n = CM_DEBUG;

// Use the above string or the boot string for the error (in boot.r):
// Use the above string or the boot string for the error (in boot.reb):
msg = (REBYTE*)(n >= 0 ? Crash_Msgs[n] : BOOT_STR(RS_ERROR, id - RP_STR_BASE - 1));
Form_Var_Args(buf + LEN_BYTES(buf), (REBCNT)(CRASH_BUF_SIZE - 1 - LEN_BYTES(buf)), msg, args);

Expand Down
2 changes: 1 addition & 1 deletion src/core/m-gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static void Mark_Series(REBSER *series, REBCNT depth);

case REB_DATATYPE:
if (VAL_TYPE_SPEC(val)) { // allow it to be zero
CHECK_MARK(VAL_TYPE_SPEC(val), depth); // check typespec.r file
CHECK_MARK(VAL_TYPE_SPEC(val), depth); // check typespec.reb file
}
break;

Expand Down
6 changes: 3 additions & 3 deletions src/core/p-dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
**
** Patterns:
** abc/ is true
** abc/*.r is true
** abc/?.r is true
** abc/*.reb is true
** abc/?.reb is true
** abc - ask the file system
**
***********************************************************************/
Expand Down Expand Up @@ -300,7 +300,7 @@
//Trap_Security(flags[POL_WRITE], POL_WRITE, path);
SET_NONE(state);
Init_Dir_Path(&dir, path, 0, POL_WRITE);
// !!! add *.r deletion
// !!! add *.reb deletion
// !!! add recursive delete (?)
result = OS_DO_DEVICE(&dir, RDC_DELETE);
///OS_FREE(dir.file.path);
Expand Down
2 changes: 1 addition & 1 deletion src/include/sys-globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//-- Bootstrap variables:
PVAR REBINT PG_Boot_Phase; // To know how far in the boot we are.
PVAR REBINT PG_Boot_Level; // User specified startup level
PVAR REBYTE **PG_Boot_Strs; // Special strings in boot.r (RS_ constants)
PVAR REBYTE **PG_Boot_Strs; // Special strings in boot.reb (RS_ constants)

//-- Various statistics about memory, etc.
PVAR REB_STATS *PG_Reb_Stats;
Expand Down
6 changes: 3 additions & 3 deletions src/include/sys-panics.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
enum reb_panics {

// Boot Errors (very limited environment avaliable)
RP_BOOT_DATA = 1000, // no boot.r text found
RP_BOOT_DATA = 1000, // no boot.reb text found
RP_REBVAL_ALIGNMENT, // not aligned perfectly in memory
RP_BAD_SIZE, // expected size did not match
RP_NO_BUFFER, // buffer not yet allocated
RP_BAD_BOOT_STRING, // boot strings area is invalid
RP_BAD_BOOT_TYPE_BLOCK, // boot block is wrong size
RP_BAD_END_TYPE_WORD, // the end word is not correct
RP_ACTION_OVERFLOW, // more actions than we should have
RE_NATIVE_BOOT, // bad boot.r native ordering
RE_NATIVE_BOOT, // bad boot.reb native ordering
RP_EARLY_ERROR, // error before error handling
RP_BAD_END_CANON_WORD, // END was not found
RP_BAD_TRUE_CANON_WORD, // TRUE was not found
Expand Down Expand Up @@ -81,7 +81,7 @@ enum reb_panics {
// Datatype Errors (300 + N --indicates location)
RP_DATATYPE = 1300,

// Documented Errors (keep in-sync with error strings in boot.r!)
// Documented Errors (keep in-sync with error strings in boot.reb!)
RP_STR_BASE = 1400,
RP_NO_MEMORY, // not enough memory: %d bytes
RP_BAD_WIDTH, // invalid series width: %d %d %d
Expand Down
2 changes: 1 addition & 1 deletion src/include/sys-scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
***********************************************************************/

/*
** Tokens returned by the scanner. Keep in sync with boot.r strings area.
** Tokens returned by the scanner. Keep in sync with boot.reb strings area.
*/
enum Value_Types {
TOKEN_EOF = 0,
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6416be5

Please sign in to comment.