Changed debug logging, added more extension translations

This commit is contained in:
Michiel Broek 2002-11-24 12:21:20 +00:00
parent 40317d6cfe
commit 7fd012a6de
2 changed files with 15 additions and 0 deletions

View File

@ -24,6 +24,8 @@ v0.35.06
followed by a tilde and 2 characters code calculated from the followed by a tilde and 2 characters code calculated from the
checksum of the string modulo 1849. Both methods are different checksum of the string modulo 1849. Both methods are different
then what MS does. then what MS does.
Added long extension to 3 char extensions for mpeg, smil, perl,
jpeg and tiff.
mbsebbs: mbsebbs:
Several user input functions don't allow comma's anymore. Several user input functions don't allow comma's anymore.

View File

@ -331,6 +331,7 @@ void mangle_name_83(char *s)
/* /*
* First, convert some common Unix extensions to extensions of 3 * First, convert some common Unix extensions to extensions of 3
* characters. If none fits, don't change anything now. * characters. If none fits, don't change anything now.
* FIXME: should be in an external file.
*/ */
if (strcmp(q = s + strlen(s) - strlen(".tar.gz"), ".tar.gz") == 0) { if (strcmp(q = s + strlen(s) - strlen(".tar.gz"), ".tar.gz") == 0) {
*q = '\0'; *q = '\0';
@ -353,6 +354,18 @@ void mangle_name_83(char *s)
} else if (strcmp(q = s + strlen(s) - strlen(".mpeg"), ".mpeg") == 0) { } else if (strcmp(q = s + strlen(s) - strlen(".mpeg"), ".mpeg") == 0) {
*q = '\0'; *q = '\0';
q = (char *)"mpg"; q = (char *)"mpg";
} else if (strcmp(q = s + strlen(s) - strlen(".smil"), ".smil") == 0) {
*q = '\0';
q = (char *)"smi";
} else if (strcmp(q = s + strlen(s) - strlen(".perl"), ".perl") == 0) {
*q = '\0';
q = (char *)"pl";
} else if (strcmp(q = s + strlen(s) - strlen(".jpeg"), ".jpeg") == 0) {
*q = '\0';
q = (char *)"jpg";
} else if (strcmp(q = s + strlen(s) - strlen(".tiff"), ".tiff") == 0) {
*q = '\0';
q = (char *)"tif";
} else { } else {
q = NULL; q = NULL;
} }