Fixed color definition (bg and fg were swapped).
[wine] / programs / wcmd / wcmd.h
1 /*
2  * WCMD - Wine-compatible command line interface. 
3  *
4  * (C) 1999 D A Pickles
5  */
6
7
8 #define IDI_ICON1       1
9 #include <windows.h>
10 #ifndef RC_INVOKED
11 #include <string.h>
12 #include <stdlib.h>
13 #include <stdarg.h>
14 #include <stdio.h>
15 #include <ctype.h>
16
17 #ifdef WINELIB
18 #include <winbase.h>
19 #include <wincon.h>
20 #endif /* !WINELIB */
21
22 void WCMD_batch (char *, char *, int);
23 void WCMD_change_tty (void);
24 void WCMD_clear_screen (void);
25 void WCMD_copy (void);
26 void WCMD_create_dir (void);
27 void WCMD_delete (int recurse);
28 void WCMD_directory (void);
29 void WCMD_echo (char *);
30 void WCMD_for (char *);
31 void WCMD_give_help (char *command);
32 void WCMD_goto (void);
33 void WCMD_if (char *);
34 void WCMD_move (void);
35 void WCMD_output (char *format, ...);
36 void WCMD_output_asis (char *message);                   
37 void WCMD_parse (char *s, char *q, char *p1, char *p2);
38 void WCMD_pause (void);
39 void WCMD_pipe (char *command);
40 void WCMD_print_error (void);
41 void WCMD_process_command (char *command);
42 int WCMD_read_console (char *string, int str_len);
43 void WCMD_remove_dir (void);
44 void WCMD_rename (void);
45 void WCMD_run_program (char *command);
46 void WCMD_setshow_attrib (void);
47 void WCMD_setshow_date (void);
48 void WCMD_setshow_default (void);
49 void WCMD_setshow_env (char *command);
50 void WCMD_setshow_path (void);
51 void WCMD_setshow_prompt (void);
52 void WCMD_setshow_time (void);
53 void WCMD_shift (void);
54 void WCMD_show_prompt (void);
55 void WCMD_type (void);
56 void WCMD_verify (char *command);
57 void WCMD_version (void);
58 int  WCMD_volume (int mode, char *command);
59
60 char *WCMD_fgets (char *s, int n, HANDLE stream);
61 char *WCMD_parameter (char *s, int n, char **where);
62 char *WCMD_strtrim_leading_spaces (char *string);
63 void WCMD_strtrim_trailing_spaces (char *string);
64
65 /*      Data structure to hold context when executing batch files */
66
67 typedef struct {
68   char *command;        /* The command which invoked the batch file */
69   HANDLE h;             /* Handle to the open batch file */
70   int shift_count;      /* Number of SHIFT commands executed */
71   void *prev_context;   /* Pointer to the previous context block */
72 } BATCH_CONTEXT;
73
74 #endif /* !RC_INVOKED */
75
76 /*
77  *      Serial nos of builtin commands. These constants must be in step with
78  *      the list of strings defined in WCMD.C, and WCMD_EXIT *must* always be
79  *      the last one.
80  *
81  *      Yes it *would* be nice to use an enumeration here, but the Resource
82  *      Compiler won't accept resource IDs from enumerations :-(
83  */
84
85 #define WCMD_ATTRIB  0
86 #define WCMD_CALL    1
87 #define WCMD_CD      2
88 #define WCMD_CHDIR   3
89 #define WCMD_CLS     4
90 #define WCMD_COPY    5
91 #define WCMD_CTTY    6
92 #define WCMD_DATE    7
93 #define WCMD_DEL     8
94 #define WCMD_DIR     9
95 #define WCMD_ECHO   10
96 #define WCMD_ERASE  11
97 #define WCMD_FOR    12
98 #define WCMD_GOTO   13
99 #define WCMD_HELP   14
100 #define WCMD_IF     15
101 #define WCMD_LABEL  16
102 #define WCMD_MD     17
103 #define WCMD_MKDIR  18
104 #define WCMD_MOVE   19
105 #define WCMD_PATH   20
106 #define WCMD_PAUSE  21
107 #define WCMD_PROMPT 22
108 #define WCMD_REM    23
109 #define WCMD_REN    24
110 #define WCMD_RENAME 25
111 #define WCMD_RD     26
112 #define WCMD_RMDIR  27
113 #define WCMD_SET    28
114 #define WCMD_SHIFT  29
115 #define WCMD_TIME   30
116 #define WCMD_TYPE   31
117 #define WCMD_VERIFY 32
118 #define WCMD_VER    33
119 #define WCMD_VOL    34
120 #define WCMD_EXIT   35
121
122