1 /* File: "os_shell.h", Time-stamp: <2009-03-14 09:15:04 feeley> */
3 /* Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved. */
11 /*---------------------------------------------------------------------------*/
14 typedef struct ___shell_module_struct
20 int environ_unused_at_end
;
21 ___BOOL environ_was_extended
;
23 #define ___SHELL_MODULE_INIT , 0, 0
29 extern ___shell_module ___shell_mod
;
32 /*---------------------------------------------------------------------------*/
34 /* Access to shell environment variables. */
39 #define ___GETENV_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) ucs2
40 #define ___SETENV_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) ucs2
41 #define ___ENVIRON_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) ucs2
42 #define ENV_CHAR_BYTES 2
44 #define ___GETENV_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) native
45 #define ___SETENV_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) native
46 #define ___ENVIRON_CE_SELECT(latin1,utf8,ucs2,ucs4,wchar,native) native
47 #define ENV_CHAR_BYTES 1
51 #ifndef ENV_CHAR_BYTES
52 #define ENV_CHAR_BYTES 1
56 /********************************** obsolete.... use ___getenv_UCS_2 */
61 extern ___SCMOBJ ___getenv_UCS_2
62 ___P((___UCS_2STRING name
,
63 ___UCS_2STRING
*value
),
66 extern ___SCMOBJ ___setenv_UCS_2
67 ___P((___UCS_2STRING name
,
68 ___UCS_2STRING value
),
71 extern ___SCMOBJ ___unsetenv_UCS_2
72 ___P((___UCS_2STRING name
),
75 extern ___SCMOBJ ___os_getenv
76 ___P((___SCMOBJ name
),
79 extern ___SCMOBJ ___os_setenv
84 extern ___SCMOBJ ___os_environ ___PVOID
;
87 /*---------------------------------------------------------------------------*/
92 /* Max length of a shell command, not including null. */
94 #define ___CMD_MAX_LENGTH 1024
97 extern ___SCMOBJ ___os_shell_command
103 /*---------------------------------------------------------------------------*/
105 /* Shell module initialization/finalization. */
108 extern ___SCMOBJ ___setup_shell_module ___PVOID
;
110 extern void ___cleanup_shell_module ___PVOID
;
113 /*---------------------------------------------------------------------------*/