ioExtIntToEncs(context, ioEncodable, extEnc, intEnc, fmode_p[0]);
ioExtIntToEncs(context, ioEncodable, extEnc, intEnc, fmode_p[0]);
ioExtIntToEncs(context, ioEncodable, extEnc, intEnc, fmode_p[0]);
ioExtIntToEncs(context, ioEncodable, extEnc, intEnc, fmode_p[0]);
parseModeEncoding(context, ioEncodable, tmp.asJavaString(), fmode_p); } else { ioExtIntToEncs(context, ioEncodable, rbToEncoding(context, encoding), null, 0); ioExtIntToEncs(context, ioEncodable, extencoding, intencoding, 0);
parseModeEncoding(context, ioEncodable, tmp.asJavaString(), fmode_p); } else { ioExtIntToEncs(context, ioEncodable, rbToEncoding(context, encoding), null, 0); ioExtIntToEncs(context, ioEncodable, extencoding, intencoding, 0);
parseModeEncoding(context, ioEncodable, tmp.asJavaString(), fmode_p); } else { ioExtIntToEncs(context, ioEncodable, rbToEncoding(context, encoding), null, 0); ioExtIntToEncs(context, ioEncodable, extencoding, intencoding, 0);
parseModeEncoding(context, ioEncodable, tmp.asJavaString(), fmode_p); } else { ioExtIntToEncs(context, ioEncodable, rbToEncoding(context, encoding), null, 0); ioExtIntToEncs(context, ioEncodable, extencoding, intencoding, 0);
ioExtIntToEncs(context, ioEncodable, null, null, 0); } else { Encoding e = (fmode_p[0] & OpenFile.BINMODE) != 0 ? ascii8bitEncoding(context.runtime) : null; ioExtIntToEncs(context, ioEncodable, e, null, fmode_p[0]); ioExtIntToEncs(context, ioEncodable, ascii8bitEncoding(context.runtime), null, fmode_p[0]);
ioExtIntToEncs(context, ioEncodable, null, null, 0); } else { Encoding e = (fmode_p[0] & OpenFile.BINMODE) != 0 ? ascii8bitEncoding(context.runtime) : null; ioExtIntToEncs(context, ioEncodable, e, null, fmode_p[0]); ioExtIntToEncs(context, ioEncodable, ascii8bitEncoding(context.runtime), null, fmode_p[0]);
} else { if (v1.isNil()) { EncodingUtils.ioExtIntToEncs(context, holder, null, null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags); ecopts_p[0] = context.nil; ecflags = EncodingUtils.econvPrepareOptions(context, opt, ecopts_p, ecflags); } else { EncodingUtils.ioExtIntToEncs(context, holder, EncodingUtils.rbToEncoding(context, v1), null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags);
} else { if (v1.isNil()) { EncodingUtils.ioExtIntToEncs(context, holder, null, null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags); ecopts_p[0] = context.nil; ecflags = EncodingUtils.econvPrepareOptions(context, opt, ecopts_p, ecflags); } else { EncodingUtils.ioExtIntToEncs(context, holder, EncodingUtils.rbToEncoding(context, v1), null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags);
} else { if (v1.isNil()) { EncodingUtils.ioExtIntToEncs(context, holder, null, null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags); ecopts_p[0] = context.nil; ecflags = EncodingUtils.econvPrepareOptions(context, opt, ecopts_p, ecflags); } else { EncodingUtils.ioExtIntToEncs(context, holder, EncodingUtils.rbToEncoding(context, v1), null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags);
public IRubyObject fileOpenGeneric(ThreadContext context, IRubyObject filename, int oflags, int fmode, IOEncodable convConfig, int perm) { if (convConfig == null) { convConfig = new ConvConfig(); EncodingUtils.ioExtIntToEncs(context, convConfig, null, null, fmode); convConfig.setEcflags(0); convConfig.setEcopts(context.nil); } int[] fmode_p = {fmode}; EncodingUtils.validateEncodingBinmode(context, fmode_p, convConfig.getEcflags(), convConfig); OpenFile fptr = MakeOpenFile(); fptr.setMode(fmode_p[0]); fptr.encs.copy(convConfig); fptr.setPath(adjustRootPathOnWindows(context.runtime, RubyFile.get_path(context, filename).asJavaString(), getRuntime().getCurrentDirectory())); fptr.setFD(sysopen(context.runtime, fptr.getPath(), oflags, perm)); fptr.checkTTY(); if ((fmode_p[0] & OpenFile.SETENC_BY_BOM) != 0) { EncodingUtils.ioSetEncodingByBOM(context, this); } return this; }
} else { if (v1.isNil()) { EncodingUtils.ioExtIntToEncs(context, holder, null, null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags); ecopts_p[0] = context.nil; ecflags = EncodingUtils.econvPrepareOptions(context, opt, ecopts_p, ecflags); } else { EncodingUtils.ioExtIntToEncs(context, holder, EncodingUtils.rbToEncoding(context, v1), null, 0); EncodingUtils.SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(holder.getEnc2(), ecflags);
public IRubyObject fileOpenGeneric(ThreadContext context, IRubyObject filename, int oflags, int fmode, IOEncodable convConfig, int perm) { if (convConfig == null) { convConfig = new ConvConfig(); EncodingUtils.ioExtIntToEncs(context, convConfig, null, null, fmode); convConfig.setEcflags(0); convConfig.setEcopts(context.nil); } int[] fmode_p = {fmode}; EncodingUtils.validateEncodingBinmode(context, fmode_p, convConfig.getEcflags(), convConfig); OpenFile fptr = MakeOpenFile(); fptr.setMode(fmode_p[0]); fptr.encs.copy(convConfig); fptr.setPath(adjustRootPathOnWindows(context.runtime, RubyFile.get_path(context, filename).asJavaString(), getRuntime().getCurrentDirectory())); fptr.setFD(sysopen(context.runtime, fptr.getPath(), oflags, perm)); fptr.checkTTY(); if ((fmode_p[0] & OpenFile.SETENC_BY_BOM) != 0) { EncodingUtils.ioSetEncodingByBOM(context, this); } return this; }
ioExtIntToEncs(context, ioEncodable, null, null, 0); } else { Encoding e = (fmode_p[0] & OpenFile.BINMODE) != 0 ? ascii8bitEncoding(runtime) : null; ioExtIntToEncs(context, ioEncodable, e, null, fmode_p[0]); ioExtIntToEncs(context, ioEncodable, ascii8bitEncoding(runtime), null, fmode_p[0]);
ioExtIntToEncs(context, ioEncodable, null, null, 0); } else { Encoding e = (fmode_p[0] & OpenFile.BINMODE) != 0 ? ascii8bitEncoding(runtime) : null; ioExtIntToEncs(context, ioEncodable, e, null, fmode_p[0]); ioExtIntToEncs(context, ioEncodable, ascii8bitEncoding(runtime), null, fmode_p[0]);