1
1

* util.c (extension): Simplified the code.

Этот коммит содержится в:
Roland Illig 2004-12-02 19:39:21 +00:00
родитель 91a4d7e764
Коммит 639e150164
2 изменённых файлов: 3 добавлений и 11 удалений

Просмотреть файл

@ -5,6 +5,7 @@
handling out of get_byte.
* view.c: Cleaned up the code. Added error handling for the
growing buffer case.
* util.c (extension): Simplified the code.
2004-12-02 Andrew V. Samoilov <sav@bcs.zp.ua>

Просмотреть файл

@ -591,17 +591,8 @@ int regexp_match (const char *pattern, const char *string, int match_type)
const char *extension (const char *filename)
{
const char *d;
if (!(*filename))
return "";
d = filename + strlen (filename) - 1;
for (;d >= filename; d--){
if (*d == '.')
return d+1;
}
return "";
const char *d = strrchr (filename, '.');
return (d != NULL) ? d + 1 : "";
}
int get_int (const char *file, const char *key, int def)