mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-04-09 22:38:06 +00:00
elf2boot: remove workaround for recently fixed pdp10_stdio bug
This commit is contained in:
@@ -184,7 +184,6 @@ write_src(NrBytes, Src, DstFP, SrcFP) ->
|
||||
write_words(Words, DstFP)
|
||||
end.
|
||||
|
||||
-ifdef(notdef).
|
||||
padto(DstFP, DstOffset) ->
|
||||
CurOffset = pdp10_stdio:ftell(DstFP),
|
||||
true = CurOffset =< DstOffset, % assert
|
||||
@@ -196,21 +195,6 @@ padto(DstFP, DstOffset) ->
|
||||
{error, _Reason} = Error -> Error
|
||||
end
|
||||
end.
|
||||
-else.
|
||||
%% TODO: There is a bug in pdp10_stdio where extending a file by seeking beyond
|
||||
%% its current end doesn't work, so we have to extend explicitly by writing NULs.
|
||||
padto(DstFP, DstOffset) ->
|
||||
CurOffset = pdp10_stdio:ftell(DstFP),
|
||||
true = CurOffset =< DstOffset, % assert
|
||||
pad(DstFP, DstOffset - CurOffset).
|
||||
|
||||
pad(_DstFP, 0) -> ok;
|
||||
pad(DstFP, N) ->
|
||||
case pdp10_stdio:fputc(0, DstFP) of
|
||||
ok -> pad(DstFP, N - 1);
|
||||
{error, _Reason} = Error -> Error
|
||||
end.
|
||||
-endif.
|
||||
|
||||
write_words([], _DstFP) -> ok;
|
||||
write_words([Word | Words], DstFP) ->
|
||||
|
||||
Reference in New Issue
Block a user