lkml.org 
[lkml]   [2000]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.18pre10: A few warnings less...
On Tue, 26 Sep 2000, Horst von Brand wrote:

> - The whole nls stuff is a bunch of tables plus a few functions and
> structures that look like boilerplate code to my (untrained) eye. I'd
> rewrite the whole lot as the tables plus an #included file that gives the
> rest, to reduce the possibility of code skew. They all seem to have a
> (minor) bug in that their users (e.g, fs/vfat/namei.c:679)pass a const char
> pointer to ->char2uni() (one of the functions replicated in each nls
> module) which is declared to take a plain char pointer. This function
> doesn't modify anything, so const char pointer is really right. But to
> change them all is a mess... I'd prefer to do it as explained earlier.
> Comments?

The code in 2.4 also repeats the same code between nls tables. Most of
them have identical functions, the exceptions are cp932, 936, 949, 950 and
possibly some other file. So please change 2.4 too if you do this. And
please change it.

Changing them all only requires a perl/sed/something script, modifying
them to use an #include requires comparing and deciding which to
move to an #include. Mechanical work vs a few seconds of thought :)

I did think about the duplicated code when I looked at nls in 2.4, but I
was trying to reuse the uni2char and char2uni in nls_base (which is never
a module) and reuse that (on a binary level) in all modules that could. It
didn't work out immediately so I dropped the idea.

/Urban

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.058 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site