Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8e5bb205
Commit
8e5bb205
authored
Oct 09, 2003
by
Daniel Marmier
Committed by
Alexandre Julliard
Oct 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed warnings with gcc option "-Wwrite-strings".
parent
b817a3c5
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
59 additions
and
58 deletions
+59
-58
builtins.c
programs/wcmd/builtins.c
+4
-4
wcmd.h
programs/wcmd/wcmd.h
+3
-3
wcmdmain.c
programs/wcmd/wcmdmain.c
+3
-3
drive.c
programs/winecfg/drive.c
+4
-4
winecfg.c
programs/winecfg/winecfg.c
+11
-11
winecfg.h
programs/winecfg/winecfg.h
+5
-5
db_disasm.c
programs/winedbg/db_disasm.c
+3
-3
dbg.y
programs/winedbg/dbg.y
+2
-2
debugger.h
programs/winedbg/debugger.h
+1
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+6
-6
hash.c
programs/winedbg/hash.c
+3
-2
info.c
programs/winedbg/info.c
+4
-4
types.c
programs/winedbg/types.c
+10
-10
No files found.
programs/wcmd/builtins.c
View file @
8e5bb205
...
...
@@ -101,7 +101,7 @@ DWORD count;
WIN32_FIND_DATA
fd
;
HANDLE
hff
;
BOOL
force
,
status
;
static
char
*
overwrite
=
"Overwrite file (Y/N)?"
;
static
c
onst
c
har
*
overwrite
=
"Overwrite file (Y/N)?"
;
char
string
[
8
],
outpath
[
MAX_PATH
],
inpath
[
MAX_PATH
],
*
infile
;
if
((
strchr
(
param1
,
'*'
)
!=
NULL
)
&&
(
strchr
(
param1
,
'%'
)
!=
NULL
))
{
...
...
@@ -207,9 +207,9 @@ char *p;
* in DOS (try typing "ECHO ON AGAIN" for an example).
*/
void
WCMD_echo
(
char
*
command
)
{
void
WCMD_echo
(
c
onst
c
har
*
command
)
{
static
char
*
eon
=
"Echo is ON
\n
"
,
*
eoff
=
"Echo is OFF
\n
"
;
static
c
onst
c
har
*
eon
=
"Echo is ON
\n
"
,
*
eoff
=
"Echo is OFF
\n
"
;
int
count
;
count
=
strlen
(
command
);
...
...
@@ -805,7 +805,7 @@ DWORD count;
void
WCMD_verify
(
char
*
command
)
{
static
char
*
von
=
"Verify is ON
\n
"
,
*
voff
=
"Verify is OFF
\n
"
;
static
c
onst
c
har
*
von
=
"Verify is ON
\n
"
,
*
voff
=
"Verify is OFF
\n
"
;
int
count
;
count
=
strlen
(
command
);
...
...
programs/wcmd/wcmd.h
View file @
8e5bb205
...
...
@@ -40,7 +40,7 @@ void WCMD_copy (void);
void
WCMD_create_dir
(
void
);
void
WCMD_delete
(
int
recurse
);
void
WCMD_directory
(
void
);
void
WCMD_echo
(
char
*
);
void
WCMD_echo
(
c
onst
c
har
*
);
void
WCMD_enter_paged_mode
(
void
);
void
WCMD_for
(
char
*
);
void
WCMD_give_help
(
char
*
command
);
...
...
@@ -48,8 +48,8 @@ void WCMD_goto (void);
void
WCMD_if
(
char
*
);
void
WCMD_leave_paged_mode
(
void
);
void
WCMD_move
(
void
);
void
WCMD_output
(
char
*
format
,
...);
void
WCMD_output_asis
(
char
*
message
);
void
WCMD_output
(
c
onst
c
har
*
format
,
...);
void
WCMD_output_asis
(
c
onst
c
har
*
message
);
void
WCMD_parse
(
char
*
s
,
char
*
q
,
char
*
p1
,
char
*
p2
);
void
WCMD_pause
(
void
);
void
WCMD_pipe
(
char
*
command
);
...
...
programs/wcmd/wcmdmain.c
View file @
8e5bb205
...
...
@@ -27,7 +27,7 @@
#include "ntstatus.h"
#include "wcmd.h"
char
*
inbuilt
[]
=
{
"ATTRIB"
,
"CALL"
,
"CD"
,
"CHDIR"
,
"CLS"
,
"COPY"
,
"CTTY"
,
c
onst
c
har
*
inbuilt
[]
=
{
"ATTRIB"
,
"CALL"
,
"CD"
,
"CHDIR"
,
"CLS"
,
"COPY"
,
"CTTY"
,
"DATE"
,
"DEL"
,
"DIR"
,
"ECHO"
,
"ERASE"
,
"FOR"
,
"GOTO"
,
"HELP"
,
"IF"
,
"LABEL"
,
"MD"
,
"MKDIR"
,
"MOVE"
,
"PATH"
,
"PAUSE"
,
"PROMPT"
,
"REM"
,
"REN"
,
"RENAME"
,
"RD"
,
"RMDIR"
,
"SET"
,
"SHIFT"
,
...
...
@@ -728,7 +728,7 @@ int p = 0;
*
*/
void
WCMD_output
(
char
*
format
,
...)
{
void
WCMD_output
(
c
onst
c
har
*
format
,
...)
{
va_list
ap
;
char
string
[
1024
];
...
...
@@ -766,7 +766,7 @@ void WCMD_leave_paged_mode(void)
* without formatting eg. when message contains '%'
*/
void
WCMD_output_asis
(
char
*
message
)
{
void
WCMD_output_asis
(
c
onst
c
har
*
message
)
{
DWORD
count
;
char
*
ptr
;
char
string
[
1024
];
...
...
programs/winecfg/drive.c
View file @
8e5bb205
...
...
@@ -47,7 +47,7 @@ static int lastSel = 0; /* the last drive selected in the property sheet */
/* returns NULL on failure. caller is responsible for freeing result */
char
*
getDriveValue
(
char
letter
,
char
*
valueName
)
{
char
*
getDriveValue
(
char
letter
,
c
onst
c
har
*
valueName
)
{
HKEY
hkDrive
=
0
;
char
*
subKeyName
;
char
*
result
=
NULL
;
...
...
@@ -76,7 +76,7 @@ end:
}
/* call with newValue == NULL to remove a value */
void
setDriveValue
(
char
letter
,
c
har
*
valueName
,
char
*
newValue
)
{
void
setDriveValue
(
char
letter
,
c
onst
char
*
valueName
,
const
char
*
newValue
)
{
char
*
driveSection
=
malloc
(
strlen
(
"Drive X"
)
+
1
);
sprintf
(
driveSection
,
"Drive %c"
,
letter
);
if
(
newValue
)
...
...
@@ -226,8 +226,8 @@ int refreshDriveDlg (HWND hDlg)
#define DRIVE_MASK_BIT(B) 1<<(toupper(B)-'A')
typedef
struct
{
char
*
sCode
;
char
*
sDesc
;
c
onst
c
har
*
sCode
;
c
onst
c
har
*
sDesc
;
}
code_desc_pair
;
static
code_desc_pair
type_pairs
[]
=
{
...
...
programs/winecfg/winecfg.c
View file @
8e5bb205
...
...
@@ -68,14 +68,14 @@ int initialize(void) {
/*****************************************************************************
* getConfigValue: Retrieves a configuration value from the registry
*
* char *subKey : the name of the config section
* char *valueName : the name of the config value
* char *defaultResult : if the key isn't found, return this value instead
* c
onst c
har *subKey : the name of the config section
* c
onst c
har *valueName : the name of the config value
* c
onst c
har *defaultResult : if the key isn't found, return this value instead
*
* Returns a buffer holding the value if successful, NULL if not. Caller is responsible for freeing the result.
*
*/
char
*
getConfigValue
(
c
har
*
subkey
,
char
*
valueName
,
char
*
defaultResult
)
char
*
getConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
,
const
char
*
defaultResult
)
{
char
*
buffer
=
NULL
;
DWORD
dataLength
;
...
...
@@ -129,14 +129,14 @@ end:
* setConfigValue : Sets a configuration key in the registry. Section will be created if it doesn't already exist
*
* HKEY hCurrent : the registry key that the configuration is rooted at
* char *subKey : the name of the config section
* char *valueName : the name of the config value
* char *value : the value to set the configuration key to
* c
onst c
har *subKey : the name of the config section
* c
onst c
har *valueName : the name of the config value
* c
onst c
har *value : the value to set the configuration key to
*
* Returns 0 on success, non-zero otherwise
*
*/
int
setConfigValue
(
c
har
*
subkey
,
char
*
valueName
,
const
char
*
value
)
{
int
setConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
,
const
char
*
value
)
{
DWORD
res
=
1
;
HKEY
key
=
NULL
;
...
...
@@ -160,7 +160,7 @@ end:
}
/* returns 0 on success, an HRESULT from the registry funtions otherwise */
HRESULT
doesConfigValueExist
(
c
har
*
subkey
,
char
*
valueName
)
{
HRESULT
doesConfigValueExist
(
c
onst
char
*
subkey
,
const
char
*
valueName
)
{
HRESULT
hr
;
HKEY
key
;
...
...
@@ -184,7 +184,7 @@ HRESULT doesConfigValueExist(char *subkey, char *valueName) {
}
/* removes the requested value from the registry, however, does not remove the section if empty. Returns S_OK (0) on success. */
HRESULT
removeConfigValue
(
c
har
*
subkey
,
char
*
valueName
)
{
HRESULT
removeConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
)
{
HRESULT
hr
;
HKEY
key
;
WINE_TRACE
(
"subkey=%s, valueName=%s
\n
"
,
subkey
,
valueName
);
...
...
@@ -231,7 +231,7 @@ void destroyTransaction(struct transaction *trans) {
free
(
trans
);
}
void
addTransaction
(
c
har
*
section
,
char
*
key
,
enum
transaction_action
action
,
char
*
newValue
)
{
void
addTransaction
(
c
onst
char
*
section
,
const
char
*
key
,
enum
transaction_action
action
,
const
char
*
newValue
)
{
struct
transaction
*
trans
=
calloc
(
sizeof
(
struct
transaction
),
1
);
assert
(
section
!=
NULL
);
...
...
programs/winecfg/winecfg.h
View file @
8e5bb205
...
...
@@ -82,7 +82,7 @@ void processTransQueue();
* ACTION_SET -> this transaction will change a registry key, newValue is the replacement value
* ACTION_REMOVE -> this transaction will remove a registry key. In this case, newValue is ignored.
*/
void
addTransaction
(
c
har
*
section
,
char
*
key
,
enum
transaction_action
action
,
char
*
newValue
);
void
addTransaction
(
c
onst
char
*
section
,
const
char
*
key
,
enum
transaction_action
action
,
const
char
*
newValue
);
/* frees the transaction structure, all fields, and removes it from the queue if in it */
void
destroyTransaction
(
struct
transaction
*
trans
);
...
...
@@ -91,10 +91,10 @@ void destroyTransaction(struct transaction *trans);
int
initialize
(
void
);
extern
HKEY
configKey
;
int
setConfigValue
(
c
har
*
subkey
,
char
*
valueName
,
const
char
*
value
);
char
*
getConfigValue
(
c
har
*
subkey
,
char
*
valueName
,
char
*
defaultResult
);
HRESULT
doesConfigValueExist
(
c
har
*
subkey
,
char
*
valueName
);
HRESULT
removeConfigValue
(
c
har
*
subkey
,
char
*
valueName
);
int
setConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
,
const
char
*
value
);
char
*
getConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
,
const
char
*
defaultResult
);
HRESULT
doesConfigValueExist
(
c
onst
char
*
subkey
,
const
char
*
valueName
);
HRESULT
removeConfigValue
(
c
onst
char
*
subkey
,
const
char
*
valueName
);
/* X11DRV */
...
...
programs/winedbg/db_disasm.c
View file @
8e5bb205
...
...
@@ -1191,7 +1191,7 @@ static void db_task_printsym(unsigned int addr, int size)
DEBUG_PrintAddress
(
&
address
,
db_disasm_16
?
MODE_16
:
MODE_32
,
TRUE
);
}
void
db_print_address
(
char
*
seg
,
int
size
,
struct
i_addr
*
addrp
,
int
byref
)
void
db_print_address
(
c
onst
c
har
*
seg
,
int
size
,
struct
i_addr
*
addrp
,
int
byref
)
{
if
(
addrp
->
is_reg
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"%s"
,
db_reg
[
size
][
addrp
->
disp
]);
...
...
@@ -1237,7 +1237,7 @@ void db_print_address(char *seg, int size, struct i_addr *addrp, int byref)
* and return updated location.
*/
void
db_disasm_esc
(
DBG_ADDR
*
addr
,
int
inst
,
int
short_addr
,
int
size
,
char
*
seg
)
int
size
,
c
onst
c
har
*
seg
)
{
int
regmodrm
;
const
struct
finst
*
fp
;
...
...
@@ -1327,7 +1327,7 @@ void DEBUG_Disasm( DBG_ADDR *addr, int display )
int
inst
;
int
size
;
int
short_addr
;
c
har
*
seg
;
c
onst
char
*
seg
;
const
struct
inst
*
ip
;
const
char
*
i_name
;
int
i_size
;
...
...
programs/winedbg/dbg.y
View file @
8e5bb205
...
...
@@ -36,7 +36,7 @@
static void mode_command(int);
int yylex(void);
int yyerror(char *);
int yyerror(c
onst c
har *);
%}
...
...
@@ -479,7 +479,7 @@ void DEBUG_Parser(LPCSTR filename)
set_default_channels();
}
int yyerror(char* s)
int yyerror(c
onst c
har* s)
{
DEBUG_Printf(DBG_CHN_MESG, "%s\n", s);
return 0;
...
...
programs/winedbg/debugger.h
View file @
8e5bb205
...
...
@@ -503,7 +503,7 @@ extern int DEBUG_GetObjectSize(struct datatype * dt);
extern
unsigned
int
DEBUG_ArrayIndex
(
const
DBG_VALUE
*
addr
,
DBG_VALUE
*
result
,
int
index
);
extern
struct
datatype
*
DEBUG_FindOrMakePointerType
(
struct
datatype
*
reftype
);
extern
long
long
int
DEBUG_GetExprValue
(
const
DBG_VALUE
*
addr
,
char
**
format
);
extern
long
long
int
DEBUG_GetExprValue
(
const
DBG_VALUE
*
addr
,
c
onst
c
har
**
format
);
extern
int
DEBUG_SetBitfieldParams
(
struct
datatype
*
dt
,
int
offset
,
int
nbits
,
struct
datatype
*
dt2
);
extern
int
DEBUG_CopyFieldlist
(
struct
datatype
*
dt
,
struct
datatype
*
dt2
);
...
...
programs/winedbg/gdbproxy.c
View file @
8e5bb205
...
...
@@ -1406,8 +1406,8 @@ static void packet_query_monitor_mem(struct gdb_context* gdbctx, int len, const
{
MEMORY_BASIC_INFORMATION
mbi
;
char
*
addr
=
0
;
c
har
*
state
;
c
har
*
type
;
c
onst
char
*
state
;
c
onst
char
*
type
;
char
prot
[
3
+
1
];
char
buffer
[
128
];
...
...
@@ -2015,10 +2015,10 @@ static BOOL gdb_startup(struct gdb_context* gdbctx, DEBUG_EVENT* de, unsigned fl
break
;
case
0
:
/* in child... and alive */
{
char
buf
[
MAX_PATH
];
int
fd
;
c
har
*
gdb_path
;
FILE
*
f
;
char
buf
[
MAX_PATH
];
int
fd
;
c
onst
char
*
gdb_path
;
FILE
*
f
;
if
(
!
(
gdb_path
=
getenv
(
"WINE_GDB"
)))
gdb_path
=
"gdb"
;
strcpy
(
buf
,
"/tmp/winegdb.XXXXXX"
);
...
...
programs/winedbg/hash.c
View file @
8e5bb205
...
...
@@ -33,7 +33,7 @@
#endif
#ifdef __i386__
static
char
*
reg_name
[]
=
static
c
onst
c
har
*
reg_name
[]
=
{
"eax"
,
"ecx"
,
"edx"
,
"ebx"
,
"esp"
,
"ebp"
,
"esi"
,
"edi"
};
...
...
@@ -523,7 +523,8 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
int
mid
,
high
,
low
;
unsigned
int
*
ptr
;
int
lineno
;
char
*
lineinfo
,
*
sourcefile
;
const
char
*
lineinfo
;
char
*
sourcefile
;
int
i
;
char
linebuff
[
16
];
unsigned
val
;
...
...
programs/winedbg/info.c
View file @
8e5bb205
...
...
@@ -40,7 +40,7 @@
*/
void
DEBUG_PrintBasic
(
const
DBG_VALUE
*
value
,
int
count
,
char
format
)
{
c
har
*
default_format
;
c
onst
char
*
default_format
;
long
long
int
res
;
assert
(
value
->
cookie
==
DV_TARGET
||
value
->
cookie
==
DV_HOST
);
...
...
@@ -94,7 +94,7 @@ void DEBUG_PrintBasic( const DBG_VALUE* value, int count, char format )
if
(
strstr
(
default_format
,
"%S"
)
!=
NULL
)
{
c
har
*
ptr
;
c
onst
char
*
ptr
;
int
state
=
0
;
/* FIXME: simplistic implementation for default_format being
...
...
@@ -631,8 +631,8 @@ void DEBUG_InfoVirtual(DWORD pid)
{
MEMORY_BASIC_INFORMATION
mbi
;
char
*
addr
=
0
;
c
har
*
state
;
c
har
*
type
;
c
onst
char
*
state
;
c
onst
char
*
type
;
char
prot
[
3
+
1
];
HANDLE
hProc
;
...
...
programs/winedbg/types.c
View file @
8e5bb205
...
...
@@ -60,15 +60,15 @@ struct datatype
{
enum
debug_type
type
;
struct
datatype
*
next
;
char
*
name
;
c
onst
c
har
*
name
;
union
{
struct
{
char
basic_type
;
char
*
output_format
;
char
basic_size
;
unsigned
b_signed
:
1
;
char
basic_type
;
c
onst
c
har
*
output_format
;
char
basic_size
;
unsigned
b_signed
:
1
;
}
basic
;
struct
{
...
...
@@ -133,8 +133,8 @@ static unsigned int type_hash( const char * name )
static
struct
datatype
*
DEBUG_InitBasic
(
int
type
,
char
*
name
,
int
size
,
int
b_signed
,
char
*
output_format
)
DEBUG_InitBasic
(
int
type
,
c
onst
c
har
*
name
,
int
size
,
int
b_signed
,
c
onst
c
har
*
output_format
)
{
int
hash
;
...
...
@@ -346,13 +346,13 @@ DEBUG_InitTypes(void)
}
long
long
int
DEBUG_GetExprValue
(
const
DBG_VALUE
*
_value
,
char
**
format
)
DEBUG_GetExprValue
(
const
DBG_VALUE
*
_value
,
c
onst
c
har
**
format
)
{
long
long
int
rtn
;
unsigned
int
rtn2
;
struct
datatype
*
type2
=
NULL
;
struct
en_values
*
e
;
char
*
def_format
=
"0x%x"
;
c
onst
c
har
*
def_format
=
"0x%x"
;
DBG_VALUE
value
=
*
_value
;
assert
(
_value
->
cookie
==
DV_TARGET
||
_value
->
cookie
==
DV_HOST
);
...
...
@@ -943,7 +943,7 @@ leave:
static
void
DEBUG_DumpAType
(
struct
datatype
*
dt
,
BOOL
deep
)
{
char
*
name
=
(
dt
->
name
)
?
dt
->
name
:
"--none--"
;
c
onst
c
har
*
name
=
(
dt
->
name
)
?
dt
->
name
:
"--none--"
;
/* EPP DEBUG_Printf(DBG_CHN_MESG, "0x%08lx ", (unsigned long)dt); */
switch
(
dt
->
type
)
...
...
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