private void writeEnum(Enum enumm, TaskMonitor monitor) throws IOException {

		String enumName = enumm.getDisplayName();
		if (enumName.startsWith("define_") && enumName.length() > 7 && enumm.getCount() == 1) {
			long val = enumm.getValues()[0];
			writer.append("#define " + enumName.substring(7) + " " + Long.toString(val));
			writer.write(EOL);
			writer.write(EOL);
			return;
		}

		writer.write("typedef enum " + enumName + " " + "{");
		String description = enumm.getDescription();
		if (description != null && description.length() != 0) {
			writer.write(" " + comment(description));
		}
		writer.write(EOL);

		String[] names = enumm.getNames();
		for (int j = 0; j < names.length; j++) {
			writer.write("    ");
			writer.write(annotator.getPrefix(enumm, names[j]));
			writer.write(names[j]);
			writer.write("=");
			writer.write(Long.toString(enumm.getValue(names[j])));

			String comment = enumm.getComment(names[j]);
			if (!StringUtils.isBlank(comment)) {
				writer.write(" " + comment(comment));
			}

			writer.write(annotator.getSuffix(enumm, names[j]));

			if (j < names.length - 1) {
				writer.write(",");
			}
			writer.write(EOL);
		}
		writer.write("}" + " " + enumName + ";");
		writer.write(EOL);
		writer.write(EOL);
	}
Writes the data type as ANSI-C using the underlying writer.
@param dt the data type to write as ANSI-C
@param monitor the task monitor
@throws IOException if there is an exception writing the output
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataTypeWriter.java