1 /* Like hello.c, but prints to the current output port and returns
2    (void). */
3 
4 #include "escheme.h"
5 
scheme_reload(Scheme_Env * env)6 Scheme_Object *scheme_reload(Scheme_Env *env)
7 {
8   /* Make the string: */
9   Scheme_Object *hw;
10   hw = scheme_make_utf8_string("Hello, World!\n");
11 
12   /* Display it: */
13   scheme_display(hw, scheme_get_param(scheme_current_config(),
14 				      MZCONFIG_OUTPUT_PORT));
15 
16   /* Why not just
17         printf("Hello, World!\n");
18      ? That would write to stdout, which may or may not be the same as
19      the current output port. But sometimes printf() is what you
20      want. */
21 
22   return scheme_void;
23 }
24 
scheme_initialize(Scheme_Env * env)25 Scheme_Object *scheme_initialize(Scheme_Env *env)
26 {
27   /* First load is same as every load: */
28   return scheme_reload(env);
29 }
30 
scheme_module_name()31 Scheme_Object *scheme_module_name()
32 {
33   /* This extension doesn't define a module: */
34   return scheme_false;
35 }
36