Skip to content
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 accurate check for console stdio + add associated primitive #254

Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
Expand Up @@ -288,11 +288,11 @@ sqConnectToFile(SQFile *sqFile, void *file, sqInt writeFlag)

void
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(SQFile file, HANDLE handle, int isWritable) {
file.sessionID = thisSession;
file.file = handle;
file.writable = isWritable;
file.lastOp = 0; /* unused on win32 */
file.isStdioStream = isFileHandleATTY(handle);
file->sessionID = thisSession;
file->file = handle;
file->writable = isWritable;
file->lastOp = 0; /* unused on win32 */
file->isStdioStream = isFileHandleATTY(handle);
AddHandleToTable(win32Files, handle);
}

Expand All @@ -304,9 +304,9 @@ sqFileStdioHandlesIntoFile_WithHandle_IsWritable(SQFile file, HANDLE handle, int
sqInt
sqFileStdioHandlesInto(SQFile files[3])
{
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(files[0], GetStdHandle(STD_INPUT_HANDLE), false);
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(files[1], GetStdHandle(STD_OUTPUT_HANDLE), true);
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(files[2], GetStdHandle(STD_ERROR_HANDLE), true);
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(&files[0], GetStdHandle(STD_INPUT_HANDLE), false);
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(&files[1], GetStdHandle(STD_OUTPUT_HANDLE), true);
sqFileStdioHandlesIntoFile_WithHandle_IsWritable(&files[2], GetStdHandle(STD_ERROR_HANDLE), true);

return 7;
}
Expand Down