Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
ba9d8fe7
Commit
ba9d8fe7
authored
Mar 17, 2005
by
John van Groningen
Browse files
add convert_file_name
parent
ef429bd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
backendC/CleanCompilerSources/mac_io.c
View file @
ba9d8fe7
...
...
@@ -805,11 +805,10 @@ extern char *clean_abc_path; /* imported from clm.c */
#endif
#if defined (GNU_C)
static
FILE
*
fopen_with_file_name_conversion
(
char
*
file_name
,
char
*
mode
)
char
*
convert_file_name
(
char
*
file_name
,
char
*
buffer
)
{
CFURLRef
hfs_url
;
CFStringRef
hfs_string
,
posix_string
;
char
buffer
[
512
+
1
];
hfs_string
=
CFStringCreateWithCString
(
NULL
/*kCFAllocatorDefault*/
,
file_name
,
kCFStringEncodingMacRoman
);
hfs_url
=
CFURLCreateWithFileSystemPath
(
NULL
/*kCFAllocatorDefault*/
,
hfs_string
,
kCFURLHFSPathStyle
,
/*isDirectory*/
false
);
...
...
@@ -820,7 +819,16 @@ static FILE *fopen_with_file_name_conversion (char *file_name,char *mode)
CFRelease
(
posix_string
);
return
NULL
;
}
file_name
=
buffer
;
return
buffer
;
}
static
FILE
*
fopen_with_file_name_conversion
(
char
*
file_name
,
char
*
mode
)
{
char
buffer
[
512
+
1
];
file_name
=
convert_file_name
(
file_name
,
buffer
);
if
(
file_name
==
NULL
)
return
NULL
;
return
fopen
(
file_name
,
mode
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment