📄 dfile.java
字号:
// $Id: dAsciiz.java,v 1.5 2000/10/21 23:18:10 mdeeds Exp $package java6035.tools.ASM;/** * dAsciiz * * represents an ..file directive in ASM file. ".file str" indicates * that this assembly code is generated from the source code found in file str */public class dFile extends ASMDirective{ public String fn; /** * Create a new file directive. * @param str is the filename **/ public dFile(String filename) { super(ASMDirective.FILE); fn = filename; } /** * Quotes the string in a way that can be understood by other tools. * Turns quotes into \", backslashes into \\, and newlines into \n. */ public static String quotify(String str) { String out = ""; int i; for (i = 0; i < str.length(); i++) { if (str.charAt(i) == '\\') out += "\\\\"; else if (str.charAt(i) == '\"') out += "\\\""; else if (str.charAt(i) == '\n') out += "\\n"; else out += str.charAt(i); } return out; } /** * Returns the string representation. Special characters in the string * are replaced with their backslash-quoted representation. */ public String toString() { return ".file \t\""+quotify(fn)+"\""; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -