-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for redirecting to file #15
base: master
Are you sure you want to change the base?
Conversation
|
I have basically 0 experience with straight-up Win32 C programming so there was a bunch of googling and reading stackexchange (this is how everyone passes job interviews these days right? lol) and I didn't really see a lot of idioms where people did everything in WriteFile, they seemed to really detect the redirection and then use one or the other function, but maybe I just wasn't reading the right threads. Also I wanted to not interfere with what you were doing with the console handle since it seemed like you were querying it for ANSI support and stuff and didn't think that would work if I just used stdout. As for ARRAYSIZE when I use that it gives me some junk characters at the end when printing. |
pull request to bring me up to 1.1.0
I took a look at this again since you have released 1.1.0 (thanks again - this will definitely help with those customers who need it and can't use the powershell functions). When I use WriteFile on STD_OUTPUT_HANDLE I get spaces in the characters at the console: S p e c u C h e c k v 1 . 1 . 0 - - C o p y r i g h t ( c ) 2 0 1 8 A l e x I o n e s c u This is why I separated the file and console functions. There's definitely something that doesn't work right with ARRAYSIZE and WriteFile, it's hard to describe what's going on but if you try it you'll someone's not getting the right number of bytes to print somewhere. |
Thanks man,
I haven't forgotten about your PR and I do hope to integrate it at some
point, hopefully in a cleaner way of such a thing is even possible...
Best regards,
Alex Ionescu
…On Mon, Oct 1, 2018 at 12:41 PM greatquux ***@***.***> wrote:
I took a look at this again since you have released 1.1.0 (thanks again -
this will definitely help with those customers who need it and can't use
the powershell functions).
When I use WriteFile on STD_OUTPUT_HANDLE I get spaces in the characters
at the console:
S p e c u C h e c k v 1 . 1 . 0 - - C o p y r i g h t ( c ) 2 0 1 8 A l e
x I o n e s c u
This is why I separated the file and console functions.
There's definitely something that doesn't work right with ARRAYSIZE and
WriteFile, it's hard to describe what's going on but if you try it you'll
someone's not getting the right number of bytes to print somewhere.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFxIeB6ArRd6f8MGAc-RV0d_TIJH48mNks5ugm_qgaJpZM4RZoy6>
.
|
catch up to master
I threw together some quick support for redirecting to a file without altering the pretty console output. ;)