Module: wine Branch: master Commit: 3e19c4ca3bc4306e5a0cf1eb49d08c25e0897702 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e19c4ca3bc4306e5a0cf1eb49...
Author: Andrew Nguyen anguyen@codeweavers.com Date: Sat Apr 16 03:07:34 2011 -0500
regedit: Explicitly use ANSI functions in regedit helper functions.
---
programs/regedit/regedit.c | 16 ++++++++-------- programs/regedit/regproc.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c index 0de71cf..cc0fc3a 100644 --- a/programs/regedit/regedit.c +++ b/programs/regedit/regedit.c @@ -141,29 +141,29 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
if (strcmp(filename, "-") == 0) { - reg_file=stdin; + reg_file = stdin; } else { int size;
- size=SearchPath(NULL, filename, NULL,0, NULL, NULL); - if (size>0) + size = SearchPathA(NULL, filename, NULL, 0, NULL, NULL); + if (size > 0) { - realname=HeapAlloc(GetProcessHeap(), 0, size); - size=SearchPath(NULL, filename, NULL, size, realname, NULL); + realname = HeapAlloc(GetProcessHeap(), 0, size); + size = SearchPathA(NULL, filename, NULL, size, realname, NULL); } - if (size==0) + if (size == 0) { fprintf(stderr, "%s: File not found "%s" (%d)\n", getAppName(), filename, GetLastError()); exit(1); } reg_file = fopen(realname, "r"); - if (reg_file==NULL) + if (reg_file == NULL) { perror(""); - fprintf(stderr,"%s: Can't open file "%s"\n", getAppName(), filename); + fprintf(stderr, "%s: Can't open file "%s"\n", getAppName(), filename); exit(1); } } diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 841ab79..1f1a059 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -890,8 +890,8 @@ static void REGPROC_print_error(void) int status;
error_code = GetLastError (); - status = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error_code, 0, (LPTSTR) &lpMsgBuf, 0, NULL); + status = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, error_code, 0, (LPSTR) &lpMsgBuf, 0, NULL); if (!status) { fprintf(stderr,"%s: Cannot display message for error %d, status %d\n", getAppName(), error_code, GetLastError());