- Parsing multi-byte keystrokes - 8 Updates
- too many open files (experimental/filesystem) - 1 Update
gazelle@shell.xmission.com (Kenny McCormack): Jul 01 07:53AM In article <u7nfp3$2kvh5$1@dont-email.me>, >less than 100% here - several of the people who post here dismiss any >Linux-specific comment in the belief that Linux is unimportant compared >to Windows. Those people are mostly idiots and can (and should) be ignored. So, really, no worries on that front. -- A Catholic woman tells her husband to buy Viagra. A Jewish woman tells her husband to buy Pfizer. |
"R.Wieser" <address@is.invalid>: Jul 01 09:49AM +0200 Paavo, > 15210261 > That's pretty impressive for a library which just copies files from one > place to other (at least that's what we are using it for). With that size I can only assume that it supports copying those files by "avian carrier" (rfc 1149) for the transport. :-) > $ cat `find ncurses/ -name '*.c' -o -name '*.cpp' -o -name '*.h'` | wc -l > 129139 but its not about the size, but about the "side" effects. I don't want to have to relinquish control of the screen just to be able to get access to preparsed keystrokes. Thats not an acceptable solution. Regards, Rudy Wieser |
"R.Wieser" <address@is.invalid>: Jul 01 10:30AM +0200 James, > Why would you go to a forum where "a good percentage of users would > be using Linux", rather than a forum devoted to Linux, where that > percentage could reasonably be assumed to be 100? If I would know everything (including the knowledge of a more apropriate newsgroup ) than I would not have needed to post a question to begin with. Ever thought about that ? > It's significantly less than 100% here You don't say. > several of the people who post here dismiss any Linux-specific comment in > the belief that Linux is unimportant compared to Windows. And those are not the ones who would have the Linux knowledge to answer my current question, so thats fine by me. But thank you for the warning. And for the record, if I would have had that other newsgroup in my shortlist I would have posted there. Regards, Rudy Wieser |
"R.Wieser" <address@is.invalid>: Jul 01 10:33AM +0200 Keith, >> and the question would make sense to them. I must have assumed wrong. > And yet you're still posting here and *not* posting in an appropriate > place. Why? Are you telling me I should just have stopped responding here and taken off to that other newsgroup ? Where I live thats considered rude going on offensive. > You see, this is why you should leave attribution lines alone. Alf > Steinbach didn't write that. I did. (He quoted it in a followup.) Funny, I took his name from your post, where the attribution lines where (ofcourse) present ... But yes, I made a mistake. As you say, it was you who wrote that, in a response to Alf. My apologies. ... But do I at least get points for using the correct date ? :-) > I have no problem with using a cannon to kill a mosquito. If > ncurses had a good way to detect arrow key input without taking > over the whole screen, I'd recommend that. And in that "no taking over of stuff" case I would most likely have used it. > Thomas Dickey, in response to a question I posted on Stack Overflow > a few years ago, suggested something that might be the basis of a > solution: Both of those links seem to end up showing the same content. I skipped the ncurses part, as it, as mentioned by yours truly, wants to take over the screen. The "How to distinguish between escape and escape sequence" link shows some code, but as mentioned, I've already got that part down. Thanks nonetheless. Regards, Rudy Wieser |
Malcolm McLean <malcolm.arthur.mclean@gmail.com>: Jul 01 03:03AM -0700 On Friday, 30 June 2023 at 22:00:37 UTC+1, James Kuyper wrote: > less than 100% here - several of the people who post here dismiss any > Linux-specific comment in the belief that Linux is unimportant compared > to Windows. Actually the usual pattern is that Linux programmers consider themselves to be technically and even morally superior to those who program for some other proprietary platforms. And so Linux-specific discussions get a free pass, unlike those on other operating systems. |
Muttley@dastardlyhq.com: Jul 01 10:30AM On Sat, 1 Jul 2023 03:03:57 -0700 (PDT) >technically >and even morally superior to those who program for some other proprietary >platforms. I disagree. We may be snooty about Windows compared to other OS's - not just linux - but a C++ dev is a C++ dev regardless of platform. Having written C++ on both I am in no wish to hurry back to Windows due to the hoops you often have to jump through to do basic (for *nix) stuff such as process forking, multiplexing sockets and the absurd distinction between console and GUI apps. That said Visual Studio is definately superior as an IDE to anything Linux has to offer and blows the bug ridden abortion known as Eclipse out of the water. |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jul 01 11:58AM -0700 > Are you telling me I should just have stopped responding here and taken off > to that other newsgroup ? Where I live thats considered rude going on > offensive. You could post a single message on this thread saying that you're going to continue the discussion in comp.unix.programmer. Or you could cross-post a message to comp.lang.c++ and comp.unix.programmer, with followups directed to comp.unix.programmer. You can still do that. It would be far less rude than what you're doing now. > But yes, I made a mistake. As you say, it was you who wrote that, in a > response to Alf. My apologies. > ... But do I at least get points for using the correct date ? :-) You get no points for continuing to deliberately flout longstanding Usenet conventions. >> a few years ago, suggested something that might be the basis of a >> solution: > Both of those links seem to end up showing the same content. The first link was to my question, the second to Thomas Dickey's answer. They both appear on the same web page. > take over the screen. The "How to distinguish between escape and escape > sequence" link shows some code, but as mentioned, I've already got that part > down. You skipped the part where Thomas Dickey demonstrated using ncurses without taking over the screen. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */ |
"Alf P. Steinbach" <alf.p.steinbach@gmail.com>: Jul 01 10:37PM +0200 On 2023-06-29 6:37 PM, R.Wieser wrote: > start of a command sequence as well on its own when the ESC key is pressed > (IOW, no escaping of the ESC key). I do not see any way to, in a stream, > detect if its one or the other. Its just asking for trouble. :-( Timing. - Alf |
Jivanmukta <jivanmukta@poczta.onet.pl>: Jul 01 08:07PM +0200 In a function below I have an exception: src/obfuscator.cpp (682), get_cmdline_options: get_filepaths: Error during program execution: filesystem error: directory iterator cannot open directory: Too many open files [/home/robert/Projekty/kohana-cms/cms/cms/media/images/themes/clean/] although in mentioned folder there is only one file. #include <experimental/filesystem> // http://en.cppreference.com/w/cpp/experimental/fs namespace fs = std::experimental::filesystem; wstrvector get_filepaths(fs::path path, string extensions, wstring except_subdir_path, wstring prefix_dir) { wstring except_subdir_path_no_prefix = except_subdir_path; if (starts_with(except_subdir_path, prefix_dir)) { except_subdir_path_no_prefix = except_subdir_path.substr(prefix_dir.length()); } string p = path.string(); p = wstr2str(normalize_path(str2wstr(p), wstr2str(dir_separator)[0])); path = fs::path(p); const fs::directory_iterator end {}; wstrvector filepaths; if (exists(p)) { if (ends_with(p, wstr2str(dir_separator + L".")) || ends_with(p, wstr2str(dir_separator + L"." + dir_separator))) { for (fs::directory_iterator iter {path}; iter != end; ++iter) { string e = iter->path().extension().string(); if (safe_substr(e, 0, 1) == ".") { e = safe_substr(e, 1); } if (is_regular_file(iter->path()) && (extensions == "" || index_of_string(explode(",", extensions), e) >= 0)) { filepaths.push_back(str2wstr(iter->path().string())); } else if (is_directory(iter->path()) && (except_subdir_path_no_prefix == L"" || str2wstr(iter->path().string()).find(except_subdir_path_no_prefix) == wstring::npos)) { wstrvector subfiles = get_filepaths(iter->path(), extensions, except_subdir_path, prefix_dir); // recursion filepaths.insert(filepaths.end(), subfiles.begin(), subfiles.end()); } } } else { for (fs::directory_iterator iter {path}; iter != end; ++iter) { string e = iter->path().extension().string(); if (safe_substr(e, 0, 1) == ".") { e = safe_substr(e, 1); } if (is_regular_file(iter->path()) && (extensions == "" || index_of_string(explode(",", extensions), e) >= 0)) { filepaths.push_back(str2wstr(iter->path().string())); } else if (is_directory(iter->path()) && (except_subdir_path_no_prefix == L"" || str2wstr(iter->path().string()).find(except_subdir_path_no_prefix) == wstring::npos)) { wstrvector subfiles = get_filepaths(iter->path(), extensions, except_subdir_path, prefix_dir); // recursion filepaths.insert(filepaths.end(), subfiles.begin(), subfiles.end()); } } } } return filepaths; } |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment