Yaakobovich.
/*
- * $Id: desktop.c,v 1.26.2.4.2.15 2004-06-20 15:30:04 bfernhomberg Exp $
+ * $Id: desktop.c,v 1.26.2.4.2.16 2004-09-07 06:17:20 didg Exp $
*
* See COPYRIGHT.
*
return( AFP_OK );
}
-u_char utag[] = { 0, 0, 0, 0 };
-u_char ucreator[] = { 'U', 'N', 'I', 'X' };
-u_char utype[] = { 'T', 'E', 'X', 'T' };
-short usize = 256;
-u_char uicon[] = {
+static u_char utag[] = { 0, 0, 0, 0 };
+static u_char ucreator[] = { '0', '0', '0', '0' };/* { 'U', 'N', 'I', 'X' };*/
+static u_char utype[] = { '0', '0', '0', '0' };/* { 'T', 'E', 'X', 'T' };*/
+static short usize = 256;
+static u_char uicon[] = {
0x1F, 0xFF, 0xFC, 0x00, 0x10, 0x00, 0x06, 0x00,
0x10, 0x00, 0x05, 0x00, 0x10, 0x00, 0x04, 0x80,
0x10, 0x00, 0x04, 0x40, 0x10, 0x00, 0x04, 0x20,
/*
- * $Id: file.c,v 1.92.2.2.2.30 2004-09-06 09:38:21 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31 2004-09-07 06:17:21 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
const u_char ufinderi[] = {
- 'T', 'E', 'X', 'T', 'U', 'N', 'I', 'X',
+ 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
void *get_finderinfo(const char *mpath, struct adouble *adp, void *data)
{
struct extmap *em;
- void *ad_finder;
+ void *ad_finder = NULL;
+ int chk_ext = 0;
+
+ if (adp)
+ ad_finder = ad_entry(adp, ADEID_FINDERI);
- if (adp && (ad_finder = ad_entry(adp, ADEID_FINDERI))) {
+ if ((adp != NULL) && (ad_finder != NULL)) {
memcpy(data, ad_finder, 32);
}
else {
memcpy(data, ufinderi, 32);
+ chk_ext = 1;
}
-
- if ((!adp || !memcmp(ad_entry(adp, ADEID_FINDERI),ufinderi , 8 ))
- && (em = getextmap( mpath ))
- ) {
+ /** Only enter if no appledouble information and no finder information found. */
+ if (chk_ext && (em = getextmap( mpath ))) {
memcpy(data, em->em_type, sizeof( em->em_type ));
memcpy((char *)data + 4, em->em_creator, sizeof(em->em_creator));
}
/*
- * $Id: ad_open.c,v 1.30.6.17 2004-08-23 22:27:02 bfernhomberg Exp $
+ * $Id: ad_open.c,v 1.30.6.18 2004-09-07 06:17:22 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
&ashort, sizeof(ashort));
} else {
/* set default creator/type fields */
- memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRTYPEOFF,"TEXT", 4);
- memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRCREATOFF,"UNIX", 4);
+ memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRTYPEOFF,"\0\0\0\0", 4);
+ memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRCREATOFF,"\0\0\0\0", 4);
}
/* make things invisible */