--- cdrtools-2.01.orig/mkisofs/iso9660.h 2004-03-01 23:10:28.000000000 +0000 +++ cdrtools-2.01/mkisofs/iso9660.h 2005-12-31 11:34:02.000000000 +0000 @@ -213,6 +213,8 @@ struct iso_path_table { #define MAX_ISONAME MAX_ISONAME_V2 /* Used for array space defs */ #define MAX_ISODIR 254 /* Must be even and <= 255 */ +#define LEN_ROMEONAME 128 + struct iso_directory_record { unsigned char length [ISODCL(1, 1)]; /* 711 */ char ext_attr_length [ISODCL(2, 2)]; /* 711 */ --- cdrtools-2.01.orig/mkisofs/mkisofs.c 2005-12-31 11:32:59.000000000 +0000 +++ cdrtools-2.01/mkisofs/mkisofs.c 2005-12-31 11:41:45.000000000 +0000 @@ -108,6 +108,7 @@ int use_XA = 0; int osecsize = 0; /* Output-sector size, 0 means default secsize 2048 */ int use_Joliet = 0; int jlen = JMAX; /* maximum Joliet file name length */ +int use_Romeo = 0; int verbose = 1; int debug = 0; int gui = 0; @@ -167,6 +168,7 @@ int iso9660_level = 1; int iso9660_namelen = LEN_ISONAME; /* 31 characters, may be set to 37 */ int full_iso9660_filenames = 0; /* Full 31 character iso9660 filenames */ int relaxed_filenames = 0; /* For Amiga. Disc will not work with DOS */ +int romeo_filenames = 0; /* Romeo-format filenames */ int allow_lowercase = 0; /* Allow lower case letters */ int allow_multidot = 0; /* Allow more than on dot in filename */ int iso_translate = 1; /* 1 == enables '#', '-' and '~' removal */ @@ -377,6 +379,8 @@ struct ld_option { #define OPTION_PUBLISHER 1071 #define OPTION_PAD_SIZE 1072 +#define OPTION_ROMEO 1073 + #ifdef UDF #define OPTION_UDF 1500 #endif @@ -602,6 +606,8 @@ LOCAL const struct ld_option ld_options[ 'r', NULL, "Generate rationalized Rock Ridge directory information", ONE_DASH}, {{"rock", no_argument, NULL, 'R'}, 'R', NULL, "Generate Rock Ridge directory information", ONE_DASH}, + {{"romeo", no_argument, NULL, OPTION_ROMEO}, + '\0', NULL, "Enable Romeo format", ONE_DASH}, {{"sectype", required_argument, NULL, 's'}, 's', "TYPE", "Set output sector type to e.g. data/xa1/raw", ONE_DASH}, @@ -1362,6 +1368,13 @@ main(argc, argv) use_Joliet++; jlen = JLONGMAX; break; + case OPTION_ROMEO: + use_Romeo++; + iso9660_namelen = LEN_ROMEONAME; + full_iso9660_filenames++; + romeo_filenames++; + warn_violate++; + break; case OPTION_JCHARSET: use_Joliet++; /* FALLTHROUGH */ --- cdrtools-2.01.orig/mkisofs/mkisofs.h 2005-12-31 11:32:58.000000000 +0000 +++ cdrtools-2.01/mkisofs/mkisofs.h 2005-12-31 11:34:02.000000000 +0000 @@ -350,6 +350,7 @@ extern int iso9660_level; extern int iso9660_namelen; extern int full_iso9660_filenames; extern int relaxed_filenames; +extern int romeo_filenames; extern int allow_lowercase; extern int allow_multidot; extern int iso_translate; --- cdrtools-2.01.orig/mkisofs/name.c 2004-03-04 23:04:18.000000000 +0000 +++ cdrtools-2.01/mkisofs/name.c 2005-12-31 11:34:02.000000000 +0000 @@ -365,6 +365,55 @@ iso9660_file_length(name, sresult, dirfl if (c == '/') c = '_'; *result++ = c; + } else if (romeo_filenames) { + /* Romeo-format filenames */ + if (isalnum(c)) { + *result++ = c; + } else { + switch(c) { + /* + * Supported symbols in Romeo-format + * filenames + */ + case ' ': + case '!': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '=': + case '+': + case ',': + case '-': + case '.': + case ';': + case '<': + case '>': + case '_': + *result++ = c; + break; + + case '#': +/* TODO: : Should we disallow this? */ +/* case '-': */ + case '~': + /* + * Check if we should allow these + * illegal characters used by + * Microsoft. + */ + if (iso_translate) + *result++ = '_'; + else + *result++ = c; + break; + + default: + *result++ = '_'; + break; + } + } } else switch (c) { /* * Dos style filenames.