Skip to content

Commit

Permalink
FIX: use a macro within the preprocessor to avoid compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jun 3, 2024
1 parent f1cab27 commit 6c8240c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/core/n-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,18 @@ static REBSER *Read_All_File(char *fname)
if (!tmp) return R_NONE;

// Convert OS native wide string back to Rebol file type
if (OS_WIDE) {
new = To_REBOL_Path(tmp, 0, OS_WIDE, FALSE);
#ifdef OS_WIDE == TRUE
new = To_REBOL_Path(tmp, 0, OS_WIDE, FALSE);
#else
REBLEN len = LEN_BYTES(tmp);
if (Is_Not_ASCII(tmp, len)) {
// Result from the native call contains Unicode chars...
new = Decode_UTF_String(tmp, len, 8, FALSE, FALSE);
new = To_REBOL_Path(SERIES_DATA(new), SERIES_TAIL(new), -1, FALSE);
} else {
REBLEN len = LEN_BYTES(tmp);
if (Is_Not_ASCII(tmp, len)) {
// Result from the native call contains Unicode chars...
new = Decode_UTF_String(tmp, len, 8, FALSE, FALSE);
new = To_REBOL_Path(SERIES_DATA(new), SERIES_TAIL(new), -1, FALSE);
} else {
new = To_REBOL_Path(tmp, len, 0, FALSE);
}
new = To_REBOL_Path(tmp, len, 0, FALSE);
}
#endif
if (!new) return R_NONE;

Set_Series(REB_FILE, D_RET, new);
Expand Down

0 comments on commit 6c8240c

Please sign in to comment.