/*
- * $Id: desktop.c,v 1.26 2003-04-09 06:05:24 didg Exp $
+ * $Id: desktop.c,v 1.30 2003-06-09 14:42:38 srittau Exp $
*
* See COPYRIGHT.
*
memcpy( &vid, ibuf, sizeof( vid ));
ibuf += sizeof( vid );
- if (( vol = getvolbyvid( vid )) == NULL ) {
+ if (NULL == ( vol = getvolbyvid( vid )) ) {
cc = AFPERR_PARAM;
goto addicon_err;
}
*/
static char upath[ MAXPATHLEN + 1];
static char mpath[ MAXPATHLEN + 1];
+#ifdef AFP3x
static char ucs2[ MAXPATHLEN + 1];
+#endif
static char *old_mtoupath(const struct vol *vol, char *mpath)
{
m = mpath;
u = upath;
+ if ((vol->v_casefold & (AFPVOL_MTOUUPPER| AFPVOL_MTOULOWER))) {
+ changed = 1;
+ }
while ( *m != '\0' ) {
/* handle case conversion first */
if (vol->v_casefold & AFPVOL_MTOUUPPER)
/* do the hex conversion */
u = upath;
m = mpath;
+ if ((vol->v_casefold & (AFPVOL_MTOUUPPER| AFPVOL_MTOULOWER))) {
+ changed = 1;
+ }
while ( *u != '\0' ) {
/* we have a code page */
if (vol->v_utompage && ((*u & 0x80) ||
}
/* --------------- */
+#ifdef AFP3x
extern unsigned int do_precomposition(unsigned int base, unsigned int comb);
static char comp[MAXPATHLEN +1];
}
return comp;
}
+#endif
/* --------------------------- */
char *mtoupath(const struct vol *vol, char *mpath, int utf8)
{
- char *m, *u, *r;
- int i = 0;
+ int i = 0;
+ char *m, *u;
+#ifdef AFP3x
+ char *r;
size_t inplen;
size_t outlen;
+#endif
if ( *mpath == '\0' ) {
return( "." );
/* --------------- */
char *utompath(const struct vol *vol, char *upath, int utf8)
{
- char *m, *u, *r;
int h;
int mangleflag = 0;
+ char *m, *u;
+#ifdef AFP3x
+ char *r;
size_t inplen;
size_t outlen;
+#endif
if (!vol_utf8(vol))
return old_utompath(vol, upath);
clen = min( clen, 199 );
upath = path->u_name;
- if (check_access(upath, OPENACC_WR ) < 0) {
+ if (!vol_unix_priv(vol) && check_access(upath, OPENACC_WR ) < 0) {
return AFPERR_ACCESS;
}
}
upath = s_path->u_name;
- if (check_access(upath, OPENACC_WR ) < 0) {
+ if (!vol_unix_priv(vol) && check_access(upath, OPENACC_WR ) < 0) {
return AFPERR_ACCESS;
}