]> gitweb.factorcode.org Git - factor.git/blob - library/platform/native/init.factor
Factor jEdit plugin!
[factor.git] / library / platform / native / init.factor
1 ! :folding=indent:collapseFolds=1:
2
3 ! $Id$
4 !
5 ! Copyright (C) 2004 Slava Pestov.
6
7 ! Redistribution and use in source and binary forms, with or without
8 ! modification, are permitted provided that the following conditions are met:
9
10 ! 1. Redistributions of source code must retain the above copyright notice,
11 !    this list of conditions and the following disclaimer.
12
13 ! 2. Redistributions in binary form must reproduce the above copyright notice,
14 !    this list of conditions and the following disclaimer in the documentation
15 !    and/or other materials provided with the distribution.
16
17 ! THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 ! INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 ! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 ! DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 ! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 ! OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 ! WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 IN: init
29 USE: ansi
30 USE: arithmetic
31 USE: errors
32 USE: combinators
33 USE: hashtables
34 USE: kernel
35 USE: lists
36 USE: logic
37 USE: interpreter
38 USE: io-internals
39 USE: math
40 USE: random
41 USE: namespaces
42 USE: parser
43 USE: prettyprint
44 USE: stack
45 USE: stdio
46 USE: streams
47 USE: strings
48 USE: styles
49 USE: vectors
50 USE: vocabularies
51 USE: words
52 USE: unparser
53
54 : init-gc ( -- )
55     [ garbage-collection ] 7 setenv ;
56
57 : boot ( -- )
58     init-gc
59     init-random
60     init-namespaces
61     init-stdio
62     "stdio" get <ansi-stream> "stdio" set
63
64     ! Some flags are *on* by default, unless user specifies
65     ! -no-<flag> CLI switch
66     t "user-init" set
67     t "interactive" set
68     "HOME" os-env [ "." ] unless* "~" set
69     "/" "/" set
70     10 "base" set
71
72     init-errors
73     init-search-path
74     init-scratchpad
75     init-styles
76     init-vocab-styles
77
78     run-user-init
79
80     init-interpreter ;