Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
c4cd2ca6
Commit
c4cd2ca6
authored
Jan 08, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We now take a TESTFILE arg on the command-line.
parent
1ef00d20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
wildtest.c
wildtest.c
+14
-8
No files found.
wildtest.c
View file @
c4cd2ca6
...
...
@@ -84,8 +84,14 @@ main(int argc, char **argv)
}
}
if
((
fp
=
fopen
(
"wildtest.txt"
,
"r"
))
==
NULL
)
{
fprintf
(
stderr
,
"Unable to open wildtest.txt.
\n
"
);
argv
=
(
char
**
)
poptGetArgs
(
pc
);
if
(
!
argv
||
argv
[
1
])
{
fprintf
(
stderr
,
"Usage: wildtest TESTFILE
\n
"
);
exit
(
1
);
}
if
((
fp
=
fopen
(
*
argv
,
"r"
))
==
NULL
)
{
fprintf
(
stderr
,
"Unable to open %s
\n
"
,
*
argv
);
exit
(
1
);
}
...
...
@@ -104,8 +110,8 @@ main(int argc, char **argv)
if
(
*++
s
!=
' '
&&
*
s
!=
'\t'
)
flag
[
i
]
=
-
1
;
if
(
flag
[
i
]
<
0
)
{
fprintf
(
stderr
,
"Invalid flag syntax on line %d of
wildtest.txt:%s
\n
"
,
line
,
buf
);
fprintf
(
stderr
,
"Invalid flag syntax on line %d of
%s:
\n
%s
"
,
line
,
*
argv
,
buf
);
exit
(
1
);
}
while
(
*++
s
==
' '
||
*
s
==
'\t'
)
{}
...
...
@@ -116,16 +122,16 @@ main(int argc, char **argv)
string
[
i
]
=
s
;
while
(
*
s
&&
*
s
!=
quote
)
s
++
;
if
(
!*
s
)
{
fprintf
(
stderr
,
"Unmatched quote on line %d of
wildtest.txt:%s
\n
"
,
line
,
buf
);
fprintf
(
stderr
,
"Unmatched quote on line %d of
%s:
\n
%s
"
,
line
,
*
argv
,
buf
);
exit
(
1
);
}
end
[
i
]
=
s
;
}
else
{
if
(
!*
s
||
*
s
==
'\n'
)
{
fprintf
(
stderr
,
"Not enough strings on line %d of
wildtest.txt:%s
\n
"
,
line
,
buf
);
fprintf
(
stderr
,
"Not enough strings on line %d of
%s:
\n
%s
"
,
line
,
*
argv
,
buf
);
exit
(
1
);
}
string
[
i
]
=
s
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment