PreviousUpNext

15.4.1033  src/lib/std/commandline.pkg

## commandline.pkg

# Compiled by:
#     src/lib/std/standard.lib

stipulate
    package ci   =  mythryl_callable_c_library_interface;                                               # mythryl_callable_c_library_interface  is from   src/lib/std/src/unsafe/mythryl-callable-c-library-interface.pkg
herein

    package   commandline
    :         Commandline                                                                               # Commandline                           is from   src/lib/std/commandline.api
    {
        # Command-line arguments 
        #
        get_program_name
            =
            ci::find_c_function                                                                         # find_c_function implemented ultimately by     get_mythryl_callable_c_function   in   src/c/lib/mythryl-callable-c-libraries.c
              {                                                                                         # No need to use   find_c_function'   because this is not a true syscall.
                lib_name =>  "heap",
                fun_name =>  "program_name_from_commandline"                                            # "program_name_from_commandline"       def in    src/c/lib/heap/libmythryl-heap.c
              }
            :  Void -> String;

        get_commandline_arguments
            =
            ci::find_c_function                                                                         # No need to use   find_c_function'   because this is not a true syscall.
              {
                lib_name =>  "heap",
                fun_name =>  "commandline_args"                                                         # commandline_args                      def in    src/c/lib/heap/libmythryl-heap.c
              }
            :  Void -> List( String );

        get_all_commandline_arguments                                                                   # No need to use   find_c_function'   because this is not a true syscall.
            =
            ci::find_c_function
              {
                lib_name =>  "heap",
                fun_name =>  "raw_commandline_args"                                                     # "raw_commandline_args"                def in    src/c/lib/heap/libmythryl-heap.c
              }
            :  Void -> List( String );
    };
end;


## (C) 1999 Lucent Technologies, Bell Laboratories 
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext