diff -pur cdrtools-2.01-orig/mkisofs/iso9660.h cdrtools-2.01/mkisofs/iso9660.h --- cdrtools-2.01-orig/mkisofs/iso9660.h 2004-03-01 23:10:28.000000000 +0000 +++ cdrtools-2.01/mkisofs/iso9660.h 2004-11-05 17:11:47.040352917 +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 */ diff -pur cdrtools-2.01-orig/mkisofs/mkisofs.c cdrtools-2.01/mkisofs/mkisofs.c --- cdrtools-2.01-orig/mkisofs/mkisofs.c 2004-09-08 18:27:36.000000000 +0100 +++ cdrtools-2.01/mkisofs/mkisofs.c 2004-11-05 17:40:26.465124145 +0000 @@ -103,6 +103,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; @@ -162,6 +163,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 */ @@ -367,6 +369,8 @@ struct ld_option { #define OPTION_ALLOW_LEADING_DOTS 1070 #define OPTION_PUBLISHER 1071 +#define OPTION_ROMEO 1072 + #ifdef UDF #define OPTION_UDF 1500 #endif @@ -590,6 +594,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}, @@ -1350,6 +1356,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 */ diff -pur cdrtools-2.01-orig/mkisofs/mkisofs.h cdrtools-2.01/mkisofs/mkisofs.h --- cdrtools-2.01-orig/mkisofs/mkisofs.h 2004-05-26 23:54:59.000000000 +0100 +++ cdrtools-2.01/mkisofs/mkisofs.h 2004-11-05 17:08:08.494048235 +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; diff -pur cdrtools-2.01-orig/mkisofs/name.c cdrtools-2.01/mkisofs/name.c --- cdrtools-2.01-orig/mkisofs/name.c 2004-03-04 23:04:18.000000000 +0000 +++ cdrtools-2.01/mkisofs/name.c 2004-11-05 17:08:08.618053515 +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.