Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9e041c6b
Commit
9e041c6b
authored
Mar 13, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Add support for FTYPE.
parent
62fff2ea
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
64 additions
and
17 deletions
+64
-17
Cs.rc
programs/cmd/Cs.rc
+1
-0
De.rc
programs/cmd/De.rc
+1
-0
En.rc
programs/cmd/En.rc
+1
-0
Es.rc
programs/cmd/Es.rc
+1
-0
Fr.rc
programs/cmd/Fr.rc
+1
-0
Ja.rc
programs/cmd/Ja.rc
+1
-0
Ko.rc
programs/cmd/Ko.rc
+1
-0
Nl.rc
programs/cmd/Nl.rc
+1
-0
No.rc
programs/cmd/No.rc
+1
-0
Pl.rc
programs/cmd/Pl.rc
+1
-0
Pt.rc
programs/cmd/Pt.rc
+1
-0
Ru.rc
programs/cmd/Ru.rc
+1
-0
Si.rc
programs/cmd/Si.rc
+1
-0
Tr.rc
programs/cmd/Tr.rc
+1
-0
builtins.c
programs/cmd/builtins.c
+40
-13
wcmd.h
programs/cmd/wcmd.h
+4
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+6
-2
No files found.
programs/cmd/Cs.rc
View file @
9e041c6b
...
...
@@ -235,4 +235,5 @@ Zadejte HELP <pkaz> pro podrobnj informace o nkterm z ve uvedench pk
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/De.rc
View file @
9e041c6b
...
...
@@ -252,4 +252,5 @@ obigen Befehle erhalten.\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/En.rc
View file @
9e041c6b
...
...
@@ -239,4 +239,5 @@ Enter HELP <command> for further information on any of the above commands\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Es.rc
View file @
9e041c6b
...
...
@@ -247,4 +247,5 @@ Introduzca HELP <comando> para ms informacin sobre cualquiera de los comandos\
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Fr.rc
View file @
9e041c6b
...
...
@@ -229,4 +229,5 @@ Entrez HELP <commande> pour plus d'informations sur les commandes ci-dessus\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Ja.rc
View file @
9e041c6b
...
...
@@ -233,4 +233,5 @@ EXIT\t\tCMDI\n\n\
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Ko.rc
View file @
9e041c6b
...
...
@@ -231,4 +231,5 @@ HELP <명령>을 치면 그 명령의 상세한 정보를 보여줌\n"
WCMD_YES, "예"
WCMD_NO, "아니오"
WCMD_NOASSOC, "이 파일확장자 %s에 연결된 풀그림이 없습니다 \n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Nl.rc
View file @
9e041c6b
...
...
@@ -232,4 +232,5 @@ type HELP <opdracht> voor meer informatie over bovengenoemde opdrachten\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/No.rc
View file @
9e041c6b
...
...
@@ -230,4 +230,5 @@ Skriv HELP <kommando> for mer informasjon om kommandoene ovenfor\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Pl.rc
View file @
9e041c6b
...
...
@@ -226,4 +226,5 @@ Wpisz HELP <komenda> dla dokadniejszych informacji o komendzie\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Pt.rc
View file @
9e041c6b
...
...
@@ -439,4 +439,5 @@ Digite HELP <comando> para mais informaes sobre alguns dos comandos acima\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Ru.rc
View file @
9e041c6b
...
...
@@ -245,4 +245,5 @@ EXIT\t\t CMD\n\n\
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Si.rc
View file @
9e041c6b
...
...
@@ -231,4 +231,5 @@ Enter HELP <command> for further information on any of the above commands\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/Tr.rc
View file @
9e041c6b
...
...
@@ -233,4 +233,5 @@ Yukardaki komutlar hakknda daha fazla bilgi iin HELP <komut> girin\n"
WCMD_YES, "Y"
WCMD_NO, "N"
WCMD_NOASSOC, "File association missing for extension %s\n"
WCMD_NOFTYPE, "No open command associated with file type '%s'\n"
}
programs/cmd/builtins.c
View file @
9e041c6b
...
...
@@ -1615,9 +1615,10 @@ BOOL WCMD_ask_confirm (char *message, BOOL showSureText) {
/*****************************************************************************
* WCMD_assoc
*
* Lists or sets file associations
* Lists or sets file associations (assoc = TRUE)
* Lists or sets file types (assoc = FALSE)
*/
void
WCMD_assoc
(
char
*
command
)
{
void
WCMD_assoc
(
char
*
command
,
BOOL
assoc
)
{
HKEY
key
;
DWORD
accessOptions
=
KEY_READ
;
...
...
@@ -1657,12 +1658,19 @@ void WCMD_assoc (char *command) {
if
(
rc
==
ERROR_SUCCESS
)
{
/* Only interested in extension ones */
if
(
keyName
[
0
]
==
'.'
)
{
/* Only interested in extension ones if assoc, or others
if not assoc */
if
((
keyName
[
0
]
==
'.'
&&
assoc
)
||
(
!
(
keyName
[
0
]
==
'.'
)
&&
(
!
assoc
)))
{
char
subkey
[
MAXSTRING
];
strcpy
(
subkey
,
keyName
);
if
(
!
assoc
)
strcat
(
subkey
,
"
\\
Shell
\\
Open
\\
Command"
);
if
(
RegOpenKeyEx
(
key
,
keyName
,
0
,
if
(
RegOpenKeyEx
(
key
,
subkey
,
0
,
accessOptions
,
&
readKey
)
==
ERROR_SUCCESS
)
{
valueLen
=
sizeof
(
keyValue
);
rc
=
RegQueryValueEx
(
readKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
keyValue
,
&
valueLen
);
WCMD_output_asis
(
keyName
);
...
...
@@ -1683,13 +1691,18 @@ void WCMD_assoc (char *command) {
/* Parameter supplied - if no '=' on command line, its a query */
if
(
newValue
==
NULL
)
{
char
*
space
;
char
subkey
[
MAXSTRING
];
/* Query terminates the parameter at the first space */
strcpy
(
keyValue
,
command
);
space
=
strchr
(
keyValue
,
' '
);
if
(
space
)
*
space
=
0x00
;
if
(
RegOpenKeyEx
(
key
,
keyValue
,
0
,
/* Set up key name */
strcpy
(
subkey
,
keyValue
);
if
(
!
assoc
)
strcat
(
subkey
,
"
\\
Shell
\\
Open
\\
Command"
);
if
(
RegOpenKeyEx
(
key
,
subkey
,
0
,
accessOptions
,
&
readKey
)
==
ERROR_SUCCESS
)
{
rc
=
RegQueryValueEx
(
readKey
,
NULL
,
NULL
,
NULL
,
...
...
@@ -1706,7 +1719,11 @@ void WCMD_assoc (char *command) {
char
outbuffer
[
MAXSTRING
];
/* Load the translated 'File association not found' */
LoadString
(
hinst
,
WCMD_NOASSOC
,
msgbuffer
,
sizeof
(
msgbuffer
));
if
(
assoc
)
{
LoadString
(
hinst
,
WCMD_NOASSOC
,
msgbuffer
,
sizeof
(
msgbuffer
));
}
else
{
LoadString
(
hinst
,
WCMD_NOFTYPE
,
msgbuffer
,
sizeof
(
msgbuffer
));
}
sprintf
(
outbuffer
,
msgbuffer
,
keyValue
);
WCMD_output_asis
(
outbuffer
);
errorlevel
=
2
;
...
...
@@ -1715,18 +1732,24 @@ void WCMD_assoc (char *command) {
/* Not a query - its a set or clear of a value */
}
else
{
char
subkey
[
MAXSTRING
];
/* Get pointer to new value */
*
newValue
=
0x00
;
newValue
++
;
/* If nothing after '=' then clear value */
/* Set up key name */
strcpy
(
subkey
,
command
);
if
(
!
assoc
)
strcat
(
subkey
,
"
\\
Shell
\\
Open
\\
Command"
);
/* If nothing after '=' then clear value - only valid for ASSOC */
if
(
*
newValue
==
0x00
)
{
rc
=
RegDeleteKey
(
key
,
command
);
if
(
rc
==
ERROR_SUCCESS
)
{
if
(
assoc
)
rc
=
RegDeleteKey
(
key
,
command
);
if
(
assoc
&&
rc
==
ERROR_SUCCESS
)
{
WINE_TRACE
(
"HKCR Key '%s' deleted
\n
"
,
command
);
}
else
if
(
rc
!=
ERROR_FILE_NOT_FOUND
)
{
}
else
if
(
assoc
&&
rc
!=
ERROR_FILE_NOT_FOUND
)
{
WCMD_print_error
();
errorlevel
=
2
;
...
...
@@ -1735,7 +1758,11 @@ void WCMD_assoc (char *command) {
char
outbuffer
[
MAXSTRING
];
/* Load the translated 'File association not found' */
LoadString
(
hinst
,
WCMD_NOASSOC
,
msgbuffer
,
sizeof
(
msgbuffer
));
if
(
assoc
)
{
LoadString
(
hinst
,
WCMD_NOASSOC
,
msgbuffer
,
sizeof
(
msgbuffer
));
}
else
{
LoadString
(
hinst
,
WCMD_NOFTYPE
,
msgbuffer
,
sizeof
(
msgbuffer
));
}
sprintf
(
outbuffer
,
msgbuffer
,
keyValue
);
WCMD_output_asis
(
outbuffer
);
errorlevel
=
2
;
...
...
@@ -1743,7 +1770,7 @@ void WCMD_assoc (char *command) {
/* It really is a set value = contents */
}
else
{
rc
=
RegCreateKeyEx
(
key
,
command
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
rc
=
RegCreateKeyEx
(
key
,
subkey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
accessOptions
,
NULL
,
&
readKey
,
NULL
);
if
(
rc
==
ERROR_SUCCESS
)
{
rc
=
RegSetValueEx
(
readKey
,
NULL
,
0
,
REG_SZ
,
...
...
programs/cmd/wcmd.h
View file @
9e041c6b
...
...
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <ctype.h>
void
WCMD_assoc
(
char
*
);
void
WCMD_assoc
(
char
*
,
BOOL
);
void
WCMD_batch
(
char
*
,
char
*
,
int
,
char
*
,
HANDLE
);
void
WCMD_call
(
char
*
command
);
void
WCMD_change_tty
(
void
);
...
...
@@ -162,9 +162,10 @@ struct env_stack
#define WCMD_POPD 39
#define WCMD_ASSOC 40
#define WCMD_COLOR 41
#define WCMD_FTYPE 42
/* Must be last in list */
#define WCMD_EXIT 4
2
#define WCMD_EXIT 4
3
/* Some standard messages */
extern
const
char
nyi
[];
...
...
@@ -177,6 +178,7 @@ extern const char anykey[];
#define WCMD_YES 1002
#define WCMD_NO 1003
#define WCMD_NOASSOC 1004
#define WCMD_NOFTYPE 1005
/* msdn specified max for Win XP */
#define MAXSTRING 8192
programs/cmd/wcmdmain.c
View file @
9e041c6b
...
...
@@ -35,7 +35,8 @@ const char * const inbuilt[] = {"ATTRIB", "CALL", "CD", "CHDIR", "CLS", "COPY",
"HELP"
,
"IF"
,
"LABEL"
,
"MD"
,
"MKDIR"
,
"MOVE"
,
"PATH"
,
"PAUSE"
,
"PROMPT"
,
"REM"
,
"REN"
,
"RENAME"
,
"RD"
,
"RMDIR"
,
"SET"
,
"SHIFT"
,
"TIME"
,
"TITLE"
,
"TYPE"
,
"VERIFY"
,
"VER"
,
"VOL"
,
"ENDLOCAL"
,
"SETLOCAL"
,
"PUSHD"
,
"POPD"
,
"ASSOC"
,
"COLOR"
,
"EXIT"
};
"ENDLOCAL"
,
"SETLOCAL"
,
"PUSHD"
,
"POPD"
,
"ASSOC"
,
"COLOR"
,
"FTYPE"
,
"EXIT"
};
HINSTANCE
hinst
;
DWORD
errorlevel
;
...
...
@@ -657,11 +658,14 @@ void WCMD_process_command (char *command)
WCMD_popd
();
break
;
case
WCMD_ASSOC
:
WCMD_assoc
(
p
);
WCMD_assoc
(
p
,
TRUE
);
break
;
case
WCMD_COLOR
:
WCMD_color
();
break
;
case
WCMD_FTYPE
:
WCMD_assoc
(
p
,
FALSE
);
break
;
case
WCMD_EXIT
:
WCMD_exit
();
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment