/ Published in: Lisp
The Main-loop and other main-functions.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
;;;; Start-up, use and compilation ;;; Global-Imports (ql:quickload "cl-utilities") (load "mtu_settings.lisp") (load "mtu_menus.lisp") (load "mtu_input.lisp") ;;; Global variables (defvar *mtu* nil) (defvar *mtub* nil) ; backup (defvar *interface* nil) (defun main_menu (preset) "The Main Menu" (show_main_menu preset) (let ((input (input_loop #'menu_input_check `(,preset)))) (cond ((equal input 'settings) (show_settings_menu) (setf input (input_loop #'settings_input_check nil)) (if (equal input 'exit) (main_menu preset) (format t "Selected: ~a" input))) ((equal input 'exit) (exit)) ((equal input 'showmtu) (format t "Current MTU Value: ~a~%" *mtu*)) ((equal input 'editMtu) (edit_mtu)) ((equal input 'createpmtu) (create_preset_mtu)) ((equal input 'loadpmtu) (load_preset_mtu)) ((equal input 'editpmtu) (edit_preset_mtu)) ((equal input 'deletepmtu) (delete_preset_mtu)) (t (format t "Selected: ~a" input)))) (main_menu preset)) (defun main (&optional preset) "Main Loop" (when (equal (load_settings) 'None) (show_interface_selection (get_interface_list)) (let ((interface (input_loop #'interface_input_check (get_interface_list)))) (create_settings interface)) (main_menu preset))) (defun start () "Start-up function" (main) ) #| (Ext:saveinitmem "W:\\Lisp\\rel-dir\\MTU\\mtu.exe" :init-function #'start :NORC t :script t :executable t :quiet t) #|