xxxxxxxxxx
import std.stdio;
/* Original
enum
{
/// Offset is relative to the beginning
SEEK_SET,
/// Offset is relative to the current position
SEEK_CUR,
/// Offset is relative to the end
SEEK_END
}
*/
enum SEEK
{
/// Offset is relative to the beginning
SET,
/// Offset is relative to the current position
CUR,
/// Offset is relative to the end
END
}
enum SEEK_SET = SEEK.SET;
enum SEEK_CUR = SEEK.CUR;
enum SEEK_END = SEEK.END;
void seek(long offset, int origin = SEEK_SET) {writeln("orig");} // Original, not called anymore.
void seek(long offset, SEEK origin = SEEK.SET) {writeln("new");}
void main()
{
seek(0, SEEK_CUR); // Legacy
seek(0, SEEK.CUR); // Recommended
}