Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
d0d952d8
Commit
d0d952d8
authored
Aug 15, 2014
by
Thomas Jahns
🤸
Browse files
Make use of stream output for createtable.
parent
9eb32773
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/createtable.c
View file @
d0d952d8
...
...
@@ -4,8 +4,10 @@
#include
<string.h>
#include
"cdi.h"
#include
"error.h"
static
char
*
Progname
;
extern
int
CDI_Debug
;
void
version
(
void
)
{
...
...
@@ -98,8 +100,11 @@ int main(int argc, char *argv[])
if ( debug ) cdiDebug(debug);
*/
tableID
=
tableRead
(
ifile
);
if
(
CDI_Debug
)
Message
(
"write parameter table %d to %s"
,
tableID
,
ofile
);
FILE
*
ptfp
=
(
ofile
[
0
]
==
'-'
&&
ofile
[
1
]
==
'\0'
)
?
stdout
:
fopen
(
ofile
,
"w"
);
if
(
tableID
!=
CDI_UNDEFID
)
tableWriteC
(
ofile
,
tableID
);
table
F
WriteC
(
ptfp
,
tableID
);
return
EXIT_SUCCESS
;
}
...
...
tables/gen_tableheaderfile.in
View file @
d0d952d8
...
...
@@ -40,8 +40,7 @@ EOF
for
TFILE
in
$PTFILES
;
do
echo
"process:
$TFILE
"
rm
-f
ptfile
../app/createtable
$TFILE
ptfile
cat
ptfile
>>
$OFILE
../app/createtable
"
$TFILE
"
-
>>
"
$OFILE
"
done
#
cat
>>
$OFILE
<<
EOF
...
...
Write
Preview
Supports
Markdown
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