/* Copyright 1998 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
*  Lan Manager client
*
*  Xlate.H --  DOS to RISCOS name & attrib mapping header
*
*  Versions
*  08-03-94 INH Original
*
*/

/* Some general functions */
extern int stricmp ( const char *s1, const char *s2 );
extern void strcpyn ( char *d, const char *s, int n );
extern void strcpyn_upper ( char *d, const char *s, int n );
extern void strcpyn_lower ( char *d, const char *s, int n );

extern void Xlt_Jumble ( char *str );
extern void Xlt_Unjumble ( char *str );


#define CNV_DATETIME 1
#define CNV_ATTRIBS  2

extern void Xlt_CnvDOStoRO ( DOS_ATTRIBS *pInAttr,
                             RISCOS_ATTRIBS *pOutAttr, int flags );

extern void Xlt_CnvROtoDOS ( RISCOS_ATTRIBS *pInAttr,
                             DOS_ATTRIBS *pOutAttr, int flags );


extern char *Xlt_GetRISCOSLeafName ( char *name );
extern void Xlt_NameDOStoRO ( char *riscos_dst, char *dos_src );

/* Name mode */
#define NM_PRESERVED 0
#define NM_LOWERCASE 1
#define NM_FIRSTCAPS 2

extern err_t Xlt_ExpandSearchEntry ( BYTE *entry,
            char *DOS_pathname,
            char *name_out,
            DOS_ATTRIBS *pOutDA,
            RISCOS_ATTRIBS *pOutRA );


extern err_t Xlt_SetDefaultDrv ( char *path );
extern err_t Xlt_ConvertPath ( char *RO_name_in,
                               char *DOS_name_out );

/* Translate from our error code to RISCOS error block */
extern _kernel_oserror *Xlt_Error ( err_t err );

/* Translate from RISCOS error block to our error code */
extern err_t Xlt_SetOSError ( _kernel_oserror *err );