search for: getfullpath

Displaying 10 results from an estimated 10 matches for "getfullpath".

2011 Jan 19
1
[nut-commits] svn commit r2845 - branches/windows_port/common
...r * confpath(void) > { > - const char * path; > - > - if ((path = getenv("NUT_CONFPATH")) == NULL) { > #ifndef WIN32 > - path = CONFPATH; > + const char *path = getenv("NUT_CONFPATH"); > #else > - if( relative_conf_path == NULL ) { > - path = getfullpath(PATH_ETC); > - if( path == NULL ) { > - path = CONFPATH; > - } > - } > - else { > - path = relative_conf_path; > - } > + static const char *path = getfullpath(PATH_ETC); getfullpath is allocating memory with xstrdup. Doesn't this line produce a memory leak ?...
2011 Sep 30
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
You can use _iswupper and _towlower instead of CharLowerBuffW. They don't require windows.h and work with /Za. On Sep 30, 2011, at 12:24 AM, Nikola Smiljanic wrote: > I tried to do the conversion to lowercase inside GetFullPath by adding an additional bool parameter to this function. It's not perfect but seems much better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion again. The problem I have is with access to CharLowerBuffW. I need Windows.h for this function but when I try to include it I get a...
2011 Sep 30
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
I tried to do the conversion to lowercase inside GetFullPath by adding an additional bool parameter to this function. It's not perfect but seems much better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion again. The problem I have is with access to CharLowerBuffW. I need Windows.h for this function but when I try to include it I get a...
2011 Oct 03
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...Bryce Cogswell <bryceco at gmail.com> wrote: > You can use _iswupper and _towlower instead of CharLowerBuffW. They don't > require windows.h and work with /Za. > > On Sep 30, 2011, at 12:24 AM, Nikola Smiljanic wrote: > > I tried to do the conversion to lowercase inside GetFullPath by adding an > additional bool parameter to this function. It's not perfect but seems much > better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion > again. The problem I have is with access to CharLowerBuffW. I need Windows.h > for this function but when I try t...
2011 Oct 03
5
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...Bryce Cogswell <bryceco at gmail.com> wrote: > You can use _iswupper and _towlower instead of CharLowerBuffW. They don't require windows.h and work with /Za. > > On Sep 30, 2011, at 12:24 AM, Nikola Smiljanic wrote: > >> I tried to do the conversion to lowercase inside GetFullPath by adding an additional bool parameter to this function. It's not perfect but seems much better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion again. The problem I have is with access to CharLowerBuffW. I need Windows.h for this function but when I try to include it I get a...
2011 Oct 03
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...t gmail.com> wrote: > >> You can use _iswupper and _towlower instead of CharLowerBuffW. They don't >> require windows.h and work with /Za. >> >> On Sep 30, 2011, at 12:24 AM, Nikola Smiljanic wrote: >> >> I tried to do the conversion to lowercase inside GetFullPath by adding an >> additional bool parameter to this function. It's not perfect but seems much >> better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion >> again. The problem I have is with access to CharLowerBuffW. I need Windows.h >> for this function...
2011 Sep 29
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...probably need to convert the UTF-8 paths to wide char, lower case it using CharLowerBuffW (since it needs to match the casing rules used by NTFS), and then convert back to UTF-8. > > If you need to be pedantic about recognizing whether two paths are the same on Windows you also need to call GetFullPathName in order to expand any 8.3 path components, but this is an expensive function so I wouldn't do it unless absolutely necessary. > > There is also a call to _fullpath in there that needs to be changed to _wfullpath. > > The rest of the patch looks good. > > On Sep 23, 201...
2011 Sep 30
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...P.S. I'd say more, but it'd only water down the message. ------------------------------ From: Nikola Smiljanic Sent: 9/30/2011 12:45 AM To: Bryce Cogswell Cc: cfe-dev; llvmdev Subject: Re: [LLVMdev] [cfe-dev] Unicode path handling on Windows I tried to do the conversion to lowercase inside GetFullPath by adding an additional bool parameter to this function. It's not perfect but seems much better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion again. The problem I have is with access to CharLowerBuffW. I need Windows.h for this function but when I try to include it I get a...
2011 Oct 03
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...ryceco at gmail.com> wrote: >> You can use _iswupper and _towlower instead of CharLowerBuffW. They don't require windows.h and work with /Za. >> >> On Sep 30, 2011, at 12:24 AM, Nikola Smiljanic wrote: >> >>> I tried to do the conversion to lowercase inside GetFullPath by adding an additional bool parameter to this function. It's not perfect but seems much better than repeating the whole UTF8 to UTF16 and UTF16 to UTF8 conversion again. The problem I have is with access to CharLowerBuffW. I need Windows.h for this function but when I try to include it I get a...
2006 Aug 24
3
A new QueueWorker class
Hello all, I''ve come up w/ a worker class that manages queued jobs using a fixed number of child workers. Well, that''s not quite true -- a new worker is spawned for each job, but you set the total number that may exist at once. There are three components: 1) queue_worker.rb: The singleton worker that manages the child workers. You probably want to auto start this. Make sure you