[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue with ls -v / sort -V and strverscmp() usage
From: |
Kamil Dudka |
Subject: |
Re: Issue with ls -v / sort -V and strverscmp() usage |
Date: |
Thu, 18 Sep 2008 12:39:30 +0200 |
User-agent: |
KMail/1.9.9 |
On Wednesday 17 September 2008 13:13:03 you wrote:
> - Fix the obvious bugs, for example, you need to cast 'char' values to
> 'unsigned char' before passing them to <ctype.h> functions.
> - Streamline the operation: Can't you get rid of copying the two strings?
> For example, by changing verrevcmp to take 4 arguments
> (str1, len1, str2, len2) instead of NUL terminated arguments (str1,
> str2)?
> - Remove unnecessary casts, for example, if match_suffix took 'char *'
> arguments and returned a 'char *', no casts would be necessary.
> - GNU coding style: space between function name and opening parenthesis,
> write 'const char *', not 'const char*', etc
New version of filevercmp.c is attached, now without copying of the input
strings. I've also made a simple performance test - the speed was about 7-8x
slower than original glibc strverscmp function, but the glibc's result is
mostly wrong.
Kamil
filevercmp.c
Description: Text Data
- Re: Issue with ls -v / sort -V and strverscmp() usage, (continued)
- Re: Issue with ls -v / sort -V and strverscmp() usage, Kamil Dudka, 2008/09/03
- Re: Issue with ls -v / sort -V and strverscmp() usage, Jim Meyering, 2008/09/07
- Re: Issue with ls -v / sort -V and strverscmp() usage, Kamil Dudka, 2008/09/17
- Re: Issue with ls -v / sort -V and strverscmp() usage, Bruno Haible, 2008/09/17
- Re: Issue with ls -v / sort -V and strverscmp() usage, Kamil Dudka, 2008/09/17
- Re: Issue with ls -v / sort -V and strverscmp() usage,
Kamil Dudka <=
- Re: Issue with ls -v / sort -V and strverscmp() usage, Bruno Haible, 2008/09/21
- Re: Issue with ls -v / sort -V and strverscmp() usage, Ben Pfaff, 2008/09/21
- Re: Issue with ls -v / sort -V and strverscmp() usage, Bruno Haible, 2008/09/21
- willing to contribute verrevcmp to gnulib?, Ben Pfaff, 2008/09/21
- Re: willing to contribute verrevcmp to gnulib?, Jim Meyering, 2008/09/29
- Re: willing to contribute verrevcmp to gnulib?, Ian Jackson, 2008/09/29
- Re: willing to contribute verrevcmp to gnulib?, Jim Meyering, 2008/09/29
- Re: willing to contribute verrevcmp to gnulib?, Ian Jackson, 2008/09/29
- Re: willing to contribute verrevcmp to gnulib?, Jim Meyering, 2008/09/29
- Re: willing to contribute verrevcmp to gnulib?, Ian Jackson, 2008/09/30