Displaying 6 results from an estimated 6 matches for "wargv".
Did you mean:
argv
2014 Aug 08
1
[PATCH] for win_utf8_io.c
...s an
> error in string conversion there's no point in continuing the operation.
> All conversions are discarded if something failed so not exiting from
> the loop is wasted effort.
Here is the current code:
ret = 0;
for (i=0; i<wargc; i++) {
if ((utf8argv[i] = utf8_from_wchar(wargv[i])) == NULL) {
ret = 1;
break;
}
if (ret != 0) break;
}
I cannot see how the second break can happen.
If utf8argv[i] != NULL then ret == 0; if utf8argv[i] == NULL then the first
break exits the for(i=...) loop.
2011 Sep 20
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
I spent some more time on this. My idea was to use functionality from
llvm::sys::fs like file_status instead of stat struct, but as it turns out
this is not really possible. file_status structure is not a replacement for
stat, nor are there functions inside llvm::sys::fs that can replace calls to
::stat and ::open.
The only solution I can see is to create wrappers around ::stat, ::open,
etc. and
2011 Sep 20
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...a patch where I tried this (it has a number of issues but I'd like to
> hear from someone that this solution makes sense before I try to address
> them).
General nitpick: make sure you're using spaces instead of tabs, and
that your lines are less than 80 characters wide.
+ wchar_t** wargv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
You may want to test the consistency of this approach from the
original with regards to backslashes and quotation marks, if for no
other reason than documenting it. CommandLineToArgvW calls them out
in the documentation.
+ for (int i = 0; i...
2011 Sep 07
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
On Wed, Sep 7, 2011 at 12:20 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> So what are you exactly saying? Somebody proposed using GetCommandLine
> instead of using argv directly. And what about my other points about ::open
> and ::stat?
Because of the way Windows works, the only fully correct solution is
to never touch the native charset, and keep everything in UTF-8/16
2015 Jul 20
0
flac on windows 2000
If anybody wants to know: current flac.exe is not compatible with
Windows 2000. The only reason for this is the following line from
get_utf8_argv() function from src/share/win_utf8_io/win_utf8_io.c:
if (wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) return 1;
Windows 2000 has slightly older version of msvcrt.dll, and this check
always fails. I found an explanation about it here:
http://lists.gnu.org/archive/html/tinycc-devel/2014-11/msg00005.html
(it's not something that should be fixed, of course)
2014 Aug 08
4
[PATCH] for win_utf8_io.c
For better readability the patch is divided by 3 parts.
Part #1: for a bit better security replace
vsprintf(utmp, format, argptr)
with
vsnprintf_s(utmp, 32768, _TRUNCATE, format, argptr)
Part #2: potential memleak fixed: utf8argv[i] are not freed
when utf8argv itself is freed.
Part #3: 'if (ret != 0) break;' line seems redundant.
-------------- next part --------------
A