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

Issue #57 - Recover responsiveness to stdin and upgrade strOrFile #140

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0086563
Initial tests indicate I am successfully ungetting content to the ung…
wbkboyer Jan 24, 2025
72509a7
Implemented sf_ReadInteger() and confirmed AdjList version of nauty e…
wbkboyer Jan 27, 2025
60ce360
Want to make sure we only allow valid negative integers and bail out …
wbkboyer Jan 28, 2025
a2cab2e
Refactored to use stack for ungetBuf
wbkboyer Jan 29, 2025
c44a9ff
Merge branch 'master' into Issue57-strOrFileHandleStdin
wbkboyer Jan 30, 2025
12d7aec
Confirmed reading LEDA graph works by transforming nauty example (in …
wbkboyer Jan 30, 2025
271e191
Added sf_ReadSingleDigit() to help _ReadAdjMatrix(), updated paramete…
wbkboyer Jan 31, 2025
75406da
Added new function to g6-read-iterator.c, _ReadGraphFromG6StrOrFile()…
wbkboyer Jan 31, 2025
d02c8b3
-test passes, indicating reading from both pFile and theStr is succes…
wbkboyer Feb 4, 2025
c6af035
Debugging required; seems to be breaking down on -test for in-memory…
wbkboyer Feb 6, 2025
a74a1f9
Fixed bug where G6WriteIterator cleanup meant that outputContainer wa…
wbkboyer Feb 6, 2025
8782df0
-test passes; must still test to ensure RandomGraphs() and TestAllGra…
wbkboyer Feb 7, 2025
8e1714a
Changed function signatures of sf_ReadSkipWhitespace() and sf_ReadSki…
wbkboyer Feb 7, 2025
c456e80
Resolving some warnings from MSVC cl and MinGW-w64 UCRT gcc
wbkboyer Feb 10, 2025
ca03869
Merge branch 'master' into Issue57-strOrFileHandleStdin
wbkboyer Feb 10, 2025
2fcc012
Refactor so that extraData is now a null-terminated char * (rather th…
wbkboyer Feb 10, 2025
1540b64
Added newline to end of hand-written LEDA translation of nauty_exampl…
wbkboyer Feb 10, 2025
74c3339
Minor fix - need to make sure outputStr is not NULL before trying to …
wbkboyer Feb 11, 2025
8a25a54
Return NULL from sf_New() if containerType is OUTPUT_CONTAINER and ye…
wbkboyer Feb 12, 2025
b285c85
Minor bugfix: when stdout or stderr chosen as output stream, incorrec…
wbkboyer Feb 13, 2025
c8fe178
Fixed bug where accessing SpecificGraph() from menu allowed user to s…
wbkboyer Feb 13, 2025
c3f34f5
Addressing PR comments; all manual tests plus command-line -test pass
wbkboyer Feb 14, 2025
7f4bc04
Addressing PR comments:
wbkboyer Feb 14, 2025
c2f48da
Fixed issue with incorrect exitCode being returned from _ReadGraphFro…
wbkboyer Feb 20, 2025
cf568bf
Changed amount of stack-allocated memory for containing the numberStr…
wbkboyer Feb 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions c/graphLib/io/g6-read-iterator.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,19 @@ int _ReadGraphFromG6StrOrFile(graphP pGraphToRead, strOrFileP g6InputContainer)
if (exitCode != OK)
ErrorMessage("Unable to read graph from .g6 read iterator.\n");

exitCode = endG6ReadIteration(pG6ReadIterator);
if (exitCode != OK)
int endG6ReadIterationCode = endG6ReadIteration(pG6ReadIterator);
if (endG6ReadIterationCode != OK)
{
ErrorMessage("Unable to end G6ReadIterator.\n");
exitCode = endG6ReadIterationCode;
}

exitCode = freeG6ReadIterator(&pG6ReadIterator);
int freeG6ReadIteratorCode = freeG6ReadIterator(&pG6ReadIterator);
if (exitCode != OK)
{
ErrorMessage("Unable to free G6ReadIterator.\n");
exitCode = freeG6ReadIteratorCode;
}

return exitCode;
}
2 changes: 1 addition & 1 deletion c/graphLib/io/strOrFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ int sf_ReadInteger(int *intToRead, strOrFileP theStrOrFile)
return NOTOK;

char intCandidateStr[MAXCHARSFOR32BITINT + 1];
memset(intCandidateStr, '\0', MAXCHARSFOR32BITINT * sizeof(char));
memset(intCandidateStr, '\0', (MAXCHARSFOR32BITINT + 1) * sizeof(char));

int intCandidate = 0;
char currChar, nextChar = '\0';
Expand Down