Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dag-erling committed Sep 7, 2024
1 parent 9a87e07 commit 5a8477a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
23 changes: 11 additions & 12 deletions tests/retest.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
#include <sys/types.h>
#include <locale.h>
/* look for getopt in order to use a -o option for output. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif /* HAVE_MALLOC_H */
Expand Down Expand Up @@ -583,26 +585,23 @@ test_comp(const char *re, int flags, int ret)
int
main(int argc, char **argv)
{

int ch;
output_fd = stdout;
while (EOF != (ch = getopt(argc,argv,"o:"))) {
switch (ch) {
#ifdef HAVE_UNISTD_H
int opt;
while ((opt = getopt(argc, argv, "o:")) != EOF) {
switch (opt) {
case 'o':
if (NULL == (output_fd = fopen(optarg,"w"))) {
fprintf(stderr,"Could not open {%s} for output, quitting\n",optarg);
if ((output_fd = fopen(optarg, "w")) == NULL) {
perror(optarg);
exit(1);
}
break;
default:
fprintf(stderr,"Invalid command line option '-%c', quitting\n",ch);
if (NULL != output_fd && stdout != output_fd) {
fclose(output_fd);
output_fd = NULL;
}
exit(1);
}
}
#endif /* HAVE_UNISTD_H */
if (output_fd == NULL)
output_fd = stdout;

#ifdef WRETEST
/* Need an 8-bit locale. Or move the two tests with non-ascii
Expand Down
16 changes: 9 additions & 7 deletions win32/tre.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "retest", "retest.vcproj", "{F9A3C846-B5B3-4A68-9F8D-A918942FFB29}"
ProjectSection(ProjectDependencies) = postProject
{69258B5D-ECAE-40E4-8F64-5F063B05C998} = {69258B5D-ECAE-40E4-8F64-5F063B05C998}
EndProjectSection
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35222.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "retest", "retest.vcxproj", "{F9A3C846-B5B3-4A68-9F8D-A918942FFB29}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tre", "tre.vcproj", "{69258B5D-ECAE-40E4-8F64-5F063B05C998}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tre", "tre.vcxproj", "{69258B5D-ECAE-40E4-8F64-5F063B05C998}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -26,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AE39CB3A-251A-44D9-A14E-70CBFC317260}
EndGlobalSection
EndGlobal

0 comments on commit 5a8477a

Please sign in to comment.