+
+2001-02-23 jeff b <jeff@univrel.pr.uconn.edu>
+
+ * etc/afpd/desktop.c, etc/afpd/codepage.c, etc/afpd/nls/makecode.c:
+ patch from Axel Barnitzek <barney@users.sourceforge.net> to fix
+ broken codepage support.
+
+ * ChangeLog: started updaing ChangeLog with important patch/fix
+ information, as it is *never* up to date.
+
+2001-02-20 jeff b <jeff@univrel.pr.uconn.edu>
+
+ Released 1.5pre3
+ - Debian packaging in tree
+ - Numerous Makefile/build fixes
+ - .cvsignore implemented
+ - Solaris build fixes
+
2001-01-02 jeff b <jeff@univrel.pr.uconn.edu>
* etc/afpd/uid.c, etc/afpd/uid.h, ...: added support for forcing
/*
+ * $Id: codepage.c,v 1.3 2001-02-23 15:35:37 rufustfirefly Exp $
+ *
* Copyright (c) 2000 Adrian Sun
* All Rights Reserved. See COPYRIGHT.
*
* the badumap specifies illegal characters. these are 8-bit values
* with an associated rule field. here are the rules:
*
- *
* illegal values: 0 is the only illegal value. no translation will
* occur in those cases.
*/
int codepage_init(struct vol *vol, const int rules,
const int quantum)
{
- if ((rules & CODEPAGE_RULE_MTOU) && !vol->v_utompage) {
+ if ((rules & CODEPAGE_RULE_UTOM) && !vol->v_utompage) {
vol->v_utompage = init_codepage(quantum);
if (!vol->v_utompage)
- return -1;
+ goto err_utompage;
}
- if ((rules & CODEPAGE_RULE_UTOM) && !vol->v_mtoupage) {
+ if ((rules & CODEPAGE_RULE_MTOU) && !vol->v_mtoupage) {
vol->v_mtoupage = init_codepage(quantum);
if (!vol->v_mtoupage) {
- goto err_utompage;
+ goto err_mtoupage;
}
}
goto codepage_fail;
}
+ /* ignore namelen */
+ cur++;
+
/* find out the data quantum size. default to 1 if nothing's given. */
quantum = *cur ? *cur : 1;
cur++;
/*
- * Copyright (c) 1990,1993 Regents of The University of Michigan.
- * All Rights Reserved. See COPYRIGHT.
+ * $Id: desktop.c,v 1.3 2001-02-23 15:35:37 rufustfirefly Exp $
+ * See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
/* we have a code page. we only use the ascii range
* if we have map ascii specified. */
-#if 0
+#if 1
if (vol->v_mtoupage && ((*m > 0x7F) ||
vol->v_flags & AFPVOL_MAPASCII)) {
- *u = vol->v_mtoupage[*m];
+ *u = vol->v_mtoupage->map[*m].value;
} else
#endif
#if AD_VERSION == AD_VERSION1
m = mpath;
while ( *u != '\0' ) {
/* we have a code page */
-#if 0
+#if 1
if (vol->v_utompage && ((*u > 0x7F) ||
(vol->v_flags & AFPVOL_MAPASCII))) {
- *m = vol->v_utompage[*u];
+ *m = vol->v_utompage->map[*u].value;
} else
#endif
if ( *u == ':' && *(u+1) != '\0' && islxdigit( *(u+1)) &&
-/* quick-and-dirty way of creating code pages */
+/*
+ * $Id: makecode.c,v 1.3 2001-02-23 15:35:37 rufustfirefly Exp $
+ *
+ * quick-and-dirty way of creating code pages
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
continue;
}
+ memset(buf, 0, CODEPAGE_FILE_HEADER_SIZE);
+
id = htons(CODEPAGE_FILE_ID); /* file id */
memcpy(buf, &id, sizeof(id));
*(buf + 2) = CODEPAGE_FILE_VERSION; /* version */
/* size of data */
id = htons(names[i].m_len);
- memcpy(buf + 7, &id, sizeof(id));
+ memcpy(buf + 8, &id, sizeof(id));
/* write it out */
fwrite(buf, CODEPAGE_FILE_HEADER_SIZE, 1, fp);
}
fclose(fp);
}
-
return 0;
}