Skip to content

Commit

Permalink
added modules and utils to library
Browse files Browse the repository at this point in the history
  • Loading branch information
gchiu committed May 27, 2017
1 parent 9f38464 commit 21f0ac7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
48 changes: 27 additions & 21 deletions src/boot/sysobj.r
Expand Up @@ -93,7 +93,7 @@ ports: construct [] [
locale: construct [] [
language: ; Human language locale
language*: _
library: https://raw.githubusercontent.com/r3n/renclib/master/usermodules.reb
library: _ ;make object! [modules: utilities: https://raw.githubusercontent.com/r3n/renclib/master/usermodules.reb]
locale:
locale*: _
months: [
Expand All @@ -105,6 +105,11 @@ locale: construct [] [
]
]

set in locale 'library construct [][
modules: https://raw.githubusercontent.com/r3n/renclib/master/usermodules.reb
utilities: https://raw.githubusercontent.com/r3n/renclib/master/userutils.reb
]

options: construct [] [ ; Options supplied to REBOL during startup
bin: _ ; Path to directory where Rebol executable binary lives
boot: _ ; Path of executable, ie. system/options/bin/r3-exe
Expand Down Expand Up @@ -627,26 +632,27 @@ console: _ ;; console (repl) object created in host-start (os/host-start
; date-sep: #"-" ; The character used as the date separator
; date-month-num: false ; True if months are displayed as numbers; False for names
; time-sep: #":" ; The character used as the time separator
; cgi: construct [] [ ; CGI environment variables
; server-software:
; server-name:
; gateway-interface:
; server-protocol:
; server-port:
; request-method:
; path-info:
; path-translated:
; script-name:
; query-string:
; remote-host:
; remote-addr:
; auth-type:
; remote-user:
; remote-ident:
; Content-Type: ; cap'd for email header
; content-length: _
; other-headers: []
; ]

cgi: construct [] [ ; CGI environment variables
server-software:
server-name:
gateway-interface:
server-protocol:
server-port:
request-method:
path-info:
path-translated:
script-name:
query-string:
remote-host:
remote-addr:
auth-type:
remote-user:
remote-ident:
Content-Type: ; cap'd for email header
content-length: _
other-headers: []
]
; browser-type: 0

; trace: ; True if the --trace flag was specified
Expand Down
2 changes: 1 addition & 1 deletion src/mezz/sys-base.r
Expand Up @@ -84,7 +84,7 @@ do*: function [
]

; Convert value into a URL!
source: switch source load rebol/locale/library
source: switch source load rebol/locale/library/utilities
else [
fail [
{Module} source {not in rebol/locale/library}
Expand Down
11 changes: 10 additions & 1 deletion src/mezz/sys-load.r
Expand Up @@ -904,7 +904,16 @@ import: function [
"Don't export to the user context"
][
if tag? module [
module: first select load rebol/locale/library module
if trap? [
module: first tmp: select load rebol/locale/library/modules module
][
cause-error 'access 'cannot-open reduce
either blank? tmp [
[module "module not found in system/locale/library/modules"]
][
[module "error occurred in loading module from system/locale/library/modules"]
]
]
]
; If it's a needs dialect block, call DO-NEEDS/block:
if block? module [
Expand Down

0 comments on commit 21f0ac7

Please sign in to comment.