Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openocd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
openocd
Commits
e8a5092f
Commit
e8a5092f
authored
15 years ago
by
Spencer Oliver
Browse files
Options
Downloads
Patches
Plain Diff
bin2char: for win32 set stdin/stdout to binary mode
Signed-off-by:
Spencer Oliver
<
ntfreak@users.sourceforge.net
>
parent
a53c72cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/helper/bin2char.c
+10
-0
10 additions, 0 deletions
src/helper/bin2char.c
with
10 additions
and
0 deletions
src/helper/bin2char.c
+
10
−
0
View file @
e8a5092f
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
#ifdef _WIN32
#include
<fcntl.h>
#endif
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
int
c
;
int
c
;
...
@@ -34,6 +38,12 @@ int main(int argc, char **argv)
...
@@ -34,6 +38,12 @@ int main(int argc, char **argv)
exit
(
1
);
exit
(
1
);
}
}
#ifdef _WIN32
/* for win32 set stdin/stdout to binary mode */
_setmode
(
_fileno
(
stdin
),
_O_BINARY
);
_setmode
(
_fileno
(
stdout
),
_O_BINARY
);
#endif
n
=
0
;
n
=
0
;
name
=
argv
[
1
];
name
=
argv
[
1
];
fprintf
(
stdout
,
"/* autogenerated from %s */
\n
"
,
argv
[
0
]);
fprintf
(
stdout
,
"/* autogenerated from %s */
\n
"
,
argv
[
0
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment