1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
3 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
8 //-----------------------------------------------------------------------------
10 //-----------------------------------------------------------------------------
18 #define PROXPROMPT_MAX_SIZE 255
20 #define PROXPROMPT_COMPOSE "[" "%s%s" "] pm3 --> "
22 #define PROXPROMPT_CTX_SCRIPTFILE "|" _RL_GREEN_("script")
23 #define PROXPROMPT_CTX_SCRIPTCMD "|" _RL_GREEN_("script")
24 #define PROXPROMPT_CTX_STDIN "|" _RL_GREEN_("script")
25 #define PROXPROMPT_CTX_INTERACTIVE ""
27 #define PROXPROMPT_DEV_USB _RL_BOLD_GREEN_("usb")
28 #define PROXPROMPT_DEV_FPC _RL_BOLD_GREEN_("fpc")
29 #define PROXPROMPT_DEV_OFFLINE _RL_BOLD_RED_("offline")
31 #define PROXHISTORY "history.txt"
32 #define PROXLOG "log_%Y%m%d.txt"
33 #define MAX_NESTED_CMDSCRIPT 10
34 #define MAX_NESTED_LUASCRIPT 10
40 // Load all settings into memory (struct)
43 #define GetCurrentDir _getcwd
45 #define GetCurrentDir getcwd
48 int push_cmdscriptfile(char *path
, bool stayafter
);
49 const char *get_my_executable_path(void);
50 const char *get_my_executable_directory(void);
51 const char *get_my_user_directory(void);
53 void main_loop(char *script_cmds_file
, char *script_cmd
, bool stayInCommandLoop
);