Deleted Added
sdiff udiff text old ( 187143 ) new ( 222417 )
full compact
1\ Copyright (c) 1999 Daniel C. Sobral <dcs@freebsd.org>
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
25\ $FreeBSD: head/sys/boot/forth/support.4th 222417 2011-05-28 08:50:38Z julian $
26
27\ Loader.rc support functions:
28\
29\ initialize ( addr len -- ) as above, plus load_conf_files
30\ load_conf ( addr len -- ) load conf file given
31\ include_conf_files ( -- ) load all conf files in load_conf_files
32\ print_syntax_error ( -- ) print line and marker of where a syntax
33\ error was detected

--- 15 unchanged lines hidden (view full) ---

49\ string module.beforeload command to be executed before load
50\ string module.afterload command to be executed after load
51\ string module.loaderror command to be executed if load fails
52\ cell module.next list chain
53\
54\ Exported global variables;
55\
56\ string conf_files configuration files to be loaded
57\ cell modules_options pointer to first module information
58\ value verbose? indicates if user wants a verbose loading
59\ value any_conf_read? indicates if a conf file was succesfully read
60\
61\ Other exported words:
62\ note, strlen is internal
63\ strdup ( addr len -- addr' len) similar to strdup(3)
64\ strcat ( addr len addr' len' -- addr len+len' ) similar to strcat(3)

--- 93 unchanged lines hidden (view full) ---

158;structure
159
160\ end of structures
161
162\ Global variables
163
164string conf_files
165string nextboot_conf_file
166create module_options sizeof module.next allot 0 module_options !
167create last_module_option sizeof module.next allot 0 last_module_option !
1680 value verbose?
1690 value nextboot?
170
171\ Support string functions
172: strdup { addr len -- addr' len' }
173 len allocate if ENOMEM throw then

--- 429 unchanged lines hidden (view full) ---

603: nextboot_flag? s" nextboot_enable" assignment_type? ;
604
605: nextboot_conf? s" nextboot_conf" assignment_type? ;
606
607: verbose_flag? s" verbose_loading" assignment_type? ;
608
609: execute? s" exec" assignment_type? ;
610
611: module_load? load_module_suffix suffix_type? ;
612
613: module_loadname? module_loadname_suffix suffix_type? ;
614
615: module_type? module_type_suffix suffix_type? ;
616
617: module_args? module_args_suffix suffix_type? ;
618

--- 124 unchanged lines hidden (view full) ---

743 yes_value? to verbose?
744;
745
746: execute_command
747 value_buffer strget unquote
748 ['] evaluate catch if EEXEC throw then
749;
750
751: process_assignment
752 name_buffer .len @ 0= if exit then
753 loader_conf_files? if set_conf_files exit then
754 nextboot_flag? if set_nextboot_flag exit then
755 nextboot_conf? if set_nextboot_conf exit then
756 verbose_flag? if set_verbose exit then
757 execute? if execute_command exit then
758 module_load? if set_module_flag exit then
759 module_loadname? if set_module_loadname exit then
760 module_type? if set_module_type exit then
761 module_args? if set_module_args exit then
762 module_beforeload? if set_module_beforeload exit then
763 module_afterload? if set_module_afterload exit then
764 module_loaderror? if set_module_loaderror exit then
765 set_environment_variable

--- 752 unchanged lines hidden (view full) ---

1518 r> if ( a path was passed )
1519 load_directory_or_file
1520 else
1521 standard_kernel_search
1522 then
1523 ?dup 0= if ['] load_modules catch then
1524;
1525
1526\ Go back to straight forth vocabulary
1527
1528only forth also definitions
1529