Handle case where a directory contains a '." but the
filename doesn't (i.e. has no extension)
Modified: trunk/reactos/lib/crt/stdlib/splitp.c
_____
Modified: trunk/reactos/lib/crt/stdlib/splitp.c
--- trunk/reactos/lib/crt/stdlib/splitp.c 2005-05-15 21:11:37 UTC
(rev 15320)
+++ trunk/reactos/lib/crt/stdlib/splitp.c 2005-05-15 21:28:44 UTC
(rev 15321)
@@ -44,8 +44,9 @@
}
}
- tmp_ext = (_TCHAR*)_tcsrchr(path,'.');
- if (!tmp_ext)
+ /* If the dot is before the last dir separator, it's part
+ * of a directory name, not the start of the extension */
+ if (!tmp_ext || tmp_ext < tmp_dir)
{
tmp_ext = (_TCHAR*)path+_tcslen(path);
}
change from atoi to sprintf
linux does not support itoa
Modified: trunk/reactos/tools/cdmake/cdmake.c
_____
Modified: trunk/reactos/tools/cdmake/cdmake.c
--- trunk/reactos/tools/cdmake/cdmake.c 2005-05-15 19:40:57 UTC (rev
15319)
+++ trunk/reactos/tools/cdmake/cdmake.c 2005-05-15 21:11:37 UTC (rev
15320)
@@ -617,8 +617,8 @@
// max 255 times for equal short filename
if (filename_counter>255) error_exit ( "'%s' is a duplicate file
name, aborting...", filename );
d->name_on_cd[8] = '~';
- memset(&d->name_on_cd[9],0,5);
- itoa(filename_counter, &d->name_on_cd[9],10);
+ memset(&d->name_on_cd[9],0,5);
+ sprintf(&d->name_on_cd[9],"%d",filename_counter);
filename_counter++;
}