Change structure field named 'toupper' to 'to_upper' to avoid conflict

with the macro of the same name.  Same thing for 'tolower'.
This commit is contained in:
Archie Cobbs 1999-11-02 22:46:42 +00:00
parent 2ea6270424
commit 60fffafdc3
4 changed files with 18 additions and 18 deletions

View File

@ -117,8 +117,8 @@ nwfs_initnls(struct nwmount *nmp) {
nmp->m.nls.opt |= NWHP_NLS | NWHP_DOS;
if ((nmp->m.flags & NWFS_MOUNT_HAVE_NLS) == 0) {
nmp->m.nls.tolower = ncp_defnls.tolower;
nmp->m.nls.toupper = ncp_defnls.toupper;
nmp->m.nls.to_lower = ncp_defnls.to_lower;
nmp->m.nls.to_upper = ncp_defnls.to_upper;
nmp->m.nls.n2u = ncp_defnls.n2u;
nmp->m.nls.u2n = ncp_defnls.u2n;
return 0;
@ -127,8 +127,8 @@ nwfs_initnls(struct nwmount *nmp) {
if (pe == NULL) return ENOMEM;
pc = pe;
do {
COPY_TABLE(nmp->m.nls.tolower, ncp_defnls.tolower);
COPY_TABLE(nmp->m.nls.toupper, ncp_defnls.toupper);
COPY_TABLE(nmp->m.nls.to_lower, ncp_defnls.to_lower);
COPY_TABLE(nmp->m.nls.to_upper, ncp_defnls.to_upper);
COPY_TABLE(nmp->m.nls.n2u, ncp_defnls.n2u);
COPY_TABLE(nmp->m.nls.u2n, ncp_defnls.u2n);
} while(0);
@ -277,7 +277,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct proc *p)
}
mp->mnt_data = (qaddr_t)0;
if (nmp->m.flags & NWFS_MOUNT_HAVE_NLS)
free(nmp->m.nls.tolower, M_NWFSDATA);
free(nmp->m.nls.to_lower, M_NWFSDATA);
free(nmp, M_NWFSDATA);
mp->mnt_flag &= ~MNT_LOCAL;
return (error);

View File

@ -188,14 +188,14 @@ struct ncp_nlstables ncp_defnls = {
void ncp_str_upper(char *name) {
while (*name) {
*name = ncp_defnls.toupper[(u_char)*name];
*name = ncp_defnls.to_upper[(u_char)*name];
name++;
}
}
void ncp_str_lower(char *name) {
while (*name) {
*name = ncp_defnls.tolower[(u_char)*name];
*name = ncp_defnls.to_lower[(u_char)*name];
name++;
}
}
@ -209,7 +209,7 @@ ncp_pathcheck(char *s, int len, struct ncp_nlstables *nt, int strict) {
int opt = nt->opt;
if (opt & (NWHP_UPPER | NWHP_LOWER))
tbl = (opt & NWHP_UPPER) ? nt->toupper : nt->tolower;
tbl = (opt & NWHP_UPPER) ? nt->to_upper : nt->to_lower;
if ((opt & NWHP_DOS) == 0) {
while (len--) {
sc = (u_char)*(s++);
@ -251,7 +251,7 @@ ncp_pathcopy(char *src, char *dst, int len, struct ncp_nlstables *nt) {
}
} else if (nt->opt & NWHP_DOS) {
while (len--) {
c = nt->toupper[(u_char)*src];
c = nt->to_upper[(u_char)*src];
*dst = donls ? nt->u2n[c] : c;
dst++;
src++;
@ -287,7 +287,7 @@ ncp_path2unix(char *src, char *dst, int len, struct ncp_nlstables *nt) {
}
return;
}
tbl = (nt->opt & NWHP_LOWER) ? nt->tolower : nt->toupper;
tbl = (nt->opt & NWHP_LOWER) ? nt->to_lower : nt->to_upper;
while (len--) {
c = *src;
*dst = tbl[donls ? nt->n2u[c] : c];

View File

@ -43,8 +43,8 @@
#define NWHP_NOSTRICT 0x20 /* pretend to be a case insensitive */
struct ncp_nlstables {
u_char *tolower; /* local charset to lower case */
u_char *toupper; /* local charset to upper case */
u_char *to_lower; /* local charset to lower case */
u_char *to_upper; /* local charset to upper case */
u_char *n2u; /* NetWare to Unix */
u_char *u2n;
int opt; /* may depend on context */
@ -83,4 +83,4 @@ void ncp_path2unix(char *src, char *dst, int len, struct ncp_nlstables *nt);
#endif /* !KERNEL */
#endif /* _NCP_NCP_NLS_H_ */
#endif /* _NCP_NCP_NLS_H_ */

View File

@ -117,8 +117,8 @@ nwfs_initnls(struct nwmount *nmp) {
nmp->m.nls.opt |= NWHP_NLS | NWHP_DOS;
if ((nmp->m.flags & NWFS_MOUNT_HAVE_NLS) == 0) {
nmp->m.nls.tolower = ncp_defnls.tolower;
nmp->m.nls.toupper = ncp_defnls.toupper;
nmp->m.nls.to_lower = ncp_defnls.to_lower;
nmp->m.nls.to_upper = ncp_defnls.to_upper;
nmp->m.nls.n2u = ncp_defnls.n2u;
nmp->m.nls.u2n = ncp_defnls.u2n;
return 0;
@ -127,8 +127,8 @@ nwfs_initnls(struct nwmount *nmp) {
if (pe == NULL) return ENOMEM;
pc = pe;
do {
COPY_TABLE(nmp->m.nls.tolower, ncp_defnls.tolower);
COPY_TABLE(nmp->m.nls.toupper, ncp_defnls.toupper);
COPY_TABLE(nmp->m.nls.to_lower, ncp_defnls.to_lower);
COPY_TABLE(nmp->m.nls.to_upper, ncp_defnls.to_upper);
COPY_TABLE(nmp->m.nls.n2u, ncp_defnls.n2u);
COPY_TABLE(nmp->m.nls.u2n, ncp_defnls.u2n);
} while(0);
@ -277,7 +277,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct proc *p)
}
mp->mnt_data = (qaddr_t)0;
if (nmp->m.flags & NWFS_MOUNT_HAVE_NLS)
free(nmp->m.nls.tolower, M_NWFSDATA);
free(nmp->m.nls.to_lower, M_NWFSDATA);
free(nmp, M_NWFSDATA);
mp->mnt_flag &= ~MNT_LOCAL;
return (error);