Re: [netatalk-admins] more thoughts on filename mapping


Subject: Re: [netatalk-admins] more thoughts on filename mapping
From: Stefan Bethke (stefan@promo.de)
Date: Thu Dec 17 1998 - 15:30:42 EST


a sun <asun@saul5.u.washington.edu> wrote:

> however, i am thinking about changing afpd's name mangling to use
> isprint() instead of isascii(). the current test lets ^M pass by
> unscathed. as a result, this change will break backwards
> compatibility, especially with icons. i'll have the adv1tov2 utility
> go through and do an (isascii() && !isprint()) test to figure out what
> to convert. so, how do people feel about that?

I did that for both netatalk-1.4b2 and your version in the FreeBSD ports:

--- etc/afpd/desktop.c.orig Tue Aug 25 21:59:28 1998
+++ etc/afpd/desktop.c Tue Aug 25 22:00:23 1998
@@ -429,7 +429,7 @@
     m = mpath;
     u = upath;
     while ( *m != '\0' ) {
- if ( !isascii( *m ) || *m == '/' || ( i == 0 && *m == '.' )) {
+ if ( !isprint( (unsigned char)*m ) || *m == '/' || ( i == 0 && *m
== '.' )) {
            *u++ = ':';
            *u++ = hexdig[ ( *m & 0xf0 ) >> 4 ];
            *u++ = hexdig[ *m & 0x0f ];

ls output definitly looks better.

Stefan

--
Stefan Bethke
Promo Datentechnik      |  Tel. +49-40-851744-18
+ Systemberatung GmbH   |  Fax. +49-40-851744-44
Eduardstrasse 46-48     |  e-mail: stefan@Promo.DE
D-20257 Hamburg         |  http://www.Promo.DE/



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:33:54 EST