--- ./mkisofs/mkisofs.c.orig Fri Apr 20 13:24:29 2001 +++ ./mkisofs/mkisofs.c Fri Apr 20 17:16:57 2001 @@ -94,6 +94,7 @@ int use_sparcboot = 0; int use_genboot = 0; int use_RockRidge = 0; int use_Joliet = 0; +int use_Romeo = 0; int verbose = 1; int gui = 0; int all_files = 1; /* New default is to include all files */ @@ -151,6 +152,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 */ @@ -329,6 +331,8 @@ struct ld_option { #define OPTION_CHECK_SESSION 1060 #define OPTION_FORCE_RR 1061 +#define OPTION_ROMEO 1062 + #ifdef APPLE_HYB #define OPTION_CAP 2000 #define OPTION_NETA 2001 @@ -508,6 +512,8 @@ static 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}, #ifdef SORTING { {"sort", required_argument, NULL, OPTION_SORT}, @@ -1214,6 +1220,13 @@ main(argc, argv) case 'J': use_Joliet++; break; + case OPTION_ROMEO: + use_Romeo++; + iso9660_namelen = LEN_ROMEONAME; + full_iso9660_filenames++; + romeo_filenames++; + warn_violate++; + break; case OPTION_JCHARSET: use_Joliet++; /* FALLTHROUGH */ --- ./mkisofs/iso9660.h.orig Fri Apr 20 14:28:54 2001 +++ ./mkisofs/iso9660.h Fri Apr 20 14:30:25 2001 @@ -149,6 +149,13 @@ struct iso_path_table { }; /* + * Romeo ugliness + */ +/* TODO: This probably belongs somewhere else. */ + +#define LEN_ROMEONAME 128 + +/* * A ISO filename is: "abcde.eee;1" -> '.' ';' * * The maximum needed string length is: @@ -161,6 +168,7 @@ struct iso_path_table { */ #define LEN_ISONAME 31 #define MAX_ISONAME 37 +#define MAX_NAME LEN_ROMEONAME struct iso_directory_record { unsigned char length [ISODCL (1, 1)]; /* 711 */ @@ -173,7 +181,7 @@ struct iso_directory_record { char interleave [ISODCL (28, 28)]; /* 711 */ char volume_sequence_number [ISODCL (29, 32)]; /* 723 */ unsigned char name_len [ISODCL (33, 33)]; /* 711 */ - char name [MAX_ISONAME+1]; /* Not really, but we need something here */ + char name [MAX_NAME+1]; /* Not really, but we need something here */ }; --- ./mkisofs/name.c.orig Fri Apr 20 14:45:49 2001 +++ ./mkisofs/name.c Fri Apr 20 14:59:47 2001 @@ -351,6 +351,53 @@ iso9660_file_length(name, sresult, dirfl * Here we allow a more relaxed syntax. */ *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 '#': + 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. --- ./mkisofs/mkisofs.h.orig Fri Apr 20 14:53:58 2001 +++ ./mkisofs/mkisofs.h Fri Apr 20 14:54:30 2001 @@ -304,6 +304,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;